@dignite-ng/expand.dynamic-form 0.0.20 → 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/dignite-ng-expand.dynamic-form.mjs +1 -1
- package/esm2022/lib/components/dynamic/dynamic.component.mjs +26 -13
- package/esm2022/lib/components/dynamic/index.mjs +1 -1
- package/esm2022/lib/components/form/date-edit/date-edit-config.component.mjs +17 -9
- 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 +26 -11
- package/esm2022/lib/components/form/date-edit/index.mjs +1 -1
- package/esm2022/lib/components/form/form-control-group.mjs +1 -1
- package/esm2022/lib/components/form/index.mjs +1 -1
- package/esm2022/lib/components/form/numeric-edit/index.mjs +1 -1
- package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.component.mjs +16 -8
- 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 +25 -10
- package/esm2022/lib/components/form/select/index.mjs +1 -1
- package/esm2022/lib/components/form/select/select-config.component.mjs +18 -9
- package/esm2022/lib/components/form/select/select-config.mjs +7 -7
- package/esm2022/lib/components/form/select/select-control.component.mjs +25 -11
- package/esm2022/lib/components/form/switch/index.mjs +1 -1
- package/esm2022/lib/components/form/switch/switch-config.component.mjs +16 -8
- package/esm2022/lib/components/form/switch/switch-config.mjs +3 -3
- package/esm2022/lib/components/form/switch/switch-control.component.mjs +25 -10
- package/esm2022/lib/components/form/text-edit/index.mjs +1 -1
- package/esm2022/lib/components/form/text-edit/text-edit-config.component.mjs +17 -9
- package/esm2022/lib/components/form/text-edit/text-edit-config.mjs +7 -7
- package/esm2022/lib/components/form/text-edit/text-edit.component.mjs +29 -12
- package/esm2022/lib/components/index.mjs +1 -1
- package/esm2022/lib/dynamic-form.module.mjs +9 -8
- package/esm2022/lib/enums/date-edit-interfaces.mjs +1 -1
- package/esm2022/lib/enums/text-edit-mode.mjs +1 -1
- package/esm2022/lib/interfaces/form-config-interfaces.mjs +1 -1
- package/esm2022/lib/interfaces/index.mjs +1 -1
- package/esm2022/lib/services/df-api.service.mjs +7 -6
- package/esm2022/lib/services/index.mjs +1 -1
- package/esm2022/public-api.mjs +1 -1
- package/fesm2022/dignite-ng-expand.dynamic-form.mjs +233 -109
- 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 +2 -3
|
@@ -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,13 +82,13 @@ 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextEditConfigComponent, decorators: [{
|
|
81
89
|
type: Component,
|
|
82
90
|
args: [{ selector: 'df-text-edit-config', 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>" }]
|
|
83
|
-
}], ctorParameters: ()
|
|
91
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { type: [{
|
|
84
92
|
type: Input
|
|
85
93
|
}], Entity: [{
|
|
86
94
|
type: Input
|
|
@@ -91,34 +99,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
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,13 +162,19 @@ 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextEditComponent, decorators: [{
|
|
151
175
|
type: Component,
|
|
152
176
|
args: [{ selector: 'df-text-edit', 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>" }]
|
|
153
|
-
}], ctorParameters: ()
|
|
177
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { entity: [{
|
|
154
178
|
type: Input
|
|
155
179
|
}], fields: [{
|
|
156
180
|
type: Input
|
|
@@ -164,9 +188,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
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,13 +245,13 @@ 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchConfigComponent, decorators: [{
|
|
220
252
|
type: Component,
|
|
221
253
|
args: [{ selector: 'df-switch-config', 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>" }]
|
|
222
|
-
}], ctorParameters: ()
|
|
254
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { type: [{
|
|
223
255
|
type: Input
|
|
224
256
|
}], Entity: [{
|
|
225
257
|
type: Input
|
|
@@ -231,28 +263,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
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
|
}
|
|
@@ -269,18 +309,24 @@ class SwitchControlComponent {
|
|
|
269
309
|
if (this._fields.required) {
|
|
270
310
|
ValidatorsArray.push(Validators.required);
|
|
271
311
|
}
|
|
312
|
+
// console.log(this._selected,'this._selected',this._fields.field.name);
|
|
272
313
|
let newControl = this.fb.control(this._selected ? this._selected : this._selected === false ? this._selected : this._fields.field.formConfiguration['Switch.Default'], ValidatorsArray);
|
|
273
314
|
this.extraProperties.setControl(this._fields.field.name, newControl);
|
|
274
315
|
resolve(true);
|
|
275
316
|
});
|
|
276
317
|
}
|
|
277
|
-
|
|
278
|
-
|
|
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"] }] });
|
|
279
325
|
}
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchControlComponent, decorators: [{
|
|
281
327
|
type: Component,
|
|
282
328
|
args: [{ selector: 'df-switch-control', 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>" }]
|
|
283
|
-
}], ctorParameters: ()
|
|
329
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { entity: [{
|
|
284
330
|
type: Input
|
|
285
331
|
}], fields: [{
|
|
286
332
|
type: Input
|
|
@@ -294,19 +340,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
294
340
|
}] } });
|
|
295
341
|
|
|
296
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' = ['', []];
|
|
297
355
|
constructor(data) {
|
|
298
|
-
/**占位符 */
|
|
299
|
-
this['NumericEditField.Placeholder'] = ['', []];
|
|
300
|
-
/**最小值 */
|
|
301
|
-
this['NumericEditField.Min'] = ['', []];
|
|
302
|
-
//最大值
|
|
303
|
-
this['NumericEditField.Max'] = ['', []];
|
|
304
|
-
// 小数位数
|
|
305
|
-
this['NumericEditField.Decimals'] = [2, []];
|
|
306
|
-
//步长
|
|
307
|
-
this['NumericEditField.Step'] = ['', []];
|
|
308
|
-
//格式说明符
|
|
309
|
-
this['FormatSpecifier'] = ['', []];
|
|
310
356
|
if (data) {
|
|
311
357
|
for (const key in data) {
|
|
312
358
|
if (data.hasOwnProperty(key)) {
|
|
@@ -318,17 +364,24 @@ class NumbericEditConfig {
|
|
|
318
364
|
}
|
|
319
365
|
|
|
320
366
|
class NumbericEditConfigComponent {
|
|
367
|
+
fb;
|
|
321
368
|
constructor(fb) {
|
|
322
369
|
this.fb = fb;
|
|
323
370
|
}
|
|
371
|
+
/**表单控件类型 */
|
|
372
|
+
_type;
|
|
324
373
|
set type(v) {
|
|
325
374
|
this._type = v;
|
|
326
375
|
this.dataLoaded();
|
|
327
376
|
}
|
|
377
|
+
/**表单实体 */
|
|
378
|
+
_Entity;
|
|
328
379
|
set Entity(v) {
|
|
329
380
|
this._Entity = v;
|
|
330
381
|
this.dataLoaded();
|
|
331
382
|
}
|
|
383
|
+
/**选择的表单信息 */
|
|
384
|
+
_selected;
|
|
332
385
|
set selected(v) {
|
|
333
386
|
this._selected = v ? v : v == false ? v : '';
|
|
334
387
|
this.dataLoaded();
|
|
@@ -336,6 +389,7 @@ class NumbericEditConfigComponent {
|
|
|
336
389
|
get formConfiguration() {
|
|
337
390
|
return this._Entity.get('formConfiguration');
|
|
338
391
|
}
|
|
392
|
+
submitclick;
|
|
339
393
|
async dataLoaded() {
|
|
340
394
|
if (this._Entity && this._type) {
|
|
341
395
|
await this.AfterInit();
|
|
@@ -353,13 +407,13 @@ class NumbericEditConfigComponent {
|
|
|
353
407
|
resolve(true);
|
|
354
408
|
});
|
|
355
409
|
}
|
|
356
|
-
static
|
|
357
|
-
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" }] });
|
|
358
412
|
}
|
|
359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumbericEditConfigComponent, decorators: [{
|
|
360
414
|
type: Component,
|
|
361
415
|
args: [{ selector: 'df-numberic-edit-config', 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>" }]
|
|
362
|
-
}], ctorParameters: ()
|
|
416
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { type: [{
|
|
363
417
|
type: Input
|
|
364
418
|
}], Entity: [{
|
|
365
419
|
type: Input
|
|
@@ -383,12 +437,14 @@ function maxDecimalPlacesValidator(maxDecimalPlaces) {
|
|
|
383
437
|
};
|
|
384
438
|
}
|
|
385
439
|
class NumbericEditControlComponent {
|
|
440
|
+
fb;
|
|
441
|
+
cdr;
|
|
386
442
|
constructor(fb, cdr) {
|
|
387
443
|
this.fb = fb;
|
|
388
444
|
this.cdr = cdr;
|
|
389
|
-
/**字段配置列表 */
|
|
390
|
-
this._fields = '';
|
|
391
445
|
}
|
|
446
|
+
/**表单实体 */
|
|
447
|
+
_entity;
|
|
392
448
|
set entity(v) {
|
|
393
449
|
this._entity = v;
|
|
394
450
|
this.dataLoaded();
|
|
@@ -396,18 +452,25 @@ class NumbericEditControlComponent {
|
|
|
396
452
|
get entity() {
|
|
397
453
|
return this._entity;
|
|
398
454
|
}
|
|
455
|
+
/**字段配置列表 */
|
|
456
|
+
_fields = '';
|
|
399
457
|
set fields(v) {
|
|
400
458
|
this._fields = v;
|
|
401
459
|
this.dataLoaded();
|
|
402
460
|
}
|
|
461
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
462
|
+
_parentFiledName;
|
|
403
463
|
set parentFiledName(v) {
|
|
404
464
|
this._parentFiledName = v;
|
|
405
465
|
this.dataLoaded();
|
|
406
466
|
}
|
|
467
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
468
|
+
_selected;
|
|
407
469
|
set selected(v) {
|
|
408
470
|
this._selected = v;
|
|
409
471
|
this.dataLoaded();
|
|
410
472
|
}
|
|
473
|
+
submitclick;
|
|
411
474
|
get extraProperties() {
|
|
412
475
|
return this._entity.get('extraProperties');
|
|
413
476
|
}
|
|
@@ -438,6 +501,11 @@ class NumbericEditControlComponent {
|
|
|
438
501
|
resolve(true);
|
|
439
502
|
});
|
|
440
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
|
+
}
|
|
441
509
|
/**数字框输入 */
|
|
442
510
|
inputchange(event) {
|
|
443
511
|
let val = event.target.value;
|
|
@@ -448,13 +516,13 @@ class NumbericEditControlComponent {
|
|
|
448
516
|
this.fieldInput.patchValue(val.slice(0, val.length - (decimalPart.length - 2)));
|
|
449
517
|
}
|
|
450
518
|
}
|
|
451
|
-
static
|
|
452
|
-
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 });
|
|
453
521
|
}
|
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumbericEditControlComponent, decorators: [{
|
|
455
523
|
type: Component,
|
|
456
524
|
args: [{ selector: 'df-numberic-edit-control', changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
457
|
-
}], ctorParameters: ()
|
|
525
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { entity: [{
|
|
458
526
|
type: Input
|
|
459
527
|
}], fields: [{
|
|
460
528
|
type: Input
|
|
@@ -484,13 +552,13 @@ var DateEditInterfaces;
|
|
|
484
552
|
})(DateEditInterfaces || (DateEditInterfaces = {}));
|
|
485
553
|
|
|
486
554
|
class DateEditConfig {
|
|
555
|
+
/**日期格式 */
|
|
556
|
+
'DateEdit.InputMode' = [DateEditInterfaces.Date, []];
|
|
557
|
+
/**最小值 */
|
|
558
|
+
'DateEdit.Min' = ['', []];
|
|
559
|
+
/**最大值 */
|
|
560
|
+
'DateEdit.Max' = ['', []];
|
|
487
561
|
constructor(data) {
|
|
488
|
-
/**日期格式 */
|
|
489
|
-
this['DateEdit.InputMode'] = [DateEditInterfaces.Date, []];
|
|
490
|
-
/**最小值 */
|
|
491
|
-
this['DateEdit.Min'] = ['', []];
|
|
492
|
-
/**最大值 */
|
|
493
|
-
this['DateEdit.Max'] = ['', []];
|
|
494
562
|
if (data) {
|
|
495
563
|
for (const key in data) {
|
|
496
564
|
if (data.hasOwnProperty(key)) {
|
|
@@ -502,18 +570,25 @@ class DateEditConfig {
|
|
|
502
570
|
}
|
|
503
571
|
|
|
504
572
|
class DateEditConfigComponent {
|
|
573
|
+
fb;
|
|
505
574
|
constructor(fb) {
|
|
506
575
|
this.fb = fb;
|
|
507
|
-
this._DateEditInterfaces = DateEditInterfaces;
|
|
508
576
|
}
|
|
577
|
+
_DateEditInterfaces = DateEditInterfaces;
|
|
578
|
+
/**表单控件类型 */
|
|
579
|
+
_type;
|
|
509
580
|
set type(v) {
|
|
510
581
|
this._type = v;
|
|
511
582
|
this.dataLoaded();
|
|
512
583
|
}
|
|
584
|
+
/**表单实体 */
|
|
585
|
+
_Entity;
|
|
513
586
|
set Entity(v) {
|
|
514
587
|
this._Entity = v;
|
|
515
588
|
this.dataLoaded();
|
|
516
589
|
}
|
|
590
|
+
/**选择的表单信息 */
|
|
591
|
+
_selected;
|
|
517
592
|
set selected(v) {
|
|
518
593
|
this._selected = v;
|
|
519
594
|
this.dataLoaded();
|
|
@@ -521,6 +596,7 @@ class DateEditConfigComponent {
|
|
|
521
596
|
get formConfiguration() {
|
|
522
597
|
return this._Entity.get('formConfiguration');
|
|
523
598
|
}
|
|
599
|
+
submitclick;
|
|
524
600
|
async dataLoaded() {
|
|
525
601
|
if (this._Entity && this._type) {
|
|
526
602
|
await this.AfterInit();
|
|
@@ -538,13 +614,13 @@ class DateEditConfigComponent {
|
|
|
538
614
|
resolve(true);
|
|
539
615
|
});
|
|
540
616
|
}
|
|
541
|
-
static
|
|
542
|
-
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" }] });
|
|
543
619
|
}
|
|
544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
620
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateEditConfigComponent, decorators: [{
|
|
545
621
|
type: Component,
|
|
546
622
|
args: [{ selector: 'df-date-edit-config', 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>" }]
|
|
547
|
-
}], ctorParameters: ()
|
|
623
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { type: [{
|
|
548
624
|
type: Input
|
|
549
625
|
}], Entity: [{
|
|
550
626
|
type: Input
|
|
@@ -556,13 +632,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
556
632
|
}] } });
|
|
557
633
|
|
|
558
634
|
class DateEditControlComponent {
|
|
635
|
+
fb;
|
|
636
|
+
cdr;
|
|
559
637
|
constructor(fb, cdr) {
|
|
560
638
|
this.fb = fb;
|
|
561
639
|
this.cdr = cdr;
|
|
562
|
-
this._DateEditInterfaces = DateEditInterfaces;
|
|
563
|
-
/**字段配置列表 */
|
|
564
|
-
this._fields = '';
|
|
565
640
|
}
|
|
641
|
+
_DateEditInterfaces = DateEditInterfaces;
|
|
642
|
+
/**表单实体 */
|
|
643
|
+
_entity;
|
|
566
644
|
set entity(v) {
|
|
567
645
|
this._entity = v;
|
|
568
646
|
this.dataLoaded();
|
|
@@ -570,18 +648,25 @@ class DateEditControlComponent {
|
|
|
570
648
|
get entity() {
|
|
571
649
|
return this._entity;
|
|
572
650
|
}
|
|
651
|
+
/**字段配置列表 */
|
|
652
|
+
_fields = '';
|
|
573
653
|
set fields(v) {
|
|
574
654
|
this._fields = v;
|
|
575
655
|
this.dataLoaded();
|
|
576
656
|
}
|
|
657
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
658
|
+
_parentFiledName;
|
|
577
659
|
set parentFiledName(v) {
|
|
578
660
|
this._parentFiledName = v;
|
|
579
661
|
this.dataLoaded();
|
|
580
662
|
}
|
|
663
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
664
|
+
_selected;
|
|
581
665
|
set selected(v) {
|
|
582
666
|
this._selected = v;
|
|
583
667
|
this.dataLoaded();
|
|
584
668
|
}
|
|
669
|
+
submitclick;
|
|
585
670
|
get extraProperties() {
|
|
586
671
|
return this._entity.get('extraProperties');
|
|
587
672
|
}
|
|
@@ -612,13 +697,18 @@ class DateEditControlComponent {
|
|
|
612
697
|
resolve(true);
|
|
613
698
|
});
|
|
614
699
|
}
|
|
615
|
-
|
|
616
|
-
|
|
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"] }] });
|
|
617
707
|
}
|
|
618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateEditControlComponent, decorators: [{
|
|
619
709
|
type: Component,
|
|
620
710
|
args: [{ selector: 'df-date-edit-control', 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>" }]
|
|
621
|
-
}], ctorParameters: ()
|
|
711
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { entity: [{
|
|
622
712
|
type: Input
|
|
623
713
|
}], fields: [{
|
|
624
714
|
type: Input
|
|
@@ -632,13 +722,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
632
722
|
}] } });
|
|
633
723
|
|
|
634
724
|
class SelectConfig {
|
|
725
|
+
/**空值文本 */
|
|
726
|
+
'Select.NullText' = ['', []];
|
|
727
|
+
//多选
|
|
728
|
+
'Select.Multiple' = [false, []];
|
|
729
|
+
// 选项
|
|
730
|
+
'Select.Options' = new FormArray([]);
|
|
635
731
|
constructor(data) {
|
|
636
|
-
/**空值文本 */
|
|
637
|
-
this['Select.NullText'] = ['', []];
|
|
638
|
-
//多选
|
|
639
|
-
this['Select.Multiple'] = [false, []];
|
|
640
|
-
// 选项
|
|
641
|
-
this['Select.Options'] = new FormArray([]);
|
|
642
732
|
if (data) {
|
|
643
733
|
for (const key in data) {
|
|
644
734
|
if (data.hasOwnProperty(key)) {
|
|
@@ -718,29 +808,37 @@ class DfApiService {
|
|
|
718
808
|
}
|
|
719
809
|
return result;
|
|
720
810
|
}
|
|
721
|
-
static
|
|
722
|
-
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' });
|
|
723
813
|
}
|
|
724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DfApiService, decorators: [{
|
|
725
815
|
type: Injectable,
|
|
726
816
|
args: [{
|
|
727
817
|
providedIn: 'root'
|
|
728
818
|
}]
|
|
729
|
-
}], ctorParameters: ()
|
|
819
|
+
}], ctorParameters: function () { return []; } });
|
|
730
820
|
|
|
731
821
|
class SelectConfigComponent {
|
|
822
|
+
fb;
|
|
823
|
+
_DfApiService;
|
|
732
824
|
constructor(fb, _DfApiService) {
|
|
733
825
|
this.fb = fb;
|
|
734
826
|
this._DfApiService = _DfApiService;
|
|
735
827
|
}
|
|
828
|
+
/**表单控件类型 */
|
|
829
|
+
_type;
|
|
736
830
|
set type(v) {
|
|
737
831
|
this._type = v;
|
|
738
832
|
this.dataLoaded();
|
|
739
833
|
}
|
|
834
|
+
/**表单实体 */
|
|
835
|
+
_Entity;
|
|
740
836
|
set Entity(v) {
|
|
741
837
|
this._Entity = v;
|
|
742
838
|
this.dataLoaded();
|
|
743
839
|
}
|
|
840
|
+
/**选择的表单信息 */
|
|
841
|
+
_selected;
|
|
744
842
|
set selected(v) {
|
|
745
843
|
this._selected = v;
|
|
746
844
|
this.dataLoaded();
|
|
@@ -751,6 +849,7 @@ class SelectConfigComponent {
|
|
|
751
849
|
get SelectOptions() {
|
|
752
850
|
return this.formConfiguration.controls['Select.Options'];
|
|
753
851
|
}
|
|
852
|
+
submitclick;
|
|
754
853
|
async dataLoaded() {
|
|
755
854
|
if (this._Entity && this._type) {
|
|
756
855
|
await this.AfterInit();
|
|
@@ -795,13 +894,13 @@ class SelectConfigComponent {
|
|
|
795
894
|
Value: this._DfApiService.chineseToPinyin(value)
|
|
796
895
|
});
|
|
797
896
|
}
|
|
798
|
-
static
|
|
799
|
-
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" }] });
|
|
800
899
|
}
|
|
801
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectConfigComponent, decorators: [{
|
|
802
901
|
type: Component,
|
|
803
902
|
args: [{ selector: 'df-select-config', 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>" }]
|
|
804
|
-
}], ctorParameters: ()
|
|
903
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: DfApiService }]; }, propDecorators: { type: [{
|
|
805
904
|
type: Input
|
|
806
905
|
}], Entity: [{
|
|
807
906
|
type: Input
|
|
@@ -813,28 +912,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
813
912
|
}] } });
|
|
814
913
|
|
|
815
914
|
class SelectControlComponent {
|
|
915
|
+
fb;
|
|
816
916
|
constructor(fb) {
|
|
817
917
|
this.fb = fb;
|
|
818
|
-
/**字段配置列表 */
|
|
819
|
-
this._fields = '';
|
|
820
|
-
this.formConfiguration = '';
|
|
821
918
|
}
|
|
919
|
+
/**表单实体 */
|
|
920
|
+
_entity;
|
|
822
921
|
set entity(v) {
|
|
823
922
|
this._entity = v;
|
|
824
923
|
this.dataLoaded();
|
|
825
924
|
}
|
|
925
|
+
/**字段配置列表 */
|
|
926
|
+
_fields = '';
|
|
826
927
|
set fields(v) {
|
|
827
928
|
this._fields = v;
|
|
828
929
|
this.dataLoaded();
|
|
829
930
|
}
|
|
931
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
932
|
+
_parentFiledName;
|
|
830
933
|
set parentFiledName(v) {
|
|
831
934
|
this._parentFiledName = v;
|
|
832
935
|
this.dataLoaded();
|
|
833
936
|
}
|
|
937
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
938
|
+
_selected;
|
|
834
939
|
set selected(v) {
|
|
835
940
|
this._selected = v;
|
|
836
941
|
this.dataLoaded();
|
|
837
942
|
}
|
|
943
|
+
submitclick;
|
|
838
944
|
get extraProperties() {
|
|
839
945
|
return this._entity.get('extraProperties');
|
|
840
946
|
}
|
|
@@ -845,6 +951,7 @@ class SelectControlComponent {
|
|
|
845
951
|
this.submitclick.nativeElement.click();
|
|
846
952
|
}
|
|
847
953
|
}
|
|
954
|
+
formConfiguration = '';
|
|
848
955
|
AfterInit() {
|
|
849
956
|
return new Promise((resolve, rejects) => {
|
|
850
957
|
let ValidatorsArray = [];
|
|
@@ -867,13 +974,18 @@ class SelectControlComponent {
|
|
|
867
974
|
resolve(true);
|
|
868
975
|
});
|
|
869
976
|
}
|
|
870
|
-
|
|
871
|
-
|
|
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"] }] });
|
|
872
984
|
}
|
|
873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectControlComponent, decorators: [{
|
|
874
986
|
type: Component,
|
|
875
987
|
args: [{ selector: 'df-select-control', 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>" }]
|
|
876
|
-
}], ctorParameters: ()
|
|
988
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { entity: [{
|
|
877
989
|
type: Input
|
|
878
990
|
}], fields: [{
|
|
879
991
|
type: Input
|
|
@@ -932,43 +1044,56 @@ function AddFieldControlGroup(array = []) {
|
|
|
932
1044
|
}
|
|
933
1045
|
|
|
934
1046
|
class DynamicComponent {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
this._fields = '';
|
|
938
|
-
/**表单控件组 */
|
|
939
|
-
this._fieldControlGroup = FieldControlGroup;
|
|
940
|
-
}
|
|
1047
|
+
/**选择的表单信息 */
|
|
1048
|
+
_selected;
|
|
941
1049
|
set selected(v) {
|
|
942
|
-
this._selected = v
|
|
1050
|
+
this._selected = v === undefined ? '' : v === null ? '' : v;
|
|
1051
|
+
// this._selected = (v===true?true:v===false?false:v) || '';
|
|
943
1052
|
if (v)
|
|
944
1053
|
this.dataLoaded(1);
|
|
945
1054
|
}
|
|
1055
|
+
/**表单控件类型 */
|
|
1056
|
+
_type;
|
|
946
1057
|
set type(v) {
|
|
947
1058
|
this._type = v;
|
|
948
1059
|
if (v)
|
|
949
1060
|
this.dataLoaded(2);
|
|
950
1061
|
}
|
|
1062
|
+
/**表单实体 */
|
|
1063
|
+
_entity;
|
|
951
1064
|
set entity(v) {
|
|
952
1065
|
if (v) {
|
|
953
1066
|
this._entity = v;
|
|
954
1067
|
this.dataLoaded(3);
|
|
955
1068
|
}
|
|
956
1069
|
}
|
|
1070
|
+
/**语言 */
|
|
1071
|
+
_culture;
|
|
957
1072
|
set culture(v) {
|
|
958
1073
|
this._culture = v;
|
|
959
1074
|
if (v)
|
|
960
1075
|
this.dataLoaded(6);
|
|
961
1076
|
}
|
|
1077
|
+
/**父级字段名称,用于为表单设置控件赋值 */
|
|
1078
|
+
_parentFiledName;
|
|
962
1079
|
set parentFiledName(v) {
|
|
963
1080
|
this._parentFiledName = v;
|
|
964
1081
|
if (v)
|
|
965
1082
|
this.dataLoaded(4);
|
|
966
1083
|
}
|
|
1084
|
+
/**字段配置列表 */
|
|
1085
|
+
_fields = '';
|
|
967
1086
|
set fields(v) {
|
|
968
1087
|
this._fields = v;
|
|
969
1088
|
if (v)
|
|
970
1089
|
this.dataLoaded(5);
|
|
971
1090
|
}
|
|
1091
|
+
/**表单控件模板-动态表单配置组件 */
|
|
1092
|
+
FormControlRef;
|
|
1093
|
+
/**表单控件模板-动态表单组件 */
|
|
1094
|
+
FormComponentsRef;
|
|
1095
|
+
/**表单控件组 */
|
|
1096
|
+
_fieldControlGroup = FieldControlGroup;
|
|
972
1097
|
/**数据加载完成 */
|
|
973
1098
|
dataLoaded(val) {
|
|
974
1099
|
if (this._entity) {
|
|
@@ -1005,7 +1130,6 @@ class DynamicComponent {
|
|
|
1005
1130
|
return;
|
|
1006
1131
|
//在容器中创建组件
|
|
1007
1132
|
const { instance } = this.FormComponentsRef?.createComponent(FieldControlItem.fieldComponent); //创建组件模板
|
|
1008
|
-
// this.formConfigCompoent = instance
|
|
1009
1133
|
/**向创建的组件模板中传值 */
|
|
1010
1134
|
instance.entity = this._entity;
|
|
1011
1135
|
instance.fields = this._fields;
|
|
@@ -1013,10 +1137,10 @@ class DynamicComponent {
|
|
|
1013
1137
|
instance.selected = this._selected;
|
|
1014
1138
|
instance.culture = this._culture;
|
|
1015
1139
|
}
|
|
1016
|
-
static
|
|
1017
|
-
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: [""] });
|
|
1018
1142
|
}
|
|
1019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicComponent, decorators: [{
|
|
1020
1144
|
type: Component,
|
|
1021
1145
|
args: [{ selector: 'df-dynamic', template: "<template #FormControlRef></template>\n<template #FormComponentsRef></template>" }]
|
|
1022
1146
|
}], propDecorators: { selected: [{
|
|
@@ -1048,8 +1172,8 @@ class DynamicFormModule {
|
|
|
1048
1172
|
providers: []
|
|
1049
1173
|
};
|
|
1050
1174
|
}
|
|
1051
|
-
static
|
|
1052
|
-
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,
|
|
1053
1177
|
TextEditComponent,
|
|
1054
1178
|
SwitchConfigComponent,
|
|
1055
1179
|
SwitchControlComponent,
|
|
@@ -1075,15 +1199,15 @@ class DynamicFormModule {
|
|
|
1075
1199
|
// CkEditorConfigComponent,
|
|
1076
1200
|
SelectConfigComponent,
|
|
1077
1201
|
SelectControlComponent,
|
|
1078
|
-
DynamicComponent] });
|
|
1079
|
-
static
|
|
1202
|
+
DynamicComponent] });
|
|
1203
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormModule, imports: [FormsModule,
|
|
1080
1204
|
CoreModule,
|
|
1081
1205
|
ThemeSharedModule,
|
|
1082
1206
|
ReactiveFormsModule,
|
|
1083
1207
|
NgbDropdownModule,
|
|
1084
|
-
NzTreeModule] });
|
|
1208
|
+
NzTreeModule] });
|
|
1085
1209
|
}
|
|
1086
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicFormModule, decorators: [{
|
|
1087
1211
|
type: NgModule,
|
|
1088
1212
|
args: [{
|
|
1089
1213
|
declarations: [
|