@silver-formily/element-plus 2.4.0 → 3.0.1

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 (118) hide show
  1. package/esm/__builtins__/shared/transform-component.d.ts +1 -1
  2. package/esm/__builtins__/shared/utils.mjs +0 -2
  3. package/esm/__builtins__/shared/utils.mjs.map +1 -1
  4. package/esm/array-base/index.mjs +11 -11
  5. package/esm/array-base/symbols.mjs +1 -1
  6. package/esm/array-base/symbols.mjs.map +1 -1
  7. package/esm/array-base/utils.mjs +0 -1
  8. package/esm/array-base/utils.mjs.map +1 -1
  9. package/esm/array-cards/index.mjs +1 -1
  10. package/esm/array-collapse/index.mjs +2 -5
  11. package/esm/array-collapse/index.mjs.map +1 -1
  12. package/esm/array-items/index.mjs +1 -1
  13. package/esm/array-list-tabs/index.mjs +9 -9
  14. package/esm/array-table/index.mjs +7 -10
  15. package/esm/array-table/index.mjs.map +1 -1
  16. package/esm/array-tabs/index.mjs +1 -2
  17. package/esm/array-tabs/index.mjs.map +1 -1
  18. package/esm/autocomplete/autocomplete.d.ts +16 -16
  19. package/esm/autocomplete/index.d.ts +8 -8
  20. package/esm/autocomplete/index.mjs +2 -4
  21. package/esm/autocomplete/index.mjs.map +1 -1
  22. package/esm/cascader/index.mjs +2 -2
  23. package/esm/checkbox/index.d.ts +27 -27
  24. package/esm/checkbox/index.mjs +7 -12
  25. package/esm/checkbox/index.mjs.map +1 -1
  26. package/esm/editable/editable.d.ts +12 -12
  27. package/esm/editable/index.d.ts +6 -6
  28. package/esm/editable/index.mjs +27 -33
  29. package/esm/editable/index.mjs.map +1 -1
  30. package/esm/env.d.d.ts +1 -0
  31. package/esm/form/form.mjs +5 -5
  32. package/esm/form-button-group/index.mjs +5 -12
  33. package/esm/form-button-group/index.mjs.map +1 -1
  34. package/esm/form-collapse/index.mjs +1 -1
  35. package/esm/form-collapse/utils.mjs +0 -2
  36. package/esm/form-collapse/utils.mjs.map +1 -1
  37. package/esm/form-dialog/index.d.ts +1 -1
  38. package/esm/form-dialog/index.mjs +63 -70
  39. package/esm/form-dialog/index.mjs.map +1 -1
  40. package/esm/form-dialog/types.d.ts +13 -5
  41. package/esm/form-drawer/index.d.ts +1 -1
  42. package/esm/form-drawer/index.mjs +62 -69
  43. package/esm/form-drawer/index.mjs.map +1 -1
  44. package/esm/form-drawer/types.d.ts +13 -5
  45. package/esm/form-grid/form-grid.d.ts +2 -2
  46. package/esm/form-grid/hooks.d.ts +1 -2
  47. package/esm/form-grid/hooks.mjs +4 -11
  48. package/esm/form-grid/hooks.mjs.map +1 -1
  49. package/esm/form-grid/index.mjs +34 -32
  50. package/esm/form-grid/index.mjs.map +1 -1
  51. package/esm/form-item/index.mjs +25 -31
  52. package/esm/form-item/index.mjs.map +1 -1
  53. package/esm/form-item/types.d.ts +8 -6
  54. package/esm/form-layout/form-layout.mjs +2 -2
  55. package/esm/form-layout/utils.mjs +2 -2
  56. package/esm/form-layout/utils.mjs.map +1 -1
  57. package/esm/form-step/index.mjs +2 -2
  58. package/esm/form-step/utils.mjs +0 -3
  59. package/esm/form-step/utils.mjs.map +1 -1
  60. package/esm/form-tab/hooks.d.ts +2 -1
  61. package/esm/form-tab/hooks.mjs +13 -20
  62. package/esm/form-tab/hooks.mjs.map +1 -1
  63. package/esm/form-tab/index.mjs +39 -40
  64. package/esm/form-tab/index.mjs.map +1 -1
  65. package/esm/index.mjs +9 -9
  66. package/esm/input/index.mjs +2 -2
  67. package/esm/input-number/index.d.ts +15 -15
  68. package/esm/input-tag/index.mjs +2 -2
  69. package/esm/mention/index.mjs +2 -2
  70. package/esm/pagination/pagination.mjs +1 -1
  71. package/esm/pagination/pagination.mjs.map +1 -1
  72. package/esm/preview-text/index.mjs +2 -11
  73. package/esm/preview-text/index.mjs.map +1 -1
  74. package/esm/preview-text/utils.mjs +1 -1
  75. package/esm/preview-text/utils.mjs.map +1 -1
  76. package/esm/query-form/index.d.ts +3 -3
  77. package/esm/query-form/index.mjs +28 -31
  78. package/esm/query-form/index.mjs.map +1 -1
  79. package/esm/query-form/query-form.d.ts +1 -1
  80. package/esm/query-form/types.d.ts +1 -1
  81. package/esm/query-form-item/index.mjs +7 -11
  82. package/esm/query-form-item/index.mjs.map +1 -1
  83. package/esm/radio/index.d.ts +18 -18
  84. package/esm/radio/index.mjs +7 -12
  85. package/esm/radio/index.mjs.map +1 -1
  86. package/esm/reset/index.mjs +2 -2
  87. package/esm/segmented/index.mjs +2 -2
  88. package/esm/select/index.d.ts +16 -16
  89. package/esm/select/index.mjs +1 -1
  90. package/esm/select-table/index.d.ts +6 -6
  91. package/esm/select-table/index.mjs +4 -5
  92. package/esm/select-table/index.mjs.map +1 -1
  93. package/esm/select-table/select-table.d.ts +2 -2
  94. package/esm/styles/form-grid/index.css +1 -1
  95. package/esm/submit/index.mjs +3 -3
  96. package/esm/submit/index.mjs.map +1 -1
  97. package/esm/switch/index.d.ts +9 -9
  98. package/esm/time-select/index.d.ts +12 -12
  99. package/esm/transfer/index.d.ts +12 -12
  100. package/esm/tree/index.mjs +3 -3
  101. package/esm/tree/utils.mjs +0 -2
  102. package/esm/tree/utils.mjs.map +1 -1
  103. package/esm/tree-select/index.mjs +2 -2
  104. package/esm/upload/index.d.ts +12 -12
  105. package/esm/upload/index.mjs +3 -3
  106. package/esm/upload/upload.d.ts +24 -24
  107. package/esm/vendor/icon.mjs.map +1 -1
  108. package/esm/vendor/lodash.mjs +111 -85
  109. package/esm/vendor/lodash.mjs.map +1 -1
  110. package/esm/vendor/runtime.mjs +23 -29
  111. package/esm/vendor/runtime.mjs.map +1 -1
  112. package/esm/vendor/shared.esm-bundler.mjs +2 -7
  113. package/esm/vendor/shared.esm-bundler.mjs.map +1 -1
  114. package/esm/vendor/sizes.mjs.map +1 -1
  115. package/esm/vendor/types.mjs +5 -5
  116. package/esm/vendor/types.mjs.map +1 -1
  117. package/package.json +57 -82
  118. package/LICENSE +0 -21
@@ -1,5 +1,5 @@
1
1
  import { observer as m } from "@silver-formily/reactive-vue";
2
- import { defineComponent as s, createBlock as a, openBlock as c, unref as e, mergeProps as l, withCtx as f, renderSlot as b } from "vue";
2
+ import { defineComponent as s, openBlock as a, createBlock as c, unref as e, mergeProps as l, withCtx as f, renderSlot as b } from "vue";
3
3
  import { useParentForm as p } from "@silver-formily/vue";
4
4
  import { ElButton as d } from "element-plus";
5
5
  const S = /* @__PURE__ */ s({
@@ -17,9 +17,9 @@ const S = /* @__PURE__ */ s({
17
17
  setup(i) {
18
18
  const t = i, n = p();
19
19
  function r(o) {
20
- t.onClick?.(o) !== !1 && t.onSubmit && n?.value?.submit(t.onSubmit).then(t.onSubmitSuccess).catch(t.onSubmitFailed ?? console.log);
20
+ t.onClick?.(o) !== !1 && t.onSubmit && n?.value?.submit(t.onSubmit).then(t.onSubmitSuccess).catch(t.onSubmitFailed ?? console.error);
21
21
  }
22
- return (o, u) => (c(), a(e(d), l({
22
+ return (o, u) => (a(), c(e(d), l({
23
23
  "native-type": t.submit ? "button" : "submit",
24
24
  type: "primary"
25
25
  }, o.$attrs, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/submit/submit.vue","../../src/submit/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { IFormFeedback } from '@formily/core'\nimport type { PropType } from 'vue'\nimport { useParentForm } from '@silver-formily/vue'\nimport { ElButton } from 'element-plus'\n\ndefineOptions({\n name: 'FSubmit',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n onClick: Function as PropType<(e: MouseEvent) => any>,\n onSubmit: Function as PropType<(values: any) => Promise<any>>,\n onSubmitSuccess: Function as PropType<(payload: any) => void>,\n onSubmitFailed: Function as PropType<(feedbacks: IFormFeedback[]) => void>,\n submit: Boolean,\n loading: Boolean,\n})\n\nconst formRef = useParentForm()\n\nfunction handleClick(e: MouseEvent) {\n if (props.onClick?.(e) === false)\n return\n if (props.onSubmit) {\n const form = formRef?.value\n form?.submit(props.onSubmit)\n .then(props.onSubmitSuccess)\n .catch(props.onSubmitFailed ?? console.log)\n }\n}\n</script>\n\n<template>\n <ElButton\n :native-type=\"props.submit ? 'button' : 'submit'\"\n type=\"primary\"\n v-bind=\"$attrs\"\n :loading=\"formRef?.submitting ?? props.loading\"\n @click=\"handleClick\"\n >\n <template #default>\n <slot />\n </template>\n </ElButton>\n</template>\n","import { observer } from '@silver-formily/reactive-vue'\nimport FSubmit from './submit.vue'\n\nexport const Submit = observer(FSubmit)\n\nexport default Submit\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","_openBlock","_createBlock","_unref","_mergeProps","$attrs","_renderSlot","_ctx","Submit","observer","FSubmit"],"mappings":";;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GASRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,MAAIL,EAAM,UAAUK,CAAC,MAAM,MAEvBL,EAAM,YACKE,GAAS,OAChB,OAAOF,EAAM,QAAQ,EACxB,KAAKA,EAAM,eAAe,EAC1B,MAAMA,EAAM,kBAAkB,QAAQ,GAAG;AAAA,IAEhD;sBAIEM,KAAAC,EAUWC,MAVXC,EAUW;AAAA,MATR,eAAaT,EAAM,SAAM,WAAA;AAAA,MAC1B,MAAK;AAAA,IAAA,GACGU,EAAAA,QAAM;AAAA,MACb,SAASF,EAAAN,CAAA,GAAS,cAAcF,EAAM;AAAA,MACtC,SAAOI;AAAA,IAAA;MAEG,WACT,MAAQ;AAAA,QAARO,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICxCDC,IAASC,EAASC,CAAO;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/submit/submit.vue","../../src/submit/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { IFormFeedback } from '@formily/core'\nimport type { PropType } from 'vue'\nimport { useParentForm } from '@silver-formily/vue'\nimport { ElButton } from 'element-plus'\n\ndefineOptions({\n name: 'FSubmit',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n onClick: Function as PropType<(e: MouseEvent) => any>,\n onSubmit: Function as PropType<(values: any) => Promise<any>>,\n onSubmitSuccess: Function as PropType<(payload: any) => void>,\n onSubmitFailed: Function as PropType<(feedbacks: IFormFeedback[]) => void>,\n submit: Boolean,\n loading: Boolean,\n})\n\nconst formRef = useParentForm()\n\nfunction handleClick(e: MouseEvent) {\n if (props.onClick?.(e) === false)\n return\n if (props.onSubmit) {\n const form = formRef?.value\n form?.submit(props.onSubmit)\n .then(props.onSubmitSuccess)\n .catch(props.onSubmitFailed ?? console.error)\n }\n}\n</script>\n\n<template>\n <ElButton\n :native-type=\"props.submit ? 'button' : 'submit'\"\n type=\"primary\"\n v-bind=\"$attrs\"\n :loading=\"formRef?.submitting ?? props.loading\"\n @click=\"handleClick\"\n >\n <template #default>\n <slot />\n </template>\n </ElButton>\n</template>\n","import { observer } from '@silver-formily/reactive-vue'\nimport FSubmit from './submit.vue'\n\nexport const Submit = observer(FSubmit)\n\nexport default Submit\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","_openBlock","_createBlock","_unref","_mergeProps","$attrs","_renderSlot","_ctx","Submit","observer","FSubmit"],"mappings":";;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GASRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,MAAIL,EAAM,UAAUK,CAAC,MAAM,MAEvBL,EAAM,YACKE,GAAS,OAChB,OAAOF,EAAM,QAAQ,EACxB,KAAKA,EAAM,eAAe,EAC1B,MAAMA,EAAM,kBAAkB,QAAQ,KAAK;AAAA,IAElD;sBAIEM,KAAAC,EAUWC,MAVXC,EAUW;AAAA,MATR,eAAaT,EAAM,SAAM,WAAA;AAAA,MAC1B,MAAK;AAAA,IAAA,GACGU,EAAAA,QAAM;AAAA,MACb,SAASF,EAAAN,CAAA,GAAS,cAAcF,EAAM;AAAA,MACtC,SAAOI;AAAA,IAAA;MAEG,WACT,MAAQ;AAAA,QAARO,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICxCDC,IAASC,EAASC,CAAO;"}
@@ -17,12 +17,12 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
17
17
  type: import('vue').PropType<boolean>;
18
18
  default: undefined;
19
19
  };
20
- id: {
21
- type: import('vue').PropType<string>;
22
- };
23
20
  loading: {
24
21
  type: import('vue').PropType<boolean>;
25
22
  };
23
+ id: {
24
+ type: import('vue').PropType<string>;
25
+ };
26
26
  modelValue: {
27
27
  type: import('vue').PropType<string | number | boolean>;
28
28
  default: boolean;
@@ -115,12 +115,12 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
115
115
  type: import('vue').PropType<boolean>;
116
116
  default: undefined;
117
117
  };
118
- id: {
119
- type: import('vue').PropType<string>;
120
- };
121
118
  loading: {
122
119
  type: import('vue').PropType<boolean>;
123
120
  };
121
+ id: {
122
+ type: import('vue').PropType<string>;
123
+ };
124
124
  modelValue: {
125
125
  type: import('vue').PropType<string | number | boolean>;
126
126
  default: boolean;
@@ -206,12 +206,12 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
206
206
  type: import('vue').PropType<boolean>;
207
207
  default: undefined;
208
208
  };
209
- id: {
210
- type: import('vue').PropType<string>;
211
- };
212
209
  loading: {
213
210
  type: import('vue').PropType<boolean>;
214
211
  };
212
+ id: {
213
+ type: import('vue').PropType<string>;
214
+ };
215
215
  modelValue: {
216
216
  type: import('vue').PropType<string | number | boolean>;
217
217
  default: boolean;
@@ -12,6 +12,10 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
12
12
  name: {
13
13
  type: import('vue').PropType<string>;
14
14
  };
15
+ format: {
16
+ type: import('vue').PropType<string>;
17
+ default: string;
18
+ };
15
19
  editable: {
16
20
  type: import('vue').PropType<boolean>;
17
21
  default: boolean;
@@ -20,8 +24,8 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
20
24
  type: import('vue').PropType<boolean>;
21
25
  default: undefined;
22
26
  };
23
- format: {
24
- type: import('vue').PropType<string>;
27
+ effect: {
28
+ type: import('vue').PropType<import('element-plus').PopperEffect>;
25
29
  default: string;
26
30
  };
27
31
  placeholder: {
@@ -62,10 +66,6 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
62
66
  type: import('vue').PropType<string>;
63
67
  default: string;
64
68
  };
65
- effect: {
66
- type: import('vue').PropType<import('element-plus').PopperEffect>;
67
- default: string;
68
- };
69
69
  minTime: {
70
70
  type: import('vue').PropType<string>;
71
71
  };
@@ -98,6 +98,10 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
98
98
  name: {
99
99
  type: import('vue').PropType<string>;
100
100
  };
101
+ format: {
102
+ type: import('vue').PropType<string>;
103
+ default: string;
104
+ };
101
105
  editable: {
102
106
  type: import('vue').PropType<boolean>;
103
107
  default: boolean;
@@ -106,8 +110,8 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
106
110
  type: import('vue').PropType<boolean>;
107
111
  default: undefined;
108
112
  };
109
- format: {
110
- type: import('vue').PropType<string>;
113
+ effect: {
114
+ type: import('vue').PropType<import('element-plus').PopperEffect>;
111
115
  default: string;
112
116
  };
113
117
  placeholder: {
@@ -148,10 +152,6 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
148
152
  type: import('vue').PropType<string>;
149
153
  default: string;
150
154
  };
151
- effect: {
152
- type: import('vue').PropType<import('element-plus').PopperEffect>;
153
- default: string;
154
- };
155
155
  minTime: {
156
156
  type: import('vue').PropType<string>;
157
157
  };
@@ -6,6 +6,10 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
6
6
  type: import('vue').PropType<import('element-plus').TransferDataItem[]>;
7
7
  default: () => never[];
8
8
  };
9
+ format: {
10
+ type: import('vue').PropType<import('element-plus').TransferFormat>;
11
+ default: () => {};
12
+ };
9
13
  props: {
10
14
  type: import('vue').PropType<import('element-plus').TransferPropsAlias>;
11
15
  default: () => {
@@ -14,10 +18,6 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
14
18
  disabled: string;
15
19
  };
16
20
  };
17
- format: {
18
- type: import('vue').PropType<import('element-plus').TransferFormat>;
19
- default: () => {};
20
- };
21
21
  modelValue: {
22
22
  type: import('vue').PropType<import('element-plus').TransferKey[]>;
23
23
  default: () => never[];
@@ -95,6 +95,10 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
95
95
  type: import('vue').PropType<import('element-plus').TransferDataItem[]>;
96
96
  default: () => never[];
97
97
  };
98
+ format: {
99
+ type: import('vue').PropType<import('element-plus').TransferFormat>;
100
+ default: () => {};
101
+ };
98
102
  props: {
99
103
  type: import('vue').PropType<import('element-plus').TransferPropsAlias>;
100
104
  default: () => {
@@ -103,10 +107,6 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
103
107
  disabled: string;
104
108
  };
105
109
  };
106
- format: {
107
- type: import('vue').PropType<import('element-plus').TransferFormat>;
108
- default: () => {};
109
- };
110
110
  modelValue: {
111
111
  type: import('vue').PropType<import('element-plus').TransferKey[]>;
112
112
  default: () => never[];
@@ -176,6 +176,10 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
176
176
  type: import('vue').PropType<import('element-plus').TransferDataItem[]>;
177
177
  default: () => never[];
178
178
  };
179
+ format: {
180
+ type: import('vue').PropType<import('element-plus').TransferFormat>;
181
+ default: () => {};
182
+ };
179
183
  props: {
180
184
  type: import('vue').PropType<import('element-plus').TransferPropsAlias>;
181
185
  default: () => {
@@ -184,10 +188,6 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
184
188
  disabled: string;
185
189
  };
186
190
  };
187
- format: {
188
- type: import('vue').PropType<import('element-plus').TransferFormat>;
189
- default: () => {};
190
- };
191
191
  modelValue: {
192
192
  type: import('vue').PropType<import('element-plus').TransferKey[]>;
193
193
  default: () => never[];
@@ -2,7 +2,7 @@ import { useField as _, connect as A, mapProps as D } from "@silver-formily/vue"
2
2
  import { ElScrollbar as H, ElTree as P, vLoading as R } from "element-plus";
3
3
  import "@formily/reactive";
4
4
  import "@vueuse/core";
5
- import { defineComponent as w, useSlots as F, ref as h, computed as y, watch as v, nextTick as k, createBlock as g, openBlock as C, unref as a, withCtx as T, withDirectives as B, mergeProps as E, createSlots as L, renderList as j, renderSlot as z, normalizeProps as I, guardReactiveProps as N } from "vue";
5
+ import { defineComponent as w, useSlots as F, ref as h, computed as y, watch as v, nextTick as k, openBlock as g, createBlock as C, unref as a, withCtx as T, withDirectives as B, mergeProps as E, createSlots as L, renderList as j, renderSlot as z, normalizeProps as I, guardReactiveProps as N } from "vue";
6
6
  import { mapReadPretty as O } from "../__builtins__/shared/transform-component.mjs";
7
7
  import { PreviewText as $ } from "../preview-text/index.mjs";
8
8
  import { isFn as q } from "@formily/shared";
@@ -66,12 +66,12 @@ const W = /* @__PURE__ */ w({
66
66
  const u = _();
67
67
  return u.value?.inject({
68
68
  getTreeRef: () => o
69
- }), (t, f) => (C(), g(a(H), {
69
+ }), (t, f) => (g(), C(a(H), {
70
70
  height: e.height,
71
71
  "max-height": e.maxHeight
72
72
  }, {
73
73
  default: T(() => [
74
- B((C(), g(a(P), E({
74
+ B((g(), C(a(P), E({
75
75
  ref_key: "treeRef",
76
76
  ref: o,
77
77
  data: n.value,
@@ -54,7 +54,6 @@ function T(c, r, t, e, n = []) {
54
54
  return u;
55
55
  }
56
56
  }
57
- /* istanbul ignore next -- @preserve */
58
57
  return [];
59
58
  }
60
59
  function v(c, r, t, e) {
@@ -114,7 +113,6 @@ function D(c, r = [], t) {
114
113
  }
115
114
  function b(c, r) {
116
115
  const { optionAsValue: t, nodeKey: e, flatData: n, propsConfig: l, data: i, valueType: o, checkStrictly: u } = r;
117
- /* istanbul ignore if -- @preserve */
118
116
  if (!c || !Array.isArray(c))
119
117
  return [];
120
118
  const a = t ? c.map((d) => d[e]) : c;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../src/tree/utils.ts"],"sourcesContent":["import type { TreeNodeData } from 'element-plus'\n\nexport function flattenTree(nodes: TreeNodeData[], result: TreeNodeData[] = [], childrenKey = 'children'): TreeNodeData[] {\n for (const node of nodes) {\n result.push(node)\n if (node[childrenKey] && node[childrenKey].length > 0) {\n flattenTree(node[childrenKey], result, childrenKey)\n }\n }\n return result\n}\n\nexport function addDisabledToNodes(nodes: TreeNodeData[], disabled: boolean, propsConfig: any): TreeNodeData[] {\n if (!disabled) {\n return nodes\n }\n\n return nodes.map((node) => {\n const newNode = { ...node }\n newNode[propsConfig.disabled!] = true\n\n if (node[propsConfig.children!] && node[propsConfig.children!].length > 0) {\n newNode[propsConfig.children!] = addDisabledToNodes(node[propsConfig.children!], disabled, propsConfig)\n }\n\n return newNode\n })\n}\n\nexport function traverseTree(\n nodes: TreeNodeData[],\n callback: (node: TreeNodeData) => void,\n options: {\n leafOnly?: boolean\n childrenKey?: string\n } = {},\n) {\n const { leafOnly = false, childrenKey = 'children' } = options\n\n for (const node of nodes) {\n const children = node[childrenKey] || []\n const isLeaf = children.length === 0\n\n if (!leafOnly || isLeaf) {\n callback(node)\n }\n if (children.length > 0) {\n traverseTree(children, callback, options)\n }\n }\n}\n\nexport function getChildrenKeys(node: TreeNodeData, nodeKey: string, propsConfig: any): any[] {\n const children = node[propsConfig.children!] || []\n if (children.length === 0)\n return []\n\n const keys: any[] = []\n traverseTree(children, (child) => {\n keys.push(child[nodeKey])\n }, { childrenKey: propsConfig.children })\n\n return keys\n}\n\nexport function extractKeysFromPath(pathNodes: TreeNodeData[], nodeKey: string, propsConfig: any): any[] {\n const keys: any[] = []\n traverseTree(pathNodes, (node) => {\n keys.push(node[nodeKey])\n }, { leafOnly: true, childrenKey: propsConfig.children })\n\n return keys\n}\n\nexport function getSelectedPath(nodes: TreeNodeData[], selectedKeys: any[], nodeKey: string, propsConfig: any): TreeNodeData[] {\n const result: TreeNodeData[] = []\n\n for (const node of nodes) {\n const children = node[propsConfig.children!] || []\n const hasSelectedChild = children.length > 0\n ? getSelectedPath(children, selectedKeys, nodeKey, propsConfig).length > 0\n : false\n\n if (selectedKeys.includes(node[nodeKey]) || hasSelectedChild) {\n const newNode = { ...node }\n if (hasSelectedChild && children.length > 0) {\n newNode[propsConfig.children!] = getSelectedPath(children, selectedKeys, nodeKey, propsConfig)\n }\n result.push(newNode)\n }\n }\n\n return result\n}\n\n/**\n * 查找节点的所有父节点路径\n */\nexport function findParents(nodes: TreeNodeData[], targetKey: any, nodeKey: string, propsConfig: any, parents: any[] = []): any[] {\n for (const node of nodes) {\n const currentPath = [...parents, node[nodeKey]]\n\n if (node[nodeKey] === targetKey) {\n return currentPath\n }\n\n const children = node[propsConfig.children!] || []\n if (children.length > 0) {\n const found = findParents(children, targetKey, nodeKey, propsConfig, currentPath)\n if (found.length > 0) {\n return found\n }\n }\n }\n /* istanbul ignore next -- @preserve */\n return []\n}\n\n/**\n * 过滤叶子节点\n */\nexport function filterLeafNodes(keys: any[], flatData: TreeNodeData[], nodeKey: string, propsConfig: any): any[] {\n return keys.filter((key) => {\n const node = flatData.find(n => n[nodeKey] === key)\n if (!node)\n return false\n const children = node[propsConfig.children!] || []\n return children.length === 0\n })\n}\n\n/**\n * 获取输出数据\n */\nexport function getOutputData(\n keys: any[],\n halfCheckedKeys: any[] = [],\n options: {\n flatData: TreeNodeData[]\n nodeKey: string\n propsConfig: any\n data: TreeNodeData[]\n valueType: string\n includeHalfChecked: boolean\n checkStrictly: boolean\n },\n) {\n const { flatData, nodeKey, propsConfig, data, valueType, includeHalfChecked, checkStrictly } = options\n\n const selectedNodes = flatData.filter(node =>\n keys.includes(node[nodeKey]),\n )\n\n let outputKeys = [...keys]\n let outputNodes = [...selectedNodes]\n\n if (checkStrictly) {\n return {\n value: outputKeys,\n nodes: outputNodes,\n }\n }\n\n switch (valueType) {\n case 'parent': {\n const allChildKeys: any[] = []\n for (const node of selectedNodes) {\n allChildKeys.push(...getChildrenKeys(node, nodeKey, propsConfig))\n }\n outputKeys = keys.filter(key => !allChildKeys.includes(key))\n outputNodes = selectedNodes.filter(node =>\n outputKeys.includes(node[nodeKey]),\n )\n break\n }\n\n case 'child': {\n for (const node of selectedNodes) {\n const childKeys = getChildrenKeys(node, nodeKey, propsConfig)\n const hasSelectedChild = childKeys.some(key => keys.includes(key))\n if (hasSelectedChild) {\n outputKeys = outputKeys.filter(key => key !== node[nodeKey])\n outputNodes = outputNodes.filter(n =>\n n[nodeKey] !== node[nodeKey],\n )\n }\n }\n break\n }\n\n case 'path': {\n const selectedPath = getSelectedPath(data, keys, nodeKey, propsConfig)\n return {\n value: selectedPath,\n nodes: selectedPath,\n }\n }\n\n default: { // 'all'\n if (includeHalfChecked && halfCheckedKeys.length > 0) {\n const halfCheckedNodes = flatData.filter(node =>\n halfCheckedKeys.includes(node[nodeKey]),\n )\n outputKeys = [...outputKeys, ...halfCheckedKeys]\n outputNodes = [...outputNodes, ...halfCheckedNodes]\n }\n break\n }\n }\n\n return {\n value: outputKeys,\n nodes: outputNodes,\n }\n}\n\n/**\n * 根据valueType将输入值转换为checkedKeys\n */\nexport function getInputKeys(\n inputValue: any,\n options: {\n optionAsValue: boolean\n nodeKey: string\n flatData: TreeNodeData[]\n propsConfig: any\n data: TreeNodeData[]\n valueType: string\n checkStrictly: boolean\n },\n): any[] {\n const { optionAsValue, nodeKey, flatData, propsConfig, data, valueType, checkStrictly } = options\n\n /* istanbul ignore if -- @preserve */\n if (!inputValue || !Array.isArray(inputValue))\n return []\n\n const valueArray = optionAsValue ? inputValue.map((item: any) => item[nodeKey]) : inputValue\n\n if (checkStrictly) {\n return valueArray\n }\n\n switch (valueType) {\n case 'parent': {\n const allKeys = [...valueArray]\n\n for (const key of valueArray) {\n const node = flatData.find(n => n[nodeKey] === key)\n if (node) {\n const childKeys = getChildrenKeys(node, nodeKey, propsConfig)\n allKeys.push(...childKeys)\n }\n }\n return filterLeafNodes(allKeys, flatData, nodeKey, propsConfig)\n }\n\n case 'child': {\n const allKeys = [...valueArray]\n for (const key of valueArray) {\n const parentPath = findParents(data, key, nodeKey, propsConfig)\n allKeys.push(...parentPath)\n }\n return filterLeafNodes(allKeys, flatData, nodeKey, propsConfig)\n }\n\n case 'path': {\n return extractKeysFromPath(valueArray, nodeKey, propsConfig)\n }\n\n default: { // 'all'\n return filterLeafNodes(valueArray, flatData, nodeKey, propsConfig)\n }\n }\n}\n"],"names":["flattenTree","nodes","result","childrenKey","node","addDisabledToNodes","disabled","propsConfig","newNode","traverseTree","callback","options","leafOnly","children","isLeaf","getChildrenKeys","nodeKey","keys","child","extractKeysFromPath","pathNodes","getSelectedPath","selectedKeys","hasSelectedChild","findParents","targetKey","parents","currentPath","found","filterLeafNodes","flatData","key","n","getOutputData","halfCheckedKeys","data","valueType","includeHalfChecked","checkStrictly","selectedNodes","outputKeys","outputNodes","allChildKeys","selectedPath","halfCheckedNodes","getInputKeys","inputValue","optionAsValue","valueArray","item","allKeys","childKeys","parentPath"],"mappings":"AAEO,SAASA,EAAYC,GAAuBC,IAAyB,CAAA,GAAIC,IAAc,YAA4B;AACxH,aAAWC,KAAQH;AACjB,IAAAC,EAAO,KAAKE,CAAI,GACZA,EAAKD,CAAW,KAAKC,EAAKD,CAAW,EAAE,SAAS,KAClDH,EAAYI,EAAKD,CAAW,GAAGD,GAAQC,CAAW;AAGtD,SAAOD;AACT;AAEO,SAASG,EAAmBJ,GAAuBK,GAAmBC,GAAkC;AAC7G,SAAKD,IAIEL,EAAM,IAAI,CAACG,MAAS;AACzB,UAAMI,IAAU,EAAE,GAAGJ,EAAA;AACrB,WAAAI,EAAQD,EAAY,QAAS,IAAI,IAE7BH,EAAKG,EAAY,QAAS,KAAKH,EAAKG,EAAY,QAAS,EAAE,SAAS,MACtEC,EAAQD,EAAY,QAAS,IAAIF,EAAmBD,EAAKG,EAAY,QAAS,GAAGD,GAAUC,CAAW,IAGjGC;AAAA,EACT,CAAC,IAZQP;AAaX;AAEO,SAASQ,EACdR,GACAS,GACAC,IAGI,CAAA,GACJ;AACA,QAAM,EAAE,UAAA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,SAAA/B,GAAS,UAAAc,GAAU,aAAAvB,GAAa,MAAA4B,GAAM,WAAAC,GAAW,eAAAE,MAAkB3B;AAAA,EAAA;AAG1F,MAAI,CAACmC,KAAc,CAAC,MAAM,QAAQA,CAAU;AAC1C,WAAO,CAAA;AAET,QAAME,IAAaD,IAAgBD,EAAW,IAAI,CAACG,MAAcA,EAAKjC,CAAO,CAAC,IAAI8B;AAElF,MAAIR;AACF,WAAOU;AAGT,UAAQZ,GAAA;AAAA,IACN,KAAK,UAAU;AACb,YAAMc,IAAU,CAAC,GAAGF,CAAU;AAE9B,iBAAWjB,KAAOiB,GAAY;AAC5B,cAAM5C,IAAO0B,EAAS,KAAK,OAAKE,EAAEhB,CAAO,MAAMe,CAAG;AAClD,YAAI3B,GAAM;AACR,gBAAM+C,IAAYpC,EAAgBX,GAAMY,GAAST,CAAW;AAC5D,UAAA2C,EAAQ,KAAK,GAAGC,CAAS;AAAA,QAC3B;AAAA,MACF;AACA,aAAOtB,EAAgBqB,GAASpB,GAAUd,GAAST,CAAW;AAAA,IAChE;AAAA,IAEA,KAAK,SAAS;AACZ,YAAM2C,IAAU,CAAC,GAAGF,CAAU;AAC9B,iBAAWjB,KAAOiB,GAAY;AAC5B,cAAMI,IAAa5B,EAAYW,GAAMJ,GAAKf,GAAST,CAAW;AAC9D,QAAA2C,EAAQ,KAAK,GAAGE,CAAU;AAAA,MAC5B;AACA,aAAOvB,EAAgBqB,GAASpB,GAAUd,GAAST,CAAW;AAAA,IAChE;AAAA,IAEA,KAAK;AACH,aAAOY,EAAoB6B,GAAYhC,GAAST,CAAW;AAAA,IAG7D;AACE,aAAOsB,EAAgBmB,GAAYlB,GAAUd,GAAST,CAAW;AAAA,EACnE;AAEJ;"}
1
+ {"version":3,"file":"utils.mjs","sources":["../../src/tree/utils.ts"],"sourcesContent":["import type { TreeNodeData } from 'element-plus'\n\nexport function flattenTree(nodes: TreeNodeData[], result: TreeNodeData[] = [], childrenKey = 'children'): TreeNodeData[] {\n for (const node of nodes) {\n result.push(node)\n if (node[childrenKey] && node[childrenKey].length > 0) {\n flattenTree(node[childrenKey], result, childrenKey)\n }\n }\n return result\n}\n\nexport function addDisabledToNodes(nodes: TreeNodeData[], disabled: boolean, propsConfig: any): TreeNodeData[] {\n if (!disabled) {\n return nodes\n }\n\n return nodes.map((node) => {\n const newNode = { ...node }\n newNode[propsConfig.disabled!] = true\n\n if (node[propsConfig.children!] && node[propsConfig.children!].length > 0) {\n newNode[propsConfig.children!] = addDisabledToNodes(node[propsConfig.children!], disabled, propsConfig)\n }\n\n return newNode\n })\n}\n\nexport function traverseTree(\n nodes: TreeNodeData[],\n callback: (node: TreeNodeData) => void,\n options: {\n leafOnly?: boolean\n childrenKey?: string\n } = {},\n) {\n const { leafOnly = false, childrenKey = 'children' } = options\n\n for (const node of nodes) {\n const children = node[childrenKey] || []\n const isLeaf = children.length === 0\n\n if (!leafOnly || isLeaf) {\n callback(node)\n }\n if (children.length > 0) {\n traverseTree(children, callback, options)\n }\n }\n}\n\nexport function getChildrenKeys(node: TreeNodeData, nodeKey: string, propsConfig: any): any[] {\n const children = node[propsConfig.children!] || []\n if (children.length === 0)\n return []\n\n const keys: any[] = []\n traverseTree(children, (child) => {\n keys.push(child[nodeKey])\n }, { childrenKey: propsConfig.children })\n\n return keys\n}\n\nexport function extractKeysFromPath(pathNodes: TreeNodeData[], nodeKey: string, propsConfig: any): any[] {\n const keys: any[] = []\n traverseTree(pathNodes, (node) => {\n keys.push(node[nodeKey])\n }, { leafOnly: true, childrenKey: propsConfig.children })\n\n return keys\n}\n\nexport function getSelectedPath(nodes: TreeNodeData[], selectedKeys: any[], nodeKey: string, propsConfig: any): TreeNodeData[] {\n const result: TreeNodeData[] = []\n\n for (const node of nodes) {\n const children = node[propsConfig.children!] || []\n const hasSelectedChild = children.length > 0\n ? getSelectedPath(children, selectedKeys, nodeKey, propsConfig).length > 0\n : false\n\n if (selectedKeys.includes(node[nodeKey]) || hasSelectedChild) {\n const newNode = { ...node }\n if (hasSelectedChild && children.length > 0) {\n newNode[propsConfig.children!] = getSelectedPath(children, selectedKeys, nodeKey, propsConfig)\n }\n result.push(newNode)\n }\n }\n\n return result\n}\n\n/**\n * 查找节点的所有父节点路径\n */\nexport function findParents(nodes: TreeNodeData[], targetKey: any, nodeKey: string, propsConfig: any, parents: any[] = []): any[] {\n for (const node of nodes) {\n const currentPath = [...parents, node[nodeKey]]\n\n if (node[nodeKey] === targetKey) {\n return currentPath\n }\n\n const children = node[propsConfig.children!] || []\n if (children.length > 0) {\n const found = findParents(children, targetKey, nodeKey, propsConfig, currentPath)\n if (found.length > 0) {\n return found\n }\n }\n }\n /* istanbul ignore next -- @preserve */\n return []\n}\n\n/**\n * 过滤叶子节点\n */\nexport function filterLeafNodes(keys: any[], flatData: TreeNodeData[], nodeKey: string, propsConfig: any): any[] {\n return keys.filter((key) => {\n const node = flatData.find(n => n[nodeKey] === key)\n if (!node)\n return false\n const children = node[propsConfig.children!] || []\n return children.length === 0\n })\n}\n\n/**\n * 获取输出数据\n */\nexport function getOutputData(\n keys: any[],\n halfCheckedKeys: any[] = [],\n options: {\n flatData: TreeNodeData[]\n nodeKey: string\n propsConfig: any\n data: TreeNodeData[]\n valueType: string\n includeHalfChecked: boolean\n checkStrictly: boolean\n },\n) {\n const { flatData, nodeKey, propsConfig, data, valueType, includeHalfChecked, checkStrictly } = options\n\n const selectedNodes = flatData.filter(node =>\n keys.includes(node[nodeKey]),\n )\n\n let outputKeys = [...keys]\n let outputNodes = [...selectedNodes]\n\n if (checkStrictly) {\n return {\n value: outputKeys,\n nodes: outputNodes,\n }\n }\n\n switch (valueType) {\n case 'parent': {\n const allChildKeys: any[] = []\n for (const node of selectedNodes) {\n allChildKeys.push(...getChildrenKeys(node, nodeKey, propsConfig))\n }\n outputKeys = keys.filter(key => !allChildKeys.includes(key))\n outputNodes = selectedNodes.filter(node =>\n outputKeys.includes(node[nodeKey]),\n )\n break\n }\n\n case 'child': {\n for (const node of selectedNodes) {\n const childKeys = getChildrenKeys(node, nodeKey, propsConfig)\n const hasSelectedChild = childKeys.some(key => keys.includes(key))\n if (hasSelectedChild) {\n outputKeys = outputKeys.filter(key => key !== node[nodeKey])\n outputNodes = outputNodes.filter(n =>\n n[nodeKey] !== node[nodeKey],\n )\n }\n }\n break\n }\n\n case 'path': {\n const selectedPath = getSelectedPath(data, keys, nodeKey, propsConfig)\n return {\n value: selectedPath,\n nodes: selectedPath,\n }\n }\n\n default: { // 'all'\n if (includeHalfChecked && halfCheckedKeys.length > 0) {\n const halfCheckedNodes = flatData.filter(node =>\n halfCheckedKeys.includes(node[nodeKey]),\n )\n outputKeys = [...outputKeys, ...halfCheckedKeys]\n outputNodes = [...outputNodes, ...halfCheckedNodes]\n }\n break\n }\n }\n\n return {\n value: outputKeys,\n nodes: outputNodes,\n }\n}\n\n/**\n * 根据valueType将输入值转换为checkedKeys\n */\nexport function getInputKeys(\n inputValue: any,\n options: {\n optionAsValue: boolean\n nodeKey: string\n flatData: TreeNodeData[]\n propsConfig: any\n data: TreeNodeData[]\n valueType: string\n checkStrictly: boolean\n },\n): any[] {\n const { optionAsValue, nodeKey, flatData, propsConfig, data, valueType, checkStrictly } = options\n\n /* istanbul ignore if -- @preserve */\n if (!inputValue || !Array.isArray(inputValue))\n return []\n\n const valueArray = optionAsValue ? inputValue.map((item: any) => item[nodeKey]) : inputValue\n\n if (checkStrictly) {\n return valueArray\n }\n\n switch (valueType) {\n case 'parent': {\n const allKeys = [...valueArray]\n\n for (const key of valueArray) {\n const node = flatData.find(n => n[nodeKey] === key)\n if (node) {\n const childKeys = getChildrenKeys(node, nodeKey, propsConfig)\n allKeys.push(...childKeys)\n }\n }\n return filterLeafNodes(allKeys, flatData, nodeKey, propsConfig)\n }\n\n case 'child': {\n const allKeys = [...valueArray]\n for (const key of valueArray) {\n const parentPath = findParents(data, key, nodeKey, propsConfig)\n allKeys.push(...parentPath)\n }\n return filterLeafNodes(allKeys, flatData, nodeKey, propsConfig)\n }\n\n case 'path': {\n return extractKeysFromPath(valueArray, nodeKey, propsConfig)\n }\n\n default: { // 'all'\n return filterLeafNodes(valueArray, flatData, nodeKey, propsConfig)\n }\n }\n}\n"],"names":["flattenTree","nodes","result","childrenKey","node","addDisabledToNodes","disabled","propsConfig","newNode","traverseTree","callback","options","leafOnly","children","isLeaf","getChildrenKeys","nodeKey","keys","child","extractKeysFromPath","pathNodes","getSelectedPath","selectedKeys","hasSelectedChild","findParents","targetKey","parents","currentPath","found","filterLeafNodes","flatData","key","n","getOutputData","halfCheckedKeys","data","valueType","includeHalfChecked","checkStrictly","selectedNodes","outputKeys","outputNodes","allChildKeys","selectedPath","halfCheckedNodes","getInputKeys","inputValue","optionAsValue","valueArray","item","allKeys","childKeys","parentPath"],"mappings":"AAEO,SAASA,EAAYC,GAAuBC,IAAyB,CAAA,GAAIC,IAAc,YAA4B;AACxH,aAAWC,KAAQH;AACjB,IAAAC,EAAO,KAAKE,CAAI,GACZA,EAAKD,CAAW,KAAKC,EAAKD,CAAW,EAAE,SAAS,KAClDH,EAAYI,EAAKD,CAAW,GAAGD,GAAQC,CAAW;AAGtD,SAAOD;AACT;AAEO,SAASG,EAAmBJ,GAAuBK,GAAmBC,GAAkC;AAC7G,SAAKD,IAIEL,EAAM,IAAI,CAACG,MAAS;AACzB,UAAMI,IAAU,EAAE,GAAGJ,EAAA;AACrB,WAAAI,EAAQD,EAAY,QAAS,IAAI,IAE7BH,EAAKG,EAAY,QAAS,KAAKH,EAAKG,EAAY,QAAS,EAAE,SAAS,MACtEC,EAAQD,EAAY,QAAS,IAAIF,EAAmBD,EAAKG,EAAY,QAAS,GAAGD,GAAUC,CAAW,IAGjGC;AAAA,EACT,CAAC,IAZQP;AAaX;AAEO,SAASQ,EACdR,GACAS,GACAC,IAGI,CAAA,GACJ;AACA,QAAM,EAAE,UAAAC,IAAW,IAAO,aAAAT,IAAc,eAAeQ;AAEvD,aAAWP,KAAQH,GAAO;AACxB,UAAMY,IAAWT,EAAKD,CAAW,KAAK,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AAC,MAAM,QAAQA,CAAU;AAC1C,WAAO,CAAA;AAET,QAAME,IAAaD,IAAgBD,EAAW,IAAI,CAACG,MAAcA,EAAKjC,CAAO,CAAC,IAAI8B;AAElF,MAAIR;AACF,WAAOU;AAGT,UAAQZ,GAAA;AAAA,IACN,KAAK,UAAU;AACb,YAAMc,IAAU,CAAC,GAAGF,CAAU;AAE9B,iBAAWjB,KAAOiB,GAAY;AAC5B,cAAM5C,IAAO0B,EAAS,KAAK,OAAKE,EAAEhB,CAAO,MAAMe,CAAG;AAClD,YAAI3B,GAAM;AACR,gBAAM+C,IAAYpC,EAAgBX,GAAMY,GAAST,CAAW;AAC5D,UAAA2C,EAAQ,KAAK,GAAGC,CAAS;AAAA,QAC3B;AAAA,MACF;AACA,aAAOtB,EAAgBqB,GAASpB,GAAUd,GAAST,CAAW;AAAA,IAChE;AAAA,IAEA,KAAK,SAAS;AACZ,YAAM2C,IAAU,CAAC,GAAGF,CAAU;AAC9B,iBAAWjB,KAAOiB,GAAY;AAC5B,cAAMI,IAAa5B,EAAYW,GAAMJ,GAAKf,GAAST,CAAW;AAC9D,QAAA2C,EAAQ,KAAK,GAAGE,CAAU;AAAA,MAC5B;AACA,aAAOvB,EAAgBqB,GAASpB,GAAUd,GAAST,CAAW;AAAA,IAChE;AAAA,IAEA,KAAK;AACH,aAAOY,EAAoB6B,GAAYhC,GAAST,CAAW;AAAA,IAG7D;AACE,aAAOsB,EAAgBmB,GAAYlB,GAAUd,GAAST,CAAW;AAAA,EACnE;AAEJ;"}
@@ -2,7 +2,7 @@ import { useField as c, connect as i, mapProps as p } from "@silver-formily/vue"
2
2
  import { ElTreeSelect as m } from "element-plus";
3
3
  import "@formily/reactive";
4
4
  import "@vueuse/core";
5
- import { defineComponent as f, useSlots as d, ref as u, createBlock as S, openBlock as _, unref as e, mergeProps as g, createSlots as P, renderList as R, withCtx as T, renderSlot as v, normalizeProps as y, guardReactiveProps as h } from "vue";
5
+ import { defineComponent as f, useSlots as d, ref as u, openBlock as S, createBlock as _, unref as e, mergeProps as g, createSlots as P, renderList as R, withCtx as T, renderSlot as v, normalizeProps as y, guardReactiveProps as h } from "vue";
6
6
  import { mapReadPretty as k } from "../__builtins__/shared/transform-component.mjs";
7
7
  import { PreviewText as x } from "../preview-text/index.mjs";
8
8
  import "@formily/core";
@@ -16,7 +16,7 @@ const w = /* @__PURE__ */ f({
16
16
  const n = d(), { props: l } = C(), r = u(), t = c();
17
17
  return t.value?.inject({
18
18
  getTreeSelectRef: () => r
19
- }), (s, B) => (_(), S(e(m), g({
19
+ }), (s, B) => (S(), _(e(m), g({
20
20
  ref_key: "treeSelectRef",
21
21
  ref: r,
22
22
  loading: e(t).value?.loading
@@ -61,8 +61,8 @@ export declare const Upload: {
61
61
  readonly data: import('element-plus/es/utils/typescript.mjs').Mutable<{}>;
62
62
  readonly name: string;
63
63
  readonly onProgress: import('element-plus').UploadHooks["onProgress"];
64
- readonly onChange: import('element-plus').UploadHooks["onChange"];
65
64
  readonly onError: import('element-plus').UploadHooks["onError"];
65
+ readonly onChange: import('element-plus').UploadHooks["onChange"];
66
66
  readonly method: string;
67
67
  readonly onRemove: import('element-plus').UploadHooks["onRemove"];
68
68
  readonly fileList: import('element-plus').UploadUserFile[];
@@ -85,7 +85,7 @@ export declare const Upload: {
85
85
  readonly withCredentials?: boolean;
86
86
  readonly limit?: number;
87
87
  readonly directory?: boolean;
88
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "data" | "name" | "disabled" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest">;
88
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "data" | "name" | "disabled" | "onProgress" | "onError" | "onChange" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest">;
89
89
  $attrs: {
90
90
  [x: string]: unknown;
91
91
  };
@@ -120,14 +120,14 @@ export declare const Upload: {
120
120
  type: import('vue').PropType<(evt: import('element-plus').UploadProgressEvent, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
121
121
  default: () => void;
122
122
  };
123
- onChange: {
124
- type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
125
- default: () => void;
126
- };
127
123
  onError: {
128
124
  type: import('vue').PropType<(error: Error, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
129
125
  default: () => void;
130
126
  };
127
+ onChange: {
128
+ type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
129
+ default: () => void;
130
+ };
131
131
  method: {
132
132
  type: import('vue').PropType<string>;
133
133
  default: "post";
@@ -287,14 +287,14 @@ export declare const Upload: {
287
287
  type: import('vue').PropType<(evt: import('element-plus').UploadProgressEvent, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
288
288
  default: () => void;
289
289
  };
290
- onChange: {
291
- type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
292
- default: () => void;
293
- };
294
290
  onError: {
295
291
  type: import('vue').PropType<(error: Error, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
296
292
  default: () => void;
297
293
  };
294
+ onChange: {
295
+ type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
296
+ default: () => void;
297
+ };
298
298
  method: {
299
299
  type: import('vue').PropType<string>;
300
300
  default: "post";
@@ -368,7 +368,7 @@ export declare const Upload: {
368
368
  directory: {
369
369
  type: import('vue').PropType<boolean>;
370
370
  };
371
- }>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
371
+ }>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onError" | "onChange" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
372
372
  abort: (file?: import('element-plus').UploadFile) => void;
373
373
  submit: () => void;
374
374
  clearFiles: (states?: import('element-plus').UploadStatus[]) => void;
@@ -442,7 +442,7 @@ export declare const Upload: {
442
442
  $root: import('vue').ComponentPublicInstance | null;
443
443
  $parent: import('vue').ComponentPublicInstance | null;
444
444
  $host: Element | null;
445
- $emit: ((event: "switch", index: number) => void) & ((event: "close") => void) & ((event: "error", evt: Event) => void) & ((event: "rotate", deg: number) => void);
445
+ $emit: ((event: "switch", index: number) => void) & ((event: "error", evt: Event) => void) & ((event: "close") => void) & ((event: "rotate", deg: number) => void);
446
446
  $el: any;
447
447
  $options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
448
448
  zIndex: {
@@ -1,5 +1,5 @@
1
1
  import { useField as D, connect as N, mapProps as j } from "@silver-formily/vue";
2
- import { defineComponent as O, ref as f, useAttrs as z, computed as w, onBeforeUnmount as T, createElementBlock as v, openBlock as a, Fragment as y, createVNode as p, createBlock as h, createCommentVNode as q, unref as r, mergeProps as x, createSlots as G, withCtx as s, renderSlot as m, createElementVNode as P, toDisplayString as C } from "vue";
2
+ import { defineComponent as O, ref as f, useAttrs as z, computed as w, onBeforeUnmount as T, openBlock as a, createElementBlock as v, Fragment as y, createVNode as p, unref as r, mergeProps as x, createSlots as q, withCtx as s, renderSlot as m, createElementVNode as P, toDisplayString as C, createBlock as h, createCommentVNode as G } from "vue";
3
3
  import { UploadFilled as H, Plus as J, Upload as K } from "@element-plus/icons-vue";
4
4
  import { reaction as M } from "@formily/reactive";
5
5
  import { isFn as c } from "@formily/shared";
@@ -101,7 +101,7 @@ const oe = { class: "el-upload__text" }, re = { style: { "margin-left": "6px" }
101
101
  onExceed: L,
102
102
  onError: A,
103
103
  onPreview: B
104
- }), G({
104
+ }), q({
105
105
  default: s(() => [
106
106
  r(ee)(e.$slots?.default) ? m(e.$slots, "default", { key: 0 }) : (a(), v(y, { key: 1 }, [
107
107
  r(o).drag ? (a(), v(y, { key: 0 }, [
@@ -162,7 +162,7 @@ const oe = { class: "el-upload__text" }, re = { style: { "margin-left": "6px" }
162
162
  "initial-index": k.value
163
163
  }, i.imageViewerProps, {
164
164
  onClose: t[0] || (t[0] = (n) => g.value = !1)
165
- }), null, 16, ["url-list", "initial-index"])) : q("", !0)
165
+ }), null, 16, ["url-list", "initial-index"])) : G("", !0)
166
166
  ], 64));
167
167
  }
168
168
  }), ve = N(
@@ -39,8 +39,8 @@ declare function __VLS_template(): {
39
39
  readonly data: import('element-plus/es/utils/typescript.mjs').Mutable<{}>;
40
40
  readonly name: string;
41
41
  readonly onProgress: import('element-plus').UploadHooks["onProgress"];
42
- readonly onChange: import('element-plus').UploadHooks["onChange"];
43
42
  readonly onError: import('element-plus').UploadHooks["onError"];
43
+ readonly onChange: import('element-plus').UploadHooks["onChange"];
44
44
  readonly method: string;
45
45
  readonly onRemove: import('element-plus').UploadHooks["onRemove"];
46
46
  readonly fileList: import('element-plus').UploadUserFile[];
@@ -63,7 +63,7 @@ declare function __VLS_template(): {
63
63
  readonly withCredentials?: boolean;
64
64
  readonly limit?: number;
65
65
  readonly directory?: boolean;
66
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "data" | "name" | "disabled" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest">;
66
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "data" | "name" | "disabled" | "onProgress" | "onError" | "onChange" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest">;
67
67
  $attrs: {
68
68
  [x: string]: unknown;
69
69
  };
@@ -98,14 +98,14 @@ declare function __VLS_template(): {
98
98
  type: PropType<(evt: import('element-plus').UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
99
99
  default: () => void;
100
100
  };
101
- onChange: {
102
- type: PropType<(uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
103
- default: () => void;
104
- };
105
101
  onError: {
106
102
  type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
107
103
  default: () => void;
108
104
  };
105
+ onChange: {
106
+ type: PropType<(uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
107
+ default: () => void;
108
+ };
109
109
  method: {
110
110
  type: PropType<string>;
111
111
  default: "post";
@@ -265,14 +265,14 @@ declare function __VLS_template(): {
265
265
  type: PropType<(evt: import('element-plus').UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
266
266
  default: () => void;
267
267
  };
268
- onChange: {
269
- type: PropType<(uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
270
- default: () => void;
271
- };
272
268
  onError: {
273
269
  type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
274
270
  default: () => void;
275
271
  };
272
+ onChange: {
273
+ type: PropType<(uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
274
+ default: () => void;
275
+ };
276
276
  method: {
277
277
  type: PropType<string>;
278
278
  default: "post";
@@ -346,7 +346,7 @@ declare function __VLS_template(): {
346
346
  directory: {
347
347
  type: PropType<boolean>;
348
348
  };
349
- }>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
349
+ }>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onError" | "onChange" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
350
350
  abort: (file?: import('element-plus/es/components/upload/src/upload.mjs').UploadFile) => void;
351
351
  submit: () => void;
352
352
  clearFiles: (states?: import('element-plus').UploadStatus[]) => void;
@@ -420,7 +420,7 @@ declare function __VLS_template(): {
420
420
  $root: import('vue').ComponentPublicInstance | null;
421
421
  $parent: import('vue').ComponentPublicInstance | null;
422
422
  $host: Element | null;
423
- $emit: ((event: "switch", index: number) => void) & ((event: "close") => void) & ((event: "error", evt: Event) => void) & ((event: "rotate", deg: number) => void);
423
+ $emit: ((event: "switch", index: number) => void) & ((event: "error", evt: Event) => void) & ((event: "close") => void) & ((event: "rotate", deg: number) => void);
424
424
  $el: any;
425
425
  $options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
426
426
  zIndex: {
@@ -689,8 +689,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
689
689
  readonly data: import('element-plus/es/utils/typescript.mjs').Mutable<{}>;
690
690
  readonly name: string;
691
691
  readonly onProgress: import('element-plus').UploadHooks["onProgress"];
692
- readonly onChange: import('element-plus').UploadHooks["onChange"];
693
692
  readonly onError: import('element-plus').UploadHooks["onError"];
693
+ readonly onChange: import('element-plus').UploadHooks["onChange"];
694
694
  readonly method: string;
695
695
  readonly onRemove: import('element-plus').UploadHooks["onRemove"];
696
696
  readonly fileList: import('element-plus').UploadUserFile[];
@@ -713,7 +713,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
713
713
  readonly withCredentials?: boolean;
714
714
  readonly limit?: number;
715
715
  readonly directory?: boolean;
716
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "data" | "name" | "disabled" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest">;
716
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "data" | "name" | "disabled" | "onProgress" | "onError" | "onChange" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest">;
717
717
  $attrs: {
718
718
  [x: string]: unknown;
719
719
  };
@@ -748,14 +748,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
748
748
  type: PropType<(evt: import('element-plus').UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
749
749
  default: () => void;
750
750
  };
751
- onChange: {
752
- type: PropType<(uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
753
- default: () => void;
754
- };
755
751
  onError: {
756
752
  type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
757
753
  default: () => void;
758
754
  };
755
+ onChange: {
756
+ type: PropType<(uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
757
+ default: () => void;
758
+ };
759
759
  method: {
760
760
  type: PropType<string>;
761
761
  default: "post";
@@ -915,14 +915,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
915
915
  type: PropType<(evt: import('element-plus').UploadProgressEvent, uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
916
916
  default: () => void;
917
917
  };
918
- onChange: {
919
- type: PropType<(uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
920
- default: () => void;
921
- };
922
918
  onError: {
923
919
  type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
924
920
  default: () => void;
925
921
  };
922
+ onChange: {
923
+ type: PropType<(uploadFile: UploadFile, uploadFiles: import('element-plus').UploadFiles) => void>;
924
+ default: () => void;
925
+ };
926
926
  method: {
927
927
  type: PropType<string>;
928
928
  default: "post";
@@ -996,7 +996,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
996
996
  directory: {
997
997
  type: PropType<boolean>;
998
998
  };
999
- }>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
999
+ }>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onError" | "onChange" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
1000
1000
  abort: (file?: import('element-plus/es/components/upload/src/upload.mjs').UploadFile) => void;
1001
1001
  submit: () => void;
1002
1002
  clearFiles: (states?: import('element-plus').UploadStatus[]) => void;
@@ -1070,7 +1070,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
1070
1070
  $root: import('vue').ComponentPublicInstance | null;
1071
1071
  $parent: import('vue').ComponentPublicInstance | null;
1072
1072
  $host: Element | null;
1073
- $emit: ((event: "switch", index: number) => void) & ((event: "close") => void) & ((event: "error", evt: Event) => void) & ((event: "rotate", deg: number) => void);
1073
+ $emit: ((event: "switch", index: number) => void) & ((event: "error", evt: Event) => void) & ((event: "close") => void) & ((event: "rotate", deg: number) => void);
1074
1074
  $el: any;
1075
1075
  $options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
1076
1076
  zIndex: {
@@ -1 +1 @@
1
- {"version":3,"file":"icon.mjs","sources":["../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.22_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/icon.mjs"],"sourcesContent":["import { InfoFilled, CircleCloseFilled, WarningFilled, SuccessFilled, Close, CircleClose, CircleCheck, Loading } from '@element-plus/icons-vue';\nimport { definePropType } from './props/runtime.mjs';\n\nconst iconPropType = definePropType([\n String,\n Object,\n Function\n]);\nconst CloseComponents = {\n Close\n};\nconst TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled\n};\nconst TypeComponentsMap = {\n primary: InfoFilled,\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled\n};\nconst ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose\n};\n\nexport { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType };\n//# sourceMappingURL=icon.mjs.map\n"],"names":["iconPropType","definePropType"],"mappings":";;AAGK,MAACA,IAAeC,EAAe;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,CAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"icon.mjs","sources":["../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.28_typescript@5.9.2_/node_modules/element-plus/es/utils/vue/icon.mjs"],"sourcesContent":["import { InfoFilled, CircleCloseFilled, WarningFilled, SuccessFilled, Close, CircleClose, CircleCheck, Loading } from '@element-plus/icons-vue';\nimport { definePropType } from './props/runtime.mjs';\n\nconst iconPropType = definePropType([\n String,\n Object,\n Function\n]);\nconst CloseComponents = {\n Close\n};\nconst TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled\n};\nconst TypeComponentsMap = {\n primary: InfoFilled,\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled\n};\nconst ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose\n};\n\nexport { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType };\n//# sourceMappingURL=icon.mjs.map\n"],"names":["iconPropType","definePropType"],"mappings":";;AAGK,MAACA,IAAeC,EAAe;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,CAAC;","x_google_ignoreList":[0]}