@farris/ui-vue 1.7.0-beta.3 → 1.7.0-beta.4

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 (99) hide show
  1. package/components/avatar/index.esm.js +10 -1
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/calendar/index.esm.js +178 -176
  4. package/components/calendar/index.umd.cjs +2 -2
  5. package/components/collection-property-editor/index.esm.js +48 -46
  6. package/components/collection-property-editor/index.umd.cjs +2 -2
  7. package/components/combo-list/index.esm.js +319 -300
  8. package/components/combo-list/index.umd.cjs +1 -1
  9. package/components/comment/index.esm.js +2287 -1161
  10. package/components/comment/index.umd.cjs +7 -7
  11. package/components/component/index.esm.js +3 -1
  12. package/components/component/index.umd.cjs +2 -2
  13. package/components/condition/index.esm.js +926 -901
  14. package/components/condition/index.umd.cjs +2 -2
  15. package/components/data-view/index.esm.js +898 -899
  16. package/components/data-view/index.umd.cjs +1 -1
  17. package/components/drawer/index.esm.js +3 -1
  18. package/components/drawer/index.umd.cjs +2 -2
  19. package/components/dynamic-form/index.esm.js +239 -221
  20. package/components/dynamic-form/index.umd.cjs +1 -1
  21. package/components/dynamic-resolver/index.esm.js +11 -9
  22. package/components/dynamic-resolver/index.umd.cjs +2 -2
  23. package/components/expression-editor/index.esm.js +1299 -1279
  24. package/components/expression-editor/index.umd.cjs +4 -4
  25. package/components/filter-bar/index.esm.js +731 -678
  26. package/components/filter-bar/index.umd.cjs +2 -2
  27. package/components/filter-condition-editor/index.esm.js +1792 -1772
  28. package/components/filter-condition-editor/index.umd.cjs +4 -4
  29. package/components/image/index.esm.js +246 -240
  30. package/components/image/index.umd.cjs +2 -2
  31. package/components/language-textbox/index.esm.js +9 -7
  32. package/components/language-textbox/index.umd.cjs +2 -2
  33. package/components/list-view/index.esm.js +1 -1
  34. package/components/list-view/index.umd.cjs +1 -1
  35. package/components/locale/index.esm.js +2009 -886
  36. package/components/locale/index.umd.cjs +6 -6
  37. package/components/number-range/index.esm.js +190 -181
  38. package/components/number-range/index.umd.cjs +1 -1
  39. package/components/order/index.esm.js +734 -714
  40. package/components/order/index.umd.cjs +5 -5
  41. package/components/property-panel/index.esm.js +60 -49
  42. package/components/property-panel/index.umd.cjs +3 -3
  43. package/components/query-solution/index.esm.js +2461 -2500
  44. package/components/query-solution/index.umd.cjs +6 -6
  45. package/components/radio-group/index.esm.js +30 -30
  46. package/components/radio-group/index.umd.cjs +1 -1
  47. package/components/schema-selector/index.esm.js +238 -238
  48. package/components/schema-selector/index.umd.cjs +4 -4
  49. package/components/section/index.esm.js +217 -302
  50. package/components/section/index.umd.cjs +2 -2
  51. package/components/sort-condition-editor/index.esm.js +1793 -1773
  52. package/components/sort-condition-editor/index.umd.cjs +4 -4
  53. package/components/transfer/index.esm.js +155 -155
  54. package/components/transfer/index.umd.cjs +3 -3
  55. package/designer/data-grid/index.esm.js +895 -867
  56. package/designer/data-grid/index.umd.cjs +5 -5
  57. package/designer/data-view/index.esm.js +145 -144
  58. package/designer/data-view/index.umd.cjs +2 -2
  59. package/designer/drawer/index.esm.js +73 -71
  60. package/designer/drawer/index.umd.cjs +2 -2
  61. package/designer/dynamic-form/index.esm.js +87 -65
  62. package/designer/dynamic-form/index.umd.cjs +2 -2
  63. package/designer/farris-designer.all.esm.js +14 -3
  64. package/designer/farris-designer.all.umd.cjs +3 -3
  65. package/designer/input-group/index.esm.js +34 -14
  66. package/designer/input-group/index.umd.cjs +1 -1
  67. package/designer/list-view/index.esm.js +1 -1
  68. package/designer/list-view/index.umd.cjs +1 -1
  69. package/designer/radio-group/index.esm.js +15 -2
  70. package/designer/radio-group/index.umd.cjs +1 -1
  71. package/designer/section/index.esm.js +129 -119
  72. package/designer/section/index.umd.cjs +1 -1
  73. package/designer/time-picker/index.esm.js +140 -131
  74. package/designer/time-picker/index.umd.cjs +1 -1
  75. package/farris.all.esm.js +13578 -12394
  76. package/farris.all.umd.cjs +26 -26
  77. package/index.css +1 -1
  78. package/locales/data-grid/ui/en.json +2 -1
  79. package/locales/data-grid/ui/zh-CHS.json +2 -1
  80. package/locales/data-grid/ui/zh-CHT.json +2 -1
  81. package/locales/designer/en.json +12 -10
  82. package/locales/designer/zh-CHS.json +19 -17
  83. package/locales/designer/zh-CHT.json +19 -17
  84. package/locales/ui/en.json +4 -2
  85. package/locales/ui/zh-CHS.json +11 -9
  86. package/locales/ui/zh-CHT.json +11 -9
  87. package/package.json +1 -1
  88. package/package.zip +0 -0
  89. package/types/combo-list/src/composition/types.d.ts +1 -0
  90. package/types/condition/src/composition/condition-value/number-spinner-value.d.ts +1 -1
  91. package/types/condition/src/composition/use-field-config.d.ts +1 -1
  92. package/types/condition/src/condition.props.d.ts +1 -1
  93. package/types/data-view/designer/property-config/use-command-option.d.ts +12 -0
  94. package/types/image/src/property-config/image.property-config.d.ts +5 -5
  95. package/types/locale/src/lib/locale.service.d.ts +2 -2
  96. package/types/property-panel/src/composition/entity/input-base-property.d.ts +7 -0
  97. package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +0 -20
  98. package/types/section/src/designer/section.design.props.d.ts +17 -0
  99. package/types/section/src/section.props.d.ts +0 -25
@@ -1,26 +1,26 @@
1
- var Ue = Object.defineProperty;
2
- var Re = (i, t, e) => t in i ? Ue(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var x = (i, t, e) => Re(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { ref as I, createVNode as b, computed as U, defineComponent as z, inject as Q, mergeProps as Ae, createTextVNode as q, Fragment as re, provide as oe, watch as se, onMounted as le, nextTick as ae } from "vue";
5
- import { resolveAppearance as $e, getSchemaByType as ee, createPropsResolver as je } from "../dynamic-resolver/index.esm.js";
6
- import { DgControl as h, canvasChanged as _, refreshCanvas as qe, useDesignerComponent as We } from "../designer-canvas/index.esm.js";
7
- import { useGuid as te, FormSchemaEntityField$Type as ie, FormSchemaEntityFieldType$Type as Ge } from "../common/index.esm.js";
8
- import { useConditionValue as De, useConditionUtils as Z, FConditionFields as ze } from "../condition/index.esm.js";
9
- import { useCondition as Qe, useSolutionUtils as de } from "../query-solution/index.esm.js";
10
- import { FNotifyService as _e } from "../notify/index.esm.js";
11
- import { FDrawer as Xe } from "../drawer/index.esm.js";
12
- import { cloneDeep as D, isPlainObject as ne } from "lodash-es";
13
- import { LocaleService as ce } from "../locale/index.esm.js";
14
- import { FDynamicFormGroup as Je, useTypeResolver as ue } from "../dynamic-form/index.esm.js";
15
- import { radioGroupProps as Ye } from "../radio-group/index.esm.js";
16
- import { useDataSource as Ze, FComboListContainer as He } from "../combo-list/index.esm.js";
17
- const fe = /* @__PURE__ */ new Map([
18
- ["appearance", $e]
1
+ var Re = Object.defineProperty;
2
+ var Ae = (i, t, e) => t in i ? Re(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var x = (i, t, e) => Ae(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { ref as I, createVNode as C, computed as U, defineComponent as D, inject as Q, onMounted as H, mergeProps as $e, createTextVNode as W, Fragment as le, Teleport as je, nextTick as Z, provide as se, watch as ae } from "vue";
5
+ import { resolveAppearance as We, getSchemaByType as ie, createPropsResolver as qe } from "../dynamic-resolver/index.esm.js";
6
+ import { DgControl as h, canvasChanged as _, refreshCanvas as Ge, useDesignerComponent as ze } from "../designer-canvas/index.esm.js";
7
+ import { useGuid as ne, getCustomStyle as de, FormSchemaEntityField$Type as re, FormSchemaEntityFieldType$Type as De } from "../common/index.esm.js";
8
+ import { useConditionValue as Qe, useConditionUtils as K, FConditionFields as _e } from "../condition/index.esm.js";
9
+ import { useCondition as Xe, useSolutionUtils as ce } from "../query-solution/index.esm.js";
10
+ import { FNotifyService as Je } from "../notify/index.esm.js";
11
+ import { FDrawer as He } from "../drawer/index.esm.js";
12
+ import { cloneDeep as z, isPlainObject as oe } from "lodash-es";
13
+ import { LocaleService as ue } from "../locale/index.esm.js";
14
+ import { FDynamicFormGroup as Ye, useTypeResolver as fe } from "../dynamic-form/index.esm.js";
15
+ import { radioGroupProps as Ze } from "../radio-group/index.esm.js";
16
+ import { useDataSource as Ke, FComboListContainer as et } from "../combo-list/index.esm.js";
17
+ const pe = /* @__PURE__ */ new Map([
18
+ ["appearance", We]
19
19
  ]);
20
- function Ke(i, t) {
20
+ function tt(i, t) {
21
21
  const e = t == null ? void 0 : t.formSchemaUtils, n = i.parentComponentInstance, r = "54bddc89-5f7e-4b91-9c45-80dd6606cfe9";
22
- function s() {
23
- const u = ee(h["content-container"].type), f = ee(h["filter-bar"].type);
22
+ function l() {
23
+ const u = ie(h["content-container"].type), f = ie(h["filter-bar"].type);
24
24
  if (!u || !f)
25
25
  return;
26
26
  const o = Math.random().toString(36).substr(2, 4);
@@ -37,7 +37,7 @@ function Ke(i, t) {
37
37
  const d = n.belongedComponentId, g = e.getViewModelIdByComponentId(d), a = e.getViewModelById(g);
38
38
  return a != null && a.states && (a.states.find((p) => p.code === "originalFilterConditionList") || a.states.push(
39
39
  {
40
- id: te().guid(),
40
+ id: ne().guid(),
41
41
  category: "locale",
42
42
  code: "originalFilterConditionList",
43
43
  name: "筛选条过滤条件",
@@ -45,14 +45,14 @@ function Ke(i, t) {
45
45
  }
46
46
  )), { filterBar: f, filterBarContainer: u };
47
47
  }
48
- function l() {
48
+ function s() {
49
49
  const u = e.getViewModelIdByComponentId(n.belongedComponentId), f = e.getViewModelById(u);
50
50
  let o;
51
51
  if (f && f.commands) {
52
52
  const d = f.commands.find((g) => g.handlerName === "Filter" && g.cmpId === r);
53
53
  if (!d)
54
54
  o = {
55
- id: te().guid(),
55
+ id: ne().guid(),
56
56
  code: `${f.id.replace(/-/g, "").replace("component", "").replace("viewmodel", "")}Filter1`,
57
57
  name: "过滤并加载数据1",
58
58
  params: [
@@ -97,22 +97,22 @@ function Ke(i, t) {
97
97
  );
98
98
  }
99
99
  function c() {
100
- const { filterBar: u, filterBarContainer: f } = s(), { filterInGridViewModel: o } = l();
100
+ const { filterBar: u, filterBarContainer: f } = l(), { filterInGridViewModel: o } = s();
101
101
  u && o && (u.onQuery = o.code), m(o);
102
102
  const d = t == null ? void 0 : t.useFormCommand;
103
103
  return d && d.checkCommands(), f;
104
104
  }
105
105
  return { createFilterBar: c };
106
106
  }
107
- function pe(i, t, e, n) {
107
+ function me(i, t, e, n) {
108
108
  if (e.parentComponentInstance && n) {
109
- const l = Ke(e, n).createFilterBar();
110
- if (l)
111
- return l;
109
+ const s = tt(e, n).createFilterBar();
110
+ if (s)
111
+ return s;
112
112
  }
113
113
  return t;
114
114
  }
115
- const et = "https://json-schema.org/draft/2020-12/schema", tt = "https://farris-design.gitee.io/filter-bar.schema.json", it = "filter-bar", nt = "A Farris Component", rt = "object", ot = {
115
+ const it = "https://json-schema.org/draft/2020-12/schema", nt = "https://farris-design.gitee.io/filter-bar.schema.json", rt = "filter-bar", ot = "A Farris Component", lt = "object", st = {
116
116
  id: {
117
117
  description: "The unique identifier for filter-bar",
118
118
  type: "string"
@@ -156,21 +156,21 @@ const et = "https://json-schema.org/draft/2020-12/schema", tt = "https://farris-
156
156
  description: "",
157
157
  type: "string"
158
158
  }
159
- }, st = [
159
+ }, at = [
160
160
  "id",
161
161
  "type"
162
- ], lt = {
162
+ ], dt = {
163
163
  onQuery: "查询事件"
164
- }, me = {
165
- $schema: et,
166
- $id: tt,
167
- title: it,
168
- description: nt,
169
- type: rt,
170
- properties: ot,
171
- required: st,
172
- events: lt
173
- }, H = {
164
+ }, ge = {
165
+ $schema: it,
166
+ $id: nt,
167
+ title: rt,
168
+ description: ot,
169
+ type: lt,
170
+ properties: st,
171
+ required: at,
172
+ events: dt
173
+ }, ee = {
174
174
  /** 指定已设的筛选条件列表 */
175
175
  defaultValues: {
176
176
  type: Array,
@@ -185,90 +185,94 @@ const et = "https://json-schema.org/draft/2020-12/schema", tt = "https://farris-
185
185
  /** 是否禁用 */
186
186
  disabled: { type: Boolean, default: !1 },
187
187
  /** 清空值文字 */
188
- resetText: { type: String, default: "清空筛选" }
189
- }, at = je(H, me, fe, pe);
190
- function dt(i, t, e, n) {
191
- const r = I([]), s = I([]), l = I([]), m = I("");
188
+ resetText: { type: String, default: "清空筛选" },
189
+ customClass: { type: String, default: "" },
190
+ customStyle: { type: String, default: "" }
191
+ }, ct = qe(ee, ge, pe, me);
192
+ function ut(i, t, e, n) {
193
+ const r = I([]), l = I([]), s = I([]), m = I("");
192
194
  I(i.mode);
193
- const c = /* @__PURE__ */ new Map(), { createConditionValue: u } = De(), { convertToControls: f } = Z("filter-bar"), o = Qe(i, t), { getFilterConditions: d } = o, { fieldToCondition: g, judgeLoadNewValue: a } = de(), p = new _e();
195
+ const c = /* @__PURE__ */ new Map(), { createConditionValue: u } = Qe(), { convertToControls: f } = K("filter-bar"), o = Xe(i, t), { getFilterConditions: d } = o, { fieldToCondition: g, judgeLoadNewValue: a } = ce(), p = new Je();
194
196
  let v = "[]";
195
- function y(w) {
196
- return !i.disabled && !w.value.isEmpty() && !!w.value.getDisplayText();
197
- }
198
- function C(w) {
199
- s.value = f(w), s.value.reduce((T, B) => (T.set(B.labelCode, B), T), c);
200
- }
201
- function k(w) {
202
- const T = Array.isArray(w) ? w : [];
203
- l.value = s.value.map((B) => {
204
- const L = T.find((P) => P.id === B.id);
205
- if (L) {
206
- const P = g(B, L.value);
197
+ function y(F) {
198
+ return !i.disabled && !F.value.isEmpty();
199
+ }
200
+ function w(F) {
201
+ l.value = f(F), l.value.reduce((E, B) => (E.set(B.labelCode, B), E), c);
202
+ }
203
+ function T(F) {
204
+ const E = Array.isArray(F) ? F : [];
205
+ s.value = l.value.map((B) => {
206
+ const R = E.find((P) => P.id === B.id);
207
+ if (R) {
208
+ const P = g(B, R.value);
207
209
  return a(P, B) && P.value.clear(), P;
208
210
  }
209
211
  return g(B);
210
212
  });
211
213
  }
212
- function E(w) {
213
- l.value = l.value.filter((T) => T.id !== w.id), r.value = r.value.filter((T) => T.fieldCode !== w.fieldCode), s.value = s.value.filter((T) => T.id !== w.id), t.emit("remove", w.fieldCode);
214
+ function V(F) {
215
+ s.value = s.value.filter((E) => E.id !== F.id), r.value = r.value.filter((E) => E.fieldCode !== F.fieldCode), l.value = l.value.filter((E) => E.id !== F.id), t.emit("remove", F.fieldCode);
214
216
  }
215
- function S() {
216
- var w;
217
- i.disabled ? e.value = !1 : e.value = ((w = l.value) == null ? void 0 : w.findIndex((T) => {
217
+ function M() {
218
+ var F;
219
+ i.disabled ? e.value = !1 : e.value = ((F = s.value) == null ? void 0 : F.findIndex((E) => {
218
220
  var B;
219
- return T.value && !((B = T.value) != null && B.isEmpty());
221
+ return E.value && !((B = E.value) != null && B.isEmpty());
220
222
  })) > -1;
221
223
  }
222
- function M(w) {
223
- const T = JSON.stringify(w || []);
224
- T !== v && (t.emit("conditionChange", w), v = T, t.emit("query", w));
224
+ function k(F, E = []) {
225
+ const B = JSON.stringify(F || []);
226
+ B !== v && (t.emit("conditionChange", F), v = B, E.length === 0 && t.emit("query", F));
225
227
  }
226
- function V() {
227
- var B;
228
- try {
229
- S(), (l.value || []).map((L) => {
230
- if (L.required && (!L.value || L.value.isEmpty()))
231
- throw "请填写{fields}再进行筛选".replace("{fields}", L.fieldName || "");
232
- });
233
- } catch (L) {
234
- p.warning({ message: L, position: "top-center" });
228
+ function N() {
229
+ var R;
230
+ M();
231
+ const F = [];
232
+ (s.value || []).map((P) => {
233
+ P.required && (!P.value || P.value.isEmpty()) && F.push(P.fieldName || "");
234
+ });
235
+ const E = (R = s.value) == null ? void 0 : R.filter((P) => {
236
+ var A;
237
+ return P.value && !((A = P.value) != null && A.isEmpty());
238
+ });
239
+ if (E.length && F.length > 0) {
240
+ p.warning({ message: "请填写{fields}再进行筛选".replace("{fields}", F.join(",")), position: "top-center" });
241
+ return;
235
242
  }
236
- const w = (B = l.value) == null ? void 0 : B.filter((L) => {
237
- var P;
238
- return L.value && !((P = L.value) != null && P.isEmpty());
239
- }), T = d(w, s.value);
240
- M(T);
243
+ const B = d(E, l.value);
244
+ k(B, F);
241
245
  }
242
- function O(w, T) {
243
- C(w), k(T), V();
246
+ function L(F, E) {
247
+ w(F), T(E), N();
244
248
  }
245
- function F(w) {
246
- w.value.clear(), r.value = r.value.filter((T) => T.fieldCode !== w.fieldCode), t.emit("clear", w.fieldCode), V();
249
+ function b(F) {
250
+ F.value.clear(), r.value = r.value.filter((E) => E.fieldCode !== F.fieldCode), t.emit("clear", F.fieldCode), N();
247
251
  }
248
- function N() {
249
- l.value.forEach((w) => w.value.clear());
252
+ function S() {
253
+ s.value.forEach((F) => F.value.clear());
250
254
  }
251
- function R() {
252
- l.value.forEach((w) => {
253
- w.value.clear();
254
- }), t.emit("reset"), V(), n.resizeFilerBar();
255
+ function O() {
256
+ s.value.forEach((F) => {
257
+ F.value.clear();
258
+ }), t.emit("reset"), N(), n.resizeFilerBar();
255
259
  }
256
260
  return {
257
- clearAll: N,
258
- clearFilterItem: F,
261
+ clearAll: S,
262
+ clearFilterItem: b,
259
263
  currentFilterId: m,
260
- filterFields: s,
261
- filterItems: l,
264
+ filterFields: l,
265
+ filterItems: s,
262
266
  fieldMap: c,
263
- loadFilterItems: O,
264
- removeFilterItem: E,
265
- reset: R,
267
+ loadFilterItems: L,
268
+ removeFilterItem: V,
269
+ reset: O,
266
270
  shouldShowClearButtonInFilterItem: y,
267
- handleQuery: V
271
+ handleQuery: N
268
272
  };
269
273
  }
270
274
  function Y() {
271
- const { getLocaleValue: i } = ce;
275
+ const { getLocaleValue: i } = ue;
272
276
  return {
273
277
  confirm: i("filterBar.confirm"),
274
278
  cancel: i("filterBar.cancel"),
@@ -278,36 +282,36 @@ function Y() {
278
282
  fold: i("filterBar.fold")
279
283
  };
280
284
  }
281
- function ct(i) {
282
- return ce.getRealPropertyValue(i, "清空筛选", "filterBar.reset");
285
+ function ft(i) {
286
+ return ue.getRealPropertyValue(i, "清空筛选", "filterBar.reset");
283
287
  }
284
- function ut(i, t, e, n, r) {
288
+ function pt(i, t, e, n, r) {
285
289
  const {
286
- filterFields: s,
287
- handleQuery: l
288
- } = r, m = I(D(n.value)), c = Y(), u = I(c.advancedFilter);
290
+ filterFields: l,
291
+ handleQuery: s
292
+ } = r, m = I(z(n.value)), c = Y(), u = I(c.advancedFilter);
289
293
  function f() {
290
- e.value = !1, m.value = D(n.value);
294
+ e.value = !1, m.value = z(n.value);
291
295
  }
292
296
  function o() {
293
297
  e.value = !1, n.value.forEach((g) => {
294
298
  const a = m.value.find((p) => p.id === g.id);
295
299
  a != null && a.value && (g.value = a.value);
296
- }), l();
300
+ }), s();
297
301
  }
298
302
  function d() {
299
- return b("div", null, [b(ze, {
300
- fields: s.value,
303
+ return C("div", null, [C(_e, {
304
+ fields: l.value,
301
305
  conditions: m.value
302
- }, null), b("div", null, [b("button", {
306
+ }, null), C("div", null, [C("button", {
303
307
  class: "btn btn-secondary",
304
308
  onClick: f
305
- }, [c.cancel]), b("button", {
309
+ }, [c.cancel]), C("button", {
306
310
  class: "btn btn-primary",
307
311
  onClick: o
308
312
  }, [c.confirm])])]);
309
313
  }
310
- return () => b(Xe, {
314
+ return () => C(He, {
311
315
  modelValue: e.value,
312
316
  "onUpdate:modelValue": (g) => e.value = g,
313
317
  showClose: !1,
@@ -318,8 +322,8 @@ function ut(i, t, e, n, r) {
318
322
  content: d
319
323
  });
320
324
  }
321
- function ft(i, t, e, n) {
322
- const r = I([]), s = Y(), l = I(s.advancedFilter), m = I(ct(i.resetText));
325
+ function mt(i, t, e, n) {
326
+ const r = I([]), l = Y(), s = I(l.advancedFilter), m = I(ft(i.resetText));
323
327
  I(i.showReset);
324
328
  const c = I(!1), {
325
329
  clearAll: u,
@@ -337,36 +341,42 @@ function ft(i, t, e, n) {
337
341
  function p(y) {
338
342
  i.mode === "display-only" ? u() : f();
339
343
  }
340
- const v = ut(i, t, c, r, e);
341
- return () => b("div", {
344
+ const v = pt(i, t, c, r, e);
345
+ return () => C("div", {
342
346
  class: "f-filter-toolbars"
343
- }, [g.value && b("button", {
347
+ }, [g.value && C("button", {
344
348
  class: "btn btn-link",
345
349
  onClick: (y) => a()
346
- }, [l.value]), n.value && b("button", {
350
+ }, [s.value]), n.value && C("button", {
347
351
  class: "btn btn-link",
348
352
  onClick: (y) => p()
349
353
  }, [m.value]), v()]);
350
354
  }
351
- const pt = {
355
+ const gt = {
352
356
  filterItem: { type: Object, default: null },
353
- position: { type: Object, default: null }
354
- }, mt = Object.assign({}, Ye), gt = /* @__PURE__ */ z({
357
+ position: { type: Object, default: null },
358
+ /**
359
+ * 位置参照元素
360
+ */
361
+ reference: {
362
+ type: Object
363
+ }
364
+ }, vt = Object.assign({}, Ze), ht = /* @__PURE__ */ D({
355
365
  name: "FFilterRadioGroup",
356
- props: mt,
366
+ props: vt,
357
367
  emits: ["update:modelValue", "change"],
358
368
  setup(i, t) {
359
369
  const e = I(), {
360
370
  dataSource: n,
361
371
  displayText: r,
362
- modelValue: s
363
- } = Ze(i);
364
- function l(m) {
372
+ modelValue: l
373
+ } = Ke(i);
374
+ function s(m) {
365
375
  r.value = m.map((u) => u[i.textField]).join(i.separator);
366
376
  let c = "";
367
- m.length === 1 ? c = m[0][i.valueField] : c = m.map((u) => u[i.valueField]).join(i.separator), s.value !== c && (s.value = c, t.emit("update:modelValue", s.value), t.emit("change", s.value));
377
+ m.length === 1 ? c = m[0][i.valueField] : c = m.map((u) => u[i.valueField]).join(i.separator), l.value !== c && (l.value = c, t.emit("update:modelValue", l.value), t.emit("change", l.value));
368
378
  }
369
- return () => b(He, {
379
+ return () => C(et, {
370
380
  style: "margin: -2px -15px;padding: 0;",
371
381
  ref: e,
372
382
  idField: i.valueField,
@@ -374,219 +384,241 @@ const pt = {
374
384
  textField: i.textField,
375
385
  titleField: i.titleField,
376
386
  dataSource: n.value,
377
- selectedValues: s.value,
387
+ selectedValues: l.value,
378
388
  multiSelect: !1,
379
389
  enableSearch: !1,
380
390
  onSelectionChange: (m) => {
381
- l(m);
391
+ s(m);
382
392
  }
383
393
  }, null);
384
394
  }
385
- }), vt = /* @__PURE__ */ z({
386
- name: "FFilterBarItem",
387
- props: pt,
395
+ }), yt = /* @__PURE__ */ D({
396
+ name: "FFilterBarItemCondition",
397
+ props: gt,
388
398
  emits: ["cancel", "confirm", "clearFilter"],
389
399
  setup(i, t) {
390
- const e = I(D(i.filterItem)), n = Y(), r = I(i.position), s = {
391
- left: r.value.left,
392
- top: r.value.top
393
- }, {
394
- useFilterItemsComposition: l,
395
- resolveEditorProps: m
400
+ const e = I(z(i.filterItem)), n = Y(), r = I("0px"), l = I("0px"), s = I("0px"), m = I("auto"), c = U(() => ({
401
+ left: m.value === "auto" ? "26px" : "auto",
402
+ right: m.value
403
+ })), u = U(() => ({
404
+ left: r.value,
405
+ top: l.value,
406
+ width: s.value === "0px" ? null : s.value,
407
+ maxWidth: s.value === "0px" ? null : s.value
408
+ })), f = I(), {
409
+ useFilterItemsComposition: o,
410
+ resolveEditorProps: d
396
411
  } = Q("useFilterItemsComposition"), {
397
- fieldMap: c
398
- } = l, {
399
- renderFieldConditionEditor: u,
400
- conditionChangeHandler: f
401
- } = Z(), o = I(!0), d = I(!0);
402
- function g() {
403
- o.value = e.value.value.isEmpty();
412
+ fieldMap: g
413
+ } = o, {
414
+ renderFieldConditionEditor: a,
415
+ conditionChangeHandler: p
416
+ } = K("filter-bar"), v = I(""), y = I(!0);
417
+ function w() {
418
+ var F, E;
419
+ if (!i.reference || !f.value)
420
+ return;
421
+ const b = (F = i.reference) == null ? void 0 : F.getBoundingClientRect();
422
+ let S = (E = f.value) == null ? void 0 : E.getBoundingClientRect().width;
423
+ const O = document.body.clientWidth - b.left - 30;
424
+ S > O && (S = O), b.left > document.body.clientWidth - S - 20 ? (r.value = b.left + b.width - S + "px", l.value = b.top + b.height + "px", m.value = "26px") : (r.value = b.left + "px", l.value = b.top + b.height + "px", m.value = "auto"), s.value = S + "px";
404
425
  }
405
- function a(E, S, M, V) {
406
- f(E, S, M, V);
426
+ function T(b, S, O, F) {
427
+ p(b, S, O, F);
407
428
  }
408
- function p(E, S, M, V) {
409
- a(E, S, M, V), t.emit("confirm", e.value);
429
+ function V(b, S, O, F) {
430
+ T(b, S, O, F), t.emit("confirm", e.value);
410
431
  }
411
- function v() {
432
+ function M() {
412
433
  const {
413
- id: E,
434
+ id: b,
414
435
  editor: S,
415
- needEmitChange: M
416
- } = u(c, e.value, a);
417
- if (S.type === "radio-group") {
418
- const V = m(S.type, S);
419
- return d.value = !1, b(gt, Ae(V, {
436
+ needEmitChange: O
437
+ } = a(g, e.value, T);
438
+ if (v.value = "filter-panel--" + S.type, S.type === "radio-group") {
439
+ const F = d(S.type, S);
440
+ return y.value = !1, C(ht, $e(F, {
420
441
  modelValue: e.value.value.value,
421
- "onUpdate:modelValue": (O) => e.value.value.value = O,
422
- onChange: (O) => {
423
- p(e.value, O, S);
442
+ "onUpdate:modelValue": (E) => e.value.value.value = E,
443
+ onChange: (E) => {
444
+ V(e.value, E, S);
424
445
  }
425
446
  }), {
426
- default: () => [q(" ")]
447
+ default: () => [W(" ")]
427
448
  });
428
449
  }
429
- return b(Je, {
450
+ return C(Ye, {
430
451
  showLabelType: "force-none",
431
- id: E,
432
- key: E,
452
+ id: b,
453
+ key: b,
433
454
  editor: S,
434
455
  modelValue: e.value.value.value,
435
- "onUpdate:modelValue": (V) => e.value.value.value = V,
436
- onChange: (V, O) => {
437
- M && a(e.value, V, S, O);
456
+ "onUpdate:modelValue": (F) => e.value.value.value = F,
457
+ onChange: (F, E) => {
458
+ O && T(e.value, F, S, E);
438
459
  }
439
460
  }, null);
440
461
  }
441
- function y(E) {
462
+ H(() => {
463
+ w();
464
+ });
465
+ function k(b) {
442
466
  t.emit("cancel");
443
467
  }
444
- function C(E) {
445
- E.stopPropagation(), t.emit("confirm", e.value);
468
+ function N(b) {
469
+ b.stopPropagation(), t.emit("confirm", e.value);
446
470
  }
447
- function k(E) {
448
- e.value.value.clear(), E.stopPropagation(), t.emit("confirm", e);
471
+ function L(b) {
472
+ e.value.value.clear(), b.stopPropagation(), t.emit("confirm", e.value);
449
473
  }
450
- return g(), () => b("div", {
474
+ return () => C("div", {
451
475
  class: "f-filter-panel-wrapper can-close",
452
- onClick: y
453
- }, [b("div", {
454
- class: "f-filter-panel",
455
- style: s
456
- }, [b("div", {
476
+ onClick: k
477
+ }, [C("div", {
478
+ class: "f-filter-panel " + v.value,
479
+ ref: f,
480
+ style: u.value
481
+ }, [C("div", {
457
482
  class: "f-filter-panel-inner",
458
- onClick: (E) => E.stopPropagation()
459
- }, [b("div", {
483
+ onClick: (b) => b.stopPropagation()
484
+ }, [C("div", {
460
485
  class: "f-filter-panel-arrow",
461
- style: {
462
- left: r.value.arrowLeft,
463
- right: r.value.arrowRight
464
- }
465
- }, null), v(), d.value && b("div", {
486
+ style: c.value
487
+ }, null), M(), y.value && C("div", {
466
488
  class: "f-filter-panel-footer"
467
- }, [b("div", {
489
+ }, [C("div", {
468
490
  class: "filter-panel-clear"
469
- }, [b("button", {
491
+ }, [C("button", {
470
492
  class: "btn btn-link",
471
- onClick: k
472
- }, [n.clearAll])]), b("div", {
493
+ onClick: L,
494
+ style: "padding-left:0;"
495
+ }, [n.clearAll])]), C("div", {
473
496
  class: "filter-panel-btns"
474
- }, [b("button", {
497
+ }, [C("button", {
475
498
  class: "btn btn-secondary can-close",
476
- onClick: y
477
- }, [n.cancel]), b("button", {
499
+ onClick: k
500
+ }, [n.cancel]), C("button", {
478
501
  class: "filter-panel-submit btn btn-primary",
479
- onClick: C
502
+ onClick: N
480
503
  }, [n.confirm])])])])])]);
481
504
  }
482
- }), ge = {
505
+ }), ve = {
483
506
  filterItem: { type: Object, default: null },
484
507
  disabled: { type: Boolean, default: !1 }
485
- }, ht = /* @__PURE__ */ z({
508
+ }, bt = /* @__PURE__ */ D({
486
509
  name: "FFilterBarItem",
487
- props: ge,
510
+ props: ve,
488
511
  emits: ["confirm"],
489
512
  setup(i, t) {
490
513
  const e = I(i.filterItem), {
491
514
  useFilterItemsComposition: n
492
515
  } = Q("useFilterItemsComposition"), {
493
516
  clearFilterItem: r,
494
- currentFilterId: s,
495
- removeFilterItem: l,
517
+ currentFilterId: l,
518
+ removeFilterItem: s,
496
519
  shouldShowClearButtonInFilterItem: m
497
- } = n, c = I(), u = I(!1), f = function() {
520
+ } = n, c = I(!1), u = I(!1), f = I(), o = I(""), d = I(), g = function() {
498
521
  return {
499
522
  "f-filter-item": !0,
523
+ "f-state-disabled": i.disabled,
500
524
  "f-filter-item-actived": !e.value.value.isEmpty(),
501
525
  // 'f-filter-item-last': index === filterItems.value.length - 1,
502
- "f-filter-item-edit": e.value.id === s.value
526
+ "f-filter-item-edit": e.value.id === l.value || c.value
503
527
  };
504
528
  };
505
529
  U(() => !i.disabled && i.mode === "editable");
506
- function o(p) {
507
- i.disabled || (i.mode === "display-only" ? l(e.value) : r(e.value));
530
+ function a(M) {
531
+ i.disabled || (i.mode === "display-only" ? s(e.value) : r(e.value));
508
532
  }
509
- function d(p) {
510
- var C;
511
- if (i.disabled)
512
- return;
513
- const v = (C = p.currentTarget) == null ? void 0 : C.getBoundingClientRect(), y = 380;
514
- v.left > document.body.clientWidth - y - 20 ? c.value = {
515
- left: v.left + v.width - y + "px",
516
- top: v.top + v.height + "px",
517
- arrowLeft: "auto",
518
- arrowRight: "26px"
519
- } : c.value = {
520
- left: v.left + "px",
521
- top: v.top + v.height + "px",
522
- arrowLeft: "26px",
523
- arrowRight: "auto"
524
- }, u.value = !0;
533
+ function p(M) {
534
+ i.disabled || (c.value = !0);
525
535
  }
526
- function g() {
527
- u.value = !1;
536
+ function v() {
537
+ c.value = !1;
538
+ }
539
+ function y() {
540
+ d.value && d.value.scrollWidth > d.value.clientWidth ? o.value = d.value.innerHTML : o.value = "";
541
+ }
542
+ function w(M) {
543
+ c.value = !1, e.value.value = M.value, t.emit("confirm", M), Z(() => {
544
+ y();
545
+ });
546
+ }
547
+ function T() {
548
+ u.value = i.disabled ? !1 : m(e.value);
528
549
  }
529
- function a(p) {
530
- u.value = !1, e.value.value = p.value, t.emit("confirm", p);
550
+ function V() {
551
+ u.value = !1;
531
552
  }
532
- return () => b("div", {
553
+ return H(() => {
554
+ y();
555
+ }), () => C("div", {
533
556
  key: e.value.id,
534
557
  id: e.value.id,
535
- class: f()
536
- }, [b("div", {
558
+ class: g(),
559
+ onMouseenter: () => T(),
560
+ onMouseleave: () => V()
561
+ }, [C("div", {
537
562
  class: "f-filter-item-inner",
538
- onClick: (p) => d(p)
539
- }, [e.value.required && b("span", {
563
+ ref: f,
564
+ onClick: (M) => p()
565
+ }, [e.value.required && C("span", {
540
566
  class: "f-filter-item-required text-danger"
541
- }, [q("*")]), b("span", {
567
+ }, [W("*")]), C("span", {
542
568
  class: "f-filter-item-text"
543
- }, [e.value.fieldName]), e.value.value.getDisplayText() && b(re, null, [b("span", {
569
+ }, [e.value.fieldName]), !e.value.value.isEmpty() && C(le, null, [C("span", {
544
570
  class: "f-filter-item-tip"
545
- }, [q(":")]), b("span", {
546
- class: "f-filter-item-content"
547
- }, [e.value.value.getDisplayText()])]), !i.disabled && b("span", {
571
+ }, [W(":")]), C("span", {
572
+ class: "f-filter-item-content",
573
+ ref: d,
574
+ title: o.value
575
+ }, [e.value.value.getDisplayText()])]), !i.disabled && C("span", {
548
576
  class: "f-filter-item-arrow f-icon f-icon-arrow-chevron-down"
549
- }, null)]), m(e.value) && b("span", {
577
+ }, null)]), u.value && C("span", {
550
578
  class: "mr-3 f-filter-item-clear",
551
- onClick: (p) => o()
552
- }, [b("span", {
579
+ onClick: (M) => a()
580
+ }, [C("span", {
553
581
  class: "f-icon f-icon-close-circle"
554
- }, null)]), u.value && b(vt, {
555
- position: c.value,
556
- filterItem: e.value,
557
- onConfirm: a,
558
- onCancel: g
559
- }, null)]);
582
+ }, null)]), c.value && C(je, {
583
+ to: "body"
584
+ }, {
585
+ default: () => [C(yt, {
586
+ filterItem: e.value,
587
+ reference: f.value,
588
+ onConfirm: w,
589
+ onCancel: v
590
+ }, null)]
591
+ })]);
560
592
  }
561
593
  });
562
- function ve(i, t, e) {
594
+ function he(i, t, e) {
563
595
  const n = I(null), r = 20;
564
- let s = 0, l = -1;
596
+ let l = 0, s = -1;
565
597
  function m() {
566
598
  var g, a, p, v, y;
567
- if (t.value && l < 0) {
568
- const C = (g = i.value) == null ? void 0 : g.querySelector(".f-filter-list-wrapper");
569
- l = C ? parseFloat(getComputedStyle(C).marginRight) : 0;
599
+ if (t.value && s < 0) {
600
+ const w = (g = i.value) == null ? void 0 : g.querySelector(".f-filter-list-wrapper");
601
+ s = w ? parseFloat(getComputedStyle(w).marginRight) : 0;
570
602
  }
571
603
  const o = ((p = (a = i.value) == null ? void 0 : a.querySelector(".f-filter-list-ellipsis")) == null ? void 0 : p.clientWidth) || 0, d = ((y = (v = i.value) == null ? void 0 : v.querySelector(".f-filter-toolbars")) == null ? void 0 : y.clientWidth) || 0;
572
- return l + o + d;
604
+ return s + o + d;
573
605
  }
574
606
  function c(o = -1, d = -1) {
575
- var C;
607
+ var w;
576
608
  let g = !1;
577
- const a = (C = t.value) == null ? void 0 : C.children;
578
- if (!t.value || !i.value || !a || a.length === 0 || (o < 0 && (o = i.value.clientWidth), s = d < 0 ? s : d, Math.abs(o - s) < r))
609
+ const a = (w = t.value) == null ? void 0 : w.children;
610
+ if (!t.value || !i.value || !a || a.length === 0 || (o < 0 && (o = i.value.clientWidth), l = d < 0 ? l : d, Math.abs(o - l) < r))
579
611
  return;
580
612
  const p = m();
581
613
  let v = 0, y = 0;
582
- Array.from(a).forEach((k) => {
583
- k.style.display = "flex";
614
+ Array.from(a).forEach((T) => {
615
+ T.style.display = "flex";
584
616
  });
585
- for (let k = 0; k < a.length; k++) {
586
- const E = a[k], S = E.offsetWidth;
587
- !g && v + S <= o - p ? (v += S, y++) : (E.style.display = "none", g = !0);
617
+ for (let T = 0; T < a.length; T++) {
618
+ const V = a[T], M = V.offsetWidth;
619
+ !g && v + M <= o - p ? (v += M, y++) : (V.style.display = "none", g = !0);
588
620
  }
589
- return e.value = g, s = o, y;
621
+ return e.value = g, l = o, y;
590
622
  }
591
623
  function u() {
592
624
  var d;
@@ -596,7 +628,7 @@ function ve(i, t, e) {
596
628
  const o = t.value.children;
597
629
  Array.from(o).forEach((g) => {
598
630
  g.style.display = "flex";
599
- }), s = 0;
631
+ }), l = 0;
600
632
  }
601
633
  function f() {
602
634
  if (!t.value || !i.value)
@@ -613,107 +645,110 @@ function ve(i, t, e) {
613
645
  handleVisibleChildren: c
614
646
  };
615
647
  }
616
- const G = /* @__PURE__ */ z({
648
+ const G = /* @__PURE__ */ D({
617
649
  name: "FFilterBar",
618
- props: H,
650
+ props: ee,
619
651
  emits: ["clear", "remove", "reset", "conditionChange", "change", "query"],
620
652
  setup(i, t) {
621
- const e = I(!0), n = I(!1), r = I(!1), s = I(null), l = I(null), m = I(!1), c = I(0), u = ve(l, s, r), {
653
+ const e = I(!0), n = I(!1), r = I(!1), l = I(null), s = I(null), m = I(!1), c = I(0), u = he(s, l, r), {
622
654
  cancelWidthObserver: f,
623
655
  setupWidthObserver: o,
624
656
  handleVisibleChildren: d
625
657
  } = u, g = {
626
658
  resizeFilerBar: () => {
627
- n.value || ae(() => {
659
+ n.value || Z(() => {
628
660
  d(-1, 0);
629
661
  });
630
662
  }
631
- }, a = dt(i, t, m, g), {
663
+ }, a = ut(i, t, m, g), {
632
664
  filterFields: p,
633
665
  filterItems: v,
634
666
  loadFilterItems: y,
635
- handleQuery: C
667
+ handleQuery: w
636
668
  } = a, {
637
- resolveEditorProps: k
638
- } = ue();
639
- oe("useFilterItemsComposition", {
669
+ resolveEditorProps: T
670
+ } = fe();
671
+ se("useFilterItemsComposition", {
640
672
  useFilterItemsComposition: a,
641
- resolveEditorProps: k
673
+ resolveEditorProps: T
642
674
  });
643
- const E = Y(), S = U(() => ({
644
- display: p.value && p.value.length ? "" : "none"
645
- }));
646
- y(i.fields, i.defaultValues), se([() => i.defaultValues, () => i.fields], ([P, j]) => {
647
- y(j, P), c.value++, g.resizeFilerBar();
648
- }), le(() => {
675
+ const V = Y(), M = U(() => {
676
+ const P = {
677
+ display: p.value && p.value.length ? "" : "none"
678
+ };
679
+ return de(P, i == null ? void 0 : i.customStyle);
680
+ });
681
+ y(i.fields, i.defaultValues), ae([() => i.defaultValues, () => i.fields], ([P, A]) => {
682
+ y(A, P), c.value++, g.resizeFilerBar();
683
+ }), H(() => {
649
684
  o();
650
685
  });
651
- const M = U(() => n.value && e.value), V = U(() => ({
686
+ const k = U(() => n.value && e.value), N = U(() => ({
652
687
  "f-filter-list": !0,
653
- "f-filter-list-extend": M.value
688
+ "f-filter-list-extend": k.value
654
689
  // 'f-utils-overflow-hidden': true
655
- })), O = U(() => ({
690
+ })), L = U(() => ({
656
691
  "extend-btn-arrow": !0,
657
692
  "f-icon": !0,
658
693
  "f-icon-arrow-chevron-up": n.value,
659
694
  "f-icon-arrow-chevron-down": !n.value
660
- })), F = U(() => v.value.length > 0), N = U(() => !n.value && r.value);
661
- function R() {
695
+ })), b = U(() => v.value.length > 0), S = U(() => !n.value && r.value);
696
+ function O() {
662
697
  n.value = !n.value, n.value ? f() : o();
663
698
  }
664
- const w = ft(i, t, a, m);
665
- function T(P) {
666
- t.emit("change", P), C(), g.resizeFilerBar();
699
+ const F = mt(i, t, a, m);
700
+ function E(P) {
701
+ t.emit("change", P), w(), g.resizeFilerBar();
667
702
  }
668
703
  function B() {
669
- return b("div", {
670
- class: V.value,
671
- ref: s
672
- }, [v.value.map((P, j) => !P.isExtend && b(ht, {
704
+ return C("div", {
705
+ class: N.value,
706
+ ref: l
707
+ }, [v.value.map((P, A) => !P.isExtend && C(bt, {
673
708
  filterItem: P,
674
- onConfirm: T,
709
+ onConfirm: E,
675
710
  disabled: i.disabled || P.disabled
676
- }, null)), n.value && w()]);
711
+ }, null)), n.value && F()]);
677
712
  }
678
- function L() {
679
- return b("div", {
713
+ function R() {
714
+ return C("div", {
680
715
  class: "f-filter-list-ellipsis",
681
- onClick: (P) => R()
682
- }, [q("...")]);
716
+ onClick: (P) => O()
717
+ }, [W("...")]);
683
718
  }
684
- return () => b("div", {
685
- class: "f-filter-wrapper",
686
- style: S.value
687
- }, [b("div", {
719
+ return () => C("div", {
720
+ class: "f-filter-wrapper " + i.customClass,
721
+ style: M.value
722
+ }, [C("div", {
688
723
  class: "f-filter-wrapper-inner f-utils-fill"
689
- }, [b("div", {
724
+ }, [C("div", {
690
725
  class: "f-filter-main f-utils-fill",
691
- ref: l
692
- }, [b("div", {
726
+ ref: s
727
+ }, [C("div", {
693
728
  class: "f-filter-list-wrapper",
694
729
  key: i.id + "-main-" + c.value
695
- }, [F.value && B()]), N.value && L(), !n.value && w()]), r.value && b("div", {
730
+ }, [b.value && B()]), S.value && R(), !n.value && F()]), r.value && C("div", {
696
731
  class: "f-filter-extend-btn"
697
- }, [b("button", {
732
+ }, [C("button", {
698
733
  class: "btn btn-link",
699
- onClick: R
700
- }, [b("span", {
734
+ onClick: O
735
+ }, [C("span", {
701
736
  class: "extend-btn-text"
702
- }, [n.value ? E.fold : E.expand]), b("span", {
703
- class: O.value
737
+ }, [n.value ? V.fold : V.expand]), C("span", {
738
+ class: L.value
704
739
  }, null)])])])]);
705
740
  }
706
741
  });
707
- function yt(i, t) {
742
+ function Ct(i, t) {
708
743
  I([]);
709
744
  const e = I([]), n = I([]), r = I("");
710
745
  I(!1), I(i.mode);
711
- const s = /* @__PURE__ */ new Map(), { convertToControls: l } = Z(), { fieldToCondition: m } = de();
746
+ const l = /* @__PURE__ */ new Map(), { convertToControls: s } = K("filter-bar"), { fieldToCondition: m } = ce();
712
747
  function c(d) {
713
- return !d.value.isEmpty() && !!d.value.getDisplayText();
748
+ return !d.value.isEmpty();
714
749
  }
715
750
  function u(d) {
716
- e.value = l(d), e.value.reduce((g, a) => (g.set(a.labelCode, a), g), s);
751
+ e.value = s(d), e.value.reduce((g, a) => (g.set(a.labelCode, a), g), l);
717
752
  }
718
753
  function f(d) {
719
754
  n.value = e.value.map((g) => m(g));
@@ -725,39 +760,39 @@ function yt(i, t) {
725
760
  currentFilterId: r,
726
761
  filterFields: e,
727
762
  filterItems: n,
728
- fieldMap: s,
763
+ fieldMap: l,
729
764
  loadFilterItems: o,
730
765
  shouldShowClearButtonInFilterItem: c
731
766
  };
732
767
  }
733
- function bt(i, t, e) {
734
- const n = I([]), r = I("更多筛选"), s = I(i.resetText), l = I(i.showReset), {
768
+ function Ft(i, t, e) {
769
+ const n = I([]), r = I("更多筛选"), l = I(i.resetText), s = I(i.showReset), {
735
770
  filterItems: m
736
771
  } = e;
737
772
  function c() {
738
773
  n.value = m.value.filter((o) => o.isExtend);
739
774
  }
740
775
  c();
741
- const u = U(() => n.value && n.value.length > 0), f = U(() => l.value);
742
- return () => b("div", {
776
+ const u = U(() => n.value && n.value.length > 0), f = U(() => s.value);
777
+ return () => C("div", {
743
778
  class: "f-filter-toolbars"
744
- }, [u.value && b("button", {
779
+ }, [u.value && C("button", {
745
780
  class: "btn btn-link"
746
- }, [r.value]), f.value && b("button", {
781
+ }, [r.value]), f.value && C("button", {
747
782
  class: "btn btn-link"
748
- }, [s.value])]);
783
+ }, [l.value])]);
749
784
  }
750
- const Ct = /* @__PURE__ */ z({
785
+ const wt = /* @__PURE__ */ D({
751
786
  name: "FFilterBarItemDesign",
752
- props: ge,
787
+ props: ve,
753
788
  emits: ["confirm"],
754
789
  setup(i, t) {
755
790
  const e = I(i.filterItem), {
756
791
  useFilterItemsComposition: n
757
792
  } = Q("useFilterItemsComposition"), {
758
793
  currentFilterId: r,
759
- shouldShowClearButtonInFilterItem: s
760
- } = n, l = I(i.disabled), m = function() {
794
+ shouldShowClearButtonInFilterItem: l
795
+ } = n, s = I(i.disabled), m = function() {
761
796
  return {
762
797
  "f-filter-item": !0,
763
798
  "f-filter-item-actived": !e.value.value.isEmpty(),
@@ -765,30 +800,30 @@ const Ct = /* @__PURE__ */ z({
765
800
  "f-filter-item-edit": e.value.id === r.value
766
801
  };
767
802
  };
768
- return () => b("div", {
803
+ return () => C("div", {
769
804
  key: e.value.id,
770
805
  id: e.value.id,
771
806
  class: m()
772
- }, [b("div", {
807
+ }, [C("div", {
773
808
  class: "f-filter-item-inner"
774
- }, [e.value.required && b("span", {
809
+ }, [e.value.required && C("span", {
775
810
  class: "f-filter-item-required text-danger"
776
- }, [q("*")]), b("span", {
811
+ }, [W("*")]), C("span", {
777
812
  class: "f-filter-item-text"
778
- }, [e.value.fieldName]), e.value.value.getDisplayText() && b(re, null, [b("span", {
813
+ }, [e.value.fieldName]), e.value.value.getDisplayText() && C(le, null, [C("span", {
779
814
  class: "f-filter-item-tip"
780
- }, [q(":")]), b("span", {
815
+ }, [W(":")]), C("span", {
781
816
  class: "f-filter-item-content"
782
- }, [e.value.value.getDisplayText()])]), !l.value && b("span", {
817
+ }, [e.value.value.getDisplayText()])]), !s.value && C("span", {
783
818
  class: "f-filter-item-arrow f-icon f-icon-arrow-chevron-down"
784
- }, null)]), s(e.value) && b("span", {
819
+ }, null)]), l(e.value) && C("span", {
785
820
  class: "mr-3 f-filter-item-clear"
786
- }, [b("span", {
821
+ }, [C("span", {
787
822
  class: "f-icon f-icon-close-circle"
788
823
  }, null)])]);
789
824
  }
790
825
  });
791
- function Ft(i) {
826
+ function It(i) {
792
827
  const { formSchemaUtils: t, formStateMachineUtils: e } = i;
793
828
  function n(c, u = "") {
794
829
  return {
@@ -800,22 +835,22 @@ function Ft(i) {
800
835
  function r(c, u = "") {
801
836
  return t.getViewModelById(c).states.map((o) => n(o, u));
802
837
  }
803
- function s(c) {
838
+ function l(c) {
804
839
  const u = t.getRootViewModelId(), f = r(c);
805
840
  if (c === u)
806
841
  return f;
807
842
  const o = r(u, "root-component.");
808
843
  return [...f, ...o];
809
844
  }
810
- function l(c) {
845
+ function s(c) {
811
846
  return c.binding && c.binding.path || c.id || "";
812
847
  }
813
848
  function m() {
814
849
  return e && e.getRenderStates() || [];
815
850
  }
816
- return { getVariables: s, getControlName: l, getStateMachines: m };
851
+ return { getVariables: l, getControlName: s, getStateMachines: m };
817
852
  }
818
- class he {
853
+ class ye {
819
854
  constructor(t) {
820
855
  x(this, "sessionVariables", [
821
856
  {
@@ -864,19 +899,19 @@ class he {
864
899
  required: "必填表达式"
865
900
  });
866
901
  x(this, "getExpressionConverter", (t, e) => ({
867
- convertFrom: (n, r, s, l) => {
868
- const m = s.getExpressionRuleValue(t, e || r);
902
+ convertFrom: (n, r, l, s) => {
903
+ const m = l.getExpressionRuleValue(t, e || r);
869
904
  return m && m.value || "";
870
905
  },
871
- convertTo: (n, r, s, l, m) => {
906
+ convertTo: (n, r, l, s, m) => {
872
907
  var c;
873
- if (r === "dataPicking" && (s != null && s.target)) {
874
- const u = `${s.target}_dataPicking`;
875
- ((c = s.rules) == null ? void 0 : c.some(
908
+ if (r === "dataPicking" && (l != null && l.target)) {
909
+ const u = `${l.target}_dataPicking`;
910
+ ((c = l.rules) == null ? void 0 : c.some(
876
911
  (o) => o.id === u && o.value
877
912
  )) ? n.dictPickingExpressionId = u : delete n.dictPickingExpressionId;
878
913
  }
879
- l.updateExpression(s);
914
+ s.updateExpression(l);
880
915
  }
881
916
  }));
882
917
  this.formSchemaService = t;
@@ -885,11 +920,11 @@ class he {
885
920
  const n = this.formSchemaService.getExpressions();
886
921
  if (!n)
887
922
  return "";
888
- const r = n.find((l) => l.target === t);
923
+ const r = n.find((s) => s.target === t);
889
924
  if (!r)
890
925
  return "";
891
- const s = r.rules.find((l) => l.type === e);
892
- return s || "";
926
+ const l = r.rules.find((s) => s.type === e);
927
+ return l || "";
893
928
  }
894
929
  // 获取上下文表单变量
895
930
  getContextFormVariables() {
@@ -900,12 +935,12 @@ class he {
900
935
  if (!n || !n.states || n.states.length === 0)
901
936
  return [];
902
937
  const r = [];
903
- return n.states.filter((s) => s.category === "remote").forEach((s) => {
938
+ return n.states.filter((l) => l.category === "remote").forEach((l) => {
904
939
  r.push({
905
- key: s.code,
906
- name: s.name,
907
- description: s.name,
908
- category: s.category
940
+ key: l.code,
941
+ name: l.name,
942
+ description: l.name,
943
+ category: l.category
909
944
  });
910
945
  }), r;
911
946
  }
@@ -922,11 +957,11 @@ class he {
922
957
  const n = [];
923
958
  return t == null || t.forEach((r) => {
924
959
  var m;
925
- const s = this.createTreeNode(r, e);
926
- let l = [];
927
- (m = r.type) != null && m.fields && (l = this.buildEntityFieldsTreeData(r.type.fields, [...e, r.label])), n.push({
928
- data: s,
929
- children: l,
960
+ const l = this.createTreeNode(r, e);
961
+ let s = [];
962
+ (m = r.type) != null && m.fields && (s = this.buildEntityFieldsTreeData(r.type.fields, [...e, r.label])), n.push({
963
+ data: l,
964
+ children: s,
930
965
  expanded: !0
931
966
  });
932
967
  }), n;
@@ -935,12 +970,12 @@ class he {
935
970
  const n = [];
936
971
  return t == null || t.forEach((r) => {
937
972
  var c, u;
938
- const s = this.createTreeNode(r, e);
939
- s.type = "entity";
940
- const l = this.buildEntityFieldsTreeData((c = r.type) == null ? void 0 : c.fields, [...e, r.label]), m = this.buildChildEntityTreeData((u = r.type) == null ? void 0 : u.entities, [...e, r.label]);
941
- m != null && m.length && (l == null || l.push(...m)), n.push({
942
- data: s,
943
- children: l || [],
973
+ const l = this.createTreeNode(r, e);
974
+ l.type = "entity";
975
+ const s = this.buildEntityFieldsTreeData((c = r.type) == null ? void 0 : c.fields, [...e, r.label]), m = this.buildChildEntityTreeData((u = r.type) == null ? void 0 : u.entities, [...e, r.label]);
976
+ m != null && m.length && (s == null || s.push(...m)), n.push({
977
+ data: l,
978
+ children: s || [],
944
979
  // 空值回退
945
980
  expanded: !0
946
981
  });
@@ -980,86 +1015,86 @@ class he {
980
1015
  };
981
1016
  }
982
1017
  onBeforeOpenExpression(t, e, n) {
983
- const r = n === "Field" ? t.binding.field : t.id, s = this.getExpressionRule(r, e), l = this.getEntitiesAndVariables(), m = {
984
- message: ["validate", "required", "dataPicking"].includes(e) && s ? s.message : "",
985
- ...l
1018
+ const r = n === "Field" ? t.binding.field : t.id, l = this.getExpressionRule(r, e), s = this.getEntitiesAndVariables(), m = {
1019
+ message: ["validate", "required", "dataPicking"].includes(e) && l ? l.message : "",
1020
+ ...s
986
1021
  };
987
- return s.messageType != null && (m.messageType = s.messageType), m;
1022
+ return l.messageType != null && (m.messageType = l.messageType), m;
988
1023
  }
989
1024
  buildRule(t, e, n, r) {
990
- const { expression: s, message: l, messageType: m } = e, c = {
1025
+ const { expression: l, message: s, messageType: m } = e, c = {
991
1026
  id: `${t}_${n}`,
992
1027
  type: n,
993
- value: s
1028
+ value: l
994
1029
  };
995
- return (n === "validate" || n === "dataPicking" || n === "required") && (c.message = l), n === "dataPicking" && (c.messageType = m), n === "validate" && r && (c.elementId = r), c;
1030
+ return (n === "validate" || n === "dataPicking" || n === "required") && (c.message = s), n === "dataPicking" && (c.messageType = m), n === "validate" && r && (c.elementId = r), c;
996
1031
  }
997
1032
  getExpressionData() {
998
1033
  const { expressions: t } = this.formSchemaService.getFormSchema().module;
999
1034
  return t || [];
1000
1035
  }
1001
1036
  updateExpression(t, e, n, r) {
1002
- const s = e === "Field" ? t.binding.field : t.id, l = this.buildRule(s, n, r, t.type === "form-group" ? t.id : "");
1003
- let c = this.getExpressionData().find((f) => f.targetType === e && f.target === s);
1037
+ const l = e === "Field" ? t.binding.field : t.id, s = this.buildRule(l, n, r, t.type === "form-group" ? t.id : "");
1038
+ let c = this.getExpressionData().find((f) => f.targetType === e && f.target === l);
1004
1039
  const u = (f) => f.value.trim() === "";
1005
1040
  if (c) {
1006
- const f = c.rules.find((o) => o.id === l.id);
1041
+ const f = c.rules.find((o) => o.id === s.id);
1007
1042
  if (f)
1008
- u(l) ? c.rules = c.rules.filter((o) => o.id !== l.id) : (Object.assign(f, l), r === "validate" && t.type === "form-group" && (f.elementId = t.id));
1043
+ u(s) ? c.rules = c.rules.filter((o) => o.id !== s.id) : (Object.assign(f, s), r === "validate" && t.type === "form-group" && (f.elementId = t.id));
1009
1044
  else {
1010
- if (u(l))
1045
+ if (u(s))
1011
1046
  return null;
1012
- c.rules = c.rules || [], c.rules.push(l);
1047
+ c.rules = c.rules || [], c.rules.push(s);
1013
1048
  }
1014
1049
  } else {
1015
- if (u(l))
1050
+ if (u(s))
1016
1051
  return null;
1017
1052
  c = {
1018
- target: `${s}`,
1019
- rules: [l],
1053
+ target: `${l}`,
1054
+ rules: [s],
1020
1055
  targetType: e
1021
1056
  };
1022
1057
  }
1023
1058
  return c;
1024
1059
  }
1025
1060
  getExpressionEditorOptions(t, e, n, r) {
1026
- return n.reduce((s, l) => {
1061
+ return n.reduce((l, s) => {
1027
1062
  var c, u;
1028
1063
  const m = e === "Field" ? (c = t == null ? void 0 : t.binding) == null ? void 0 : c.field : t.id;
1029
- return s[l] = {
1064
+ return l[s] = {
1030
1065
  hide: e === "Field" ? !!((u = t == null ? void 0 : t.binding) != null && u.field) : !1,
1031
1066
  description: "",
1032
- title: this.expressionNames[l],
1067
+ title: this.expressionNames[s],
1033
1068
  type: "string",
1034
1069
  $converter: this.getExpressionConverter(m),
1035
1070
  refreshPanelAfterChanged: !0,
1036
1071
  editor: {
1037
1072
  type: "expression-editor",
1038
1073
  singleExpand: !1,
1039
- dialogTitle: `${this.expressionNames[l]}编辑器`,
1040
- showMessage: l === "validate" || l === "dataPicking" || l === "required",
1041
- showMessageType: l === "dataPicking",
1042
- beforeOpen: () => this.onBeforeOpenExpression(t, l, e),
1074
+ dialogTitle: `${this.expressionNames[s]}编辑器`,
1075
+ showMessage: s === "validate" || s === "dataPicking" || s === "required",
1076
+ showMessageType: s === "dataPicking",
1077
+ beforeOpen: () => this.onBeforeOpenExpression(t, s, e),
1043
1078
  onSubmitModal: (f) => {
1044
- const o = this.updateExpression(t, e, f, l);
1079
+ const o = this.updateExpression(t, e, f, s);
1045
1080
  if (r) {
1046
- const d = this.buildRule(m, f, l);
1081
+ const d = this.buildRule(m, f, s);
1047
1082
  r(d);
1048
1083
  }
1049
1084
  return o;
1050
1085
  }
1051
1086
  }
1052
- }, s;
1087
+ }, l;
1053
1088
  }, {});
1054
1089
  }
1055
1090
  getExpressionInfo(t, e, n) {
1056
- const r = e === "Field" ? t.binding.field : t.id, s = this.getExpressionRule(r, n), l = {
1057
- value: s && s.value,
1091
+ const r = e === "Field" ? t.binding.field : t.id, l = this.getExpressionRule(r, n), s = {
1092
+ value: l && l.value,
1058
1093
  targetId: r,
1059
1094
  targetType: e,
1060
1095
  expressionType: n
1061
1096
  };
1062
- return s && s.message && (l.message = s.message), l;
1097
+ return l && l.message && (s.message = l.message), s;
1063
1098
  }
1064
1099
  getExpressionConfig(t, e, n = ["compute", "dependency", "validate"], r) {
1065
1100
  return {
@@ -1082,7 +1117,7 @@ class he {
1082
1117
  };
1083
1118
  }
1084
1119
  }
1085
- class wt {
1120
+ class Et {
1086
1121
  constructor(t, e) {
1087
1122
  x(this, "componentId");
1088
1123
  x(this, "viewModelId");
@@ -1117,7 +1152,7 @@ class wt {
1117
1152
  if (e) {
1118
1153
  if (!this.designViewModelField) {
1119
1154
  const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1120
- this.designViewModelField = r.fields.find((s) => s.id === e);
1155
+ this.designViewModelField = r.fields.find((l) => l.id === e);
1121
1156
  }
1122
1157
  t.updateOn = (n = this.designViewModelField) == null ? void 0 : n.updateOn;
1123
1158
  }
@@ -1153,7 +1188,7 @@ class wt {
1153
1188
  const r = {
1154
1189
  title: "外观",
1155
1190
  description: "Appearance"
1156
- }, s = {
1191
+ }, l = {
1157
1192
  class: {
1158
1193
  title: "class样式",
1159
1194
  type: "string",
@@ -1169,21 +1204,21 @@ class wt {
1169
1204
  parentPropertyID: "appearance"
1170
1205
  }
1171
1206
  };
1172
- for (const l in e)
1173
- s[l] = Object.assign(s[l] || {}, e[l]);
1207
+ for (const s in e)
1208
+ l[s] = Object.assign(l[s] || {}, e[s]);
1174
1209
  return {
1175
1210
  ...r,
1176
- properties: { ...s },
1177
- setPropertyRelates(l, m) {
1178
- if (l) {
1179
- switch (l && l.propertyID) {
1211
+ properties: { ...l },
1212
+ setPropertyRelates(s, m) {
1213
+ if (s) {
1214
+ switch (s && s.propertyID) {
1180
1215
  case "class":
1181
1216
  case "style": {
1182
1217
  _.value++;
1183
1218
  break;
1184
1219
  }
1185
1220
  }
1186
- n && n(l, t, m);
1221
+ n && n(s, t, m);
1187
1222
  }
1188
1223
  }
1189
1224
  };
@@ -1198,8 +1233,8 @@ class wt {
1198
1233
  * @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
1199
1234
  * @returns
1200
1235
  */
1201
- getPropertyEditorParams(t, e = [], n = "visible", r = {}, s = {}, l = "") {
1202
- const { getVariables: m, getControlName: c, getStateMachines: u } = Ft(this.designerHostService), f = this.getRealTargetType(t), o = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], d = {
1236
+ getPropertyEditorParams(t, e = [], n = "visible", r = {}, l = {}, s = "") {
1237
+ const { getVariables: m, getControlName: c, getStateMachines: u } = It(this.designerHostService), f = this.getRealTargetType(t), o = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], d = {
1203
1238
  type: "property-editor",
1204
1239
  propertyTypes: o
1205
1240
  };
@@ -1212,7 +1247,7 @@ class wt {
1212
1247
  }, r);
1213
1248
  break;
1214
1249
  case "Expression":
1215
- d.expressionConfig = this.getExpressionOptions(t, f, l || n);
1250
+ d.expressionConfig = this.getExpressionOptions(t, f, s || n);
1216
1251
  break;
1217
1252
  case "StateMachine":
1218
1253
  d.stateMachines = u();
@@ -1227,15 +1262,15 @@ class wt {
1227
1262
  onBeforeOpenVariables: (a) => {
1228
1263
  a.value = m(this.viewModelId);
1229
1264
  }
1230
- }, s), this.designerContext.designerMode === "PC_RTC" && (d.newVariablePrefix = "ext_" + d.newVariablePrefix);
1265
+ }, l), this.designerContext.designerMode === "PC_RTC" && (d.newVariablePrefix = "ext_" + d.newVariablePrefix);
1231
1266
  break;
1232
1267
  }
1233
1268
  }), d;
1234
1269
  }
1235
1270
  getVisibleProperty(t, e = "") {
1236
- var s;
1271
+ var l;
1237
1272
  let n = ["Const", "Variable", "StateMachine", "Expression"];
1238
- return e === "gridFieldEditor" ? n = ["Const", "Expression"] : e === "form-group" && !((s = t.binding) != null && s.field) && (n = ["Const", "Variable", "StateMachine"]), {
1273
+ return e === "gridFieldEditor" ? n = ["Const", "Expression"] : e === "form-group" && !((l = t.binding) != null && l.field) && (n = ["Const", "Variable", "StateMachine"]), {
1239
1274
  visible: {
1240
1275
  title: "是否可见",
1241
1276
  type: "boolean",
@@ -1251,16 +1286,16 @@ class wt {
1251
1286
  * @returns
1252
1287
  */
1253
1288
  getBehaviorConfig(t, e = "", n = {}, r) {
1254
- const s = {
1289
+ const l = {
1255
1290
  title: "行为",
1256
1291
  description: ""
1257
- }, l = this.getVisibleProperty(t, e);
1292
+ }, s = this.getVisibleProperty(t, e);
1258
1293
  for (const c in n)
1259
- l[c] = Object.assign(l[c] || {}, n[c]);
1294
+ s[c] = Object.assign(s[c] || {}, n[c]);
1260
1295
  const m = this;
1261
1296
  return {
1262
- ...s,
1263
- properties: { ...l },
1297
+ ...l,
1298
+ properties: { ...s },
1264
1299
  setPropertyRelates(c, u) {
1265
1300
  if (c) {
1266
1301
  switch (c.propertyID) {
@@ -1293,8 +1328,8 @@ class wt {
1293
1328
  const n = e && e.parent && e.parent.schema;
1294
1329
  if (!n)
1295
1330
  return;
1296
- const r = n.contents.findIndex((l) => l.id === t), s = D(n.contents[r]);
1297
- n.contents.splice(r, 1), n.contents.splice(r, 0, s), qe();
1331
+ const r = n.contents.findIndex((s) => s.id === t), l = z(n.contents[r]);
1332
+ n.contents.splice(r, 1), n.contents.splice(r, 0, l), Ge();
1298
1333
  }
1299
1334
  /**
1300
1335
  * 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
@@ -1306,7 +1341,7 @@ class wt {
1306
1341
  const n = t.propertyValue;
1307
1342
  if (!(n && typeof n == "object") || !(n.type === "Variable" && n.isNewVariable))
1308
1343
  return;
1309
- const l = {
1344
+ const s = {
1310
1345
  id: n.field,
1311
1346
  category: "locale",
1312
1347
  code: n.fullPath,
@@ -1314,7 +1349,7 @@ class wt {
1314
1349
  type: n.newVariableType || "String",
1315
1350
  isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
1316
1351
  };
1317
- delete n.newVariableType, delete n.isNewVariable, this.formSchemaUtils.getVariableByCode(l.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(l);
1352
+ delete n.newVariableType, delete n.isNewVariable, this.formSchemaUtils.getVariableByCode(s.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(s);
1318
1353
  }
1319
1354
  /**
1320
1355
  * 更新表达式到expressions节点
@@ -1324,7 +1359,7 @@ class wt {
1324
1359
  const e = t.propertyValue;
1325
1360
  if (!((e && e.type) === "Expression" && e.expressionInfo))
1326
1361
  return;
1327
- const { expressionId: s, expressionInfo: l } = e, { targetId: m, targetType: c, expressionType: u, value: f, message: o } = l, d = this.formSchemaUtils.getModule();
1362
+ const { expressionId: l, expressionInfo: s } = e, { targetId: m, targetType: c, expressionType: u, value: f, message: o } = s, d = this.formSchemaUtils.getModule();
1328
1363
  d.expressions = d.expressions || [];
1329
1364
  const { expressions: g } = d;
1330
1365
  let a = g.find((v) => v.target === m);
@@ -1333,7 +1368,7 @@ class wt {
1333
1368
  if (p)
1334
1369
  p.value = f, p.message = o;
1335
1370
  else {
1336
- const v = { id: s, type: u, value: f, message: o };
1371
+ const v = { id: l, type: u, value: f, message: o };
1337
1372
  a.rules.push(v);
1338
1373
  }
1339
1374
  delete e.expressionInfo;
@@ -1348,11 +1383,11 @@ class wt {
1348
1383
  const n = t.propertyValue;
1349
1384
  if (n && n.type === "Expression")
1350
1385
  return;
1351
- const s = t.propertyID, l = this.formSchemaUtils.getExpressions(), m = e.binding ? e.binding.field : e.id, c = l.find((u) => u.target === m);
1352
- !c || !c.rules || (c.rules = c.rules.filter((u) => u.type !== s));
1386
+ const l = t.propertyID, s = this.formSchemaUtils.getExpressions(), m = e.binding ? e.binding.field : e.id, c = s.find((u) => u.target === m);
1387
+ !c || !c.rules || (c.rules = c.rules.filter((u) => u.type !== l));
1353
1388
  }
1354
1389
  getExpressionOptions(t, e, n) {
1355
- return new he(this.formSchemaUtils).getExpressionOptions(t, e, n);
1390
+ return new ye(this.formSchemaUtils).getExpressionOptions(t, e, n);
1356
1391
  }
1357
1392
  getRealTargetType(t) {
1358
1393
  return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(t.type) > -1 ? "Button" : t.binding && t.binding.field ? "Field" : "Container";
@@ -1371,17 +1406,17 @@ class wt {
1371
1406
  }, e;
1372
1407
  }
1373
1408
  }
1374
- const W = class W {
1409
+ const q = class q {
1375
1410
  /**
1376
1411
  * 根据绑定字段类型获取可用的输入类控件
1377
1412
  */
1378
1413
  static getEditorTypesByMDataType(t, e = !1, n = "") {
1379
1414
  if (e)
1380
1415
  return [{ key: h["language-textbox"].type, value: h["language-textbox"].name }];
1381
- let r = W.fieldControlTypeMapping[t];
1416
+ let r = q.fieldControlTypeMapping[t];
1382
1417
  if (n === "data-grid-column" && (r != null && r.length)) {
1383
- const s = [h["check-group"].type, h["radio-group"].type, h.image.type];
1384
- r = r.filter((l) => !s.includes(l.key));
1418
+ const l = [h["check-group"].type, h["radio-group"].type, h.image.type];
1419
+ r = r.filter((s) => !l.includes(s.key));
1385
1420
  }
1386
1421
  return r;
1387
1422
  }
@@ -1390,8 +1425,8 @@ const W = class W {
1390
1425
  */
1391
1426
  static getAllInputTypes() {
1392
1427
  const t = [];
1393
- for (const e in W.fieldControlTypeMapping)
1394
- W.fieldControlTypeMapping[e].forEach((n) => {
1428
+ for (const e in q.fieldControlTypeMapping)
1429
+ q.fieldControlTypeMapping[e].forEach((n) => {
1395
1430
  t.find((r) => r.key === n.key && r.value === n.value) || t.push({ key: n.key, value: n.value });
1396
1431
  });
1397
1432
  return t;
@@ -1401,15 +1436,15 @@ const W = class W {
1401
1436
  * @param control 控件元数据
1402
1437
  */
1403
1438
  static mappingDomPropAndSchemaProp(t, e) {
1404
- var s;
1405
- const n = (s = t.editor) == null ? void 0 : s.type, r = [];
1439
+ var l;
1440
+ const n = (l = t.editor) == null ? void 0 : l.type, r = [];
1406
1441
  return (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && e && e.categoryId && e.categoryId.indexOf("gridFieldEditor") < 0 && r.push({ domField: "title", schemaField: "name" }), r.push({ domField: "label", schemaField: "name" }), r.push({ domField: "editor.required", schemaField: "require" }), r.push({ domField: "editor.readonly", schemaField: "readonly" }), (n === h["input-group"].type || n === h.textarea.type || n === h["number-spinner"].type) && r.push({ domField: "editor.maxLength", schemaField: "type.length" }), n === h["number-spinner"].type && r.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && r.push({ domField: "formatter.precision", schemaField: "type.precision" }), (n === h["combo-list"].type || n === h["radio-group"].type) && r.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && r.push({ domField: "formatter.data", schemaField: "type.enumValues" }), n === h["date-picker"].type && (r.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), r.push({ domField: "editor.fieldType", schemaField: "type.name" })), n === h["number-spinner"].type && (r.push({ domField: "editor.max", schemaField: "editor.maxValue" }), r.push({ domField: "editor.min", schemaField: "editor.minValue" })), n === h.lookup.type && (r.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), r.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), r.push({ domField: "editor.textField", schemaField: "editor.textField" }), r.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), r.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), r.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), r.push({ domField: "path", schemaField: "bindingPath" }), r.push({ domField: "binding.path", schemaField: "bindingField" }), r.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && r.push({ domField: "field", schemaField: "bindingPath" }), r;
1407
1442
  }
1408
1443
  };
1409
1444
  /**
1410
1445
  * <字段类型,可配置的控件类型列表>的映射
1411
1446
  */
1412
- x(W, "fieldControlTypeMapping", {
1447
+ x(q, "fieldControlTypeMapping", {
1413
1448
  String: [
1414
1449
  { key: h["input-group"].type, value: h["input-group"].name },
1415
1450
  { key: h.lookup.type, value: h.lookup.name },
@@ -1463,9 +1498,9 @@ x(W, "fieldControlTypeMapping", {
1463
1498
  { key: h["radio-group"].type, value: h["radio-group"].name }
1464
1499
  ]
1465
1500
  });
1466
- let J = W;
1501
+ let J = q;
1467
1502
  var X = /* @__PURE__ */ ((i) => (i.Form = "Form", i.Variable = "Variable", i))(X || {});
1468
- class It {
1503
+ class St {
1469
1504
  constructor() {
1470
1505
  /** 控件标题 */
1471
1506
  x(this, "label", "");
@@ -1495,29 +1530,29 @@ class It {
1495
1530
  x(this, "fieldSetId", "");
1496
1531
  }
1497
1532
  }
1498
- function Et(i) {
1533
+ function xt(i) {
1499
1534
  let t, e;
1500
1535
  const n = /* @__PURE__ */ new Map();
1501
1536
  let r = [];
1502
- function s(f, o) {
1503
- const g = f.split(" ").filter((C) => C.startsWith("col-"));
1537
+ function l(f, o) {
1538
+ const g = f.split(" ").filter((w) => w.startsWith("col-"));
1504
1539
  if (g.length === 0) {
1505
1540
  o.isSupportedClass = !1;
1506
1541
  return;
1507
1542
  }
1508
- let a = g.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), p = g.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), v = g.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), y = g.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
1543
+ let a = g.find((w) => /^col-([1-9]|10|11|12)$/.test(w)), p = g.find((w) => /^col-md-([1-9]|10|11|12)$/.test(w)), v = g.find((w) => /^col-xl-([1-9]|10|11|12)$/.test(w)), y = g.find((w) => /^col-el-([1-9]|10|11|12)$/.test(w));
1509
1544
  a = a || "col-12", o.columnInSM = parseInt(a.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), p = p || "col-md-" + o.columnInSM, o.columnInMD = parseInt(p.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), v = v || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(v.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), y = y || "col-el-" + o.columnInLG, o.columnInEL = parseInt(y.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
1510
1545
  }
1511
- function l(f, o, d, g = !1) {
1546
+ function s(f, o, d, g = !1) {
1512
1547
  let a = !1;
1513
1548
  f.contents.forEach((p) => {
1514
1549
  if (p.type === "fieldset") {
1515
- d += 1, l(p, o, d, !0), a = !0;
1550
+ d += 1, s(p, o, d, !0), a = !0;
1516
1551
  return;
1517
1552
  }
1518
1553
  a && (d += 1, a = !1);
1519
- const v = p.appearance && p.appearance.class, y = new It();
1520
- v ? s(v, y) : y.isSupportedClass = !1, y.label = p.label || p.id, y.id = p.id, y.group = d, g && (y.fieldSetId = f.id), e === p.id && (t = d), n.set(p.id, p), o.push(y);
1554
+ const v = p.appearance && p.appearance.class, y = new St();
1555
+ v ? l(v, y) : y.isSupportedClass = !1, y.label = p.label || p.id, y.id = p.id, y.group = d, g && (y.fieldSetId = f.id), e === p.id && (t = d), n.set(p.id, p), o.push(y);
1521
1556
  });
1522
1557
  }
1523
1558
  function m(f) {
@@ -1534,8 +1569,8 @@ function Et(i) {
1534
1569
  return { result: d, message: g };
1535
1570
  e = f.id, r = [], n.clear();
1536
1571
  const p = a.contents[0].type === h.fieldset.type ? 0 : 1;
1537
- l(a, r, p);
1538
- const v = r.find((C) => !C.isSupportedClass);
1572
+ s(a, r, p);
1573
+ const v = r.find((w) => !w.isSupportedClass);
1539
1574
  return {
1540
1575
  defaultState: {
1541
1576
  defaultGroupNumber: t || 1,
@@ -1551,15 +1586,15 @@ function Et(i) {
1551
1586
  return "";
1552
1587
  const a = [];
1553
1588
  return f.forEach((p) => {
1554
- var C;
1589
+ var w;
1555
1590
  const v = n.get(p.id), y = v.appearance && v.appearance.class;
1556
1591
  if (y) {
1557
- const E = y.split(" ").filter((N) => !N.startsWith("col-")), S = "col-" + p.columnInSM, M = "col-md-" + p.columnInMD, V = "col-xl-" + p.columnInLG, O = "col-el-" + p.columnInEL, F = [S, M, V, O].concat(E);
1558
- v.appearance.class = F.join(" ");
1592
+ const V = y.split(" ").filter((S) => !S.startsWith("col-")), M = "col-" + p.columnInSM, k = "col-md-" + p.columnInMD, N = "col-xl-" + p.columnInLG, L = "col-el-" + p.columnInEL, b = [M, k, N, L].concat(V);
1593
+ v.appearance.class = b.join(" ");
1559
1594
  }
1560
1595
  if (p.fieldSetId) {
1561
- const k = g.contents.find((S) => S.id === p.fieldSetId), E = a.find((S) => S.id === p.fieldSetId);
1562
- E ? (C = E.contents) == null || C.push(v) : (a.push(k), k.contents = [v]);
1596
+ const T = g.contents.find((M) => M.id === p.fieldSetId), V = a.find((M) => M.id === p.fieldSetId);
1597
+ V ? (w = V.contents) == null || w.push(v) : (a.push(T), T.contents = [v]);
1563
1598
  } else
1564
1599
  a.push(v);
1565
1600
  }), g.contents = a, g.id;
@@ -1568,10 +1603,10 @@ function Et(i) {
1568
1603
  checkCanFindFormNode: m,
1569
1604
  checkCanOpenLayoutEditor: c,
1570
1605
  changeFormControlsByResponseLayoutConfig: u,
1571
- getResonseFormLayoutConfig: l
1606
+ getResonseFormLayoutConfig: s
1572
1607
  };
1573
1608
  }
1574
- class St extends wt {
1609
+ class Mt extends Et {
1575
1610
  constructor(e, n) {
1576
1611
  super(e, n);
1577
1612
  x(this, "responseLayoutEditorFunction");
@@ -1583,7 +1618,7 @@ class St extends wt {
1583
1618
  keyboard: !1,
1584
1619
  showButton: !1
1585
1620
  });
1586
- this.responseLayoutEditorFunction = Et(this.formSchemaUtils);
1621
+ this.responseLayoutEditorFunction = xt(this.formSchemaUtils);
1587
1622
  }
1588
1623
  getCommonPropertyConfig(e, n, r = "Card") {
1589
1624
  this.propertyConfig.categories.basic = this.getBasicProperties(e, n, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, n), this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, "form-group");
@@ -1596,9 +1631,9 @@ class St extends wt {
1596
1631
  }
1597
1632
  getBasicProperties(e, n, r = "Card") {
1598
1633
  var u;
1599
- const s = this;
1634
+ const l = this;
1600
1635
  this.setDesignViewModelField(e);
1601
- const { canChangeControlType: l, editorTypeList: m } = this.getAvailableEditorType(e), c = {
1636
+ const { canChangeControlType: s, editorTypeList: m } = this.getAvailableEditorType(e), c = {
1602
1637
  description: "Basic Information",
1603
1638
  title: "基本信息",
1604
1639
  properties: {
@@ -1621,7 +1656,7 @@ class St extends wt {
1621
1656
  idField: "key",
1622
1657
  editable: !1,
1623
1658
  data: m,
1624
- readonly: !l
1659
+ readonly: !s
1625
1660
  }
1626
1661
  },
1627
1662
  label: {
@@ -1661,7 +1696,7 @@ class St extends wt {
1661
1696
  if (f)
1662
1697
  switch (f && f.propertyID) {
1663
1698
  case "type": {
1664
- s.changeControlType(e, f, n);
1699
+ l.changeControlType(e, f, n);
1665
1700
  break;
1666
1701
  }
1667
1702
  case "label": {
@@ -1669,7 +1704,7 @@ class St extends wt {
1669
1704
  break;
1670
1705
  }
1671
1706
  case "binding": {
1672
- s.changeBindingField(e, f, d);
1707
+ l.changeBindingField(e, f, d);
1673
1708
  break;
1674
1709
  }
1675
1710
  }
@@ -1687,7 +1722,7 @@ class St extends wt {
1687
1722
  if (e.binding.type === "Variable") {
1688
1723
  if (this.bindingVarible = this.formSchemaUtils.getVariableById(e.binding.field), !this.bindingVarible)
1689
1724
  return !1;
1690
- } else if (!this.designViewModelField || this.designViewModelField.$type !== ie.SimpleField)
1725
+ } else if (!this.designViewModelField || this.designViewModelField.$type !== re.SimpleField)
1691
1726
  return !1;
1692
1727
  return !0;
1693
1728
  }
@@ -1695,18 +1730,18 @@ class St extends wt {
1695
1730
  * 获取可选的编辑器类型
1696
1731
  */
1697
1732
  getAvailableEditorType(e) {
1698
- var s;
1733
+ var l;
1699
1734
  const n = this.checkCanChangeControlType(e, this.viewModelId);
1700
1735
  if (!n)
1701
1736
  return {
1702
1737
  canChangeControlType: !1,
1703
1738
  editorTypeList: [{
1704
1739
  key: e.editor.type,
1705
- value: ((s = h[e.editor.type]) == null ? void 0 : s.name) || e.editor.type
1740
+ value: ((l = h[e.editor.type]) == null ? void 0 : l.name) || e.editor.type
1706
1741
  }]
1707
1742
  };
1708
1743
  let r = [];
1709
- return this.designViewModelField && this.designViewModelField.$type === ie.SimpleField ? r = J.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (r = J.getEditorTypesByMDataType(this.bindingVarible.type, this.designViewModelField.multiLanguage)), { canChangeControlType: n, editorTypeList: r };
1744
+ return this.designViewModelField && this.designViewModelField.$type === re.SimpleField ? r = J.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (r = J.getEditorTypesByMDataType(this.bindingVarible.type, this.designViewModelField.multiLanguage)), { canChangeControlType: n, editorTypeList: r };
1710
1745
  }
1711
1746
  changeBindingField(e, n, r) {
1712
1747
  n.needRefreshEntityTree = !0;
@@ -1750,14 +1785,14 @@ class St extends wt {
1750
1785
  }
1751
1786
  }
1752
1787
  },
1753
- setPropertyRelates(s, l) {
1754
- if (s)
1755
- switch (s && s.propertyID) {
1788
+ setPropertyRelates(l, s) {
1789
+ if (l)
1790
+ switch (l && l.propertyID) {
1756
1791
  case "responseLayout":
1757
- r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, n), delete e.responseLayout;
1792
+ r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, n), delete e.responseLayout;
1758
1793
  break;
1759
1794
  case "class":
1760
- r.updateUnifiedLayoutAfterControlChanged(s.propertyValue, e.id, this.componentId), _.value++;
1795
+ r.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), _.value++;
1761
1796
  break;
1762
1797
  case "style": {
1763
1798
  _.value++;
@@ -1776,19 +1811,19 @@ class St extends wt {
1776
1811
  * @param newControlType 新控件类型
1777
1812
  */
1778
1813
  changeControlType(e, n, r) {
1779
- const s = n.propertyValue, l = r && r.parent && r.parent.schema;
1780
- if (!l)
1814
+ const l = n.propertyValue, s = r && r.parent && r.parent.schema;
1815
+ if (!s)
1781
1816
  return;
1782
- const m = l.contents.findIndex((f) => f.id === e.id);
1817
+ const m = s.contents.findIndex((f) => f.id === e.id);
1783
1818
  if (m === -1)
1784
1819
  return;
1785
- const c = l.contents[m];
1820
+ const c = s.contents[m];
1786
1821
  let u;
1787
1822
  if (this.designViewModelField) {
1788
1823
  const d = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((a) => a.id === this.designViewModelField.id).fieldSchema || {};
1789
- d.editor || (d.editor = {}), d.editor.$type = s, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, d, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s);
1824
+ d.editor || (d.editor = {}), d.editor.$type = l, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, d, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l);
1790
1825
  }
1791
- u || (u = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(u, {
1826
+ u || (u = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(u, {
1792
1827
  id: c.id,
1793
1828
  appearance: c.appearance,
1794
1829
  size: c.size,
@@ -1800,13 +1835,13 @@ class St extends wt {
1800
1835
  (f) => f.classList.remove("dgComponentSelected")
1801
1836
  ), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
1802
1837
  (f) => f.classList.remove("dgComponentFocused")
1803
- ), _.value++, ae(() => {
1838
+ ), _.value++, Z(() => {
1804
1839
  this.getFormDesignerInstance().reloadPropertyPanel();
1805
1840
  });
1806
1841
  }
1807
- getComponentConfig(e, n = {}, r = {}, s) {
1842
+ getComponentConfig(e, n = {}, r = {}, l) {
1808
1843
  var d, g;
1809
- const l = Object.assign({
1844
+ const s = Object.assign({
1810
1845
  description: "编辑器",
1811
1846
  title: "编辑器",
1812
1847
  type: "input-group",
@@ -1835,7 +1870,7 @@ class St extends wt {
1835
1870
  f[a] = Object.assign(f[a] || {}, r[a]);
1836
1871
  const o = this;
1837
1872
  return {
1838
- ...l,
1873
+ ...s,
1839
1874
  properties: { ...f },
1840
1875
  setPropertyRelates(a, p) {
1841
1876
  if (a) {
@@ -1845,7 +1880,7 @@ class St extends wt {
1845
1880
  o.afterMutilEditorChanged(e, a);
1846
1881
  break;
1847
1882
  }
1848
- s && s.bind(o)(a, e, p);
1883
+ l && l.bind(o)(a, e, p);
1849
1884
  }
1850
1885
  }
1851
1886
  };
@@ -1857,12 +1892,12 @@ class St extends wt {
1857
1892
  * @param componentId 控件所在组件id
1858
1893
  */
1859
1894
  updateUnifiedLayoutAfterControlChanged(e, n, r) {
1860
- const s = e.split(" ");
1861
- let l = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), m = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), c = s.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), u = s.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
1862
- l = l || "col-12", m = m || "col-md-" + l.replace("col-", ""), c = c || "col-xl-" + m.replace("col-md-", ""), u = u || "col-el-" + c.replace("col-xl-", "");
1895
+ const l = e.split(" ");
1896
+ let s = l.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), m = l.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), c = l.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), u = l.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
1897
+ s = s || "col-12", m = m || "col-md-" + s.replace("col-", ""), c = c || "col-xl-" + m.replace("col-md-", ""), u = u || "col-el-" + c.replace("col-xl-", "");
1863
1898
  const f = {
1864
1899
  id: n,
1865
- columnInSM: parseInt(l.replace("col-", ""), 10),
1900
+ columnInSM: parseInt(s.replace("col-", ""), 10),
1866
1901
  columnInMD: parseInt(m.replace("col-md-", ""), 10),
1867
1902
  columnInLG: parseInt(c.replace("col-xl-", ""), 10),
1868
1903
  columnInEL: parseInt(u.replace("col-el-", ""), 10)
@@ -1878,12 +1913,12 @@ class St extends wt {
1878
1913
  const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
1879
1914
  if (!r || !r.unifiedLayout)
1880
1915
  return;
1881
- const s = [];
1882
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, s, 1), n) {
1883
- const a = s.find((p) => p.id === n.id);
1916
+ const l = [];
1917
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, l, 1), n) {
1918
+ const a = l.find((p) => p.id === n.id);
1884
1919
  Object.assign(a || {}, n);
1885
1920
  }
1886
- const l = s.map((a) => a.columnInSM), m = s.map((a) => a.columnInMD), c = s.map((a) => a.columnInLG), u = s.map((a) => a.columnInEL), f = this.checkIsUniqueColumn(l) ? l[0] : null, o = this.checkIsUniqueColumn(m) ? m[0] : null, d = this.checkIsUniqueColumn(c) ? c[0] : null, g = this.checkIsUniqueColumn(u) ? u[0] : null;
1921
+ const s = l.map((a) => a.columnInSM), m = l.map((a) => a.columnInMD), c = l.map((a) => a.columnInLG), u = l.map((a) => a.columnInEL), f = this.checkIsUniqueColumn(s) ? s[0] : null, o = this.checkIsUniqueColumn(m) ? m[0] : null, d = this.checkIsUniqueColumn(c) ? c[0] : null, g = this.checkIsUniqueColumn(u) ? u[0] : null;
1887
1922
  Object.assign(r.unifiedLayout, {
1888
1923
  uniqueColClassInSM: f,
1889
1924
  uniqueColClassInMD: o,
@@ -1929,7 +1964,7 @@ class St extends wt {
1929
1964
  * @param propertyData 下拉框控件属性值
1930
1965
  */
1931
1966
  checkEnumDataReadonly(e) {
1932
- return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === Ge.EnumType);
1967
+ return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === De.EnumType);
1933
1968
  }
1934
1969
  /**
1935
1970
  * 将字段值变化前事件、变化后事件追加到交互面板
@@ -1956,31 +1991,40 @@ class St extends wt {
1956
1991
  * @param showPosition 面板展示位置
1957
1992
  * @param customEvent 输入控件特有的事件配置
1958
1993
  */
1959
- getEventPropertyConfig(e, n = "card", r, s) {
1960
- const l = this;
1994
+ getEventPropertyConfig(e, n = "card", r, l) {
1995
+ const s = this;
1961
1996
  let m = [];
1962
- r && (m = m.concat(r)), this.appendFieldValueChangeEvents(e, m);
1963
- const c = l.eventsEditorUtils.formProperties(e, l.viewModelId, m);
1997
+ if (r && (m = m.concat(r)), m.length === 0)
1998
+ return {
1999
+ title: "事件",
2000
+ hideTitle: !0,
2001
+ properties: {},
2002
+ tabId: "commands",
2003
+ tabName: "交互",
2004
+ hide: !0
2005
+ };
2006
+ this.appendFieldValueChangeEvents(e, m);
2007
+ const c = s.eventsEditorUtils.formProperties(e, s.viewModelId, m);
1964
2008
  return {
1965
2009
  title: "事件",
1966
2010
  hideTitle: !0,
1967
- properties: l.createBaseEventProperty(c),
2011
+ properties: s.createBaseEventProperty(c),
1968
2012
  tabId: "commands",
1969
2013
  tabName: "交互",
1970
2014
  setPropertyRelates(o, d) {
1971
2015
  const g = o.propertyValue;
1972
- delete e[l.viewModelId], g && (g.setPropertyRelates = this.setPropertyRelates, g.controlInfo = { type: l.getControlMethodType(e), name: e.title }, l.eventsEditorUtils.saveRelatedParameters(e, l.viewModelId, g.events, g)), s && s(o, d, g);
1973
- const a = l.designViewModelUtils.getDgViewModel(l.viewModelId);
1974
- a && l.designViewModelField && a.changeField(l.designViewModelField.id, { valueChanging: e.fieldValueChanging, valueChanged: e.fieldValueChanged });
2016
+ delete e[s.viewModelId], g && (g.setPropertyRelates = this.setPropertyRelates, g.controlInfo = { type: s.getControlMethodType(e), name: e.title }, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, g.events, g)), l && l(o, d, g);
2017
+ const a = s.designViewModelUtils.getDgViewModel(s.viewModelId);
2018
+ a && s.designViewModelField && a.changeField(s.designViewModelField.id, { valueChanging: e.fieldValueChanging, valueChanged: e.fieldValueChanged });
1975
2019
  }
1976
2020
  };
1977
2021
  }
1978
- getExpressionConfig(e, n, r = ["compute", "dependency", "validate"], s) {
1979
- return new he(this.formSchemaUtils).getExpressionConfig(
2022
+ getExpressionConfig(e, n, r = ["compute", "dependency", "validate"], l) {
2023
+ return new ye(this.formSchemaUtils).getExpressionConfig(
1980
2024
  e,
1981
2025
  n,
1982
2026
  r,
1983
- s
2027
+ l
1984
2028
  );
1985
2029
  }
1986
2030
  getBindingDataType() {
@@ -1990,14 +2034,14 @@ class St extends wt {
1990
2034
  return this.getBindingDataType() === "number" ? this.numberEditorOptions : {};
1991
2035
  }
1992
2036
  updatePropertyValue(e, n, r) {
1993
- var s;
1994
- e.editor[n] !== r ? e.editor[n] = r : (s = this.getFormDesignerInstance()) == null || s.reloadPropertyPanel();
2037
+ var l;
2038
+ e.editor[n] !== r ? e.editor[n] = r : (l = this.getFormDesignerInstance()) == null || l.reloadPropertyPanel();
1995
2039
  }
1996
2040
  setBooleanValue(e, n, r) {
1997
- let s = r;
1998
- this.getBindingDataType() === "string" && (s = (s || "").trim() || (n === "trueValue" ? "true" : "false"));
2041
+ let l = r;
2042
+ this.getBindingDataType() === "string" && (l = (l || "").trim() || (n === "trueValue" ? "true" : "false"));
1999
2043
  const m = n === "trueValue" ? "falseValue" : "trueValue";
2000
- e.editor[m] === s && (s = s + 1), this.updatePropertyValue(e, n, s);
2044
+ e.editor[m] === l && (l = l + 1), this.updatePropertyValue(e, n, l);
2001
2045
  }
2002
2046
  getBooleanValueConverter() {
2003
2047
  return {
@@ -2008,7 +2052,7 @@ class St extends wt {
2008
2052
  };
2009
2053
  }
2010
2054
  }
2011
- class xt extends St {
2055
+ class Tt extends Mt {
2012
2056
  getPropertyConfig(t, e) {
2013
2057
  return this.propertyConfig.categories.basic = this.getBasicPropConfig(t), this.propertyConfig.categories.appearance = this.getAppearanceConfig(), this.getBehaviorConfig(t), this.getFilterBarConfig(t), this.getEventPropConfig(t), this.propertyConfig;
2014
2058
  }
@@ -2050,7 +2094,8 @@ class xt extends St {
2050
2094
  metadataService: this.metadataService,
2051
2095
  viewModelId: this.viewModelId,
2052
2096
  designViewModelUtils: this.designViewModelUtils,
2053
- eventsEditorUtils: this.eventsEditorUtils
2097
+ eventsEditorUtils: this.eventsEditorUtils,
2098
+ schemaService: this.schemaService
2054
2099
  }
2055
2100
  },
2056
2101
  // visible: {
@@ -2070,7 +2115,7 @@ class xt extends St {
2070
2115
  editor: this.getPropertyEditorParams(t, ["Variable"], "", {}, { newVariableType: "Object" })
2071
2116
  }
2072
2117
  },
2073
- setPropertyRelates(r, s) {
2118
+ setPropertyRelates(r, l) {
2074
2119
  if (r)
2075
2120
  switch (r.propertyID) {
2076
2121
  case "visible":
@@ -2090,26 +2135,26 @@ class xt extends St {
2090
2135
  label: "onQuery",
2091
2136
  name: "查询事件"
2092
2137
  }
2093
- ], n = this, r = n.eventsEditorUtils.formProperties(t, n.viewModelId, e), s = n.createBaseEventProperty(r);
2138
+ ], n = this, r = n.eventsEditorUtils.formProperties(t, n.viewModelId, e), l = n.createBaseEventProperty(r);
2094
2139
  this.propertyConfig.categories.eventsEditor = {
2095
2140
  title: "事件",
2096
2141
  hideTitle: !0,
2097
- properties: s,
2142
+ properties: l,
2098
2143
  // 这个属性,标记当属性变更得时候触发重新更新属性
2099
2144
  refreshPanelAfterChanged: !0,
2100
2145
  tabId: "commands",
2101
2146
  tabName: "交互",
2102
- setPropertyRelates(l, m) {
2103
- const c = l.propertyValue;
2147
+ setPropertyRelates(s, m) {
2148
+ const c = s.propertyValue;
2104
2149
  delete t[n.viewModelId], c && (c.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(t, n.viewModelId, c.events, c)), t.remoteSort = !!t.columnSorted;
2105
2150
  }
2106
2151
  };
2107
2152
  }
2108
2153
  }
2109
- function Mt(i, t) {
2154
+ function kt(i, t) {
2110
2155
  function e(m, c) {
2111
2156
  const u = i.schema;
2112
- return new xt(m, t).getPropertyConfig(u, c);
2157
+ return new Tt(m, t).getPropertyConfig(u, c);
2113
2158
  }
2114
2159
  function n() {
2115
2160
  return !1;
@@ -2117,10 +2162,10 @@ function Mt(i, t) {
2117
2162
  function r() {
2118
2163
  return !1;
2119
2164
  }
2120
- function s() {
2165
+ function l() {
2121
2166
  return !1;
2122
2167
  }
2123
- function l() {
2168
+ function s() {
2124
2169
  var o, d, g, a, p, v;
2125
2170
  if ((d = (o = i == null ? void 0 : i.parent) == null ? void 0 : o.parent) != null && d.schema) {
2126
2171
  const y = (g = i == null ? void 0 : i.parent) == null ? void 0 : g.parent.schema;
@@ -2128,7 +2173,7 @@ function Mt(i, t) {
2128
2173
  }
2129
2174
  const { formSchemaUtils: m } = t, c = i.componentInstance.value.belongedComponentId, u = m.getViewModelIdByComponentId(c), f = m.getViewModelById(u);
2130
2175
  if (f && f.states) {
2131
- const y = f.states.findIndex((C) => C.code === "originalFilterConditionList");
2176
+ const y = f.states.findIndex((w) => w.code === "originalFilterConditionList");
2132
2177
  y > -1 && f.states.splice(y, 1);
2133
2178
  }
2134
2179
  }
@@ -2136,14 +2181,14 @@ function Mt(i, t) {
2136
2181
  getPropsConfig: e,
2137
2182
  canAccepts: n,
2138
2183
  checkCanDeleteComponent: r,
2139
- checkCanMoveComponent: s,
2140
- onRemoveComponent: l
2184
+ checkCanMoveComponent: l,
2185
+ onRemoveComponent: s
2141
2186
  };
2142
2187
  }
2143
- function ye(i, t) {
2188
+ function be(i, t) {
2144
2189
  let e;
2145
2190
  function n(o) {
2146
- const { properties: d, title: g, ignore: a } = o, p = a && Array.isArray(a), v = Object.keys(d).reduce((y, C) => ((!p || !a.find((k) => k === C)) && (y[C] = d[C].type === "object" && d[C].properties ? n(d[C]) : D(d[C].default)), y), {});
2191
+ const { properties: d, title: g, ignore: a } = o, p = a && Array.isArray(a), v = Object.keys(d).reduce((y, w) => ((!p || !a.find((T) => T === w)) && (y[w] = d[w].type === "object" && d[w].properties ? n(d[w]) : z(d[w].default)), y), {});
2147
2192
  if (g && (!p || !a.find((y) => y === "id"))) {
2148
2193
  const y = g.toLowerCase().replace(/-/g, "_");
2149
2194
  v.id = `${y}_${Math.random().toString().slice(2, 6)}`;
@@ -2153,7 +2198,7 @@ function ye(i, t) {
2153
2198
  function r(o) {
2154
2199
  const { properties: d, title: g, required: a } = o;
2155
2200
  if (a && Array.isArray(a)) {
2156
- const p = a.reduce((v, y) => (v[y] = d[y].type === "object" && d[y].properties ? n(d[y]) : D(d[y].default), v), {});
2201
+ const p = a.reduce((v, y) => (v[y] = d[y].type === "object" && d[y].properties ? n(d[y]) : z(d[y].default), v), {});
2157
2202
  if (g && a.find((v) => v === "id")) {
2158
2203
  const v = g.toLowerCase().replace(/-/g, "_");
2159
2204
  p.id = `${v}_${Math.random().toString().slice(2, 6)}`;
@@ -2164,18 +2209,18 @@ function ye(i, t) {
2164
2209
  type: g
2165
2210
  };
2166
2211
  }
2167
- function s(o, d = {}, g) {
2212
+ function l(o, d = {}, g) {
2168
2213
  const a = i[o];
2169
2214
  if (a) {
2170
2215
  let p = r(a);
2171
2216
  const v = t[o];
2172
- return p = v ? v({ getSchemaByType: s }, p, d, g) : p, e != null && e.appendIdentifyForNewControl && e.appendIdentifyForNewControl(p), p;
2217
+ return p = v ? v({ getSchemaByType: l }, p, d, g) : p, e != null && e.appendIdentifyForNewControl && e.appendIdentifyForNewControl(p), p;
2173
2218
  }
2174
2219
  return null;
2175
2220
  }
2176
- function l(o, d) {
2221
+ function s(o, d) {
2177
2222
  const g = n(d);
2178
- return Object.keys(g).reduce((a, p) => (Object.prototype.hasOwnProperty.call(o, p) && (a[p] && ne(a[p]) && ne(o[p] || !o[p]) ? Object.assign(a[p], o[p] || {}) : a[p] = o[p]), a), g), g;
2223
+ return Object.keys(g).reduce((a, p) => (Object.prototype.hasOwnProperty.call(o, p) && (a[p] && oe(a[p]) && oe(o[p] || !o[p]) ? Object.assign(a[p], o[p] || {}) : a[p] = o[p]), a), g), g;
2179
2224
  }
2180
2225
  function m(o, d) {
2181
2226
  return Object.keys(o).filter((a) => o[a] != null).reduce((a, p) => {
@@ -2193,7 +2238,7 @@ function ye(i, t) {
2193
2238
  }, {});
2194
2239
  }
2195
2240
  function c(o, d, g = /* @__PURE__ */ new Map()) {
2196
- const a = l(o, d);
2241
+ const a = s(o, d);
2197
2242
  return m(a, g);
2198
2243
  }
2199
2244
  function u(o) {
@@ -2203,10 +2248,10 @@ function ye(i, t) {
2203
2248
  const a = i[d];
2204
2249
  if (!a)
2205
2250
  return o;
2206
- const p = l(o, a), v = ((g = o.editor) == null ? void 0 : g.type) || "";
2251
+ const p = s(o, a), v = ((g = o.editor) == null ? void 0 : g.type) || "";
2207
2252
  if (v) {
2208
- const y = i[v], C = l(o.editor, y);
2209
- p.editor = C;
2253
+ const y = i[v], w = s(o.editor, y);
2254
+ p.editor = w;
2210
2255
  }
2211
2256
  return p;
2212
2257
  }
@@ -2215,10 +2260,10 @@ function ye(i, t) {
2215
2260
  function f(o) {
2216
2261
  e = o;
2217
2262
  }
2218
- return { getSchemaByType: s, resolveSchemaWithDefaultValue: u, resolveSchemaToProps: c, mappingSchemaToProps: m, setDesignerContext: f };
2263
+ return { getSchemaByType: l, resolveSchemaWithDefaultValue: u, resolveSchemaToProps: c, mappingSchemaToProps: m, setDesignerContext: f };
2219
2264
  }
2220
- const be = {}, Ce = {}, { resolveSchemaWithDefaultValue: Tt, resolveSchemaToProps: kt, mappingSchemaToProps: Vt } = ye(be, Ce);
2221
- function Pt(i = {}) {
2265
+ const Ce = {}, Fe = {}, { resolveSchemaWithDefaultValue: Pt, resolveSchemaToProps: Vt, mappingSchemaToProps: Bt } = be(Ce, Fe);
2266
+ function Nt(i = {}) {
2222
2267
  function t(u, f, o, d) {
2223
2268
  if (typeof o == "number")
2224
2269
  return d[u].length === o;
@@ -2250,13 +2295,13 @@ function Pt(i = {}) {
2250
2295
  return { target: o, operator: "getProperty", param: g, value: a };
2251
2296
  }) : [];
2252
2297
  }
2253
- function s(u) {
2298
+ function l(u) {
2254
2299
  return Object.keys(u).reduce((o, d) => {
2255
2300
  const g = r(d, u[d]);
2256
2301
  return o.push(...g), o;
2257
2302
  }, []);
2258
2303
  }
2259
- function l(u, f) {
2304
+ function s(u, f) {
2260
2305
  if (n.has(u.operator)) {
2261
2306
  const o = n.get(u.operator);
2262
2307
  return o && o(u.target, u.param, u.value, f) || !1;
@@ -2264,27 +2309,27 @@ function Pt(i = {}) {
2264
2309
  return !1;
2265
2310
  }
2266
2311
  function m(u, f) {
2267
- return s(u).reduce((g, a) => g && l(a, f), !0);
2312
+ return l(u).reduce((g, a) => g && s(a, f), !0);
2268
2313
  }
2269
2314
  function c(u, f) {
2270
- const o = Object.keys(u), d = o.includes("allOf"), g = o.includes("anyOf"), a = d || g, y = (a ? u[a ? d ? "allOf" : "anyOf" : "allOf"] : [u]).map((k) => m(k, f));
2315
+ const o = Object.keys(u), d = o.includes("allOf"), g = o.includes("anyOf"), a = d || g, y = (a ? u[a ? d ? "allOf" : "anyOf" : "allOf"] : [u]).map((T) => m(T, f));
2271
2316
  return d ? !y.includes(!1) : y.includes(!0);
2272
2317
  }
2273
2318
  return { parseValueSchema: c };
2274
2319
  }
2275
- const Bt = {
2320
+ const Ot = {
2276
2321
  convertTo: (i, t, e, n) => {
2277
2322
  i.appearance || (i.appearance = {}), i.appearance[t] = e;
2278
2323
  },
2279
2324
  convertFrom: (i, t, e) => i.appearance ? i.appearance[t] : i[t]
2280
- }, Ot = {
2325
+ }, Lt = {
2281
2326
  convertFrom: (i, t, e) => i.buttons && i.buttons.length ? `共 ${i.buttons.length} 项` : "无"
2282
- }, Nt = {
2327
+ }, Ut = {
2283
2328
  convertTo: (i, t, e, n) => {
2284
2329
  i.editor && (i.editor[t] = e);
2285
2330
  },
2286
2331
  convertFrom: (i, t, e) => i.editor && Object.prototype.hasOwnProperty.call(i.editor, t) ? i.editor[t] : i[t]
2287
- }, Lt = {
2332
+ }, Rt = {
2288
2333
  button: { type: "button", name: "按钮" },
2289
2334
  "response-toolbar": { type: "response-toolbar", name: "工具栏" },
2290
2335
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
@@ -2337,18 +2382,18 @@ const Bt = {
2337
2382
  comment: { type: "comment", name: "评论区" },
2338
2383
  "rich-text-editor": { type: "rich-text-editor", name: "富文本编辑器", icon: "rich-text-box" },
2339
2384
  calendar: { type: "calendar", name: "日历", icon: "date-picker" }
2340
- }, Ut = {
2385
+ }, At = {
2341
2386
  convertFrom: (i, t, e) => {
2342
2387
  var r;
2343
2388
  const n = i.editor && i.editor[t] ? i.editor[t] : i[t];
2344
- return ((r = Lt[n]) == null ? void 0 : r.name) || n;
2389
+ return ((r = Rt[n]) == null ? void 0 : r.name) || n;
2345
2390
  }
2346
- }, Rt = {
2391
+ }, $t = {
2347
2392
  convertTo: (i, t, e, n) => {
2348
2393
  i[t] = i[t];
2349
2394
  },
2350
2395
  convertFrom: (i, t, e) => i.editor ? e.getRealEditorType(i.editor.type) : ""
2351
- }, At = {
2396
+ }, jt = {
2352
2397
  convertTo: (i, t, e, n) => {
2353
2398
  (i.type === "data-grid-column" || i.type === "tree-grid-column") && (i.formatter ? i.formatter[t] = e : i.formatter = {
2354
2399
  [t]: e
@@ -2379,7 +2424,7 @@ const Bt = {
2379
2424
  }
2380
2425
  return "none";
2381
2426
  }
2382
- }, $t = {
2427
+ }, Wt = {
2383
2428
  convertTo: (i, t, e, n) => {
2384
2429
  i.command ? i.command[t] = e : i.command = {
2385
2430
  [t]: e
@@ -2416,15 +2461,17 @@ const Bt = {
2416
2461
  var n, r;
2417
2462
  if (i.command) {
2418
2463
  if (t === "enableType") {
2419
- const s = (r = (n = i.command) == null ? void 0 : n.commands) == null ? void 0 : r.find((l) => l.command === "edit" && l.type === "primary");
2420
- return i.command.enable ? s ? "default" : "custom" : "unable";
2464
+ const l = (r = (n = i.command) == null ? void 0 : n.commands) == null ? void 0 : r.find((s) => s.command === "edit" && s.type === "primary");
2465
+ return i.command.enable ? l ? "default" : "custom" : "unable";
2421
2466
  }
2422
2467
  if (t === "commands")
2423
2468
  return i.command.enableType === "custom" ? i.command.commands : [];
2469
+ if (t === "formatter")
2470
+ return i.command.formatter;
2424
2471
  }
2425
2472
  return "";
2426
2473
  }
2427
- }, jt = {
2474
+ }, qt = {
2428
2475
  convertTo: (i, t, e, n) => {
2429
2476
  i.column ? i.column[t] = e : i.column = {
2430
2477
  [t]: e
@@ -2439,7 +2486,7 @@ const Bt = {
2439
2486
  }
2440
2487
  return "";
2441
2488
  }
2442
- }, qt = {
2489
+ }, Gt = {
2443
2490
  convertTo: (i, t, e, n) => {
2444
2491
  i.summary ? i.summary[t] = e : i.summary = {
2445
2492
  [t]: e
@@ -2449,7 +2496,7 @@ const Bt = {
2449
2496
  });
2450
2497
  },
2451
2498
  convertFrom: (i, t, e) => i.summary && t === "enable" ? i.summary.enable : i.type === "data-grid-column" ? i.enableSummary === void 0 ? !1 : i.enableSummary : ""
2452
- }, Wt = {
2499
+ }, zt = {
2453
2500
  convertTo: (i, t, e, n) => {
2454
2501
  i.group ? i.group[t] = e : i.group = {
2455
2502
  [t]: e
@@ -2467,7 +2514,7 @@ const Bt = {
2467
2514
  return i.group.showSummary;
2468
2515
  }
2469
2516
  }
2470
- }, Gt = {
2517
+ }, Dt = {
2471
2518
  convertFrom: (i, t) => i.binding ? i.binding.path : "",
2472
2519
  convertTo: (i, t, e) => {
2473
2520
  if (e && e.length > 0) {
@@ -2475,17 +2522,17 @@ const Bt = {
2475
2522
  i.binding || (i.binding = {}), i.binding.type = "Form", i.binding.path = n.bindingField, i.binding.field = n.id, i.binding.fullPath = n.path, i.path = n.bindingPath;
2476
2523
  }
2477
2524
  }
2478
- }, Dt = {
2525
+ }, Qt = {
2479
2526
  convertTo: (i, t, e, n) => {
2480
2527
  i.pagination || (i.pagination = {}), i.pagination[t] = e;
2481
2528
  },
2482
2529
  convertFrom: (i, t, e) => i.pagination ? i.pagination[t] : i[t]
2483
- }, zt = {
2530
+ }, _t = {
2484
2531
  convertTo: (i, t, e, n) => {
2485
2532
  i.rowNumber || (i.rowNumber = {}), i.rowNumber[t] = e;
2486
2533
  },
2487
2534
  convertFrom: (i, t, e) => i.rowNumber ? i.rowNumber[t] : i[t]
2488
- }, Qt = {
2535
+ }, Xt = {
2489
2536
  convertTo: (i, t, e, n) => {
2490
2537
  i.selection || (i.selection = {}), i.selection[t] = e;
2491
2538
  },
@@ -2493,24 +2540,24 @@ const Bt = {
2493
2540
  var n, r;
2494
2541
  return t === "showCheckbox" ? (n = i.selection) != null && n.multiSelect ? !0 : (r = i.selection) == null ? void 0 : r.showCheckbox : i.selection ? i.selection[t] : i[t];
2495
2542
  }
2496
- }, _t = {
2543
+ }, Jt = {
2497
2544
  convertFrom: (i, t, e) => i[t] && i[t].length ? `共 ${i[t].length} 项` : ""
2498
- }, Xt = {
2545
+ }, Ht = {
2499
2546
  convertFrom: (i, t) => i[t] || "",
2500
2547
  convertTo: (i, t, e) => {
2501
2548
  i[t] = e;
2502
2549
  }
2503
- }, Jt = {
2550
+ }, Yt = {
2504
2551
  convertTo: (i, t, e, n) => {
2505
2552
  i.size || (i.size = {}), i.size[t] = e;
2506
2553
  },
2507
2554
  convertFrom: (i, t, e) => i.size ? i.size[t] : i[t]
2508
- }, Yt = {
2555
+ }, Zt = {
2509
2556
  convertFrom: (i, t, e) => {
2510
2557
  var n, r;
2511
2558
  return (n = i.formatter) != null && n.data && t === "formatterEnumData" && !i.formatterEnumData ? (r = i.formatter) == null ? void 0 : r.data : i.formatterEnumData;
2512
2559
  }
2513
- }, Zt = {
2560
+ }, Kt = {
2514
2561
  convertTo: (i, t, e, n) => {
2515
2562
  i.sort || (i.sort = {}), i.sort[t] = e;
2516
2563
  },
@@ -2521,7 +2568,7 @@ const Bt = {
2521
2568
  if (t === "multiSort")
2522
2569
  return !!((r = i.sort) != null && r.multiSort);
2523
2570
  }
2524
- }, Ht = {
2571
+ }, ei = {
2525
2572
  convertTo: (i, t, e, n) => {
2526
2573
  i.filter || (i.filter = {}), i.filter[t] = e;
2527
2574
  },
@@ -2530,7 +2577,7 @@ const Bt = {
2530
2577
  if (t === "mode")
2531
2578
  return ((n = i.filter) == null ? void 0 : n.mode) || "client";
2532
2579
  }
2533
- }, Kt = {
2580
+ }, ti = {
2534
2581
  convertTo: (i, t, e, n) => {
2535
2582
  i.rowOption ? i.rowOption[t] = e : i.rowOption = {
2536
2583
  [t]: e
@@ -2545,7 +2592,7 @@ const Bt = {
2545
2592
  }
2546
2593
  return "";
2547
2594
  }
2548
- }, ei = {
2595
+ }, ii = {
2549
2596
  convertTo: (i, t, e, n) => {
2550
2597
  (i.type === "data-grid-column" || i.type === "tree-grid-column") && (i[t] = e, t === "columnTemplateType" && e === "hyperlink" && (i.onClickLinkCommand ? i.columnTemplate = `
2551
2598
  <span class="f-pretend-link f-cursor-pointer"
@@ -2554,34 +2601,34 @@ const Bt = {
2554
2601
  </span>` : i.columnTemplate = `
2555
2602
  <span class="f-pretend-link f-cursor-pointer">
2556
2603
  {{rowData.${i.field}}}
2557
- </span>`), t === "columnTemplateType" && e === "default" && (i.columnTemplate = ""));
2604
+ </span>`), t === "columnTemplateType" && e === "default" && (i.columnTemplate = ""), t === "columnTemplateType" && e === "custom" && (i.columnTemplate = ""));
2558
2605
  },
2559
2606
  convertFrom: (i, t, e) => t === "columnTemplate" ? i.columnTemplate : t === "columnTemplateType" ? i.columnTemplateType ? i.columnTemplateType || "default" : i.columnTemplate && !i.onClickLinkCommand ? "custom" : i.columnTemplate && i.onClickLinkCommand ? "hyperlink" : "default" : ""
2560
2607
  };
2561
- function Fe(i, t, e) {
2608
+ function we(i, t, e) {
2562
2609
  const n = /* @__PURE__ */ new Map([
2563
- ["/converter/appearance.converter", Bt],
2564
- ["/converter/buttons.converter", Ot],
2565
- ["/converter/property-editor.converter", Nt],
2566
- ["/converter/items-count.converter", _t],
2567
- ["/converter/type.converter", Ut],
2568
- ["/converter/change-editor.converter", Rt],
2569
- ["/converter/change-formatter.converter", At],
2570
- ["/converter/column-command.converter", $t],
2571
- ["/converter/column-option.converter", jt],
2572
- ["/converter/summary.converter", qt],
2573
- ["/converter/group.converter", Wt],
2574
- ["/converter/form-group-label.converter", Xt],
2575
- ["/converter/field-selector.converter", Gt],
2576
- ["/converter/pagination.converter", Dt],
2577
- ["/converter/row-number.converter", zt],
2578
- ["/converter/grid-selection.converter", Qt],
2579
- ["/converter/size.converter", Jt],
2580
- ["/converter/change-formatter-enum.converter", Yt],
2581
- ["/converter/grid-sort.converter", Zt],
2582
- ["/converter/grid-filter.converter", Ht],
2583
- ["/converter/row-option.converter", Kt],
2584
- ["/converter/change-formatter-type.converter", ei]
2610
+ ["/converter/appearance.converter", Ot],
2611
+ ["/converter/buttons.converter", Lt],
2612
+ ["/converter/property-editor.converter", Ut],
2613
+ ["/converter/items-count.converter", Jt],
2614
+ ["/converter/type.converter", At],
2615
+ ["/converter/change-editor.converter", $t],
2616
+ ["/converter/change-formatter.converter", jt],
2617
+ ["/converter/column-command.converter", Wt],
2618
+ ["/converter/column-option.converter", qt],
2619
+ ["/converter/summary.converter", Gt],
2620
+ ["/converter/group.converter", zt],
2621
+ ["/converter/form-group-label.converter", Ht],
2622
+ ["/converter/field-selector.converter", Dt],
2623
+ ["/converter/pagination.converter", Qt],
2624
+ ["/converter/row-number.converter", _t],
2625
+ ["/converter/grid-selection.converter", Xt],
2626
+ ["/converter/size.converter", Yt],
2627
+ ["/converter/change-formatter-enum.converter", Zt],
2628
+ ["/converter/grid-sort.converter", Kt],
2629
+ ["/converter/grid-filter.converter", ei],
2630
+ ["/converter/row-option.converter", ti],
2631
+ ["/converter/change-formatter-type.converter", ii]
2585
2632
  ]), r = /* @__PURE__ */ new Map([
2586
2633
  ["string", { type: "input-group", enableClear: !1 }],
2587
2634
  ["boolean", {
@@ -2606,76 +2653,76 @@ function Fe(i, t, e) {
2606
2653
  ["array", { type: "button-edit" }],
2607
2654
  ["number", { type: "number-spinner", placeholder: "" }],
2608
2655
  ["events-editor", { type: "events-editor", hide: !0 }]
2609
- ]), s = Pt();
2610
- function l(a, p) {
2611
- return () => s.parseValueSchema(a, p);
2656
+ ]), l = Nt();
2657
+ function s(a, p) {
2658
+ return () => l.parseValueSchema(a, p);
2612
2659
  }
2613
2660
  function m(a, p, v) {
2614
- return a.includes("visible") && p.visible !== void 0 ? typeof p.visible == "boolean" ? () => !!p.visible : p.visible === void 0 ? !0 : l(p.visible, v) : () => !0;
2661
+ return a.includes("visible") && p.visible !== void 0 ? typeof p.visible == "boolean" ? () => !!p.visible : p.visible === void 0 ? !0 : s(p.visible, v) : () => !0;
2615
2662
  }
2616
2663
  function c(a, p, v) {
2617
- return a.includes("readonly") && p.readonly !== void 0 ? typeof p.readonly == "boolean" ? () => !!p.readonly : l(p.readonly, v) : () => !1;
2664
+ return a.includes("readonly") && p.readonly !== void 0 ? typeof p.readonly == "boolean" ? () => !!p.readonly : s(p.readonly, v) : () => !1;
2618
2665
  }
2619
2666
  function u(a, p) {
2620
2667
  const v = a.$converter || p;
2621
2668
  return typeof v == "string" && v && n.has(v) ? n.get(v) || null : v || null;
2622
2669
  }
2623
- function f(a, p, v, y, C, k = "", E = "") {
2624
- return Object.keys(a).map((M) => {
2625
- const V = I(1), O = M, F = a[M], N = Object.keys(F), R = F.title, w = F.type, T = r.get(w) || { type: "input-group", enableClear: !1 }, B = F.editor ? Object.assign({}, T, F.editor) : Object.assign({}, T), L = m(N, F, p), P = c(N, F, p);
2670
+ function f(a, p, v, y, w, T = "", V = "") {
2671
+ return Object.keys(a).map((k) => {
2672
+ const N = I(1), L = k, b = a[k], S = Object.keys(b), O = b.title, F = b.type, E = r.get(F) || { type: "input-group", enableClear: !1 }, B = b.editor ? Object.assign({}, E, b.editor) : Object.assign({}, E), R = m(S, b, p), P = c(S, b, p);
2626
2673
  B.readonly = B.readonly === void 0 ? P() : B.readonly;
2627
- const j = F.type === "cascade" ? f(F.properties, p, v, y, C, k, E) : [], ke = !0;
2628
- let A = u(F, E);
2674
+ const A = b.type === "cascade" ? f(b.properties, p, v, y, w, T, V) : [], Pe = !0;
2675
+ let $ = u(b, V);
2629
2676
  const Ve = U({
2630
2677
  get() {
2631
- if (V.value) {
2632
- if (["class", "style"].find((Le) => Le === O) && !A && (A = n.get("/converter/appearance.converter") || null), A && A.convertFrom)
2633
- return A.convertFrom(v, M, C, k);
2634
- const $ = v[M];
2635
- return Object.prototype.hasOwnProperty.call(F, "defaultValue") && ($ === void 0 || typeof $ == "string" && $ === "") ? F.type === "boolean" ? F.defaultValue : F.defaultValue || "" : $;
2678
+ if (N.value) {
2679
+ if (["class", "style"].find((Ue) => Ue === L) && !$ && ($ = n.get("/converter/appearance.converter") || null), $ && $.convertFrom)
2680
+ return $.convertFrom(v, k, w, T);
2681
+ const j = v[k];
2682
+ return Object.prototype.hasOwnProperty.call(b, "defaultValue") && (j === void 0 || typeof j == "string" && j === "") ? b.type === "boolean" ? b.defaultValue : b.defaultValue || "" : j;
2636
2683
  }
2637
2684
  return null;
2638
2685
  },
2639
- set($) {
2640
- V.value += 1, A && A.convertTo ? (A.convertTo(y, M, $, C, k), A.convertTo(v, M, $, C, k)) : (y[M] = $, v[M] = $);
2686
+ set(j) {
2687
+ N.value += 1, $ && $.convertTo ? ($.convertTo(y, k, j, w, T), $.convertTo(v, k, j, w, T)) : (y[k] = j, v[k] = j);
2641
2688
  }
2642
- }), { refreshPanelAfterChanged: Pe, description: Be, isExpand: Oe, parentPropertyID: Ne } = F, K = { propertyID: O, propertyName: R, propertyType: w, propertyValue: Ve, editor: B, visible: L, readonly: P, cascadeConfig: j, hideCascadeTitle: ke, refreshPanelAfterChanged: Pe, description: Be, isExpand: Oe, parentPropertyID: Ne };
2643
- return p[O] = K, K;
2689
+ }), { refreshPanelAfterChanged: Be, description: Ne, isExpand: Oe, parentPropertyID: Le } = b, te = { propertyID: L, propertyName: O, propertyType: F, propertyValue: Ve, editor: B, visible: R, readonly: P, cascadeConfig: A, hideCascadeTitle: Pe, refreshPanelAfterChanged: Be, description: Ne, isExpand: Oe, parentPropertyID: Le };
2690
+ return p[L] = te, te;
2644
2691
  });
2645
2692
  }
2646
2693
  function o(a, p, v = {}) {
2647
- const y = {}, C = i[a];
2648
- return C && C.categories ? Object.keys(C.categories).map((E) => {
2649
- const S = C.categories[E], M = S == null ? void 0 : S.title, V = f(S.properties || {}, y, {}, v, p);
2650
- return { categoryId: E, categoryName: M, properties: V };
2694
+ const y = {}, w = i[a];
2695
+ return w && w.categories ? Object.keys(w.categories).map((V) => {
2696
+ const M = w.categories[V], k = M == null ? void 0 : M.title, N = f(M.properties || {}, y, {}, v, p);
2697
+ return { categoryId: V, categoryName: k, properties: N };
2651
2698
  }) : [];
2652
2699
  }
2653
- function d(a, p, v, y, C = "") {
2654
- const k = p.$ref.schema, E = p.$ref.converter, S = v[k], M = S.type, V = e(S), O = {}, F = i[M];
2655
- if (F && F.categories) {
2656
- const N = F.categories[a], R = N == null ? void 0 : N.title;
2657
- E && Object.keys(N.properties).forEach((B) => {
2658
- N.properties[B].$converter = E;
2700
+ function d(a, p, v, y, w = "") {
2701
+ const T = p.$ref.schema, V = p.$ref.converter, M = v[T], k = M.type, N = e(M), L = {}, b = i[k];
2702
+ if (b && b.categories) {
2703
+ const S = b.categories[a], O = S == null ? void 0 : S.title;
2704
+ V && Object.keys(S.properties).forEach((B) => {
2705
+ S.properties[B].$converter = V;
2659
2706
  });
2660
- const w = (N == null ? void 0 : N.properties) || {}, T = f(w, O, V, S, y, C);
2661
- return { categoryId: a, categoryName: R, properties: T };
2707
+ const F = (S == null ? void 0 : S.properties) || {}, E = f(F, L, N, M, y, w);
2708
+ return { categoryId: a, categoryName: O, properties: E };
2662
2709
  }
2663
2710
  return { categoryId: a, categoryName: "", properties: [] };
2664
2711
  }
2665
- function g(a, p, v, y, C) {
2666
- const k = a.type, E = e(a), S = {};
2667
- let M = C || i[k];
2668
- if (M && Object.keys(M).length === 0 && v && v.getPropConfig && (M = v.getPropConfig(y)), M && M.categories) {
2669
- const V = [];
2670
- return Object.keys(M.categories).map((O) => {
2671
- const F = M.categories[O];
2672
- if (F.$ref) {
2673
- V.push(d(O, F, a, p, y));
2712
+ function g(a, p, v, y, w) {
2713
+ const T = a.type, V = e(a), M = {};
2714
+ let k = w || i[T];
2715
+ if (k && Object.keys(k).length === 0 && v && v.getPropConfig && (k = v.getPropConfig(y)), k && k.categories) {
2716
+ const N = [];
2717
+ return Object.keys(k.categories).map((L) => {
2718
+ const b = k.categories[L];
2719
+ if (b.$ref) {
2720
+ N.push(d(L, b, a, p, y));
2674
2721
  return;
2675
2722
  }
2676
- const N = F == null ? void 0 : F.title, R = F == null ? void 0 : F.tabId, w = F == null ? void 0 : F.tabName, T = F == null ? void 0 : F.hide, B = F == null ? void 0 : F.hideTitle, L = f(F.properties || {}, S, E, a, p, y, F.$converter), { setPropertyRelates: P } = F, j = F == null ? void 0 : F.parentPropertyID;
2677
- V.push({ categoryId: O, categoryName: N, tabId: R, tabName: w, hide: T, properties: L, hideTitle: B, setPropertyRelates: P, parentPropertyID: j });
2678
- }), V;
2723
+ const S = b == null ? void 0 : b.title, O = b == null ? void 0 : b.tabId, F = b == null ? void 0 : b.tabName, E = b == null ? void 0 : b.hide, B = b == null ? void 0 : b.hideTitle, R = f(b.properties || {}, M, V, a, p, y, b.$converter), { setPropertyRelates: P } = b, A = b == null ? void 0 : b.parentPropertyID;
2724
+ N.push({ categoryId: L, categoryName: S, tabId: O, tabName: F, hide: E, properties: R, hideTitle: B, setPropertyRelates: P, parentPropertyID: A });
2725
+ }), N;
2679
2726
  }
2680
2727
  return [];
2681
2728
  }
@@ -2685,91 +2732,97 @@ function Fe(i, t, e) {
2685
2732
  propertyConverterMap: n
2686
2733
  };
2687
2734
  }
2688
- const we = {}, Ie = {};
2689
- Fe(we, Ie, Tt);
2690
- const Ee = {}, Se = {}, { resolveSchemaWithDefaultValue: ti } = ye(Ee, Se), xe = {}, Me = {};
2691
- Fe(xe, Me, ti);
2692
- function ii(i, t, e = /* @__PURE__ */ new Map(), n = (l, m, c, u) => m, r = {}, s = (l) => l) {
2693
- return be[t.title] = t, Ce[t.title] = n, we[t.title] = r, Ie[t.title] = s, Ee[t.title] = t, Se[t.title] = n, xe[t.title] = r, Me[t.title] = s, (l = {}, m = !0) => {
2735
+ const Ie = {}, Ee = {};
2736
+ we(Ie, Ee, Pt);
2737
+ const Se = {}, xe = {}, { resolveSchemaWithDefaultValue: ni } = be(Se, xe), Me = {}, Te = {};
2738
+ we(Me, Te, ni);
2739
+ function ri(i, t, e = /* @__PURE__ */ new Map(), n = (s, m, c, u) => m, r = {}, l = (s) => s) {
2740
+ return Ce[t.title] = t, Fe[t.title] = n, Ie[t.title] = r, Ee[t.title] = l, Se[t.title] = t, xe[t.title] = n, Me[t.title] = r, Te[t.title] = l, (s = {}, m = !0) => {
2694
2741
  if (!m)
2695
- return Vt(l, e);
2696
- const c = kt(l, t, e), u = Object.keys(i).reduce((f, o) => (f[o] = i[o].default, f), {});
2742
+ return Bt(s, e);
2743
+ const c = Vt(s, t, e), u = Object.keys(i).reduce((f, o) => (f[o] = i[o].default, f), {});
2697
2744
  return Object.assign(u, c);
2698
2745
  };
2699
2746
  }
2700
- const Te = Object.assign({}, H, {
2747
+ const ke = Object.assign({}, ee, {
2701
2748
  componentId: { type: String, default: "" }
2702
- }), ni = ii(Te, me, fe, pe), ri = /* @__PURE__ */ z({
2749
+ }), oi = ri(ke, ge, pe, me), li = /* @__PURE__ */ D({
2703
2750
  name: "FFilterBarDesign",
2704
- props: Te,
2751
+ props: ke,
2705
2752
  emits: ["Clear", "Remove", "Reset"],
2706
2753
  setup(i, t) {
2707
- const e = I(!1), n = I(!1), r = I(!1), s = I(null), l = I(null), m = yt(i), {
2754
+ const e = I(!1), n = I(!1), r = I(!1), l = I(null), s = I(null), m = Ct(i), {
2708
2755
  filterFields: c,
2709
2756
  filterItems: u,
2710
2757
  loadFilterItems: f
2711
- } = m, o = I(), d = Q("design-item-context"), g = Q("designer-host-service"), a = Mt(d, g), p = We(o, d, a), v = ve(l, s, r), {
2712
- setupWidthObserver: y
2713
- } = v, {
2714
- resolveEditorProps: C
2715
- } = ue();
2716
- oe("useFilterItemsComposition", {
2758
+ } = m, o = I(0), d = I(), g = Q("design-item-context"), a = Q("designer-host-service"), p = kt(g, a), v = ze(d, g, p), y = he(s, l, r), {
2759
+ setupWidthObserver: w
2760
+ } = y, {
2761
+ resolveEditorProps: T
2762
+ } = fe();
2763
+ se("useFilterItemsComposition", {
2717
2764
  useFilterItemsComposition: m,
2718
- resolveEditorProps: C
2765
+ resolveEditorProps: T
2719
2766
  });
2720
- const k = U(() => ({
2721
- display: c.value && c.value.length ? "" : "none"
2722
- }));
2723
- le(() => {
2724
- o.value.componentInstance = p, y();
2725
- }), t.expose(p.value), se([() => i.fields], ([w]) => {
2726
- f(w, []);
2767
+ const V = U(() => {
2768
+ const E = {
2769
+ display: c.value && c.value.length ? "" : "none"
2770
+ };
2771
+ return de(E, i == null ? void 0 : i.customStyle);
2772
+ });
2773
+ H(() => {
2774
+ d.value.componentInstance = v, w();
2775
+ }), t.expose(v.value), ae(() => i.fields, (E) => {
2776
+ f(E, []), o.value++;
2777
+ }, {
2778
+ immediate: !0
2727
2779
  });
2728
- const E = U(() => n.value && e.value), S = U(() => ({
2780
+ const M = U(() => n.value && e.value), k = U(() => ({
2729
2781
  "f-filter-list": !0,
2730
- "f-filter-list-extend": E.value
2731
- })), M = U(() => u.value.length > 0);
2732
- function V() {
2733
- return b("div", {
2734
- class: S.value,
2735
- ref: s
2736
- }, [u.value.map((w, T) => b(Ct, {
2737
- filterItem: w
2782
+ "f-filter-list-extend": M.value
2783
+ })), N = U(() => u.value.length > 0);
2784
+ function L() {
2785
+ return C("div", {
2786
+ class: k.value,
2787
+ ref: l
2788
+ }, [u.value.map((E, B) => C(wt, {
2789
+ filterItem: E
2738
2790
  }, null))]);
2739
2791
  }
2740
- const O = U(() => !n.value && r.value);
2741
- function F() {
2742
- return b("div", {
2792
+ const b = U(() => !n.value && r.value);
2793
+ function S() {
2794
+ return C("div", {
2743
2795
  class: "f-filter-list-ellipsis"
2744
- }, [q("...")]);
2796
+ }, [W("...")]);
2745
2797
  }
2746
- const N = U(() => !n.value), R = bt(i, t, m);
2747
- return () => b("div", {
2748
- ref: o,
2749
- class: "f-filter-wrapper",
2750
- style: k.value
2751
- }, [b("div", {
2798
+ const O = U(() => !n.value), F = Ft(i, t, m);
2799
+ return () => C("div", {
2800
+ ref: d,
2801
+ class: "f-filter-wrapper " + i.customClass,
2802
+ style: V.value
2803
+ }, [C("div", {
2752
2804
  class: "f-filter-wrapper-inner f-utils-fill"
2753
- }, [b("div", {
2805
+ }, [C("div", {
2754
2806
  class: "f-filter-main f-utils-fill",
2755
- ref: l
2756
- }, [b("div", {
2757
- class: "f-filter-list-wrapper"
2758
- }, [M.value && V()]), O.value && F(), N.value && R()])])]);
2807
+ ref: s
2808
+ }, [C("div", {
2809
+ class: "f-filter-list-wrapper",
2810
+ key: i.id + "-main-" + o.value
2811
+ }, [N.value && L()]), b.value && S(), O.value && F()])])]);
2759
2812
  }
2760
2813
  });
2761
2814
  G.install = (i) => {
2762
2815
  i.component(G.name, G);
2763
2816
  };
2764
2817
  G.register = (i, t, e, n) => {
2765
- i["filter-bar"] = G, t["filter-bar"] = at;
2818
+ i["filter-bar"] = G, t["filter-bar"] = ct;
2766
2819
  };
2767
2820
  G.registerDesigner = (i, t, e) => {
2768
- i["filter-bar"] = ri, t["filter-bar"] = ni;
2821
+ i["filter-bar"] = li, t["filter-bar"] = oi;
2769
2822
  };
2770
2823
  export {
2771
2824
  G as FFilterBar,
2772
2825
  G as default,
2773
- H as filterBarProps,
2774
- at as propsResolver
2826
+ ee as filterBarProps,
2827
+ ct as propsResolver
2775
2828
  };