@farris/ui-vue 1.6.5-beta.7 → 1.6.5

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 (192) hide show
  1. package/components/accordion/index.esm.js +65 -65
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +360 -361
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +524 -520
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +134 -134
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +192 -192
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/code-editor/index.esm.js +8 -8
  12. package/components/code-editor/index.umd.cjs +3 -3
  13. package/components/collection-property-editor/index.esm.js +72 -72
  14. package/components/collection-property-editor/index.umd.cjs +1 -1
  15. package/components/color-picker/index.esm.js +291 -289
  16. package/components/color-picker/index.umd.cjs +1 -1
  17. package/components/combo-list/index.esm.js +190 -181
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +113 -112
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +3 -1
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +309 -309
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.esm.js +1125 -1124
  26. package/components/condition/index.umd.cjs +1 -1
  27. package/components/content-container/index.esm.js +472 -472
  28. package/components/content-container/index.umd.cjs +1 -1
  29. package/components/data-grid/index.esm.js +99 -99
  30. package/components/data-grid/index.umd.cjs +1 -1
  31. package/components/data-view/index.esm.js +3387 -3321
  32. package/components/data-view/index.umd.cjs +1 -1
  33. package/components/date-picker/index.esm.js +1604 -1601
  34. package/components/date-picker/index.umd.cjs +1 -1
  35. package/components/designer-canvas/index.esm.js +1082 -1079
  36. package/components/designer-canvas/index.umd.cjs +1 -1
  37. package/components/discussion-editor/index.esm.js +973 -1040
  38. package/components/discussion-editor/index.umd.cjs +6 -6
  39. package/components/dropdown/index.esm.js +335 -330
  40. package/components/dropdown/index.umd.cjs +2 -2
  41. package/components/dynamic-form/index.esm.js +177 -177
  42. package/components/dynamic-form/index.umd.cjs +1 -1
  43. package/components/dynamic-resolver/index.esm.js +6 -6
  44. package/components/dynamic-resolver/index.umd.cjs +1 -1
  45. package/components/dynamic-view/index.esm.js +344 -344
  46. package/components/dynamic-view/index.umd.cjs +1 -1
  47. package/components/events-editor/index.esm.js +644 -644
  48. package/components/events-editor/index.umd.cjs +3 -3
  49. package/components/expression-editor/index.esm.js +1773 -1760
  50. package/components/expression-editor/index.umd.cjs +4 -4
  51. package/components/fieldset/index.esm.js +55 -55
  52. package/components/fieldset/index.umd.cjs +1 -1
  53. package/components/filter-bar/index.esm.js +879 -869
  54. package/components/filter-bar/index.umd.cjs +1 -1
  55. package/components/filter-condition-editor/index.esm.js +1091 -1077
  56. package/components/filter-condition-editor/index.umd.cjs +3 -3
  57. package/components/flow-canvas/index.esm.js +215 -215
  58. package/components/flow-canvas/index.umd.cjs +1 -1
  59. package/components/html-template/index.esm.js +164 -164
  60. package/components/html-template/index.umd.cjs +1 -1
  61. package/components/image-cropper/index.esm.js +198 -198
  62. package/components/image-cropper/index.umd.cjs +1 -1
  63. package/components/json-editor/index.esm.js +64 -64
  64. package/components/json-editor/index.umd.cjs +1 -1
  65. package/components/language-textbox/index.esm.js +140 -140
  66. package/components/language-textbox/index.umd.cjs +1 -1
  67. package/components/layout/index.esm.js +111 -111
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +90 -90
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.esm.js +139 -141
  72. package/components/list-view/index.umd.cjs +3 -3
  73. package/components/locale/index.esm.js +833 -901
  74. package/components/locale/index.umd.cjs +6 -6
  75. package/components/lookup/index.esm.js +1352 -1351
  76. package/components/lookup/index.umd.cjs +1 -1
  77. package/components/mapping-editor/index.esm.js +1387 -1383
  78. package/components/mapping-editor/index.umd.cjs +1 -1
  79. package/components/menu-lookup/index.esm.js +1059 -1127
  80. package/components/menu-lookup/index.umd.cjs +6 -6
  81. package/components/message-box/index.esm.js +217 -217
  82. package/components/message-box/index.umd.cjs +1 -1
  83. package/components/modal/index.esm.js +283 -283
  84. package/components/modal/index.umd.cjs +1 -1
  85. package/components/nav/index.esm.js +106 -106
  86. package/components/nav/index.umd.cjs +1 -1
  87. package/components/number-range/index.esm.js +194 -194
  88. package/components/number-range/index.umd.cjs +1 -1
  89. package/components/number-spinner/index.esm.js +463 -462
  90. package/components/number-spinner/index.umd.cjs +1 -1
  91. package/components/order/index.esm.js +883 -876
  92. package/components/order/index.umd.cjs +4 -4
  93. package/components/page-footer/index.esm.js +94 -94
  94. package/components/page-footer/index.umd.cjs +1 -1
  95. package/components/page-header/index.esm.js +942 -939
  96. package/components/page-header/index.umd.cjs +1 -1
  97. package/components/pagination/index.esm.js +82 -82
  98. package/components/pagination/index.umd.cjs +1 -1
  99. package/components/popover/index.esm.js +59 -57
  100. package/components/popover/index.umd.cjs +1 -1
  101. package/components/progress/index.esm.js +113 -113
  102. package/components/progress/index.umd.cjs +2 -2
  103. package/components/property-editor/index.esm.js +151 -150
  104. package/components/property-editor/index.umd.cjs +1 -1
  105. package/components/property-panel/index.esm.js +739 -739
  106. package/components/property-panel/index.umd.cjs +2 -2
  107. package/components/query-solution/index.esm.js +4142 -4190
  108. package/components/query-solution/index.umd.cjs +6 -6
  109. package/components/radio-button/index.esm.js +182 -182
  110. package/components/radio-button/index.umd.cjs +1 -1
  111. package/components/rate/index.esm.js +106 -106
  112. package/components/rate/index.umd.cjs +1 -1
  113. package/components/response-layout/index.esm.js +535 -535
  114. package/components/response-layout/index.umd.cjs +1 -1
  115. package/components/response-layout-editor/index.esm.js +1456 -1443
  116. package/components/response-layout-editor/index.umd.cjs +1 -1
  117. package/components/response-toolbar/index.esm.js +779 -776
  118. package/components/response-toolbar/index.umd.cjs +1 -1
  119. package/components/schema-selector/index.esm.js +1875 -1866
  120. package/components/schema-selector/index.umd.cjs +7 -7
  121. package/components/search-box/index.esm.js +151 -147
  122. package/components/search-box/index.umd.cjs +1 -1
  123. package/components/section/index.esm.js +1236 -1233
  124. package/components/section/index.umd.cjs +1 -1
  125. package/components/smoke-detector/index.esm.js +163 -163
  126. package/components/smoke-detector/index.umd.cjs +1 -1
  127. package/components/sort-condition-editor/index.esm.js +1097 -1083
  128. package/components/sort-condition-editor/index.umd.cjs +3 -3
  129. package/components/splitter/index.esm.js +3 -3
  130. package/components/splitter/index.umd.cjs +1 -1
  131. package/components/step/index.esm.js +133 -133
  132. package/components/step/index.umd.cjs +1 -1
  133. package/components/switch/index.esm.js +103 -98
  134. package/components/switch/index.umd.cjs +1 -1
  135. package/components/tabs/index.esm.js +1596 -1593
  136. package/components/tabs/index.umd.cjs +2 -2
  137. package/components/tags/index.esm.js +93 -93
  138. package/components/tags/index.umd.cjs +1 -1
  139. package/components/text/index.esm.js +138 -138
  140. package/components/text/index.umd.cjs +1 -1
  141. package/components/textarea/index.esm.js +684 -684
  142. package/components/textarea/index.umd.cjs +2 -2
  143. package/components/time-picker/index.esm.js +935 -929
  144. package/components/time-picker/index.umd.cjs +1 -1
  145. package/components/tooltip/index.esm.js +173 -171
  146. package/components/tooltip/index.umd.cjs +1 -1
  147. package/components/transfer/index.esm.js +190 -192
  148. package/components/transfer/index.umd.cjs +4 -4
  149. package/components/tree-grid/index.esm.js +124 -124
  150. package/components/tree-grid/index.umd.cjs +1 -1
  151. package/components/tree-view/index.esm.js +2363 -2278
  152. package/components/tree-view/index.umd.cjs +1 -1
  153. package/components/uploader/index.esm.js +170 -170
  154. package/components/uploader/index.umd.cjs +2 -2
  155. package/components/verify-detail/index.esm.js +196 -196
  156. package/components/verify-detail/index.umd.cjs +1 -1
  157. package/components/video/index.esm.js +227 -227
  158. package/components/video/index.umd.cjs +1 -1
  159. package/components/weather/index.esm.js +9 -9
  160. package/components/weather/index.umd.cjs +2 -2
  161. package/designer/button-edit/index.esm.js +353 -353
  162. package/designer/button-edit/index.umd.cjs +1 -1
  163. package/designer/checkbox/index.esm.js +7 -3
  164. package/designer/checkbox/index.umd.cjs +1 -1
  165. package/designer/checkbox-group/index.esm.js +38 -33
  166. package/designer/checkbox-group/index.umd.cjs +1 -1
  167. package/designer/data-grid/index.esm.js +3562 -3536
  168. package/designer/data-grid/index.umd.cjs +6 -6
  169. package/designer/data-view/index.esm.js +3 -3
  170. package/designer/data-view/index.umd.cjs +3 -3
  171. package/designer/farris-designer.all.esm.js +4203 -4193
  172. package/designer/farris-designer.all.umd.cjs +9 -9
  173. package/designer/input-group/index.esm.js +97 -97
  174. package/designer/input-group/index.umd.cjs +1 -1
  175. package/designer/list-view/index.esm.js +1868 -1854
  176. package/designer/list-view/index.umd.cjs +8 -8
  177. package/designer/radio-group/index.esm.js +954 -949
  178. package/designer/radio-group/index.umd.cjs +1 -1
  179. package/farris.all.esm.js +16195 -16126
  180. package/farris.all.umd.cjs +30 -30
  181. package/locales/data-grid/ui/en.json +2 -2
  182. package/locales/designer/en.json +7 -6
  183. package/locales/designer/zh-CHS.json +2 -1
  184. package/locales/designer/zh-CHT.json +2 -1
  185. package/locales/ui/en.json +7 -6
  186. package/locales/ui/zh-CHS.json +2 -1
  187. package/locales/ui/zh-CHT.json +2 -1
  188. package/package.json +1 -1
  189. package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
  190. package/types/data-view/composition/types.d.ts +10 -4
  191. package/types/lookup/src/composition/use-dialog.d.ts +2 -0
  192. package/types/lookup/src/composition/use-input-change.d.ts +1 -0
@@ -1,42 +1,42 @@
1
- import { ref as _, computed as le, defineComponent as Z, createVNode as W, inject as ue, onMounted as fe } from "vue";
2
- import { isPlainObject as Q, cloneDeep as X } from "lodash-es";
3
- import { getSchemaByTypeForDesigner as pe } from "../dynamic-resolver/index.esm.js";
4
- function C(e, t) {
1
+ import { ref as _, computed as le, defineComponent as Y, createVNode as W, inject as ue, onMounted as pe } from "vue";
2
+ import { cloneDeep as J, isPlainObject as Q } from "lodash-es";
3
+ import { getSchemaByTypeForDesigner as fe } from "../dynamic-resolver/index.esm.js";
4
+ function Z(e, t) {
5
5
  let r;
6
6
  function c(i) {
7
- const { properties: a, title: p, ignore: o } = i, n = o && Array.isArray(o), l = Object.keys(a).reduce((v, S) => ((!n || !o.find((k) => k === S)) && (v[S] = a[S].type === "object" && a[S].properties ? c(a[S]) : X(a[S].default)), v), {});
8
- if (p && (!n || !o.find((v) => v === "id"))) {
9
- const v = p.toLowerCase().replace(/-/g, "_");
7
+ const { properties: a, title: f, ignore: o } = i, n = o && Array.isArray(o), l = Object.keys(a).reduce((v, S) => ((!n || !o.find((D) => D === S)) && (v[S] = a[S].type === "object" && a[S].properties ? c(a[S]) : J(a[S].default)), v), {});
8
+ if (f && (!n || !o.find((v) => v === "id"))) {
9
+ const v = f.toLowerCase().replace(/-/g, "_");
10
10
  l.id = `${v}_${Math.random().toString().slice(2, 6)}`;
11
11
  }
12
12
  return l;
13
13
  }
14
14
  function y(i) {
15
- const { properties: a, title: p, required: o } = i;
15
+ const { properties: a, title: f, required: o } = i;
16
16
  if (o && Array.isArray(o)) {
17
- const n = o.reduce((l, v) => (l[v] = a[v].type === "object" && a[v].properties ? c(a[v]) : X(a[v].default), l), {});
18
- if (p && o.find((l) => l === "id")) {
19
- const l = p.toLowerCase().replace(/-/g, "_");
17
+ const n = o.reduce((l, v) => (l[v] = a[v].type === "object" && a[v].properties ? c(a[v]) : J(a[v].default), l), {});
18
+ if (f && o.find((l) => l === "id")) {
19
+ const l = f.toLowerCase().replace(/-/g, "_");
20
20
  n.id = `${l}_${Math.random().toString().slice(2, 6)}`;
21
21
  }
22
22
  return n;
23
23
  }
24
24
  return {
25
- type: p
25
+ type: f
26
26
  };
27
27
  }
28
- function M(i, a = {}, p) {
28
+ function M(i, a = {}, f) {
29
29
  const o = e[i];
30
30
  if (o) {
31
31
  let n = y(o);
32
32
  const l = t[i];
33
- return n = l ? l({ getSchemaByType: M }, n, a, p) : n, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(n), n;
33
+ return n = l ? l({ getSchemaByType: M }, n, a, f) : n, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(n), n;
34
34
  }
35
35
  return null;
36
36
  }
37
- function F(i, a) {
38
- const p = c(a);
39
- return Object.keys(p).reduce((o, n) => (Object.prototype.hasOwnProperty.call(i, n) && (o[n] && Q(o[n]) && Q(i[n] || !i[n]) ? Object.assign(o[n], i[n] || {}) : o[n] = i[n]), o), p), p;
37
+ function P(i, a) {
38
+ const f = c(a);
39
+ return Object.keys(f).reduce((o, n) => (Object.prototype.hasOwnProperty.call(i, n) && (o[n] && Q(o[n]) && Q(i[n] || !i[n]) ? Object.assign(o[n], i[n] || {}) : o[n] = i[n]), o), f), f;
40
40
  }
41
41
  function E(i, a) {
42
42
  return Object.keys(i).filter((o) => i[o] != null).reduce((o, n) => {
@@ -53,20 +53,20 @@ function C(e, t) {
53
53
  return o;
54
54
  }, {});
55
55
  }
56
- function B(i, a, p = /* @__PURE__ */ new Map()) {
57
- const o = F(i, a);
58
- return E(o, p);
56
+ function $(i, a, f = /* @__PURE__ */ new Map()) {
57
+ const o = P(i, a);
58
+ return E(o, f);
59
59
  }
60
- function f(i) {
61
- var p;
60
+ function p(i) {
61
+ var f;
62
62
  const a = i.type;
63
63
  if (a) {
64
64
  const o = e[a];
65
65
  if (!o)
66
66
  return i;
67
- const n = F(i, o), l = ((p = i.editor) == null ? void 0 : p.type) || "";
67
+ const n = P(i, o), l = ((f = i.editor) == null ? void 0 : f.type) || "";
68
68
  if (l) {
69
- const v = e[l], S = F(i.editor, v);
69
+ const v = e[l], S = P(i.editor, v);
70
70
  n.editor = S;
71
71
  }
72
72
  return n;
@@ -76,62 +76,62 @@ function C(e, t) {
76
76
  function b(i) {
77
77
  r = i;
78
78
  }
79
- return { getSchemaByType: M, resolveSchemaWithDefaultValue: f, resolveSchemaToProps: B, mappingSchemaToProps: E, setDesignerContext: b };
79
+ return { getSchemaByType: M, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: $, mappingSchemaToProps: E, setDesignerContext: b };
80
80
  }
81
- const V = {}, H = {}, { resolveSchemaWithDefaultValue: me, resolveSchemaToProps: ve, mappingSchemaToProps: de } = C(V, H);
81
+ const V = {}, H = {}, { getSchemaByType: at, resolveSchemaWithDefaultValue: me, resolveSchemaToProps: ve, mappingSchemaToProps: de, setDesignerContext: st } = Z(V, H);
82
82
  function be(e = {}) {
83
- function t(f, b, i, a) {
83
+ function t(p, b, i, a) {
84
84
  if (typeof i == "number")
85
- return a[f].length === i;
85
+ return a[p].length === i;
86
86
  if (typeof i == "object") {
87
- const p = Object.keys(i)[0], o = i[p];
88
- if (p === "not")
89
- return Number(a[f].length) !== Number(o);
90
- if (p === "moreThan")
91
- return Number(a[f].length) >= Number(o);
92
- if (p === "lessThan")
93
- return Number(a[f].length) <= Number(o);
87
+ const f = Object.keys(i)[0], o = i[f];
88
+ if (f === "not")
89
+ return Number(a[p].length) !== Number(o);
90
+ if (f === "moreThan")
91
+ return Number(a[p].length) >= Number(o);
92
+ if (f === "lessThan")
93
+ return Number(a[p].length) <= Number(o);
94
94
  }
95
95
  return !1;
96
96
  }
97
- function r(f, b, i, a) {
98
- return a[f] && a[f].propertyValue && String(a[f].propertyValue.value) === String(i);
97
+ function r(p, b, i, a) {
98
+ return a[p] && a[p].propertyValue && String(a[p].propertyValue.value) === String(i);
99
99
  }
100
100
  const c = /* @__PURE__ */ new Map([
101
101
  ["length", t],
102
102
  ["getProperty", r]
103
103
  ]);
104
- Object.keys(e).reduce((f, b) => (f.set(b, e[b]), f), c);
105
- function y(f, b) {
106
- const i = f;
107
- return typeof b == "number" ? [{ target: i, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: i, operator: "getProperty", param: f, value: !!b }] : typeof b == "object" ? Object.keys(b).map((a) => {
104
+ Object.keys(e).reduce((p, b) => (p.set(b, e[b]), p), c);
105
+ function y(p, b) {
106
+ const i = p;
107
+ return typeof b == "number" ? [{ target: i, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: i, operator: "getProperty", param: p, value: !!b }] : typeof b == "object" ? Object.keys(b).map((a) => {
108
108
  if (a === "length")
109
109
  return { target: i, operator: "length", param: null, value: b[a] };
110
- const p = a, o = b[a];
111
- return { target: i, operator: "getProperty", param: p, value: o };
110
+ const f = a, o = b[a];
111
+ return { target: i, operator: "getProperty", param: f, value: o };
112
112
  }) : [];
113
113
  }
114
- function M(f) {
115
- return Object.keys(f).reduce((i, a) => {
116
- const p = y(a, f[a]);
117
- return i.push(...p), i;
114
+ function M(p) {
115
+ return Object.keys(p).reduce((i, a) => {
116
+ const f = y(a, p[a]);
117
+ return i.push(...f), i;
118
118
  }, []);
119
119
  }
120
- function F(f, b) {
121
- if (c.has(f.operator)) {
122
- const i = c.get(f.operator);
123
- return i && i(f.target, f.param, f.value, b) || !1;
120
+ function P(p, b) {
121
+ if (c.has(p.operator)) {
122
+ const i = c.get(p.operator);
123
+ return i && i(p.target, p.param, p.value, b) || !1;
124
124
  }
125
125
  return !1;
126
126
  }
127
- function E(f, b) {
128
- return M(f).reduce((p, o) => p && F(o, b), !0);
127
+ function E(p, b) {
128
+ return M(p).reduce((f, o) => f && P(o, b), !0);
129
129
  }
130
- function B(f, b) {
131
- const i = Object.keys(f), a = i.includes("allOf"), p = i.includes("anyOf"), o = a || p, v = (o ? f[o ? a ? "allOf" : "anyOf" : "allOf"] : [f]).map((k) => E(k, b));
130
+ function $(p, b) {
131
+ const i = Object.keys(p), a = i.includes("allOf"), f = i.includes("anyOf"), o = a || f, v = (o ? p[o ? a ? "allOf" : "anyOf" : "allOf"] : [p]).map((D) => E(D, b));
132
132
  return a ? !v.includes(!1) : v.includes(!0);
133
133
  }
134
- return { parseValueSchema: B };
134
+ return { parseValueSchema: $ };
135
135
  }
136
136
  const ge = {
137
137
  convertTo: (e, t, r, c) => {
@@ -203,7 +203,7 @@ const ge = {
203
203
  e[t] = e[t];
204
204
  },
205
205
  convertFrom: (e, t, r) => e.editor ? r.getRealEditorType(e.editor.type) : ""
206
- }, Fe = {
206
+ }, Pe = {
207
207
  convertTo: (e, t, r, c) => {
208
208
  (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = r : e.formatter = {
209
209
  [t]: r
@@ -234,7 +234,7 @@ const ge = {
234
234
  }
235
235
  return "none";
236
236
  }
237
- }, Pe = {
237
+ }, Fe = {
238
238
  convertTo: (e, t, r, c) => {
239
239
  e.command ? e.command[t] = r : e.command = {
240
240
  [t]: r
@@ -252,7 +252,7 @@ const ge = {
252
252
  ]));
253
253
  },
254
254
  convertFrom: (e, t, r) => e.command && t === "enable" ? e.command.enable : ""
255
- }, ke = {
255
+ }, De = {
256
256
  convertTo: (e, t, r, c) => {
257
257
  e.column ? e.column[t] = r : e.column = {
258
258
  [t]: r
@@ -267,7 +267,7 @@ const ge = {
267
267
  }
268
268
  return "";
269
269
  }
270
- }, we = {
270
+ }, ke = {
271
271
  convertTo: (e, t, r, c) => {
272
272
  e.summary ? e.summary[t] = r : e.summary = {
273
273
  [t]: r
@@ -277,7 +277,7 @@ const ge = {
277
277
  });
278
278
  },
279
279
  convertFrom: (e, t, r) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
280
- }, De = {
280
+ }, we = {
281
281
  convertTo: (e, t, r, c) => {
282
282
  e.group ? e.group[t] = r : e.group = {
283
283
  [t]: r
@@ -313,7 +313,7 @@ const ge = {
313
313
  e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = r;
314
314
  },
315
315
  convertFrom: (e, t, r) => e.rowNumber ? e.rowNumber[t] : e[t]
316
- }, je = {
316
+ }, Be = {
317
317
  convertTo: (e, t, r, c) => {
318
318
  e.selection || (e.selection = {}), e.selection[t] = r;
319
319
  },
@@ -321,19 +321,19 @@ const ge = {
321
321
  var c, y;
322
322
  return t === "showCheckbox" ? (c = e.selection) != null && c.multiSelect ? !0 : (y = e.selection) == null ? void 0 : y.showCheckbox : e.selection ? e.selection[t] : e[t];
323
323
  }
324
- }, Ne = {
324
+ }, je = {
325
325
  convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
326
- }, Re = {
326
+ }, Ne = {
327
327
  convertFrom: (e, t) => e[t] || "",
328
328
  convertTo: (e, t, r) => {
329
329
  e[t] = r;
330
330
  }
331
- }, Be = {
331
+ }, $e = {
332
332
  convertTo: (e, t, r, c) => {
333
333
  e.size || (e.size = {}), e.size[t] = r;
334
334
  },
335
335
  convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
336
- }, $e = {
336
+ }, Re = {
337
337
  convertFrom: (e, t, r) => {
338
338
  var c, y;
339
339
  return (c = e.formatter) != null && c.data && t === "formatterEnumData" && !e.formatterEnumData ? (y = e.formatter) == null ? void 0 : y.data : e.formatterEnumData;
@@ -379,21 +379,21 @@ function K(e, t, r) {
379
379
  ["/converter/appearance.converter", ge],
380
380
  ["/converter/buttons.converter", ye],
381
381
  ["/converter/property-editor.converter", Se],
382
- ["/converter/items-count.converter", Ne],
382
+ ["/converter/items-count.converter", je],
383
383
  ["/converter/type.converter", he],
384
384
  ["/converter/change-editor.converter", Te],
385
- ["/converter/change-formatter.converter", Fe],
386
- ["/converter/column-command.converter", Pe],
387
- ["/converter/column-option.converter", ke],
388
- ["/converter/summary.converter", we],
389
- ["/converter/group.converter", De],
390
- ["/converter/form-group-label.converter", Re],
385
+ ["/converter/change-formatter.converter", Pe],
386
+ ["/converter/column-command.converter", Fe],
387
+ ["/converter/column-option.converter", De],
388
+ ["/converter/summary.converter", ke],
389
+ ["/converter/group.converter", we],
390
+ ["/converter/form-group-label.converter", Ne],
391
391
  ["/converter/field-selector.converter", Oe],
392
392
  ["/converter/pagination.converter", Me],
393
393
  ["/converter/row-number.converter", Ee],
394
- ["/converter/grid-selection.converter", je],
395
- ["/converter/size.converter", Be],
396
- ["/converter/change-formatter-enum.converter", $e],
394
+ ["/converter/grid-selection.converter", Be],
395
+ ["/converter/size.converter", $e],
396
+ ["/converter/change-formatter-enum.converter", Re],
397
397
  ["/converter/grid-sort.converter", Ae],
398
398
  ["/converter/grid-filter.converter", qe],
399
399
  ["/converter/row-option.converter", ze]
@@ -422,94 +422,94 @@ function K(e, t, r) {
422
422
  ["number", { type: "number-spinner", placeholder: "" }],
423
423
  ["events-editor", { type: "events-editor", hide: !0 }]
424
424
  ]), M = be();
425
- function F(o, n) {
425
+ function P(o, n) {
426
426
  return () => M.parseValueSchema(o, n);
427
427
  }
428
428
  function E(o, n, l) {
429
- return o.includes("visible") && n.visible !== void 0 ? typeof n.visible == "boolean" ? () => !!n.visible : n.visible === void 0 ? !0 : F(n.visible, l) : () => !0;
429
+ return o.includes("visible") && n.visible !== void 0 ? typeof n.visible == "boolean" ? () => !!n.visible : n.visible === void 0 ? !0 : P(n.visible, l) : () => !0;
430
430
  }
431
- function B(o, n, l) {
432
- return o.includes("readonly") && n.readonly !== void 0 ? typeof n.readonly == "boolean" ? () => !!n.readonly : F(n.readonly, l) : () => !1;
431
+ function $(o, n, l) {
432
+ return o.includes("readonly") && n.readonly !== void 0 ? typeof n.readonly == "boolean" ? () => !!n.readonly : P(n.readonly, l) : () => !1;
433
433
  }
434
- function f(o, n) {
434
+ function p(o, n) {
435
435
  const l = o.$converter || n;
436
436
  return typeof l == "string" && l && c.has(l) ? c.get(l) || null : l || null;
437
437
  }
438
- function b(o, n, l, v, S, k = "", j = "") {
438
+ function b(o, n, l, v, S, D = "", B = "") {
439
439
  return Object.keys(o).map((h) => {
440
- const N = _(1), R = h, u = o[h], w = Object.keys(u), q = u.title, s = u.type, d = y.get(s) || { type: "input-group", enableClear: !1 }, m = u.editor ? Object.assign({}, d, u.editor) : Object.assign({}, d), g = E(w, u, n), T = B(w, u, n);
440
+ const j = _(1), N = h, u = o[h], k = Object.keys(u), q = u.title, s = u.type, d = y.get(s) || { type: "input-group", enableClear: !1 }, m = u.editor ? Object.assign({}, d, u.editor) : Object.assign({}, d), g = E(k, u, n), T = $(k, u, n);
441
441
  m.readonly = m.readonly === void 0 ? T() : m.readonly;
442
- const O = u.type === "cascade" ? b(u.properties, n, l, v, S, k, j) : [], z = !0;
443
- let P = f(u, j);
444
- const $ = le({
442
+ const O = u.type === "cascade" ? b(u.properties, n, l, v, S, D, B) : [], z = !0;
443
+ let F = p(u, B);
444
+ const R = le({
445
445
  get() {
446
- if (N.value) {
447
- if (["class", "style"].find((se) => se === R) && !P && (P = c.get("/converter/appearance.converter") || null), P && P.convertFrom)
448
- return P.convertFrom(l, h, S, k);
446
+ if (j.value) {
447
+ if (["class", "style"].find((se) => se === N) && !F && (F = c.get("/converter/appearance.converter") || null), F && F.convertFrom)
448
+ return F.convertFrom(l, h, S, D);
449
449
  const A = l[h];
450
450
  return Object.prototype.hasOwnProperty.call(u, "defaultValue") && (A === void 0 || typeof A == "string" && A === "") ? u.type === "boolean" ? u.defaultValue : u.defaultValue || "" : A;
451
451
  }
452
452
  return null;
453
453
  },
454
454
  set(A) {
455
- N.value += 1, P && P.convertTo ? (P.convertTo(v, h, A, S, k), P.convertTo(l, h, A, S, k)) : (v[h] = A, l[h] = A);
455
+ j.value += 1, F && F.convertTo ? (F.convertTo(v, h, A, S, D), F.convertTo(l, h, A, S, D)) : (v[h] = A, l[h] = A);
456
456
  }
457
- }), { refreshPanelAfterChanged: L, description: ie, isExpand: ce, parentPropertyID: ae } = u, J = { propertyID: R, propertyName: q, propertyType: s, propertyValue: $, editor: m, visible: g, readonly: T, cascadeConfig: O, hideCascadeTitle: z, refreshPanelAfterChanged: L, description: ie, isExpand: ce, parentPropertyID: ae };
458
- return n[R] = J, J;
457
+ }), { refreshPanelAfterChanged: L, description: ie, isExpand: ce, parentPropertyID: ae } = u, C = { propertyID: N, propertyName: q, propertyType: s, propertyValue: R, editor: m, visible: g, readonly: T, cascadeConfig: O, hideCascadeTitle: z, refreshPanelAfterChanged: L, description: ie, isExpand: ce, parentPropertyID: ae };
458
+ return n[N] = C, C;
459
459
  });
460
460
  }
461
461
  function i(o, n, l = {}) {
462
462
  const v = {}, S = e[o];
463
- return S && S.categories ? Object.keys(S.categories).map((j) => {
464
- const D = S.categories[j], h = D == null ? void 0 : D.title, N = b(D.properties || {}, v, {}, l, n);
465
- return { categoryId: j, categoryName: h, properties: N };
463
+ return S && S.categories ? Object.keys(S.categories).map((B) => {
464
+ const w = S.categories[B], h = w == null ? void 0 : w.title, j = b(w.properties || {}, v, {}, l, n);
465
+ return { categoryId: B, categoryName: h, properties: j };
466
466
  }) : [];
467
467
  }
468
468
  function a(o, n, l, v, S = "") {
469
- const k = n.$ref.schema, j = n.$ref.converter, D = l[k], h = D.type, N = r(D), R = {}, u = e[h];
469
+ const D = n.$ref.schema, B = n.$ref.converter, w = l[D], h = w.type, j = r(w), N = {}, u = e[h];
470
470
  if (u && u.categories) {
471
- const w = u.categories[o], q = w == null ? void 0 : w.title;
472
- j && Object.keys(w.properties).forEach((m) => {
473
- w.properties[m].$converter = j;
471
+ const k = u.categories[o], q = k == null ? void 0 : k.title;
472
+ B && Object.keys(k.properties).forEach((m) => {
473
+ k.properties[m].$converter = B;
474
474
  });
475
- const s = (w == null ? void 0 : w.properties) || {}, d = b(s, R, N, D, v, S);
475
+ const s = (k == null ? void 0 : k.properties) || {}, d = b(s, N, j, w, v, S);
476
476
  return { categoryId: o, categoryName: q, properties: d };
477
477
  }
478
478
  return { categoryId: o, categoryName: "", properties: [] };
479
479
  }
480
- function p(o, n, l, v, S) {
481
- const k = o.type, j = r(o), D = {};
482
- let h = S || e[k];
480
+ function f(o, n, l, v, S) {
481
+ const D = o.type, B = r(o), w = {};
482
+ let h = S || e[D];
483
483
  if (h && Object.keys(h).length === 0 && l && l.getPropConfig && (h = l.getPropConfig(v)), h && h.categories) {
484
- const N = [];
485
- return Object.keys(h.categories).map((R) => {
486
- const u = h.categories[R];
484
+ const j = [];
485
+ return Object.keys(h.categories).map((N) => {
486
+ const u = h.categories[N];
487
487
  if (u.$ref) {
488
- N.push(a(R, u, o, n, v));
488
+ j.push(a(N, u, o, n, v));
489
489
  return;
490
490
  }
491
- const w = u == null ? void 0 : u.title, q = u == null ? void 0 : u.tabId, s = u == null ? void 0 : u.tabName, d = u == null ? void 0 : u.hide, m = u == null ? void 0 : u.hideTitle, g = b(u.properties || {}, D, j, o, n, v, u.$converter), { setPropertyRelates: T } = u, O = u == null ? void 0 : u.parentPropertyID;
492
- N.push({ categoryId: R, categoryName: w, tabId: q, tabName: s, hide: d, properties: g, hideTitle: m, setPropertyRelates: T, parentPropertyID: O });
493
- }), N;
491
+ const k = u == null ? void 0 : u.title, q = u == null ? void 0 : u.tabId, s = u == null ? void 0 : u.tabName, d = u == null ? void 0 : u.hide, m = u == null ? void 0 : u.hideTitle, g = b(u.properties || {}, w, B, o, n, v, u.$converter), { setPropertyRelates: T } = u, O = u == null ? void 0 : u.parentPropertyID;
492
+ j.push({ categoryId: N, categoryName: k, tabId: q, tabName: s, hide: d, properties: g, hideTitle: m, setPropertyRelates: T, parentPropertyID: O });
493
+ }), j;
494
494
  }
495
495
  return [];
496
496
  }
497
497
  return {
498
- getPropertyConfigBySchema: p,
498
+ getPropertyConfigBySchema: f,
499
499
  getPropertyConfigByType: i,
500
500
  propertyConverterMap: c
501
501
  };
502
502
  }
503
503
  const I = {}, ee = {};
504
504
  K(I, ee, me);
505
- const te = {}, re = {}, { resolveSchemaWithDefaultValue: Le } = C(te, re), oe = {}, ne = {};
505
+ const te = {}, re = {}, { getSchemaByType: lt, resolveSchemaWithDefaultValue: Le, resolveSchemaToProps: ut, mappingSchemaToProps: pt, setDesignerContext: ft } = Z(te, re), oe = {}, ne = {};
506
506
  K(oe, ne, Le);
507
- function _e(e, t, r = /* @__PURE__ */ new Map(), c = (F, E, B, f) => E, y = {}, M = (F) => F) {
508
- return V[t.title] = t, H[t.title] = c, I[t.title] = y, ee[t.title] = M, te[t.title] = t, re[t.title] = c, oe[t.title] = y, ne[t.title] = M, (F = {}, E = !0) => {
507
+ function _e(e, t, r = /* @__PURE__ */ new Map(), c = (P, E, $, p) => E, y = {}, M = (P) => P) {
508
+ return V[t.title] = t, H[t.title] = c, I[t.title] = y, ee[t.title] = M, te[t.title] = t, re[t.title] = c, oe[t.title] = y, ne[t.title] = M, (P = {}, E = !0) => {
509
509
  if (!E)
510
- return de(F, r);
511
- const B = ve(F, t, r), f = Object.keys(e).reduce((b, i) => (b[i] = e[i].default, b), {});
512
- return Object.assign(f, B);
510
+ return de(P, r);
511
+ const $ = ve(P, t, r), p = Object.keys(e).reduce((b, i) => (b[i] = e[i].default, b), {});
512
+ return Object.assign(p, $);
513
513
  };
514
514
  }
515
515
  function We(e, t) {
@@ -521,7 +521,7 @@ const Ge = /* @__PURE__ */ new Map([
521
521
  function Ue(e, t, r) {
522
522
  return t;
523
523
  }
524
- const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-design.gitee.io/smoke-detector.schema.json", Xe = "smoke-detector", Ye = "A Farris Component", Ze = "object", Ce = {
524
+ const Ce = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-design.gitee.io/smoke-detector.schema.json", Qe = "smoke-detector", Xe = "A Farris Component", Ye = "object", Ze = {
525
525
  id: {
526
526
  description: "The unique identifier for smoke-detector",
527
527
  type: "string"
@@ -574,12 +574,12 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
574
574
  "id",
575
575
  "type"
576
576
  ], He = {
577
- $schema: Je,
578
- $id: Qe,
579
- title: Xe,
580
- description: Ye,
581
- type: Ze,
582
- properties: Ce,
577
+ $schema: Ce,
578
+ $id: Je,
579
+ title: Qe,
580
+ description: Xe,
581
+ type: Ye,
582
+ properties: Ze,
583
583
  required: Ve
584
584
  }, xe = "smoke-detector", Ke = "A Farris Component", Ie = "object", et = {
585
585
  basic: {
@@ -661,7 +661,7 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
661
661
  description: Ke,
662
662
  type: Ie,
663
663
  categories: et
664
- }, U = {}, Y = _e(U, He, Ge, Ue, tt), G = /* @__PURE__ */ Z({
664
+ }, U = {}, X = _e(U, He, Ge, Ue, tt), G = /* @__PURE__ */ Y({
665
665
  name: "FSmokeDetector",
666
666
  props: U,
667
667
  emits: [""],
@@ -677,14 +677,14 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
677
677
  function rt(e, t, r) {
678
678
  var q;
679
679
  const c = "", y = "", M = _();
680
- let F;
680
+ let P;
681
681
  function E() {
682
682
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
683
683
  }
684
- function B() {
684
+ function $() {
685
685
  return !1;
686
686
  }
687
- function f() {
687
+ function p() {
688
688
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
689
689
  }
690
690
  function b() {
@@ -706,8 +706,8 @@ function rt(e, t, r) {
706
706
  const { getCustomButtons: g } = d.value;
707
707
  return d.value.canMove || g && ((T = g()) != null && T.length) ? m : a(s.parent);
708
708
  }
709
- function p(s) {
710
- return !1;
709
+ function f(s) {
710
+ return !!r;
711
711
  }
712
712
  function o() {
713
713
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
@@ -720,15 +720,15 @@ function rt(e, t, r) {
720
720
  }
721
721
  function v(s, d) {
722
722
  const { componentType: m } = s;
723
- let g = pe(m, s, d);
723
+ let g = fe(m, s, d);
724
724
  const T = m.toLowerCase().replace(/-/g, "_");
725
725
  return g && !g.id && g.type === m && (g.id = `${T}_${Math.random().toString().slice(2, 6)}`), g;
726
726
  }
727
727
  function S(s) {
728
728
  }
729
- function k(...s) {
729
+ function D(...s) {
730
730
  }
731
- function j(s) {
731
+ function B(s) {
732
732
  if (!s)
733
733
  return;
734
734
  const d = t == null ? void 0 : t.schema, { formSchemaUtils: m } = s;
@@ -737,14 +737,14 @@ function rt(e, t, r) {
737
737
  g > -1 && m.getExpressions().splice(g, 1);
738
738
  }
739
739
  }
740
- function D(s) {
740
+ function w(s) {
741
741
  if (!s || !(t != null && t.schema))
742
742
  return;
743
743
  const d = t.schema, { formSchemaUtils: m } = s;
744
744
  m.removeCommunicationInComponent(d);
745
745
  }
746
746
  function h(s) {
747
- j(s), D(s), t != null && t.schema.contents && t.schema.contents.map((d) => {
747
+ B(s), w(s), t != null && t.schema.contents && t.schema.contents.map((d) => {
748
748
  let m = d.id;
749
749
  d.type === "component-ref" && (m = d.component);
750
750
  const g = e.value.querySelectorAll(`#${m}-design-item`);
@@ -754,19 +754,19 @@ function rt(e, t, r) {
754
754
  });
755
755
  });
756
756
  }
757
- function N() {
757
+ function j() {
758
758
  }
759
- function R(s) {
759
+ function N(s) {
760
760
  var m, g;
761
761
  if (!((m = t == null ? void 0 : t.schema) != null && m.id))
762
762
  return;
763
- !F && s && (F = s.formSchemaUtils);
763
+ !P && s && (P = s.formSchemaUtils);
764
764
  let d = "";
765
765
  {
766
- const { text: T, title: O, label: z, mainTitle: P, name: $, type: L } = t.schema;
767
- d = T || O || z || P || $ || ((g = x[L]) == null ? void 0 : g.name);
766
+ const { text: T, title: O, label: z, mainTitle: F, name: R, type: L } = t.schema;
767
+ d = T || O || z || F || R || ((g = x[L]) == null ? void 0 : g.name);
768
768
  }
769
- d && F.getControlBasicInfoMap().set(t.schema.id, {
769
+ d && P.getControlBasicInfoMap().set(t.schema.id, {
770
770
  componentTitle: d,
771
771
  parentPathName: d
772
772
  });
@@ -774,24 +774,24 @@ function rt(e, t, r) {
774
774
  function u(s) {
775
775
  var T;
776
776
  const { changeObject: d } = s, { propertyID: m, propertyValue: g } = d;
777
- if (["text", "title", "label", "name", "mainTitle"].includes((T = s == null ? void 0 : s.changeObject) == null ? void 0 : T.propertyID) && m && g && (R(), F)) {
778
- const O = F.getControlBasicInfoMap(), z = O.keys().toArray().filter((P) => {
779
- var $, L;
780
- return (($ = O.get(P)) == null ? void 0 : $.reliedComponentId) === ((L = t == null ? void 0 : t.schema) == null ? void 0 : L.id);
777
+ if (["text", "title", "label", "name", "mainTitle"].includes((T = s == null ? void 0 : s.changeObject) == null ? void 0 : T.propertyID) && m && g && (N(), P)) {
778
+ const O = P.getControlBasicInfoMap(), z = O.keys().toArray().filter((F) => {
779
+ var R, L;
780
+ return ((R = O.get(F)) == null ? void 0 : R.reliedComponentId) === ((L = t == null ? void 0 : t.schema) == null ? void 0 : L.id);
781
781
  });
782
- z != null && z.length && z.forEach((P) => {
783
- const $ = O.get(P).parentPathName.split(" > ");
784
- $[0] = g, O.get(P).parentPathName = $.join(" > ");
782
+ z != null && z.length && z.forEach((F) => {
783
+ const R = O.get(F).parentPathName.split(" > ");
784
+ R[0] = g, O.get(F).parentPathName = R.join(" > ");
785
785
  });
786
786
  }
787
787
  }
788
- function w(s) {
788
+ function k(s) {
789
789
  u(s);
790
790
  }
791
791
  return M.value = {
792
792
  canMove: E(),
793
- canSelectParent: B(),
794
- canDelete: f(),
793
+ canSelectParent: $(),
794
+ canDelete: p(),
795
795
  canNested: !b(),
796
796
  contents: t == null ? void 0 : t.schema.contents,
797
797
  elementRef: e,
@@ -799,11 +799,11 @@ function rt(e, t, r) {
799
799
  schema: t == null ? void 0 : t.schema,
800
800
  styles: c,
801
801
  designerClass: y,
802
- canAccepts: p,
802
+ canAccepts: f,
803
803
  getBelongedComponentInstance: i,
804
804
  getDraggableDesignItemElement: a,
805
805
  getDraggingDisplayText: o,
806
- getPropConfig: k,
806
+ getPropConfig: D,
807
807
  getDragScopeElement: n,
808
808
  onAcceptMovedChildElement: l,
809
809
  onChildElementMovedOut: S,
@@ -811,19 +811,19 @@ function rt(e, t, r) {
811
811
  triggerBelongedComponentToMoveWhenMoved: _(!1),
812
812
  triggerBelongedComponentToDeleteWhenDeleted: _(!1),
813
813
  onRemoveComponent: h,
814
- getCustomButtons: N,
815
- onPropertyChanged: w,
816
- setComponentBasicInfoMap: R,
814
+ getCustomButtons: j,
815
+ onPropertyChanged: k,
816
+ setComponentBasicInfoMap: N,
817
817
  updateContextSchema: t == null ? void 0 : t.updateContextSchema
818
818
  }, M;
819
819
  }
820
- const ot = /* @__PURE__ */ Z({
820
+ const ot = /* @__PURE__ */ Y({
821
821
  name: "FSmokeDetectorDesign",
822
822
  props: U,
823
823
  emits: [""],
824
824
  setup(e, t) {
825
825
  const r = _(), c = ue("design-item-context"), y = rt(r, c);
826
- return fe(() => {
826
+ return pe(() => {
827
827
  r.value.componentInstance = y;
828
828
  }), t.expose(y.value), () => W("div", {
829
829
  ref: r,
@@ -833,20 +833,20 @@ const ot = /* @__PURE__ */ Z({
833
833
  src: "../image/smoke-detector-2.png"
834
834
  }, null)]);
835
835
  }
836
- }), at = {
836
+ }), mt = {
837
837
  install(e) {
838
838
  e.component(G.name, G);
839
839
  },
840
840
  register(e, t, r, c) {
841
- e["smoke-detector"] = G, t["smoke-detector"] = Y;
841
+ e["smoke-detector"] = G, t["smoke-detector"] = X;
842
842
  },
843
843
  registerDesigner(e, t, r) {
844
- e["smoke-detector"] = ot, t["smoke-detector"] = Y;
844
+ e["smoke-detector"] = ot, t["smoke-detector"] = X;
845
845
  }
846
846
  };
847
847
  export {
848
848
  G as SmokeDetector,
849
- at as default,
850
- Y as propsResolver,
849
+ mt as default,
850
+ X as propsResolver,
851
851
  U as smokeDetectorProps
852
852
  };