@dignite-ng/expand.dynamic-form 0.0.21 → 0.0.22
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 +21 -9
- package/esm2022/lib/components/form/date-edit/date-edit-config.component.mjs +12 -4
- 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 +20 -6
- package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.component.mjs +11 -3
- 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 +19 -5
- package/esm2022/lib/components/form/select/select-config.component.mjs +12 -3
- package/esm2022/lib/components/form/select/select-config.mjs +7 -7
- package/esm2022/lib/components/form/select/select-control.component.mjs +19 -6
- package/esm2022/lib/components/form/switch/switch-config.component.mjs +11 -3
- package/esm2022/lib/components/form/switch/switch-config.mjs +3 -3
- package/esm2022/lib/components/form/switch/switch-control.component.mjs +18 -5
- package/esm2022/lib/components/form/text-edit/text-edit-config.component.mjs +12 -4
- package/esm2022/lib/components/form/text-edit/text-edit-config.mjs +7 -7
- package/esm2022/lib/components/form/text-edit/text-edit.component.mjs +23 -7
- 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 +206 -83
- package/fesm2022/dignite-ng-expand.dynamic-form.mjs.map +1 -1
- package/lib/components/form/date-edit/date-edit-control.component.d.ts +1 -0
- package/lib/components/form/numeric-edit/numberic-edit-control.component.d.ts +1 -0
- package/lib/components/form/select/select-control.component.d.ts +1 -0
- package/lib/components/form/switch/switch-control.component.d.ts +1 -0
- package/lib/components/form/text-edit/text-edit.component.d.ts +1 -0
- package/package.json +1 -1
- package/esm2022/dynamic-form.mjs +0 -5
- package/fesm2022/dynamic-form.mjs +0 -1141
- package/fesm2022/dynamic-form.mjs.map +0 -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', []];
|
|
15
21
|
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,18 +38,25 @@ var TextEditMode;
|
|
|
38
38
|
})(TextEditMode || (TextEditMode = {}));
|
|
39
39
|
|
|
40
40
|
class TextEditConfigComponent {
|
|
41
|
+
fb;
|
|
41
42
|
constructor(fb) {
|
|
42
43
|
this.fb = fb;
|
|
43
|
-
this._TextEditMode = TextEditMode;
|
|
44
44
|
}
|
|
45
|
+
_TextEditMode = TextEditMode;
|
|
46
|
+
/**表单控件类型 */
|
|
47
|
+
_type;
|
|
45
48
|
set type(v) {
|
|
46
49
|
this._type = v;
|
|
47
50
|
this.dataLoaded();
|
|
48
51
|
}
|
|
52
|
+
/**表单实体 */
|
|
53
|
+
_Entity;
|
|
49
54
|
set Entity(v) {
|
|
50
55
|
this._Entity = v;
|
|
51
56
|
this.dataLoaded();
|
|
52
57
|
}
|
|
58
|
+
/**选择的表单信息 */
|
|
59
|
+
_selected;
|
|
53
60
|
set selected(v) {
|
|
54
61
|
this._selected = v;
|
|
55
62
|
this.dataLoaded();
|
|
@@ -57,6 +64,7 @@ class TextEditConfigComponent {
|
|
|
57
64
|
get formConfiguration() {
|
|
58
65
|
return this._Entity.get('formConfiguration');
|
|
59
66
|
}
|
|
67
|
+
submitclick;
|
|
60
68
|
async dataLoaded() {
|
|
61
69
|
if (this._Entity && this._type) {
|
|
62
70
|
await this.AfterInit();
|
|
@@ -74,8 +82,8 @@ class TextEditConfigComponent {
|
|
|
74
82
|
resolve(true);
|
|
75
83
|
});
|
|
76
84
|
}
|
|
77
|
-
static
|
|
78
|
-
static
|
|
85
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
86
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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" }] });
|
|
79
87
|
}
|
|
80
88
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextEditConfigComponent, decorators: [{
|
|
81
89
|
type: Component,
|
|
@@ -91,34 +99,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
91
99
|
args: ['submitclick', { static: true }]
|
|
92
100
|
}] } });
|
|
93
101
|
|
|
102
|
+
/* eslint-disable @angular-eslint/no-empty-lifecycle-method */
|
|
103
|
+
/* eslint-disable @angular-eslint/use-lifecycle-interface */
|
|
94
104
|
class TextEditComponent {
|
|
105
|
+
fb;
|
|
95
106
|
constructor(fb) {
|
|
96
107
|
this.fb = fb;
|
|
97
|
-
this._TextEditMode = TextEditMode;
|
|
98
|
-
/**字段配置列表 */
|
|
99
|
-
this._fields = '';
|
|
100
|
-
this.isObjEmpty = (obj) => Object.keys(obj).length === 0;
|
|
101
108
|
}
|
|
109
|
+
_TextEditMode = TextEditMode;
|
|
110
|
+
/**表单实体 */
|
|
111
|
+
_entity;
|
|
102
112
|
set entity(v) {
|
|
103
113
|
this._entity = v;
|
|
104
114
|
if (v)
|
|
105
115
|
this.dataLoaded();
|
|
106
116
|
}
|
|
117
|
+
/**字段配置列表 */
|
|
118
|
+
_fields = '';
|
|
107
119
|
set fields(v) {
|
|
108
120
|
this._fields = v;
|
|
109
121
|
if (v)
|
|
110
122
|
this.dataLoaded();
|
|
111
123
|
}
|
|
124
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
125
|
+
_parentFiledName;
|
|
112
126
|
set parentFiledName(v) {
|
|
113
127
|
this._parentFiledName = v;
|
|
114
128
|
if (v)
|
|
115
129
|
this.dataLoaded();
|
|
116
130
|
}
|
|
131
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
132
|
+
_selected;
|
|
117
133
|
set selected(v) {
|
|
118
134
|
this._selected = v || '';
|
|
119
135
|
if (v)
|
|
120
136
|
this.dataLoaded();
|
|
121
137
|
}
|
|
138
|
+
submitclick;
|
|
139
|
+
extraProperties;
|
|
122
140
|
async dataLoaded() {
|
|
123
141
|
if (this._fields && this._entity && this._parentFiledName) {
|
|
124
142
|
this.extraProperties = this._entity.get(this._parentFiledName);
|
|
@@ -144,8 +162,14 @@ class TextEditComponent {
|
|
|
144
162
|
resolve(true);
|
|
145
163
|
});
|
|
146
164
|
}
|
|
147
|
-
|
|
148
|
-
|
|
165
|
+
ngOnDestroy() {
|
|
166
|
+
//Called once, before the instance is destroyed.
|
|
167
|
+
//Add 'implements OnDestroy' to the class.
|
|
168
|
+
this.extraProperties.removeControl(this._fields.field.name);
|
|
169
|
+
}
|
|
170
|
+
isObjEmpty = (obj) => Object.keys(obj).length === 0;
|
|
171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextEditComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
172
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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"] }] });
|
|
149
173
|
}
|
|
150
174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextEditComponent, decorators: [{
|
|
151
175
|
type: Component,
|
|
@@ -164,9 +188,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
164
188
|
}] } });
|
|
165
189
|
|
|
166
190
|
class SwitchConfig {
|
|
191
|
+
/**默认值 */
|
|
192
|
+
'Switch.Default' = [false, []];
|
|
167
193
|
constructor(data) {
|
|
168
|
-
/**默认值 */
|
|
169
|
-
this['Switch.Default'] = [false, []];
|
|
170
194
|
if (data) {
|
|
171
195
|
for (const key in data) {
|
|
172
196
|
if (data.hasOwnProperty(key)) {
|
|
@@ -178,17 +202,24 @@ class SwitchConfig {
|
|
|
178
202
|
}
|
|
179
203
|
|
|
180
204
|
class SwitchConfigComponent {
|
|
205
|
+
fb;
|
|
181
206
|
constructor(fb) {
|
|
182
207
|
this.fb = fb;
|
|
183
208
|
}
|
|
209
|
+
/**表单控件类型 */
|
|
210
|
+
_type;
|
|
184
211
|
set type(v) {
|
|
185
212
|
this._type = v;
|
|
186
213
|
this.dataLoaded();
|
|
187
214
|
}
|
|
215
|
+
/**表单实体 */
|
|
216
|
+
_Entity;
|
|
188
217
|
set Entity(v) {
|
|
189
218
|
this._Entity = v;
|
|
190
219
|
this.dataLoaded();
|
|
191
220
|
}
|
|
221
|
+
/**选择的表单信息 */
|
|
222
|
+
_selected;
|
|
192
223
|
set selected(v) {
|
|
193
224
|
this._selected = v;
|
|
194
225
|
this.dataLoaded();
|
|
@@ -196,6 +227,7 @@ class SwitchConfigComponent {
|
|
|
196
227
|
get formConfiguration() {
|
|
197
228
|
return this._Entity.get('formConfiguration');
|
|
198
229
|
}
|
|
230
|
+
submitclick;
|
|
199
231
|
async dataLoaded() {
|
|
200
232
|
if (this._Entity && this._type) {
|
|
201
233
|
await this.AfterInit();
|
|
@@ -213,8 +245,8 @@ class SwitchConfigComponent {
|
|
|
213
245
|
resolve(true);
|
|
214
246
|
});
|
|
215
247
|
}
|
|
216
|
-
static
|
|
217
|
-
static
|
|
248
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
249
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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" }] });
|
|
218
250
|
}
|
|
219
251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchConfigComponent, decorators: [{
|
|
220
252
|
type: Component,
|
|
@@ -231,28 +263,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
231
263
|
}] } });
|
|
232
264
|
|
|
233
265
|
class SwitchControlComponent {
|
|
266
|
+
fb;
|
|
234
267
|
constructor(fb) {
|
|
235
268
|
this.fb = fb;
|
|
236
|
-
/**字段配置列表 */
|
|
237
|
-
this._fields = '';
|
|
238
269
|
}
|
|
270
|
+
/**表单实体 */
|
|
271
|
+
_entity;
|
|
239
272
|
set entity(v) {
|
|
240
273
|
this._entity = v;
|
|
241
274
|
this.dataLoaded();
|
|
242
275
|
}
|
|
276
|
+
/**字段配置列表 */
|
|
277
|
+
_fields = '';
|
|
243
278
|
set fields(v) {
|
|
244
279
|
this._fields = v;
|
|
245
280
|
this.dataLoaded();
|
|
246
281
|
}
|
|
282
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
283
|
+
_parentFiledName;
|
|
247
284
|
set parentFiledName(v) {
|
|
248
285
|
this._parentFiledName = v;
|
|
249
286
|
this.dataLoaded();
|
|
250
287
|
}
|
|
288
|
+
/** */
|
|
289
|
+
_selected;
|
|
251
290
|
set selected(v) {
|
|
252
291
|
// ?v:false;
|
|
253
292
|
this._selected = v;
|
|
254
293
|
this.dataLoaded();
|
|
255
294
|
}
|
|
295
|
+
submitclick;
|
|
256
296
|
get extraProperties() {
|
|
257
297
|
return this._entity.get('extraProperties');
|
|
258
298
|
}
|
|
@@ -275,8 +315,13 @@ class SwitchControlComponent {
|
|
|
275
315
|
resolve(true);
|
|
276
316
|
});
|
|
277
317
|
}
|
|
278
|
-
|
|
279
|
-
|
|
318
|
+
ngOnDestroy() {
|
|
319
|
+
//Called once, before the instance is destroyed.
|
|
320
|
+
//Add 'implements OnDestroy' to the class.
|
|
321
|
+
this.extraProperties.removeControl(this._fields.field.name);
|
|
322
|
+
}
|
|
323
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
324
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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"] }] });
|
|
280
325
|
}
|
|
281
326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchControlComponent, decorators: [{
|
|
282
327
|
type: Component,
|
|
@@ -295,19 +340,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
295
340
|
}] } });
|
|
296
341
|
|
|
297
342
|
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' = ['', []];
|
|
298
355
|
constructor(data) {
|
|
299
|
-
/**占位符 */
|
|
300
|
-
this['NumericEditField.Placeholder'] = ['', []];
|
|
301
|
-
/**最小值 */
|
|
302
|
-
this['NumericEditField.Min'] = ['', []];
|
|
303
|
-
//最大值
|
|
304
|
-
this['NumericEditField.Max'] = ['', []];
|
|
305
|
-
// 小数位数
|
|
306
|
-
this['NumericEditField.Decimals'] = [2, []];
|
|
307
|
-
//步长
|
|
308
|
-
this['NumericEditField.Step'] = ['', []];
|
|
309
|
-
//格式说明符
|
|
310
|
-
this['FormatSpecifier'] = ['', []];
|
|
311
356
|
if (data) {
|
|
312
357
|
for (const key in data) {
|
|
313
358
|
if (data.hasOwnProperty(key)) {
|
|
@@ -319,17 +364,24 @@ class NumbericEditConfig {
|
|
|
319
364
|
}
|
|
320
365
|
|
|
321
366
|
class NumbericEditConfigComponent {
|
|
367
|
+
fb;
|
|
322
368
|
constructor(fb) {
|
|
323
369
|
this.fb = fb;
|
|
324
370
|
}
|
|
371
|
+
/**表单控件类型 */
|
|
372
|
+
_type;
|
|
325
373
|
set type(v) {
|
|
326
374
|
this._type = v;
|
|
327
375
|
this.dataLoaded();
|
|
328
376
|
}
|
|
377
|
+
/**表单实体 */
|
|
378
|
+
_Entity;
|
|
329
379
|
set Entity(v) {
|
|
330
380
|
this._Entity = v;
|
|
331
381
|
this.dataLoaded();
|
|
332
382
|
}
|
|
383
|
+
/**选择的表单信息 */
|
|
384
|
+
_selected;
|
|
333
385
|
set selected(v) {
|
|
334
386
|
this._selected = v ? v : v == false ? v : '';
|
|
335
387
|
this.dataLoaded();
|
|
@@ -337,6 +389,7 @@ class NumbericEditConfigComponent {
|
|
|
337
389
|
get formConfiguration() {
|
|
338
390
|
return this._Entity.get('formConfiguration');
|
|
339
391
|
}
|
|
392
|
+
submitclick;
|
|
340
393
|
async dataLoaded() {
|
|
341
394
|
if (this._Entity && this._type) {
|
|
342
395
|
await this.AfterInit();
|
|
@@ -354,8 +407,8 @@ class NumbericEditConfigComponent {
|
|
|
354
407
|
resolve(true);
|
|
355
408
|
});
|
|
356
409
|
}
|
|
357
|
-
static
|
|
358
|
-
static
|
|
410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumbericEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
411
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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" }] });
|
|
359
412
|
}
|
|
360
413
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumbericEditConfigComponent, decorators: [{
|
|
361
414
|
type: Component,
|
|
@@ -384,12 +437,14 @@ function maxDecimalPlacesValidator(maxDecimalPlaces) {
|
|
|
384
437
|
};
|
|
385
438
|
}
|
|
386
439
|
class NumbericEditControlComponent {
|
|
440
|
+
fb;
|
|
441
|
+
cdr;
|
|
387
442
|
constructor(fb, cdr) {
|
|
388
443
|
this.fb = fb;
|
|
389
444
|
this.cdr = cdr;
|
|
390
|
-
/**字段配置列表 */
|
|
391
|
-
this._fields = '';
|
|
392
445
|
}
|
|
446
|
+
/**表单实体 */
|
|
447
|
+
_entity;
|
|
393
448
|
set entity(v) {
|
|
394
449
|
this._entity = v;
|
|
395
450
|
this.dataLoaded();
|
|
@@ -397,18 +452,25 @@ class NumbericEditControlComponent {
|
|
|
397
452
|
get entity() {
|
|
398
453
|
return this._entity;
|
|
399
454
|
}
|
|
455
|
+
/**字段配置列表 */
|
|
456
|
+
_fields = '';
|
|
400
457
|
set fields(v) {
|
|
401
458
|
this._fields = v;
|
|
402
459
|
this.dataLoaded();
|
|
403
460
|
}
|
|
461
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
462
|
+
_parentFiledName;
|
|
404
463
|
set parentFiledName(v) {
|
|
405
464
|
this._parentFiledName = v;
|
|
406
465
|
this.dataLoaded();
|
|
407
466
|
}
|
|
467
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
468
|
+
_selected;
|
|
408
469
|
set selected(v) {
|
|
409
470
|
this._selected = v;
|
|
410
471
|
this.dataLoaded();
|
|
411
472
|
}
|
|
473
|
+
submitclick;
|
|
412
474
|
get extraProperties() {
|
|
413
475
|
return this._entity.get('extraProperties');
|
|
414
476
|
}
|
|
@@ -439,6 +501,11 @@ class NumbericEditControlComponent {
|
|
|
439
501
|
resolve(true);
|
|
440
502
|
});
|
|
441
503
|
}
|
|
504
|
+
ngOnDestroy() {
|
|
505
|
+
//Called once, before the instance is destroyed.
|
|
506
|
+
//Add 'implements OnDestroy' to the class.
|
|
507
|
+
this.extraProperties.removeControl(this._fields.field.name);
|
|
508
|
+
}
|
|
442
509
|
/**数字框输入 */
|
|
443
510
|
inputchange(event) {
|
|
444
511
|
let val = event.target.value;
|
|
@@ -449,8 +516,8 @@ class NumbericEditControlComponent {
|
|
|
449
516
|
this.fieldInput.patchValue(val.slice(0, val.length - (decimalPart.length - 2)));
|
|
450
517
|
}
|
|
451
518
|
}
|
|
452
|
-
static
|
|
453
|
-
static
|
|
519
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumbericEditControlComponent, deps: [{ token: i1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
520
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 });
|
|
454
521
|
}
|
|
455
522
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumbericEditControlComponent, decorators: [{
|
|
456
523
|
type: Component,
|
|
@@ -485,13 +552,13 @@ var DateEditInterfaces;
|
|
|
485
552
|
})(DateEditInterfaces || (DateEditInterfaces = {}));
|
|
486
553
|
|
|
487
554
|
class DateEditConfig {
|
|
555
|
+
/**日期格式 */
|
|
556
|
+
'DateEdit.InputMode' = [DateEditInterfaces.Date, []];
|
|
557
|
+
/**最小值 */
|
|
558
|
+
'DateEdit.Min' = ['', []];
|
|
559
|
+
/**最大值 */
|
|
560
|
+
'DateEdit.Max' = ['', []];
|
|
488
561
|
constructor(data) {
|
|
489
|
-
/**日期格式 */
|
|
490
|
-
this['DateEdit.InputMode'] = [DateEditInterfaces.Date, []];
|
|
491
|
-
/**最小值 */
|
|
492
|
-
this['DateEdit.Min'] = ['', []];
|
|
493
|
-
/**最大值 */
|
|
494
|
-
this['DateEdit.Max'] = ['', []];
|
|
495
562
|
if (data) {
|
|
496
563
|
for (const key in data) {
|
|
497
564
|
if (data.hasOwnProperty(key)) {
|
|
@@ -503,18 +570,25 @@ class DateEditConfig {
|
|
|
503
570
|
}
|
|
504
571
|
|
|
505
572
|
class DateEditConfigComponent {
|
|
573
|
+
fb;
|
|
506
574
|
constructor(fb) {
|
|
507
575
|
this.fb = fb;
|
|
508
|
-
this._DateEditInterfaces = DateEditInterfaces;
|
|
509
576
|
}
|
|
577
|
+
_DateEditInterfaces = DateEditInterfaces;
|
|
578
|
+
/**表单控件类型 */
|
|
579
|
+
_type;
|
|
510
580
|
set type(v) {
|
|
511
581
|
this._type = v;
|
|
512
582
|
this.dataLoaded();
|
|
513
583
|
}
|
|
584
|
+
/**表单实体 */
|
|
585
|
+
_Entity;
|
|
514
586
|
set Entity(v) {
|
|
515
587
|
this._Entity = v;
|
|
516
588
|
this.dataLoaded();
|
|
517
589
|
}
|
|
590
|
+
/**选择的表单信息 */
|
|
591
|
+
_selected;
|
|
518
592
|
set selected(v) {
|
|
519
593
|
this._selected = v;
|
|
520
594
|
this.dataLoaded();
|
|
@@ -522,6 +596,7 @@ class DateEditConfigComponent {
|
|
|
522
596
|
get formConfiguration() {
|
|
523
597
|
return this._Entity.get('formConfiguration');
|
|
524
598
|
}
|
|
599
|
+
submitclick;
|
|
525
600
|
async dataLoaded() {
|
|
526
601
|
if (this._Entity && this._type) {
|
|
527
602
|
await this.AfterInit();
|
|
@@ -539,8 +614,8 @@ class DateEditConfigComponent {
|
|
|
539
614
|
resolve(true);
|
|
540
615
|
});
|
|
541
616
|
}
|
|
542
|
-
static
|
|
543
|
-
static
|
|
617
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
618
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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" }] });
|
|
544
619
|
}
|
|
545
620
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateEditConfigComponent, decorators: [{
|
|
546
621
|
type: Component,
|
|
@@ -557,13 +632,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
557
632
|
}] } });
|
|
558
633
|
|
|
559
634
|
class DateEditControlComponent {
|
|
635
|
+
fb;
|
|
636
|
+
cdr;
|
|
560
637
|
constructor(fb, cdr) {
|
|
561
638
|
this.fb = fb;
|
|
562
639
|
this.cdr = cdr;
|
|
563
|
-
this._DateEditInterfaces = DateEditInterfaces;
|
|
564
|
-
/**字段配置列表 */
|
|
565
|
-
this._fields = '';
|
|
566
640
|
}
|
|
641
|
+
_DateEditInterfaces = DateEditInterfaces;
|
|
642
|
+
/**表单实体 */
|
|
643
|
+
_entity;
|
|
567
644
|
set entity(v) {
|
|
568
645
|
this._entity = v;
|
|
569
646
|
this.dataLoaded();
|
|
@@ -571,18 +648,25 @@ class DateEditControlComponent {
|
|
|
571
648
|
get entity() {
|
|
572
649
|
return this._entity;
|
|
573
650
|
}
|
|
651
|
+
/**字段配置列表 */
|
|
652
|
+
_fields = '';
|
|
574
653
|
set fields(v) {
|
|
575
654
|
this._fields = v;
|
|
576
655
|
this.dataLoaded();
|
|
577
656
|
}
|
|
657
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
658
|
+
_parentFiledName;
|
|
578
659
|
set parentFiledName(v) {
|
|
579
660
|
this._parentFiledName = v;
|
|
580
661
|
this.dataLoaded();
|
|
581
662
|
}
|
|
663
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
664
|
+
_selected;
|
|
582
665
|
set selected(v) {
|
|
583
666
|
this._selected = v;
|
|
584
667
|
this.dataLoaded();
|
|
585
668
|
}
|
|
669
|
+
submitclick;
|
|
586
670
|
get extraProperties() {
|
|
587
671
|
return this._entity.get('extraProperties');
|
|
588
672
|
}
|
|
@@ -613,8 +697,13 @@ class DateEditControlComponent {
|
|
|
613
697
|
resolve(true);
|
|
614
698
|
});
|
|
615
699
|
}
|
|
616
|
-
|
|
617
|
-
|
|
700
|
+
ngOnDestroy() {
|
|
701
|
+
//Called once, before the instance is destroyed.
|
|
702
|
+
//Add 'implements OnDestroy' to the class.
|
|
703
|
+
this.extraProperties.removeControl(this._fields.field.name);
|
|
704
|
+
}
|
|
705
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateEditControlComponent, deps: [{ token: i1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
706
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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"] }] });
|
|
618
707
|
}
|
|
619
708
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateEditControlComponent, decorators: [{
|
|
620
709
|
type: Component,
|
|
@@ -633,13 +722,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
633
722
|
}] } });
|
|
634
723
|
|
|
635
724
|
class SelectConfig {
|
|
725
|
+
/**空值文本 */
|
|
726
|
+
'Select.NullText' = ['', []];
|
|
727
|
+
//多选
|
|
728
|
+
'Select.Multiple' = [false, []];
|
|
729
|
+
// 选项
|
|
730
|
+
'Select.Options' = new FormArray([]);
|
|
636
731
|
constructor(data) {
|
|
637
|
-
/**空值文本 */
|
|
638
|
-
this['Select.NullText'] = ['', []];
|
|
639
|
-
//多选
|
|
640
|
-
this['Select.Multiple'] = [false, []];
|
|
641
|
-
// 选项
|
|
642
|
-
this['Select.Options'] = new FormArray([]);
|
|
643
732
|
if (data) {
|
|
644
733
|
for (const key in data) {
|
|
645
734
|
if (data.hasOwnProperty(key)) {
|
|
@@ -719,8 +808,8 @@ class DfApiService {
|
|
|
719
808
|
}
|
|
720
809
|
return result;
|
|
721
810
|
}
|
|
722
|
-
static
|
|
723
|
-
static
|
|
811
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DfApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
812
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DfApiService, providedIn: 'root' });
|
|
724
813
|
}
|
|
725
814
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DfApiService, decorators: [{
|
|
726
815
|
type: Injectable,
|
|
@@ -730,18 +819,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
730
819
|
}], ctorParameters: function () { return []; } });
|
|
731
820
|
|
|
732
821
|
class SelectConfigComponent {
|
|
822
|
+
fb;
|
|
823
|
+
_DfApiService;
|
|
733
824
|
constructor(fb, _DfApiService) {
|
|
734
825
|
this.fb = fb;
|
|
735
826
|
this._DfApiService = _DfApiService;
|
|
736
827
|
}
|
|
828
|
+
/**表单控件类型 */
|
|
829
|
+
_type;
|
|
737
830
|
set type(v) {
|
|
738
831
|
this._type = v;
|
|
739
832
|
this.dataLoaded();
|
|
740
833
|
}
|
|
834
|
+
/**表单实体 */
|
|
835
|
+
_Entity;
|
|
741
836
|
set Entity(v) {
|
|
742
837
|
this._Entity = v;
|
|
743
838
|
this.dataLoaded();
|
|
744
839
|
}
|
|
840
|
+
/**选择的表单信息 */
|
|
841
|
+
_selected;
|
|
745
842
|
set selected(v) {
|
|
746
843
|
this._selected = v;
|
|
747
844
|
this.dataLoaded();
|
|
@@ -752,6 +849,7 @@ class SelectConfigComponent {
|
|
|
752
849
|
get SelectOptions() {
|
|
753
850
|
return this.formConfiguration.controls['Select.Options'];
|
|
754
851
|
}
|
|
852
|
+
submitclick;
|
|
755
853
|
async dataLoaded() {
|
|
756
854
|
if (this._Entity && this._type) {
|
|
757
855
|
await this.AfterInit();
|
|
@@ -796,8 +894,8 @@ class SelectConfigComponent {
|
|
|
796
894
|
Value: this._DfApiService.chineseToPinyin(value)
|
|
797
895
|
});
|
|
798
896
|
}
|
|
799
|
-
static
|
|
800
|
-
static
|
|
897
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectConfigComponent, deps: [{ token: i1.FormBuilder }, { token: DfApiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
898
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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" }] });
|
|
801
899
|
}
|
|
802
900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectConfigComponent, decorators: [{
|
|
803
901
|
type: Component,
|
|
@@ -814,28 +912,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
814
912
|
}] } });
|
|
815
913
|
|
|
816
914
|
class SelectControlComponent {
|
|
915
|
+
fb;
|
|
817
916
|
constructor(fb) {
|
|
818
917
|
this.fb = fb;
|
|
819
|
-
/**字段配置列表 */
|
|
820
|
-
this._fields = '';
|
|
821
|
-
this.formConfiguration = '';
|
|
822
918
|
}
|
|
919
|
+
/**表单实体 */
|
|
920
|
+
_entity;
|
|
823
921
|
set entity(v) {
|
|
824
922
|
this._entity = v;
|
|
825
923
|
this.dataLoaded();
|
|
826
924
|
}
|
|
925
|
+
/**字段配置列表 */
|
|
926
|
+
_fields = '';
|
|
827
927
|
set fields(v) {
|
|
828
928
|
this._fields = v;
|
|
829
929
|
this.dataLoaded();
|
|
830
930
|
}
|
|
931
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
932
|
+
_parentFiledName;
|
|
831
933
|
set parentFiledName(v) {
|
|
832
934
|
this._parentFiledName = v;
|
|
833
935
|
this.dataLoaded();
|
|
834
936
|
}
|
|
937
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
938
|
+
_selected;
|
|
835
939
|
set selected(v) {
|
|
836
940
|
this._selected = v;
|
|
837
941
|
this.dataLoaded();
|
|
838
942
|
}
|
|
943
|
+
submitclick;
|
|
839
944
|
get extraProperties() {
|
|
840
945
|
return this._entity.get('extraProperties');
|
|
841
946
|
}
|
|
@@ -846,6 +951,7 @@ class SelectControlComponent {
|
|
|
846
951
|
this.submitclick.nativeElement.click();
|
|
847
952
|
}
|
|
848
953
|
}
|
|
954
|
+
formConfiguration = '';
|
|
849
955
|
AfterInit() {
|
|
850
956
|
return new Promise((resolve, rejects) => {
|
|
851
957
|
let ValidatorsArray = [];
|
|
@@ -868,8 +974,13 @@ class SelectControlComponent {
|
|
|
868
974
|
resolve(true);
|
|
869
975
|
});
|
|
870
976
|
}
|
|
871
|
-
|
|
872
|
-
|
|
977
|
+
ngOnDestroy() {
|
|
978
|
+
//Called once, before the instance is destroyed.
|
|
979
|
+
//Add 'implements OnDestroy' to the class.
|
|
980
|
+
this.extraProperties.removeControl(this._fields.field.name);
|
|
981
|
+
}
|
|
982
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
983
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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"] }] });
|
|
873
984
|
}
|
|
874
985
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectControlComponent, decorators: [{
|
|
875
986
|
type: Component,
|
|
@@ -933,44 +1044,56 @@ function AddFieldControlGroup(array = []) {
|
|
|
933
1044
|
}
|
|
934
1045
|
|
|
935
1046
|
class DynamicComponent {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
this._fields = '';
|
|
939
|
-
/**表单控件组 */
|
|
940
|
-
this._fieldControlGroup = FieldControlGroup;
|
|
941
|
-
}
|
|
1047
|
+
/**选择的表单信息 */
|
|
1048
|
+
_selected;
|
|
942
1049
|
set selected(v) {
|
|
943
1050
|
this._selected = v === undefined ? '' : v === null ? '' : v;
|
|
944
1051
|
// this._selected = (v===true?true:v===false?false:v) || '';
|
|
945
1052
|
if (v)
|
|
946
1053
|
this.dataLoaded(1);
|
|
947
1054
|
}
|
|
1055
|
+
/**表单控件类型 */
|
|
1056
|
+
_type;
|
|
948
1057
|
set type(v) {
|
|
949
1058
|
this._type = v;
|
|
950
1059
|
if (v)
|
|
951
1060
|
this.dataLoaded(2);
|
|
952
1061
|
}
|
|
1062
|
+
/**表单实体 */
|
|
1063
|
+
_entity;
|
|
953
1064
|
set entity(v) {
|
|
954
1065
|
if (v) {
|
|
955
1066
|
this._entity = v;
|
|
956
1067
|
this.dataLoaded(3);
|
|
957
1068
|
}
|
|
958
1069
|
}
|
|
1070
|
+
/**语言 */
|
|
1071
|
+
_culture;
|
|
959
1072
|
set culture(v) {
|
|
960
1073
|
this._culture = v;
|
|
961
1074
|
if (v)
|
|
962
1075
|
this.dataLoaded(6);
|
|
963
1076
|
}
|
|
1077
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
1078
|
+
_parentFiledName;
|
|
964
1079
|
set parentFiledName(v) {
|
|
965
1080
|
this._parentFiledName = v;
|
|
966
1081
|
if (v)
|
|
967
1082
|
this.dataLoaded(4);
|
|
968
1083
|
}
|
|
1084
|
+
/**字段配置列表 */
|
|
1085
|
+
_fields = '';
|
|
969
1086
|
set fields(v) {
|
|
970
1087
|
this._fields = v;
|
|
971
1088
|
if (v)
|
|
972
1089
|
this.dataLoaded(5);
|
|
973
1090
|
}
|
|
1091
|
+
/**表单控件模板-动态表单配置组件 */
|
|
1092
|
+
FormControlRef;
|
|
1093
|
+
/**表单控件模板-动态表单组件 */
|
|
1094
|
+
FormComponentsRef;
|
|
1095
|
+
/**表单控件组 */
|
|
1096
|
+
_fieldControlGroup = FieldControlGroup;
|
|
974
1097
|
/**数据加载完成 */
|
|
975
1098
|
dataLoaded(val) {
|
|
976
1099
|
if (this._entity) {
|
|
@@ -1014,8 +1137,8 @@ class DynamicComponent {
|
|
|
1014
1137
|
instance.selected = this._selected;
|
|
1015
1138
|
instance.culture = this._culture;
|
|
1016
1139
|
}
|
|
1017
|
-
static
|
|
1018
|
-
static
|
|
1140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: [""] });
|
|
1019
1142
|
}
|
|
1020
1143
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicComponent, decorators: [{
|
|
1021
1144
|
type: Component,
|
|
@@ -1049,8 +1172,8 @@ class DynamicFormModule {
|
|
|
1049
1172
|
providers: []
|
|
1050
1173
|
};
|
|
1051
1174
|
}
|
|
1052
|
-
static
|
|
1053
|
-
static
|
|
1175
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1176
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormModule, declarations: [TextEditConfigComponent,
|
|
1054
1177
|
TextEditComponent,
|
|
1055
1178
|
SwitchConfigComponent,
|
|
1056
1179
|
SwitchControlComponent,
|
|
@@ -1076,13 +1199,13 @@ class DynamicFormModule {
|
|
|
1076
1199
|
// CkEditorConfigComponent,
|
|
1077
1200
|
SelectConfigComponent,
|
|
1078
1201
|
SelectControlComponent,
|
|
1079
|
-
DynamicComponent] });
|
|
1080
|
-
static
|
|
1202
|
+
DynamicComponent] });
|
|
1203
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormModule, imports: [FormsModule,
|
|
1081
1204
|
CoreModule,
|
|
1082
1205
|
ThemeSharedModule,
|
|
1083
1206
|
ReactiveFormsModule,
|
|
1084
1207
|
NgbDropdownModule,
|
|
1085
|
-
NzTreeModule] });
|
|
1208
|
+
NzTreeModule] });
|
|
1086
1209
|
}
|
|
1087
1210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormModule, decorators: [{
|
|
1088
1211
|
type: NgModule,
|