hldesigner 0.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 (173) hide show
  1. package/FileSaver.min-b57403e6.js +103 -0
  2. package/_commonjsHelpers-e7ea1525.js +36 -0
  3. package/_plugin-vue_export-helper-dad06003.js +9 -0
  4. package/affix-widget-94198099.js +38 -0
  5. package/anchor-link-widget-919ac0ee.js +5 -0
  6. package/anchor-link-widget.vue_vue_type_script_setup_true_name_anchor-link-widget_lang-7df7e7c1.js +35 -0
  7. package/anchor-widget-77003871.js +57 -0
  8. package/auto-complete-widget-8d76ea70.js +74 -0
  9. package/avatar-widget-3cd63f01.js +38 -0
  10. package/backtop-widget-6fc3db98.js +38 -0
  11. package/badge-widget-f36a769c.js +44 -0
  12. package/baseImp-8c4be88e.js +11050 -0
  13. package/breadcrumb-widget-422a9d28.js +79 -0
  14. package/button-widget-918dde3f.js +48 -0
  15. package/cache-widget-a1637f5f.js +53 -0
  16. package/card-widget-2db8e9d4.js +112 -0
  17. package/carousel-widget-838cc8c9.js +75 -0
  18. package/cascader-widget-42482528.js +97 -0
  19. package/chart-widget-ac07a466.js +44285 -0
  20. package/checkbox-widget-ee1fcb0c.js +79 -0
  21. package/clipboard-fc4d858d.js +497 -0
  22. package/code-cf4fbc89.js +82 -0
  23. package/collapse-widget-1a93bdb5.js +89 -0
  24. package/color-picker-widget-e893711a.js +56 -0
  25. package/common-editor-76ac2e32.js +24 -0
  26. package/common-editor.vue_vue_type_script_setup_true_name_common-editor_lang-634a504e.js +25 -0
  27. package/configItem-6bfa74e0.js +113 -0
  28. package/cont-cell-widget-42f96421.js +8 -0
  29. package/cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-d3be593a.js +59 -0
  30. package/cont-widget-9dda9135.js +42 -0
  31. package/content-wrapper-20c559ac.js +14 -0
  32. package/content-wrapper.vue_vue_type_script_setup_true_lang-4a97c453.js +37 -0
  33. package/customClass-editor-9088a8cf.js +43 -0
  34. package/date-picker-range-widget-b9287f93.js +72 -0
  35. package/date-picker-widget-21595fd5.js +78 -0
  36. package/default-slot-widget-fc87ed0a.js +24 -0
  37. package/default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-0fb8e1cc.js +59 -0
  38. package/descriptions-widget-33a02f1a.js +83 -0
  39. package/designer.es.js +42 -0
  40. package/designer.style.css +11 -0
  41. package/designer.umd.js +161882 -0
  42. package/dialog-5e196819.js +124 -0
  43. package/dialog-widget-22714c34.js +33 -0
  44. package/divider-widget-adf656f2.js +38 -0
  45. package/drag-wrapper-f9fb1533.js +259 -0
  46. package/drawer-widget-404cb6db.js +33 -0
  47. package/dropdown-widget-a4a1e2f7.js +92 -0
  48. package/editor-wrapper-e6b30023.js +779 -0
  49. package/emitter-2b9b9409.js +53 -0
  50. package/empty-widget-c53b07dd.js +64 -0
  51. package/enum-type-255ade69.js +543 -0
  52. package/enum-type-287a50b6.js +2054 -0
  53. package/expression-ea95606e.js +2181 -0
  54. package/feedback-widget-c041b474.js +26 -0
  55. package/feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-efe168a5.js +82 -0
  56. package/field-base-5547436d.js +7 -0
  57. package/field-editor-3e1ce4f3.js +69 -0
  58. package/file-upload-widget-941b9493.js +98 -0
  59. package/form-item-wrapper-8039c512.js +113 -0
  60. package/form-widget-98a02c28.js +184 -0
  61. package/grid-col-widget-3ea371ea.js +8 -0
  62. package/grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-f40c8e16.js +41 -0
  63. package/grid-widget-f0635d43.js +43 -0
  64. package/html-text-widget-c440e86d.js +50 -0
  65. package/icon-2bb9fa65.js +129 -0
  66. package/iframe-widget-37ef665f.js +77 -0
  67. package/image-widget-871d5987.js +64 -0
  68. package/import-config-1eb9a66b.js +13156 -0
  69. package/index-0a2f2997.js +225 -0
  70. package/index-12505eec.js +42 -0
  71. package/index-18720c06.js +138 -0
  72. package/index-188b745d.js +132 -0
  73. package/index-28f32a55.js +216 -0
  74. package/index-2936e7cf.js +3265 -0
  75. package/index-2d29f8d3.js +7233 -0
  76. package/index-3d5d5fac.js +23 -0
  77. package/index-50c3e002.js +227 -0
  78. package/index-6a276ef7.js +131 -0
  79. package/index-6d56f058.js +45 -0
  80. package/index-7b38fd82.js +330 -0
  81. package/index-7c2a8e33.js +17993 -0
  82. package/index-7fa591e3.js +4817 -0
  83. package/index-82f2c56a.js +135 -0
  84. package/index-8713c192.js +344 -0
  85. package/index-8d537d38.js +2393 -0
  86. package/index-9fd4a537.js +99 -0
  87. package/index-ad538d7e.js +832 -0
  88. package/index-c1b1f59f.js +88 -0
  89. package/index-d6fa09d6.js +39 -0
  90. package/index-db2305dc.js +117 -0
  91. package/index-ddd23411.js +4884 -0
  92. package/index-e795786b.js +119 -0
  93. package/index-f146282d.js +1356 -0
  94. package/index-f849ef29.js +216 -0
  95. package/index-ffbcbc43.js +65 -0
  96. package/input-number-widget-64f89b9d.js +66 -0
  97. package/input-widget-0fe7c3d7.js +71 -0
  98. package/install-designer-bed2e18a.js +4752 -0
  99. package/item-4be3cb5b.js +34 -0
  100. package/item-ddbdee11.js +24 -0
  101. package/itemDetail-b31192a5.js +43 -0
  102. package/label-wrapper-91b95fb0.js +12 -0
  103. package/label-wrapper.vue_vue_type_style_index_0_lang-0a7f6bdd.js +80 -0
  104. package/link-widget-0f2bb61c.js +56 -0
  105. package/ltable-col-widget-9f26b93d.js +8 -0
  106. package/ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-639ee976.js +256 -0
  107. package/ltable-widget-b78a72ee.js +69 -0
  108. package/menu-widget-15fdd710.js +96 -0
  109. package/model-widget-3f2b1368.js +122 -0
  110. package/multirow-e1e1205c.js +292 -0
  111. package/multirow-widget copy-671ebd9c.js +858 -0
  112. package/multirow-widget-d256cac6.js +694 -0
  113. package/name-editor-05685151.js +104 -0
  114. package/optionItem-0ac4a3ae.js +4667 -0
  115. package/package.json +13 -0
  116. package/pagination-widget-31a7301d.js +81 -0
  117. package/picture-upload-widget-46ea42a0.js +102 -0
  118. package/postcss-2c4d92ea.js +2285 -0
  119. package/progress-widget-fc1f9557.js +52 -0
  120. package/property-base-e63e2f28.js +78 -0
  121. package/propresult-8fdf23e2.js +22 -0
  122. package/radio-widget-fbc63c11.js +79 -0
  123. package/range-widget-b0882319.js +74 -0
  124. package/rate-widget-9719ca7d.js +56 -0
  125. package/reg-editor.vue_vue_type_script_setup_true_lang-56504fb0.js +61 -0
  126. package/result-widget-925a5426.js +67 -0
  127. package/rich-editor-widget-426f0b19.js +77 -0
  128. package/router-widget-209f0eb1.js +54 -0
  129. package/schemaData-ab87bd49.js +333 -0
  130. package/select-widget-0b560a2f.js +288 -0
  131. package/setView-de8aaf40.js +84 -0
  132. package/sfc-10e3d29c.js +2570 -0
  133. package/share-editor-27d43940.js +448 -0
  134. package/share-event-dd8ff2ba.js +26 -0
  135. package/share-field-451430de.js +690 -0
  136. package/share-file-124a4d83.js +121 -0
  137. package/size-editor-ea05760c.js +92 -0
  138. package/slider-widget-fb4efa96.js +62 -0
  139. package/slot-04a83a27.js +17 -0
  140. package/static-text-widget-2efdd909.js +51 -0
  141. package/steps-widget-6f283f21.js +91 -0
  142. package/subMenu-widget-77e295cb.js +16 -0
  143. package/subMenu-widget.vue_vue_type_script_setup_true_lang-b051a10e.js +69 -0
  144. package/switch-widget-f1120b6c.js +56 -0
  145. package/tab-pane-widget-99c21615.js +8 -0
  146. package/tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-bc962788.js +35 -0
  147. package/table-col-widget-d6d5d21f.js +23 -0
  148. package/table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-2efa4d60.js +80 -0
  149. package/table-widget-9b8d9798.js +163 -0
  150. package/tabs-widget-88393072.js +68 -0
  151. package/tag-widget-33c17c06.js +38 -0
  152. package/target-code-48e9d055.js +33 -0
  153. package/target-datasource-35dfcb1d.js +221 -0
  154. package/target-link-3ffd0149.js +126 -0
  155. package/target-saveForm-012b7de1.js +136 -0
  156. package/target-widget-3d7f6104.js +59 -0
  157. package/target-window-7556d301.js +54 -0
  158. package/template-c30585f4.js +251740 -0
  159. package/text-widget-8b5ece83.js +38 -0
  160. package/textarea-widget-e7c1d9ed.js +56 -0
  161. package/time-picker-range-widget-b8dfcc3b.js +58 -0
  162. package/time-picker-widget-73bde0a3.js +57 -0
  163. package/time-select-widget-08008b76.js +57 -0
  164. package/tmpl-widget-7d245d41.js +92 -0
  165. package/tooltip-wrapper-2922e49e.js +31 -0
  166. package/tree-select-widget-67231123.js +94 -0
  167. package/tree-widget-ab91165f.js +90 -0
  168. package/uuid-39f0308a.js +196 -0
  169. package/value-editor-27783d6c.js +89 -0
  170. package/vue3-sfc-loader-b70bdce4.js +34688 -0
  171. package/widget-base-4c2d6265.js +27 -0
  172. package/widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-bbe0cabe.js +277 -0
  173. package/wrapper-widget-5702502d.js +78 -0
@@ -0,0 +1,333 @@
1
+ import { defineComponent as Se, useCssVars as we, unref as t, ref as r, watch as re, nextTick as Ee, shallowRef as De, computed as se, onMounted as $e, resolveComponent as g, openBlock as T, createElementBlock as Re, createVNode as a, withCtx as i, createElementVNode as c, mergeProps as Pe, createTextVNode as v, toDisplayString as _, createBlock as R, createCommentVNode as He, normalizeStyle as P, withDirectives as oe, vShow as ae, resolveDynamicComponent as ie, defineAsyncComponent as Ne } from "vue";
2
+ import { k as F, a as s, q as H, o as Me, C as We, P as Ae } from "./enum-type-287a50b6.js";
3
+ import { ElTree as ce } from "element-plus";
4
+ import { Search as Be } from "./index-ddd23411.js";
5
+ import { c as k } from "./uuid-39f0308a.js";
6
+ import { U as ue, e as Ue, V as Ie, W as Je } from "./baseImp-8c4be88e.js";
7
+ import { A as Ke, C as Oe } from "./template-c30585f4.js";
8
+ import { u as je, a as b, p as V } from "./setView-de8aaf40.js";
9
+ import { _ as qe } from "./_plugin-vue_export-helper-dad06003.js";
10
+ const ze = { id: "schemaPage" }, Ge = { class: "varCell varCell1 cellRow" }, Qe = { class: "splitCell" }, Xe = { class: "card-tree" }, Ye = { class: "splitCell" }, Ze = { class: "card-search" }, el = { class: "card-tree" }, ll = ["onMouseover"], tl = { class: "varCell1" }, nl = ["innerHTML"], rl = /* @__PURE__ */ Se({
11
+ __name: "schemaData",
12
+ props: {
13
+ modelValue: null,
14
+ schemaList: null,
15
+ allFields: null
16
+ },
17
+ emits: ["update:modelValue"],
18
+ setup(de, { emit: pe }) {
19
+ var X, Y, Z, ee;
20
+ const d = de;
21
+ we((e) => ({
22
+ "6fdcc7ec": t(m)
23
+ }));
24
+ const N = {
25
+ id: "id",
26
+ label: "label",
27
+ children: "children"
28
+ }, M = r();
29
+ M.value = {
30
+ filterNodeMethod: (e, l) => {
31
+ var n;
32
+ return e ? (n = l.label) == null ? void 0 : n.toLocaleLowerCase().includes(e == null ? void 0 : e.toLocaleLowerCase()) : !0;
33
+ }
34
+ };
35
+ const fe = F(k(d == null ? void 0 : d.allFields)), me = F(k(Oe)), W = (e) => {
36
+ var l;
37
+ return e ? (l = F(e)) == null ? void 0 : l.map((n) => ({
38
+ label: n.label,
39
+ id: n.id,
40
+ children: W(n.children),
41
+ comment: n.comment,
42
+ caller: n.caller ? `${H.sysFunc}.${n.caller}` : null,
43
+ exprType: "sysFunc"
44
+ /* sysFunc */
45
+ })) : null;
46
+ }, { buildVariable: he } = Ue(), ve = (e) => {
47
+ var l;
48
+ return e ? (l = F(e)) == null ? void 0 : l.map((n) => ({
49
+ label: n.label,
50
+ id: n,
51
+ caller: `${he(n.id)}`,
52
+ comment: s.i18nt("designer.hint.useFieldTree"),
53
+ exprType: "fields",
54
+ attrs: { type: n.type }
55
+ })) : null;
56
+ }, A = k([
57
+ {
58
+ id: "globalSchema",
59
+ label: s.i18nt("designer.setting.globalSchema"),
60
+ children: (X = d.schemaList) == null ? void 0 : X.map((e) => ({
61
+ label: e.name,
62
+ id: e.protocol,
63
+ expression: e.name,
64
+ caller: `${H.schema}.${e.name}`,
65
+ exprType: "schema",
66
+ comment: String(s.i18nt("designer.hint.variableExpression")).replaceAll(/@/g, e.name)
67
+ }))
68
+ },
69
+ {
70
+ id: "allFields",
71
+ label: s.i18nt("designer.expression.allFields"),
72
+ children: ve(d.allFields)
73
+ },
74
+ {
75
+ id: "sysFunction",
76
+ label: s.i18nt("designer.setting.sysFunctions"),
77
+ children: W(me)
78
+ },
79
+ {
80
+ id: "bindData",
81
+ label: s.i18nt("designer.setting.bindData"),
82
+ children: (Y = Me(ue)) == null ? void 0 : Y.map((e) => ({
83
+ label: e,
84
+ id: e,
85
+ caller: `${H.sysVar}.${e}`,
86
+ comment: ue[e],
87
+ exprType: "sysVar"
88
+ /* sysVar */
89
+ }))
90
+ }
91
+ ]), _e = k(A.map((e) => ({ label: e.label, id: e.id }))), B = (e) => {
92
+ var l = A.find((n) => n.id === e);
93
+ I.value = l == null ? void 0 : l.children;
94
+ }, ye = (e, l) => {
95
+ B(e.id);
96
+ }, U = r(), L = r();
97
+ re(L, (e) => {
98
+ Ee(function() {
99
+ U.value.setCurrentKey(e), B(e);
100
+ });
101
+ });
102
+ const p = r(), I = r(), ge = Ie(), be = (e, l) => {
103
+ let n = e == null ? void 0 : e.caller;
104
+ if (n && e != null && e.exprType) {
105
+ p.value || (p.value = x.value);
106
+ var u = {
107
+ schema: "",
108
+ sysFunc: "function",
109
+ sysVar: "",
110
+ fields: "variable"
111
+ };
112
+ if (p.value == E.value) {
113
+ if (![
114
+ "fields",
115
+ "sysVar"
116
+ /* sysVar */
117
+ ].includes(e.exprType))
118
+ return;
119
+ [
120
+ "sysVar"
121
+ /* sysVar */
122
+ ].includes(e.exprType) && (n = ge.buildVariable(n));
123
+ }
124
+ p.value.insertContent(`${n}`, u[e == null ? void 0 : e.exprType]);
125
+ }
126
+ }, J = r(), Ve = (e, l) => {
127
+ J.value = e == null ? void 0 : e.comment;
128
+ }, S = r(), K = r();
129
+ re(S, (e) => {
130
+ K.value.filter(e);
131
+ });
132
+ const x = r(), w = De(), xe = () => {
133
+ w.value = Ne(() => import("./index-7c2a8e33.js"));
134
+ }, Ce = () => {
135
+ let e = {};
136
+ const l = Ae(fe, "children");
137
+ return l == null || l.forEach((n) => e[n.id] = n.label), e;
138
+ }, O = Je(), j = Ce(), q = (e) => {
139
+ var l = O.buildVariableWithLabel(e || "", j);
140
+ return l;
141
+ }, C = (e) => {
142
+ var l = O.removeVariableWithLabel(e || "", j);
143
+ return l;
144
+ }, Te = () => {
145
+ p.value = x.value;
146
+ }, E = r(), Fe = () => {
147
+ p.value = E.value;
148
+ }, f = r(((Z = d.modelValue) == null ? void 0 : Z.expr) || "${}"), y = r(((ee = d.modelValue) == null ? void 0 : ee.params) || "{}"), z = se(() => {
149
+ var e, l, n, u;
150
+ return f.value && !((l = (e = f.value) == null ? void 0 : e.trim()) != null && l.startsWith("${")) || !((u = (n = f.value) == null ? void 0 : n.trim()) != null && u.endsWith("}"));
151
+ }), G = se(() => {
152
+ var e;
153
+ return y.value && !We((e = y.value) == null ? void 0 : e.trim());
154
+ }), Q = () => {
155
+ z.value || G.value || pe("update:modelValue", {
156
+ expr: C(f.value),
157
+ params: C(y.value)
158
+ });
159
+ };
160
+ $e(() => {
161
+ xe(), L.value = "globalSchema", setTimeout(() => {
162
+ var e;
163
+ (e = x.value) == null || e.focus(1);
164
+ }, 1e3);
165
+ });
166
+ const { pageHeight: m, getComputedHeight: ke } = je();
167
+ return ke("#schemaPage"), (e, l) => {
168
+ const n = g("el-input"), u = g("el-tag"), le = g("el-col"), D = g("el-alert"), Le = g("el-row");
169
+ return T(), Re("div", ze, [
170
+ a(Le, { class: "full-height nomargin noOverflow" }, {
171
+ default: i(() => [
172
+ a(le, { span: 10 }, {
173
+ default: i(() => [
174
+ c("div", Ge, [
175
+ c("div", Qe, [
176
+ c("div", Xe, [
177
+ a(t(ce), {
178
+ "node-key": "id",
179
+ "highlight-current": "",
180
+ "current-node-key": L.value,
181
+ class: "full-height",
182
+ data: t(_e),
183
+ props: N,
184
+ ref_key: "varTypeRef",
185
+ ref: U,
186
+ onNodeClick: ye
187
+ }, null, 8, ["current-node-key", "data"])
188
+ ])
189
+ ]),
190
+ c("div", Ye, [
191
+ c("div", Ze, [
192
+ a(n, {
193
+ modelValue: S.value,
194
+ "onUpdate:modelValue": l[0] || (l[0] = (h) => S.value = h),
195
+ placeholder: t(s).i18nt("designer.hint.filterInput"),
196
+ "suffix-icon": t(Be)
197
+ }, null, 8, ["modelValue", "placeholder", "suffix-icon"])
198
+ ]),
199
+ c("div", el, [
200
+ a(t(ce), Pe({
201
+ ref_key: "varSourceRef",
202
+ ref: K,
203
+ data: I.value,
204
+ "highlight-current": "",
205
+ props: N,
206
+ class: "full-height",
207
+ onNodeClick: be
208
+ }, M.value), {
209
+ default: i(({ node: h, data: o }) => {
210
+ var te;
211
+ return [
212
+ c("div", {
213
+ onMouseover: ($) => Ve(o),
214
+ class: "full-width flex flexJustify"
215
+ }, [
216
+ v(_(o.label) + " ", 1),
217
+ (te = o == null ? void 0 : o.attrs) != null && te.type ? (T(), R(u, { key: 0 }, {
218
+ default: i(() => {
219
+ var $, ne;
220
+ return [
221
+ v(_(($ = o == null ? void 0 : o.attrs) != null && $.type ? t(s).i18nt(`designer.widgetLabel.${(ne = o == null ? void 0 : o.attrs) == null ? void 0 : ne.type}`) : ""), 1)
222
+ ];
223
+ }),
224
+ _: 2
225
+ }, 1024)) : He("", !0)
226
+ ], 40, ll)
227
+ ];
228
+ }),
229
+ _: 1
230
+ }, 16, ["data"])
231
+ ])
232
+ ])
233
+ ])
234
+ ]),
235
+ _: 1
236
+ }),
237
+ a(le, {
238
+ span: 14,
239
+ style: { "padding-left": "10px" }
240
+ }, {
241
+ default: i(() => [
242
+ c("div", tl, [
243
+ a(D, {
244
+ type: "info",
245
+ closable: !1,
246
+ style: P({ height: t(b)(t(V)(t(m)) * 0.09) })
247
+ }, {
248
+ title: i(() => [
249
+ v(_(t(s).i18nt("designer.hint.oneVar")), 1),
250
+ oe(a(u, { type: "warning" }, {
251
+ default: i(() => [
252
+ v(_(t(s).i18nt("designer.hint.errorExpr")), 1)
253
+ ]),
254
+ _: 1
255
+ }, 512), [
256
+ [ae, t(z)]
257
+ ])
258
+ ]),
259
+ _: 1
260
+ }, 8, ["style"]),
261
+ (T(), R(ie(t(w)), {
262
+ modelValue: f.value,
263
+ "onUpdate:modelValue": [
264
+ l[1] || (l[1] = (h) => f.value = h),
265
+ Q
266
+ ],
267
+ onFocused: Te,
268
+ gutters: !1,
269
+ "beatify-fn": q,
270
+ "un-beatify-fn": C,
271
+ ref_key: "editorRef",
272
+ ref: x,
273
+ height: t(b)(t(V)(t(m)) * 0.25)
274
+ }, null, 40, ["modelValue", "height"])),
275
+ a(D, {
276
+ type: "info",
277
+ closable: !1,
278
+ style: P({ height: t(b)(t(V)(t(m)) * 0.09) })
279
+ }, {
280
+ title: i(() => [
281
+ v(_(t(s).i18nt("designer.hint.params")), 1),
282
+ oe(a(u, { type: "warning" }, {
283
+ default: i(() => [
284
+ v(_(t(s).i18nt("designer.hint.errorParam")), 1)
285
+ ]),
286
+ _: 1
287
+ }, 512), [
288
+ [ae, t(G)]
289
+ ])
290
+ ]),
291
+ _: 1
292
+ }, 8, ["style"]),
293
+ (T(), R(ie(t(w)), {
294
+ modelValue: y.value,
295
+ "onUpdate:modelValue": [
296
+ l[2] || (l[2] = (h) => y.value = h),
297
+ Q
298
+ ],
299
+ ref_key: "paramRef",
300
+ ref: E,
301
+ gutters: !1,
302
+ "beatify-fn": q,
303
+ "un-beatify-fn": C,
304
+ onFocused: Fe,
305
+ height: t(b)(t(V)(t(m)) * 0.42)
306
+ }, null, 40, ["modelValue", "height"])),
307
+ a(D, {
308
+ type: "info",
309
+ closable: !1,
310
+ style: P({ height: t(b)(t(V)(t(m)) * 0.12) })
311
+ }, {
312
+ default: i(() => [
313
+ c("div", {
314
+ innerHTML: t(Ke)(J.value)
315
+ }, null, 8, nl)
316
+ ]),
317
+ _: 1
318
+ }, 8, ["style"])
319
+ ])
320
+ ]),
321
+ _: 1
322
+ })
323
+ ]),
324
+ _: 1
325
+ })
326
+ ]);
327
+ };
328
+ }
329
+ });
330
+ const ml = /* @__PURE__ */ qe(rl, [["__scopeId", "data-v-7488ddbe"]]);
331
+ export {
332
+ ml as s
333
+ };
@@ -0,0 +1,288 @@
1
+ import { defineComponent as ae, ref as E, computed as Y, shallowRef as Z, watch as _e, resolveComponent as N, openBlock as r, createBlock as s, mergeProps as O, unref as e, withCtx as v, isRef as G, toHandlers as ee, createElementBlock as k, createVNode as be, createTextVNode as Ke, toDisplayString as Oe, createCommentVNode as C, Fragment as b, renderList as F, resolveDynamicComponent as j } from "vue";
2
+ import { a as D, g as U } from "./enum-type-287a50b6.js";
3
+ import { d as Ce } from "./baseImp-8c4be88e.js";
4
+ import { k as le } from "./uuid-39f0308a.js";
5
+ import { c as Ve } from "./share-field-451430de.js";
6
+ import { I as Me } from "./field-base-5547436d.js";
7
+ import je from "./form-item-wrapper-8039c512.js";
8
+ import { c as we, w as Ae } from "./template-c30585f4.js";
9
+ import { a as re } from "./slot-04a83a27.js";
10
+ import "./enum-type-255ade69.js";
11
+ import "./icon-2bb9fa65.js";
12
+ import "./dialog-5e196819.js";
13
+ import "element-plus";
14
+ import "./_commonjsHelpers-e7ea1525.js";
15
+ import "./emitter-2b9b9409.js";
16
+ import "./multirow-e1e1205c.js";
17
+ import "./index-f146282d.js";
18
+ import "./optionItem-0ac4a3ae.js";
19
+ import "./index-7fa591e3.js";
20
+ import "./widget-base-4c2d6265.js";
21
+ import "./widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-bbe0cabe.js";
22
+ import "./index-ffbcbc43.js";
23
+ import "./_plugin-vue_export-helper-dad06003.js";
24
+ import "./label-wrapper.vue_vue_type_style_index_0_lang-0a7f6bdd.js";
25
+ const Fe = {
26
+ key: 0,
27
+ class: "el-select-dropdown__item"
28
+ }, ze = ae({ componentName: Ae.FieldWidget }), rl = /* @__PURE__ */ ae({
29
+ ...ze,
30
+ __name: "select-widget",
31
+ props: { ...Me },
32
+ setup(te, { expose: ue }) {
33
+ const ne = te, { fieldEditor: W, fieldKey: $, fieldModel: m, rules: oe, attrs: h, extendAttrs: a, events: R, slots: se, exposed: ie, isError: de, errorMsg: ve, fieldObj: ce, getFieldOptions: fe, getWidgetOption: H, getCheckedItems: ye, watchOption: me } = Ve(ne), w = E(), A = E(), he = E(!1);
34
+ me(!0, we.optionItems, void 0, (l) => {
35
+ A.value = l, w.value = l;
36
+ });
37
+ const x = Y({
38
+ get: () => le(m.value, !1),
39
+ set: (l) => {
40
+ m.value = l;
41
+ }
42
+ }), P = Y({
43
+ get: () => le(m.value, !0),
44
+ set: (l) => {
45
+ m.value = l;
46
+ }
47
+ }), I = E(!1);
48
+ let c = Z(), z = Z();
49
+ _e(se, (l) => {
50
+ var t, o;
51
+ c.value = (t = re(l, "optionDefault")) == null ? void 0 : t.default, z.value = (o = re(l, "prefix")) == null ? void 0 : o.default;
52
+ }, { immediate: !0 });
53
+ var S = H("filterMethod");
54
+ const pe = (l, t) => {
55
+ var f;
56
+ if (S) {
57
+ var o = (f = A.value) == null ? void 0 : f.filter((i) => {
58
+ var p, y;
59
+ var V = Ce(S, { keyword: l, option: { ...i, label: i == null ? void 0 : i[(p = a.value) == null ? void 0 : p.labelKey], value: i == null ? void 0 : i[(y = a.value) == null ? void 0 : y.valueKey] } });
60
+ return V;
61
+ });
62
+ t && t(o);
63
+ }
64
+ };
65
+ S && Object.assign(h.value, { filterMethod: (l) => {
66
+ T(l, pe);
67
+ } });
68
+ var L = H("remoteMethod");
69
+ const T = (l, t) => {
70
+ t && (he.value = !0, l ? (I.value = !0, t(l, (o) => {
71
+ w.value = o, I.value = !1;
72
+ })) : w.value = A.value);
73
+ };
74
+ L && Object.assign(h.value, { remoteMethod: (l) => {
75
+ T(l, L);
76
+ } });
77
+ const q = () => {
78
+ var t;
79
+ var l = fe("valueKey");
80
+ return l ? (t = A == null ? void 0 : A.value) == null ? void 0 : t.map((o) => o == null ? void 0 : o[l]) : [];
81
+ };
82
+ var ke = () => {
83
+ if (!m.value)
84
+ return !1;
85
+ if (!Array.isArray(m.value))
86
+ return !0;
87
+ var l = q();
88
+ return !(l != null && l.some((t) => {
89
+ var o;
90
+ return ((o = m.value) == null ? void 0 : o.indexOf(t)) === -1;
91
+ }));
92
+ };
93
+ const J = E(ke()), ge = (l) => {
94
+ l ? m.value = q() : m.value = [];
95
+ }, Q = (l) => {
96
+ var n, M;
97
+ const t = U(l);
98
+ if (!((n = h == null ? void 0 : h.value) != null && n.multiple) || !((M = a == null ? void 0 : a.value) != null && M.selectOnlyOneGroup) || (t == null ? void 0 : t.length) <= 0)
99
+ return !0;
100
+ for (var o = "", f = [], i = U(w.value), V = t.length - 1; V >= 0; V--) {
101
+ const g = t[V];
102
+ var p = i == null ? void 0 : i.some((u) => g === (u == null ? void 0 : u.value));
103
+ p && f.push(g);
104
+ var y = i == null ? void 0 : i.find((u) => {
105
+ var d;
106
+ return (d = U(u == null ? void 0 : u.children)) == null ? void 0 : d.some((_) => g === (_ == null ? void 0 : _.value));
107
+ });
108
+ (y && (y == null ? void 0 : y.value) === o || !o) && (f.push(g), o || (o = y == null ? void 0 : y.value));
109
+ }
110
+ m.value = f;
111
+ };
112
+ return ue({ ...ie, getCheckedItems: ye }), (l, t) => {
113
+ const o = N("el-checkbox"), f = N("el-option"), i = N("el-option-group"), V = N("el-select");
114
+ return r(), s(je, O(l.$props, {
115
+ propOptions: { fieldObj: e(ce), rules: e(oe), isError: e(de), errorMsg: e(ve) }
116
+ }), {
117
+ default: v(({ data: p }) => {
118
+ var y;
119
+ return [
120
+ (y = e(h)) != null && y.multiple ? (r(), s(V, O({
121
+ ref_key: "fieldEditor",
122
+ ref: W,
123
+ modelValue: e(P),
124
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => G(P) ? P.value = n : null),
125
+ key: `${e($)}_multiple`
126
+ }, e(h), ee(e(R)), {
127
+ loading: I.value,
128
+ size: p.size,
129
+ class: p.injectClass,
130
+ style: p.injectStyle,
131
+ placeholder: e(h).placeholder || e(D).i18nt("render.hint.selectPlaceholder"),
132
+ onChange: Q
133
+ }), {
134
+ default: v(() => {
135
+ var n, M, g;
136
+ return [
137
+ e(h).multiple && !e(a).selectOnlyOneGroup ? (r(), k("li", Fe, [
138
+ be(o, {
139
+ modelValue: J.value,
140
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => J.value = u),
141
+ indeterminate: ((n = e(m)) == null ? void 0 : n.length) < (((M = w.value) == null ? void 0 : M.length) || 0) && ((g = e(m)) == null ? void 0 : g.length) !== 0,
142
+ onChange: ge
143
+ }, {
144
+ default: v(() => [
145
+ Ke(Oe(e(D).i18nt("designer.hint.checkAll")), 1)
146
+ ]),
147
+ _: 1
148
+ }, 8, ["modelValue", "indeterminate"])
149
+ ])) : C("", !0),
150
+ (r(!0), k(b, null, F(w.value, (u, d) => {
151
+ var _, X;
152
+ return r(), k(b, {
153
+ key: u.value
154
+ }, [
155
+ ((_ = u == null ? void 0 : u.children) == null ? void 0 : _.length) > 0 ? (r(), k(b, { key: 0 }, [
156
+ (X = e(a)) != null && X.showGroup ? (r(), s(i, {
157
+ label: u[e(a).labelKey],
158
+ key: d
159
+ }, {
160
+ default: v(() => [
161
+ (r(!0), k(b, null, F(u.children, (K, B) => (r(), s(f, {
162
+ value: K[e(a).valueKey],
163
+ label: K[e(a).labelKey],
164
+ key: B
165
+ }, {
166
+ default: v(() => [
167
+ e(c) ? (r(), s(j(e(c)), O({ key: 0 }, { item: K }, {
168
+ key: K[e(a).valueKey]
169
+ }), null, 16)) : C("", !0)
170
+ ]),
171
+ _: 2
172
+ }, 1032, ["value", "label"]))), 128))
173
+ ]),
174
+ _: 2
175
+ }, 1032, ["label"])) : (r(!0), k(b, { key: 1 }, F(u.children, (K, B) => (r(), s(f, {
176
+ value: K[e(a).valueKey],
177
+ label: K[e(a).labelKey],
178
+ key: B
179
+ }, {
180
+ default: v(() => [
181
+ e(c) ? (r(), s(j(e(c)), O({ key: 0 }, { item: K }, {
182
+ key: K[e(a).valueKey]
183
+ }), null, 16)) : C("", !0)
184
+ ]),
185
+ _: 2
186
+ }, 1032, ["value", "label"]))), 128))
187
+ ], 64)) : (r(), s(f, {
188
+ value: u[e(a).valueKey],
189
+ label: u[e(a).labelKey],
190
+ key: d
191
+ }, {
192
+ default: v(() => [
193
+ e(c) ? (r(), s(j(e(c)), O({ key: 0 }, { item: u }, {
194
+ key: u[e(a).valueKey]
195
+ }), null, 16)) : C("", !0)
196
+ ]),
197
+ _: 2
198
+ }, 1032, ["value", "label"]))
199
+ ], 64);
200
+ }), 128))
201
+ ];
202
+ }),
203
+ prefix: v(() => [
204
+ e(z) ? (r(), s(j(e(z)), { key: 0 })) : C("", !0)
205
+ ]),
206
+ _: 2
207
+ }, 1040, ["modelValue", "loading", "size", "class", "style", "placeholder"])) : (r(), s(V, O({
208
+ ref_key: "fieldEditor",
209
+ ref: W,
210
+ modelValue: e(x),
211
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => G(x) ? x.value = n : null),
212
+ key: `${e($)}_single`
213
+ }, e(h), ee(e(R)), {
214
+ loading: I.value,
215
+ size: p.size,
216
+ class: p.injectClass,
217
+ style: p.injectStyle,
218
+ placeholder: e(h).placeholder || e(D).i18nt("render.hint.selectPlaceholder"),
219
+ onChange: Q
220
+ }), {
221
+ default: v(() => [
222
+ (r(!0), k(b, null, F(w.value, (n, M) => {
223
+ var g, u;
224
+ return r(), k(b, {
225
+ key: n.value
226
+ }, [
227
+ ((g = n == null ? void 0 : n.children) == null ? void 0 : g.length) > 0 ? (r(), k(b, { key: 0 }, [
228
+ (u = e(a)) != null && u.showGroup ? (r(), s(i, {
229
+ label: n[e(a).labelKey],
230
+ key: M
231
+ }, {
232
+ default: v(() => [
233
+ (r(!0), k(b, null, F(n.children, (d, _) => (r(), s(f, {
234
+ value: d[e(a).valueKey],
235
+ label: d[e(a).labelKey],
236
+ key: _
237
+ }, {
238
+ default: v(() => [
239
+ e(c) ? (r(), s(j(e(c)), O({ key: 0 }, { item: d }, {
240
+ key: d[e(a).valueKey]
241
+ }), null, 16)) : C("", !0)
242
+ ]),
243
+ _: 2
244
+ }, 1032, ["value", "label"]))), 128))
245
+ ]),
246
+ _: 2
247
+ }, 1032, ["label"])) : (r(!0), k(b, { key: 1 }, F(n.children, (d, _) => (r(), s(f, {
248
+ value: d[e(a).valueKey],
249
+ label: d[e(a).labelKey],
250
+ key: _
251
+ }, {
252
+ default: v(() => [
253
+ e(c) ? (r(), s(j(e(c)), O({ key: 0 }, { item: d }, {
254
+ key: d[e(a).valueKey]
255
+ }), null, 16)) : C("", !0)
256
+ ]),
257
+ _: 2
258
+ }, 1032, ["value", "label"]))), 128))
259
+ ], 64)) : (r(), s(f, {
260
+ value: n[e(a).valueKey],
261
+ label: n[e(a).labelKey],
262
+ key: M
263
+ }, {
264
+ default: v(() => [
265
+ e(c) ? (r(), s(j(e(c)), O({ key: 0 }, { item: n }, {
266
+ key: n[e(a).valueKey]
267
+ }), null, 16)) : C("", !0)
268
+ ]),
269
+ _: 2
270
+ }, 1032, ["value", "label"]))
271
+ ], 64);
272
+ }), 128))
273
+ ]),
274
+ prefix: v(() => [
275
+ e(z) ? (r(), s(j(e(z)), { key: 0 })) : C("", !0)
276
+ ]),
277
+ _: 2
278
+ }, 1040, ["modelValue", "loading", "size", "class", "style", "placeholder"]))
279
+ ];
280
+ }),
281
+ _: 1
282
+ }, 16, ["propOptions"]);
283
+ };
284
+ }
285
+ });
286
+ export {
287
+ rl as default
288
+ };