@dignite-ng/expand.dynamic-form 3.0.0-rc.8 → 3.0.0

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.
Files changed (85) hide show
  1. package/README.md +117 -13
  2. package/esm2022/dignite-ng-expand.dynamic-form.mjs +1 -1
  3. package/esm2022/lib/components/dynamic/dynamic-config.component.mjs +56 -6
  4. package/esm2022/lib/components/dynamic/dynamic-control.component.mjs +87 -6
  5. package/esm2022/lib/components/dynamic/dynamic-search.component.mjs +67 -0
  6. package/esm2022/lib/components/dynamic/dynamic-view.component.mjs +7 -4
  7. package/esm2022/lib/components/dynamic/dynamic.component.mjs +15 -7
  8. package/esm2022/lib/components/dynamic/index.mjs +2 -1
  9. package/esm2022/lib/components/form/date-edit/date-edit-config.component.mjs +13 -11
  10. package/esm2022/lib/components/form/date-edit/date-edit-config.mjs +1 -1
  11. package/esm2022/lib/components/form/date-edit/date-edit-control.component.mjs +9 -8
  12. package/esm2022/lib/components/form/date-edit/date-edit-view.component.mjs +3 -2
  13. package/esm2022/lib/components/form/date-edit/index.mjs +2 -1
  14. package/esm2022/lib/components/form/form-control-group.mjs +11 -4
  15. package/esm2022/lib/components/form/index.mjs +1 -1
  16. package/esm2022/lib/components/form/numeric-edit/index.mjs +1 -1
  17. package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.component.mjs +12 -10
  18. package/esm2022/lib/components/form/numeric-edit/numberic-edit-config.mjs +1 -1
  19. package/esm2022/lib/components/form/numeric-edit/numberic-edit-control.component.mjs +22 -14
  20. package/esm2022/lib/components/form/numeric-edit/numeric-edit-search.component.mjs +107 -0
  21. package/esm2022/lib/components/form/numeric-edit/numeric-edit-view.component.mjs +3 -2
  22. package/esm2022/lib/components/form/select/index.mjs +3 -1
  23. package/esm2022/lib/components/form/select/select-config.component.mjs +37 -17
  24. package/esm2022/lib/components/form/select/select-config.mjs +4 -11
  25. package/esm2022/lib/components/form/select/select-control.component.mjs +25 -18
  26. package/esm2022/lib/components/form/select/select-search.component.mjs +94 -0
  27. package/esm2022/lib/components/form/select/select-view.component.mjs +3 -2
  28. package/esm2022/lib/components/form/switch/index.mjs +3 -1
  29. package/esm2022/lib/components/form/switch/switch-config.component.mjs +16 -12
  30. package/esm2022/lib/components/form/switch/switch-config.mjs +3 -10
  31. package/esm2022/lib/components/form/switch/switch-control.component.mjs +5 -5
  32. package/esm2022/lib/components/form/switch/switch-search.component.mjs +79 -0
  33. package/esm2022/lib/components/form/switch/switch-view.component.mjs +2 -2
  34. package/esm2022/lib/components/form/text-edit/index.mjs +3 -1
  35. package/esm2022/lib/components/form/text-edit/text-edit-config.component.mjs +18 -14
  36. package/esm2022/lib/components/form/text-edit/text-edit-config.mjs +5 -12
  37. package/esm2022/lib/components/form/text-edit/text-edit-search.component.mjs +81 -0
  38. package/esm2022/lib/components/form/text-edit/text-edit-view.component.mjs +1 -1
  39. package/esm2022/lib/components/form/text-edit/text-edit.component.mjs +6 -5
  40. package/esm2022/lib/components/index.mjs +1 -1
  41. package/esm2022/lib/dynamic-form.module.mjs +48 -6
  42. package/esm2022/lib/enums/date-edit-interfaces.mjs +1 -1
  43. package/esm2022/lib/enums/text-edit-mode.mjs +1 -1
  44. package/esm2022/lib/interfaces/form-config-interfaces.mjs +1 -1
  45. package/esm2022/lib/interfaces/index.mjs +1 -1
  46. package/esm2022/lib/services/df-api.service.mjs +2 -60
  47. package/esm2022/lib/services/form-control.service.mjs +8 -4
  48. package/esm2022/lib/services/index.mjs +1 -1
  49. package/esm2022/public-api.mjs +1 -1
  50. package/fesm2022/dignite-ng-expand.dynamic-form.mjs +826 -283
  51. package/fesm2022/dignite-ng-expand.dynamic-form.mjs.map +1 -1
  52. package/lib/components/dynamic/dynamic-config.component.d.ts +17 -2
  53. package/lib/components/dynamic/dynamic-control.component.d.ts +28 -2
  54. package/lib/components/dynamic/dynamic-search.component.d.ts +28 -0
  55. package/lib/components/dynamic/dynamic-view.component.d.ts +2 -2
  56. package/lib/components/dynamic/dynamic.component.d.ts +4 -0
  57. package/lib/components/dynamic/index.d.ts +1 -0
  58. package/lib/components/form/date-edit/date-edit-config.component.d.ts +1 -1
  59. package/lib/components/form/date-edit/date-edit-control.component.d.ts +2 -2
  60. package/lib/components/form/date-edit/date-edit-view.component.d.ts +2 -1
  61. package/lib/components/form/date-edit/index.d.ts +1 -0
  62. package/lib/components/form/form-control-group.d.ts +1 -1
  63. package/lib/components/form/numeric-edit/numberic-edit-config.component.d.ts +1 -1
  64. package/lib/components/form/numeric-edit/numberic-edit-control.component.d.ts +2 -1
  65. package/lib/components/form/numeric-edit/numeric-edit-search.component.d.ts +35 -0
  66. package/lib/components/form/numeric-edit/numeric-edit-view.component.d.ts +2 -1
  67. package/lib/components/form/select/index.d.ts +2 -0
  68. package/lib/components/form/select/select-config.component.d.ts +9 -1
  69. package/lib/components/form/select/select-config.d.ts +0 -1
  70. package/lib/components/form/select/select-control.component.d.ts +2 -2
  71. package/lib/components/form/select/select-search.component.d.ts +30 -0
  72. package/lib/components/form/switch/index.d.ts +2 -0
  73. package/lib/components/form/switch/switch-config.component.d.ts +2 -2
  74. package/lib/components/form/switch/switch-config.d.ts +0 -1
  75. package/lib/components/form/switch/switch-control.component.d.ts +1 -1
  76. package/lib/components/form/switch/switch-search.component.d.ts +28 -0
  77. package/lib/components/form/text-edit/index.d.ts +2 -0
  78. package/lib/components/form/text-edit/text-edit-config.component.d.ts +4 -2
  79. package/lib/components/form/text-edit/text-edit-config.d.ts +0 -1
  80. package/lib/components/form/text-edit/text-edit-search.component.d.ts +30 -0
  81. package/lib/dynamic-form.module.d.ts +13 -6
  82. package/lib/interfaces/form-config-interfaces.d.ts +8 -4
  83. package/lib/services/df-api.service.d.ts +0 -11
  84. package/lib/services/form-control.service.d.ts +5 -1
  85. package/package.json +11 -9
@@ -1,33 +1,28 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, Component, Input, ViewChild, ChangeDetectionStrategy, Injectable, ViewContainerRef, Inject, NgModule } from '@angular/core';
2
+ import { inject, ChangeDetectorRef, ViewChild, Input, Component, ChangeDetectionStrategy, Injectable, ViewContainerRef, Inject, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
- import { Validators, FormArray, FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
4
+ import { Validators, FormGroup, FormControl, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
5
  import * as i2 from '@abp/ng.core';
6
6
  import { CoreModule } from '@abp/ng.core';
7
7
  import { ThemeSharedModule } from '@abp/ng.theme.shared';
8
- import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
8
+ import { NgbDropdownModule, NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
9
9
  import * as i3 from '@ngx-validate/core';
10
10
  import * as i2$1 from '@angular/common';
11
11
  import { DatePipe } from '@angular/common';
12
- import { pinyin } from 'pinyin-pro';
12
+ import * as i6 from '@angular/cdk/drag-drop';
13
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
13
14
  import * as i4 from 'ng-zorro-antd/select';
14
15
  import { NzSelectModule } from 'ng-zorro-antd/select';
16
+ import { ExtensibleModule } from '@abp/ng.components/extensible';
15
17
 
16
18
  class TextEditConfig {
17
- constructor(data) {
19
+ constructor() {
18
20
  /**占位符 */
19
- this['TextEdit.Placeholder'] = ['', []];
21
+ this['TextEdit.Placeholder'] = [''];
20
22
  //字段类型,单行文本,多行文本
21
- this['TextEdit.Mode'] = [0, []];
23
+ this['TextEdit.Mode'] = [0];
22
24
  // 字数限制
23
- this['TextEdit.CharLimit'] = ['265', []];
24
- if (data) {
25
- for (const key in data) {
26
- if (data.hasOwnProperty(key)) {
27
- this[key] = data[key];
28
- }
29
- }
30
- }
25
+ this['TextEdit.CharLimit'] = ['265'];
31
26
  }
32
27
  }
33
28
 
@@ -39,18 +34,21 @@ var TextEditMode;
39
34
  TextEditMode[TextEditMode["MultipleLine"] = 1] = "MultipleLine";
40
35
  })(TextEditMode || (TextEditMode = {}));
41
36
 
37
+ /* eslint-disable @angular-eslint/component-selector */
42
38
  class TextEditConfigComponent {
43
39
  constructor(fb) {
44
40
  this.fb = fb;
45
41
  this._TextEditMode = TextEditMode;
42
+ this.RadioIndex1 = Math.floor(Math.random() * 1001);
43
+ this.RadioIndex2 = Math.floor(Math.random() * 1001);
46
44
  this.cdr = inject(ChangeDetectorRef);
47
45
  }
48
46
  set type(v) {
49
- this._type = v;
47
+ this.formControlName = v;
50
48
  this.dataLoaded();
51
49
  }
52
50
  set Entity(v) {
53
- this._Entity = v;
51
+ this.formEntity = v;
54
52
  this.dataLoaded();
55
53
  }
56
54
  set selected(v) {
@@ -58,19 +56,19 @@ class TextEditConfigComponent {
58
56
  this.dataLoaded();
59
57
  }
60
58
  get formConfiguration() {
61
- return this._Entity.get('formConfiguration');
59
+ return this.formEntity.get('formConfiguration');
62
60
  }
63
61
  async dataLoaded() {
64
- if (this._Entity && this._type) {
62
+ if (this.formEntity && this.formControlName) {
65
63
  await this.AfterInit();
66
- this.cdr.detectChanges(); // 手动触发变更检测
67
- this.submitclick?.nativeElement?.click();
68
64
  }
69
65
  }
70
66
  AfterInit() {
71
67
  return new Promise((resolve, rejects) => {
72
- this._Entity.setControl('formConfiguration', this.fb.group(new TextEditConfig()));
73
- if (this._selected && this._selected.formControlName == this._type) {
68
+ this.formEntity.setControl('formConfiguration', this.fb.group(new TextEditConfig()));
69
+ this.cdr.detectChanges(); // 手动触发变更检测
70
+ this.submitclick?.nativeElement?.click();
71
+ if (this._selected && this._selected.formControlName == this.formControlName) {
74
72
  this.formConfiguration.patchValue({
75
73
  ...this._selected.formConfiguration,
76
74
  });
@@ -79,11 +77,11 @@ class TextEditConfigComponent {
79
77
  });
80
78
  }
81
79
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
82
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TextEditConfigComponent, selector: "df-text-edit-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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-3\">\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-3\">\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" }] }); }
80
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TextEditConfigComponent, selector: "df-text-edit-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"TextEdit.Placeholder\" >\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::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=\"flexRadioDefault{{RadioIndex1}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{RadioIndex1}}\">\n {{'AbpDynamicForm::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=\"flexRadioDefault{{RadioIndex2}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{RadioIndex2}}\">\n {{'AbpDynamicForm::MultipleLine' | abpLocalization}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::CharLimit' | abpLocalization}}</label>\n <input type=\"number\" class=\"form-control\" formControlName=\"TextEdit.CharLimit\">\n </div>\n <button type=\"submit\" 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: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
83
81
  }
84
82
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditConfigComponent, decorators: [{
85
83
  type: Component,
86
- args: [{ selector: 'df-text-edit-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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-3\">\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-3\">\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>" }]
84
+ args: [{ selector: 'df-text-edit-config', template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"TextEdit.Placeholder\" >\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::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=\"flexRadioDefault{{RadioIndex1}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{RadioIndex1}}\">\n {{'AbpDynamicForm::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=\"flexRadioDefault{{RadioIndex2}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{RadioIndex2}}\">\n {{'AbpDynamicForm::MultipleLine' | abpLocalization}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::CharLimit' | abpLocalization}}</label>\n <input type=\"number\" class=\"form-control\" formControlName=\"TextEdit.CharLimit\">\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n </div>\n</form>" }]
87
85
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { type: [{
88
86
  type: Input
89
87
  }], Entity: [{
@@ -95,6 +93,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
95
93
  args: ['submitclick', { static: true }]
96
94
  }] } });
97
95
 
96
+ /* eslint-disable @angular-eslint/component-selector */
98
97
  /* eslint-disable @angular-eslint/no-empty-lifecycle-method */
99
98
  /* eslint-disable @angular-eslint/use-lifecycle-interface */
100
99
  class TextEditComponent {
@@ -136,7 +135,7 @@ class TextEditComponent {
136
135
  }
137
136
  AfterInit() {
138
137
  return new Promise((resolve, rejects) => {
139
- let ValidatorsArray = [];
138
+ const ValidatorsArray = [];
140
139
  if (this._fields.required) {
141
140
  ValidatorsArray.push(Validators.required);
142
141
  }
@@ -147,7 +146,7 @@ class TextEditComponent {
147
146
  if (this._fields.field.formConfiguration['TextEdit.CharLimit']) {
148
147
  ValidatorsArray.push(Validators.maxLength(this._fields.field.formConfiguration['TextEdit.CharLimit']));
149
148
  }
150
- let newControl = this.fb.control(this._selected, ValidatorsArray);
149
+ const newControl = this.fb.control(this._selected, ValidatorsArray);
151
150
  this.extraProperties?.setControl(this._fields.field.name, newControl);
152
151
  resolve(true);
153
152
  });
@@ -176,20 +175,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
176
175
  args: ['submitclick', { static: true }]
177
176
  }] } });
178
177
 
178
+ class TextEditViewComponent {
179
+ constructor() {
180
+ /**展示则内容 */
181
+ this.showValue = '';
182
+ /**是否显示再列表 */
183
+ this.showInList = false;
184
+ /**表单控件Value */
185
+ this._value = '';
186
+ }
187
+ set value(v) {
188
+ this._value = v;
189
+ }
190
+ async ngAfterContentInit() {
191
+ //Called after ngOnInit when the component's or directive's content has been initialized.
192
+ //Add 'implements AfterContentInit' to the class.
193
+ let valueOptions = this._value;
194
+ if (this.type && valueOptions) {
195
+ this.showValue = valueOptions;
196
+ }
197
+ }
198
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
199
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: TextEditViewComponent, selector: "df-text-edit-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
200
+ }
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditViewComponent, decorators: [{
202
+ type: Component,
203
+ args: [{ selector: 'df-text-edit-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
204
+ }], propDecorators: { showInList: [{
205
+ type: Input
206
+ }], fields: [{
207
+ type: Input
208
+ }], type: [{
209
+ type: Input
210
+ }], value: [{
211
+ type: Input
212
+ }] } });
213
+
214
+ class TextEditSearchComponent {
215
+ constructor(fb) {
216
+ this.fb = fb;
217
+ this._TextEditMode = TextEditMode;
218
+ /**字段配置列表 */
219
+ this._fields = '';
220
+ this.cdr = inject(ChangeDetectorRef);
221
+ this.isObjEmpty = (obj) => Object.keys(obj).length === 0;
222
+ }
223
+ set entity(v) {
224
+ this._entity = v;
225
+ if (v)
226
+ this.dataLoaded();
227
+ }
228
+ set fields(v) {
229
+ this._fields = v;
230
+ if (v)
231
+ this.dataLoaded();
232
+ }
233
+ set parentFiledName(v) {
234
+ this._parentFiledName = v;
235
+ if (v)
236
+ this.dataLoaded();
237
+ }
238
+ set selected(v) {
239
+ this._selected = v || '';
240
+ if (v)
241
+ this.dataLoaded();
242
+ }
243
+ async dataLoaded() {
244
+ if (this._fields && this._entity && this._parentFiledName) {
245
+ this.extraProperties = this._entity.get(this._parentFiledName);
246
+ await this.AfterInit();
247
+ this.cdr.detectChanges(); // 手动触发变更检测
248
+ this.submitclick?.nativeElement?.click();
249
+ }
250
+ }
251
+ AfterInit() {
252
+ return new Promise((resolve, rejects) => {
253
+ let ValidatorsArray = [];
254
+ this._fields.field.formConfiguration = {
255
+ ...this.fb.group(new TextEditConfig()).value,
256
+ ...this._fields.field.formConfiguration
257
+ };
258
+ let newControl = this.fb.control(this._selected, ValidatorsArray);
259
+ this.extraProperties?.setControl(this._fields.field.name, newControl);
260
+ resolve(true);
261
+ });
262
+ }
263
+ ngOnDestroy() {
264
+ //Called once, before the instance is destroyed.
265
+ //Add 'implements OnDestroy' to the class.
266
+ this.extraProperties?.removeControl(this._fields.field.name);
267
+ }
268
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
269
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TextEditSearchComponent, selector: "df-text-edit-search", 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\">\r\n <div [formGroupName]=\"_parentFiledName\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\r\n [placeholder]=\"_fields.field.formConfiguration['TextEdit.Placeholder']\" />\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\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"] }] }); }
270
+ }
271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditSearchComponent, decorators: [{
272
+ type: Component,
273
+ args: [{ selector: 'df-text-edit-search', template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\r\n [placeholder]=\"_fields.field.formConfiguration['TextEdit.Placeholder']\" />\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>" }]
274
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { entity: [{
275
+ type: Input
276
+ }], fields: [{
277
+ type: Input
278
+ }], parentFiledName: [{
279
+ type: Input
280
+ }], selected: [{
281
+ type: Input
282
+ }], submitclick: [{
283
+ type: ViewChild,
284
+ args: ['submitclick', { static: true }]
285
+ }] } });
286
+
179
287
  class SwitchConfig {
180
- constructor(data) {
288
+ constructor() {
181
289
  /**默认值 */
182
- this['Switch.Default'] = [false, []];
183
- if (data) {
184
- for (const key in data) {
185
- if (data.hasOwnProperty(key)) {
186
- this[key] = data[key];
187
- }
188
- }
189
- }
290
+ this['Switch.Default'] = [false];
190
291
  }
191
292
  }
192
293
 
294
+ /* eslint-disable @angular-eslint/component-selector */
193
295
  class SwitchConfigComponent {
194
296
  constructor(fb) {
195
297
  this.fb = fb;
@@ -200,7 +302,7 @@ class SwitchConfigComponent {
200
302
  this.dataLoaded();
201
303
  }
202
304
  set Entity(v) {
203
- this._Entity = v;
305
+ this.formEntity = v;
204
306
  this.dataLoaded();
205
307
  }
206
308
  set selected(v) {
@@ -208,18 +310,20 @@ class SwitchConfigComponent {
208
310
  this.dataLoaded();
209
311
  }
210
312
  get formConfiguration() {
211
- return this._Entity.get('formConfiguration');
313
+ return this.formEntity.get('formConfiguration');
212
314
  }
213
315
  async dataLoaded() {
214
- if (this._Entity && this._type) {
316
+ if (this.formEntity && this._type) {
215
317
  await this.AfterInit();
216
- this.cdr.detectChanges(); // 手动触发变更检测
217
- this.submitclick?.nativeElement?.click();
318
+ // this.cdr.detectChanges();
218
319
  }
219
320
  }
220
321
  AfterInit() {
221
322
  return new Promise((resolve, rejects) => {
222
- this._Entity.setControl('formConfiguration', this.fb.group(new SwitchConfig()));
323
+ this.formEntity.setControl('formConfiguration', this.fb.group(new SwitchConfig()));
324
+ setTimeout(() => {
325
+ this.submitclick?.nativeElement?.click();
326
+ }, 0);
223
327
  if (this._selected && this._selected.formControlName == this._type) {
224
328
  this.formConfiguration.patchValue({
225
329
  ...this._selected.formConfiguration,
@@ -229,11 +333,11 @@ class SwitchConfigComponent {
229
333
  });
230
334
  }
231
335
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
232
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchConfigComponent, selector: "df-switch-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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" }] }); }
336
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchConfigComponent, selector: "df-switch-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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 {{'AbpDynamicForm::DefaultValue' | abpLocalization}}\n </label>\n </div>\n \n </div>\n </div>\n <button type=\"submit\" 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: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
233
337
  }
234
338
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchConfigComponent, decorators: [{
235
339
  type: Component,
236
- args: [{ selector: 'df-switch-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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>" }]
340
+ args: [{ selector: 'df-switch-config', template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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 {{'AbpDynamicForm::DefaultValue' | abpLocalization}}\n </label>\n </div>\n \n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n </div>\n</form>" }]
237
341
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { type: [{
238
342
  type: Input
239
343
  }], Entity: [{
@@ -301,11 +405,83 @@ class SwitchControlComponent {
301
405
  this.extraProperties.removeControl(this._fields.field.name);
302
406
  }
303
407
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
304
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchControlComponent, selector: "df-switch-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\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 <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], 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"] }] }); }
408
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchControlComponent, selector: "df-switch-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\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 <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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"] }] }); }
305
409
  }
306
410
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchControlComponent, decorators: [{
307
411
  type: Component,
308
- args: [{ selector: 'df-switch-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\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 <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
412
+ args: [{ selector: 'df-switch-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\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 <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
413
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { entity: [{
414
+ type: Input
415
+ }], fields: [{
416
+ type: Input
417
+ }], parentFiledName: [{
418
+ type: Input
419
+ }], selected: [{
420
+ type: Input
421
+ }], submitclick: [{
422
+ type: ViewChild,
423
+ args: ['submitclick', { static: true }]
424
+ }] } });
425
+
426
+ /* eslint-disable @angular-eslint/component-selector */
427
+ class SwitchSearchComponent {
428
+ constructor(fb) {
429
+ this.fb = fb;
430
+ /**字段配置列表 */
431
+ this._fields = '';
432
+ this.cdr = inject(ChangeDetectorRef);
433
+ }
434
+ set entity(v) {
435
+ this._entity = v;
436
+ this.dataLoaded();
437
+ }
438
+ set fields(v) {
439
+ this._fields = v;
440
+ this.dataLoaded();
441
+ }
442
+ set parentFiledName(v) {
443
+ this._parentFiledName = v;
444
+ this.dataLoaded();
445
+ }
446
+ set selected(v) {
447
+ // ?v:false;
448
+ this._selected = v;
449
+ this.dataLoaded();
450
+ }
451
+ get extraProperties() {
452
+ return this._entity.get('extraProperties');
453
+ }
454
+ /**数据加载完成 */
455
+ async dataLoaded() {
456
+ if (this._fields && this._entity) {
457
+ await this.AfterInit();
458
+ this.cdr.detectChanges(); // 手动触发变更检测
459
+ this.submitclick?.nativeElement?.click();
460
+ }
461
+ }
462
+ AfterInit() {
463
+ return new Promise((resolve, rejects) => {
464
+ const ValidatorsArray = [];
465
+ const newControl = this.fb.control(this._selected
466
+ ? this._selected
467
+ : this._selected === false
468
+ ? this._selected
469
+ : '', ValidatorsArray);
470
+ this.extraProperties.setControl(this._fields.field.name, newControl);
471
+ resolve(true);
472
+ });
473
+ }
474
+ ngOnDestroy() {
475
+ //Called once, before the instance is destroyed.
476
+ //Add 'implements OnDestroy' to the class.
477
+ this.extraProperties.removeControl(this._fields.field.name);
478
+ }
479
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
480
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SwitchSearchComponent, selector: "df-switch-search", 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\">\r\n <div formGroupName=\"extraProperties\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <!-- <div class=\"form-check form-switch\">\r\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\r\n </div> -->\r\n <!-- <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small> -->\r\n <select class=\"form-select form-control\" formControlName=\"{{_fields.field.name}}\" role=\"switch\">\r\n <option [value]=\"\"></option>\r\n <option [value]=\"true\">{{'AbpUi::Yes'|abpLocalization}}</option>\r\n <option [value]=\"false\">{{'AbpUi::No'|abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\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.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
481
+ }
482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchSearchComponent, decorators: [{
483
+ type: Component,
484
+ args: [{ selector: 'df-switch-search', template: "<form [formGroup]=\"_entity\">\r\n <div formGroupName=\"extraProperties\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <!-- <div class=\"form-check form-switch\">\r\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" formControlName=\"{{_fields.field.name}}\">\r\n </div> -->\r\n <!-- <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small> -->\r\n <select class=\"form-select form-control\" formControlName=\"{{_fields.field.name}}\" role=\"switch\">\r\n <option [value]=\"\"></option>\r\n <option [value]=\"true\">{{'AbpUi::Yes'|abpLocalization}}</option>\r\n <option [value]=\"false\">{{'AbpUi::No'|abpLocalization}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>" }]
309
485
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { entity: [{
310
486
  type: Input
311
487
  }], fields: [{
@@ -319,6 +495,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
319
495
  args: ['submitclick', { static: true }]
320
496
  }] } });
321
497
 
498
+ class SwitchViewComponent {
499
+ constructor() {
500
+ /**展示则内容 */
501
+ this.showValue = '';
502
+ /**是否显示再列表 */
503
+ this.showInList = false;
504
+ /**表单控件Value */
505
+ this._value = '';
506
+ }
507
+ set value(v) {
508
+ this._value = v;
509
+ }
510
+ async ngAfterContentInit() {
511
+ //Called after ngOnInit when the component's or directive's content has been initialized.
512
+ //Add 'implements AfterContentInit' to the class.
513
+ let valueOptions = this._value;
514
+ if (this.type) {
515
+ this.showValue = valueOptions;
516
+ }
517
+ }
518
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
519
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: SwitchViewComponent, selector: "df-switch-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
520
+ }
521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, decorators: [{
522
+ type: Component,
523
+ args: [{ selector: 'df-switch-view', template: "@if(showInList){\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n </div>\r\n</div>\r\n}" }]
524
+ }], propDecorators: { showInList: [{
525
+ type: Input
526
+ }], fields: [{
527
+ type: Input
528
+ }], type: [{
529
+ type: Input
530
+ }], value: [{
531
+ type: Input
532
+ }] } });
533
+
322
534
  class NumbericEditConfig {
323
535
  constructor(data) {
324
536
  /**占位符 */
@@ -343,6 +555,7 @@ class NumbericEditConfig {
343
555
  }
344
556
  }
345
557
 
558
+ /* eslint-disable @angular-eslint/component-selector */
346
559
  class NumbericEditConfigComponent {
347
560
  constructor(fb) {
348
561
  this.fb = fb;
@@ -356,22 +569,22 @@ class NumbericEditConfigComponent {
356
569
  this._selected = v ? v : v == false ? v : '';
357
570
  }
358
571
  set Entity(v) {
359
- this._Entity = v;
572
+ this.formEntity = v;
360
573
  this.dataLoaded();
361
574
  }
362
575
  get formConfiguration() {
363
- return this._Entity.get('formConfiguration');
576
+ return this.formEntity.get('formConfiguration');
364
577
  }
365
578
  async dataLoaded() {
366
- if (this._Entity && this._type) {
579
+ if (this.formEntity && this._type) {
367
580
  await this.AfterInit();
368
- this.cdr.detectChanges(); // 手动触发变更检测
369
- this.submitclick?.nativeElement?.click();
370
581
  }
371
582
  }
372
583
  AfterInit() {
373
584
  return new Promise((resolve, rejects) => {
374
- this._Entity.setControl('formConfiguration', this.fb.group(new NumbericEditConfig()));
585
+ this.formEntity.setControl('formConfiguration', this.fb.group(new NumbericEditConfig()));
586
+ this.cdr.detectChanges(); // 手动触发变更检测
587
+ this.submitclick?.nativeElement?.click();
375
588
  if (this._selected && this._selected.formControlName == this._type) {
376
589
  this.formConfiguration.patchValue({
377
590
  ...this._selected.formConfiguration,
@@ -381,11 +594,11 @@ class NumbericEditConfigComponent {
381
594
  });
382
595
  }
383
596
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
384
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumbericEditConfigComponent, selector: "df-numberic-edit-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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-3\">\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-3\">\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-3\">\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-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericStep' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Step\">\n <small class=\"form-text text-muted d-block\">{{'DigniteAbpForms::NumericStepHelp'|abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::FormatSpecifier' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FormatSpecifier\">\n <small class=\"form-text text-muted d-block\">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></small>\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.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" }] }); }
597
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumbericEditConfigComponent, selector: "df-numberic-edit-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Placeholder\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Min' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Max' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Max\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::NumericDecimals' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Decimals\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::NumericStep' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Step\">\n <small class=\"form-text text-muted d-block\">{{'AbpDynamicForm::NumericStepHelp'|abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::FormatSpecifier' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FormatSpecifier\">\n <small class=\"form-text text-muted d-block\">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></small>\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.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" }] }); }
385
598
  }
386
599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditConfigComponent, decorators: [{
387
600
  type: Component,
388
- args: [{ selector: 'df-numberic-edit-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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-3\">\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-3\">\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-3\">\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-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::NumericStep' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Step\">\n <small class=\"form-text text-muted d-block\">{{'DigniteAbpForms::NumericStepHelp'|abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::FormatSpecifier' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FormatSpecifier\">\n <small class=\"form-text text-muted d-block\">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></small>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\" #submitclick></button>\n </div>\n</form>" }]
601
+ args: [{ selector: 'df-numberic-edit-config', template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Placeholder\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Min' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Max' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Max\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::NumericDecimals' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Decimals\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::NumericStep' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"NumericEditField.Step\">\n <small class=\"form-text text-muted d-block\">{{'AbpDynamicForm::NumericStepHelp'|abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::FormatSpecifier' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FormatSpecifier\">\n <small class=\"form-text text-muted d-block\">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></small>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\" #submitclick></button>\n </div>\n</form>" }]
389
602
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { type: [{
390
603
  type: Input
391
604
  }], selected: [{
@@ -397,13 +610,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
397
610
  args: ['submitclick', { static: false }]
398
611
  }] } });
399
612
 
613
+ /* eslint-disable @angular-eslint/component-selector */
614
+ /* eslint-disable @typescript-eslint/adjacent-overload-signatures */
400
615
  function maxDecimalPlacesValidator(maxDecimalPlaces) {
401
616
  return (control) => {
402
617
  const value = control.value;
403
618
  if (typeof value === 'number' && isNaN(value) === false) {
404
619
  const decimalPart = value.toString().split('.')[1];
405
620
  if (decimalPart && decimalPart.length > maxDecimalPlaces) {
406
- return { 'maxDecimalPlaces': { actual: decimalPart.length, max: maxDecimalPlaces } };
621
+ return { maxDecimalPlaces: { actual: decimalPart.length, max: maxDecimalPlaces } };
407
622
  }
408
623
  }
409
624
  return null;
@@ -415,6 +630,7 @@ class NumbericEditControlComponent {
415
630
  this.cdr = cdr;
416
631
  /**字段配置列表 */
417
632
  this._fields = '';
633
+ this.formConfiguration = '';
418
634
  }
419
635
  get entity() {
420
636
  return this._entity;
@@ -427,7 +643,7 @@ class NumbericEditControlComponent {
427
643
  }
428
644
  set selected(v) {
429
645
  this._selected = v;
430
- //
646
+ //
431
647
  }
432
648
  set entity(v) {
433
649
  this._entity = v;
@@ -436,7 +652,9 @@ class NumbericEditControlComponent {
436
652
  get extraProperties() {
437
653
  return this._entity?.get('extraProperties');
438
654
  }
439
- get fieldInput() { return this.extraProperties.get(this._fields.field.name); }
655
+ get fieldInput() {
656
+ return this.extraProperties.get(this._fields.field.name);
657
+ }
440
658
  /**数据加载完成 */
441
659
  async dataLoaded() {
442
660
  if (this._fields && this._entity) {
@@ -447,8 +665,9 @@ class NumbericEditControlComponent {
447
665
  }
448
666
  AfterInit() {
449
667
  return new Promise((resolve, rejects) => {
450
- let ValidatorsArray = [];
451
- let formConfiguration = this._fields.field.formConfiguration;
668
+ const ValidatorsArray = [];
669
+ const formConfiguration = this._fields.field.formConfiguration;
670
+ this.formConfiguration = formConfiguration;
452
671
  if (this._fields.required) {
453
672
  ValidatorsArray.push(Validators.required);
454
673
  }
@@ -458,7 +677,7 @@ class NumbericEditControlComponent {
458
677
  if (formConfiguration['NumericEditField.Max']) {
459
678
  ValidatorsArray.push(Validators.max(formConfiguration['NumericEditField.Max']));
460
679
  }
461
- let newControl = this.fb.control(this._selected, ValidatorsArray);
680
+ const newControl = this.fb.control(this._selected, ValidatorsArray);
462
681
  this.extraProperties.setControl(this._fields.field.name, newControl);
463
682
  resolve(true);
464
683
  });
@@ -470,20 +689,22 @@ class NumbericEditControlComponent {
470
689
  }
471
690
  /**数字框输入 */
472
691
  inputchange(event) {
473
- let val = event.target.value;
692
+ const val = event.target.value;
474
693
  const decimalPart = val.toString().split('.')[1] || '';
475
- let formConfiguration = this._fields.field.formConfiguration;
476
- let Decimals = formConfiguration['NumericEditField.Decimals'];
694
+ const formConfiguration = this._fields.field.formConfiguration;
695
+ const Decimals = formConfiguration['NumericEditField.Decimals'];
477
696
  if (decimalPart.length > Decimals) {
478
697
  this.fieldInput?.patchValue(val.slice(0, val.length - (decimalPart.length - 2)));
479
698
  }
699
+ this.extraProperties.updateValueAndValidity();
700
+ this.fieldInput.updateValueAndValidity();
480
701
  }
481
702
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditControlComponent, deps: [{ token: i1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
482
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumbericEditControlComponent, selector: "df-numberic-edit-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\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 [step]=\"_fields.field.formConfiguration['NumericEditField.Step']\" (input)=\"inputchange($event)\" />\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], 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: 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 }); }
703
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumbericEditControlComponent, selector: "df-numberic-edit-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\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 [step]=\"_fields.field.formConfiguration['NumericEditField.Step']\" [min]=\"formConfiguration['NumericEditField.Min']\" [max]=\"formConfiguration['NumericEditField.Max']\" (input)=\"inputchange($event)\" />\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.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 }); }
483
704
  }
484
705
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumbericEditControlComponent, decorators: [{
485
706
  type: Component,
486
- args: [{ selector: 'df-numberic-edit-control', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <input type=\"number\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\n [placeholder]=\"_fields.field.formConfiguration['NumericEditField.Placeholder']||''\"\n [step]=\"_fields.field.formConfiguration['NumericEditField.Step']\" (input)=\"inputchange($event)\" />\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
707
+ args: [{ selector: 'df-numberic-edit-control', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <input type=\"number\" class=\"form-control\" formControlName=\"{{_fields.field.name}}\"\n [placeholder]=\"_fields.field.formConfiguration['NumericEditField.Placeholder']||''\"\n [step]=\"_fields.field.formConfiguration['NumericEditField.Step']\" [min]=\"formConfiguration['NumericEditField.Min']\" [max]=\"formConfiguration['NumericEditField.Max']\" (input)=\"inputchange($event)\" />\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
487
708
  }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i0.ChangeDetectorRef }], propDecorators: { fields: [{
488
709
  type: Input
489
710
  }], parentFiledName: [{
@@ -524,6 +745,7 @@ class DateEditConfig {
524
745
  }
525
746
  }
526
747
 
748
+ /* eslint-disable @angular-eslint/component-selector */
527
749
  class DateEditConfigComponent {
528
750
  constructor(fb) {
529
751
  this.fb = fb;
@@ -539,22 +761,22 @@ class DateEditConfigComponent {
539
761
  this._selected = v;
540
762
  }
541
763
  set Entity(v) {
542
- this._Entity = v;
764
+ this.formEntity = v;
543
765
  this.dataLoaded();
544
766
  }
545
767
  get formConfiguration() {
546
- return this._Entity.get('formConfiguration');
768
+ return this.formEntity.get('formConfiguration');
547
769
  }
548
770
  async dataLoaded() {
549
- if (this._Entity && this._type) {
771
+ if (this.formEntity && this._type) {
550
772
  await this.AfterInit();
551
- this.cdr.detectChanges(); // 手动触发变更检测
552
- this.submitclick?.nativeElement?.click();
553
773
  }
554
774
  }
555
775
  AfterInit() {
556
776
  return new Promise((resolve, rejects) => {
557
- this._Entity.setControl('formConfiguration', this.fb.group(new DateEditConfig()));
777
+ this.formEntity.setControl('formConfiguration', this.fb.group(new DateEditConfig()));
778
+ this.cdr.detectChanges(); // 手动触发变更检测
779
+ this.submitclick?.nativeElement?.click();
558
780
  if (this._selected && this._selected.formControlName == this._type) {
559
781
  this.formConfiguration.patchValue({
560
782
  ...this._selected.formConfiguration,
@@ -566,7 +788,7 @@ class DateEditConfigComponent {
566
788
  }
567
789
  /**切换时间类型 */
568
790
  timeTypeChange() {
569
- let type = this.formConfiguration.value['DateEdit.InputMode'];
791
+ const type = this.formConfiguration.value['DateEdit.InputMode'];
570
792
  let Min = this.formConfiguration.value['DateEdit.Min'];
571
793
  let Max = this.formConfiguration.value['DateEdit.Max'];
572
794
  if (type == DateEditInterfaces.Date) {
@@ -590,11 +812,11 @@ class DateEditConfigComponent {
590
812
  });
591
813
  }
592
814
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
593
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DateEditConfigComponent, selector: "df-date-edit-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, 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-3\">\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\" (change)=\"timeTypeChange()\">\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\" (change)=\"timeTypeChange()\">\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\" (change)=\"timeTypeChange()\">\n <label class=\"form-check-label\" for=\"flexRadioDefault3\">\n {{'DigniteAbpForms::Month' | abpLocalization}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Min' | abpLocalization}}</label>\n <input [type]=\"dateTimeType\" class=\"form-control\" step=\"1\" formControlName=\"DateEdit.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Max' | abpLocalization}}</label>\n <input [type]=\"dateTimeType\" 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" }] }); }
815
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DateEditConfigComponent, selector: "df-date-edit-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::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\" (change)=\"timeTypeChange()\">\n <label class=\"form-check-label\" for=\"flexRadioDefault1\">\n {{'AbpDynamicForm::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\" (change)=\"timeTypeChange()\">\n <label class=\"form-check-label\" for=\"flexRadioDefault2\">\n {{'AbpDynamicForm::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\" (change)=\"timeTypeChange()\">\n <label class=\"form-check-label\" for=\"flexRadioDefault3\">\n {{'AbpDynamicForm::Month' | abpLocalization}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Min' | abpLocalization}}</label>\n <input [type]=\"dateTimeType\" class=\"form-control\" step=\"1\" formControlName=\"DateEdit.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Max' | abpLocalization}}</label>\n <input [type]=\"dateTimeType\" 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" }] }); }
594
816
  }
595
817
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditConfigComponent, decorators: [{
596
818
  type: Component,
597
- args: [{ selector: 'df-date-edit-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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\" (change)=\"timeTypeChange()\">\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\" (change)=\"timeTypeChange()\">\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\" (change)=\"timeTypeChange()\">\n <label class=\"form-check-label\" for=\"flexRadioDefault3\">\n {{'DigniteAbpForms::Month' | abpLocalization}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Min' | abpLocalization}}</label>\n <input [type]=\"dateTimeType\" class=\"form-control\" step=\"1\" formControlName=\"DateEdit.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpForms::Max' | abpLocalization}}</label>\n <input [type]=\"dateTimeType\" 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>" }]
819
+ args: [{ selector: 'df-date-edit-config', template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::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\" (change)=\"timeTypeChange()\">\n <label class=\"form-check-label\" for=\"flexRadioDefault1\">\n {{'AbpDynamicForm::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\" (change)=\"timeTypeChange()\">\n <label class=\"form-check-label\" for=\"flexRadioDefault2\">\n {{'AbpDynamicForm::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\" (change)=\"timeTypeChange()\">\n <label class=\"form-check-label\" for=\"flexRadioDefault3\">\n {{'AbpDynamicForm::Month' | abpLocalization}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Min' | abpLocalization}}</label>\n <input [type]=\"dateTimeType\" class=\"form-control\" step=\"1\" formControlName=\"DateEdit.Min\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::Max' | abpLocalization}}</label>\n <input [type]=\"dateTimeType\" 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>" }]
598
820
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { type: [{
599
821
  type: Input
600
822
  }], selected: [{
@@ -606,6 +828,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
606
828
  args: ['submitclick', { static: true }]
607
829
  }] } });
608
830
 
831
+ /* eslint-disable @angular-eslint/component-selector */
609
832
  class DateEditControlComponent {
610
833
  constructor(fb, cdr) {
611
834
  this.fb = fb;
@@ -647,8 +870,8 @@ class DateEditControlComponent {
647
870
  }
648
871
  AfterInit() {
649
872
  return new Promise((resolve, rejects) => {
650
- let ValidatorsArray = [];
651
- let formConfiguration = this._fields.field.formConfiguration;
873
+ const ValidatorsArray = [];
874
+ const formConfiguration = this._fields.field.formConfiguration;
652
875
  if (this._fields.required) {
653
876
  ValidatorsArray.push(Validators.required);
654
877
  }
@@ -668,7 +891,7 @@ class DateEditControlComponent {
668
891
  if (this._fields.field.formConfiguration['DateEdit.InputMode'] === DateEditInterfaces.Month) {
669
892
  controlName = this._dataPipe.transform(this._selected, 'yyyy-MM');
670
893
  }
671
- let newControl = this.fb.control(controlName, ValidatorsArray);
894
+ const newControl = this.fb.control(controlName, ValidatorsArray);
672
895
  this.extraProperties.setControl(this._fields.field.name, newControl);
673
896
  resolve(true);
674
897
  });
@@ -679,11 +902,11 @@ class DateEditControlComponent {
679
902
  this.extraProperties.removeControl(this._fields.field.name);
680
903
  }
681
904
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditControlComponent, deps: [{ token: i1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
682
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DateEditControlComponent, selector: "df-date-edit-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\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 <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
905
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DateEditControlComponent, selector: "df-date-edit-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\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\" #dateTime (focus)=\"dateTime.focus()\" 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 <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
683
906
  }
684
907
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DateEditControlComponent, decorators: [{
685
908
  type: Component,
686
- args: [{ selector: 'df-date-edit-control', template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n\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 <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
909
+ args: [{ selector: 'df-date-edit-control', template: "<form [formGroup]=\"_entity\">\n <div [formGroupName]=\"_parentFiledName\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n\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\" #dateTime (focus)=\"dateTime.focus()\" 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 <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
687
910
  }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i0.ChangeDetectorRef }], propDecorators: { fields: [{
688
911
  type: Input
689
912
  }], parentFiledName: [{
@@ -697,6 +920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
697
920
  args: ['submitclick', { static: true }]
698
921
  }] } });
699
922
 
923
+ /* eslint-disable @angular-eslint/component-selector */
700
924
  class DateEditViewComponent {
701
925
  constructor() {
702
926
  /**展示则内容 */
@@ -712,7 +936,7 @@ class DateEditViewComponent {
712
936
  async ngAfterContentInit() {
713
937
  //Called after ngOnInit when the component's or directive's content has been initialized.
714
938
  //Add 'implements AfterContentInit' to the class.
715
- let valueOptions = this._value;
939
+ const valueOptions = this._value;
716
940
  if (this.type && valueOptions) {
717
941
  this.showValue = valueOptions;
718
942
  }
@@ -733,22 +957,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
733
957
  type: Input
734
958
  }] } });
735
959
 
736
- class NumericEditViewComponent {
737
- constructor() {
738
- /**展示则内容 */
739
- this.showValue = '';
740
- /**是否显示再列表 */
741
- this.showInList = false;
742
- /**表单控件Value */
743
- this._value = '';
744
- }
745
- set value(v) {
960
+ /* eslint-disable @angular-eslint/component-selector */
961
+ class NumericEditSearchComponent {
962
+ constructor(fb) {
963
+ this.fb = fb;
964
+ /**字段配置列表 */
965
+ this._fields = '';
966
+ this.cdr = inject(ChangeDetectorRef);
967
+ /**定义number表单用于获取最小值最大值 */
968
+ this.numberForm = new FormGroup({
969
+ min: new FormControl(''),
970
+ max: new FormControl(''),
971
+ });
972
+ this.formConfiguration = '';
973
+ }
974
+ set fields(v) {
975
+ this._fields = v;
976
+ }
977
+ set parentFiledName(v) {
978
+ this._parentFiledName = v;
979
+ }
980
+ set selected(v) {
981
+ this._selected = v;
982
+ }
983
+ set entity(v) {
984
+ this._entity = v;
985
+ this.dataLoaded();
986
+ }
987
+ get extraProperties() {
988
+ return this._entity?.get('extraProperties');
989
+ }
990
+ /**数据加载完成 */
991
+ async dataLoaded() {
992
+ if (this._fields && this._entity) {
993
+ await this.AfterInit();
994
+ this.cdr.detectChanges(); // 手动触发变更检测
995
+ this.submitclick?.nativeElement?.click();
996
+ }
997
+ }
998
+ /**定义动态字符 */
999
+ get numberInput() {
1000
+ return this.extraProperties.get(this._fields.field.name);
1001
+ }
1002
+ get minInput() {
1003
+ return this.numberForm.get('min');
1004
+ }
1005
+ get maxInput() {
1006
+ return this.numberForm.get('max');
1007
+ }
1008
+ AfterInit() {
1009
+ return new Promise(resolve => {
1010
+ const ValidatorsArray = [];
1011
+ this.formConfiguration = this._fields.field.formConfiguration;
1012
+ const newControl = this.fb.control(this._selected, ValidatorsArray);
1013
+ this.extraProperties.setControl(this._fields.field.name, newControl);
1014
+ this.numberForm.valueChanges.subscribe(res => {
1015
+ if (res.min < Number(this.formConfiguration['NumericEditField.Min'])) {
1016
+ this.minInput.patchValue(this.formConfiguration['NumericEditField.Min']);
1017
+ }
1018
+ if (res.min > Number(this.formConfiguration['NumericEditField.Max'])) {
1019
+ this.minInput.patchValue(this.formConfiguration['NumericEditField.Max']);
1020
+ }
1021
+ if ((res.min > res.max) && res.max) {
1022
+ this.minInput.patchValue(res.max);
1023
+ }
1024
+ if (res.max > Number(this.formConfiguration['NumericEditField.Max'])) {
1025
+ this.maxInput.patchValue(this.formConfiguration['NumericEditField.Max']);
1026
+ }
1027
+ if (this.numberForm.valid && res.min && res.max) {
1028
+ this.numberInput.patchValue(`${res.min}-${res.max}`);
1029
+ }
1030
+ else {
1031
+ this.numberInput.patchValue('');
1032
+ }
1033
+ });
1034
+ resolve(true);
1035
+ });
1036
+ }
1037
+ ngOnDestroy() {
1038
+ //Called once, before the instance is destroyed.
1039
+ //Add 'implements OnDestroy' to the class.
1040
+ this.extraProperties.removeControl(this._fields.field.name);
1041
+ }
1042
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1043
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: NumericEditSearchComponent, selector: "df-numeric-edit-search", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"numberForm\">\r\n <div class=\"selectcontrol\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <div class=\"input-group\" >\r\n <input class=\"form-control\" type=\"number\" formControlName=\"min\">\r\n <span class=\"input-group-text px-1\">-</span>\r\n <input class=\"form-control\" type=\"number\" formControlName=\"max\">\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\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: 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: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
1044
+ }
1045
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditSearchComponent, decorators: [{
1046
+ type: Component,
1047
+ args: [{ selector: 'df-numeric-edit-search', template: "<form [formGroup]=\"numberForm\">\r\n <div class=\"selectcontrol\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <div class=\"input-group\" >\r\n <input class=\"form-control\" type=\"number\" formControlName=\"min\">\r\n <span class=\"input-group-text px-1\">-</span>\r\n <input class=\"form-control\" type=\"number\" formControlName=\"max\">\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>" }]
1048
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
1049
+ type: Input
1050
+ }], parentFiledName: [{
1051
+ type: Input
1052
+ }], selected: [{
1053
+ type: Input
1054
+ }], entity: [{
1055
+ type: Input
1056
+ }], submitclick: [{
1057
+ type: ViewChild,
1058
+ args: ['submitclick', { static: true }]
1059
+ }] } });
1060
+
1061
+ /* eslint-disable @angular-eslint/component-selector */
1062
+ class NumericEditViewComponent {
1063
+ constructor() {
1064
+ /**展示则内容 */
1065
+ this.showValue = '';
1066
+ /**是否显示再列表 */
1067
+ this.showInList = false;
1068
+ /**表单控件Value */
1069
+ this._value = '';
1070
+ }
1071
+ set value(v) {
746
1072
  this._value = v;
747
1073
  }
748
1074
  async ngAfterContentInit() {
749
1075
  //Called after ngOnInit when the component's or directive's content has been initialized.
750
1076
  //Add 'implements AfterContentInit' to the class.
751
- let valueOptions = this._value;
1077
+ const valueOptions = this._value;
752
1078
  if (this.type && valueOptions) {
753
1079
  this.showValue = valueOptions;
754
1080
  }
@@ -770,55 +1096,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
770
1096
  }] } });
771
1097
 
772
1098
  class SelectConfig {
773
- constructor(data) {
1099
+ constructor() {
774
1100
  /**空值文本 */
775
- this['Select.NullText'] = ['', []];
1101
+ this['Select.NullText'] = [''];
776
1102
  //多选
777
- this['Select.Multiple'] = [false, []];
1103
+ this['Select.Multiple'] = [false];
778
1104
  // 选项
779
1105
  this['Select.Options'] = new FormArray([]);
780
- if (data) {
781
- for (const key in data) {
782
- if (data.hasOwnProperty(key)) {
783
- this[key] = data[key];
784
- }
785
- }
786
- }
787
1106
  }
788
1107
  }
789
1108
 
790
1109
  class DfApiService {
791
- constructor() { }
792
- /**
793
- * 识别中文转化为拼音,固定返回类型
794
- * 汉字转拼音
795
- * 大写转小写
796
- *
797
- * */
798
- chineseToPinyin(value) {
799
- //去除字符串中所有的空格
800
- // let val = value
801
- let val = value.replaceAll(' ', "-");
802
- let array = val.split('');
803
- let newArray = [];
804
- array.forEach((el, index) => {
805
- //转化为小写
806
- let elChange = el.toLowerCase();
807
- let isChinese = (str) => {
808
- return /^[\u4e00-\u9fa5]+$/.test(str);
809
- };
810
- if (isChinese(elChange)) {
811
- const resultWithoutTone = pinyin(elChange, { toneType: 'none', type: 'array' });
812
- elChange = resultWithoutTone.toString();
813
- if (index < array.length - 1)
814
- elChange += '-';
815
- }
816
- ;
817
- newArray.push(elChange);
818
- });
819
- let pinyinstr = newArray.join('');
820
- return pinyinstr || val;
821
- }
822
1110
  /**获取图片的本地连接 */
823
1111
  getImageLacolBase64Url(file) {
824
1112
  return new Promise((resolve, rejects) => {
@@ -830,32 +1118,6 @@ class DfApiService {
830
1118
  reader.onerror = error => rejects(error);
831
1119
  });
832
1120
  }
833
- /**
834
- * 深拷贝--方法 */
835
- deepClone(obj) {
836
- if (typeof obj !== 'object' || obj === null)
837
- return obj;
838
- const result = Array.isArray(obj) ? [] : {};
839
- for (let key in obj) {
840
- if (obj.hasOwnProperty(key)) {
841
- if (typeof obj[key] === 'object' && obj[key] !== null) {
842
- if (obj[key] instanceof Date) {
843
- result[key] = new Date(obj[key].getTime());
844
- }
845
- else if (obj[key] instanceof RegExp) {
846
- result[key] = new RegExp(obj[key]);
847
- }
848
- else {
849
- result[key] = this.deepClone(obj[key]);
850
- }
851
- }
852
- else {
853
- result[key] = obj[key];
854
- }
855
- }
856
- }
857
- return result;
858
- }
859
1121
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DfApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
860
1122
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DfApiService, providedIn: 'root' }); }
861
1123
  }
@@ -864,8 +1126,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
864
1126
  args: [{
865
1127
  providedIn: 'root'
866
1128
  }]
867
- }], ctorParameters: () => [] });
1129
+ }] });
868
1130
 
1131
+ /* eslint-disable @angular-eslint/component-selector */
869
1132
  class SelectConfigComponent {
870
1133
  constructor(fb, _DfApiService) {
871
1134
  this.fb = fb;
@@ -879,20 +1142,18 @@ class SelectConfigComponent {
879
1142
  this._selected = v;
880
1143
  }
881
1144
  set Entity(v) {
882
- this._Entity = v;
1145
+ this.formEntity = v;
883
1146
  this.dataLoaded();
884
1147
  }
885
1148
  get formConfiguration() {
886
- return this._Entity.get('formConfiguration');
1149
+ return this.formEntity?.get('formConfiguration');
887
1150
  }
888
1151
  get SelectOptions() {
889
1152
  return this.formConfiguration.controls['Select.Options'];
890
1153
  }
891
1154
  async dataLoaded() {
892
- if (this._Entity && this._type) {
1155
+ if (this.formEntity && this._type) {
893
1156
  await this.AfterInit();
894
- this.cdr.detectChanges(); // 手动触发变更检测
895
- this.submitclick?.nativeElement?.click();
896
1157
  }
897
1158
  }
898
1159
  /**增加选项 */
@@ -909,11 +1170,18 @@ class SelectConfigComponent {
909
1170
  }
910
1171
  AfterInit() {
911
1172
  return new Promise((resolve, rejects) => {
912
- this._Entity.setControl('formConfiguration', this.fb.group(new SelectConfig()));
1173
+ this.formEntity?.setControl('formConfiguration', this.fb.group(new SelectConfig()));
1174
+ this.cdr.detectChanges(); // 手动触发变更检测
1175
+ this.submitclick?.nativeElement?.click();
913
1176
  if (this._selected && this._selected.formControlName == this._type) {
914
- this._selected.formConfiguration['Select.Options']?.forEach(el => {
1177
+ for (const element of this._selected.formConfiguration['Select.Options']) {
1178
+ for (const key in element) {
1179
+ const item = element[key];
1180
+ const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
1181
+ element[capitalizedKey] = item;
1182
+ }
915
1183
  this.addSelectOptions();
916
- });
1184
+ }
917
1185
  this.formConfiguration.patchValue({
918
1186
  ...this._selected.formConfiguration,
919
1187
  });
@@ -924,21 +1192,32 @@ class SelectConfigComponent {
924
1192
  resolve(true);
925
1193
  });
926
1194
  }
1195
+ /**
1196
+ * 当选择项的文本发生变化时,更新对应的值
1197
+ * @param event 输入事件对象
1198
+ * @param index 选择项的索引位置
1199
+ * @description 如果选择项已有Value值则不处理,否则将中文文本转换为拼音作为Value值
1200
+ */
927
1201
  textChange(event, index) {
928
- let SelectOptionsItem = this.SelectOptions.at(index);
929
- let value = event.target.value;
930
- if (SelectOptionsItem.get('Value').value)
1202
+ const SelectOptionsItem = this.SelectOptions.at(index);
1203
+ const value = event.target.value;
1204
+ if (SelectOptionsItem.get('Value')?.value)
931
1205
  return;
932
1206
  SelectOptionsItem.patchValue({
933
- Value: this._DfApiService.chineseToPinyin(value),
1207
+ Value: structuredClone(value),
934
1208
  });
935
1209
  }
1210
+ /**调整表格位置 */
1211
+ drop(event) {
1212
+ moveItemInArray(this.SelectOptions.controls, event.previousIndex, event.currentIndex);
1213
+ this.SelectOptions.updateValueAndValidity();
1214
+ }
936
1215
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectConfigComponent, deps: [{ token: i1.FormBuilder }, { token: DfApiService }], target: i0.ɵɵFactoryTarget.Component }); }
937
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectConfigComponent, selector: "df-select-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, 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-3\">\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::Selected' | 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-3\">\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-3\">\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" }] }); }
1216
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectConfigComponent, selector: "df-select-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::SelectListItem' | abpLocalization}}</label>\n <table class=\"table drag-table\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'AbpDynamicForm::SelectListItemText' | abpLocalization}}</th>\n <th scope=\"col\">{{'AbpDynamicForm::SelectListItemValue' | abpLocalization}}</th>\n <th scope=\"col\">{{'AbpDynamicForm::Selected' | abpLocalization}}</th>\n <th scope=\"col\" style=\"width: 1%;\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" (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\" cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"Text\" required\n (change)=\"textChange($event,i)\"></td>\n <td><input type=\"text\" class=\"form-control\" required formControlName=\"Value\"></td>\n <td>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Selected\"\n id=\"selected\">\n </div>\n </td>\n <td scope=\"row\" style=\"width: 1%;\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" (click.stop)=\"deleteSelectOptions(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::NullText' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Select.NullText\">\n </div>\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Select.Multiple\" id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'AbpDynamicForm::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: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
938
1217
  }
939
1218
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectConfigComponent, decorators: [{
940
1219
  type: Component,
941
- args: [{ selector: 'df-select-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\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::Selected' | 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-3\">\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-3\">\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>" }]
1220
+ args: [{ selector: 'df-select-config', template: "<form [formGroup]=\"formEntity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::SelectListItem' | abpLocalization}}</label>\n <table class=\"table drag-table\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'AbpDynamicForm::SelectListItemText' | abpLocalization}}</th>\n <th scope=\"col\">{{'AbpDynamicForm::SelectListItemValue' | abpLocalization}}</th>\n <th scope=\"col\">{{'AbpDynamicForm::Selected' | abpLocalization}}</th>\n <th scope=\"col\" style=\"width: 1%;\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" (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\" cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"Text\" required\n (change)=\"textChange($event,i)\"></td>\n <td><input type=\"text\" class=\"form-control\" required formControlName=\"Value\"></td>\n <td>\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Selected\"\n id=\"selected\">\n </div>\n </td>\n <td scope=\"row\" style=\"width: 1%;\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" (click.stop)=\"deleteSelectOptions(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::NullText' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Select.NullText\">\n </div>\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Select.Multiple\" id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'AbpDynamicForm::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>" }]
942
1221
  }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: DfApiService }], propDecorators: { type: [{
943
1222
  type: Input
944
1223
  }], selected: [{
@@ -950,11 +1229,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
950
1229
  args: ['submitclick', { static: true }]
951
1230
  }] } });
952
1231
 
1232
+ /* eslint-disable @angular-eslint/component-selector */
953
1233
  class SelectControlComponent {
954
1234
  constructor(fb) {
955
1235
  this.fb = fb;
956
1236
  /**字段配置列表 */
957
1237
  this._fields = '';
1238
+ /**父级字段名称,用于为表单设置控件赋值 */
1239
+ this._selected = [];
958
1240
  this.cdr = inject(ChangeDetectorRef);
959
1241
  this.formConfiguration = '';
960
1242
  }
@@ -965,7 +1247,7 @@ class SelectControlComponent {
965
1247
  this._parentFiledName = v;
966
1248
  }
967
1249
  set selected(v) {
968
- this._selected = v;
1250
+ this._selected = v || [];
969
1251
  }
970
1252
  set entity(v) {
971
1253
  this._entity = v;
@@ -984,24 +1266,28 @@ class SelectControlComponent {
984
1266
  }
985
1267
  AfterInit() {
986
1268
  return new Promise((resolve, rejects) => {
987
- let ValidatorsArray = [];
1269
+ const ValidatorsArray = [];
988
1270
  if (this._fields.required) {
989
1271
  ValidatorsArray.push(Validators.required);
990
1272
  }
991
1273
  this.formConfiguration = this._fields.field.formConfiguration;
992
- if (!this._selected) {
993
- const isMultiple = this.formConfiguration['Select.Multiple'];
994
- let selectValue = isMultiple ? [] : '';
995
- this.formConfiguration['Select.Options'].forEach(el => {
996
- if (el.Selected) {
997
- selectValue = isMultiple
998
- ? [...selectValue, el.value || el.Value]
999
- : [el.value || el.Value];
1274
+ const isMultiple = this.formConfiguration['Select.Multiple'];
1275
+ let selectValue = isMultiple ? [] : [];
1276
+ for (const element of this.formConfiguration['Select.Options']) {
1277
+ for (const key in element) {
1278
+ const item = element[key];
1279
+ const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
1280
+ element[capitalizedKey] = item;
1281
+ }
1282
+ if (!this._selected) {
1283
+ if (Array.isArray(this._selected) && element.Selected && this._selected.length === 0) {
1284
+ selectValue = isMultiple ? [...selectValue, element.Value] : [element.Value];
1285
+ this._selected = selectValue;
1000
1286
  }
1001
- });
1002
- this._selected = selectValue;
1287
+ }
1003
1288
  }
1004
- let newControl = this.fb.control(this._selected, ValidatorsArray);
1289
+ // this._selected = selectValue;
1290
+ const newControl = this.fb.control(this._selected, ValidatorsArray);
1005
1291
  this.extraProperties.setControl(this._fields.field.name, newControl);
1006
1292
  resolve(true);
1007
1293
  });
@@ -1012,11 +1298,11 @@ class SelectControlComponent {
1012
1298
  this.extraProperties.removeControl(this._fields.field.name);
1013
1299
  }
1014
1300
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1015
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectControlComponent, selector: "df-select-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <nz-select class=\"form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\n nzShowSearch nzMode=\"multiple\"\n formControlName=\"{{_fields.field.name}}\">\n <nz-option *ngFor=\"let item of _fields.field.formConfiguration['Select.Options']\"\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\" formControlName=\"{{_fields.field.name}}\">\n <option [value]=\"\">{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of _fields.field.formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\">{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["::ng-deep .selectcontrol nz-select{width:100%}::ng-deep .selectcontrol nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.275rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .selectcontrol nz-select .anticon-search,::ng-deep .selectcontrol nz-select .anticon-down{display:none}::ng-deep .selectcontrol .ant-select-multiple .ant-select-selection-item{max-width:40%!important}::ng-deep .was-validated .form-select-multiple{border-color:#4fbf67;padding-right:calc(1.5em + 1.35rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%234fbf67' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .3375rem) center;background-size:calc(.75em + .675rem) calc(.75em + .675rem)}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }] }); }
1301
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectControlComponent, selector: "df-select-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <nz-select class=\"form-select dignite-form-select\" [nzMaxTagCount]=\"1\"\n nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Select.NullText']\"\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\" [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\n <nz-option *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options']\"\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\" formControlName=\"{{_fields.field.name}}\">\n <option [value]=\"''\">{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\">{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }] }); }
1016
1302
  }
1017
1303
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectControlComponent, decorators: [{
1018
1304
  type: Component,
1019
- args: [{ selector: 'df-select-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <nz-select class=\"form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\n nzShowSearch nzMode=\"multiple\"\n formControlName=\"{{_fields.field.name}}\">\n <nz-option *ngFor=\"let item of _fields.field.formConfiguration['Select.Options']\"\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\" formControlName=\"{{_fields.field.name}}\">\n <option [value]=\"\">{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of _fields.field.formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\">{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["::ng-deep .selectcontrol nz-select{width:100%}::ng-deep .selectcontrol nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.275rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .selectcontrol nz-select .anticon-search,::ng-deep .selectcontrol nz-select .anticon-down{display:none}::ng-deep .selectcontrol .ant-select-multiple .ant-select-selection-item{max-width:40%!important}::ng-deep .was-validated .form-select-multiple{border-color:#4fbf67;padding-right:calc(1.5em + 1.35rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%234fbf67' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .3375rem) center;background-size:calc(.75em + .675rem) calc(.75em + .675rem)}\n"] }]
1305
+ args: [{ selector: 'df-select-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\n <nz-select class=\"form-select dignite-form-select\" [nzMaxTagCount]=\"1\"\n nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Select.NullText']\"\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\" [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\n <nz-option *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options']\"\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\n </nz-select>\n </ng-container>\n <ng-template #elseTemplate>\n <select class=\"form-select\" [multiple]=\"false\" formControlName=\"{{_fields.field.name}}\">\n <option [value]=\"''\">{{formConfiguration['Select.NullText']}}</option>\n <ng-container *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options'];let i =index\">\n <option [value]=\"item.Value\">{{item.Text}}</option>\n </ng-container>\n </select>\n </ng-template>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
1020
1306
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
1021
1307
  type: Input
1022
1308
  }], parentFiledName: [{
@@ -1030,84 +1316,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1030
1316
  args: ['submitclick', { static: true }]
1031
1317
  }] } });
1032
1318
 
1033
- class SelectViewComponent {
1034
- constructor() {
1035
- /**展示则内容 */
1036
- this.showValue = '';
1037
- /**是否显示再列表 */
1038
- this.showInList = false;
1039
- /**表单控件Value */
1040
- this._value = '';
1319
+ /* eslint-disable @angular-eslint/component-selector */
1320
+ class SelectSearchComponent {
1321
+ constructor(fb) {
1322
+ this.fb = fb;
1323
+ /**字段配置列表 */
1324
+ this._fields = '';
1325
+ this.cdr = inject(ChangeDetectorRef);
1326
+ this.formConfiguration = '';
1041
1327
  }
1042
- set value(v) {
1043
- this._value = v;
1328
+ set fields(v) {
1329
+ this._fields = v;
1044
1330
  }
1045
- async ngAfterContentInit() {
1046
- //Called after ngOnInit when the component's or directive's content has been initialized.
1047
- //Add 'implements AfterContentInit' to the class.
1048
- let valueOptions = this._value;
1049
- if (this.type && valueOptions) {
1050
- if (Array.isArray(valueOptions)) {
1051
- this.showValue = valueOptions.join(',');
1052
- }
1053
- else {
1054
- this.showValue = valueOptions;
1055
- }
1056
- }
1331
+ set parentFiledName(v) {
1332
+ this._parentFiledName = v;
1057
1333
  }
1058
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1059
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: SelectViewComponent, selector: "df-select-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1060
- }
1061
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, decorators: [{
1062
- type: Component,
1063
- args: [{ selector: 'df-select-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
1064
- }], propDecorators: { showInList: [{
1065
- type: Input
1066
- }], fields: [{
1067
- type: Input
1068
- }], type: [{
1069
- type: Input
1070
- }], value: [{
1071
- type: Input
1072
- }] } });
1073
-
1074
- class SwitchViewComponent {
1075
- constructor() {
1076
- /**展示则内容 */
1077
- this.showValue = '';
1078
- /**是否显示再列表 */
1079
- this.showInList = false;
1080
- /**表单控件Value */
1081
- this._value = '';
1334
+ set selected(v) {
1335
+ this._selected = v;
1082
1336
  }
1083
- set value(v) {
1084
- this._value = v;
1337
+ set entity(v) {
1338
+ this._entity = v;
1339
+ this.dataLoaded();
1085
1340
  }
1086
- async ngAfterContentInit() {
1087
- //Called after ngOnInit when the component's or directive's content has been initialized.
1088
- //Add 'implements AfterContentInit' to the class.
1089
- let valueOptions = this._value;
1090
- if (this.type && valueOptions) {
1091
- this.showValue = valueOptions;
1341
+ get extraProperties() {
1342
+ return this._entity?.get('extraProperties');
1343
+ }
1344
+ /**数据加载完成 */
1345
+ async dataLoaded() {
1346
+ if (this._fields && this._entity) {
1347
+ await this.AfterInit();
1348
+ this.cdr.detectChanges(); // 手动触发变更检测
1349
+ this.submitclick?.nativeElement?.click();
1092
1350
  }
1093
1351
  }
1094
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1095
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: SwitchViewComponent, selector: "df-switch-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
1352
+ AfterInit() {
1353
+ return new Promise((resolve, rejects) => {
1354
+ const ValidatorsArray = [];
1355
+ this.formConfiguration = this._fields.field.formConfiguration;
1356
+ const isMultiple = this.formConfiguration['Select.Multiple'];
1357
+ const selectValue = isMultiple ? [] : [];
1358
+ for (const element of this.formConfiguration['Select.Options']) {
1359
+ for (const key in element) {
1360
+ const item = element[key];
1361
+ const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
1362
+ element[capitalizedKey] = item;
1363
+ }
1364
+ // if (this._selected) {
1365
+ // if (Array.isArray(this._selected) && element.Selected && this._selected.length === 0) {
1366
+ // selectValue = isMultiple ? [...selectValue, element.Value] : [element.Value];
1367
+ // }
1368
+ // }
1369
+ }
1370
+ this._selected = selectValue;
1371
+ const newControl = this.fb.control(this._selected, ValidatorsArray);
1372
+ this.extraProperties.setControl(this._fields.field.name, newControl);
1373
+ resolve(true);
1374
+ });
1375
+ }
1376
+ changeValue(event) {
1377
+ const selectvalue = this.extraProperties.get(this._fields.field.name).value;
1378
+ if (selectvalue[0] === '') {
1379
+ this.extraProperties.get(this._fields.field.name).setValue([]);
1380
+ }
1381
+ }
1382
+ ngOnDestroy() {
1383
+ //Called once, before the instance is destroyed.
1384
+ //Add 'implements OnDestroy' to the class.
1385
+ this.extraProperties.removeControl(this._fields.field.name);
1386
+ }
1387
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1388
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SelectSearchComponent, selector: "df-select-search", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select\" [nzMaxTagCount]=\"1\"\r\n nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Select.NullText']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\" [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options']\"\r\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <select class=\"form-select\" [multiple]=\"false\" [placeholder]=\"formConfiguration['Select.NullText']\" formControlName=\"{{_fields.field.name}}\" (change)=\"changeValue($event)\">\r\n <option [value]=\"''\">{{formConfiguration['Select.NullText']}}</option>\r\n <ng-container *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options'];let i =index\">\r\n <option [value]=\"item.Value\">{{item.Text}}</option>\r\n </ng-container>\r\n </select>\r\n </ng-template>\r\n <!-- <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small> -->\r\n </div>\r\n\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\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"] }, { kind: "component", type: i4.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }] }); }
1096
1389
  }
1097
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SwitchViewComponent, decorators: [{
1390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectSearchComponent, decorators: [{
1098
1391
  type: Component,
1099
- args: [{ selector: 'df-switch-view', template: "@if(showInList){\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{'AbpUi::'+(showValue ? 'Yes' : 'No') | abpLocalization}}\r\n </div>\r\n</div>\r\n}" }]
1100
- }], propDecorators: { showInList: [{
1392
+ args: [{ selector: 'df-select-search', template: "<form [formGroup]=\"_entity\">\r\n <div formGroupName=\"extraProperties\" class=\"selectcontrol\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"formConfiguration['Select.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select\" [nzMaxTagCount]=\"1\"\r\n nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Select.NullText']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\" [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options']\"\r\n [nzLabel]=\"item.Text\" [nzValue]=\"item.Value\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <select class=\"form-select\" [multiple]=\"false\" [placeholder]=\"formConfiguration['Select.NullText']\" formControlName=\"{{_fields.field.name}}\" (change)=\"changeValue($event)\">\r\n <option [value]=\"''\">{{formConfiguration['Select.NullText']}}</option>\r\n <ng-container *ngFor=\"let item of _fields?.field?.formConfiguration['Select.Options'];let i =index\">\r\n <option [value]=\"item.Value\">{{item.Text}}</option>\r\n </ng-container>\r\n </select>\r\n </ng-template>\r\n <!-- <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small> -->\r\n </div>\r\n\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>" }]
1393
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
1101
1394
  type: Input
1102
- }], fields: [{
1395
+ }], parentFiledName: [{
1103
1396
  type: Input
1104
- }], type: [{
1397
+ }], selected: [{
1105
1398
  type: Input
1106
- }], value: [{
1399
+ }], entity: [{
1107
1400
  type: Input
1401
+ }], submitclick: [{
1402
+ type: ViewChild,
1403
+ args: ['submitclick', { static: true }]
1108
1404
  }] } });
1109
1405
 
1110
- class TextEditViewComponent {
1406
+ /* eslint-disable @angular-eslint/component-selector */
1407
+ class SelectViewComponent {
1111
1408
  constructor() {
1112
1409
  /**展示则内容 */
1113
1410
  this.showValue = '';
@@ -1122,17 +1419,22 @@ class TextEditViewComponent {
1122
1419
  async ngAfterContentInit() {
1123
1420
  //Called after ngOnInit when the component's or directive's content has been initialized.
1124
1421
  //Add 'implements AfterContentInit' to the class.
1125
- let valueOptions = this._value;
1422
+ const valueOptions = this._value;
1126
1423
  if (this.type && valueOptions) {
1127
- this.showValue = valueOptions;
1424
+ if (Array.isArray(valueOptions)) {
1425
+ this.showValue = valueOptions.join(',');
1426
+ }
1427
+ else {
1428
+ this.showValue = valueOptions;
1429
+ }
1128
1430
  }
1129
1431
  }
1130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: TextEditViewComponent, selector: "df-text-edit-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1432
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1433
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: SelectViewComponent, selector: "df-select-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1132
1434
  }
1133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TextEditViewComponent, decorators: [{
1435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectViewComponent, decorators: [{
1134
1436
  type: Component,
1135
- args: [{ selector: 'df-text-edit-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
1437
+ args: [{ selector: 'df-select-view', template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n</div>\r\n}" }]
1136
1438
  }], propDecorators: { showInList: [{
1137
1439
  type: Input
1138
1440
  }], fields: [{
@@ -1154,6 +1456,7 @@ const FieldControlGroup = [
1154
1456
  fieldConfigComponent: TextEditConfigComponent,
1155
1457
  fieldComponent: TextEditComponent,
1156
1458
  fieldViewComponent: TextEditViewComponent,
1459
+ fieldSearchComponent: TextEditSearchComponent,
1157
1460
  },
1158
1461
  {
1159
1462
  displayName: '开关',
@@ -1161,6 +1464,7 @@ const FieldControlGroup = [
1161
1464
  fieldConfigComponent: SwitchConfigComponent,
1162
1465
  fieldComponent: SwitchControlComponent,
1163
1466
  fieldViewComponent: SwitchViewComponent,
1467
+ fieldSearchComponent: SwitchSearchComponent,
1164
1468
  },
1165
1469
  {
1166
1470
  displayName: '选择',
@@ -1168,6 +1472,7 @@ const FieldControlGroup = [
1168
1472
  fieldConfigComponent: SelectConfigComponent,
1169
1473
  fieldComponent: SelectControlComponent,
1170
1474
  fieldViewComponent: SelectViewComponent,
1475
+ fieldSearchComponent: SelectSearchComponent,
1171
1476
  },
1172
1477
  {
1173
1478
  displayName: '数字',
@@ -1175,6 +1480,7 @@ const FieldControlGroup = [
1175
1480
  fieldConfigComponent: NumbericEditConfigComponent,
1176
1481
  fieldComponent: NumbericEditControlComponent,
1177
1482
  fieldViewComponent: NumericEditViewComponent,
1483
+ fieldSearchComponent: NumericEditSearchComponent,
1178
1484
  },
1179
1485
  {
1180
1486
  displayName: '日期',
@@ -1184,9 +1490,9 @@ const FieldControlGroup = [
1184
1490
  fieldViewComponent: DateEditViewComponent,
1185
1491
  },
1186
1492
  ];
1187
- function AddFieldControlGroup(array = []) {
1493
+ function addFieldControlGroup(array = []) {
1188
1494
  for (const element of array) {
1189
- let find = FieldControlGroup.find((control) => {
1495
+ const find = FieldControlGroup.find((control) => {
1190
1496
  return control.name === element.name;
1191
1497
  });
1192
1498
  if (!find) {
@@ -1196,6 +1502,12 @@ function AddFieldControlGroup(array = []) {
1196
1502
  return FieldControlGroup;
1197
1503
  }
1198
1504
 
1505
+ /* eslint-disable no-unsafe-optional-chaining */
1506
+ /* eslint-disable @angular-eslint/component-selector */
1507
+ /**
1508
+ * 丢弃
1509
+ * @deprecated
1510
+ */
1199
1511
  class DynamicComponent {
1200
1512
  set selected(v) {
1201
1513
  this._selected = v === undefined ? '' : v === null ? '' : v;
@@ -1227,16 +1539,16 @@ class DynamicComponent {
1227
1539
  }
1228
1540
  /**数据加载完成 */
1229
1541
  async dataLoaded(val) {
1230
- let _fieldControlGroup = AddFieldControlGroup(this.mergedConfig);
1542
+ const _fieldControlGroup = addFieldControlGroup(this.mergedConfig);
1231
1543
  if (this._entity) {
1232
1544
  //加载所有的动态表单组件
1233
1545
  if (this._type) {
1234
- let fieldControlItem = _fieldControlGroup.find(el => el.name === this._type);
1546
+ const fieldControlItem = _fieldControlGroup.find(el => el.name === this._type);
1235
1547
  this.loadfieldConfigComponent(fieldControlItem);
1236
1548
  }
1237
1549
  if (this._fields && this._parentFiledName && this._culture) {
1238
1550
  /**表单控件组中的项 */
1239
- let fieldControlItem = _fieldControlGroup.find(el => el.name === this._fields?.field?.formControlName);
1551
+ const fieldControlItem = _fieldControlGroup.find(el => el.name === this._fields?.field?.formControlName);
1240
1552
  this.loadfieldComponent(fieldControlItem);
1241
1553
  }
1242
1554
  }
@@ -1271,11 +1583,11 @@ class DynamicComponent {
1271
1583
  instance.entity = this._entity;
1272
1584
  }
1273
1585
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, deps: [{ token: 'MERGED_FORM_CONFIG' }], target: i0.ɵɵFactoryTarget.Component }); }
1274
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicComponent, selector: "df-dynamic", inputs: { selected: "selected", type: "type", culture: "culture", parentFiledName: "parentFiledName", fields: "fields", entity: "entity" }, 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: [""] }); }
1586
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicComponent, selector: "df-dynamic", inputs: { selected: "selected", type: "type", culture: "culture", parentFiledName: "parentFiledName", fields: "fields", entity: "entity" }, 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: "\n<div [formGroup]=\"_entity\">\n <template #FormControlRef></template>\n <template #FormComponentsRef></template>\n</div>\n\n", styles: [""], dependencies: [{ 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: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }] }); }
1275
1587
  }
1276
1588
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicComponent, decorators: [{
1277
1589
  type: Component,
1278
- args: [{ selector: 'df-dynamic', template: "<template #FormControlRef></template>\n<template #FormComponentsRef></template>" }]
1590
+ args: [{ selector: 'df-dynamic', template: "\n<div [formGroup]=\"_entity\">\n <template #FormControlRef></template>\n <template #FormComponentsRef></template>\n</div>\n\n" }]
1279
1591
  }], ctorParameters: () => [{ type: undefined, decorators: [{
1280
1592
  type: Inject,
1281
1593
  args: ['MERGED_FORM_CONFIG']
@@ -1299,15 +1611,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1299
1611
  args: ['FormComponentsRef', { read: ViewContainerRef, static: true }]
1300
1612
  }] } });
1301
1613
 
1614
+ /**
1615
+ * 表单控件服务
1616
+ * @description 用于获取表单所有控件的配置信息
1617
+ */
1302
1618
  class FormControlService {
1303
1619
  constructor(mergedConfig) {
1304
1620
  this.mergedConfig = mergedConfig;
1305
1621
  this._FieldControlGroup = FieldControlGroup;
1306
1622
  }
1307
- AddFieldControlGroup() {
1308
- let array = this.mergedConfig;
1623
+ addFieldControlGroup() {
1624
+ const array = this.mergedConfig;
1309
1625
  for (const element of array) {
1310
- let find = FieldControlGroup.find(control => {
1626
+ const find = FieldControlGroup.find(control => {
1311
1627
  return control.name === element.name;
1312
1628
  });
1313
1629
  if (!find) {
@@ -1329,6 +1645,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1329
1645
  args: ['MERGED_FORM_CONFIG']
1330
1646
  }] }] });
1331
1647
 
1648
+ /* eslint-disable no-unsafe-optional-chaining */
1649
+ /* eslint-disable @angular-eslint/component-selector */
1332
1650
  class DynamicViewComponent {
1333
1651
  constructor(_FormControlService) {
1334
1652
  this._FormControlService = _FormControlService;
@@ -1344,9 +1662,9 @@ class DynamicViewComponent {
1344
1662
  ngAfterContentInit() {
1345
1663
  //Called after ngOnInit when the component's or directive's content has been initialized.
1346
1664
  //Add 'implements AfterContentInit' to the class.
1347
- if (this.type && this._value) {
1348
- let _fieldControlGroup = this._FormControlService.AddFieldControlGroup();
1349
- let fieldControlItem = _fieldControlGroup.find(el => el.name === this.type);
1665
+ if (this.type && this._value !== '') {
1666
+ const _fieldControlGroup = this._FormControlService.addFieldControlGroup();
1667
+ const fieldControlItem = _fieldControlGroup.find(el => el.name === this.type);
1350
1668
  this.loadViewComponent(fieldControlItem);
1351
1669
  }
1352
1670
  }
@@ -1383,23 +1701,213 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1383
1701
  args: ['FormTemplateRef', { read: ViewContainerRef, static: true }]
1384
1702
  }] } });
1385
1703
 
1704
+ /* eslint-disable no-unsafe-optional-chaining */
1705
+ /* eslint-disable @angular-eslint/component-selector */
1386
1706
  class DynamicConfigComponent {
1387
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1388
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicConfigComponent, selector: "df-dynamic-config", ngImport: i0, template: "<p>dynamic-config works!</p>\r\n", styles: [""] }); }
1707
+ constructor(mergedConfig) {
1708
+ this.mergedConfig = mergedConfig;
1709
+ this.formControlName = '';
1710
+ }
1711
+ set type(v) {
1712
+ this.formControlName = v;
1713
+ }
1714
+ set form(v) {
1715
+ this.formEntity = v;
1716
+ }
1717
+ get formControlNameInput() {
1718
+ return this.formEntity.get('formControlName');
1719
+ }
1720
+ ngAfterContentInit() {
1721
+ this.loadfieldConfigComponent(this.formControlName);
1722
+ this.formControlNameInput?.valueChanges.subscribe((res) => {
1723
+ this.loadfieldConfigComponent(res);
1724
+ });
1725
+ }
1726
+ /**加载动态表单配置组件 */
1727
+ loadfieldConfigComponent(formControlName) {
1728
+ const _fieldControlGroup = addFieldControlGroup(this.mergedConfig);
1729
+ const fieldControlItem = _fieldControlGroup.find(el => el.name === formControlName);
1730
+ //清空了容器中的所有组件
1731
+ this.FormconfigRef?.clear();
1732
+ if (!fieldControlItem || !fieldControlItem.fieldConfigComponent)
1733
+ return;
1734
+ //在容器中创建组件
1735
+ const { instance } = this.FormconfigRef?.createComponent(fieldControlItem.fieldConfigComponent); //创建组件模板
1736
+ // /**向创建的组件模板中传值 */
1737
+ instance.selected = this.selected;
1738
+ instance.type = formControlName;
1739
+ instance.Entity = this.formEntity;
1740
+ }
1741
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, deps: [{ token: 'MERGED_FORM_CONFIG' }], target: i0.ɵɵFactoryTarget.Component }); }
1742
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicConfigComponent, selector: "df-dynamic-config", inputs: { type: "type", selected: "selected", form: "form" }, viewQueries: [{ propertyName: "FormconfigRef", first: true, predicate: ["FormconfigRef"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: " <template #FormconfigRef></template>", styles: [""] }); }
1389
1743
  }
1390
1744
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicConfigComponent, decorators: [{
1391
1745
  type: Component,
1392
- args: [{ selector: 'df-dynamic-config', template: "<p>dynamic-config works!</p>\r\n" }]
1393
- }] });
1746
+ args: [{ selector: 'df-dynamic-config', template: " <template #FormconfigRef></template>" }]
1747
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1748
+ type: Inject,
1749
+ args: ['MERGED_FORM_CONFIG']
1750
+ }] }], propDecorators: { type: [{
1751
+ type: Input
1752
+ }], selected: [{
1753
+ type: Input
1754
+ }], form: [{
1755
+ type: Input
1756
+ }], FormconfigRef: [{
1757
+ type: ViewChild,
1758
+ args: ['FormconfigRef', { read: ViewContainerRef, static: true }]
1759
+ }] } });
1394
1760
 
1761
+ /* eslint-disable no-unsafe-optional-chaining */
1762
+ /* eslint-disable @angular-eslint/component-selector */
1395
1763
  class DynamicControlComponent {
1396
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1397
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicControlComponent, selector: "df-dynamic-control", ngImport: i0, template: "<p>dynamic-control works!</p>\r\n", styles: [""] }); }
1764
+ set selected(v) {
1765
+ this._selected = v === undefined ? '' : v === null ? '' : v;
1766
+ }
1767
+ set culture(v) {
1768
+ this._culture = v;
1769
+ }
1770
+ set parentFiledName(v) {
1771
+ this._parentFiledName = v;
1772
+ }
1773
+ set fields(v) {
1774
+ this._fields = v;
1775
+ }
1776
+ set entity(v) {
1777
+ if (v) {
1778
+ this._entity = v;
1779
+ // this.dataLoaded(3);
1780
+ }
1781
+ }
1782
+ constructor(mergedConfig) {
1783
+ this.mergedConfig = mergedConfig;
1784
+ /**字段配置列表 */
1785
+ this._fields = '';
1786
+ }
1787
+ ngAfterContentInit() {
1788
+ this.loadfieldComponent(this._fields?.field?.formControlName);
1789
+ }
1790
+ // /**数据加载完成 */
1791
+ // async dataLoaded() {
1792
+ // const _fieldControlGroup: any[] = addFieldControlGroup(this.mergedConfig);
1793
+ // if (this._entity) {
1794
+ // //加载所有的动态表单组件
1795
+ // if (this._fields && this._parentFiledName && this._culture) {
1796
+ // /**表单控件组中的项 */
1797
+ // const fieldControlItem = _fieldControlGroup.find(
1798
+ // el => el.name === this._fields?.field?.formControlName,
1799
+ // );
1800
+ // this.loadfieldComponent(fieldControlItem);
1801
+ // }
1802
+ // }
1803
+ // }
1804
+ /**加载动态表单组件 */
1805
+ loadfieldComponent(formControlName) {
1806
+ const _fieldControlGroup = addFieldControlGroup(this.mergedConfig);
1807
+ /**表单控件组中的项 */
1808
+ const fieldControlItem = _fieldControlGroup.find(el => el.name === formControlName);
1809
+ //清空了容器中的所有组件
1810
+ this.FormComponentsRef?.clear();
1811
+ if (!fieldControlItem || !fieldControlItem.fieldComponent)
1812
+ return;
1813
+ //在容器中创建组件
1814
+ const { instance } = this.FormComponentsRef?.createComponent(fieldControlItem.fieldComponent); //创建组件模板
1815
+ /**向创建的组件模板中传值 */
1816
+ instance.fields = this._fields;
1817
+ instance.parentFiledName = this._parentFiledName;
1818
+ instance.selected = this._selected;
1819
+ instance.culture = this._culture;
1820
+ instance.entity = this._entity;
1821
+ }
1822
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, deps: [{ token: 'MERGED_FORM_CONFIG' }], target: i0.ɵɵFactoryTarget.Component }); }
1823
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicControlComponent, selector: "df-dynamic-control", inputs: { selected: "selected", culture: "culture", parentFiledName: "parentFiledName", fields: "fields", entity: "entity" }, 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 #FormComponentsRef></template>", styles: [""] }); }
1398
1824
  }
1399
1825
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicControlComponent, decorators: [{
1400
1826
  type: Component,
1401
- args: [{ selector: 'df-dynamic-control', template: "<p>dynamic-control works!</p>\r\n" }]
1402
- }] });
1827
+ args: [{ selector: 'df-dynamic-control', template: "<template #FormComponentsRef></template>" }]
1828
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1829
+ type: Inject,
1830
+ args: ['MERGED_FORM_CONFIG']
1831
+ }] }], propDecorators: { selected: [{
1832
+ type: Input
1833
+ }], culture: [{
1834
+ type: Input
1835
+ }], parentFiledName: [{
1836
+ type: Input
1837
+ }], fields: [{
1838
+ type: Input
1839
+ }], entity: [{
1840
+ type: Input
1841
+ }], FormControlRef: [{
1842
+ type: ViewChild,
1843
+ args: ['FormControlRef', { read: ViewContainerRef, static: true }]
1844
+ }], FormComponentsRef: [{
1845
+ type: ViewChild,
1846
+ args: ['FormComponentsRef', { read: ViewContainerRef, static: true }]
1847
+ }] } });
1848
+
1849
+ /* eslint-disable @angular-eslint/component-selector */
1850
+ class DynamicSearchComponent {
1851
+ constructor(_FormControlService) {
1852
+ this._FormControlService = _FormControlService;
1853
+ /**字段配置列表 */
1854
+ this._fields = '';
1855
+ }
1856
+ set culture(v) {
1857
+ this._culture = v;
1858
+ }
1859
+ set parentFiledName(v) {
1860
+ this._parentFiledName = v;
1861
+ }
1862
+ set fields(v) {
1863
+ this._fields = v;
1864
+ }
1865
+ set entity(v) {
1866
+ if (v) {
1867
+ this._entity = v;
1868
+ }
1869
+ }
1870
+ ngAfterContentInit() {
1871
+ //Called after ngOnInit when the component's or directive's content has been initialized.
1872
+ //Add 'implements AfterContentInit' to the class.
1873
+ if (this._fields && this._entity && this._culture) {
1874
+ let _fieldControlGroup = this._FormControlService.addFieldControlGroup();
1875
+ let fieldControlItem = _fieldControlGroup.find(el => el.name === this._fields?.field?.formControlName);
1876
+ this.loadComponent(fieldControlItem);
1877
+ }
1878
+ }
1879
+ /**加载动态展示组件 */
1880
+ loadComponent(FieldControlItem) {
1881
+ //清空了容器中的所有组件
1882
+ this.FormSearchTemplateRef?.clear();
1883
+ if (!FieldControlItem || !FieldControlItem.fieldSearchComponent)
1884
+ return;
1885
+ //在容器中创建组件
1886
+ const { instance } = this.FormSearchTemplateRef?.createComponent(FieldControlItem.fieldSearchComponent); //创建组件模板
1887
+ /**向创建的组件模板中传值 */
1888
+ instance.fields = this._fields;
1889
+ instance.parentFiledName = this._parentFiledName;
1890
+ instance.culture = this._culture;
1891
+ instance.entity = this._entity;
1892
+ }
1893
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicSearchComponent, deps: [{ token: FormControlService }], target: i0.ɵɵFactoryTarget.Component }); }
1894
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: DynamicSearchComponent, selector: "df-dynamic-search", inputs: { culture: "culture", parentFiledName: "parentFiledName", fields: "fields", entity: "entity" }, viewQueries: [{ propertyName: "FormSearchTemplateRef", first: true, predicate: ["FormSearchTemplateRef"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<template #FormSearchTemplateRef></template>", styles: [""] }); }
1895
+ }
1896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicSearchComponent, decorators: [{
1897
+ type: Component,
1898
+ args: [{ selector: 'df-dynamic-search', template: "<template #FormSearchTemplateRef></template>" }]
1899
+ }], ctorParameters: () => [{ type: FormControlService }], propDecorators: { culture: [{
1900
+ type: Input
1901
+ }], parentFiledName: [{
1902
+ type: Input
1903
+ }], fields: [{
1904
+ type: Input
1905
+ }], entity: [{
1906
+ type: Input
1907
+ }], FormSearchTemplateRef: [{
1908
+ type: ViewChild,
1909
+ args: ['FormSearchTemplateRef', { read: ViewContainerRef, static: true }]
1910
+ }] } });
1403
1911
 
1404
1912
  class DynamicFormModule {
1405
1913
  static forRoot(config) {
@@ -1427,31 +1935,52 @@ class DynamicFormModule {
1427
1935
  SwitchViewComponent,
1428
1936
  TextEditViewComponent,
1429
1937
  DateEditViewComponent,
1430
- NumericEditViewComponent], imports: [FormsModule,
1938
+ NumericEditViewComponent,
1939
+ DynamicSearchComponent,
1940
+ SelectSearchComponent,
1941
+ TextEditSearchComponent,
1942
+ SwitchSearchComponent,
1943
+ NumericEditSearchComponent], imports: [FormsModule,
1431
1944
  CoreModule,
1432
1945
  ThemeSharedModule,
1433
1946
  ReactiveFormsModule,
1434
1947
  NgbDropdownModule,
1435
- NzSelectModule], exports: [TextEditConfigComponent,
1948
+ NzSelectModule,
1949
+ DragDropModule,
1950
+ NgbDatepickerModule,
1951
+ ExtensibleModule
1952
+ // NzTreeModule,
1953
+ ], exports: [TextEditConfigComponent,
1436
1954
  TextEditComponent,
1955
+ TextEditViewComponent,
1437
1956
  SwitchConfigComponent,
1438
1957
  SwitchControlComponent,
1958
+ SwitchViewComponent,
1439
1959
  NumbericEditConfigComponent,
1440
1960
  NumbericEditControlComponent,
1441
1961
  DateEditConfigComponent,
1442
1962
  DateEditControlComponent,
1963
+ DateEditViewComponent,
1443
1964
  SelectConfigComponent,
1444
1965
  SelectControlComponent,
1966
+ SelectViewComponent,
1967
+ SelectSearchComponent,
1445
1968
  DynamicComponent,
1446
1969
  DynamicConfigComponent,
1447
1970
  DynamicViewComponent,
1448
- DynamicControlComponent] }); }
1971
+ DynamicControlComponent,
1972
+ DynamicSearchComponent] }); }
1449
1973
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, imports: [FormsModule,
1450
1974
  CoreModule,
1451
1975
  ThemeSharedModule,
1452
1976
  ReactiveFormsModule,
1453
1977
  NgbDropdownModule,
1454
- NzSelectModule] }); }
1978
+ NzSelectModule,
1979
+ DragDropModule,
1980
+ NgbDatepickerModule,
1981
+ ExtensibleModule
1982
+ // NzTreeModule,
1983
+ ] }); }
1455
1984
  }
1456
1985
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: DynamicFormModule, decorators: [{
1457
1986
  type: NgModule,
@@ -1476,6 +2005,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1476
2005
  TextEditViewComponent,
1477
2006
  DateEditViewComponent,
1478
2007
  NumericEditViewComponent,
2008
+ DynamicSearchComponent,
2009
+ SelectSearchComponent,
2010
+ TextEditSearchComponent,
2011
+ SwitchSearchComponent,
2012
+ NumericEditSearchComponent,
1479
2013
  ],
1480
2014
  imports: [
1481
2015
  FormsModule,
@@ -1484,23 +2018,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1484
2018
  ReactiveFormsModule,
1485
2019
  NgbDropdownModule,
1486
2020
  NzSelectModule,
2021
+ DragDropModule,
2022
+ NgbDatepickerModule,
2023
+ ExtensibleModule
1487
2024
  // NzTreeModule,
1488
2025
  ],
1489
2026
  exports: [
1490
2027
  TextEditConfigComponent,
1491
2028
  TextEditComponent,
2029
+ TextEditViewComponent,
1492
2030
  SwitchConfigComponent,
1493
2031
  SwitchControlComponent,
2032
+ SwitchViewComponent,
1494
2033
  NumbericEditConfigComponent,
1495
2034
  NumbericEditControlComponent,
1496
2035
  DateEditConfigComponent,
1497
2036
  DateEditControlComponent,
2037
+ DateEditViewComponent,
1498
2038
  SelectConfigComponent,
1499
2039
  SelectControlComponent,
2040
+ SelectViewComponent,
2041
+ SelectSearchComponent,
1500
2042
  DynamicComponent,
1501
2043
  DynamicConfigComponent,
1502
2044
  DynamicViewComponent,
1503
2045
  DynamicControlComponent,
2046
+ DynamicSearchComponent
1504
2047
  ],
1505
2048
  providers: [],
1506
2049
  }]
@@ -1514,5 +2057,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1514
2057
  * Generated bundle index. Do not edit.
1515
2058
  */
1516
2059
 
1517
- export { AddFieldControlGroup, DateEditConfigComponent, DateEditControlComponent, DynamicComponent, DynamicConfigComponent, DynamicControlComponent, DynamicFormModule, DynamicViewComponent, FieldControlGroup, NumbericEditConfigComponent, NumbericEditControlComponent, SelectConfigComponent, SelectControlComponent, SwitchConfigComponent, SwitchControlComponent, TextEditComponent, TextEditConfig, TextEditConfigComponent, maxDecimalPlacesValidator };
2060
+ export { DateEditConfigComponent, DateEditControlComponent, DateEditViewComponent, DynamicComponent, DynamicConfigComponent, DynamicControlComponent, DynamicFormModule, DynamicSearchComponent, DynamicViewComponent, FieldControlGroup, NumbericEditConfigComponent, NumbericEditControlComponent, SelectConfigComponent, SelectControlComponent, SelectSearchComponent, SelectViewComponent, SwitchConfigComponent, SwitchControlComponent, SwitchSearchComponent, SwitchViewComponent, TextEditComponent, TextEditConfig, TextEditConfigComponent, TextEditSearchComponent, TextEditViewComponent, addFieldControlGroup, maxDecimalPlacesValidator };
1518
2061
  //# sourceMappingURL=dignite-ng-expand.dynamic-form.mjs.map