|
@@ -12,31 +12,8 @@ import { DynafieldDirective } from './directives/dynafield.directive';
|
|
import { DynaformService } from './services/dynaform.service';
|
|
import { DynaformService } from './services/dynaform.service';
|
|
import { ModelMapperService } from './services/model-mapper.service';
|
|
import { ModelMapperService } from './services/model-mapper.service';
|
|
|
|
|
|
-// NOTE: Importing from barrel may not be supported with AOT compilation,
|
|
|
|
-// so instead we MAY have to do things the long-winded way (see per-component imports below...)
|
|
|
|
-// Using JIT for now, as a non-ideal workaround, with: ng build --prod --aot=false --build-optimizer=false
|
|
|
|
-// See: https://github.com/angular/angular/issues/20604
|
|
|
|
-import * as formFieldComponents from './components';
|
|
|
|
-const ffcArr = Object.values(formFieldComponents); // Array of all the Form Field Components
|
|
|
|
-/*
|
|
|
|
-import { HiddenComponent } from './components/native/hidden/hidden.component';
|
|
|
|
-import { ClrTextComponent as TextComponent } from './components/clarity/text/clr-text.component';
|
|
|
|
-import { ClrTextareaComponent as TextareaComponent } from './components/clarity/textarea/clr-textarea.component';
|
|
|
|
-import { ClrPasswordComponent as PasswordComponent } from './components/clarity/password/clr-password.component';
|
|
|
|
-import { ClrSelectComponent as SelectComponent } from './components/clarity/select/clr-select.component';
|
|
|
|
-import { ClrRadioComponent as RadioComponent } from './components/clarity/radio/clr-radio.component';
|
|
|
|
-import { ClrCheckboxComponent as CheckboxComponent } from './components/clarity/checkbox/clr-checkbox.component';
|
|
|
|
-import { ClrDatepickerComponent } from './components/clarity/datepicker/datepicker.component';
|
|
|
|
-import { CheckbuttonComponent } from './components/custom/checkbutton/checkbutton.component';
|
|
|
|
-import { DropdownModifiedInputComponent } from './components/custom/dropdown-modified-input/dropdown-modified-input.component';
|
|
|
|
-import { MultilineComponent } from './components/custom/multiline/multiline.component';
|
|
|
|
-import { ClrCheckboxGroupComponent as CheckboxGroupComponent } from './components/group/checkbox-group/clr-checkbox-group.component';
|
|
|
|
-import { CheckbuttonGroupComponent } from './components/group/checkbutton-group/checkbutton-group.component';
|
|
|
|
-import { ButtonGroupComponent } from './components/nocontrol/button-group/button-group.component';
|
|
|
|
-import { HeadingComponent } from './components/nocontrol/heading/heading.component';
|
|
|
|
-import { DisplayComponent } from './components/nocontrol/display/display.component';
|
|
|
|
-*/
|
|
|
|
-
|
|
|
|
|
|
+import { ffcArr } from './components'; // ffcArr = Form Field Components Array, exported from components/index.ts
|
|
|
|
+console.log(ffcArr);
|
|
|
|
|
|
@NgModule({
|
|
@NgModule({
|
|
imports: [
|
|
imports: [
|
|
@@ -52,41 +29,8 @@ import { DisplayComponent } from './components/nocontrol/display/display.compone
|
|
DynaformComponent,
|
|
DynaformComponent,
|
|
DynafieldDirective,
|
|
DynafieldDirective,
|
|
...ffcArr
|
|
...ffcArr
|
|
- // HiddenComponent,
|
|
|
|
- // TextComponent,
|
|
|
|
- // TextareaComponent,
|
|
|
|
- // PasswordComponent,
|
|
|
|
- // SelectComponent,
|
|
|
|
- // RadioComponent,
|
|
|
|
- // CheckboxComponent,
|
|
|
|
- // ClrDatepickerComponent,
|
|
|
|
- // CheckbuttonComponent,
|
|
|
|
- // DropdownModifiedInputComponent,
|
|
|
|
- // MultilineComponent,
|
|
|
|
- // CheckboxGroupComponent,
|
|
|
|
- // CheckbuttonGroupComponent,
|
|
|
|
- // ButtonGroupComponent,
|
|
|
|
- // HeadingComponent,
|
|
|
|
- // DisplayComponent
|
|
|
|
- ],
|
|
|
|
- entryComponents: [ ffcArr
|
|
|
|
- // HiddenComponent,
|
|
|
|
- // TextComponent,
|
|
|
|
- // TextareaComponent,
|
|
|
|
- // PasswordComponent,
|
|
|
|
- // SelectComponent,
|
|
|
|
- // RadioComponent,
|
|
|
|
- // CheckboxComponent,
|
|
|
|
- // ClrDatepickerComponent,
|
|
|
|
- // CheckbuttonComponent,
|
|
|
|
- // DropdownModifiedInputComponent,
|
|
|
|
- // MultilineComponent,
|
|
|
|
- // CheckboxGroupComponent,
|
|
|
|
- // CheckbuttonGroupComponent,
|
|
|
|
- // ButtonGroupComponent,
|
|
|
|
- // HeadingComponent,
|
|
|
|
- // DisplayComponent
|
|
|
|
],
|
|
],
|
|
|
|
+ entryComponents: ffcArr,
|
|
providers: [
|
|
providers: [
|
|
DynaformService,
|
|
DynaformService,
|
|
ModelMapperService
|
|
ModelMapperService
|
|
@@ -95,24 +39,7 @@ import { DisplayComponent } from './components/nocontrol/display/display.compone
|
|
FormsModule,
|
|
FormsModule,
|
|
ReactiveFormsModule,
|
|
ReactiveFormsModule,
|
|
DynaformComponent,
|
|
DynaformComponent,
|
|
- DynafieldDirective,
|
|
|
|
- ...ffcArr
|
|
|
|
- // HiddenComponent,
|
|
|
|
- // TextComponent,
|
|
|
|
- // TextareaComponent,
|
|
|
|
- // PasswordComponent,
|
|
|
|
- // SelectComponent,
|
|
|
|
- // RadioComponent,
|
|
|
|
- // CheckboxComponent,
|
|
|
|
- // ClrDatepickerComponent,
|
|
|
|
- // CheckbuttonComponent,
|
|
|
|
- // DropdownModifiedInputComponent,
|
|
|
|
- // MultilineComponent,
|
|
|
|
- // CheckboxGroupComponent,
|
|
|
|
- // CheckbuttonGroupComponent,
|
|
|
|
- // ButtonGroupComponent,
|
|
|
|
- // HeadingComponent,
|
|
|
|
- // DisplayComponent
|
|
|
|
|
|
+ DynafieldDirective
|
|
]
|
|
]
|
|
})
|
|
})
|
|
export class DynaformModule { }
|
|
export class DynaformModule { }
|