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

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
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';
@@ -613,6 +613,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
613
613
  args: ['submitclick', { static: false }]
614
614
  }] } });
615
615
 
616
+ /* eslint-disable @angular-eslint/component-selector */
617
+ /* eslint-disable @typescript-eslint/adjacent-overload-signatures */
616
618
  function maxDecimalPlacesValidator(maxDecimalPlaces) {
617
619
  return (control) => {
618
620
  const value = control.value;
@@ -663,8 +665,8 @@ class NumbericEditControlComponent {
663
665
  }
664
666
  AfterInit() {
665
667
  return new Promise((resolve, rejects) => {
666
- let ValidatorsArray = [];
667
- let formConfiguration = this._fields.field.formConfiguration;
668
+ const ValidatorsArray = [];
669
+ const formConfiguration = this._fields.field.formConfiguration;
668
670
  if (this._fields.required) {
669
671
  ValidatorsArray.push(Validators.required);
670
672
  }
@@ -674,7 +676,7 @@ class NumbericEditControlComponent {
674
676
  if (formConfiguration['NumericEditField.Max']) {
675
677
  ValidatorsArray.push(Validators.max(formConfiguration['NumericEditField.Max']));
676
678
  }
677
- let newControl = this.fb.control(this._selected, ValidatorsArray);
679
+ const newControl = this.fb.control(this._selected, ValidatorsArray);
678
680
  this.extraProperties.setControl(this._fields.field.name, newControl);
679
681
  resolve(true);
680
682
  });
@@ -686,10 +688,10 @@ class NumbericEditControlComponent {
686
688
  }
687
689
  /**数字框输入 */
688
690
  inputchange(event) {
689
- let val = event.target.value;
691
+ const val = event.target.value;
690
692
  const decimalPart = val.toString().split('.')[1] || '';
691
- let formConfiguration = this._fields.field.formConfiguration;
692
- let Decimals = formConfiguration['NumericEditField.Decimals'];
693
+ const formConfiguration = this._fields.field.formConfiguration;
694
+ const Decimals = formConfiguration['NumericEditField.Decimals'];
693
695
  if (decimalPart.length > Decimals) {
694
696
  this.fieldInput?.patchValue(val.slice(0, val.length - (decimalPart.length - 2)));
695
697
  }
@@ -949,6 +951,107 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
949
951
  type: Input
950
952
  }] } });
951
953
 
954
+ /* eslint-disable @angular-eslint/component-selector */
955
+ class NumericEditSearchComponent {
956
+ constructor(fb) {
957
+ this.fb = fb;
958
+ /**字段配置列表 */
959
+ this._fields = '';
960
+ this.cdr = inject(ChangeDetectorRef);
961
+ /**定义number表单用于获取最小值最大值 */
962
+ this.numberForm = new FormGroup({
963
+ min: new FormControl(''),
964
+ max: new FormControl(''),
965
+ });
966
+ this.formConfiguration = '';
967
+ }
968
+ set fields(v) {
969
+ this._fields = v;
970
+ }
971
+ set parentFiledName(v) {
972
+ this._parentFiledName = v;
973
+ }
974
+ set selected(v) {
975
+ this._selected = v;
976
+ }
977
+ set entity(v) {
978
+ this._entity = v;
979
+ this.dataLoaded();
980
+ }
981
+ get extraProperties() {
982
+ return this._entity?.get('extraProperties');
983
+ }
984
+ /**数据加载完成 */
985
+ async dataLoaded() {
986
+ if (this._fields && this._entity) {
987
+ await this.AfterInit();
988
+ this.cdr.detectChanges(); // 手动触发变更检测
989
+ this.submitclick?.nativeElement?.click();
990
+ }
991
+ }
992
+ /**定义动态字符 */
993
+ get numberInput() {
994
+ return this.extraProperties.get(this._fields.field.name);
995
+ }
996
+ get minInput() {
997
+ return this.numberForm.get('min');
998
+ }
999
+ get maxInput() {
1000
+ return this.numberForm.get('max');
1001
+ }
1002
+ AfterInit() {
1003
+ return new Promise(resolve => {
1004
+ const ValidatorsArray = [];
1005
+ this.formConfiguration = this._fields.field.formConfiguration;
1006
+ const newControl = this.fb.control(this._selected, ValidatorsArray);
1007
+ this.extraProperties.setControl(this._fields.field.name, newControl);
1008
+ this.numberForm.valueChanges.subscribe(res => {
1009
+ if (res.min < Number(this.formConfiguration['NumericEditField.Min'])) {
1010
+ this.minInput.patchValue(this.formConfiguration['NumericEditField.Min']);
1011
+ }
1012
+ if (res.min > Number(this.formConfiguration['NumericEditField.Max'])) {
1013
+ this.minInput.patchValue(this.formConfiguration['NumericEditField.Max']);
1014
+ }
1015
+ if ((res.min > res.max) && res.max) {
1016
+ this.minInput.patchValue(res.max);
1017
+ }
1018
+ if (res.max > Number(this.formConfiguration['NumericEditField.Max'])) {
1019
+ this.maxInput.patchValue(this.formConfiguration['NumericEditField.Max']);
1020
+ }
1021
+ if (this.numberForm.valid && res.min && res.max) {
1022
+ this.numberInput.patchValue(`${res.min}-${res.max}`);
1023
+ }
1024
+ else {
1025
+ this.numberInput.patchValue('');
1026
+ }
1027
+ });
1028
+ resolve(true);
1029
+ });
1030
+ }
1031
+ ngOnDestroy() {
1032
+ //Called once, before the instance is destroyed.
1033
+ //Add 'implements OnDestroy' to the class.
1034
+ this.extraProperties.removeControl(this._fields.field.name);
1035
+ }
1036
+ 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 }); }
1037
+ 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"] }] }); }
1038
+ }
1039
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: NumericEditSearchComponent, decorators: [{
1040
+ type: Component,
1041
+ 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>" }]
1042
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
1043
+ type: Input
1044
+ }], parentFiledName: [{
1045
+ type: Input
1046
+ }], selected: [{
1047
+ type: Input
1048
+ }], entity: [{
1049
+ type: Input
1050
+ }], submitclick: [{
1051
+ type: ViewChild,
1052
+ args: ['submitclick', { static: true }]
1053
+ }] } });
1054
+
952
1055
  class NumericEditViewComponent {
953
1056
  constructor() {
954
1057
  /**展示则内容 */
@@ -1257,6 +1360,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1257
1360
  args: ['submitclick', { static: true }]
1258
1361
  }] } });
1259
1362
 
1363
+ /* eslint-disable @angular-eslint/component-selector */
1260
1364
  class SelectSearchComponent {
1261
1365
  constructor(fb) {
1262
1366
  this.fb = fb;
@@ -1291,10 +1395,10 @@ class SelectSearchComponent {
1291
1395
  }
1292
1396
  AfterInit() {
1293
1397
  return new Promise((resolve, rejects) => {
1294
- let ValidatorsArray = [];
1398
+ const ValidatorsArray = [];
1295
1399
  this.formConfiguration = this._fields.field.formConfiguration;
1296
1400
  const isMultiple = this.formConfiguration['Select.Multiple'];
1297
- let selectValue = isMultiple ? [] : [];
1401
+ const selectValue = isMultiple ? [] : [];
1298
1402
  for (const element of this.formConfiguration['Select.Options']) {
1299
1403
  for (const key in element) {
1300
1404
  const item = element[key];
@@ -1308,13 +1412,13 @@ class SelectSearchComponent {
1308
1412
  // }
1309
1413
  }
1310
1414
  this._selected = selectValue;
1311
- let newControl = this.fb.control(this._selected, ValidatorsArray);
1415
+ const newControl = this.fb.control(this._selected, ValidatorsArray);
1312
1416
  this.extraProperties.setControl(this._fields.field.name, newControl);
1313
1417
  resolve(true);
1314
1418
  });
1315
1419
  }
1316
1420
  changeValue(event) {
1317
- let selectvalue = this.extraProperties.get(this._fields.field.name).value;
1421
+ const selectvalue = this.extraProperties.get(this._fields.field.name).value;
1318
1422
  if (selectvalue[0] === '') {
1319
1423
  this.extraProperties.get(this._fields.field.name).setValue([]);
1320
1424
  }
@@ -1325,11 +1429,11 @@ class SelectSearchComponent {
1325
1429
  this.extraProperties.removeControl(this._fields.field.name);
1326
1430
  }
1327
1431
  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 }); }
1328
- 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"] }] }); }
1432
+ 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"] }] }); }
1329
1433
  }
1330
1434
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SelectSearchComponent, decorators: [{
1331
1435
  type: Component,
1332
- 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>" }]
1436
+ 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>" }]
1333
1437
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { fields: [{
1334
1438
  type: Input
1335
1439
  }], parentFiledName: [{
@@ -1419,6 +1523,7 @@ const FieldControlGroup = [
1419
1523
  fieldConfigComponent: NumbericEditConfigComponent,
1420
1524
  fieldComponent: NumbericEditControlComponent,
1421
1525
  fieldViewComponent: NumericEditViewComponent,
1526
+ fieldSearchComponent: NumericEditSearchComponent,
1422
1527
  },
1423
1528
  {
1424
1529
  displayName: '日期',
@@ -1430,7 +1535,7 @@ const FieldControlGroup = [
1430
1535
  ];
1431
1536
  function AddFieldControlGroup(array = []) {
1432
1537
  for (const element of array) {
1433
- let find = FieldControlGroup.find((control) => {
1538
+ const find = FieldControlGroup.find((control) => {
1434
1539
  return control.name === element.name;
1435
1540
  });
1436
1541
  if (!find) {
@@ -1739,7 +1844,8 @@ class DynamicFormModule {
1739
1844
  DynamicSearchComponent,
1740
1845
  SelectSearchComponent,
1741
1846
  TextEditSearchComponent,
1742
- SwitchSearchComponent], imports: [FormsModule,
1847
+ SwitchSearchComponent,
1848
+ NumericEditSearchComponent], imports: [FormsModule,
1743
1849
  CoreModule,
1744
1850
  ThemeSharedModule,
1745
1851
  ReactiveFormsModule,
@@ -1798,6 +1904,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1798
1904
  SelectSearchComponent,
1799
1905
  TextEditSearchComponent,
1800
1906
  SwitchSearchComponent,
1907
+ NumericEditSearchComponent,
1801
1908
  ],
1802
1909
  imports: [
1803
1910
  FormsModule,