@silver-formily/element-plus 4.0.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/esm/__builtins__/shared/loading.mjs.map +1 -1
  2. package/esm/__builtins__/shared/transform-component.mjs +1 -1
  3. package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
  4. package/esm/__builtins__/shared/utils.mjs +11 -6
  5. package/esm/__builtins__/shared/utils.mjs.map +1 -1
  6. package/esm/array-base/array-base-inner.mjs.map +1 -1
  7. package/esm/array-base/array-base-move-down.mjs +1 -1
  8. package/esm/array-base/array-base-move-down.mjs.map +1 -1
  9. package/esm/array-base/array-base-move-up.mjs +1 -1
  10. package/esm/array-base/array-base-move-up.mjs.map +1 -1
  11. package/esm/array-base/array-base-remove.mjs +1 -1
  12. package/esm/array-base/array-base-remove.mjs.map +1 -1
  13. package/esm/array-base/types.d.ts +2 -2
  14. package/esm/array-base/utils.d.ts +1 -1
  15. package/esm/array-base/utils.mjs +1 -1
  16. package/esm/array-base/utils.mjs.map +1 -1
  17. package/esm/array-cards/array-cards.mjs +1 -1
  18. package/esm/array-cards/array-cards.mjs.map +1 -1
  19. package/esm/array-collapse/array-collapse-item.mjs +1 -1
  20. package/esm/array-collapse/array-collapse-item.mjs.map +1 -1
  21. package/esm/array-collapse/array-collapse.mjs +3 -4
  22. package/esm/array-collapse/array-collapse.mjs.map +1 -1
  23. package/esm/array-items/array-items.mjs +3 -8
  24. package/esm/array-items/array-items.mjs.map +1 -1
  25. package/esm/array-list-tabs/array-list-tabs.mjs +57 -51
  26. package/esm/array-list-tabs/array-list-tabs.mjs.map +1 -1
  27. package/esm/array-list-tabs/utils.mjs.map +1 -1
  28. package/esm/array-table/array-table.mjs +4 -18
  29. package/esm/array-table/array-table.mjs.map +1 -1
  30. package/esm/array-table/utils.mjs.map +1 -1
  31. package/esm/array-tabs/array-tabs.mjs +1 -1
  32. package/esm/array-tabs/array-tabs.mjs.map +1 -1
  33. package/esm/autocomplete/autocomplete.mjs.map +1 -1
  34. package/esm/autocomplete/index.d.ts +3 -4
  35. package/esm/checkbox/checkbox-group.mjs +1 -1
  36. package/esm/checkbox/checkbox-group.mjs.map +1 -1
  37. package/esm/checkbox/index.d.ts +57 -57
  38. package/esm/color-picker/index.d.ts +20 -20
  39. package/esm/color-picker-panel/index.d.ts +9 -9
  40. package/esm/date-picker-panel/index.d.ts +1 -1
  41. package/esm/editable/editable-popover.mjs +1 -1
  42. package/esm/editable/editable-popover.mjs.map +1 -1
  43. package/esm/editable/editable.mjs +1 -1
  44. package/esm/editable/editable.mjs.map +1 -1
  45. package/esm/form/form.mjs.map +1 -1
  46. package/esm/form/form.vue.d.ts +1 -1
  47. package/esm/form-collapse/form-collapse.mjs +1 -1
  48. package/esm/form-collapse/form-collapse.mjs.map +1 -1
  49. package/esm/form-collapse/utils.d.ts +2 -2
  50. package/esm/form-collapse/utils.mjs +2 -2
  51. package/esm/form-collapse/utils.mjs.map +1 -1
  52. package/esm/form-dialog/dialog-content.mjs +1 -1
  53. package/esm/form-dialog/dialog-content.mjs.map +1 -1
  54. package/esm/form-dialog/index.mjs +3 -3
  55. package/esm/form-dialog/index.mjs.map +1 -1
  56. package/esm/form-dialog/types.d.ts +2 -2
  57. package/esm/form-drawer/drawer-content.mjs +1 -1
  58. package/esm/form-drawer/drawer-content.mjs.map +1 -1
  59. package/esm/form-drawer/index.mjs +3 -3
  60. package/esm/form-drawer/index.mjs.map +1 -1
  61. package/esm/form-drawer/types.d.ts +2 -2
  62. package/esm/form-grid/form-grid-column.mjs +6 -4
  63. package/esm/form-grid/form-grid-column.mjs.map +1 -1
  64. package/esm/form-item/form-item.mjs +1 -1
  65. package/esm/form-item/form-item.mjs.map +1 -1
  66. package/esm/form-item/index.mjs +1 -1
  67. package/esm/form-item/index.mjs.map +1 -1
  68. package/esm/form-item/utils.mjs +1 -1
  69. package/esm/form-item/utils.mjs.map +1 -1
  70. package/esm/form-layout/form-layout.mjs +1 -1
  71. package/esm/form-layout/form-layout.mjs.map +1 -1
  72. package/esm/form-layout/form-layout.vue.d.ts +1 -1
  73. package/esm/form-layout/utils.mjs +1 -1
  74. package/esm/form-layout/utils.mjs.map +1 -1
  75. package/esm/form-step/form-step.mjs +1 -1
  76. package/esm/form-step/form-step.mjs.map +1 -1
  77. package/esm/form-step/types.d.ts +1 -1
  78. package/esm/form-step/utils.d.ts +1 -1
  79. package/esm/form-step/utils.mjs +1 -1
  80. package/esm/form-step/utils.mjs.map +1 -1
  81. package/esm/form-tab/hooks.mjs.map +1 -1
  82. package/esm/form-tab/utils.mjs +1 -1
  83. package/esm/form-tab/utils.mjs.map +1 -1
  84. package/esm/input-number/index.d.ts +21 -21
  85. package/esm/input-tag/index.d.ts +1 -2
  86. package/esm/input-tag/input-tag.mjs.map +1 -1
  87. package/esm/mention/index.d.ts +3 -4
  88. package/esm/mention/mention.mjs.map +1 -1
  89. package/esm/pagination/components/pager2.mjs.map +1 -1
  90. package/esm/pagination/components/sizes2.mjs +1 -1
  91. package/esm/pagination/components/sizes2.mjs.map +1 -1
  92. package/esm/picker-select/picker-select.mjs +1 -1
  93. package/esm/picker-select/picker-select.mjs.map +1 -1
  94. package/esm/picker-select/types.d.ts +1 -1
  95. package/esm/preview-text/cascader.mjs.map +1 -1
  96. package/esm/preview-text/color-picker.mjs +1 -1
  97. package/esm/preview-text/color-picker.mjs.map +1 -1
  98. package/esm/preview-text/input.mjs +1 -1
  99. package/esm/preview-text/input.mjs.map +1 -1
  100. package/esm/preview-text/rate.mjs +1 -1
  101. package/esm/preview-text/rate.mjs.map +1 -1
  102. package/esm/preview-text/select.mjs +9 -4
  103. package/esm/preview-text/select.mjs.map +1 -1
  104. package/esm/preview-text/time-picker.mjs +1 -1
  105. package/esm/preview-text/time-picker.mjs.map +1 -1
  106. package/esm/preview-text/tree.mjs.map +1 -1
  107. package/esm/query-form/hooks.mjs +1 -1
  108. package/esm/query-form/hooks.mjs.map +1 -1
  109. package/esm/query-form/index.d.ts +5 -5
  110. package/esm/query-form/query-form-light.mjs +14 -7
  111. package/esm/query-form/query-form-light.mjs.map +1 -1
  112. package/esm/query-form/query-form.mjs +14 -7
  113. package/esm/query-form/query-form.mjs.map +1 -1
  114. package/esm/query-form/types.d.ts +9 -2
  115. package/esm/query-form-item/index.d.ts +4 -4
  116. package/esm/query-form-item/query-form-item.mjs +2 -2
  117. package/esm/query-form-item/query-form-item.mjs.map +1 -1
  118. package/esm/query-form-item/types.d.ts +2 -2
  119. package/esm/radio/index.d.ts +60 -60
  120. package/esm/radio/radio-group.mjs +5 -3
  121. package/esm/radio/radio-group.mjs.map +1 -1
  122. package/esm/rate/index.d.ts +10 -10
  123. package/esm/select/index.d.ts +7 -7
  124. package/esm/select-table/index.d.ts +3 -3
  125. package/esm/select-table/select-table.mjs +1 -1
  126. package/esm/select-table/select-table.mjs.map +1 -1
  127. package/esm/select-table/types.d.ts +1 -1
  128. package/esm/submit/submit.mjs.map +1 -1
  129. package/esm/switch/index.d.ts +27 -27
  130. package/esm/time-select/index.d.ts +20 -20
  131. package/esm/transfer/index.d.ts +21 -21
  132. package/esm/tree/tree.mjs +1 -1
  133. package/esm/tree/tree.mjs.map +1 -1
  134. package/esm/tree-select/tree-select.mjs.map +1 -1
  135. package/esm/upload/upload.mjs +1 -1
  136. package/esm/upload/upload.mjs.map +1 -1
  137. package/package.json +18 -14
@@ -4,10 +4,6 @@ import * as _$vue from "vue";
4
4
  //#region src/checkbox/index.d.ts
5
5
  declare const Checkbox: {
6
6
  new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
7
- modelValue: {
8
- type: _$vue.PropType<string | number | boolean>;
9
- default: undefined;
10
- };
11
7
  value: {
12
8
  type: _$vue.PropType<string | number | boolean | object>;
13
9
  default: undefined;
@@ -16,12 +12,16 @@ declare const Checkbox: {
16
12
  type: _$vue.PropType<string>;
17
13
  default: undefined;
18
14
  };
15
+ size: {
16
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
17
+ };
19
18
  disabled: {
20
19
  type: _$vue.PropType<boolean>;
21
20
  default: undefined;
22
21
  };
23
- size: {
24
- type: _$vue.PropType<"" | "default" | "small" | "large">;
22
+ modelValue: {
23
+ type: _$vue.PropType<string | number | boolean>;
24
+ default: undefined;
25
25
  };
26
26
  validateEvent: {
27
27
  type: _$vue.PropType<boolean>;
@@ -95,10 +95,6 @@ declare const Checkbox: {
95
95
  M: {};
96
96
  Defaults: {};
97
97
  }, Readonly<_$vue.ExtractPropTypes<{
98
- modelValue: {
99
- type: _$vue.PropType<string | number | boolean>;
100
- default: undefined;
101
- };
102
98
  value: {
103
99
  type: _$vue.PropType<string | number | boolean | object>;
104
100
  default: undefined;
@@ -107,12 +103,16 @@ declare const Checkbox: {
107
103
  type: _$vue.PropType<string>;
108
104
  default: undefined;
109
105
  };
106
+ size: {
107
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
108
+ };
110
109
  disabled: {
111
110
  type: _$vue.PropType<boolean>;
112
111
  default: undefined;
113
112
  };
114
- size: {
115
- type: _$vue.PropType<"" | "default" | "small" | "large">;
113
+ modelValue: {
114
+ type: _$vue.PropType<string | number | boolean>;
115
+ default: undefined;
116
116
  };
117
117
  validateEvent: {
118
118
  type: _$vue.PropType<boolean>;
@@ -180,10 +180,6 @@ declare const Checkbox: {
180
180
  __isTeleport?: never;
181
181
  __isSuspense?: never;
182
182
  } & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
183
- modelValue: {
184
- type: _$vue.PropType<string | number | boolean>;
185
- default: undefined;
186
- };
187
183
  value: {
188
184
  type: _$vue.PropType<string | number | boolean | object>;
189
185
  default: undefined;
@@ -192,12 +188,16 @@ declare const Checkbox: {
192
188
  type: _$vue.PropType<string>;
193
189
  default: undefined;
194
190
  };
191
+ size: {
192
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
193
+ };
195
194
  disabled: {
196
195
  type: _$vue.PropType<boolean>;
197
196
  default: undefined;
198
197
  };
199
- size: {
200
- type: _$vue.PropType<"" | "default" | "small" | "large">;
198
+ modelValue: {
199
+ type: _$vue.PropType<string | number | boolean>;
200
+ default: undefined;
201
201
  };
202
202
  validateEvent: {
203
203
  type: _$vue.PropType<boolean>;
@@ -270,10 +270,6 @@ declare const Checkbox: {
270
270
  }) & _$vue.ObjectPlugin & {
271
271
  CheckboxButton: {
272
272
  new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
273
- modelValue: {
274
- type: _$vue.PropType<string | number | boolean>;
275
- default: undefined;
276
- };
277
273
  value: {
278
274
  type: _$vue.PropType<string | number | boolean | object>;
279
275
  default: undefined;
@@ -282,12 +278,16 @@ declare const Checkbox: {
282
278
  type: _$vue.PropType<string>;
283
279
  default: undefined;
284
280
  };
281
+ size: {
282
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
283
+ };
285
284
  disabled: {
286
285
  type: _$vue.PropType<boolean>;
287
286
  default: undefined;
288
287
  };
289
- size: {
290
- type: _$vue.PropType<"" | "default" | "small" | "large">;
288
+ modelValue: {
289
+ type: _$vue.PropType<string | number | boolean>;
290
+ default: undefined;
291
291
  };
292
292
  validateEvent: {
293
293
  type: _$vue.PropType<boolean>;
@@ -361,10 +361,6 @@ declare const Checkbox: {
361
361
  M: {};
362
362
  Defaults: {};
363
363
  }, Readonly<_$vue.ExtractPropTypes<{
364
- modelValue: {
365
- type: _$vue.PropType<string | number | boolean>;
366
- default: undefined;
367
- };
368
364
  value: {
369
365
  type: _$vue.PropType<string | number | boolean | object>;
370
366
  default: undefined;
@@ -373,12 +369,16 @@ declare const Checkbox: {
373
369
  type: _$vue.PropType<string>;
374
370
  default: undefined;
375
371
  };
372
+ size: {
373
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
374
+ };
376
375
  disabled: {
377
376
  type: _$vue.PropType<boolean>;
378
377
  default: undefined;
379
378
  };
380
- size: {
381
- type: _$vue.PropType<"" | "default" | "small" | "large">;
379
+ modelValue: {
380
+ type: _$vue.PropType<string | number | boolean>;
381
+ default: undefined;
382
382
  };
383
383
  validateEvent: {
384
384
  type: _$vue.PropType<boolean>;
@@ -446,10 +446,6 @@ declare const Checkbox: {
446
446
  __isTeleport?: never;
447
447
  __isSuspense?: never;
448
448
  } & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
449
- modelValue: {
450
- type: _$vue.PropType<string | number | boolean>;
451
- default: undefined;
452
- };
453
449
  value: {
454
450
  type: _$vue.PropType<string | number | boolean | object>;
455
451
  default: undefined;
@@ -458,12 +454,16 @@ declare const Checkbox: {
458
454
  type: _$vue.PropType<string>;
459
455
  default: undefined;
460
456
  };
457
+ size: {
458
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
459
+ };
461
460
  disabled: {
462
461
  type: _$vue.PropType<boolean>;
463
462
  default: undefined;
464
463
  };
465
- size: {
466
- type: _$vue.PropType<"" | "default" | "small" | "large">;
464
+ modelValue: {
465
+ type: _$vue.PropType<string | number | boolean>;
466
+ default: undefined;
467
467
  };
468
468
  validateEvent: {
469
469
  type: _$vue.PropType<boolean>;
@@ -536,9 +536,8 @@ declare const Checkbox: {
536
536
  });
537
537
  CheckboxGroup: {
538
538
  new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
539
- modelValue: {
540
- type: _$vue.PropType<_$element_plus0.CheckboxGroupValueType>;
541
- default: () => never[];
539
+ fill: {
540
+ type: _$vue.PropType<string>;
542
541
  };
543
542
  props: {
544
543
  type: _$vue.PropType<{
@@ -556,15 +555,16 @@ declare const Checkbox: {
556
555
  type: _$vue.PropType<"button" | "checkbox">;
557
556
  default: string;
558
557
  };
559
- fill: {
560
- type: _$vue.PropType<string>;
558
+ size: {
559
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
561
560
  };
562
561
  disabled: {
563
562
  type: _$vue.PropType<boolean>;
564
563
  default: undefined;
565
564
  };
566
- size: {
567
- type: _$vue.PropType<"" | "default" | "small" | "large">;
565
+ modelValue: {
566
+ type: _$vue.PropType<_$element_plus0.CheckboxGroupValueType>;
567
+ default: () => never[];
568
568
  };
569
569
  options: {
570
570
  type: _$vue.PropType<_$element_plus0.CheckboxOption[]>;
@@ -614,9 +614,8 @@ declare const Checkbox: {
614
614
  M: {};
615
615
  Defaults: {};
616
616
  }, Readonly<_$vue.ExtractPropTypes<{
617
- modelValue: {
618
- type: _$vue.PropType<_$element_plus0.CheckboxGroupValueType>;
619
- default: () => never[];
617
+ fill: {
618
+ type: _$vue.PropType<string>;
620
619
  };
621
620
  props: {
622
621
  type: _$vue.PropType<{
@@ -634,15 +633,16 @@ declare const Checkbox: {
634
633
  type: _$vue.PropType<"button" | "checkbox">;
635
634
  default: string;
636
635
  };
637
- fill: {
638
- type: _$vue.PropType<string>;
636
+ size: {
637
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
639
638
  };
640
639
  disabled: {
641
640
  type: _$vue.PropType<boolean>;
642
641
  default: undefined;
643
642
  };
644
- size: {
645
- type: _$vue.PropType<"" | "default" | "small" | "large">;
643
+ modelValue: {
644
+ type: _$vue.PropType<_$element_plus0.CheckboxGroupValueType>;
645
+ default: () => never[];
646
646
  };
647
647
  options: {
648
648
  type: _$vue.PropType<_$element_plus0.CheckboxOption[]>;
@@ -686,9 +686,8 @@ declare const Checkbox: {
686
686
  __isTeleport?: never;
687
687
  __isSuspense?: never;
688
688
  } & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
689
- modelValue: {
690
- type: _$vue.PropType<_$element_plus0.CheckboxGroupValueType>;
691
- default: () => never[];
689
+ fill: {
690
+ type: _$vue.PropType<string>;
692
691
  };
693
692
  props: {
694
693
  type: _$vue.PropType<{
@@ -706,15 +705,16 @@ declare const Checkbox: {
706
705
  type: _$vue.PropType<"button" | "checkbox">;
707
706
  default: string;
708
707
  };
709
- fill: {
710
- type: _$vue.PropType<string>;
708
+ size: {
709
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
711
710
  };
712
711
  disabled: {
713
712
  type: _$vue.PropType<boolean>;
714
713
  default: undefined;
715
714
  };
716
- size: {
717
- type: _$vue.PropType<"" | "default" | "small" | "large">;
715
+ modelValue: {
716
+ type: _$vue.PropType<_$element_plus0.CheckboxGroupValueType>;
717
+ default: () => never[];
718
718
  };
719
719
  options: {
720
720
  type: _$vue.PropType<_$element_plus0.CheckboxOption[]>;
@@ -6,14 +6,21 @@ import * as _$element_plus_es_utils_index_mjs0 from "element-plus/es/utils/index
6
6
  //#region src/color-picker/index.d.ts
7
7
  type ColorPickerProps = typeof ElColorPicker;
8
8
  declare const ColorPicker: _$element_plus_es_utils_index_mjs0.SFCWithInstall<_$vue.DefineComponent<{
9
- modelValue: {
10
- type: _$vue.PropType<string>;
11
- default: undefined;
9
+ size: {
10
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
11
+ };
12
+ teleported: {
13
+ type: _$vue.PropType<boolean>;
14
+ default: true;
12
15
  };
13
16
  disabled: {
14
17
  type: _$vue.PropType<boolean>;
15
18
  default: undefined;
16
19
  };
20
+ modelValue: {
21
+ type: _$vue.PropType<string>;
22
+ default: undefined;
23
+ };
17
24
  popperClass: {
18
25
  type: _$vue.PropType<string | {
19
26
  [x: string]: boolean;
@@ -45,13 +52,6 @@ declare const ColorPicker: _$element_plus_es_utils_index_mjs0.SFCWithInstall<_$v
45
52
  type: _$vue.PropType<_$vue.StyleValue>;
46
53
  default: undefined;
47
54
  };
48
- teleported: {
49
- type: _$vue.PropType<boolean>;
50
- default: true;
51
- };
52
- size: {
53
- type: _$vue.PropType<"" | "default" | "small" | "large">;
54
- };
55
55
  clearable: {
56
56
  type: _$vue.PropType<boolean>;
57
57
  default: true;
@@ -107,14 +107,21 @@ declare const ColorPicker: _$element_plus_es_utils_index_mjs0.SFCWithInstall<_$v
107
107
  blur: (evt: FocusEvent) => void;
108
108
  activeChange: (val: string | null) => void;
109
109
  }, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
110
- modelValue: {
111
- type: _$vue.PropType<string>;
112
- default: undefined;
110
+ size: {
111
+ type: _$vue.PropType<"" | "default" | "small" | "large">;
112
+ };
113
+ teleported: {
114
+ type: _$vue.PropType<boolean>;
115
+ default: true;
113
116
  };
114
117
  disabled: {
115
118
  type: _$vue.PropType<boolean>;
116
119
  default: undefined;
117
120
  };
121
+ modelValue: {
122
+ type: _$vue.PropType<string>;
123
+ default: undefined;
124
+ };
118
125
  popperClass: {
119
126
  type: _$vue.PropType<string | {
120
127
  [x: string]: boolean;
@@ -146,13 +153,6 @@ declare const ColorPicker: _$element_plus_es_utils_index_mjs0.SFCWithInstall<_$v
146
153
  type: _$vue.PropType<_$vue.StyleValue>;
147
154
  default: undefined;
148
155
  };
149
- teleported: {
150
- type: _$vue.PropType<boolean>;
151
- default: true;
152
- };
153
- size: {
154
- type: _$vue.PropType<"" | "default" | "small" | "large">;
155
- };
156
156
  clearable: {
157
157
  type: _$vue.PropType<boolean>;
158
158
  default: true;
@@ -8,13 +8,13 @@ import * as _$element_plus_es_utils_index_mjs0 from "element-plus/es/utils/index
8
8
  type ColorPickerPanelProps = typeof ElColorPickerPanel;
9
9
  declare const ColorPickerPanel: _$element_plus_es_utils_index_mjs0.SFCWithInstall<{
10
10
  new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
11
+ disabled: {
12
+ type: _$vue.PropType<boolean>;
13
+ };
11
14
  modelValue: {
12
15
  type: _$vue.PropType<string>;
13
16
  default: undefined;
14
17
  };
15
- disabled: {
16
- type: _$vue.PropType<boolean>;
17
- };
18
18
  validateEvent: {
19
19
  type: _$vue.PropType<boolean>;
20
20
  default: boolean;
@@ -52,13 +52,13 @@ declare const ColorPickerPanel: _$element_plus_es_utils_index_mjs0.SFCWithInstal
52
52
  M: {};
53
53
  Defaults: {};
54
54
  }, Readonly<_$vue.ExtractPropTypes<{
55
+ disabled: {
56
+ type: _$vue.PropType<boolean>;
57
+ };
55
58
  modelValue: {
56
59
  type: _$vue.PropType<string>;
57
60
  default: undefined;
58
61
  };
59
- disabled: {
60
- type: _$vue.PropType<boolean>;
61
- };
62
62
  validateEvent: {
63
63
  type: _$vue.PropType<boolean>;
64
64
  default: boolean;
@@ -91,13 +91,13 @@ declare const ColorPickerPanel: _$element_plus_es_utils_index_mjs0.SFCWithInstal
91
91
  __isTeleport?: never;
92
92
  __isSuspense?: never;
93
93
  } & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
94
+ disabled: {
95
+ type: _$vue.PropType<boolean>;
96
+ };
94
97
  modelValue: {
95
98
  type: _$vue.PropType<string>;
96
99
  default: undefined;
97
100
  };
98
- disabled: {
99
- type: _$vue.PropType<boolean>;
100
- };
101
101
  validateEvent: {
102
102
  type: _$vue.PropType<boolean>;
103
103
  default: boolean;
@@ -64,7 +64,7 @@ declare const DatePickerPanel: _$element_plus_es_utils_index_mjs0.SFCWithInstall
64
64
  __epPropKey: true;
65
65
  };
66
66
  readonly isRange: BooleanConstructor;
67
- }, () => _$vue_jsx_runtime0.JSX.Element, unknown, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, ("clear" | "update:modelValue" | "calendar-change" | "panel-change" | "visible-change")[], "clear" | "update:modelValue" | "calendar-change" | "panel-change" | "visible-change", _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
67
+ }, () => _$vue_jsx_runtime0.JSX.Element, unknown, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, ("update:modelValue" | "clear" | "calendar-change" | "panel-change" | "visible-change")[], "update:modelValue" | "clear" | "calendar-change" | "panel-change" | "visible-change", _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
68
68
  readonly disabledDate: {
69
69
  readonly type: _$vue.PropType<Function>;
70
70
  readonly required: false;
@@ -4,7 +4,7 @@ import { ClickOutside, ElPopover, ElText } from "element-plus";
4
4
  import { reactionWatch } from "@silver-formily/reactive-vue";
5
5
  import { createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderSlot, toDisplayString, unref, withCtx, withDirectives } from "vue";
6
6
  import { useField } from "@silver-formily/vue";
7
- import { isValid } from "@formily/shared";
7
+ import { isValid } from "@silver-formily/shared";
8
8
  import { Edit } from "@element-plus/icons-vue";
9
9
  //#region src/editable/editable-popover.vue
10
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1 +1 @@
1
- {"version":3,"file":"editable-popover.mjs","names":["$attrs"],"sources":["../../src/editable/editable-popover.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Edit } from '@element-plus/icons-vue'\nimport { isValid } from '@formily/shared'\nimport { reactionWatch } from '@silver-formily/reactive-vue'\nimport { useField } from '@silver-formily/vue'\nimport { ElPopover, ElText, ClickOutside as vClickOutside } from 'element-plus'\nimport { ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditablePopover',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<IFormItemProps>(), {\n feedbackLayout: 'popover',\n size: 'default',\n})\n\nconst fieldRef = useField<Field>()\nconst prefixCls = `${stylePrefix}-editable`\nconst contentRef = ref<HTMLElement>()\nconst visible = ref(false)\n\nif (isValid(fieldRef.value.data)) {\n /* istanbul ignore else -- @preserve */\n if (!isValid(fieldRef.value.data.readPretty)) {\n fieldRef.value.data.readPretty = true\n }\n}\nelse {\n fieldRef.value.data = {}\n fieldRef.value.data.readPretty = true\n}\n\nfunction onClickOutside(e) {\n const popoverDOM = contentRef.value.parentElement\n /* istanbul ignore else -- @preserve */\n if (!popoverDOM.contains(e.target)) {\n visible.value = false\n }\n}\nfunction onClick() {\n visible.value = true\n}\n\nreactionWatch(\n () => fieldRef.value.form.queryFeedbacks({\n type: 'error',\n address: `${fieldRef.value.address.entire}.*`,\n }),\n (errorList) => {\n if (errorList.length > 0) {\n visible.value = true\n }\n },\n)\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <ElPopover\n v-bind=\"$attrs\"\n :visible=\"visible\"\n :title=\"$attrs.title || fieldRef.title\" trigger=\"click\" width=\"auto\"\n >\n <template #default>\n <div ref=\"contentRef\" :class=\"`${prefixCls}-popover-wrapper`\">\n <slot />\n </div>\n </template>\n <template #reference>\n <FormBaseItem v-click-outside=\"onClickOutside\" v-bind=\"props\" :class=\"`${prefixCls}-trigger`\">\n <div :class=\"`${prefixCls}-content`\" @click=\"onClick\">\n <ElText>\n {{ fieldRef.title }}\n </ElText>\n <Edit :class=\"`${prefixCls}-edit-btn`\" />\n </div>\n </FormBaseItem>\n </template>\n </ElPopover>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ;EAKd,MAAM,WAAW,UAAgB;EACjC,MAAM,YAAY,GAAG,YAAY;EACjC,MAAM,aAAa,KAAiB;EACpC,MAAM,UAAU,IAAI,MAAK;AAEzB,MAAI,QAAQ,SAAS,MAAM,KAAK;;OAE1B,CAAC,QAAQ,SAAS,MAAM,KAAK,WAAW,CAC1C,UAAS,MAAM,KAAK,aAAa;SAGhC;AACH,YAAS,MAAM,OAAO,EAAC;AACvB,YAAS,MAAM,KAAK,aAAa;;EAGnC,SAAS,eAAe,GAAG;;AAGzB,OAAI,CAFe,WAAW,MAAM,cAEpB,SAAS,EAAE,OAAO,CAChC,SAAQ,QAAQ;;EAGpB,SAAS,UAAU;AACjB,WAAQ,QAAQ;;AAGlB,sBACQ,SAAS,MAAM,KAAK,eAAe;GACvC,MAAM;GACN,SAAS,GAAG,SAAS,MAAM,QAAQ,OAAO;GAC3C,CAAC,GACD,cAAc;AACb,OAAI,UAAU,SAAS,EACrB,SAAQ,QAAQ;IAGtB;;uBAIE,mBAsBM,OAAA,EAtBA,OAAK,eAAE,UAAS,EAAA,EAAA,CACpB,YAoBY,MAAA,UAAA,EApBZ,WACUA,KAmBE,QAnBI;IACb,SAAS,QAAA;IACT,OAAOA,KAAAA,OAAO,SAAS,MAAA,SAAQ,CAAC;IAAO,SAAQ;IAAQ,OAAM;;IAEnD,SAAO,cAGV,CAFN,mBAEM,OAAA;cAFG;KAAJ,KAAI;KAAc,OAAK,eAAA,GAAK,UAAS,kBAAA;QACxC,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA,CAAA,CAAA;IAGD,WAAS,cAQH,CAAA,gBAAA,WAAA,EAPf,YAOe,MAAA,YAAA,EAPf,WAAuD,OAAK,EAAG,OAAK,GAAK,UAAS,WAAA,CAAA,EAAA;4BAM1E,CALN,mBAKM,OAAA;MALA,OAAK,eAAA,GAAK,UAAS,UAAA;MAAoB;SAC3C,YAES,MAAA,OAAA,EAAA,MAAA;6BADa,CAAA,gBAAA,gBAAjB,MAAA,SAAQ,CAAC,MAAK,EAAA,EAAA,CAAA,CAAA;;SAEnB,YAAyC,MAAA,KAAA,EAAA,EAAlC,OAAK,eAAA,GAAK,UAAS,WAAA,EAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA;;+CALC,eAAc,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"editable-popover.mjs","names":["$attrs"],"sources":["../../src/editable/editable-popover.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@silver-formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Edit } from '@element-plus/icons-vue'\nimport { reactionWatch } from '@silver-formily/reactive-vue'\nimport { isValid } from '@silver-formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ElPopover, ElText, ClickOutside as vClickOutside } from 'element-plus'\nimport { ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditablePopover',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<IFormItemProps>(), {\n feedbackLayout: 'popover',\n size: 'default',\n})\n\nconst fieldRef = useField<Field>()\nconst prefixCls = `${stylePrefix}-editable`\nconst contentRef = ref<HTMLElement>()\nconst visible = ref(false)\n\nif (isValid(fieldRef.value.data)) {\n /* istanbul ignore else -- @preserve */\n if (!isValid(fieldRef.value.data.readPretty)) {\n fieldRef.value.data.readPretty = true\n }\n}\nelse {\n fieldRef.value.data = {}\n fieldRef.value.data.readPretty = true\n}\n\nfunction onClickOutside(e) {\n const popoverDOM = contentRef.value.parentElement\n /* istanbul ignore else -- @preserve */\n if (!popoverDOM.contains(e.target)) {\n visible.value = false\n }\n}\nfunction onClick() {\n visible.value = true\n}\n\nreactionWatch(\n () => fieldRef.value.form.queryFeedbacks({\n type: 'error',\n address: `${fieldRef.value.address.entire}.*`,\n }),\n (errorList) => {\n if (errorList.length > 0) {\n visible.value = true\n }\n },\n)\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <ElPopover\n v-bind=\"$attrs\"\n :visible=\"visible\"\n :title=\"$attrs.title || fieldRef.title\" trigger=\"click\" width=\"auto\"\n >\n <template #default>\n <div ref=\"contentRef\" :class=\"`${prefixCls}-popover-wrapper`\">\n <slot />\n </div>\n </template>\n <template #reference>\n <FormBaseItem v-click-outside=\"onClickOutside\" v-bind=\"props\" :class=\"`${prefixCls}-trigger`\">\n <div :class=\"`${prefixCls}-content`\" @click=\"onClick\">\n <ElText>\n {{ fieldRef.title }}\n </ElText>\n <Edit :class=\"`${prefixCls}-edit-btn`\" />\n </div>\n </FormBaseItem>\n </template>\n </ElPopover>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ;EAKd,MAAM,WAAW,UAAgB;EACjC,MAAM,YAAY,GAAG,YAAY;EACjC,MAAM,aAAa,KAAiB;EACpC,MAAM,UAAU,IAAI,MAAK;AAEzB,MAAI,QAAQ,SAAS,MA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AAA,QAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA;;+CALC,eAAc,CAAA,CAAA,CAAA,CAAA"}
@@ -3,7 +3,7 @@ import _sfc_main$1 from "../form-item/form-item.mjs";
3
3
  import { ClickOutside } from "element-plus";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, openBlock, ref, renderSlot, unref, withCtx, withDirectives } from "vue";
5
5
  import { useField } from "@silver-formily/vue";
6
- import { isPlainObj, isValid } from "@formily/shared";
6
+ import { isPlainObj, isValid } from "@silver-formily/shared";
7
7
  import { omit } from "lodash-es";
8
8
  import { Close, Edit } from "@element-plus/icons-vue";
9
9
  //#region src/editable/editable.vue
@@ -1 +1 @@
1
- {"version":3,"file":"editable.mjs","names":[],"sources":["../../src/editable/editable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Close, Edit } from '@element-plus/icons-vue'\nimport { isPlainObj, isValid } from '@formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ClickOutside as vClickOutside } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, nextTick, ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditable',\n})\n\nconst props = withDefaults(defineProps<IFormItemProps & { editProps?: IFormItemProps }>(), {\n feedbackLayout: 'popover',\n size: 'default',\n})\n\nconst fieldRef = useField<Field>()\nconst innerRef = ref<HTMLElement>(null)\nconst prefixCls = `${stylePrefix}-editable`\nconst formItemRef = ref<InstanceType<typeof FormBaseItem>>(null)\n\nconst commonProps = computed(() => omit(props, 'editProps'))\nconst editProps = computed(() => {\n if (isPlainObj(props.editProps)) {\n return { ...omit(props, 'editProps'), ...props.editProps }\n }\n return omit(props, 'editProps')\n})\n\nfunction handleEnsureReadPretty() {\n if (!isValid(fieldRef.value.data)) {\n fieldRef.value.data = {}\n }\n}\n\nhandleEnsureReadPretty()\nfieldRef.value.data.readPretty = true\n\nasync function onClick() {\n if (fieldRef.value.disabled)\n return\n handleEnsureReadPretty()\n fieldRef.value.data.readPretty = false\n await nextTick()\n formItemRef.value.feedbackTooltipRef.updatePopper()\n innerRef.value?.querySelector('input')?.focus()\n}\n\nfunction onClickOutside() {\n if (fieldRef.value.data?.readPretty === true)\n return\n handleEnsureReadPretty()\n // 使用下拉菜单等触发的事件完成应有的操作\n setTimeout(async () => {\n fieldRef.value.data.readPretty = true\n await nextTick()\n formItemRef.value?.feedbackTooltipRef.updatePopper()\n }, 0)\n}\n</script>\n\n<template>\n <div ref=\"innerRef\" :class=\"[prefixCls, fieldRef.disabled && 'is-disabled']\">\n <div v-click-outside=\"onClickOutside\" :class=\"`${prefixCls}-content`\">\n <FormBaseItem ref=\"formItemRef\" v-bind=\"fieldRef.data?.readPretty === false ? editProps : commonProps\" @click=\"onClick\">\n <div>\n <slot />\n </div>\n </FormBaseItem>\n <template v-if=\"!fieldRef.disabled\">\n <template v-if=\"fieldRef.data?.readPretty === true\">\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Edit :class=\"`${prefixCls}-edit-btn`\" @click=\"onClick\" />\n </FormBaseItem>\n </template>\n <template v-else>\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Close :class=\"`${prefixCls}-close-btn`\" @click=\"onClickOutside\" />\n </FormBaseItem>\n </template>\n </template>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ;EAKd,MAAM,WAAW,UAAgB;EACjC,MAAM,WAAW,IAAiB,KAAI;EACtC,MAAM,YAAY,GAAG,YAAY;EACjC,MAAM,cAAc,IAAuC,KAAI;EAE/D,MAAM,cAAc,eAAe,KAAK,OAAO,YAAY,CAAA;EAC3D,MAAM,YAAY,eAAe;A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AAA;;IAFA,MAAM,MAAM;IAAO,mBAAiB,MAAM;;2BACG,CAA1D,YAA0D,MAAA,KAAA,EAAA;KAAnD,OAAK,eAAA,GAAK,UAAS,WAAA;KAAqB;;;uDAIjD,YAEe,MAAA,YAAA,EAAA;;IAFA,MAAM,MAAM;IAAO,mBAAiB,MAAM;;2BACY,CAAnE,YAAmE,MAAA,MAAA,EAAA;KAA3D,OAAK,eAAA,GAAK,UAAS,YAAA;KAAe,SAAO;;;+GAdnC,eAAc,CAAA,CAAA,CAAA,EAAA,EAAA"}
1
+ {"version":3,"file":"editable.mjs","names":[],"sources":["../../src/editable/editable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@silver-formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Close, Edit } from '@element-plus/icons-vue'\nimport { isPlainObj, isValid } from '@silver-formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ClickOutside as vClickOutside } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, nextTick, ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditable',\n})\n\nconst props = withDefaults(defineProps<IFormItemProps & { editProps?: IFormItemProps }>(), {\n feedbackLayout: 'popover',\n size: 'default',\n})\n\nconst fieldRef = useField<Field>()\nconst innerRef = ref<HTMLElement>(null)\nconst prefixCls = `${stylePrefix}-editable`\nconst formItemRef = ref<InstanceType<typeof FormBaseItem>>(null)\n\nconst commonProps = computed(() => omit(props, 'editProps'))\nconst editProps = computed(() => {\n if (isPlainObj(props.editProps)) {\n return { ...omit(props, 'editProps'), ...props.editProps }\n }\n return omit(props, 'editProps')\n})\n\nfunction handleEnsureReadPretty() {\n if (!isValid(fieldRef.value.data)) {\n fieldRef.value.data = {}\n }\n}\n\nhandleEnsureReadPretty()\nfieldRef.value.data.readPretty = true\n\nasync function onClick() {\n if (fieldRef.value.disabled)\n return\n handleEnsureReadPretty()\n fieldRef.value.data.readPretty = false\n await nextTick()\n formItemRef.value.feedbackTooltipRef.updatePopper()\n innerRef.value?.querySelector('input')?.focus()\n}\n\nfunction onClickOutside() {\n if (fieldRef.value.data?.readPretty === true)\n return\n handleEnsureReadPretty()\n // 使用下拉菜单等触发的事件完成应有的操作\n setTimeout(async () => {\n fieldRef.value.data.readPretty = true\n await nextTick()\n formItemRef.value?.feedbackTooltipRef.updatePopper()\n }, 0)\n}\n</script>\n\n<template>\n <div ref=\"innerRef\" :class=\"[prefixCls, fieldRef.disabled && 'is-disabled']\">\n <div v-click-outside=\"onClickOutside\" :class=\"`${prefixCls}-content`\">\n <FormBaseItem ref=\"formItemRef\" v-bind=\"fieldRef.data?.readPretty === false ? editProps : commonProps\" @click=\"onClick\">\n <div>\n <slot />\n </div>\n </FormBaseItem>\n <template v-if=\"!fieldRef.disabled\">\n <template v-if=\"fieldRef.data?.readPretty === true\">\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Edit :class=\"`${prefixCls}-edit-btn`\" @click=\"onClick\" />\n </FormBaseItem>\n </template>\n <template v-else>\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Close :class=\"`${prefixCls}-close-btn`\" @click=\"onClickOutside\" />\n </FormBaseItem>\n </template>\n </template>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ;EAKd,MAAM,WAAW,UAAgB;EACjC,MAAM,WAAW,IAAiB,KAAI;EACtC,MAAM,YAAY,GAAG,YAAY;EACjC,MAAM,cAAc,IAAuC,KAAI;EAE/D,MAAM,cAAc,eAAe,KAAK,OAAO,YAAY,CAAA;EAC3D,MAAM,YAAY,eAAe;AAC/B,OAAI,WAAW,MAAM,UAAU,CAC7B,QAAO;IAAE,GAAG,KAAK,OAAO,YAAY;IAAE,GAAG,MAAM;IAAU;AAE3D,UAAO,KAAK,OAAO,YAAW;I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;uDAIjD,YAEe,MAAA,YAAA,EAAA;;IAFA,MAAM,MAAM;IAAO,mBAAiB,MAAM;;2BACY,CAAnE,YAAmE,MAAA,MAAA,EAAA;KAA3D,OAAK,eAAA,GAAK,UAAS,YAAA;KAAe,SAAO;;;+GAdnC,eAAc,CAAA,CAAA,CAAA,EAAA,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"form.mjs","names":["$attrs"],"sources":["../../src/form/form.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Form as FormType, IFormFeedback } from '@formily/core'\nimport type { PropType } from 'vue'\nimport { FormProvider, useForm } from '@silver-formily/vue'\nimport { FormLayout } from '../form-layout'\nimport { PreviewText } from '../preview-text'\n\ndefineOptions({\n name: 'FForm',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n form: {\n type: Object as PropType<FormType>,\n },\n previewTextPlaceholder: {\n type: String,\n },\n onAutoSubmit: {\n type: Function as PropType<(values: FormType['values']) => Promise<any>>,\n },\n onAutoSubmitFailed: {\n type: Function as PropType<(error: IFormFeedback[]) => void>,\n },\n})\n\nconst top = useForm()\n\nfunction handleSubmit(e: Event, form: FormType) {\n form\n .submit(values => props.onAutoSubmit?.(values))\n .catch(error => props.onAutoSubmitFailed?.(error))\n}\n</script>\n\n<template>\n <FormProvider v-if=\"props.form\" :form=\"props.form\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout v-bind=\"$attrs\" @submit=\"(e) => handleSubmit(e, form)\">\n <slot />\n </FormLayout>\n </PreviewText>\n </FormProvider>\n <template v-else-if=\"top\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout\n v-bind=\"$attrs\"\n @submit.prevent.stop=\"(e) => handleSubmit(e, top)\"\n >\n <slot />\n </FormLayout>\n </PreviewText>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAYA,MAAM,QAAQ;EAed,MAAM,MAAM,SAAQ;EAEpB,SAAS,aAAa,GAAU,MAAgB;AAC9C,QACG,QAAO,WAAU,MAAM,eAAe,OAAO,CAAA,CAC7C,OAAM,UAAS,MAAM,qBAAqB,MAAM,CAAA;;;UAK/B,MAAM,QAAA,WAAA,EAA1B,YAMe,MAAA,aAAA,EAAA;;IANkB,MAAM,MAAM;;2BAK7B,CAJd,YAIc,MAAA,YAAA,EAAA,EAJA,aAAa,MAAM,wBAAA,EAAA;4BAGlB,CAFb,YAEa,MAAA,YAAA,EAFb,WAAoBA,KAEP,QAFa,EAAG,UAAM,OAAA,OAAA,OAAA,MAAG,MAAM,aAAa,GAAG,QAAA,KAAI,GAAA,CAAA,EAAA;6BACtD,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;sBAIO,MAAA,IAAG,IAAA,WAAA,EACtB,YAOc,MAAA,YAAA,EAAA;;IAPA,aAAa,MAAM;;2BAMlB,CALb,YAKa,MAAA,YAAA,EALb,WACUA,KAIG,QAJG,EACb,UAAM,OAAA,OAAA,OAAA,KAAA,eAAgB,MAAM,aAAa,GAAG,MAAA,IAAG,CAAA,EAAA,CAAA,WAAA,OAAA,CAAA,GAAA,CAAA,EAAA;4BAExC,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"form.mjs","names":["$attrs"],"sources":["../../src/form/form.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Form as FormType, IFormFeedback } from '@silver-formily/core'\nimport type { PropType } from 'vue'\nimport { FormProvider, useForm } from '@silver-formily/vue'\nimport { FormLayout } from '../form-layout'\nimport { PreviewText } from '../preview-text'\n\ndefineOptions({\n name: 'FForm',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n form: {\n type: Object as PropType<FormType>,\n },\n previewTextPlaceholder: {\n type: String,\n },\n onAutoSubmit: {\n type: Function as PropType<(values: FormType['values']) => Promise<any>>,\n },\n onAutoSubmitFailed: {\n type: Function as PropType<(error: IFormFeedback[]) => void>,\n },\n})\n\nconst top = useForm()\n\nfunction handleSubmit(e: Event, form: FormType) {\n form\n .submit(values => props.onAutoSubmit?.(values))\n .catch(error => props.onAutoSubmitFailed?.(error))\n}\n</script>\n\n<template>\n <FormProvider v-if=\"props.form\" :form=\"props.form\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout v-bind=\"$attrs\" @submit=\"(e) => handleSubmit(e, form)\">\n <slot />\n </FormLayout>\n </PreviewText>\n </FormProvider>\n <template v-else-if=\"top\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout\n v-bind=\"$attrs\"\n @submit.prevent.stop=\"(e) => handleSubmit(e, top)\"\n >\n <slot />\n </FormLayout>\n </PreviewText>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAYA,MAAM,QAAQ;EAed,MAAM,MAAM,SAAQ;EAEpB,SAAS,aAAa,GAAU,MAAgB;AAC9C,QACG,QAAO,WAAU,MAAM,eAAe,OAAO,CAAA,CAC7C,OAAM,UAAS,MAAM,qBAAqB,MAAM,CAAA;;;UAK/B,MAAM,QAAA,WAAA,EAA1B,YAMe,MAAA,aAAA,EAAA;;IANkB,MAAM,MAAM;;2BAK7B,CAJd,YAIc,MAAA,YAAA,EAAA,EAJA,aAAa,MAAM,wBAAA,EAAA;4BAGlB,CAFb,YAEa,MAAA,YAAA,EAFb,WAAoBA,KAEP,QAFa,EAAG,UAAM,OAAA,OAAA,OAAA,MAAG,MAAM,aAAa,GAAG,QAAA,KAAI,GAAA,CAAA,EAAA;6BACtD,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;sBAIO,MAAA,IAAG,IAAA,WAAA,EACtB,YAOc,MAAA,YAAA,EAAA;;IAPA,aAAa,MAAM;;2BAMlB,CALb,YAKa,MAAA,YAAA,EALb,WACUA,KAIG,QAJG,EACb,UAAM,OAAA,OAAA,OAAA,KAAA,eAAgB,MAAM,aAAa,GAAG,MAAA,IAAG,CAAA,EAAA,CAAA,WAAA,OAAA,CAAA,GAAA,CAAA,EAAA;4BAExC,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import * as _$vue from "vue";
2
2
  import { PropType } from "vue";
3
- import { Form, IFormFeedback } from "@formily/core";
3
+ import { Form, IFormFeedback } from "@silver-formily/core";
4
4
 
5
5
  //#region src/form/form.vue.d.ts
6
6
  declare var __VLS_22: {}, __VLS_39: {};
@@ -5,7 +5,7 @@ import { ElBadge, ElCollapse, ElCollapseItem } from "element-plus";
5
5
  import { formilyComputed } from "@silver-formily/reactive-vue";
6
6
  import { Fragment, computed, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderList, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
7
7
  import { RecursionField, useField, useFieldSchema } from "@silver-formily/vue";
8
- import { isFn } from "@formily/shared";
8
+ import { isFn } from "@silver-formily/shared";
9
9
  //#region src/form-collapse/form-collapse.vue
10
10
  const _hoisted_1 = { key: 1 };
11
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1 +1 @@
1
- {"version":3,"file":"form-collapse.mjs","names":[],"sources":["../../src/form-collapse/form-collapse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { PropType } from 'vue'\nimport type { IFormCollapse } from './utils'\nimport { isFn } from '@formily/shared'\nimport { formilyComputed } from '@silver-formily/reactive-vue'\nimport { RecursionField, useField, useFieldSchema } from '@silver-formily/vue'\nimport { ElBadge, ElCollapse, ElCollapseItem } from 'element-plus'\nimport { computed } from 'vue'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { createFormCollapse, usePanels } from './utils'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n formCollapse: { type: Object as PropType<IFormCollapse> },\n activeKey: {\n type: [String, Number],\n },\n})\nconst prefixCls = `${stylePrefix}-form-collapse`\nconst { props: collapseAttrs } = useCleanAttrs(['modelValue', 'onUpdate:modelValue'])\n\nconst field = useField()\nconst schema = useFieldSchema()\nconst panels = formilyComputed(() => usePanels(field.value, schema.value))\nconst formCollapseRef = computed(\n () => props.formCollapse ?? createFormCollapse(),\n)\n\nfunction takeActiveKeys(panelList) {\n if (props.activeKey)\n return props.activeKey\n if (formCollapseRef.value?.activeKeys)\n return formCollapseRef.value?.activeKeys\n return panelList.map(item => item.name)\n}\n\nconst panelErrorCounts = formilyComputed(() => {\n return panels.value.map((item) => {\n const panelErrors = field.value.form.queryFeedbacks({\n type: 'error',\n address: `${field.value.address.concat(item.name)}.*`,\n })\n return panelErrors.length\n })\n})\n</script>\n\n<template>\n <ElCollapse\n :class=\"prefixCls\"\n :model-value=\"takeActiveKeys(panels)\"\n v-bind=\"collapseAttrs\"\n @change=\"(key) => {\n formCollapseRef.setActiveKeys(key)\n }\"\n >\n <template v-for=\"({ props: itemProps, schema: itemSchema, name }, index) of panels\" :key=\"name\">\n <ElCollapseItem v-bind=\"itemProps\" :name=\"name\">\n <template #default>\n <RecursionField :schema=\"itemSchema\" :name=\"name\" />\n </template>\n <template #title>\n <ElBadge\n v-if=\"panelErrorCounts[index] !== 0\"\n :class=\"`${prefixCls}-errors-badge`\"\n :value=\"panelErrorCounts[index]\"\n >\n <component\n :is=\"() => isFn(itemSchema['x-content']?.title)\n ? itemSchema['x-content']?.title(panelErrorCounts[index])\n : itemSchema['x-content']?.title\"\n v-if=\"itemSchema['x-content']?.title\"\n />\n <span v-else>{{ itemSchema['x-component-props']?.title }}</span>\n </ElBadge>\n <template v-else>\n <component\n :is=\"() => isFn(itemSchema['x-content']?.title)\n ? itemSchema['x-content']?.title(panelErrorCounts[index])\n : itemSchema['x-content']?.title\"\n v-if=\"itemSchema['x-content']?.title\"\n />\n <template v-else>\n {{ itemSchema['x-component-props']?.title }}\n </template>\n </template>\n </template>\n </ElCollapseItem>\n </template>\n </ElCollapse>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EAMd,MAAM,YAAY,GAAG,YAAY;EACjC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CAAC;;8BAOvB,CADM,WAAU,cAAe,SAAA,WAAA,EAJjC,YAKE,8BAJW,MAAA,KAAI,CAAC,WAAU,cAAe,MAAK,GAAoB,WAAU,cAAe,MAAM,MAAA,iBAAgB,CAAC,OAAK,GAAqB,WAAU,cAAe,MAAK,EAAA,EAAA,KAAA,GAAA,CAAA,KAAA,WAAA,EAK5K,mBAAgE,QAAA,YAAA,gBAAhD,WAAU,sBAAuB,MAAK,EAAA,EAAA,EAAA,CAAA;;oDAExD,mBAUW,UAAA,EAAA,KAAA,GAAA,EAAA,CALD,WAAU,cAAe,SAAA,WAAA,EAJjC,YAKE,8BAJW,MAAA,KAAI,CAAC,WAAU,cAAe,MAAK,GAAoB,WAAU,cAAe,MAAM,MAAA,iBAAgB,CAAC,OAAK,GAAqB,WAAU,cAAe,MAAK,EAAA,EAAA,KAAA,GAAA,CAAA,KAAA,WAAA,EAK5K,mBAEW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,gBAAA,gBADN,WAAU,sBAAuB,MAAK,EAAA,EAAA,CAAA,EAAA,GAAA,EAAA,EAAA,GAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"form-collapse.mjs","names":[],"sources":["../../src/form-collapse/form-collapse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { PropType } from 'vue'\nimport type { IFormCollapse } from './utils'\nimport { formilyComputed } from '@silver-formily/reactive-vue'\nimport { isFn } from '@silver-formily/shared'\nimport { RecursionField, useField, useFieldSchema } from '@silver-formily/vue'\nimport { ElBadge, ElCollapse, ElCollapseItem } from 'element-plus'\nimport { computed } from 'vue'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { createFormCollapse, usePanels } from './utils'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n formCollapse: { type: Object as PropType<IFormCollapse> },\n activeKey: {\n type: [String, Number],\n },\n})\nconst prefixCls = `${stylePrefix}-form-collapse`\nconst { props: collapseAttrs } = useCleanAttrs(['modelValue', 'onUpdate:modelValue'])\n\nconst field = useField()\nconst schema = useFieldSchema()\nconst panels = formilyComputed(() => usePanels(field.value, schema.value))\nconst formCollapseRef = computed(\n () => props.formCollapse ?? createFormCollapse(),\n)\n\nfunction takeActiveKeys(panelList) {\n if (props.activeKey)\n return props.activeKey\n if (formCollapseRef.value?.activeKeys)\n return formCollapseRef.value?.activeKeys\n return panelList.map(item => item.name)\n}\n\nconst panelErrorCounts = formilyComputed(() => {\n return panels.value.map((item) => {\n const panelErrors = field.value.form.queryFeedbacks({\n type: 'error',\n address: `${field.value.address.concat(item.name)}.*`,\n })\n return panelErrors.length\n })\n})\n</script>\n\n<template>\n <ElCollapse\n :class=\"prefixCls\"\n :model-value=\"takeActiveKeys(panels)\"\n v-bind=\"collapseAttrs\"\n @change=\"(key) => {\n formCollapseRef.setActiveKeys(key)\n }\"\n >\n <template v-for=\"({ props: itemProps, schema: itemSchema, name }, index) of panels\" :key=\"name\">\n <ElCollapseItem v-bind=\"itemProps\" :name=\"name\">\n <template #default>\n <RecursionField :schema=\"itemSchema\" :name=\"name\" />\n </template>\n <template #title>\n <ElBadge\n v-if=\"panelErrorCounts[index] !== 0\"\n :class=\"`${prefixCls}-errors-badge`\"\n :value=\"panelErrorCounts[index]\"\n >\n <component\n :is=\"() => isFn(itemSchema['x-content']?.title)\n ? itemSchema['x-content']?.title(panelErrorCounts[index])\n : itemSchema['x-content']?.title\"\n v-if=\"itemSchema['x-content']?.title\"\n />\n <span v-else>{{ itemSchema['x-component-props']?.title }}</span>\n </ElBadge>\n <template v-else>\n <component\n :is=\"() => isFn(itemSchema['x-content']?.title)\n ? itemSchema['x-content']?.title(panelErrorCounts[index])\n : itemSchema['x-content']?.title\"\n v-if=\"itemSchema['x-content']?.title\"\n />\n <template v-else>\n {{ itemSchema['x-component-props']?.title }}\n </template>\n </template>\n </template>\n </ElCollapseItem>\n </template>\n </ElCollapse>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EA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eAAA;OACnB,OAAO,MAAA,iBAAgB,CAAC;;8BAOvB,CADM,WAAU,cAAe,SAAA,WAAA,EAJjC,YAKE,8BAJW,MAAA,KAAI,CAAC,WAAU,cAAe,MAAK,GAAoB,WAAU,cAAe,MAAM,MAAA,iBAAgB,CAAC,OAAK,GAAqB,WAAU,cAAe,MAAK,EAAA,EAAA,KAAA,GAAA,CAAA,KAAA,WAAA,EAK5K,mBAAgE,QAAA,YAAA,gBAAhD,WAAU,sBAAuB,MAAK,EAAA,EAAA,EAAA,CAAA;;oDAExD,mBAUW,UAAA,EAAA,KAAA,GAAA,EAAA,CALD,WAAU,cAAe,SAAA,WAAA,EAJjC,YAKE,8BAJW,MAAA,KAAI,CAAC,WAAU,cAAe,MAAK,GAAoB,WAAU,cAAe,MAAM,MAAA,iBAAgB,CAAC,OAAK,GAAqB,WAAU,cAAe,MAAK,EAAA,EAAA,KAAA,GAAA,CAAA,KAAA,WAAA,EAK5K,mBAEW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,gBAAA,gBADN,WAAU,sBAAuB,MAAK,EAAA,EAAA,CAAA,EAAA,GAAA,EAAA,EAAA,GAAA,EAAA,CAAA"}
@@ -1,5 +1,5 @@
1
- import { GeneralField } from "@formily/core";
2
- import { Schema, SchemaKey } from "@formily/json-schema";
1
+ import { GeneralField } from "@silver-formily/core";
2
+ import { Schema, SchemaKey } from "@silver-formily/json-schema";
3
3
 
4
4
  //#region src/form-collapse/utils.d.ts
5
5
  type ActiveKeys = string | number | Array<string | number>;
@@ -1,5 +1,5 @@
1
- import { toArr } from "@formily/shared";
2
- import { model } from "@formily/reactive";
1
+ import { toArr } from "@silver-formily/shared";
2
+ import { model } from "@silver-formily/reactive";
3
3
  //#region src/form-collapse/utils.ts
4
4
  function usePanels(collapseField, schema) {
5
5
  return schema.mapProperties((schema, name) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","names":[],"sources":["../../src/form-collapse/utils.ts"],"sourcesContent":["import type { GeneralField } from '@formily/core'\nimport type { Schema, SchemaKey } from '@formily/json-schema'\nimport { model } from '@formily/reactive'\nimport { toArr } from '@formily/shared'\n\ntype ActiveKeys = string | number | Array<string | number>\n\ntype ActiveKey = string | number\n\ntype Panels = { name: SchemaKey, props: any, schema: Schema }[]\n\nexport interface IFormCollapse {\n activeKeys: ActiveKeys\n hasActiveKey: (key: ActiveKey) => boolean\n setActiveKeys: (key: ActiveKeys) => void\n addActiveKey: (key: ActiveKey) => void\n removeActiveKey: (key: ActiveKey) => void\n toggleActiveKey: (key: ActiveKey) => void\n}\n\nexport interface IFormCollapseProps {\n formCollapse?: IFormCollapse\n activeKey?: ActiveKey\n}\n\nexport function usePanels(collapseField: GeneralField, schema: Schema) {\n const schemaList = schema.mapProperties((schema, name) => ({\n name,\n props: {\n ...schema?.['x-component-props'],\n key: schema?.['x-component-props']?.key || name,\n },\n schema,\n }))\n\n const panels: Panels = schemaList.filter((item) => {\n const field = collapseField.query(collapseField.address.concat(item.name)).take()\n const isHidden = field?.display === 'none' || field?.display === 'hidden'\n if (isHidden)\n return false\n return item?.schema?.['x-component']?.includes('FormCollapse.Item') ?? false\n })\n\n return panels\n}\n\nexport function createFormCollapse(defaultActiveKeys?: ActiveKeys) {\n const formCollapse = model({\n activeKeys: defaultActiveKeys,\n setActiveKeys(keys: ActiveKeys) {\n /* istanbul ignore if -- @preserve */\n if (keys === formCollapse.activeKeys)\n return\n formCollapse.activeKeys = keys\n },\n hasActiveKey(key: ActiveKey) {\n if (Array.isArray(formCollapse.activeKeys)) {\n if (formCollapse.activeKeys.includes(key)) {\n return true\n }\n }\n else if (formCollapse.activeKeys === key) {\n return true\n }\n return false\n },\n addActiveKey(key: ActiveKey) {\n /* istanbul ignore if -- @preserve */\n if (formCollapse.hasActiveKey(key))\n return\n formCollapse.activeKeys = toArr(formCollapse.activeKeys).concat(key)\n },\n removeActiveKey(key: ActiveKey) {\n formCollapse.activeKeys = Array.isArray(formCollapse.activeKeys)\n ? formCollapse.activeKeys.filter(\n item => item !== key,\n )\n : ''\n },\n toggleActiveKey(key: ActiveKey) {\n if (formCollapse.hasActiveKey(key)) {\n formCollapse.removeActiveKey(key)\n }\n else {\n formCollapse.addActiveKey(key)\n }\n },\n })\n return formCollapse\n}\n"],"mappings":";;;AAyBA,SAAgB,UAAU,eAA6B,QAAgB;AAkBrE,QAjBmB,OAAO,eAAe,QAAQ,UAAU;EACzD;EACA,OAAO;GACL,GAAG,SAAS;GACZ,KAAK,SAAS,sBAAsB,OAAO;GAC5C;EACD;EACD,EAAE,CAE+B,QAAQ,SAAS;EACjD,MAAM,QAAQ,cAAc,MAAM,cAAc,QAAQ,OAAO,KAAK,KAAK,CAAC,CAAC,MAAM;AAEjF,MADiB,OAAO,YAAY,UAAU,OAAO,YAAY,SAE/D,QAAO;AACT,SAAO,MAAM,SAAS,gBAAgB,SAAS,oBAAoB,IAAI;GACvE;;AAKJ,SAAgB,mBAAmB,mBAAgC;CACjE,MAAM,eAAe,MAAM;EACzB,YAAY;EACZ,cAAc,MAAkB;;AAE9B,OAAI,SAAS,aAAa,WACxB;AACF,gBAAa,aAAa;;EAE5B,aAAa,KAAgB;AAC3B,OAAI,MAAM,QAAQ,aAAa,WAAW;QACpC,aAAa,WAAW,SAAS,IAAI,CACvC,QAAO;cAGF,aAAa,eAAe,IACnC,QAAO;AAET,UAAO;;EAET,aAAa,KAAgB;;AAE3B,OAAI,aAAa,aAAa,IAAI,CAChC;AACF,gBAAa,aAAa,MAAM,aAAa,WAAW,CAAC,OAAO,IAAI;;EAEtE,gBAAgB,KAAgB;AAC9B,gBAAa,aAAa,MAAM,QAAQ,aAAa,WAAW,GAC5D,aAAa,WAAW,QACtB,SAAQ,SAAS,IAClB,GACD;;EAEN,gBAAgB,KAAgB;AAC9B,OAAI,aAAa,aAAa,IAAI,CAChC,cAAa,gBAAgB,IAAI;OAGjC,cAAa,aAAa,IAAI;;EAGnC,CAAC;AACF,QAAO"}
1
+ {"version":3,"file":"utils.mjs","names":[],"sources":["../../src/form-collapse/utils.ts"],"sourcesContent":["import type { GeneralField } from '@silver-formily/core'\nimport type { Schema, SchemaKey } from '@silver-formily/json-schema'\nimport { model } from '@silver-formily/reactive'\nimport { toArr } from '@silver-formily/shared'\n\ntype ActiveKeys = string | number | Array<string | number>\n\ntype ActiveKey = string | number\n\ntype Panels = { name: SchemaKey, props: any, schema: Schema }[]\n\nexport interface IFormCollapse {\n activeKeys: ActiveKeys\n hasActiveKey: (key: ActiveKey) => boolean\n setActiveKeys: (key: ActiveKeys) => void\n addActiveKey: (key: ActiveKey) => void\n removeActiveKey: (key: ActiveKey) => void\n toggleActiveKey: (key: ActiveKey) => void\n}\n\nexport interface IFormCollapseProps {\n formCollapse?: IFormCollapse\n activeKey?: ActiveKey\n}\n\nexport function usePanels(collapseField: GeneralField, schema: Schema) {\n const schemaList = schema.mapProperties((schema, name) => ({\n name,\n props: {\n ...schema?.['x-component-props'],\n key: schema?.['x-component-props']?.key || name,\n },\n schema,\n }))\n\n const panels: Panels = schemaList.filter((item) => {\n const field = collapseField.query(collapseField.address.concat(item.name)).take()\n const isHidden = field?.display === 'none' || field?.display === 'hidden'\n if (isHidden)\n return false\n return item?.schema?.['x-component']?.includes('FormCollapse.Item') ?? false\n })\n\n return panels\n}\n\nexport function createFormCollapse(defaultActiveKeys?: ActiveKeys) {\n const formCollapse = model({\n activeKeys: defaultActiveKeys,\n setActiveKeys(keys: ActiveKeys) {\n /* istanbul ignore if -- @preserve */\n if (keys === formCollapse.activeKeys)\n return\n formCollapse.activeKeys = keys\n },\n hasActiveKey(key: ActiveKey) {\n if (Array.isArray(formCollapse.activeKeys)) {\n if (formCollapse.activeKeys.includes(key)) {\n return true\n }\n }\n else if (formCollapse.activeKeys === key) {\n return true\n }\n return false\n },\n addActiveKey(key: ActiveKey) {\n /* istanbul ignore if -- @preserve */\n if (formCollapse.hasActiveKey(key))\n return\n formCollapse.activeKeys = toArr(formCollapse.activeKeys).concat(key)\n },\n removeActiveKey(key: ActiveKey) {\n formCollapse.activeKeys = Array.isArray(formCollapse.activeKeys)\n ? formCollapse.activeKeys.filter(\n item => item !== key,\n )\n : ''\n },\n toggleActiveKey(key: ActiveKey) {\n if (formCollapse.hasActiveKey(key)) {\n formCollapse.removeActiveKey(key)\n }\n else {\n formCollapse.addActiveKey(key)\n }\n },\n })\n return formCollapse\n}\n"],"mappings":";;;AAyBA,SAAgB,UAAU,eAA6B,QAAgB;AAkBrE,QAjBmB,OAAO,eAAe,QAAQ,UAAU;EACzD;EACA,OAAO;GACL,GAAG,SAAS;GACZ,KAAK,SAAS,sBAAsB,OAAO;GAC5C;EACD;EACD,EAAE,CAE+B,QAAQ,SAAS;EACjD,MAAM,QAAQ,cAAc,MAAM,cAAc,QAAQ,OAAO,KAAK,KAAK,CAAC,CAAC,MAAM;AAEjF,MADiB,OAAO,YAAY,UAAU,OAAO,YAAY,SAE/D,QAAO;AACT,SAAO,MAAM,SAAS,gBAAgB,SAAS,oBAAoB,IAAI;GACvE;;AAKJ,SAAgB,mBAAmB,mBAAgC;CACjE,MAAM,eAAe,MAAM;EACzB,YAAY;EACZ,cAAc,MAAkB;;AAE9B,OAAI,SAAS,aAAa,WACxB;AACF,gBAAa,aAAa;;EAE5B,aAAa,KAAgB;AAC3B,OAAI,MAAM,QAAQ,aAAa,WAAW;QACpC,aAAa,WAAW,SAAS,IAAI,CACvC,QAAO;cAGF,aAAa,eAAe,IACnC,QAAO;AAET,UAAO;;EAET,aAAa,KAAgB;;AAE3B,OAAI,aAAa,aAAa,IAAI,CAChC;AACF,gBAAa,aAAa,MAAM,aAAa,WAAW,CAAC,OAAO,IAAI;;EAEtE,gBAAgB,KAAgB;AAC9B,gBAAa,aAAa,MAAM,QAAQ,aAAa,WAAW,GAC5D,aAAa,WAAW,QACtB,SAAQ,SAAS,IAClB,GACD;;EAEN,gBAAgB,KAAgB;AAC9B,OAAI,aAAa,aAAa,IAAI,CAChC,cAAa,gBAAgB,IAAI;OAGjC,cAAa,aAAa,IAAI;;EAGnC,CAAC;AACF,QAAO"}
@@ -6,7 +6,7 @@ import { resolveDialogElement } from "../shared/overlay-elements.mjs";
6
6
  import { ElButton, ElConfigProvider, ElDialog } from "element-plus";
7
7
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, ref, renderSlot, toDisplayString, unref, useSlots, withCtx } from "vue";
8
8
  import { FormProvider } from "@silver-formily/vue";
9
- import { isFn } from "@formily/shared";
9
+ import { isFn } from "@silver-formily/shared";
10
10
  import { omit } from "lodash-es";
11
11
  //#region src/form-dialog/dialog-content.vue
12
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-content.mjs","names":[],"sources":["../../src/form-dialog/dialog-content.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Form } from '@formily/core'\nimport type { ComponentPublicInstance, PropType } from 'vue'\nimport type { FormDialogSlots, IFormDialogProps } from './types'\nimport { isFn } from '@formily/shared'\nimport { FormProvider } from '@silver-formily/vue'\nimport { ElButton, ElConfigProvider, ElDialog } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, ref } from 'vue'\nimport { loadElConfigProvider, stylePrefix, useDebonceSubmitting } from '../__builtins__'\nimport { useEnterSubmit } from '../__builtins__/shared/use-enter-submit'\nimport { resolveDialogElement } from '../shared/overlay-elements'\n\ndefineOptions({\n name: 'FormDialogContent',\n})\nconst props = defineProps({\n dialogProps: {\n type: Object as PropType<IFormDialogProps>,\n required: true,\n },\n visible: {\n type: Boolean,\n required: true,\n },\n form: {\n type: Object as PropType<Form>,\n required: true,\n },\n resolve: {\n type: Function as PropType<(type?: string) => void>,\n required: true,\n },\n reject: {\n type: Function as PropType<() => void>,\n required: true,\n },\n})\n\nconst slots = defineSlots<FormDialogSlots>()\nconst prefixCls = `${stylePrefix}-form-dialog`\nconst elConfig = loadElConfigProvider()\nconst _dialogProps = omit(props.dialogProps, [\n 'modelValue',\n 'onUpdate:modelValue',\n 'beforeClose',\n 'enterSubmit',\n])\nconst { internalSubmitting } = useDebonceSubmitting(props.form)\nconst dialogRef = ref<ComponentPublicInstance | null>(null)\nconst enableEnterSubmit = computed(() => props.dialogProps.enterSubmit !== false)\n\nuseEnterSubmit({\n visible: computed(() => props.visible),\n resolve: () => props.resolve(),\n submitting: internalSubmitting,\n getContainer: () => resolveDialogElement(dialogRef.value),\n enabled: enableEnterSubmit,\n})\n</script>\n\n<template>\n <ElDialog\n ref=\"dialogRef\"\n :class=\"prefixCls\"\n :z-index=\"elConfig.zIndex\"\n v-bind=\"_dialogProps\"\n :model-value=\"visible\"\n :before-close=\"(done) => {\n reject()\n if (isFn(props.dialogProps.beforeClose)) {\n props.dialogProps.beforeClose(done)\n }\n else {\n done()\n }\n }\"\n >\n <template #header>\n <slot v-if=\"slots.header\" name=\"header\" :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </template>\n\n <template #default>\n <FormProvider :form=\"props.form\">\n <ElConfigProvider v-bind=\"elConfig\">\n <slot :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </ElConfigProvider>\n </FormProvider>\n </template>\n\n <template #footer>\n <div :class=\"`${prefixCls}-footer`\">\n <template v-if=\"slots.footer\">\n <slot name=\"footer\" :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </template>\n <template v-else>\n <ElButton\n v-bind=\"_dialogProps.cancelButtonProps\"\n @click=\"props.reject()\"\n >\n {{ _dialogProps.cancelText || '取消' }}\n </ElButton>\n <ElButton\n type=\"primary\"\n v-bind=\"_dialogProps.okButtonProps\"\n :loading=\"internalSubmitting\"\n @click=\"props.resolve()\"\n >\n {{ _dialogProps.okText || '确定' }}\n </ElButton>\n </template>\n </div>\n </template>\n </ElDialog>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ;EAuBd,MAAM,QAAQ,UAA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AS,MAAM,QAAA;uBAEjE,mBAeW,UAAA,EAAA,KAAA,GAAA,EAAA,CAdT,YAKW,MAAA,SAAA,EALX,WACU,MAIC,aAJW,CAAC,mBAAiB,EACrC,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAM,QAAM,GAAA,CAAA,EAAA;4BAEiB,CAAA,gBAAA,gBAAlC,MAAA,aAAY,CAAC,cAAU,KAAA,EAAA,EAAA,CAAA,CAAA;;YAE5B,YAOW,MAAA,SAAA,EAPX,WAOW,EANT,MAAK,WAAS,EACN,MAAA,aAAY,CAAC,eAAa;KACjC,SAAS,MAAA,mBAAkB;KAC3B,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAM,SAAO;;4BAEY,CAAA,gBAAA,gBAA9B,MAAA,aAAY,CAAC,UAAM,KAAA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"dialog-content.mjs","names":[],"sources":["../../src/form-dialog/dialog-content.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Form } from '@silver-formily/core'\nimport type { ComponentPublicInstance, PropType } from 'vue'\nimport type { FormDialogSlots, IFormDialogProps } from './types'\nimport { isFn } from '@silver-formily/shared'\nimport { FormProvider } from '@silver-formily/vue'\nimport { ElButton, ElConfigProvider, ElDialog } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, ref } from 'vue'\nimport { loadElConfigProvider, stylePrefix, useDebonceSubmitting } from '../__builtins__'\nimport { useEnterSubmit } from '../__builtins__/shared/use-enter-submit'\nimport { resolveDialogElement } from '../shared/overlay-elements'\n\ndefineOptions({\n name: 'FormDialogContent',\n})\nconst props = defineProps({\n dialogProps: {\n type: Object as PropType<IFormDialogProps>,\n required: true,\n },\n visible: {\n type: Boolean,\n required: true,\n },\n form: {\n type: Object as PropType<Form>,\n required: true,\n },\n resolve: {\n type: Function as PropType<(type?: string) => void>,\n required: true,\n },\n reject: {\n type: Function as PropType<() => void>,\n required: true,\n },\n})\n\nconst slots = defineSlots<FormDialogSlots>()\nconst prefixCls = `${stylePrefix}-form-dialog`\nconst elConfig = loadElConfigProvider()\nconst _dialogProps = omit(props.dialogProps, [\n 'modelValue',\n 'onUpdate:modelValue',\n 'beforeClose',\n 'enterSubmit',\n])\nconst { internalSubmitting } = useDebonceSubmitting(props.form)\nconst dialogRef = ref<ComponentPublicInstance | null>(null)\nconst enableEnterSubmit = computed(() => props.dialogProps.enterSubmit !== false)\n\nuseEnterSubmit({\n visible: computed(() => props.visible),\n resolve: () => props.resolve(),\n submitting: internalSubmitting,\n getContainer: () => resolveDialogElement(dialogRef.value),\n enabled: enableEnterSubmit,\n})\n</script>\n\n<template>\n <ElDialog\n ref=\"dialogRef\"\n :class=\"prefixCls\"\n :z-index=\"elConfig.zIndex\"\n v-bind=\"_dialogProps\"\n :model-value=\"visible\"\n :before-close=\"(done) => {\n reject()\n if (isFn(props.dialogProps.beforeClose)) {\n props.dialogProps.beforeClose(done)\n }\n else {\n done()\n }\n }\"\n >\n <template #header>\n <slot v-if=\"slots.header\" name=\"header\" :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </template>\n\n <template #default>\n <FormProvider :form=\"props.form\">\n <ElConfigProvider v-bind=\"elConfig\">\n <slot :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </ElConfigProvider>\n </FormProvider>\n </template>\n\n <template #footer>\n <div :class=\"`${prefixCls}-footer`\">\n <template v-if=\"slots.footer\">\n <slot name=\"footer\" :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </template>\n <template v-else>\n <ElButton\n v-bind=\"_dialogProps.cancelButtonProps\"\n @click=\"props.reject()\"\n >\n {{ _dialogProps.cancelText || '取消' }}\n </ElButton>\n <ElButton\n type=\"primary\"\n v-bind=\"_dialogProps.okButtonProps\"\n :loading=\"internalSubmitting\"\n @click=\"props.resolve()\"\n >\n {{ _dialogProps.okText || '确定' }}\n </ElButton>\n </template>\n </div>\n </template>\n </ElDialog>\n</template>\n"],"mappings":";;;;;;;;;;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AM,SACpB,WAAuE,KAAA,QAAA,UAAA;;KAAlD,SAAS,QAAA;KAAU,QAAQ,QAAA;KAAS,MAAM,QAAA;uBAEjE,mBAeW,UAAA,EAAA,KAAA,GAAA,EAAA,CAdT,YAKW,MAAA,SAAA,EALX,WACU,MAIC,aAJW,CAAC,mBAAiB,EACrC,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAM,QAAM,GAAA,CAAA,EAAA;4BAEiB,CAAA,gBAAA,gBAAlC,MAAA,aAAY,CAAC,cAAU,KAAA,EAAA,EAAA,CAAA,CAAA;;YAE5B,YAOW,MAAA,SAAA,EAPX,WAOW,EANT,MAAK,WAAS,EACN,MAAA,aAAY,CAAC,eAAa;KACjC,SAAS,MAAA,mBAAkB;KAC3B,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAM,SAAO;;4BAEY,CAAA,gBAAA,gBAA9B,MAAA,aAAY,CAAC,UAAM,KAAA,EAAA,EAAA,CAAA,CAAA"}
@@ -3,10 +3,10 @@ import { isVueOptions } from "../__builtins__/shared/utils.mjs";
3
3
  import _sfc_main from "./dialog-content.mjs";
4
4
  import { observer } from "@silver-formily/reactive-vue";
5
5
  import { createApp, h, ref } from "vue";
6
- import { createForm } from "@formily/core";
7
- import { applyMiddleware, isArr, isFn, isStr, isValid, pascalCase } from "@formily/shared";
6
+ import { createForm } from "@silver-formily/core";
7
+ import { applyMiddleware, isArr, isFn, isStr, isValid, pascalCase } from "@silver-formily/shared";
8
8
  import { camelCase } from "lodash-es";
9
- import { toJS } from "@formily/reactive";
9
+ import { toJS } from "@silver-formily/reactive";
10
10
  //#region src/form-dialog/index.ts
11
11
  function FormDialog(title, content, dynamicMiddlewareNames) {
12
12
  const env = {