@ebuilding/form 2.1.15 → 2.2.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 (183) hide show
  1. package/checkbox/src/app.config.d.ts +2 -0
  2. package/checkbox/src/checkbox.module.d.ts +1 -1
  3. package/checkbox/src/checkbox.type.d.ts +1 -1
  4. package/checkbox/src/public_api.d.ts +1 -0
  5. package/checkboxgroup/src/app.config.d.ts +2 -0
  6. package/checkboxgroup/src/checkboxgroup.module.d.ts +1 -1
  7. package/checkboxgroup/src/checkboxgroup.type.d.ts +1 -1
  8. package/checkboxgroup/src/public_api.d.ts +1 -0
  9. package/colors/src/app.config.d.ts +2 -0
  10. package/colors/src/default/index.d.ts +1 -1
  11. package/colors/src/index.module.d.ts +3 -2
  12. package/colors/src/public_api.d.ts +1 -0
  13. package/datetime/src/app.config.d.ts +2 -0
  14. package/datetime/src/datetime.module.d.ts +1 -1
  15. package/datetime/src/datetime.type.d.ts +1 -1
  16. package/datetime/src/public_api.d.ts +1 -0
  17. package/desc/src/app.config.d.ts +2 -0
  18. package/desc/src/desc.module.d.ts +1 -1
  19. package/desc/src/desc.type.d.ts +1 -1
  20. package/desc/src/public_api.d.ts +1 -0
  21. package/dim/src/app.config.d.ts +2 -0
  22. package/dim/src/default/index.d.ts +1 -1
  23. package/dim/src/dim.module.d.ts +1 -1
  24. package/dim/src/public_api.d.ts +1 -0
  25. package/dim-indicator/src/app.config.d.ts +2 -0
  26. package/dim-indicator/src/assess/index.d.ts +1 -1
  27. package/dim-indicator/src/default/index.d.ts +1 -1
  28. package/dim-indicator/src/finish/index.d.ts +1 -1
  29. package/dim-indicator/src/indicator.module.d.ts +1 -1
  30. package/dim-indicator/src/public_api.d.ts +1 -0
  31. package/fesm2022/ebuilding-form.mjs +472 -604
  32. package/fesm2022/ebuilding-form.mjs.map +1 -1
  33. package/fesm2022/type.checkbox.mjs +22 -30
  34. package/fesm2022/type.checkbox.mjs.map +1 -1
  35. package/fesm2022/type.checkboxgroup.mjs +18 -22
  36. package/fesm2022/type.checkboxgroup.mjs.map +1 -1
  37. package/fesm2022/type.colors.mjs +23 -23
  38. package/fesm2022/type.colors.mjs.map +1 -1
  39. package/fesm2022/type.datetime.mjs +18 -22
  40. package/fesm2022/type.datetime.mjs.map +1 -1
  41. package/fesm2022/type.desc.mjs +16 -19
  42. package/fesm2022/type.desc.mjs.map +1 -1
  43. package/fesm2022/type.dim-indicator.mjs +27 -38
  44. package/fesm2022/type.dim-indicator.mjs.map +1 -1
  45. package/fesm2022/type.dim.mjs +17 -20
  46. package/fesm2022/type.dim.mjs.map +1 -1
  47. package/fesm2022/type.form-field.mjs +17 -20
  48. package/fesm2022/type.form-field.mjs.map +1 -1
  49. package/fesm2022/type.grid.mjs +17 -20
  50. package/fesm2022/type.grid.mjs.map +1 -1
  51. package/fesm2022/type.group.mjs +21 -28
  52. package/fesm2022/type.group.mjs.map +1 -1
  53. package/fesm2022/type.html.mjs +17 -21
  54. package/fesm2022/type.html.mjs.map +1 -1
  55. package/fesm2022/type.icon.mjs +17 -21
  56. package/fesm2022/type.icon.mjs.map +1 -1
  57. package/fesm2022/type.label.mjs +16 -19
  58. package/fesm2022/type.label.mjs.map +1 -1
  59. package/fesm2022/type.line.mjs +16 -19
  60. package/fesm2022/type.line.mjs.map +1 -1
  61. package/fesm2022/type.list.mjs +16 -19
  62. package/fesm2022/type.list.mjs.map +1 -1
  63. package/fesm2022/type.number.mjs +26 -37
  64. package/fesm2022/type.number.mjs.map +1 -1
  65. package/fesm2022/type.overtime.mjs +17 -21
  66. package/fesm2022/type.overtime.mjs.map +1 -1
  67. package/fesm2022/type.panel.mjs +17 -20
  68. package/fesm2022/type.panel.mjs.map +1 -1
  69. package/fesm2022/type.radio.mjs +18 -22
  70. package/fesm2022/type.radio.mjs.map +1 -1
  71. package/fesm2022/type.radiogroup.mjs +17 -21
  72. package/fesm2022/type.radiogroup.mjs.map +1 -1
  73. package/fesm2022/type.reform.mjs +17 -20
  74. package/fesm2022/type.reform.mjs.map +1 -1
  75. package/fesm2022/type.repeat-card.mjs +17 -20
  76. package/fesm2022/type.repeat-card.mjs.map +1 -1
  77. package/fesm2022/type.repeat.mjs +21 -28
  78. package/fesm2022/type.repeat.mjs.map +1 -1
  79. package/fesm2022/type.select.mjs +21 -28
  80. package/fesm2022/type.select.mjs.map +1 -1
  81. package/fesm2022/type.switch.mjs +18 -22
  82. package/fesm2022/type.switch.mjs.map +1 -1
  83. package/fesm2022/type.tabs.mjs +42 -49
  84. package/fesm2022/type.tabs.mjs.map +1 -1
  85. package/fesm2022/type.text.mjs +29 -35
  86. package/fesm2022/type.text.mjs.map +1 -1
  87. package/fesm2022/type.textarea.mjs +18 -22
  88. package/fesm2022/type.textarea.mjs.map +1 -1
  89. package/fesm2022/type.textcode.mjs +18 -22
  90. package/fesm2022/type.textcode.mjs.map +1 -1
  91. package/form-field/src/form-field.config.d.ts +2 -0
  92. package/form-field/src/form-field.module.d.ts +1 -1
  93. package/form-field/src/form-field.wrapper.d.ts +1 -1
  94. package/form-field/src/public_api.d.ts +1 -0
  95. package/grid/src/app.config.d.ts +2 -0
  96. package/grid/src/grid.module.d.ts +1 -1
  97. package/grid/src/grid.type.d.ts +1 -1
  98. package/grid/src/public_api.d.ts +1 -0
  99. package/group/src/app.config.d.ts +2 -0
  100. package/group/src/group.module.d.ts +1 -1
  101. package/group/src/group.type.d.ts +1 -1
  102. package/group/src/public_api.d.ts +1 -0
  103. package/html/src/app.config.d.ts +2 -0
  104. package/html/src/html.module.d.ts +1 -1
  105. package/html/src/html.type.d.ts +1 -1
  106. package/html/src/public_api.d.ts +1 -0
  107. package/icon/src/app.config.d.ts +2 -0
  108. package/icon/src/default/index.d.ts +1 -1
  109. package/icon/src/index.module.d.ts +1 -1
  110. package/icon/src/public_api.d.ts +1 -0
  111. package/index.d.ts +28 -28
  112. package/label/src/app.config.d.ts +2 -0
  113. package/label/src/label.module.d.ts +1 -1
  114. package/label/src/label.type.d.ts +1 -1
  115. package/label/src/public_api.d.ts +1 -0
  116. package/line/src/app.config.d.ts +2 -0
  117. package/line/src/line.module.d.ts +1 -1
  118. package/line/src/line.type.d.ts +1 -1
  119. package/line/src/public_api.d.ts +1 -0
  120. package/list/src/app.config.d.ts +2 -0
  121. package/list/src/list.module.d.ts +1 -1
  122. package/list/src/list.type.d.ts +1 -1
  123. package/list/src/public_api.d.ts +1 -0
  124. package/number/src/app.config.d.ts +2 -0
  125. package/number/src/number.module.d.ts +1 -1
  126. package/number/src/number.type.d.ts +1 -1
  127. package/number/src/number_rate.type.d.ts +1 -1
  128. package/number/src/public_api.d.ts +1 -0
  129. package/overtime/src/app.config.d.ts +2 -0
  130. package/overtime/src/default/index.d.ts +1 -1
  131. package/overtime/src/index.module.d.ts +1 -1
  132. package/overtime/src/public_api.d.ts +1 -0
  133. package/package.json +30 -30
  134. package/panel/src/app.config.d.ts +2 -0
  135. package/panel/src/panel.module.d.ts +1 -1
  136. package/panel/src/panel.type.d.ts +1 -1
  137. package/panel/src/public_api.d.ts +1 -0
  138. package/radio/src/app.config.d.ts +2 -0
  139. package/radio/src/public_api.d.ts +1 -0
  140. package/radio/src/radio.module.d.ts +1 -1
  141. package/radio/src/radio.type.d.ts +1 -1
  142. package/radiogroup/src/app.config.d.ts +2 -0
  143. package/radiogroup/src/public_api.d.ts +1 -0
  144. package/radiogroup/src/radiogroup.module.d.ts +1 -1
  145. package/radiogroup/src/radiogroup.type.d.ts +1 -1
  146. package/reform/src/app.config.d.ts +2 -0
  147. package/reform/src/public_api.d.ts +1 -0
  148. package/reform/src/reform.module.d.ts +1 -1
  149. package/reform/src/reform.type.d.ts +1 -1
  150. package/repeat/src/app.config.d.ts +2 -0
  151. package/repeat/src/default/index.d.ts +1 -1
  152. package/repeat/src/index.module.d.ts +1 -1
  153. package/repeat/src/public_api.d.ts +1 -0
  154. package/repeat-card/src/app.config.d.ts +2 -0
  155. package/repeat-card/src/default/index.d.ts +1 -1
  156. package/repeat-card/src/index.module.d.ts +1 -1
  157. package/repeat-card/src/public_api.d.ts +1 -0
  158. package/select/src/app.config.d.ts +2 -0
  159. package/select/src/public_api.d.ts +1 -0
  160. package/select/src/select.module.d.ts +1 -1
  161. package/select/src/select.type.d.ts +1 -1
  162. package/switch/src/app.config.d.ts +2 -0
  163. package/switch/src/default/index.d.ts +1 -1
  164. package/switch/src/index.module.d.ts +1 -1
  165. package/switch/src/public_api.d.ts +1 -0
  166. package/tabs/src/app.config.d.ts +2 -0
  167. package/tabs/src/default/index.d.ts +1 -1
  168. package/tabs/src/index.module.d.ts +1 -1
  169. package/tabs/src/public_api.d.ts +1 -0
  170. package/tabs/src/tab/index.d.ts +1 -1
  171. package/text/src/public_api.d.ts +1 -0
  172. package/text/src/text.config.d.ts +2 -0
  173. package/text/src/text.module.d.ts +3 -2
  174. package/text/src/text.type.d.ts +1 -1
  175. package/text/src/text_ind.type.d.ts +1 -1
  176. package/textarea/src/app.config.d.ts +2 -0
  177. package/textarea/src/public_api.d.ts +1 -0
  178. package/textarea/src/textarea.module.d.ts +1 -1
  179. package/textarea/src/textarea.type.d.ts +1 -1
  180. package/textcode/src/app.config.d.ts +2 -0
  181. package/textcode/src/public_api.d.ts +1 -0
  182. package/textcode/src/text.module.d.ts +1 -1
  183. package/textcode/src/text.type.d.ts +1 -1
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
2
2
  import { Component, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i8 from '@kre-form/core';
6
- import { FieldArrayType, FormlyModule } from '@kre-form/core';
5
+ import * as i8 from '@ebuilding-form/core';
6
+ import { FieldArrayType, FormlyModule } from '@ebuilding-form/core';
7
7
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
8
8
  import { NzEmptyModule } from 'ng-zorro-antd/empty';
9
9
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
@@ -119,7 +119,7 @@ class DeonNzFieldRepeatCard extends FieldArrayType {
119
119
  return true;
120
120
  }
121
121
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRepeatCard, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
122
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRepeatCard, isStandalone: true, selector: "deon-nz-field-repeat-card", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"repeat-card\" [ngClass]=\"clasName\">\n <ng-container *ngIf=\"props && props.label\">\n <div class=\"card-label\">{{props.label}}</div>\n </ng-container>\n <ng-container\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0;else cardEmpty\">\n <ng-container *ngFor=\"let fields of field.fieldGroup; let i = index\">\n <div class=\"card-header\">\n <div class=\"serial\">\u5E8F\u53F7\uFF1A{{ i + 1 }}</div>\n <div calss=\"delete\">\n <ng-container *ngIf=\"editor!=false\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </div>\n </div>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of fields.fieldGroup\">\n <formly-field [field]=\"item\"></formly-field>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #cardEmpty>\n <gram-empty></gram-empty>\n <ng-container *ngIf=\"editor!=false\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"editor!=false\">\n <div class=\"card-bottom\"\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"addData()\">+\u6DFB\u52A0</button>\n </div>\n </ng-container>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i3.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i6.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i7.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i8.FormlyField, selector: "formly-field", inputs: ["field", "hideLabel", "isTable", "dimConfig", "tableConfig", "editor"] }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i9.BaseEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }] });
122
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRepeatCard, isStandalone: true, selector: "deon-nz-field-repeat-card", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"repeat-card\" [ngClass]=\"clasName\">\n <ng-container *ngIf=\"props && props.label\">\n <div class=\"card-label\">{{props.label}}</div>\n </ng-container>\n <ng-container\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0;else cardEmpty\">\n <ng-container *ngFor=\"let fields of field.fieldGroup; let i = index\">\n <div class=\"card-header\">\n <div class=\"serial\">\u5E8F\u53F7\uFF1A{{ i + 1 }}</div>\n <div calss=\"delete\">\n <ng-container *ngIf=\"editor!=false\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </div>\n </div>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of fields.fieldGroup\">\n <formly-field [field]=\"item\"></formly-field>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #cardEmpty>\n <gram-empty></gram-empty>\n <ng-container *ngIf=\"editor!=false\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"editor!=false\">\n <div class=\"card-bottom\"\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"addData()\">+\u6DFB\u52A0</button>\n </div>\n </ng-container>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i3.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i6.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i7.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i8.LegacyFormlyField, selector: "formly-field" }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i9.BaseEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }] });
123
123
  }
124
124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRepeatCard, decorators: [{
125
125
  type: Component,
@@ -136,6 +136,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
136
136
  ], template: "<div class=\"repeat-card\" [ngClass]=\"clasName\">\n <ng-container *ngIf=\"props && props.label\">\n <div class=\"card-label\">{{props.label}}</div>\n </ng-container>\n <ng-container\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0;else cardEmpty\">\n <ng-container *ngFor=\"let fields of field.fieldGroup; let i = index\">\n <div class=\"card-header\">\n <div class=\"serial\">\u5E8F\u53F7\uFF1A{{ i + 1 }}</div>\n <div calss=\"delete\">\n <ng-container *ngIf=\"editor!=false\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </div>\n </div>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of fields.fieldGroup\">\n <formly-field [field]=\"item\"></formly-field>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #cardEmpty>\n <gram-empty></gram-empty>\n <ng-container *ngIf=\"editor!=false\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"editor!=false\">\n <div class=\"card-bottom\"\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"addData()\">+\u6DFB\u52A0</button>\n </div>\n </ng-container>\n</div>" }]
137
137
  }], ctorParameters: () => [{ type: i1.GramGlobalService }] });
138
138
 
139
+ function withFormlyFieldRepeatCard() {
140
+ return {
141
+ types: [
142
+ {
143
+ name: 'repeat-card',
144
+ component: DeonNzFieldRepeatCard,
145
+ }
146
+ ]
147
+ };
148
+ }
149
+
139
150
  class DeonNzRepeatCardModule {
140
151
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzRepeatCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
141
152
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzRepeatCardModule, imports: [CommonModule,
@@ -160,14 +171,7 @@ class DeonNzRepeatCardModule {
160
171
  DeonNzFormFieldModule,
161
172
  DragDropModule,
162
173
  GramDeonEmptyModule,
163
- FormlyModule.forChild({
164
- types: [
165
- {
166
- name: 'repeat-card',
167
- component: DeonNzFieldRepeatCard,
168
- },
169
- ],
170
- })] });
174
+ FormlyModule.forChild(withFormlyFieldRepeatCard())] });
171
175
  }
172
176
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzRepeatCardModule, decorators: [{
173
177
  type: NgModule,
@@ -184,14 +188,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
184
188
  DeonNzFormFieldModule,
185
189
  DragDropModule,
186
190
  GramDeonEmptyModule,
187
- FormlyModule.forChild({
188
- types: [
189
- {
190
- name: 'repeat-card',
191
- component: DeonNzFieldRepeatCard,
192
- },
193
- ],
194
- }),
191
+ FormlyModule.forChild(withFormlyFieldRepeatCard()),
195
192
  ],
196
193
  }]
197
194
  }] });
@@ -200,5 +197,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
200
197
  * Generated bundle index. Do not edit.
201
198
  */
202
199
 
203
- export { DeonNzFieldRepeatCard, DeonNzRepeatCardModule };
200
+ export { DeonNzFieldRepeatCard, DeonNzRepeatCardModule, withFormlyFieldRepeatCard };
204
201
  //# sourceMappingURL=type.repeat-card.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.repeat-card.mjs","sources":["../../../../packages/form/repeat-card/src/default/index.ts","../../../../packages/form/repeat-card/src/default/index.html","../../../../packages/form/repeat-card/src/index.module.ts","../../../../packages/form/repeat-card/type.repeat-card.ts"],"sourcesContent":["import { Component, AfterViewInit, OnInit, OnDestroy, OnChanges } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { FormlyModule, FieldArrayType } from '@kre-form/core';\nimport { GramDeonEmptyModule } from '@ebuilding/base/components/empty';\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\n\nimport _ from 'lodash';\n@Component({\n selector: 'deon-nz-field-repeat-card',\n templateUrl: './index.html',\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzToolTipModule,\n NzButtonModule,\n DragDropModule,\n NzIconModule,\n FormlyModule,\n GramDeonEmptyModule\n ]\n})\nexport class DeonNzFieldRepeatCard extends FieldArrayType implements OnInit, OnDestroy, AfterViewInit, OnChanges {\n /**\n * 合并列\n */\n get colSpan() {\n let res = 0;\n if (this.field?.fieldArray[\"fieldGroup\"]) {\n res = this.field.fieldArray[\"fieldGroup\"].length + 2;\n }\n return res;\n }\n\n get dragDisabled() {\n let result: boolean = true;\n if (this.editor != false && _.get(this.props, 'drag') == true) {\n result = false;\n }\n return result;\n }\n\n get clasName() {\n if (this.props && this.props[\"className\"]) {\n return this.props[\"className\"];\n }\n return null;\n }\n\n get operationShow() {\n if (this.props && this.props[\"operationShow\"] != undefined && this.props[\"operationShow\"] != null) {\n return this.props[\"operationShow\"];\n }\n return false;\n }\n\n drop(event: CdkDragDrop<string[]>) {\n moveItemInArray(this.field.fieldGroup, event.previousIndex, event.currentIndex);\n moveItemInArray(this.model, event.previousIndex, event.currentIndex);\n }\n constructor(public globalSrv: GramGlobalService) {\n super();\n }\n\n ngOnInit() { }\n ngOnDestroy() { }\n ngAfterViewInit() { }\n ngOnChanges(change: any) {\n // this.resize();\n }\n\n fieldEditor(f: any, i: number, m: any) {\n if (f && f.props && f.props.builtin && f.props.builtin == true) {\n return true;\n }\n if (f && f.key == 'code' && m && m[i]['id']) {\n return false;\n }\n if (this.editor == false) {\n return false;\n } else {\n if (m && m[i]['builtin'] && m[i]['builtin'] == true) {\n return false;\n }\n return true;\n }\n }\n\n addData() {\n this.add();\n this.globalSrv.notifyDataChanged('deon-field-repeat-card', {\n field: this.field,\n data: null,\n type: 'add',\n });\n }\n\n rowDelete(e: any) {\n this.remove(e);\n this.globalSrv.notifyDataChanged('deon-field-repeat-card', {\n field: this.field,\n data: e,\n type: 'delete',\n });\n\n }\n\n rowOperation(button: any, e: any) {\n this.globalSrv.notifyDataChanged('deon-field-repeat-card', {\n field: this.field,\n data: e,\n type: button?.type,\n });\n }\n\n checkDelete(index: number) {\n if (this.props[\"hideDelete\"] && Array.isArray(this.props[\"hideDelete\"])) {\n if (\n this.props[\"hideDelete\"].some((item: any) => {\n return item == index;\n })\n ) {\n return false;\n }\n }\n return true;\n }\n}\n","<div class=\"repeat-card\" [ngClass]=\"clasName\">\n <ng-container *ngIf=\"props && props.label\">\n <div class=\"card-label\">{{props.label}}</div>\n </ng-container>\n <ng-container\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0;else cardEmpty\">\n <ng-container *ngFor=\"let fields of field.fieldGroup; let i = index\">\n <div class=\"card-header\">\n <div class=\"serial\">序号:{{ i + 1 }}</div>\n <div calss=\"delete\">\n <ng-container *ngIf=\"editor!=false\">\n <a nz-tooltip nzTooltipTitle=\"删除\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </div>\n </div>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of fields.fieldGroup\">\n <formly-field [field]=\"item\"></formly-field>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #cardEmpty>\n <gram-empty></gram-empty>\n <ng-container *ngIf=\"editor!=false\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+添加</a>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"editor!=false\">\n <div class=\"card-bottom\"\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"addData()\">+添加</button>\n </div>\n </ng-container>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@kre-form/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { NzTableModule } from 'ng-zorro-antd/table';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzModalModule } from 'ng-zorro-antd/modal';\n\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { GramDeonEmptyModule } from \"@ebuilding/base/components/empty\";\n\nimport { DeonNzFieldRepeatCard } from './default/index';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzEmptyModule,\n NzTableModule,\n NzButtonModule,\n NzIconModule,\n NzModalModule,\n NzToolTipModule,\n DeonNzFormFieldModule,\n DragDropModule,\n GramDeonEmptyModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'repeat-card',\n component: DeonNzFieldRepeatCard,\n },\n ],\n }),\n ],\n})\nexport class DeonNzRepeatCardModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAO,qBAAsB,SAAQ,cAAc,CAAA;AAsCpC,IAAA,SAAA;AArCnB;;AAEG;AACH,IAAA,IAAI,OAAO,GAAA;QACT,IAAI,GAAG,GAAG,CAAC;QACX,IAAI,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE;AACxC,YAAA,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC;;AAEtD,QAAA,OAAO,GAAG;;AAGZ,IAAA,IAAI,YAAY,GAAA;QACd,IAAI,MAAM,GAAY,IAAI;AAC1B,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;YAC7D,MAAM,GAAG,KAAK;;AAEhB,QAAA,OAAO,MAAM;;AAGf,IAAA,IAAI,QAAQ,GAAA;QACV,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;AACzC,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;;AAEhC,QAAA,OAAO,IAAI;;AAGb,IAAA,IAAI,aAAa,GAAA;QACf,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,IAAI,EAAE;AACjG,YAAA,OAAO,IAAI,CAAC,KAAK,CA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;AAWV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YArB/B,YAAY;YACZ,mBAAmB;YACnB,aAAa;YACb,aAAa;YACb,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,qBAAqB;YACrB,cAAc;YACd,mBAAmB;YACnB,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,aAAa;AACnB,wBAAA,SAAS,EAAE,qBAAqB;AACjC,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA;;4FAGO,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAvBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,aAAa;wBACb,aAAa;wBACb,cAAc;wBACd,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,qBAAqB;wBACrB,cAAc;wBACd,mBAAmB;wBACnB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,aAAa;AACnB,oCAAA,SAAS,EAAE,qBAAqB;AACjC,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA;;;ACxCD;;AAEG;;;;"}
1
+ {"version":3,"file":"type.repeat-card.mjs","sources":["../../../../packages/form/repeat-card/src/default/index.ts","../../../../packages/form/repeat-card/src/default/index.html","../../../../packages/form/repeat-card/src/app.config.ts","../../../../packages/form/repeat-card/src/index.module.ts","../../../../packages/form/repeat-card/type.repeat-card.ts"],"sourcesContent":["import { Component, AfterViewInit, OnInit, OnDestroy, OnChanges } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { FormlyModule, FieldArrayType } from '@ebuilding-form/core';\nimport { GramDeonEmptyModule } from '@ebuilding/base/components/empty';\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\n\nimport _ from 'lodash';\n@Component({\n selector: 'deon-nz-field-repeat-card',\n templateUrl: './index.html',\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzToolTipModule,\n NzButtonModule,\n DragDropModule,\n NzIconModule,\n FormlyModule,\n GramDeonEmptyModule\n ]\n})\nexport class DeonNzFieldRepeatCard extends FieldArrayType implements OnInit, OnDestroy, AfterViewInit, OnChanges {\n /**\n * 合并列\n */\n get colSpan() {\n let res = 0;\n if (this.field?.fieldArray[\"fieldGroup\"]) {\n res = this.field.fieldArray[\"fieldGroup\"].length + 2;\n }\n return res;\n }\n\n get dragDisabled() {\n let result: boolean = true;\n if (this.editor != false && _.get(this.props, 'drag') == true) {\n result = false;\n }\n return result;\n }\n\n get clasName() {\n if (this.props && this.props[\"className\"]) {\n return this.props[\"className\"];\n }\n return null;\n }\n\n get operationShow() {\n if (this.props && this.props[\"operationShow\"] != undefined && this.props[\"operationShow\"] != null) {\n return this.props[\"operationShow\"];\n }\n return false;\n }\n\n drop(event: CdkDragDrop<string[]>) {\n moveItemInArray(this.field.fieldGroup, event.previousIndex, event.currentIndex);\n moveItemInArray(this.model, event.previousIndex, event.currentIndex);\n }\n constructor(public globalSrv: GramGlobalService) {\n super();\n }\n\n ngOnInit() { }\n ngOnDestroy() { }\n ngAfterViewInit() { }\n ngOnChanges(change: any) {\n // this.resize();\n }\n\n fieldEditor(f: any, i: number, m: any) {\n if (f && f.props && f.props.builtin && f.props.builtin == true) {\n return true;\n }\n if (f && f.key == 'code' && m && m[i]['id']) {\n return false;\n }\n if (this.editor == false) {\n return false;\n } else {\n if (m && m[i]['builtin'] && m[i]['builtin'] == true) {\n return false;\n }\n return true;\n }\n }\n\n addData() {\n this.add();\n this.globalSrv.notifyDataChanged('deon-field-repeat-card', {\n field: this.field,\n data: null,\n type: 'add',\n });\n }\n\n rowDelete(e: any) {\n this.remove(e);\n this.globalSrv.notifyDataChanged('deon-field-repeat-card', {\n field: this.field,\n data: e,\n type: 'delete',\n });\n\n }\n\n rowOperation(button: any, e: any) {\n this.globalSrv.notifyDataChanged('deon-field-repeat-card', {\n field: this.field,\n data: e,\n type: button?.type,\n });\n }\n\n checkDelete(index: number) {\n if (this.props[\"hideDelete\"] && Array.isArray(this.props[\"hideDelete\"])) {\n if (\n this.props[\"hideDelete\"].some((item: any) => {\n return item == index;\n })\n ) {\n return false;\n }\n }\n return true;\n }\n}\n","<div class=\"repeat-card\" [ngClass]=\"clasName\">\n <ng-container *ngIf=\"props && props.label\">\n <div class=\"card-label\">{{props.label}}</div>\n </ng-container>\n <ng-container\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0;else cardEmpty\">\n <ng-container *ngFor=\"let fields of field.fieldGroup; let i = index\">\n <div class=\"card-header\">\n <div class=\"serial\">序号:{{ i + 1 }}</div>\n <div calss=\"delete\">\n <ng-container *ngIf=\"editor!=false\">\n <a nz-tooltip nzTooltipTitle=\"删除\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </div>\n </div>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of fields.fieldGroup\">\n <formly-field [field]=\"item\"></formly-field>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #cardEmpty>\n <gram-empty></gram-empty>\n <ng-container *ngIf=\"editor!=false\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+添加</a>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"editor!=false\">\n <div class=\"card-bottom\"\n *ngIf=\"field.fieldGroup!==undefined && field.fieldGroup!==null && field.fieldGroup.length>0\">\n <button nz-button nzType=\"default\" type=\"button\" (click)=\"addData()\">+添加</button>\n </div>\n </ng-container>\n</div>","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldRepeatCard } from './default/index';\n\nexport function withFormlyFieldRepeatCard(): ConfigOption {\n return {\n types: [\n {\n name: 'repeat-card',\n component: DeonNzFieldRepeatCard,\n }\n ]\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { NzTableModule } from 'ng-zorro-antd/table';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzModalModule } from 'ng-zorro-antd/modal';\n\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { GramDeonEmptyModule } from \"@ebuilding/base/components/empty\";\n\nimport { withFormlyFieldRepeatCard } from './app.config';\n\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzEmptyModule,\n NzTableModule,\n NzButtonModule,\n NzIconModule,\n NzModalModule,\n NzToolTipModule,\n DeonNzFormFieldModule,\n DragDropModule,\n GramDeonEmptyModule,\n FormlyModule.forChild(withFormlyFieldRepeatCard()),\n\n ],\n})\nexport class DeonNzRepeatCardModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAO,qBAAsB,SAAQ,cAAc,CAAA;AAsCpC,IAAA,SAAA;AArCnB;;AAEG;AAC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nB,aAAa;YACb,aAAa;YACb,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,qBAAqB;YACrB,cAAc;YACd,mBAAmB;AACnB,YAAA,YAAY,CAAC,QAAQ,CAAC,yBAAyB,EAAE,CAAC,CAAA,EAAA,CAAA;;4FAIzC,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAjBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,aAAa;wBACb,aAAa;wBACb,cAAc;wBACd,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,qBAAqB;wBACrB,cAAc;wBACd,mBAAmB;AACnB,wBAAA,YAAY,CAAC,QAAQ,CAAC,yBAAyB,EAAE,CAAC;AAEnD,qBAAA;AACF,iBAAA;;;ACnCD;;AAEG;;;;"}
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
2
2
  import { Component, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i8 from '@kre-form/core';
6
- import { FieldArrayType, FormlyModule } from '@kre-form/core';
5
+ import * as i8 from '@ebuilding-form/core';
6
+ import { FieldArrayType, FormlyModule } from '@ebuilding-form/core';
7
7
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
8
8
  import { NzEmptyModule } from 'ng-zorro-antd/empty';
9
9
  import * as i6 from '@angular/cdk/drag-drop';
@@ -119,7 +119,7 @@ class DeonNzFieldRepeat extends FieldArrayType {
119
119
  return true;
120
120
  }
121
121
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRepeat, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
122
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRepeat, isStandalone: true, selector: "deon-nz-field-repeat", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"repeat-label\" *ngIf=\"props && props['hideLabel']!=false && props?.label\">{{props?.label}}</div>\n<div class=\"repeat-table\" [ngClass]=\"clasName\">\n <table>\n <thead>\n <tr>\n <th style=\"width: 50px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let headerField of field?.fieldArray['fieldGroup']\">\n <ng-container *ngIf=\"headerField?.type=='deon-group' && headerField?.hide!=true;else tmpField\">\n <ng-container *ngFor=\"let item of headerField.fieldGroup\">\n <th *ngIf=\"item?.hide!=true\">\n <ng-container *ngIf=\"item && item?.props!==undefined && item?.props!==null\">\n <span style=\"color: red\" *ngIf=\"item?.props?.required\" class=\"required\"></span>\n {{item.props.label }}\n </ng-container>\n </th>\n </ng-container>\n </ng-container>\n <ng-template #tmpField>\n <th *ngIf=\"headerField?.hide!=true &&(headerField?.type!=='line' && headerField?.type!=='htmlcontent')\">\n <ng-container *ngIf=\"headerField && headerField?.props!==undefined && headerField?.props!==null\">\n <span style=\"color: red\" *ngIf=\"headerField?.props?.required\" class=\"required\"></span>\n {{ headerField.props.label }}\n </ng-container>\n </th>\n </ng-template>\n </ng-container>\n <th style=\"width: 60px\" *ngIf=\"isRemove || operationShow\">\n <span class=\"\">\u64CD\u4F5C</span>\n </th>\n </tr>\n </thead>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container\n *ngIf=\"field?.fieldGroup!==undefined && field?.fieldGroup!==null && (field?.fieldGroup?.length ?? 0) > 0;else cardEmpty\">\n <tr *ngFor=\"let fields of field.fieldGroup; let i = index\" cdkDrag [cdkDragDisabled]=\"dragDisabled\">\n <td>\n <span class=\"serial\">{{ i + 1 }}</span>\n </td>\n <ng-container *ngFor=\"let f of fields.fieldGroup\">\n <ng-container *ngIf=\"f?.type=='deon-group' && f?.hide!=true;else tmpTd\">\n <ng-container *ngFor=\"let item of f.fieldGroup\">\n <td *ngIf=\"item?.hide!=true\">\n <formly-field [field]=\"item\" [hideLabel]=\"true\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-container>\n </ng-container>\n <ng-template #tmpTd>\n <td\n *ngIf=\"f && f?.type!==undefined && f?.type!==null && f?.hide!=true &&(f?.type!=='line' && f?.type!=='htmlcontent')\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\" [editor]=\"fieldEditor(f,i,model)\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-template>\n </ng-container>\n <td style=\"text-align: center\" *ngIf=\"isRemove || operationShow\">\n <ng-container *ngIf=\"props && props['operation'] && props['operation'].length>0\">\n <ng-container *ngFor=\"let o of props['operation']\">\n <a nz-tooltip [nzTooltipTitle]=\"o.label\" (click)=\"rowOperation(o,i)\"><i nz-icon\n [nzType]=\"o.icon\"></i></a>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRemove && (model==null || model[i]?.builtin!=true)\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"(isAdd==true || props['add']==true) || props['viewRange']==true\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <ng-container *ngIf=\"isAdd==true && (props['add']==undefined || props['add']==null || props['add']==true)\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </td>\n </tr>\n </ng-container>\n <ng-template #cardEmpty>\n <tr>\n <td [attr.colspan]=\"colSpan\" style=\"text-align: center\">\n <gram-empty></gram-empty>\n </td>\n </tr>\n <tr *ngIf=\"isAdd && (props['add']==undefined || props['add']==null || props['add']==true)\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i3.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], 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", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i7.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i8.FormlyField, selector: "formly-field", inputs: ["field", "hideLabel", "isTable", "dimConfig", "tableConfig", "editor"] }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i9.BaseEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }] });
122
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldRepeat, isStandalone: true, selector: "deon-nz-field-repeat", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"repeat-label\" *ngIf=\"props && props['hideLabel']!=false && props?.label\">{{props?.label}}</div>\n<div class=\"repeat-table\" [ngClass]=\"clasName\">\n <table>\n <thead>\n <tr>\n <th style=\"width: 50px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let headerField of field?.fieldArray['fieldGroup']\">\n <ng-container *ngIf=\"headerField?.type=='deon-group' && headerField?.hide!=true;else tmpField\">\n <ng-container *ngFor=\"let item of headerField.fieldGroup\">\n <th *ngIf=\"item?.hide!=true\">\n <ng-container *ngIf=\"item && item?.props!==undefined && item?.props!==null\">\n <span style=\"color: red\" *ngIf=\"item?.props?.required\" class=\"required\"></span>\n {{item.props.label }}\n </ng-container>\n </th>\n </ng-container>\n </ng-container>\n <ng-template #tmpField>\n <th *ngIf=\"headerField?.hide!=true &&(headerField?.type!=='line' && headerField?.type!=='htmlcontent')\">\n <ng-container *ngIf=\"headerField && headerField?.props!==undefined && headerField?.props!==null\">\n <span style=\"color: red\" *ngIf=\"headerField?.props?.required\" class=\"required\"></span>\n {{ headerField.props.label }}\n </ng-container>\n </th>\n </ng-template>\n </ng-container>\n <th style=\"width: 60px\" *ngIf=\"isRemove || operationShow\">\n <span class=\"\">\u64CD\u4F5C</span>\n </th>\n </tr>\n </thead>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container\n *ngIf=\"field?.fieldGroup!==undefined && field?.fieldGroup!==null && (field?.fieldGroup?.length ?? 0) > 0;else cardEmpty\">\n <tr *ngFor=\"let fields of field.fieldGroup; let i = index\" cdkDrag [cdkDragDisabled]=\"dragDisabled\">\n <td>\n <span class=\"serial\">{{ i + 1 }}</span>\n </td>\n <ng-container *ngFor=\"let f of fields.fieldGroup\">\n <ng-container *ngIf=\"f?.type=='deon-group' && f?.hide!=true;else tmpTd\">\n <ng-container *ngFor=\"let item of f.fieldGroup\">\n <td *ngIf=\"item?.hide!=true\">\n <formly-field [field]=\"item\" [hideLabel]=\"true\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-container>\n </ng-container>\n <ng-template #tmpTd>\n <td\n *ngIf=\"f && f?.type!==undefined && f?.type!==null && f?.hide!=true &&(f?.type!=='line' && f?.type!=='htmlcontent')\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\" [editor]=\"fieldEditor(f,i,model)\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-template>\n </ng-container>\n <td style=\"text-align: center\" *ngIf=\"isRemove || operationShow\">\n <ng-container *ngIf=\"props && props['operation'] && props['operation'].length>0\">\n <ng-container *ngFor=\"let o of props['operation']\">\n <a nz-tooltip [nzTooltipTitle]=\"o.label\" (click)=\"rowOperation(o,i)\"><i nz-icon\n [nzType]=\"o.icon\"></i></a>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRemove && (model==null || model[i]?.builtin!=true)\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"(isAdd==true || props['add']==true) || props['viewRange']==true\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <ng-container *ngIf=\"isAdd==true && (props['add']==undefined || props['add']==null || props['add']==true)\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </td>\n </tr>\n </ng-container>\n <ng-template #cardEmpty>\n <tr>\n <td [attr.colspan]=\"colSpan\" style=\"text-align: center\">\n <gram-empty></gram-empty>\n </td>\n </tr>\n <tr *ngIf=\"isAdd && (props['add']==undefined || props['add']==null || props['add']==true)\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i3.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i4.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], 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", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i7.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i8.LegacyFormlyField, selector: "formly-field" }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i9.BaseEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }] });
123
123
  }
124
124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldRepeat, decorators: [{
125
125
  type: Component,
@@ -136,6 +136,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
136
136
  ], template: "<div class=\"repeat-label\" *ngIf=\"props && props['hideLabel']!=false && props?.label\">{{props?.label}}</div>\n<div class=\"repeat-table\" [ngClass]=\"clasName\">\n <table>\n <thead>\n <tr>\n <th style=\"width: 50px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let headerField of field?.fieldArray['fieldGroup']\">\n <ng-container *ngIf=\"headerField?.type=='deon-group' && headerField?.hide!=true;else tmpField\">\n <ng-container *ngFor=\"let item of headerField.fieldGroup\">\n <th *ngIf=\"item?.hide!=true\">\n <ng-container *ngIf=\"item && item?.props!==undefined && item?.props!==null\">\n <span style=\"color: red\" *ngIf=\"item?.props?.required\" class=\"required\"></span>\n {{item.props.label }}\n </ng-container>\n </th>\n </ng-container>\n </ng-container>\n <ng-template #tmpField>\n <th *ngIf=\"headerField?.hide!=true &&(headerField?.type!=='line' && headerField?.type!=='htmlcontent')\">\n <ng-container *ngIf=\"headerField && headerField?.props!==undefined && headerField?.props!==null\">\n <span style=\"color: red\" *ngIf=\"headerField?.props?.required\" class=\"required\"></span>\n {{ headerField.props.label }}\n </ng-container>\n </th>\n </ng-template>\n </ng-container>\n <th style=\"width: 60px\" *ngIf=\"isRemove || operationShow\">\n <span class=\"\">\u64CD\u4F5C</span>\n </th>\n </tr>\n </thead>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container\n *ngIf=\"field?.fieldGroup!==undefined && field?.fieldGroup!==null && (field?.fieldGroup?.length ?? 0) > 0;else cardEmpty\">\n <tr *ngFor=\"let fields of field.fieldGroup; let i = index\" cdkDrag [cdkDragDisabled]=\"dragDisabled\">\n <td>\n <span class=\"serial\">{{ i + 1 }}</span>\n </td>\n <ng-container *ngFor=\"let f of fields.fieldGroup\">\n <ng-container *ngIf=\"f?.type=='deon-group' && f?.hide!=true;else tmpTd\">\n <ng-container *ngFor=\"let item of f.fieldGroup\">\n <td *ngIf=\"item?.hide!=true\">\n <formly-field [field]=\"item\" [hideLabel]=\"true\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-container>\n </ng-container>\n <ng-template #tmpTd>\n <td\n *ngIf=\"f && f?.type!==undefined && f?.type!==null && f?.hide!=true &&(f?.type!=='line' && f?.type!=='htmlcontent')\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\" [editor]=\"fieldEditor(f,i,model)\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-template>\n </ng-container>\n <td style=\"text-align: center\" *ngIf=\"isRemove || operationShow\">\n <ng-container *ngIf=\"props && props['operation'] && props['operation'].length>0\">\n <ng-container *ngFor=\"let o of props['operation']\">\n <a nz-tooltip [nzTooltipTitle]=\"o.label\" (click)=\"rowOperation(o,i)\"><i nz-icon\n [nzType]=\"o.icon\"></i></a>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRemove && (model==null || model[i]?.builtin!=true)\">\n <a nz-tooltip nzTooltipTitle=\"\u5220\u9664\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"(isAdd==true || props['add']==true) || props['viewRange']==true\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <ng-container *ngIf=\"isAdd==true && (props['add']==undefined || props['add']==null || props['add']==true)\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </ng-container>\n </td>\n </tr>\n </ng-container>\n <ng-template #cardEmpty>\n <tr>\n <td [attr.colspan]=\"colSpan\" style=\"text-align: center\">\n <gram-empty></gram-empty>\n </td>\n </tr>\n <tr *ngIf=\"isAdd && (props['add']==undefined || props['add']==null || props['add']==true)\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+\u6DFB\u52A0</a>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>" }]
137
137
  }], ctorParameters: () => [{ type: i1.GramGlobalService }] });
138
138
 
139
+ function withFormlyFieldRepeat() {
140
+ return {
141
+ types: [
142
+ {
143
+ name: 'repeat',
144
+ component: DeonNzFieldRepeat,
145
+ },
146
+ {
147
+ name: 'children',
148
+ component: DeonNzFieldRepeat,
149
+ }
150
+ ]
151
+ };
152
+ }
153
+
139
154
  class DeonNzRepeatModule {
140
155
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzRepeatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
141
156
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzRepeatModule, imports: [CommonModule,
@@ -158,18 +173,7 @@ class DeonNzRepeatModule {
158
173
  NzToolTipModule,
159
174
  DeonNzFormFieldModule,
160
175
  DragDropModule,
161
- FormlyModule.forChild({
162
- types: [
163
- {
164
- name: 'repeat',
165
- component: DeonNzFieldRepeat,
166
- },
167
- {
168
- name: 'children',
169
- component: DeonNzFieldRepeat,
170
- },
171
- ],
172
- })] });
176
+ FormlyModule.forChild(withFormlyFieldRepeat())] });
173
177
  }
174
178
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzRepeatModule, decorators: [{
175
179
  type: NgModule,
@@ -185,18 +189,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
185
189
  NzToolTipModule,
186
190
  DeonNzFormFieldModule,
187
191
  DragDropModule,
188
- FormlyModule.forChild({
189
- types: [
190
- {
191
- name: 'repeat',
192
- component: DeonNzFieldRepeat,
193
- },
194
- {
195
- name: 'children',
196
- component: DeonNzFieldRepeat,
197
- },
198
- ],
199
- }),
192
+ FormlyModule.forChild(withFormlyFieldRepeat()),
200
193
  ],
201
194
  }]
202
195
  }] });
@@ -205,5 +198,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
205
198
  * Generated bundle index. Do not edit.
206
199
  */
207
200
 
208
- export { DeonNzFieldRepeat, DeonNzRepeatModule };
201
+ export { DeonNzFieldRepeat, DeonNzRepeatModule, withFormlyFieldRepeat };
209
202
  //# sourceMappingURL=type.repeat.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.repeat.mjs","sources":["../../../../packages/form/repeat/src/default/index.ts","../../../../packages/form/repeat/src/default/index.html","../../../../packages/form/repeat/src/index.module.ts","../../../../packages/form/repeat/type.repeat.ts"],"sourcesContent":["import { Component, AfterViewInit, OnInit, OnDestroy, OnChanges } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { FormlyModule, FieldArrayType, FieldTypeConfig } from '@kre-form/core';\nimport { GramDeonEmptyModule } from \"@ebuilding/base/components/empty\"\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\n\nimport _ from 'lodash';\n@Component({\n selector: 'deon-nz-field-repeat',\n templateUrl: './index.html',\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzToolTipModule,\n NzButtonModule,\n DragDropModule,\n NzIconModule,\n FormlyModule,\n GramDeonEmptyModule\n ]\n})\nexport class DeonNzFieldRepeat extends FieldArrayType<FieldTypeConfig> implements OnInit, OnDestroy, AfterViewInit, OnChanges {\n /**\n * 合并列\n */\n get colSpan() {\n let res = 0;\n if (this.field.fieldArray[\"fieldGroup\"]) {\n res = this.field.fieldArray[\"fieldGroup\"].length + 2;\n }\n return res;\n }\n\n get dragDisabled() {\n let result: boolean = true;\n if (this.editor != false && _.get(this.props, 'drag') == true) {\n result = false;\n }\n return result;\n }\n\n get clasName() {\n if (this.props && this.props[\"className\"]) {\n return this.props[\"className\"];\n }\n return null;\n }\n\n get operationShow() {\n if (this.props && this.props[\"operationShow\"] != undefined && this.props[\"operationShow\"] != null) {\n return this.props[\"operationShow\"];\n }\n return false;\n }\n\n drop(event: CdkDragDrop<string[]>) {\n moveItemInArray(this.field.fieldGroup, event.previousIndex, event.currentIndex);\n moveItemInArray(this.model, event.previousIndex, event.currentIndex);\n }\n constructor(public globalSrv: GramGlobalService) {\n super();\n }\n\n ngOnInit() { }\n ngOnDestroy() { }\n ngAfterViewInit() { }\n ngOnChanges(change: any) {\n // this.resize();\n }\n\n fieldEditor(f: any, i: number, m: any) {\n if (f && f?.props && f?.props?.builtin && f?.props?.builtin == true) {\n return true;\n }\n if (f && f.key == 'code' && m && m[i]['id']) {\n return false;\n }\n if (this.editor == false) {\n return false;\n } else {\n if (m && m[i] && m[i]?.builtin && m[i]?.builtin == true) {\n return false;\n }\n return true;\n }\n }\n\n addData() {\n this.add();\n this.globalSrv.notifyDataChanged('deon-field-repeat', {\n field: this.field,\n data: null,\n type: 'add',\n });\n }\n\n rowDelete(e: any) {\n this.remove(e);\n this.globalSrv.notifyDataChanged('deon-field-repeat', {\n field: this.field,\n data: e,\n type: 'delete',\n });\n }\n\n rowOperation(button: any, e: any) {\n this.globalSrv.notifyDataChanged('deon-field-repeat', {\n field: this.field,\n data: e,\n type: button?.type,\n });\n }\n\n checkDelete(index: number) {\n if (this.props[\"hideDelete\"] && Array.isArray(this.props[\"hideDelete\"])) {\n if (\n this.props[\"hideDelete\"].some((item: any) => {\n return item == index;\n })\n ) {\n return false;\n }\n }\n return true;\n }\n\n}\n","<div class=\"repeat-label\" *ngIf=\"props && props['hideLabel']!=false && props?.label\">{{props?.label}}</div>\n<div class=\"repeat-table\" [ngClass]=\"clasName\">\n <table>\n <thead>\n <tr>\n <th style=\"width: 50px\">序号</th>\n <ng-container *ngFor=\"let headerField of field?.fieldArray['fieldGroup']\">\n <ng-container *ngIf=\"headerField?.type=='deon-group' && headerField?.hide!=true;else tmpField\">\n <ng-container *ngFor=\"let item of headerField.fieldGroup\">\n <th *ngIf=\"item?.hide!=true\">\n <ng-container *ngIf=\"item && item?.props!==undefined && item?.props!==null\">\n <span style=\"color: red\" *ngIf=\"item?.props?.required\" class=\"required\"></span>\n {{item.props.label }}\n </ng-container>\n </th>\n </ng-container>\n </ng-container>\n <ng-template #tmpField>\n <th *ngIf=\"headerField?.hide!=true &&(headerField?.type!=='line' && headerField?.type!=='htmlcontent')\">\n <ng-container *ngIf=\"headerField && headerField?.props!==undefined && headerField?.props!==null\">\n <span style=\"color: red\" *ngIf=\"headerField?.props?.required\" class=\"required\"></span>\n {{ headerField.props.label }}\n </ng-container>\n </th>\n </ng-template>\n </ng-container>\n <th style=\"width: 60px\" *ngIf=\"isRemove || operationShow\">\n <span class=\"\">操作</span>\n </th>\n </tr>\n </thead>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container\n *ngIf=\"field?.fieldGroup!==undefined && field?.fieldGroup!==null && (field?.fieldGroup?.length ?? 0) > 0;else cardEmpty\">\n <tr *ngFor=\"let fields of field.fieldGroup; let i = index\" cdkDrag [cdkDragDisabled]=\"dragDisabled\">\n <td>\n <span class=\"serial\">{{ i + 1 }}</span>\n </td>\n <ng-container *ngFor=\"let f of fields.fieldGroup\">\n <ng-container *ngIf=\"f?.type=='deon-group' && f?.hide!=true;else tmpTd\">\n <ng-container *ngFor=\"let item of f.fieldGroup\">\n <td *ngIf=\"item?.hide!=true\">\n <formly-field [field]=\"item\" [hideLabel]=\"true\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-container>\n </ng-container>\n <ng-template #tmpTd>\n <td\n *ngIf=\"f && f?.type!==undefined && f?.type!==null && f?.hide!=true &&(f?.type!=='line' && f?.type!=='htmlcontent')\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\" [editor]=\"fieldEditor(f,i,model)\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-template>\n </ng-container>\n <td style=\"text-align: center\" *ngIf=\"isRemove || operationShow\">\n <ng-container *ngIf=\"props && props['operation'] && props['operation'].length>0\">\n <ng-container *ngFor=\"let o of props['operation']\">\n <a nz-tooltip [nzTooltipTitle]=\"o.label\" (click)=\"rowOperation(o,i)\"><i nz-icon\n [nzType]=\"o.icon\"></i></a>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRemove && (model==null || model[i]?.builtin!=true)\">\n <a nz-tooltip nzTooltipTitle=\"删除\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"(isAdd==true || props['add']==true) || props['viewRange']==true\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <ng-container *ngIf=\"isAdd==true && (props['add']==undefined || props['add']==null || props['add']==true)\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+添加</a>\n </ng-container>\n </td>\n </tr>\n </ng-container>\n <ng-template #cardEmpty>\n <tr>\n <td [attr.colspan]=\"colSpan\" style=\"text-align: center\">\n <gram-empty></gram-empty>\n </td>\n </tr>\n <tr *ngIf=\"isAdd && (props['add']==undefined || props['add']==null || props['add']==true)\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+添加</a>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@kre-form/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { NzTableModule } from 'ng-zorro-antd/table';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzModalModule } from 'ng-zorro-antd/modal';\n\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\n\nimport { DeonNzFieldRepeat } from './default/index';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzEmptyModule,\n NzTableModule,\n NzButtonModule,\n NzIconModule,\n NzModalModule,\n NzToolTipModule,\n DeonNzFormFieldModule,\n DragDropModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'repeat',\n component: DeonNzFieldRepeat,\n },\n {\n name: 'children',\n component: DeonNzFieldRepeat,\n },\n ],\n }),\n ],\n})\nexport class DeonNzRepeatModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAO,iBAAkB,SAAQ,cAA+B,CAAA;AAsCjD,IAAA,SAAA;AArCnB;;AAEG;AACH,IAAA,IAAI,OAAO,GAAA;QACT,IAAI,GAAG,GAAG,CAAC;QACX,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;AACvC,YAAA,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC;;AAEtD,QAAA,OAAO,GAAG;;AAGZ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BAAiB;AAC7B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA;;;AC1CD;;AAEG;;;;"}
1
+ {"version":3,"file":"type.repeat.mjs","sources":["../../../../packages/form/repeat/src/default/index.ts","../../../../packages/form/repeat/src/default/index.html","../../../../packages/form/repeat/src/app.config.ts","../../../../packages/form/repeat/src/index.module.ts","../../../../packages/form/repeat/type.repeat.ts"],"sourcesContent":["import { Component, AfterViewInit, OnInit, OnDestroy, OnChanges } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { FormlyModule, FieldArrayType, FieldTypeConfig } from '@ebuilding-form/core';\nimport { GramDeonEmptyModule } from \"@ebuilding/base/components/empty\"\nimport { GramGlobalService } from '@ebuilding/base/shared.srv/global.event';\n\nimport _ from 'lodash';\n@Component({\n selector: 'deon-nz-field-repeat',\n templateUrl: './index.html',\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzToolTipModule,\n NzButtonModule,\n DragDropModule,\n NzIconModule,\n FormlyModule,\n GramDeonEmptyModule\n ]\n})\nexport class DeonNzFieldRepeat extends FieldArrayType<FieldTypeConfig> implements OnInit, OnDestroy, AfterViewInit, OnChanges {\n /**\n * 合并列\n */\n get colSpan() {\n let res = 0;\n if (this.field.fieldArray[\"fieldGroup\"]) {\n res = this.field.fieldArray[\"fieldGroup\"].length + 2;\n }\n return res;\n }\n\n get dragDisabled() {\n let result: boolean = true;\n if (this.editor != false && _.get(this.props, 'drag') == true) {\n result = false;\n }\n return result;\n }\n\n get clasName() {\n if (this.props && this.props[\"className\"]) {\n return this.props[\"className\"];\n }\n return null;\n }\n\n get operationShow() {\n if (this.props && this.props[\"operationShow\"] != undefined && this.props[\"operationShow\"] != null) {\n return this.props[\"operationShow\"];\n }\n return false;\n }\n\n drop(event: CdkDragDrop<string[]>) {\n moveItemInArray(this.field.fieldGroup, event.previousIndex, event.currentIndex);\n moveItemInArray(this.model, event.previousIndex, event.currentIndex);\n }\n constructor(public globalSrv: GramGlobalService) {\n super();\n }\n\n ngOnInit() { }\n ngOnDestroy() { }\n ngAfterViewInit() { }\n ngOnChanges(change: any) {\n // this.resize();\n }\n\n fieldEditor(f: any, i: number, m: any) {\n if (f && f?.props && f?.props?.builtin && f?.props?.builtin == true) {\n return true;\n }\n if (f && f.key == 'code' && m && m[i]['id']) {\n return false;\n }\n if (this.editor == false) {\n return false;\n } else {\n if (m && m[i] && m[i]?.builtin && m[i]?.builtin == true) {\n return false;\n }\n return true;\n }\n }\n\n addData() {\n this.add();\n this.globalSrv.notifyDataChanged('deon-field-repeat', {\n field: this.field,\n data: null,\n type: 'add',\n });\n }\n\n rowDelete(e: any) {\n this.remove(e);\n this.globalSrv.notifyDataChanged('deon-field-repeat', {\n field: this.field,\n data: e,\n type: 'delete',\n });\n }\n\n rowOperation(button: any, e: any) {\n this.globalSrv.notifyDataChanged('deon-field-repeat', {\n field: this.field,\n data: e,\n type: button?.type,\n });\n }\n\n checkDelete(index: number) {\n if (this.props[\"hideDelete\"] && Array.isArray(this.props[\"hideDelete\"])) {\n if (\n this.props[\"hideDelete\"].some((item: any) => {\n return item == index;\n })\n ) {\n return false;\n }\n }\n return true;\n }\n\n}\n","<div class=\"repeat-label\" *ngIf=\"props && props['hideLabel']!=false && props?.label\">{{props?.label}}</div>\n<div class=\"repeat-table\" [ngClass]=\"clasName\">\n <table>\n <thead>\n <tr>\n <th style=\"width: 50px\">序号</th>\n <ng-container *ngFor=\"let headerField of field?.fieldArray['fieldGroup']\">\n <ng-container *ngIf=\"headerField?.type=='deon-group' && headerField?.hide!=true;else tmpField\">\n <ng-container *ngFor=\"let item of headerField.fieldGroup\">\n <th *ngIf=\"item?.hide!=true\">\n <ng-container *ngIf=\"item && item?.props!==undefined && item?.props!==null\">\n <span style=\"color: red\" *ngIf=\"item?.props?.required\" class=\"required\"></span>\n {{item.props.label }}\n </ng-container>\n </th>\n </ng-container>\n </ng-container>\n <ng-template #tmpField>\n <th *ngIf=\"headerField?.hide!=true &&(headerField?.type!=='line' && headerField?.type!=='htmlcontent')\">\n <ng-container *ngIf=\"headerField && headerField?.props!==undefined && headerField?.props!==null\">\n <span style=\"color: red\" *ngIf=\"headerField?.props?.required\" class=\"required\"></span>\n {{ headerField.props.label }}\n </ng-container>\n </th>\n </ng-template>\n </ng-container>\n <th style=\"width: 60px\" *ngIf=\"isRemove || operationShow\">\n <span class=\"\">操作</span>\n </th>\n </tr>\n </thead>\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container\n *ngIf=\"field?.fieldGroup!==undefined && field?.fieldGroup!==null && (field?.fieldGroup?.length ?? 0) > 0;else cardEmpty\">\n <tr *ngFor=\"let fields of field.fieldGroup; let i = index\" cdkDrag [cdkDragDisabled]=\"dragDisabled\">\n <td>\n <span class=\"serial\">{{ i + 1 }}</span>\n </td>\n <ng-container *ngFor=\"let f of fields.fieldGroup\">\n <ng-container *ngIf=\"f?.type=='deon-group' && f?.hide!=true;else tmpTd\">\n <ng-container *ngFor=\"let item of f.fieldGroup\">\n <td *ngIf=\"item?.hide!=true\">\n <formly-field [field]=\"item\" [hideLabel]=\"true\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-container>\n </ng-container>\n <ng-template #tmpTd>\n <td\n *ngIf=\"f && f?.type!==undefined && f?.type!==null && f?.hide!=true &&(f?.type!=='line' && f?.type!=='htmlcontent')\">\n <formly-field [field]=\"f\" [hideLabel]=\"true\" [editor]=\"fieldEditor(f,i,model)\"></formly-field>\n <ng-content></ng-content>\n </td>\n </ng-template>\n </ng-container>\n <td style=\"text-align: center\" *ngIf=\"isRemove || operationShow\">\n <ng-container *ngIf=\"props && props['operation'] && props['operation'].length>0\">\n <ng-container *ngFor=\"let o of props['operation']\">\n <a nz-tooltip [nzTooltipTitle]=\"o.label\" (click)=\"rowOperation(o,i)\"><i nz-icon\n [nzType]=\"o.icon\"></i></a>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRemove && (model==null || model[i]?.builtin!=true)\">\n <a nz-tooltip nzTooltipTitle=\"删除\" *ngIf=\"checkDelete(i)\" (click)=\"rowDelete(i)\"><i nz-icon\n nzType=\"delete\"></i></a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"(isAdd==true || props['add']==true) || props['viewRange']==true\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <ng-container *ngIf=\"isAdd==true && (props['add']==undefined || props['add']==null || props['add']==true)\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+添加</a>\n </ng-container>\n </td>\n </tr>\n </ng-container>\n <ng-template #cardEmpty>\n <tr>\n <td [attr.colspan]=\"colSpan\" style=\"text-align: center\">\n <gram-empty></gram-empty>\n </td>\n </tr>\n <tr *ngIf=\"isAdd && (props['add']==undefined || props['add']==null || props['add']==true)\" class=\"trBtnAdd\">\n <td [attr.colspan]=\"colSpan\">\n <a nz-button nzType=\"link\" (click)=\"addData()\">+添加</a>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldRepeat } from './default/index';\n\nexport function withFormlyFieldRepeat(): ConfigOption {\n return {\n types: [\n {\n name: 'repeat',\n component: DeonNzFieldRepeat,\n },\n {\n name: 'children',\n component: DeonNzFieldRepeat,\n }\n ]\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { NzTableModule } from 'ng-zorro-antd/table';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzModalModule } from 'ng-zorro-antd/modal';\n\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\n\nimport { withFormlyFieldRepeat } from './app.config';\n\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzEmptyModule,\n NzTableModule,\n NzButtonModule,\n NzIconModule,\n NzModalModule,\n NzToolTipModule,\n DeonNzFormFieldModule,\n DragDropModule,\n FormlyModule.forChild(withFormlyFieldRepeat()),\n\n ],\n})\nexport class DeonNzRepeatModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAO,iBAAkB,SAAQ,cAA+B,CAAA;AAsCjD,IAAA,SAAA;AArCnB;;AAEG;AACH,IAAA,IAAI,OAAO,GAAA;QACT,IAAI,GAAG,GAAG,CAAC;QACX,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;AACvC,YAAA,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC;;AAEtD,QAAA,OAAO,GAAG;;AAGZ,IAAA,IAAI,YAAY,GAAA;QACd,IAAI,MAAM,GAAY,IAAI;AAC1B,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;YAC7D,MAAM,GAAG,KAAK;;AAEhB,QAAA,OAAO,MAAM;;AAGf,IAAA,IAAI,QAAQ,GAAA;QACV,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;AACzC,YAAA,OAAO,IAAI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YACZ,aAAa;YACb,eAAe;YACf,qBAAqB;YACrB,cAAc,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA;AAKL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAd3B,YAAY;YACZ,mBAAmB;YACnB,aAAa;YACb,aAAa;YACb,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,qBAAqB;YACrB,cAAc;AACd,YAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAA,EAAA,CAAA;;4FAIrC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAhB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,aAAa;wBACb,aAAa;wBACb,cAAc;wBACd,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,qBAAqB;wBACrB,cAAc;AACd,wBAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;AAE/C,qBAAA;AACF,iBAAA;;;ACjCD;;AAEG;;;;"}
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
2
2
  import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i4 from '@kre-form/core';
6
- import { FieldType, FormlyModule } from '@kre-form/core';
5
+ import * as i4 from '@ebuilding-form/core';
6
+ import { FieldType, FormlyModule } from '@ebuilding-form/core';
7
7
  import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
8
8
  import * as i2 from '@angular/forms';
9
9
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -137,7 +137,7 @@ class DeonNzFieldSelect extends FieldType {
137
137
  <nz-option *ngIf="!item.group" [nzValue]="item.value" [nzDisabled]="item.disabled" [nzLabel]="item.label"></nz-option>
138
138
  </ng-container>
139
139
  </nz-select>
140
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3.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"] }, { kind: "component", type: i3.NzOptionGroupComponent, selector: "nz-option-group", inputs: ["nzLabel"], exportAs: ["nzOptionGroup"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
140
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3.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"] }, { kind: "component", type: i3.NzOptionGroupComponent, selector: "nz-option-group", inputs: ["nzLabel"], exportAs: ["nzOptionGroup"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i4.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
141
141
  }
142
142
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldSelect, decorators: [{
143
143
  type: Component,
@@ -175,24 +175,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
175
175
  }]
176
176
  }] });
177
177
 
178
+ function withFormlyFieldSelect() {
179
+ return {
180
+ types: [
181
+ {
182
+ name: 'select',
183
+ component: DeonNzFieldSelect,
184
+ wrappers: ['formly-form-field'],
185
+ },
186
+ { name: 'enum', extends: 'select' },
187
+ { name: 'eval_select', extends: 'select' },
188
+ { name: 'lookup_select', extends: 'select' },
189
+ ]
190
+ };
191
+ }
192
+
178
193
  class DeonNzSelectModule {
179
194
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
180
195
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzSelectModule, imports: [CommonModule,
181
196
  DeonNzFormFieldModule, i4.FormlyModule] });
182
197
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzSelectModule, imports: [CommonModule,
183
198
  DeonNzFormFieldModule,
184
- FormlyModule.forChild({
185
- types: [
186
- {
187
- name: 'select',
188
- component: DeonNzFieldSelect,
189
- wrappers: ['formly-form-field'],
190
- },
191
- { name: 'enum', extends: 'select' },
192
- { name: 'eval_select', extends: 'select' },
193
- { name: 'lookup_select', extends: 'select' },
194
- ],
195
- })] });
199
+ FormlyModule.forChild(withFormlyFieldSelect())] });
196
200
  }
197
201
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzSelectModule, decorators: [{
198
202
  type: NgModule,
@@ -200,18 +204,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
200
204
  imports: [
201
205
  CommonModule,
202
206
  DeonNzFormFieldModule,
203
- FormlyModule.forChild({
204
- types: [
205
- {
206
- name: 'select',
207
- component: DeonNzFieldSelect,
208
- wrappers: ['formly-form-field'],
209
- },
210
- { name: 'enum', extends: 'select' },
211
- { name: 'eval_select', extends: 'select' },
212
- { name: 'lookup_select', extends: 'select' },
213
- ],
214
- }),
207
+ FormlyModule.forChild(withFormlyFieldSelect()),
215
208
  ],
216
209
  }]
217
210
  }] });
@@ -220,5 +213,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
220
213
  * Generated bundle index. Do not edit.
221
214
  */
222
215
 
223
- export { DeonNzFieldSelect, DeonNzSelectModule };
216
+ export { DeonNzFieldSelect, DeonNzSelectModule, withFormlyFieldSelect };
224
217
  //# sourceMappingURL=type.select.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.select.mjs","sources":["../../../../packages/form/select/src/select.type.ts","../../../../packages/form/select/src/select.module.ts","../../../../packages/form/select/type.select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NzSelectModule } from 'ng-zorro-antd/select';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@kre-form/core';\n\n@Component({\n selector: 'deon-nz-field-select',\n template: ` \n <nz-select\n [nzDisabled]=\"editor == false\"\n [class.ng-dirty]=\"showError\"\n [nzPlaceHolder]=\"props.placeholder ? props.placeholder : '---请选择---'\"\n [formlyAttributes]=\"field\"\n nzAllowClear\n nzShowSearch\n [nzMode]=\"props.selectType === 'multiple' ? 'multiple' : 'default'\"\n (ngModelChange)=\"selectedChange($event)\"\n [(ngModel)]=\"getModelValue\"\n > \n <ng-container *ngFor=\"let item of getOptions()\">\n <nz-option-group *ngIf=\"item.group\" [nzLabel]=\"item.label\">\n <nz-option *ngFor=\"let child of item.group\" [nzValue]=\"child.value\" [nzDisabled]=\"child.disabled\" [nzLabel]=\"child.label\">\n </nz-option>\n </nz-option-group>\n <nz-option *ngIf=\"!item.group\" [nzValue]=\"item.value\" [nzDisabled]=\"item.disabled\" [nzLabel]=\"item.label\"></nz-option>\n </ng-container> \n </nz-select> \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzSelectModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldSelect extends FieldType<FieldTypeConfig> {\n override defaultOptions = {\n props: { options: null },\n };\n _defaultValue: string = '';\n _defaultValues: string[] = [];\n selectType = 'default';\n listOfSelectedValue: any;\n\n getOptions() {\n if (this.props['options'] instanceof Array) {\n return this.props['options'];\n } else {\n return [];\n }\n }\n\n get password() {\n if (this.props && this.props[\"password\"] == true) {\n return true;\n }\n return false;\n }\n\n get getModelValue() {\n if (this.props.selectType === 'multiple') {\n return this.defaultValues;\n } else {\n return this.defaultValue;\n }\n }\n\n set getModelValue(value: any) { }\n\n get defaultValue() {\n if (this.model!! && this.model[this.key]!!) {\n this._defaultValue = this.model[this.key];\n } else {\n return null;\n }\n return this._defaultValue;\n }\n get defaultValues() {\n if (this.model!! && this.model[this.key]!! && Array.isArray(this.model[this.key])) {\n this._defaultValues.length = 0;\n this.model[this.key].forEach((item: any) => {\n this._defaultValues.push(item?.value);\n });\n } else {\n return null;\n }\n return this._defaultValues;\n }\n\n get getModelText() {\n let result: any = '';\n if (this.model!! && this.model[this.key]!!) {\n if (this.props.selectType === 'multiple') {\n if (Array.isArray(this.model[this.key])) {\n this.model[this.key].forEach((item: any, index: number) => {\n if (index > 0) {\n result = `${result},${item?.label}`;\n } else {\n result = item?.label;\n }\n });\n }\n } else {\n result = this.model[this.key];\n }\n }\n return result;\n }\n\n selectedChange(e: any) {\n if (this.props.selectType && this.props.selectType == 'multiple') {\n let values: any[] = [];\n if (e && Array.isArray(e)) {\n e.forEach((item: any) => {\n if (this.props.options && Array.isArray(this.props.options)) {\n this.props.options.forEach((options: any) => {\n if (options.value == item) {\n values.push(options);\n }\n });\n }\n });\n }\n this.formControl.patchValue(values);\n this.formControl.markAsTouched();\n } else {\n let value: any = null;\n if (this.props.options && Array.isArray(this.props.options)) {\n this.props.options.forEach((options: any) => {\n if (options.value == e) {\n // value = {};\n // value['value'] = options?.value;\n // value['label'] = options?.label;\n value = options.value;\n }\n });\n }\n\n this.formControl.patchValue(value);\n this.formControl.markAsTouched();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@kre-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\n\nimport { DeonNzFieldSelect } from './select.type';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: DeonNzFieldSelect,\n wrappers: ['formly-form-field'],\n },\n { name: 'enum', extends: 'select' },\n { name: 'eval_select', extends: 'select' },\n { name: 'lookup_select', extends: 'select' },\n ],\n }),\n ],\n})\nexport class DeonNzSelectModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAsCM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AACtD,IAAA,cAAc,GAAG;AACxB,QAAA,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KACzB;IACD,aAAa,GAAW,EAAE;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;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACnC,gCAAA,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC1C,gCAAA,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC7C,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
1
+ {"version":3,"file":"type.select.mjs","sources":["../../../../packages/form/select/src/select.type.ts","../../../../packages/form/select/src/app.config.ts","../../../../packages/form/select/src/select.module.ts","../../../../packages/form/select/type.select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NzSelectModule } from 'ng-zorro-antd/select';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@ebuilding-form/core';\n\n@Component({\n selector: 'deon-nz-field-select',\n template: ` \n <nz-select\n [nzDisabled]=\"editor == false\"\n [class.ng-dirty]=\"showError\"\n [nzPlaceHolder]=\"props.placeholder ? props.placeholder : '---请选择---'\"\n [formlyAttributes]=\"field\"\n nzAllowClear\n nzShowSearch\n [nzMode]=\"props.selectType === 'multiple' ? 'multiple' : 'default'\"\n (ngModelChange)=\"selectedChange($event)\"\n [(ngModel)]=\"getModelValue\"\n > \n <ng-container *ngFor=\"let item of getOptions()\">\n <nz-option-group *ngIf=\"item.group\" [nzLabel]=\"item.label\">\n <nz-option *ngFor=\"let child of item.group\" [nzValue]=\"child.value\" [nzDisabled]=\"child.disabled\" [nzLabel]=\"child.label\">\n </nz-option>\n </nz-option-group>\n <nz-option *ngIf=\"!item.group\" [nzValue]=\"item.value\" [nzDisabled]=\"item.disabled\" [nzLabel]=\"item.label\"></nz-option>\n </ng-container> \n </nz-select> \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzSelectModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldSelect extends FieldType<FieldTypeConfig> {\n override defaultOptions = {\n props: { options: null },\n };\n _defaultValue: string = '';\n _defaultValues: string[] = [];\n selectType = 'default';\n listOfSelectedValue: any;\n\n getOptions() {\n if (this.props['options'] instanceof Array) {\n return this.props['options'];\n } else {\n return [];\n }\n }\n\n get password() {\n if (this.props && this.props[\"password\"] == true) {\n return true;\n }\n return false;\n }\n\n get getModelValue() {\n if (this.props.selectType === 'multiple') {\n return this.defaultValues;\n } else {\n return this.defaultValue;\n }\n }\n\n set getModelValue(value: any) { }\n\n get defaultValue() {\n if (this.model!! && this.model[this.key]!!) {\n this._defaultValue = this.model[this.key];\n } else {\n return null;\n }\n return this._defaultValue;\n }\n get defaultValues() {\n if (this.model!! && this.model[this.key]!! && Array.isArray(this.model[this.key])) {\n this._defaultValues.length = 0;\n this.model[this.key].forEach((item: any) => {\n this._defaultValues.push(item?.value);\n });\n } else {\n return null;\n }\n return this._defaultValues;\n }\n\n get getModelText() {\n let result: any = '';\n if (this.model!! && this.model[this.key]!!) {\n if (this.props.selectType === 'multiple') {\n if (Array.isArray(this.model[this.key])) {\n this.model[this.key].forEach((item: any, index: number) => {\n if (index > 0) {\n result = `${result},${item?.label}`;\n } else {\n result = item?.label;\n }\n });\n }\n } else {\n result = this.model[this.key];\n }\n }\n return result;\n }\n\n selectedChange(e: any) {\n if (this.props.selectType && this.props.selectType == 'multiple') {\n let values: any[] = [];\n if (e && Array.isArray(e)) {\n e.forEach((item: any) => {\n if (this.props.options && Array.isArray(this.props.options)) {\n this.props.options.forEach((options: any) => {\n if (options.value == item) {\n values.push(options);\n }\n });\n }\n });\n }\n this.formControl.patchValue(values);\n this.formControl.markAsTouched();\n } else {\n let value: any = null;\n if (this.props.options && Array.isArray(this.props.options)) {\n this.props.options.forEach((options: any) => {\n if (options.value == e) {\n // value = {};\n // value['value'] = options?.value;\n // value['label'] = options?.label;\n value = options.value;\n }\n });\n }\n\n this.formControl.patchValue(value);\n this.formControl.markAsTouched();\n }\n }\n}\n","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldSelect } from './select.type';\n\nexport function withFormlyFieldSelect(): ConfigOption {\n return {\n types: [\n {\n name: 'select',\n component: DeonNzFieldSelect,\n wrappers: ['formly-form-field'],\n },\n { name: 'enum', extends: 'select' },\n { name: 'eval_select', extends: 'select' },\n { name: 'lookup_select', extends: 'select' },\n ]\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\n\nimport { withFormlyFieldSelect } from './app.config';\n\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldSelect()),\n\n ],\n})\nexport class DeonNzSelectModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAsCM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AACtD,IAAA,cAAc,GAAG;AACxB,QAAA,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KACzB;IACD,aAAa,GAAW,EAAE;IAC1B,cAAc,GAAa,EAAE;IAC7B,UAAU,GAAG,SAAS;AACtB,IAAA,mBAAmB;IAEnB,UAAU,GAAA;QACR,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,KAAK,EAAE;AAC1C,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;;aACvB;AACL,YAAA,OAAO,EAAE;;;AAIb,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,IAAI,EAAE;AAChD,YAAA,OAAO,IAAI;;AAEb,QAAA,OAAO,KAAK;;AAGd,IAAA,IAAI,aAAa,GAAA;Q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