@dignite-ng/expand.dynamic-form 3.0.0-rc.7 → 3.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/dynamic/dynamic-config.component.mjs +11 -0
- package/esm2022/lib/components/dynamic/dynamic-control.component.mjs +11 -0
- package/esm2022/lib/components/dynamic/dynamic-view.component.mjs +57 -0
- package/esm2022/lib/components/dynamic/dynamic.component.mjs +1 -1
- package/esm2022/lib/components/dynamic/index.mjs +4 -1
- package/esm2022/lib/components/form/date-edit/date-edit-view.component.mjs +40 -0
- package/esm2022/lib/components/form/form-control-group.mjs +11 -6
- package/esm2022/lib/components/form/numeric-edit/numeric-edit-view.component.mjs +39 -0
- package/esm2022/lib/components/form/select/select-config.component.mjs +16 -6
- package/esm2022/lib/components/form/select/select-control.component.mjs +16 -14
- package/esm2022/lib/components/form/select/select-view.component.mjs +44 -0
- package/esm2022/lib/components/form/switch/switch-view.component.mjs +40 -0
- package/esm2022/lib/components/form/text-edit/text-edit-view.component.mjs +39 -0
- package/esm2022/lib/components/form/text-edit/text-edit.component.mjs +3 -3
- package/esm2022/lib/dynamic-form.module.mjs +33 -3
- package/esm2022/lib/services/form-control.service.mjs +33 -0
- package/fesm2022/dignite-ng-expand.dynamic-form.mjs +350 -29
- package/fesm2022/dignite-ng-expand.dynamic-form.mjs.map +1 -1
- package/lib/components/dynamic/dynamic-config.component.d.ts +5 -0
- package/lib/components/dynamic/dynamic-control.component.d.ts +5 -0
- package/lib/components/dynamic/dynamic-view.component.d.ts +24 -0
- package/lib/components/dynamic/index.d.ts +3 -0
- package/lib/components/form/date-edit/date-edit-view.component.d.ts +17 -0
- package/lib/components/form/numeric-edit/numeric-edit-view.component.d.ts +17 -0
- package/lib/components/form/select/select-view.component.d.ts +17 -0
- package/lib/components/form/switch/switch-view.component.d.ts +17 -0
- package/lib/components/form/text-edit/text-edit-view.component.d.ts +17 -0
- package/lib/dynamic-form.module.d.ts +14 -6
- package/lib/services/form-control.service.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef,
|
|
2
|
+
import { inject, ChangeDetectorRef, ViewChild, Input, Component, ChangeDetectionStrategy, Injectable, ViewContainerRef, Inject, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { Validators, FormArray, FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i2 from '@abp/ng.core';
|
|
@@ -148,14 +148,14 @@ class TextEditComponent {
|
|
|
148
148
|
ValidatorsArray.push(Validators.maxLength(this._fields.field.formConfiguration['TextEdit.CharLimit']));
|
|
149
149
|
}
|
|
150
150
|
let newControl = this.fb.control(this._selected, ValidatorsArray);
|
|
151
|
-
this.extraProperties
|
|
151
|
+
this.extraProperties?.setControl(this._fields.field.name, newControl);
|
|
152
152
|
resolve(true);
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
ngOnDestroy() {
|
|
156
156
|
//Called once, before the instance is destroyed.
|
|
157
157
|
//Add 'implements OnDestroy' to the class.
|
|
158
|
-
this.extraProperties
|
|
158
|
+
this.extraProperties?.removeControl(this._fields.field.name);
|
|
159
159
|
}
|
|
160
160
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
161
161
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TextEditComponent, selector: "df-text-edit", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"_fields.field.formConfiguration['TextEdit.Mode'] ===_TextEditMode.SingleLine\">\n <input type=\"text\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\n [placeholder]=\"_fields.field.formConfiguration['TextEdit.Placeholder']\" />\n </ng-container>\n <ng-container *ngIf=\"_fields.field.formConfiguration['TextEdit.Mode'] === _TextEditMode.MultipleLine\">\n <textarea class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\n [placeholder]=\"_fields.field.formConfiguration['TextEdit.Placeholder']\" rows=\"3\"></textarea>\n </ng-container>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
|
|
@@ -697,6 +697,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
697
697
|
args: ['submitclick', { static: true }]
|
|
698
698
|
}] } });
|
|
699
699
|
|
|
700
|
+
class DateEditViewComponent {
|
|
701
|
+
constructor() {
|
|
702
|
+
/**展示则内容 */
|
|
703
|
+
this.showValue = '';
|
|
704
|
+
/**是否显示再列表 */
|
|
705
|
+
this.showInList = false;
|
|
706
|
+
/**表单控件Value */
|
|
707
|
+
this._value = '';
|
|
708
|
+
}
|
|
709
|
+
set value(v) {
|
|
710
|
+
this._value = v;
|
|
711
|
+
}
|
|
712
|
+
async ngAfterContentInit() {
|
|
713
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
714
|
+
//Add 'implements AfterContentInit' to the class.
|
|
715
|
+
let valueOptions = this._value;
|
|
716
|
+
if (this.type && valueOptions) {
|
|
717
|
+
this.showValue = valueOptions;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
721
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: DateEditViewComponent, selector: "df-date-edit-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue|shortDateTime}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue|shortDateTime}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.ShortDateTimePipe, name: "shortDateTime" }] }); }
|
|
722
|
+
}
|
|
723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditViewComponent, decorators: [{
|
|
724
|
+
type: Component,
|
|
725
|
+
args: [{ selector: 'df-date-edit-view', template: "@if(showInList){\r\n{{showValue|shortDateTime}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue|shortDateTime}}\r\n </div>\r\n</div>\r\n}" }]
|
|
726
|
+
}], propDecorators: { showInList: [{
|
|
727
|
+
type: Input
|
|
728
|
+
}], fields: [{
|
|
729
|
+
type: Input
|
|
730
|
+
}], type: [{
|
|
731
|
+
type: Input
|
|
732
|
+
}], value: [{
|
|
733
|
+
type: Input
|
|
734
|
+
}] } });
|
|
735
|
+
|
|
736
|
+
class NumericEditViewComponent {
|
|
737
|
+
constructor() {
|
|
738
|
+
/**展示则内容 */
|
|
739
|
+
this.showValue = '';
|
|
740
|
+
/**是否显示再列表 */
|
|
741
|
+
this.showInList = false;
|
|
742
|
+
/**表单控件Value */
|
|
743
|
+
this._value = '';
|
|
744
|
+
}
|
|
745
|
+
set value(v) {
|
|
746
|
+
this._value = v;
|
|
747
|
+
}
|
|
748
|
+
async ngAfterContentInit() {
|
|
749
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
750
|
+
//Add 'implements AfterContentInit' to the class.
|
|
751
|
+
let valueOptions = this._value;
|
|
752
|
+
if (this.type && valueOptions) {
|
|
753
|
+
this.showValue = valueOptions;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
757
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: NumericEditViewComponent, selector: "df-numeric-edit-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
758
|
+
}
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditViewComponent, decorators: [{
|
|
760
|
+
type: Component,
|
|
761
|
+
args: [{ selector: 'df-numeric-edit-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
|
|
762
|
+
}], propDecorators: { showInList: [{
|
|
763
|
+
type: Input
|
|
764
|
+
}], fields: [{
|
|
765
|
+
type: Input
|
|
766
|
+
}], type: [{
|
|
767
|
+
type: Input
|
|
768
|
+
}], value: [{
|
|
769
|
+
type: Input
|
|
770
|
+
}] } });
|
|
771
|
+
|
|
700
772
|
class SelectConfig {
|
|
701
773
|
constructor(data) {
|
|
702
774
|
/**空值文本 */
|
|
@@ -811,7 +883,7 @@ class SelectConfigComponent {
|
|
|
811
883
|
this.dataLoaded();
|
|
812
884
|
}
|
|
813
885
|
get formConfiguration() {
|
|
814
|
-
return this._Entity
|
|
886
|
+
return this._Entity?.get('formConfiguration');
|
|
815
887
|
}
|
|
816
888
|
get SelectOptions() {
|
|
817
889
|
return this.formConfiguration.controls['Select.Options'];
|
|
@@ -837,11 +909,21 @@ class SelectConfigComponent {
|
|
|
837
909
|
}
|
|
838
910
|
AfterInit() {
|
|
839
911
|
return new Promise((resolve, rejects) => {
|
|
840
|
-
this._Entity
|
|
912
|
+
this._Entity?.setControl('formConfiguration', this.fb.group(new SelectConfig()));
|
|
841
913
|
if (this._selected && this._selected.formControlName == this._type) {
|
|
842
|
-
this._selected.formConfiguration['Select.Options']?.forEach(el => {
|
|
914
|
+
// this._selected.formConfiguration['Select.Options']?.forEach(el => {
|
|
915
|
+
// console.log(this._selected.formConfiguration,'el',el);
|
|
916
|
+
// this.addSelectOptions();
|
|
917
|
+
// });
|
|
918
|
+
for (const element of this._selected.formConfiguration['Select.Options']) {
|
|
919
|
+
for (const key in element) {
|
|
920
|
+
const item = element[key];
|
|
921
|
+
const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
922
|
+
element[capitalizedKey] = item;
|
|
923
|
+
}
|
|
843
924
|
this.addSelectOptions();
|
|
844
|
-
}
|
|
925
|
+
}
|
|
926
|
+
// console.log(this._selected.formConfiguration['Select.Options'],'111111')
|
|
845
927
|
this.formConfiguration.patchValue({
|
|
846
928
|
...this._selected.formConfiguration,
|
|
847
929
|
});
|
|
@@ -855,7 +937,7 @@ class SelectConfigComponent {
|
|
|
855
937
|
textChange(event, index) {
|
|
856
938
|
let SelectOptionsItem = this.SelectOptions.at(index);
|
|
857
939
|
let value = event.target.value;
|
|
858
|
-
if (SelectOptionsItem.get('Value')
|
|
940
|
+
if (SelectOptionsItem.get('Value')?.value)
|
|
859
941
|
return;
|
|
860
942
|
SelectOptionsItem.patchValue({
|
|
861
943
|
Value: this._DfApiService.chineseToPinyin(value),
|
|
@@ -917,17 +999,19 @@ class SelectControlComponent {
|
|
|
917
999
|
ValidatorsArray.push(Validators.required);
|
|
918
1000
|
}
|
|
919
1001
|
this.formConfiguration = this._fields.field.formConfiguration;
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1002
|
+
const isMultiple = this.formConfiguration['Select.Multiple'];
|
|
1003
|
+
let selectValue = isMultiple ? [] : '';
|
|
1004
|
+
console.log(this._fields.field.name, 'this.formConfigura', this.formConfiguration, this._selected);
|
|
1005
|
+
for (const element of this.formConfiguration['Select.Options']) {
|
|
1006
|
+
for (const key in element) {
|
|
1007
|
+
const item = element[key];
|
|
1008
|
+
const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
1009
|
+
element[capitalizedKey] = item;
|
|
1010
|
+
}
|
|
1011
|
+
if (Array.isArray(this._selected) && element.Selected && this._selected.length === 0) {
|
|
1012
|
+
selectValue = isMultiple ? [...selectValue, element.Value] : [element.Value];
|
|
1013
|
+
this._selected = selectValue;
|
|
1014
|
+
}
|
|
931
1015
|
}
|
|
932
1016
|
let newControl = this.fb.control(this._selected, ValidatorsArray);
|
|
933
1017
|
this.extraProperties.setControl(this._fields.field.name, newControl);
|
|
@@ -940,11 +1024,11 @@ class SelectControlComponent {
|
|
|
940
1024
|
this.extraProperties.removeControl(this._fields.field.name);
|
|
941
1025
|
}
|
|
942
1026
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
943
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectControlComponent, selector: "df-select-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n
|
|
1027
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectControlComponent, selector: "df-select-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <nz-select class=\"form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\n nzShowSearch nzMode=\"multiple\"\n formControlName=\"{{_fields.field.name}}\">\n <nz-option *ngFor=\"let item of _fields.field.formConfiguration['Select.Options']\"\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\" formControlName=\"{{_fields.field.name}}\">\n <option [value]=\"\">{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of _fields.field.formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\">{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["::ng-deep .selectcontrol nz-select{width:100%}::ng-deep .selectcontrol nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.275rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .selectcontrol nz-select .anticon-search,::ng-deep .selectcontrol nz-select .anticon-down{display:none}::ng-deep .selectcontrol .ant-select-multiple .ant-select-selection-item{max-width:40%!important}::ng-deep .was-validated .form-select-multiple{border-color:#4fbf67;padding-right:calc(1.5em + 1.35rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%234fbf67' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .3375rem) center;background-size:calc(.75em + .675rem) calc(.75em + .675rem)}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }] }); }
|
|
944
1028
|
}
|
|
945
1029
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectControlComponent, decorators: [{
|
|
946
1030
|
type: Component,
|
|
947
|
-
args: [{ selector: 'df-select-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n
|
|
1031
|
+
args: [{ selector: 'df-select-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <nz-select class=\"form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\n nzShowSearch nzMode=\"multiple\"\n formControlName=\"{{_fields.field.name}}\">\n <nz-option *ngFor=\"let item of _fields.field.formConfiguration['Select.Options']\"\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\" formControlName=\"{{_fields.field.name}}\">\n <option [value]=\"\">{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of _fields.field.formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\">{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["::ng-deep .selectcontrol nz-select{width:100%}::ng-deep .selectcontrol nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.275rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .selectcontrol nz-select .anticon-search,::ng-deep .selectcontrol nz-select .anticon-down{display:none}::ng-deep .selectcontrol .ant-select-multiple .ant-select-selection-item{max-width:40%!important}::ng-deep .was-validated .form-select-multiple{border-color:#4fbf67;padding-right:calc(1.5em + 1.35rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%234fbf67' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .3375rem) center;background-size:calc(.75em + .675rem) calc(.75em + .675rem)}\n"] }]
|
|
948
1032
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
|
|
949
1033
|
type: Input
|
|
950
1034
|
}], parentFiledName: [{
|
|
@@ -958,6 +1042,119 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
958
1042
|
args: ['submitclick', { static: true }]
|
|
959
1043
|
}] } });
|
|
960
1044
|
|
|
1045
|
+
class SelectViewComponent {
|
|
1046
|
+
constructor() {
|
|
1047
|
+
/**展示则内容 */
|
|
1048
|
+
this.showValue = '';
|
|
1049
|
+
/**是否显示再列表 */
|
|
1050
|
+
this.showInList = false;
|
|
1051
|
+
/**表单控件Value */
|
|
1052
|
+
this._value = '';
|
|
1053
|
+
}
|
|
1054
|
+
set value(v) {
|
|
1055
|
+
this._value = v;
|
|
1056
|
+
}
|
|
1057
|
+
async ngAfterContentInit() {
|
|
1058
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
1059
|
+
//Add 'implements AfterContentInit' to the class.
|
|
1060
|
+
let valueOptions = this._value;
|
|
1061
|
+
if (this.type && valueOptions) {
|
|
1062
|
+
if (Array.isArray(valueOptions)) {
|
|
1063
|
+
this.showValue = valueOptions.join(',');
|
|
1064
|
+
}
|
|
1065
|
+
else {
|
|
1066
|
+
this.showValue = valueOptions;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1071
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: SelectViewComponent, selector: "df-select-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1072
|
+
}
|
|
1073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, decorators: [{
|
|
1074
|
+
type: Component,
|
|
1075
|
+
args: [{ selector: 'df-select-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
|
|
1076
|
+
}], propDecorators: { showInList: [{
|
|
1077
|
+
type: Input
|
|
1078
|
+
}], fields: [{
|
|
1079
|
+
type: Input
|
|
1080
|
+
}], type: [{
|
|
1081
|
+
type: Input
|
|
1082
|
+
}], value: [{
|
|
1083
|
+
type: Input
|
|
1084
|
+
}] } });
|
|
1085
|
+
|
|
1086
|
+
class SwitchViewComponent {
|
|
1087
|
+
constructor() {
|
|
1088
|
+
/**展示则内容 */
|
|
1089
|
+
this.showValue = '';
|
|
1090
|
+
/**是否显示再列表 */
|
|
1091
|
+
this.showInList = false;
|
|
1092
|
+
/**表单控件Value */
|
|
1093
|
+
this._value = '';
|
|
1094
|
+
}
|
|
1095
|
+
set value(v) {
|
|
1096
|
+
this._value = v;
|
|
1097
|
+
}
|
|
1098
|
+
async ngAfterContentInit() {
|
|
1099
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
1100
|
+
//Add 'implements AfterContentInit' to the class.
|
|
1101
|
+
let valueOptions = this._value;
|
|
1102
|
+
if (this.type && valueOptions) {
|
|
1103
|
+
this.showValue = valueOptions;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1107
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: SwitchViewComponent, selector: "df-switch-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1108
|
+
}
|
|
1109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, decorators: [{
|
|
1110
|
+
type: Component,
|
|
1111
|
+
args: [{ selector: 'df-switch-view', template: "@if(showInList){\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n </div>\r\n</div>\r\n}" }]
|
|
1112
|
+
}], propDecorators: { showInList: [{
|
|
1113
|
+
type: Input
|
|
1114
|
+
}], fields: [{
|
|
1115
|
+
type: Input
|
|
1116
|
+
}], type: [{
|
|
1117
|
+
type: Input
|
|
1118
|
+
}], value: [{
|
|
1119
|
+
type: Input
|
|
1120
|
+
}] } });
|
|
1121
|
+
|
|
1122
|
+
class TextEditViewComponent {
|
|
1123
|
+
constructor() {
|
|
1124
|
+
/**展示则内容 */
|
|
1125
|
+
this.showValue = '';
|
|
1126
|
+
/**是否显示再列表 */
|
|
1127
|
+
this.showInList = false;
|
|
1128
|
+
/**表单控件Value */
|
|
1129
|
+
this._value = '';
|
|
1130
|
+
}
|
|
1131
|
+
set value(v) {
|
|
1132
|
+
this._value = v;
|
|
1133
|
+
}
|
|
1134
|
+
async ngAfterContentInit() {
|
|
1135
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
1136
|
+
//Add 'implements AfterContentInit' to the class.
|
|
1137
|
+
let valueOptions = this._value;
|
|
1138
|
+
if (this.type && valueOptions) {
|
|
1139
|
+
this.showValue = valueOptions;
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1143
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: TextEditViewComponent, selector: "df-text-edit-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1144
|
+
}
|
|
1145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditViewComponent, decorators: [{
|
|
1146
|
+
type: Component,
|
|
1147
|
+
args: [{ selector: 'df-text-edit-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
|
|
1148
|
+
}], propDecorators: { showInList: [{
|
|
1149
|
+
type: Input
|
|
1150
|
+
}], fields: [{
|
|
1151
|
+
type: Input
|
|
1152
|
+
}], type: [{
|
|
1153
|
+
type: Input
|
|
1154
|
+
}], value: [{
|
|
1155
|
+
type: Input
|
|
1156
|
+
}] } });
|
|
1157
|
+
|
|
961
1158
|
// import { CkEditorConfigComponent, CkEditorControlComponent } from "./ck-editor";
|
|
962
1159
|
/**
|
|
963
1160
|
* 表单控件分组-包含配置,控件,显示的数组
|
|
@@ -968,35 +1165,35 @@ const FieldControlGroup = [
|
|
|
968
1165
|
name: 'TextEdit',
|
|
969
1166
|
fieldConfigComponent: TextEditConfigComponent,
|
|
970
1167
|
fieldComponent: TextEditComponent,
|
|
971
|
-
|
|
1168
|
+
fieldViewComponent: TextEditViewComponent,
|
|
972
1169
|
},
|
|
973
1170
|
{
|
|
974
1171
|
displayName: '开关',
|
|
975
1172
|
name: 'Switch',
|
|
976
1173
|
fieldConfigComponent: SwitchConfigComponent,
|
|
977
1174
|
fieldComponent: SwitchControlComponent,
|
|
978
|
-
|
|
1175
|
+
fieldViewComponent: SwitchViewComponent,
|
|
979
1176
|
},
|
|
980
1177
|
{
|
|
981
1178
|
displayName: '选择',
|
|
982
1179
|
name: 'Select',
|
|
983
1180
|
fieldConfigComponent: SelectConfigComponent,
|
|
984
1181
|
fieldComponent: SelectControlComponent,
|
|
985
|
-
|
|
1182
|
+
fieldViewComponent: SelectViewComponent,
|
|
986
1183
|
},
|
|
987
1184
|
{
|
|
988
1185
|
displayName: '数字',
|
|
989
1186
|
name: 'NumericEdit',
|
|
990
1187
|
fieldConfigComponent: NumbericEditConfigComponent,
|
|
991
1188
|
fieldComponent: NumbericEditControlComponent,
|
|
992
|
-
|
|
1189
|
+
fieldViewComponent: NumericEditViewComponent,
|
|
993
1190
|
},
|
|
994
1191
|
{
|
|
995
1192
|
displayName: '日期',
|
|
996
1193
|
name: 'DateEdit',
|
|
997
1194
|
fieldConfigComponent: DateEditConfigComponent,
|
|
998
1195
|
fieldComponent: DateEditControlComponent,
|
|
999
|
-
|
|
1196
|
+
fieldViewComponent: DateEditViewComponent,
|
|
1000
1197
|
},
|
|
1001
1198
|
];
|
|
1002
1199
|
function AddFieldControlGroup(array = []) {
|
|
@@ -1114,6 +1311,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1114
1311
|
args: ['FormComponentsRef', { read: ViewContainerRef, static: true }]
|
|
1115
1312
|
}] } });
|
|
1116
1313
|
|
|
1314
|
+
class FormControlService {
|
|
1315
|
+
constructor(mergedConfig) {
|
|
1316
|
+
this.mergedConfig = mergedConfig;
|
|
1317
|
+
this._FieldControlGroup = FieldControlGroup;
|
|
1318
|
+
}
|
|
1319
|
+
AddFieldControlGroup() {
|
|
1320
|
+
let array = this.mergedConfig;
|
|
1321
|
+
for (const element of array) {
|
|
1322
|
+
let find = FieldControlGroup.find(control => {
|
|
1323
|
+
return control.name === element.name;
|
|
1324
|
+
});
|
|
1325
|
+
if (!find) {
|
|
1326
|
+
FieldControlGroup.push(element);
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
return FieldControlGroup;
|
|
1330
|
+
}
|
|
1331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlService, deps: [{ token: 'MERGED_FORM_CONFIG' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1332
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlService, providedIn: 'root' }); }
|
|
1333
|
+
}
|
|
1334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlService, decorators: [{
|
|
1335
|
+
type: Injectable,
|
|
1336
|
+
args: [{
|
|
1337
|
+
providedIn: 'root',
|
|
1338
|
+
}]
|
|
1339
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1340
|
+
type: Inject,
|
|
1341
|
+
args: ['MERGED_FORM_CONFIG']
|
|
1342
|
+
}] }] });
|
|
1343
|
+
|
|
1344
|
+
class DynamicViewComponent {
|
|
1345
|
+
constructor(_FormControlService) {
|
|
1346
|
+
this._FormControlService = _FormControlService;
|
|
1347
|
+
/**是否显示再列表 */
|
|
1348
|
+
this.showInList = false;
|
|
1349
|
+
/**表单控件Value */
|
|
1350
|
+
this._value = '';
|
|
1351
|
+
}
|
|
1352
|
+
set value(v) {
|
|
1353
|
+
this._value = v;
|
|
1354
|
+
// if(this._value) this.dataLoaded();
|
|
1355
|
+
}
|
|
1356
|
+
ngAfterContentInit() {
|
|
1357
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
1358
|
+
//Add 'implements AfterContentInit' to the class.
|
|
1359
|
+
if (this.type && this._value) {
|
|
1360
|
+
let _fieldControlGroup = this._FormControlService.AddFieldControlGroup();
|
|
1361
|
+
let fieldControlItem = _fieldControlGroup.find(el => el.name === this.type);
|
|
1362
|
+
this.loadViewComponent(fieldControlItem);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
/**加载动态展示组件 */
|
|
1366
|
+
loadViewComponent(FieldControlItem) {
|
|
1367
|
+
//清空了容器中的所有组件
|
|
1368
|
+
this.FormTemplateRef?.clear();
|
|
1369
|
+
if (!FieldControlItem || !FieldControlItem.fieldViewComponent)
|
|
1370
|
+
return;
|
|
1371
|
+
//在容器中创建组件
|
|
1372
|
+
const { instance } = this.FormTemplateRef?.createComponent(FieldControlItem.fieldViewComponent); //创建组件模板
|
|
1373
|
+
/**向创建的组件模板中传值 */
|
|
1374
|
+
instance.type = this.type;
|
|
1375
|
+
instance.value = this._value;
|
|
1376
|
+
instance.fields = this.fields;
|
|
1377
|
+
instance.showInList = this.showInList;
|
|
1378
|
+
}
|
|
1379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicViewComponent, deps: [{ token: FormControlService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1380
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicViewComponent, selector: "df-dynamic-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, viewQueries: [{ propertyName: "FormTemplateRef", first: true, predicate: ["FormTemplateRef"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<template #FormTemplateRef></template>", styles: [""] }); }
|
|
1381
|
+
}
|
|
1382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicViewComponent, decorators: [{
|
|
1383
|
+
type: Component,
|
|
1384
|
+
args: [{ selector: 'df-dynamic-view', template: "<template #FormTemplateRef></template>" }]
|
|
1385
|
+
}], ctorParameters: () => [{ type: FormControlService }], propDecorators: { showInList: [{
|
|
1386
|
+
type: Input
|
|
1387
|
+
}], fields: [{
|
|
1388
|
+
type: Input
|
|
1389
|
+
}], type: [{
|
|
1390
|
+
type: Input
|
|
1391
|
+
}], value: [{
|
|
1392
|
+
type: Input
|
|
1393
|
+
}], FormTemplateRef: [{
|
|
1394
|
+
type: ViewChild,
|
|
1395
|
+
args: ['FormTemplateRef', { read: ViewContainerRef, static: true }]
|
|
1396
|
+
}] } });
|
|
1397
|
+
|
|
1398
|
+
class DynamicConfigComponent {
|
|
1399
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1400
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicConfigComponent, selector: "df-dynamic-config", ngImport: i0, template: "<p>dynamic-config works!</p>\r\n", styles: [""] }); }
|
|
1401
|
+
}
|
|
1402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, decorators: [{
|
|
1403
|
+
type: Component,
|
|
1404
|
+
args: [{ selector: 'df-dynamic-config', template: "<p>dynamic-config works!</p>\r\n" }]
|
|
1405
|
+
}] });
|
|
1406
|
+
|
|
1407
|
+
class DynamicControlComponent {
|
|
1408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1409
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicControlComponent, selector: "df-dynamic-control", ngImport: i0, template: "<p>dynamic-control works!</p>\r\n", styles: [""] }); }
|
|
1410
|
+
}
|
|
1411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, decorators: [{
|
|
1412
|
+
type: Component,
|
|
1413
|
+
args: [{ selector: 'df-dynamic-control', template: "<p>dynamic-control works!</p>\r\n" }]
|
|
1414
|
+
}] });
|
|
1415
|
+
|
|
1117
1416
|
class DynamicFormModule {
|
|
1118
1417
|
static forRoot(config) {
|
|
1119
1418
|
return {
|
|
@@ -1132,7 +1431,15 @@ class DynamicFormModule {
|
|
|
1132
1431
|
DateEditControlComponent,
|
|
1133
1432
|
SelectConfigComponent,
|
|
1134
1433
|
SelectControlComponent,
|
|
1135
|
-
DynamicComponent
|
|
1434
|
+
DynamicComponent,
|
|
1435
|
+
DynamicConfigComponent,
|
|
1436
|
+
DynamicViewComponent,
|
|
1437
|
+
DynamicControlComponent,
|
|
1438
|
+
SelectViewComponent,
|
|
1439
|
+
SwitchViewComponent,
|
|
1440
|
+
TextEditViewComponent,
|
|
1441
|
+
DateEditViewComponent,
|
|
1442
|
+
NumericEditViewComponent], imports: [FormsModule,
|
|
1136
1443
|
CoreModule,
|
|
1137
1444
|
ThemeSharedModule,
|
|
1138
1445
|
ReactiveFormsModule,
|
|
@@ -1147,7 +1454,10 @@ class DynamicFormModule {
|
|
|
1147
1454
|
DateEditControlComponent,
|
|
1148
1455
|
SelectConfigComponent,
|
|
1149
1456
|
SelectControlComponent,
|
|
1150
|
-
DynamicComponent
|
|
1457
|
+
DynamicComponent,
|
|
1458
|
+
DynamicConfigComponent,
|
|
1459
|
+
DynamicViewComponent,
|
|
1460
|
+
DynamicControlComponent] }); }
|
|
1151
1461
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, imports: [FormsModule,
|
|
1152
1462
|
CoreModule,
|
|
1153
1463
|
ThemeSharedModule,
|
|
@@ -1170,6 +1480,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1170
1480
|
SelectConfigComponent,
|
|
1171
1481
|
SelectControlComponent,
|
|
1172
1482
|
DynamicComponent,
|
|
1483
|
+
DynamicConfigComponent,
|
|
1484
|
+
DynamicViewComponent,
|
|
1485
|
+
DynamicControlComponent,
|
|
1486
|
+
SelectViewComponent,
|
|
1487
|
+
SwitchViewComponent,
|
|
1488
|
+
TextEditViewComponent,
|
|
1489
|
+
DateEditViewComponent,
|
|
1490
|
+
NumericEditViewComponent,
|
|
1173
1491
|
],
|
|
1174
1492
|
imports: [
|
|
1175
1493
|
FormsModule,
|
|
@@ -1192,6 +1510,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1192
1510
|
SelectConfigComponent,
|
|
1193
1511
|
SelectControlComponent,
|
|
1194
1512
|
DynamicComponent,
|
|
1513
|
+
DynamicConfigComponent,
|
|
1514
|
+
DynamicViewComponent,
|
|
1515
|
+
DynamicControlComponent,
|
|
1195
1516
|
],
|
|
1196
1517
|
providers: [],
|
|
1197
1518
|
}]
|
|
@@ -1205,5 +1526,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1205
1526
|
* Generated bundle index. Do not edit.
|
|
1206
1527
|
*/
|
|
1207
1528
|
|
|
1208
|
-
export { AddFieldControlGroup, DateEditConfigComponent, DateEditControlComponent, DynamicComponent, DynamicFormModule, FieldControlGroup, NumbericEditConfigComponent, NumbericEditControlComponent, SelectConfigComponent, SelectControlComponent, SwitchConfigComponent, SwitchControlComponent, TextEditComponent, TextEditConfig, TextEditConfigComponent, maxDecimalPlacesValidator };
|
|
1529
|
+
export { AddFieldControlGroup, DateEditConfigComponent, DateEditControlComponent, DynamicComponent, DynamicConfigComponent, DynamicControlComponent, DynamicFormModule, DynamicViewComponent, FieldControlGroup, NumbericEditConfigComponent, NumbericEditControlComponent, SelectConfigComponent, SelectControlComponent, SwitchConfigComponent, SwitchControlComponent, TextEditComponent, TextEditConfig, TextEditConfigComponent, maxDecimalPlacesValidator };
|
|
1209
1530
|
//# sourceMappingURL=dignite-ng-expand.dynamic-form.mjs.map
|