@dignite-ng/expand.dynamic-form 0.0.24 → 0.0.26
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.component.mjs +10 -22
- package/esm2022/lib/components/form/date-edit/date-edit-config.component.mjs +4 -12
- package/esm2022/lib/components/form/date-edit/date-edit-config.mjs +7 -7
- package/esm2022/lib/components/form/date-edit/date-edit-control.component.mjs +6 -15
- package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.component.mjs +3 -11
- package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.mjs +13 -13
- package/esm2022/lib/components/form/numeric-edit/numberic-edit-control.component.mjs +6 -15
- package/esm2022/lib/components/form/select/select-config.component.mjs +3 -12
- package/esm2022/lib/components/form/select/select-config.mjs +7 -7
- package/esm2022/lib/components/form/select/select-control.component.mjs +6 -14
- package/esm2022/lib/components/form/switch/switch-config.component.mjs +3 -11
- package/esm2022/lib/components/form/switch/switch-config.mjs +3 -3
- package/esm2022/lib/components/form/switch/switch-control.component.mjs +5 -14
- package/esm2022/lib/components/form/text-edit/text-edit-config.component.mjs +4 -12
- package/esm2022/lib/components/form/text-edit/text-edit-config.mjs +7 -7
- package/esm2022/lib/components/form/text-edit/text-edit.component.mjs +7 -16
- package/esm2022/lib/dynamic-form.module.mjs +6 -6
- package/esm2022/lib/services/df-api.service.mjs +3 -3
- package/fesm2022/dignite-ng-expand.dynamic-form.mjs +85 -182
- package/fesm2022/dignite-ng-expand.dynamic-form.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -12,13 +12,13 @@ import * as i2$1 from '@angular/common';
|
|
|
12
12
|
import { pinyin } from 'pinyin-pro';
|
|
13
13
|
|
|
14
14
|
class TextEditConfig {
|
|
15
|
-
/**占位符 */
|
|
16
|
-
'TextEdit.Placeholder' = ['', []];
|
|
17
|
-
//字段类型,单行文本,多行文本
|
|
18
|
-
'TextEdit.Mode' = [0, []];
|
|
19
|
-
// 字数限制
|
|
20
|
-
'TextEdit.CharLimit' = ['265', []];
|
|
21
15
|
constructor(data) {
|
|
16
|
+
/**占位符 */
|
|
17
|
+
this['TextEdit.Placeholder'] = ['', []];
|
|
18
|
+
//字段类型,单行文本,多行文本
|
|
19
|
+
this['TextEdit.Mode'] = [0, []];
|
|
20
|
+
// 字数限制
|
|
21
|
+
this['TextEdit.CharLimit'] = ['265', []];
|
|
22
22
|
if (data) {
|
|
23
23
|
for (const key in data) {
|
|
24
24
|
if (data.hasOwnProperty(key)) {
|
|
@@ -38,25 +38,18 @@ var TextEditMode;
|
|
|
38
38
|
})(TextEditMode || (TextEditMode = {}));
|
|
39
39
|
|
|
40
40
|
class TextEditConfigComponent {
|
|
41
|
-
fb;
|
|
42
41
|
constructor(fb) {
|
|
43
42
|
this.fb = fb;
|
|
43
|
+
this._TextEditMode = TextEditMode;
|
|
44
44
|
}
|
|
45
|
-
_TextEditMode = TextEditMode;
|
|
46
|
-
/**表单控件类型 */
|
|
47
|
-
_type;
|
|
48
45
|
set type(v) {
|
|
49
46
|
this._type = v;
|
|
50
47
|
this.dataLoaded();
|
|
51
48
|
}
|
|
52
|
-
/**表单实体 */
|
|
53
|
-
_Entity;
|
|
54
49
|
set Entity(v) {
|
|
55
50
|
this._Entity = v;
|
|
56
51
|
this.dataLoaded();
|
|
57
52
|
}
|
|
58
|
-
/**选择的表单信息 */
|
|
59
|
-
_selected;
|
|
60
53
|
set selected(v) {
|
|
61
54
|
this._selected = v;
|
|
62
55
|
this.dataLoaded();
|
|
@@ -64,7 +57,6 @@ class TextEditConfigComponent {
|
|
|
64
57
|
get formConfiguration() {
|
|
65
58
|
return this._Entity.get('formConfiguration');
|
|
66
59
|
}
|
|
67
|
-
submitclick;
|
|
68
60
|
async dataLoaded() {
|
|
69
61
|
if (this._Entity && this._type) {
|
|
70
62
|
await this.AfterInit();
|
|
@@ -82,8 +74,8 @@ class TextEditConfigComponent {
|
|
|
82
74
|
resolve(true);
|
|
83
75
|
});
|
|
84
76
|
}
|
|
85
|
-
static
|
|
86
|
-
static
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
78
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TextEditConfigComponent, selector: "df-text-edit-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"TextEdit.Placeholder\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::TextEditMode' | abpLocalization}}</label>\n <div>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"_TextEditMode.SingleLine\" formControlName=\"TextEdit.Mode\"\n id=\"flexRadioDefault1\">\n <label class=\"form-check-label\" for=\"flexRadioDefault1\">\n {{'DigniteAbpForms::SingleLine' | abpLocalization}}\n </label>\n </div>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"_TextEditMode.MultipleLine\" formControlName=\"TextEdit.Mode\"\n id=\"flexRadioDefault2\">\n <label class=\"form-check-label\" for=\"flexRadioDefault2\">\n {{'DigniteAbpForms::MultipleLine' | abpLocalization}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::CharLimit' | abpLocalization}}</label>\n <input type=\"number\" class=\"form-control\" formControlName=\"TextEdit.CharLimit\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\" #submitclick></button>\n </div>\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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { 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: 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: i2.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
87
79
|
}
|
|
88
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditConfigComponent, decorators: [{
|
|
89
81
|
type: Component,
|
|
@@ -102,41 +94,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
102
94
|
/* eslint-disable @angular-eslint/no-empty-lifecycle-method */
|
|
103
95
|
/* eslint-disable @angular-eslint/use-lifecycle-interface */
|
|
104
96
|
class TextEditComponent {
|
|
105
|
-
fb;
|
|
106
97
|
constructor(fb) {
|
|
107
98
|
this.fb = fb;
|
|
99
|
+
this._TextEditMode = TextEditMode;
|
|
100
|
+
/**字段配置列表 */
|
|
101
|
+
this._fields = '';
|
|
102
|
+
this.isObjEmpty = (obj) => Object.keys(obj).length === 0;
|
|
108
103
|
}
|
|
109
|
-
_TextEditMode = TextEditMode;
|
|
110
|
-
/**表单实体 */
|
|
111
|
-
_entity;
|
|
112
104
|
set entity(v) {
|
|
113
105
|
this._entity = v;
|
|
114
106
|
if (v)
|
|
115
107
|
this.dataLoaded();
|
|
116
108
|
}
|
|
117
|
-
/**字段配置列表 */
|
|
118
|
-
_fields = '';
|
|
119
109
|
set fields(v) {
|
|
120
110
|
this._fields = v;
|
|
121
111
|
if (v)
|
|
122
112
|
this.dataLoaded();
|
|
123
113
|
}
|
|
124
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
125
|
-
_parentFiledName;
|
|
126
114
|
set parentFiledName(v) {
|
|
127
115
|
this._parentFiledName = v;
|
|
128
116
|
if (v)
|
|
129
117
|
this.dataLoaded();
|
|
130
118
|
}
|
|
131
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
132
|
-
_selected;
|
|
133
119
|
set selected(v) {
|
|
134
120
|
this._selected = v || '';
|
|
135
121
|
if (v)
|
|
136
122
|
this.dataLoaded();
|
|
137
123
|
}
|
|
138
|
-
submitclick;
|
|
139
|
-
extraProperties;
|
|
140
124
|
async dataLoaded() {
|
|
141
125
|
if (this._fields && this._entity && this._parentFiledName) {
|
|
142
126
|
this.extraProperties = this._entity.get(this._parentFiledName);
|
|
@@ -167,9 +151,8 @@ class TextEditComponent {
|
|
|
167
151
|
//Add 'implements OnDestroy' to the class.
|
|
168
152
|
this.extraProperties.removeControl(this._fields.field.name);
|
|
169
153
|
}
|
|
170
|
-
|
|
171
|
-
static
|
|
172
|
-
static ɵ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-2\">\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 <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\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"] }] });
|
|
154
|
+
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 }); }
|
|
155
|
+
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-2\">\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 <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\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"] }] }); }
|
|
173
156
|
}
|
|
174
157
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditComponent, decorators: [{
|
|
175
158
|
type: Component,
|
|
@@ -188,9 +171,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
188
171
|
}] } });
|
|
189
172
|
|
|
190
173
|
class SwitchConfig {
|
|
191
|
-
/**默认值 */
|
|
192
|
-
'Switch.Default' = [false, []];
|
|
193
174
|
constructor(data) {
|
|
175
|
+
/**默认值 */
|
|
176
|
+
this['Switch.Default'] = [false, []];
|
|
194
177
|
if (data) {
|
|
195
178
|
for (const key in data) {
|
|
196
179
|
if (data.hasOwnProperty(key)) {
|
|
@@ -202,24 +185,17 @@ class SwitchConfig {
|
|
|
202
185
|
}
|
|
203
186
|
|
|
204
187
|
class SwitchConfigComponent {
|
|
205
|
-
fb;
|
|
206
188
|
constructor(fb) {
|
|
207
189
|
this.fb = fb;
|
|
208
190
|
}
|
|
209
|
-
/**表单控件类型 */
|
|
210
|
-
_type;
|
|
211
191
|
set type(v) {
|
|
212
192
|
this._type = v;
|
|
213
193
|
this.dataLoaded();
|
|
214
194
|
}
|
|
215
|
-
/**表单实体 */
|
|
216
|
-
_Entity;
|
|
217
195
|
set Entity(v) {
|
|
218
196
|
this._Entity = v;
|
|
219
197
|
this.dataLoaded();
|
|
220
198
|
}
|
|
221
|
-
/**选择的表单信息 */
|
|
222
|
-
_selected;
|
|
223
199
|
set selected(v) {
|
|
224
200
|
this._selected = v;
|
|
225
201
|
this.dataLoaded();
|
|
@@ -227,7 +203,6 @@ class SwitchConfigComponent {
|
|
|
227
203
|
get formConfiguration() {
|
|
228
204
|
return this._Entity.get('formConfiguration');
|
|
229
205
|
}
|
|
230
|
-
submitclick;
|
|
231
206
|
async dataLoaded() {
|
|
232
207
|
if (this._Entity && this._type) {
|
|
233
208
|
await this.AfterInit();
|
|
@@ -245,8 +220,8 @@ class SwitchConfigComponent {
|
|
|
245
220
|
resolve(true);
|
|
246
221
|
});
|
|
247
222
|
}
|
|
248
|
-
static
|
|
249
|
-
static
|
|
223
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
224
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchConfigComponent, selector: "df-switch-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <div>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Switch.Default\"\n id=\"flexRadioDefault1\">\n <label class=\"form-check-label\" for=\"flexRadioDefault1\">\n {{'DigniteAbpForms::DefaultValue' | abpLocalization}}\n </label>\n </div>\n \n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\" #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: 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: i2.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
250
225
|
}
|
|
251
226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchConfigComponent, decorators: [{
|
|
252
227
|
type: Component,
|
|
@@ -263,36 +238,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
263
238
|
}] } });
|
|
264
239
|
|
|
265
240
|
class SwitchControlComponent {
|
|
266
|
-
fb;
|
|
267
241
|
constructor(fb) {
|
|
268
242
|
this.fb = fb;
|
|
243
|
+
/**字段配置列表 */
|
|
244
|
+
this._fields = '';
|
|
269
245
|
}
|
|
270
|
-
/**表单实体 */
|
|
271
|
-
_entity;
|
|
272
246
|
set entity(v) {
|
|
273
247
|
this._entity = v;
|
|
274
248
|
this.dataLoaded();
|
|
275
249
|
}
|
|
276
|
-
/**字段配置列表 */
|
|
277
|
-
_fields = '';
|
|
278
250
|
set fields(v) {
|
|
279
251
|
this._fields = v;
|
|
280
252
|
this.dataLoaded();
|
|
281
253
|
}
|
|
282
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
283
|
-
_parentFiledName;
|
|
284
254
|
set parentFiledName(v) {
|
|
285
255
|
this._parentFiledName = v;
|
|
286
256
|
this.dataLoaded();
|
|
287
257
|
}
|
|
288
|
-
/** */
|
|
289
|
-
_selected;
|
|
290
258
|
set selected(v) {
|
|
291
259
|
// ?v:false;
|
|
292
260
|
this._selected = v;
|
|
293
261
|
this.dataLoaded();
|
|
294
262
|
}
|
|
295
|
-
submitclick;
|
|
296
263
|
get extraProperties() {
|
|
297
264
|
return this._entity.get('extraProperties');
|
|
298
265
|
}
|
|
@@ -309,7 +276,6 @@ class SwitchControlComponent {
|
|
|
309
276
|
if (this._fields.required) {
|
|
310
277
|
ValidatorsArray.push(Validators.required);
|
|
311
278
|
}
|
|
312
|
-
// console.log(this._selected,'this._selected',this._fields.field.name);
|
|
313
279
|
let newControl = this.fb.control(this._selected ? this._selected : this._selected === false ? this._selected : this._fields.field.formConfiguration['Switch.Default'], ValidatorsArray);
|
|
314
280
|
this.extraProperties.setControl(this._fields.field.name, newControl);
|
|
315
281
|
resolve(true);
|
|
@@ -320,8 +286,8 @@ class SwitchControlComponent {
|
|
|
320
286
|
//Add 'implements OnDestroy' to the class.
|
|
321
287
|
this.extraProperties.removeControl(this._fields.field.name);
|
|
322
288
|
}
|
|
323
|
-
static
|
|
324
|
-
static
|
|
289
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
290
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchControlComponent, selector: "df-switch-control", 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=\"extraProperties\">\n <div class=\"mb-2\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"form-check form-switch\">\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\n </div>\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\n </div>\n\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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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"] }] }); }
|
|
325
291
|
}
|
|
326
292
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchControlComponent, decorators: [{
|
|
327
293
|
type: Component,
|
|
@@ -340,19 +306,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
340
306
|
}] } });
|
|
341
307
|
|
|
342
308
|
class NumbericEditConfig {
|
|
343
|
-
/**占位符 */
|
|
344
|
-
'NumericEditField.Placeholder' = ['', []];
|
|
345
|
-
/**最小值 */
|
|
346
|
-
'NumericEditField.Min' = ['', []];
|
|
347
|
-
//最大值
|
|
348
|
-
'NumericEditField.Max' = ['', []];
|
|
349
|
-
// 小数位数
|
|
350
|
-
'NumericEditField.Decimals' = [2, []];
|
|
351
|
-
//步长
|
|
352
|
-
'NumericEditField.Step' = ['', []];
|
|
353
|
-
//格式说明符
|
|
354
|
-
'FormatSpecifier' = ['', []];
|
|
355
309
|
constructor(data) {
|
|
310
|
+
/**占位符 */
|
|
311
|
+
this['NumericEditField.Placeholder'] = ['', []];
|
|
312
|
+
/**最小值 */
|
|
313
|
+
this['NumericEditField.Min'] = ['', []];
|
|
314
|
+
//最大值
|
|
315
|
+
this['NumericEditField.Max'] = ['', []];
|
|
316
|
+
// 小数位数
|
|
317
|
+
this['NumericEditField.Decimals'] = [2, []];
|
|
318
|
+
//步长
|
|
319
|
+
this['NumericEditField.Step'] = ['', []];
|
|
320
|
+
//格式说明符
|
|
321
|
+
this['FormatSpecifier'] = ['', []];
|
|
356
322
|
if (data) {
|
|
357
323
|
for (const key in data) {
|
|
358
324
|
if (data.hasOwnProperty(key)) {
|
|
@@ -364,24 +330,17 @@ class NumbericEditConfig {
|
|
|
364
330
|
}
|
|
365
331
|
|
|
366
332
|
class NumbericEditConfigComponent {
|
|
367
|
-
fb;
|
|
368
333
|
constructor(fb) {
|
|
369
334
|
this.fb = fb;
|
|
370
335
|
}
|
|
371
|
-
/**表单控件类型 */
|
|
372
|
-
_type;
|
|
373
336
|
set type(v) {
|
|
374
337
|
this._type = v;
|
|
375
338
|
this.dataLoaded();
|
|
376
339
|
}
|
|
377
|
-
/**表单实体 */
|
|
378
|
-
_Entity;
|
|
379
340
|
set Entity(v) {
|
|
380
341
|
this._Entity = v;
|
|
381
342
|
this.dataLoaded();
|
|
382
343
|
}
|
|
383
|
-
/**选择的表单信息 */
|
|
384
|
-
_selected;
|
|
385
344
|
set selected(v) {
|
|
386
345
|
this._selected = v ? v : v == false ? v : '';
|
|
387
346
|
this.dataLoaded();
|
|
@@ -389,7 +348,6 @@ class NumbericEditConfigComponent {
|
|
|
389
348
|
get formConfiguration() {
|
|
390
349
|
return this._Entity.get('formConfiguration');
|
|
391
350
|
}
|
|
392
|
-
submitclick;
|
|
393
351
|
async dataLoaded() {
|
|
394
352
|
if (this._Entity && this._type) {
|
|
395
353
|
await this.AfterInit();
|
|
@@ -407,8 +365,8 @@ class NumbericEditConfigComponent {
|
|
|
407
365
|
resolve(true);
|
|
408
366
|
});
|
|
409
367
|
}
|
|
410
|
-
static
|
|
411
|
-
static
|
|
368
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
369
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumbericEditConfigComponent, selector: "df-numberic-edit-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Placeholder\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::Min' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Min\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::Max' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Max\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericDecimals' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Decimals\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericStep' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Step\">\n <div class=\"form-text\">{{'DigniteAbpForms::NumericStepHelp'}}</div>\n </div>\n \n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::FormatSpecifier' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FormatSpecifier\">\n <div class=\"form-text\">See:<a href=\"https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings\" target=\"_blank\">https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings</a></div>\n </div>\n \n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\" #submitclick></button>\n </div>\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: 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: i2.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
412
370
|
}
|
|
413
371
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditConfigComponent, decorators: [{
|
|
414
372
|
type: Component,
|
|
@@ -437,14 +395,12 @@ function maxDecimalPlacesValidator(maxDecimalPlaces) {
|
|
|
437
395
|
};
|
|
438
396
|
}
|
|
439
397
|
class NumbericEditControlComponent {
|
|
440
|
-
fb;
|
|
441
|
-
cdr;
|
|
442
398
|
constructor(fb, cdr) {
|
|
443
399
|
this.fb = fb;
|
|
444
400
|
this.cdr = cdr;
|
|
401
|
+
/**字段配置列表 */
|
|
402
|
+
this._fields = '';
|
|
445
403
|
}
|
|
446
|
-
/**表单实体 */
|
|
447
|
-
_entity;
|
|
448
404
|
set entity(v) {
|
|
449
405
|
this._entity = v;
|
|
450
406
|
this.dataLoaded();
|
|
@@ -452,25 +408,18 @@ class NumbericEditControlComponent {
|
|
|
452
408
|
get entity() {
|
|
453
409
|
return this._entity;
|
|
454
410
|
}
|
|
455
|
-
/**字段配置列表 */
|
|
456
|
-
_fields = '';
|
|
457
411
|
set fields(v) {
|
|
458
412
|
this._fields = v;
|
|
459
413
|
this.dataLoaded();
|
|
460
414
|
}
|
|
461
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
462
|
-
_parentFiledName;
|
|
463
415
|
set parentFiledName(v) {
|
|
464
416
|
this._parentFiledName = v;
|
|
465
417
|
this.dataLoaded();
|
|
466
418
|
}
|
|
467
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
468
|
-
_selected;
|
|
469
419
|
set selected(v) {
|
|
470
420
|
this._selected = v;
|
|
471
421
|
this.dataLoaded();
|
|
472
422
|
}
|
|
473
|
-
submitclick;
|
|
474
423
|
get extraProperties() {
|
|
475
424
|
return this._entity.get('extraProperties');
|
|
476
425
|
}
|
|
@@ -513,11 +462,11 @@ class NumbericEditControlComponent {
|
|
|
513
462
|
let formConfiguration = this._fields.field.formConfiguration;
|
|
514
463
|
let Decimals = formConfiguration['NumericEditField.Decimals'];
|
|
515
464
|
if (decimalPart.length > Decimals) {
|
|
516
|
-
this.fieldInput.patchValue(
|
|
465
|
+
this.fieldInput.patchValue(val.slice(0, val.length - (decimalPart.length - 2)).toString());
|
|
517
466
|
}
|
|
518
467
|
}
|
|
519
|
-
static
|
|
520
|
-
static
|
|
468
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditControlComponent, deps: [{ token: i1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
469
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumbericEditControlComponent, selector: "df-numberic-edit-control", 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-2\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <input type=\"number\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\n [placeholder]=\"_fields.field.formConfiguration['NumericEditField.Placeholder']||''\"\n [min]=\"_fields.field.formConfiguration['NumericEditField.Min']\"\n [max]=\"_fields.field.formConfiguration['NumericEditField.Max']\"\n [step]=\"_fields.field.formConfiguration['NumericEditField.Step']\" (input)=\"inputchange($event)\" />\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\n </div>\n\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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
521
470
|
}
|
|
522
471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditControlComponent, decorators: [{
|
|
523
472
|
type: Component,
|
|
@@ -552,13 +501,13 @@ var DateEditInterfaces;
|
|
|
552
501
|
})(DateEditInterfaces || (DateEditInterfaces = {}));
|
|
553
502
|
|
|
554
503
|
class DateEditConfig {
|
|
555
|
-
/**日期格式 */
|
|
556
|
-
'DateEdit.InputMode' = [DateEditInterfaces.Date, []];
|
|
557
|
-
/**最小值 */
|
|
558
|
-
'DateEdit.Min' = ['', []];
|
|
559
|
-
/**最大值 */
|
|
560
|
-
'DateEdit.Max' = ['', []];
|
|
561
504
|
constructor(data) {
|
|
505
|
+
/**日期格式 */
|
|
506
|
+
this['DateEdit.InputMode'] = [DateEditInterfaces.Date, []];
|
|
507
|
+
/**最小值 */
|
|
508
|
+
this['DateEdit.Min'] = ['', []];
|
|
509
|
+
/**最大值 */
|
|
510
|
+
this['DateEdit.Max'] = ['', []];
|
|
562
511
|
if (data) {
|
|
563
512
|
for (const key in data) {
|
|
564
513
|
if (data.hasOwnProperty(key)) {
|
|
@@ -570,25 +519,18 @@ class DateEditConfig {
|
|
|
570
519
|
}
|
|
571
520
|
|
|
572
521
|
class DateEditConfigComponent {
|
|
573
|
-
fb;
|
|
574
522
|
constructor(fb) {
|
|
575
523
|
this.fb = fb;
|
|
524
|
+
this._DateEditInterfaces = DateEditInterfaces;
|
|
576
525
|
}
|
|
577
|
-
_DateEditInterfaces = DateEditInterfaces;
|
|
578
|
-
/**表单控件类型 */
|
|
579
|
-
_type;
|
|
580
526
|
set type(v) {
|
|
581
527
|
this._type = v;
|
|
582
528
|
this.dataLoaded();
|
|
583
529
|
}
|
|
584
|
-
/**表单实体 */
|
|
585
|
-
_Entity;
|
|
586
530
|
set Entity(v) {
|
|
587
531
|
this._Entity = v;
|
|
588
532
|
this.dataLoaded();
|
|
589
533
|
}
|
|
590
|
-
/**选择的表单信息 */
|
|
591
|
-
_selected;
|
|
592
534
|
set selected(v) {
|
|
593
535
|
this._selected = v;
|
|
594
536
|
this.dataLoaded();
|
|
@@ -596,7 +538,6 @@ class DateEditConfigComponent {
|
|
|
596
538
|
get formConfiguration() {
|
|
597
539
|
return this._Entity.get('formConfiguration');
|
|
598
540
|
}
|
|
599
|
-
submitclick;
|
|
600
541
|
async dataLoaded() {
|
|
601
542
|
if (this._Entity && this._type) {
|
|
602
543
|
await this.AfterInit();
|
|
@@ -614,8 +555,8 @@ class DateEditConfigComponent {
|
|
|
614
555
|
resolve(true);
|
|
615
556
|
});
|
|
616
557
|
}
|
|
617
|
-
static
|
|
618
|
-
static
|
|
558
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
559
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DateEditConfigComponent, selector: "df-date-edit-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::DateEditMode' | abpLocalization}}</label>\n <div>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"_DateEditInterfaces.Date\"\n formControlName=\"DateEdit.InputMode\" id=\"flexRadioDefault1\">\n <label class=\"form-check-label\" for=\"flexRadioDefault1\">\n {{'DigniteAbpForms::Date' | abpLocalization}}\n </label>\n </div>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"_DateEditInterfaces.DateTime\"\n formControlName=\"DateEdit.InputMode\" id=\"flexRadioDefault2\">\n <label class=\"form-check-label\" for=\"flexRadioDefault2\">\n {{'DigniteAbpForms::DateTime' | abpLocalization}}\n </label>\n </div>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"_DateEditInterfaces.Month\"\n formControlName=\"DateEdit.InputMode\" id=\"flexRadioDefault3\">\n <label class=\"form-check-label\" for=\"flexRadioDefault3\">\n {{'DigniteAbpForms::Month' | abpLocalization}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::Min' | abpLocalization}}</label>\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"DateEdit.Min\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::Max' | abpLocalization}}</label>\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"DateEdit.Max\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\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.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { 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: 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: i2.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
619
560
|
}
|
|
620
561
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditConfigComponent, decorators: [{
|
|
621
562
|
type: Component,
|
|
@@ -632,15 +573,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
632
573
|
}] } });
|
|
633
574
|
|
|
634
575
|
class DateEditControlComponent {
|
|
635
|
-
fb;
|
|
636
|
-
cdr;
|
|
637
576
|
constructor(fb, cdr) {
|
|
638
577
|
this.fb = fb;
|
|
639
578
|
this.cdr = cdr;
|
|
579
|
+
this._DateEditInterfaces = DateEditInterfaces;
|
|
580
|
+
/**字段配置列表 */
|
|
581
|
+
this._fields = '';
|
|
640
582
|
}
|
|
641
|
-
_DateEditInterfaces = DateEditInterfaces;
|
|
642
|
-
/**表单实体 */
|
|
643
|
-
_entity;
|
|
644
583
|
set entity(v) {
|
|
645
584
|
this._entity = v;
|
|
646
585
|
this.dataLoaded();
|
|
@@ -648,25 +587,18 @@ class DateEditControlComponent {
|
|
|
648
587
|
get entity() {
|
|
649
588
|
return this._entity;
|
|
650
589
|
}
|
|
651
|
-
/**字段配置列表 */
|
|
652
|
-
_fields = '';
|
|
653
590
|
set fields(v) {
|
|
654
591
|
this._fields = v;
|
|
655
592
|
this.dataLoaded();
|
|
656
593
|
}
|
|
657
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
658
|
-
_parentFiledName;
|
|
659
594
|
set parentFiledName(v) {
|
|
660
595
|
this._parentFiledName = v;
|
|
661
596
|
this.dataLoaded();
|
|
662
597
|
}
|
|
663
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
664
|
-
_selected;
|
|
665
598
|
set selected(v) {
|
|
666
599
|
this._selected = v;
|
|
667
600
|
this.dataLoaded();
|
|
668
601
|
}
|
|
669
|
-
submitclick;
|
|
670
602
|
get extraProperties() {
|
|
671
603
|
return this._entity.get('extraProperties');
|
|
672
604
|
}
|
|
@@ -702,8 +634,8 @@ class DateEditControlComponent {
|
|
|
702
634
|
//Add 'implements OnDestroy' to the class.
|
|
703
635
|
this.extraProperties.removeControl(this._fields.field.name);
|
|
704
636
|
}
|
|
705
|
-
static
|
|
706
|
-
static
|
|
637
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditControlComponent, deps: [{ token: i1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
638
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DateEditControlComponent, selector: "df-date-edit-control", 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-2\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n\n <ng-container *ngIf=\"_fields.field.formConfiguration['DateEdit.InputMode'] === _DateEditInterfaces.Date\">\n <input type=\"date\" class=\"form-control\" step=\"1\" formControlName=\"{{_fields.field.name}}\"\n [min]=\"_fields.field.formConfiguration['DateEdit.Min']\"\n [max]=\"_fields.field.formConfiguration['DateEdit.Max']\" />\n </ng-container>\n <ng-container\n *ngIf=\"_fields.field.formConfiguration['DateEdit.InputMode'] === _DateEditInterfaces.DateTime\">\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"{{_fields.field.name}}\"\n [min]=\"_fields.field.formConfiguration['DateEdit.Min']\"\n [max]=\"_fields.field.formConfiguration['DateEdit.Max']\" />\n </ng-container>\n <ng-container *ngIf=\"_fields.field.formConfiguration['DateEdit.InputMode'] === _DateEditInterfaces.Month\">\n <input type=\"month\" class=\"form-control\" step=\"1\" formControlName=\"{{_fields.field.name}}\"\n [min]=\"_fields.field.formConfiguration['DateEdit.Min']\"\n [max]=\"_fields.field.formConfiguration['DateEdit.Max']\" />\n </ng-container>\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\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"] }] }); }
|
|
707
639
|
}
|
|
708
640
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditControlComponent, decorators: [{
|
|
709
641
|
type: Component,
|
|
@@ -722,13 +654,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
722
654
|
}] } });
|
|
723
655
|
|
|
724
656
|
class SelectConfig {
|
|
725
|
-
/**空值文本 */
|
|
726
|
-
'Select.NullText' = ['', []];
|
|
727
|
-
//多选
|
|
728
|
-
'Select.Multiple' = [false, []];
|
|
729
|
-
// 选项
|
|
730
|
-
'Select.Options' = new FormArray([]);
|
|
731
657
|
constructor(data) {
|
|
658
|
+
/**空值文本 */
|
|
659
|
+
this['Select.NullText'] = ['', []];
|
|
660
|
+
//多选
|
|
661
|
+
this['Select.Multiple'] = [false, []];
|
|
662
|
+
// 选项
|
|
663
|
+
this['Select.Options'] = new FormArray([]);
|
|
732
664
|
if (data) {
|
|
733
665
|
for (const key in data) {
|
|
734
666
|
if (data.hasOwnProperty(key)) {
|
|
@@ -808,8 +740,8 @@ class DfApiService {
|
|
|
808
740
|
}
|
|
809
741
|
return result;
|
|
810
742
|
}
|
|
811
|
-
static
|
|
812
|
-
static
|
|
743
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DfApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
744
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DfApiService, providedIn: 'root' }); }
|
|
813
745
|
}
|
|
814
746
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DfApiService, decorators: [{
|
|
815
747
|
type: Injectable,
|
|
@@ -819,26 +751,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
819
751
|
}], ctorParameters: () => [] });
|
|
820
752
|
|
|
821
753
|
class SelectConfigComponent {
|
|
822
|
-
fb;
|
|
823
|
-
_DfApiService;
|
|
824
754
|
constructor(fb, _DfApiService) {
|
|
825
755
|
this.fb = fb;
|
|
826
756
|
this._DfApiService = _DfApiService;
|
|
827
757
|
}
|
|
828
|
-
/**表单控件类型 */
|
|
829
|
-
_type;
|
|
830
758
|
set type(v) {
|
|
831
759
|
this._type = v;
|
|
832
760
|
this.dataLoaded();
|
|
833
761
|
}
|
|
834
|
-
/**表单实体 */
|
|
835
|
-
_Entity;
|
|
836
762
|
set Entity(v) {
|
|
837
763
|
this._Entity = v;
|
|
838
764
|
this.dataLoaded();
|
|
839
765
|
}
|
|
840
|
-
/**选择的表单信息 */
|
|
841
|
-
_selected;
|
|
842
766
|
set selected(v) {
|
|
843
767
|
this._selected = v;
|
|
844
768
|
this.dataLoaded();
|
|
@@ -849,7 +773,6 @@ class SelectConfigComponent {
|
|
|
849
773
|
get SelectOptions() {
|
|
850
774
|
return this.formConfiguration.controls['Select.Options'];
|
|
851
775
|
}
|
|
852
|
-
submitclick;
|
|
853
776
|
async dataLoaded() {
|
|
854
777
|
if (this._Entity && this._type) {
|
|
855
778
|
await this.AfterInit();
|
|
@@ -894,8 +817,8 @@ class SelectConfigComponent {
|
|
|
894
817
|
Value: this._DfApiService.chineseToPinyin(value)
|
|
895
818
|
});
|
|
896
819
|
}
|
|
897
|
-
static
|
|
898
|
-
static
|
|
820
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectConfigComponent, deps: [{ token: i1.FormBuilder }, { token: DfApiService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
821
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectConfigComponent, selector: "df-select-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::SelectListItem' | abpLocalization}}</label>\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">{{'DigniteAbpForms::SelectListItemText' | abpLocalization}}</th>\n <th scope=\"col\">{{'DigniteAbpForms::SelectListItemValue' | abpLocalization}}</th>\n <th scope=\"col\">{{'DigniteAbpForms::SelectListItemValue' | abpLocalization}}</th>\n <th scope=\"col\" style=\"width: 1%;\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addSelectOptions()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </th>\n </tr>\n </thead>\n <tbody formArrayName=\"Select.Options\">\n <ng-container *ngFor=\"let item of SelectOptions.controls;let i=index\">\n <tr [formGroupName]=\"i\">\n <td><input type=\"text\" class=\"form-control\" formControlName=\"Text\" (change)=\"textChange($event,i)\"></td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"Value\"></td>\n <td>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Selected\" id=\"selected\">\n </div>\n </td>\n <td scope=\"row\" style=\"width: 1%;\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"deleteSelectOptions(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </td>\n </tr> \n </ng-container>\n \n \n </tbody>\n </table>\n </div>\n\n\n\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::NullText' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Select.NullText\">\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Select.Multiple\"\n id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'DigniteAbpForms::Multiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: 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: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i2.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i2.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
899
822
|
}
|
|
900
823
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectConfigComponent, decorators: [{
|
|
901
824
|
type: Component,
|
|
@@ -912,35 +835,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
912
835
|
}] } });
|
|
913
836
|
|
|
914
837
|
class SelectControlComponent {
|
|
915
|
-
fb;
|
|
916
838
|
constructor(fb) {
|
|
917
839
|
this.fb = fb;
|
|
840
|
+
/**字段配置列表 */
|
|
841
|
+
this._fields = '';
|
|
842
|
+
this.formConfiguration = '';
|
|
918
843
|
}
|
|
919
|
-
/**表单实体 */
|
|
920
|
-
_entity;
|
|
921
844
|
set entity(v) {
|
|
922
845
|
this._entity = v;
|
|
923
846
|
this.dataLoaded();
|
|
924
847
|
}
|
|
925
|
-
/**字段配置列表 */
|
|
926
|
-
_fields = '';
|
|
927
848
|
set fields(v) {
|
|
928
849
|
this._fields = v;
|
|
929
850
|
this.dataLoaded();
|
|
930
851
|
}
|
|
931
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
932
|
-
_parentFiledName;
|
|
933
852
|
set parentFiledName(v) {
|
|
934
853
|
this._parentFiledName = v;
|
|
935
854
|
this.dataLoaded();
|
|
936
855
|
}
|
|
937
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
938
|
-
_selected;
|
|
939
856
|
set selected(v) {
|
|
940
857
|
this._selected = v;
|
|
941
858
|
this.dataLoaded();
|
|
942
859
|
}
|
|
943
|
-
submitclick;
|
|
944
860
|
get extraProperties() {
|
|
945
861
|
return this._entity.get('extraProperties');
|
|
946
862
|
}
|
|
@@ -951,7 +867,6 @@ class SelectControlComponent {
|
|
|
951
867
|
this.submitclick.nativeElement.click();
|
|
952
868
|
}
|
|
953
869
|
}
|
|
954
|
-
formConfiguration = '';
|
|
955
870
|
AfterInit() {
|
|
956
871
|
return new Promise((resolve, rejects) => {
|
|
957
872
|
let ValidatorsArray = [];
|
|
@@ -979,8 +894,8 @@ class SelectControlComponent {
|
|
|
979
894
|
//Add 'implements OnDestroy' to the class.
|
|
980
895
|
this.extraProperties.removeControl(this._fields.field.name);
|
|
981
896
|
}
|
|
982
|
-
static
|
|
983
|
-
static
|
|
897
|
+
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 }); }
|
|
898
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectControlComponent, selector: "df-select-control", 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=\"extraProperties\">\n <div class=\"mb-2\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <select class=\"form-select\" multiple formControlName=\"{{_fields.field.name}}\">\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-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\"\n formControlName=\"{{_fields.field.name}}\">\n <option>{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\" >{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\n </div>\n\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.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"] }] }); }
|
|
984
899
|
}
|
|
985
900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectControlComponent, decorators: [{
|
|
986
901
|
type: Component,
|
|
@@ -1044,56 +959,44 @@ function AddFieldControlGroup(array = []) {
|
|
|
1044
959
|
}
|
|
1045
960
|
|
|
1046
961
|
class DynamicComponent {
|
|
1047
|
-
|
|
1048
|
-
|
|
962
|
+
constructor() {
|
|
963
|
+
/**字段配置列表 */
|
|
964
|
+
this._fields = '';
|
|
965
|
+
/**表单控件组 */
|
|
966
|
+
this._fieldControlGroup = FieldControlGroup;
|
|
967
|
+
}
|
|
1049
968
|
set selected(v) {
|
|
1050
969
|
this._selected = v === undefined ? '' : v === null ? '' : v;
|
|
1051
|
-
// this._selected = (v===true?true:v===false?false:v) || '';
|
|
1052
970
|
if (v)
|
|
1053
971
|
this.dataLoaded(1);
|
|
1054
972
|
}
|
|
1055
|
-
/**表单控件类型 */
|
|
1056
|
-
_type;
|
|
1057
973
|
set type(v) {
|
|
1058
974
|
this._type = v;
|
|
975
|
+
this._selected = '';
|
|
1059
976
|
if (v)
|
|
1060
977
|
this.dataLoaded(2);
|
|
1061
978
|
}
|
|
1062
|
-
/**表单实体 */
|
|
1063
|
-
_entity;
|
|
1064
979
|
set entity(v) {
|
|
1065
980
|
if (v) {
|
|
1066
981
|
this._entity = v;
|
|
1067
982
|
this.dataLoaded(3);
|
|
1068
983
|
}
|
|
1069
984
|
}
|
|
1070
|
-
/**语言 */
|
|
1071
|
-
_culture;
|
|
1072
985
|
set culture(v) {
|
|
1073
986
|
this._culture = v;
|
|
1074
987
|
if (v)
|
|
1075
988
|
this.dataLoaded(6);
|
|
1076
989
|
}
|
|
1077
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
1078
|
-
_parentFiledName;
|
|
1079
990
|
set parentFiledName(v) {
|
|
1080
991
|
this._parentFiledName = v;
|
|
1081
992
|
if (v)
|
|
1082
993
|
this.dataLoaded(4);
|
|
1083
994
|
}
|
|
1084
|
-
/**字段配置列表 */
|
|
1085
|
-
_fields = '';
|
|
1086
995
|
set fields(v) {
|
|
1087
996
|
this._fields = v;
|
|
1088
997
|
if (v)
|
|
1089
998
|
this.dataLoaded(5);
|
|
1090
999
|
}
|
|
1091
|
-
/**表单控件模板-动态表单配置组件 */
|
|
1092
|
-
FormControlRef;
|
|
1093
|
-
/**表单控件模板-动态表单组件 */
|
|
1094
|
-
FormComponentsRef;
|
|
1095
|
-
/**表单控件组 */
|
|
1096
|
-
_fieldControlGroup = FieldControlGroup;
|
|
1097
1000
|
/**数据加载完成 */
|
|
1098
1001
|
dataLoaded(val) {
|
|
1099
1002
|
if (this._entity) {
|
|
@@ -1137,8 +1040,8 @@ class DynamicComponent {
|
|
|
1137
1040
|
instance.selected = this._selected;
|
|
1138
1041
|
instance.culture = this._culture;
|
|
1139
1042
|
}
|
|
1140
|
-
static
|
|
1141
|
-
static
|
|
1043
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1044
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicComponent, selector: "df-dynamic", inputs: { selected: "selected", type: "type", entity: "entity", culture: "culture", parentFiledName: "parentFiledName", fields: "fields" }, viewQueries: [{ propertyName: "FormControlRef", first: true, predicate: ["FormControlRef"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "FormComponentsRef", first: true, predicate: ["FormComponentsRef"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<template #FormControlRef></template>\n<template #FormComponentsRef></template>", styles: [""] }); }
|
|
1142
1045
|
}
|
|
1143
1046
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, decorators: [{
|
|
1144
1047
|
type: Component,
|
|
@@ -1171,8 +1074,8 @@ class DynamicFormModule {
|
|
|
1171
1074
|
providers: []
|
|
1172
1075
|
};
|
|
1173
1076
|
}
|
|
1174
|
-
static
|
|
1175
|
-
static
|
|
1077
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1078
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, declarations: [TextEditConfigComponent,
|
|
1176
1079
|
TextEditComponent,
|
|
1177
1080
|
SwitchConfigComponent,
|
|
1178
1081
|
SwitchControlComponent,
|
|
@@ -1197,13 +1100,13 @@ class DynamicFormModule {
|
|
|
1197
1100
|
DateEditControlComponent,
|
|
1198
1101
|
SelectConfigComponent,
|
|
1199
1102
|
SelectControlComponent,
|
|
1200
|
-
DynamicComponent] });
|
|
1201
|
-
static
|
|
1103
|
+
DynamicComponent] }); }
|
|
1104
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, imports: [FormsModule,
|
|
1202
1105
|
CoreModule,
|
|
1203
1106
|
ThemeSharedModule,
|
|
1204
1107
|
ReactiveFormsModule,
|
|
1205
1108
|
NgbDropdownModule,
|
|
1206
|
-
NzTreeModule] });
|
|
1109
|
+
NzTreeModule] }); }
|
|
1207
1110
|
}
|
|
1208
1111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, decorators: [{
|
|
1209
1112
|
type: NgModule,
|