@farris/ui-vue 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/components/accordion/index.esm.js +1 -1
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +472 -366
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +1 -1
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +472 -480
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +225 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +615 -517
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +325 -333
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +578 -472
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +49 -49
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/common/index.esm.js +832 -722
  20. package/components/common/index.umd.cjs +1 -1
  21. package/components/component/index.esm.js +303 -981
  22. package/components/component/index.umd.cjs +1 -1
  23. package/components/condition/index.esm.js +8 -8
  24. package/components/condition/index.umd.cjs +1 -1
  25. package/components/content-container/index.esm.js +335 -1002
  26. package/components/content-container/index.umd.cjs +1 -1
  27. package/components/data-grid/index.esm.js +4429 -4312
  28. package/components/data-grid/index.umd.cjs +1 -1
  29. package/components/data-view/index.esm.js +3037 -3020
  30. package/components/data-view/index.umd.cjs +1 -1
  31. package/components/date-picker/index.esm.js +2216 -2119
  32. package/components/date-picker/index.umd.cjs +1 -1
  33. package/components/designer-canvas/index.css +1 -1
  34. package/components/designer-canvas/index.esm.js +914 -883
  35. package/components/designer-canvas/index.umd.cjs +1 -1
  36. package/components/dropdown/index.esm.js +223 -231
  37. package/components/dropdown/index.umd.cjs +2 -2
  38. package/components/dynamic-form/index.esm.js +1691 -2187
  39. package/components/dynamic-form/index.umd.cjs +1 -1
  40. package/components/dynamic-resolver/index.esm.js +143 -136
  41. package/components/dynamic-resolver/index.umd.cjs +1 -1
  42. package/components/events-editor/index.esm.js +250 -258
  43. package/components/events-editor/index.umd.cjs +1 -1
  44. package/components/expression-editor/index.esm.js +1 -1
  45. package/components/expression-editor/index.umd.cjs +1 -1
  46. package/components/external-container/index.esm.js +2672 -3438
  47. package/components/external-container/index.umd.cjs +1 -1
  48. package/components/field-selector/index.esm.js +2965 -2970
  49. package/components/field-selector/index.umd.cjs +1 -1
  50. package/components/filter-bar/index.esm.js +1650 -1602
  51. package/components/filter-bar/index.umd.cjs +1 -1
  52. package/components/flow-canvas/index.css +1 -1
  53. package/components/flow-canvas/index.esm.js +684 -675
  54. package/components/flow-canvas/index.umd.cjs +1 -1
  55. package/components/image-cropper/index.esm.js +453 -461
  56. package/components/image-cropper/index.umd.cjs +1 -1
  57. package/components/input-group/index.esm.js +604 -507
  58. package/components/input-group/index.umd.cjs +1 -1
  59. package/components/layout/index.esm.js +402 -378
  60. package/components/layout/index.umd.cjs +1 -1
  61. package/components/list-nav/index.esm.js +348 -1019
  62. package/components/list-nav/index.umd.cjs +1 -1
  63. package/components/list-view/index.esm.js +1658 -1666
  64. package/components/list-view/index.umd.cjs +1 -1
  65. package/components/lookup/index.esm.js +5209 -5088
  66. package/components/lookup/index.umd.cjs +1 -1
  67. package/components/mapping-editor/index.esm.js +4329 -4213
  68. package/components/mapping-editor/index.umd.cjs +1 -1
  69. package/components/nav/index.esm.js +905 -1357
  70. package/components/nav/index.umd.cjs +3 -3
  71. package/components/number-range/index.esm.js +517 -420
  72. package/components/number-range/index.umd.cjs +1 -1
  73. package/components/number-spinner/index.esm.js +588 -491
  74. package/components/number-spinner/index.umd.cjs +1 -1
  75. package/components/order/index.esm.js +1376 -1965
  76. package/components/order/index.umd.cjs +1 -1
  77. package/components/page-footer/index.esm.js +1 -1
  78. package/components/page-footer/index.umd.cjs +1 -1
  79. package/components/page-header/index.esm.js +1073 -1905
  80. package/components/page-header/index.umd.cjs +1 -1
  81. package/components/pagination/index.esm.js +809 -1237
  82. package/components/pagination/index.umd.cjs +1 -1
  83. package/components/progress/index.esm.js +198 -206
  84. package/components/progress/index.umd.cjs +3 -3
  85. package/components/property-editor/index.esm.js +1297 -1200
  86. package/components/property-editor/index.umd.cjs +2 -2
  87. package/components/property-panel/index.esm.js +609 -507
  88. package/components/property-panel/index.umd.cjs +1 -1
  89. package/components/query-solution/index.esm.js +3391 -3758
  90. package/components/query-solution/index.umd.cjs +1 -1
  91. package/components/radio-button/index.esm.js +1 -1
  92. package/components/radio-button/index.umd.cjs +1 -1
  93. package/components/radio-group/index.esm.js +544 -447
  94. package/components/radio-group/index.umd.cjs +1 -1
  95. package/components/rate/index.esm.js +247 -255
  96. package/components/rate/index.umd.cjs +1 -1
  97. package/components/response-layout/index.esm.js +146 -154
  98. package/components/response-layout/index.umd.cjs +1 -1
  99. package/components/response-layout-editor/index.esm.js +700 -675
  100. package/components/response-layout-editor/index.umd.cjs +1 -1
  101. package/components/response-toolbar/index.esm.js +956 -1786
  102. package/components/response-toolbar/index.umd.cjs +1 -1
  103. package/components/schema-selector/index.esm.js +4963 -5617
  104. package/components/schema-selector/index.umd.cjs +2 -2
  105. package/components/search-box/index.esm.js +158 -161
  106. package/components/search-box/index.umd.cjs +1 -1
  107. package/components/section/index.esm.js +436 -1124
  108. package/components/section/index.umd.cjs +1 -1
  109. package/components/smoke-detector/index.esm.js +92 -100
  110. package/components/smoke-detector/index.umd.cjs +1 -1
  111. package/components/splitter/index.esm.js +571 -1210
  112. package/components/splitter/index.umd.cjs +1 -1
  113. package/components/splitter/style.js +2 -0
  114. package/components/step/index.esm.js +239 -247
  115. package/components/step/index.umd.cjs +1 -1
  116. package/components/switch/index.esm.js +445 -348
  117. package/components/switch/index.umd.cjs +1 -1
  118. package/components/tabs/index.esm.js +2278 -3031
  119. package/components/tabs/index.umd.cjs +1 -1
  120. package/components/tags/index.esm.js +311 -319
  121. package/components/tags/index.umd.cjs +1 -1
  122. package/components/text/index.esm.js +215 -223
  123. package/components/text/index.umd.cjs +1 -1
  124. package/components/textarea/index.esm.js +468 -371
  125. package/components/textarea/index.umd.cjs +1 -1
  126. package/components/time-picker/index.esm.js +1271 -1174
  127. package/components/time-picker/index.umd.cjs +1 -1
  128. package/components/transfer/index.esm.js +469 -477
  129. package/components/transfer/index.umd.cjs +1 -1
  130. package/components/tree-grid/index.esm.js +3060 -3065
  131. package/components/tree-grid/index.umd.cjs +1 -1
  132. package/components/tree-view/index.esm.js +2476 -2481
  133. package/components/tree-view/index.umd.cjs +1 -1
  134. package/components/uploader/index.esm.js +374 -382
  135. package/components/uploader/index.umd.cjs +2 -2
  136. package/components/verify-detail/index.esm.js +248 -256
  137. package/components/verify-detail/index.umd.cjs +1 -1
  138. package/components/video/index.esm.js +414 -1093
  139. package/components/video/index.umd.cjs +1 -1
  140. package/components/weather/index.esm.js +498 -506
  141. package/components/weather/index.umd.cjs +5 -5
  142. package/farris.all.esm.js +20216 -21844
  143. package/farris.all.umd.cjs +9 -9
  144. package/index.css +1 -1
  145. package/package.json +1 -1
  146. package/types/common/directive/area-response.d.ts +10 -0
  147. package/types/common/index.d.ts +8 -0
  148. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  149. package/types/common/utils/resolve-field.d.ts +2 -0
  150. package/types/common/utils/use-class.d.ts +7 -0
  151. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  152. package/types/condition/src/types.d.ts +2 -1
  153. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  154. package/types/data-grid/index.d.ts +8 -5
  155. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  156. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  157. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  158. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  159. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  160. package/types/data-view/composition/types.d.ts +7 -9
  161. package/types/designer-canvas/index.d.ts +2 -1
  162. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  163. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  164. package/types/designer-canvas/src/composition/types.d.ts +1 -2
  165. package/types/designer-canvas/src/types.d.ts +2 -1
  166. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  167. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  168. package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
  169. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  170. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  171. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  172. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  173. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  174. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  175. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  176. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  177. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  178. package/types/property-panel/index.d.ts +2 -1
  179. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  180. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  181. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  182. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  183. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  184. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  185. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  186. package/types/query-solution/src/solutions.d.ts +108 -509
  187. package/types/response-layout-editor/index.d.ts +3 -1
  188. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  189. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  190. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  191. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  192. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  193. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  194. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  195. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  196. package/types/tree-grid/index.d.ts +3 -3
  197. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  198. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  199. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  200. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  201. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
@@ -1,5 +1,5 @@
1
- import { defineComponent as F, ref as y, watch as D, computed as S, onMounted as P, createVNode as w, nextTick as T, inject as Q } from "vue";
2
- import { isPlainObject as q, cloneDeep as U } from "lodash-es";
1
+ import { defineComponent as N, ref as m, watch as D, computed as V, onMounted as P, createVNode as M, nextTick as T, inject as Q } from "vue";
2
+ import { isPlainObject as L, cloneDeep as U } from "lodash-es";
3
3
  import { withInstall as X } from "../common/index.esm.js";
4
4
  const Y = "https://json-schema.org/draft/2020-12/schema", Z = "https://farris-design.gitee.io/capsule.schema.json", I = "capsule", K = "A Farris Component", x = "object", ee = {
5
5
  id: {
@@ -74,103 +74,103 @@ const Y = "https://json-schema.org/draft/2020-12/schema", Z = "https://farris-de
74
74
  type: x,
75
75
  properties: ee,
76
76
  required: te
77
- }, _ = {}, J = {};
78
- function W(n) {
79
- const { properties: e, title: u, ignore: l } = n, s = l && Array.isArray(l), o = Object.keys(e).reduce((i, g) => ((!s || !l.find((j) => j == g)) && (i[g] = e[g].type === "object" && e[g].properties ? W(e[g]) : U(e[g].default)), i), {});
80
- return (!s || !l.find((i) => i == "id")) && (o.id = `${u}-${Date.now()}`), o;
77
+ }, q = {}, _ = {};
78
+ function F(n) {
79
+ const { properties: e, title: r, ignore: a } = n, s = a && Array.isArray(a), o = Object.keys(e).reduce((p, h) => ((!s || !a.find((O) => O == h)) && (p[h] = e[h].type === "object" && e[h].properties ? F(e[h]) : U(e[h].default)), p), {});
80
+ return r && (!s || !a.find((p) => p == "id")) && (o.id = `${r}-${Date.now()}`), o;
81
81
  }
82
- function N(n, e = {}, u) {
83
- const l = _[n];
84
- if (l) {
85
- let s = W(l);
86
- const o = J[n];
87
- return s = o ? o({ getSchemaByType: N }, s, e, u) : s, s;
82
+ function z(n, e = {}, r) {
83
+ const a = q[n];
84
+ if (a) {
85
+ let s = F(a);
86
+ const o = _[n];
87
+ return s = o ? o({ getSchemaByType: z }, s, e, r) : s, s;
88
88
  }
89
89
  return null;
90
90
  }
91
91
  function ae(n, e) {
92
- const u = W(e);
93
- return Object.keys(n).reduce((l, s) => (l[s] && q(l[s]) && q(n[s]) ? Object.assign(l[s], n[s]) : l[s] = n[s], l), u), u;
92
+ const r = F(e);
93
+ return Object.keys(n).reduce((a, s) => (a[s] && L(a[s]) && L(n[s]) ? Object.assign(a[s], n[s]) : a[s] = n[s], a), r), r;
94
94
  }
95
95
  function le(n, e) {
96
- return Object.keys(n).filter((l) => n[l] != null).reduce((l, s) => {
96
+ return Object.keys(n).filter((a) => n[a] != null).reduce((a, s) => {
97
97
  if (e.has(s)) {
98
98
  const o = e.get(s);
99
99
  if (typeof o == "string")
100
- l[o] = n[s];
100
+ a[o] = n[s];
101
101
  else {
102
- const i = o(s, n[s], n);
103
- Object.assign(l, i);
102
+ const p = o(s, n[s], n);
103
+ Object.assign(a, p);
104
104
  }
105
105
  } else
106
- l[s] = n[s];
107
- return l;
106
+ a[s] = n[s];
107
+ return a;
108
108
  }, {});
109
109
  }
110
- function se(n, e, u = /* @__PURE__ */ new Map()) {
111
- const l = ae(n, e);
112
- return le(l, u);
110
+ function se(n, e, r = /* @__PURE__ */ new Map()) {
111
+ const a = ae(n, e);
112
+ return le(a, r);
113
113
  }
114
114
  function ce(n = {}) {
115
- function e(r, f, p, d) {
116
- if (typeof p == "number")
117
- return d[r].length === p;
118
- if (typeof p == "object") {
119
- const h = Object.keys(p)[0], b = p[h];
120
- if (h === "not")
121
- return Number(d[r].length) !== Number(b);
122
- if (h === "moreThan")
123
- return Number(d[r].length) >= Number(b);
124
- if (h === "lessThan")
125
- return Number(d[r].length) <= Number(b);
115
+ function e(c, f, i, d) {
116
+ if (typeof i == "number")
117
+ return d[c].length === i;
118
+ if (typeof i == "object") {
119
+ const y = Object.keys(i)[0], g = i[y];
120
+ if (y === "not")
121
+ return Number(d[c].length) !== Number(g);
122
+ if (y === "moreThan")
123
+ return Number(d[c].length) >= Number(g);
124
+ if (y === "lessThan")
125
+ return Number(d[c].length) <= Number(g);
126
126
  }
127
127
  return !1;
128
128
  }
129
- function u(r, f, p, d) {
130
- return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(p);
129
+ function r(c, f, i, d) {
130
+ return d[c] && d[c].propertyValue && String(d[c].propertyValue.value) === String(i);
131
131
  }
132
- const l = /* @__PURE__ */ new Map([
132
+ const a = /* @__PURE__ */ new Map([
133
133
  ["length", e],
134
- ["getProperty", u]
134
+ ["getProperty", r]
135
135
  ]);
136
- Object.keys(n).reduce((r, f) => (r.set(f, n[f]), r), l);
137
- function s(r, f) {
138
- const p = r;
139
- return typeof f == "number" ? [{ target: p, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: p, operator: "getProperty", param: r, value: !!f }] : typeof f == "object" ? Object.keys(f).map((d) => {
136
+ Object.keys(n).reduce((c, f) => (c.set(f, n[f]), c), a);
137
+ function s(c, f) {
138
+ const i = c;
139
+ return typeof f == "number" ? [{ target: i, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: i, operator: "getProperty", param: c, value: !!f }] : typeof f == "object" ? Object.keys(f).map((d) => {
140
140
  if (d === "length")
141
- return { target: p, operator: "length", param: null, value: f[d] };
142
- const h = d, b = f[d];
143
- return { target: p, operator: "getProperty", param: h, value: b };
141
+ return { target: i, operator: "length", param: null, value: f[d] };
142
+ const y = d, g = f[d];
143
+ return { target: i, operator: "getProperty", param: y, value: g };
144
144
  }) : [];
145
145
  }
146
- function o(r) {
147
- return Object.keys(r).reduce((p, d) => {
148
- const h = s(d, r[d]);
149
- return p.push(...h), p;
146
+ function o(c) {
147
+ return Object.keys(c).reduce((i, d) => {
148
+ const y = s(d, c[d]);
149
+ return i.push(...y), i;
150
150
  }, []);
151
151
  }
152
- function i(r, f) {
153
- if (l.has(r.operator)) {
154
- const p = l.get(r.operator);
155
- return p && p(r.target, r.param, r.value, f) || !1;
152
+ function p(c, f) {
153
+ if (a.has(c.operator)) {
154
+ const i = a.get(c.operator);
155
+ return i && i(c.target, c.param, c.value, f) || !1;
156
156
  }
157
157
  return !1;
158
158
  }
159
- function g(r, f) {
160
- return o(r).reduce((h, b) => h && i(b, f), !0);
159
+ function h(c, f) {
160
+ return o(c).reduce((y, g) => y && p(g, f), !0);
161
161
  }
162
- function j(r, f) {
163
- const p = Object.keys(r), d = p.includes("allOf"), h = p.includes("anyOf"), b = d || h, V = (b ? r[b ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((C) => g(C, f));
164
- return d ? !V.includes(!1) : V.includes(!0);
162
+ function O(c, f) {
163
+ const i = Object.keys(c), d = i.includes("allOf"), y = i.includes("anyOf"), g = d || y, S = (g ? c[g ? d ? "allOf" : "anyOf" : "allOf"] : [c]).map((E) => h(E, f));
164
+ return d ? !S.includes(!1) : S.includes(!0);
165
165
  }
166
- return { parseValueSchema: j };
166
+ return { parseValueSchema: O };
167
167
  }
168
- const re = {}, ue = {};
168
+ const ue = {}, re = {};
169
169
  ce();
170
- function oe(n, e, u = /* @__PURE__ */ new Map(), l = (i, g, j) => g, s = {}, o = (i) => i) {
171
- return _[e.title] = e, J[e.title] = l, re[e.title] = s, ue[e.title] = o, (i = {}) => {
172
- const g = se(i, e, u), j = Object.keys(n).reduce((r, f) => (r[f] = n[f].default, r), {});
173
- return Object.assign(j, g);
170
+ function oe(n, e, r = /* @__PURE__ */ new Map(), a = (p, h, O) => h, s = {}, o = (p) => p) {
171
+ return q[e.title] = e, _[e.title] = a, ue[e.title] = s, re[e.title] = o, (p = {}) => {
172
+ const h = se(p, e, r), O = Object.keys(n).reduce((c, f) => (c[f] = n[f].default, c), {});
173
+ return Object.assign(O, h);
174
174
  };
175
175
  }
176
176
  function ie(n, e) {
@@ -179,7 +179,7 @@ function ie(n, e) {
179
179
  const pe = /* @__PURE__ */ new Map([
180
180
  ["appearance", ie]
181
181
  ]);
182
- function fe(n, e, u) {
182
+ function fe(n, e, r) {
183
183
  return e;
184
184
  }
185
185
  const de = "capsule", ve = "A Farris Component", me = "object", ye = {
@@ -209,7 +209,7 @@ const de = "capsule", ve = "A Farris Component", me = "object", ye = {
209
209
  description: ve,
210
210
  type: me,
211
211
  categories: ye
212
- }, L = {
212
+ }, W = {
213
213
  items: {
214
214
  Type: Array,
215
215
  default: [
@@ -230,292 +230,284 @@ const de = "capsule", ve = "A Farris Component", me = "object", ye = {
230
230
  index: { type: Number, default: 0 },
231
231
  show: { type: Boolean, default: !0 },
232
232
  disabled: { type: Boolean, default: !1 }
233
- }, z = oe(L, ne, pe, fe, he), G = /* @__PURE__ */ F({
233
+ }, G = oe(W, ne, pe, fe, he), H = /* @__PURE__ */ N({
234
234
  name: "FCapsuleItem",
235
235
  props: ge,
236
236
  emits: ["mounted", "active"],
237
237
  setup(n, e) {
238
- const u = y(), l = y(n.isActive);
239
- D(() => n.isActive, (i) => {
240
- l.value = i;
238
+ const r = m(), a = m(n.isActive);
239
+ D(() => n.isActive, (p) => {
240
+ a.value = p;
241
241
  });
242
- const s = S(() => ({
242
+ const s = V(() => ({
243
243
  "f-capsule-item": !0,
244
- "f-capsule-active-item": l.value,
244
+ "f-capsule-active-item": a.value,
245
245
  "f-capsule-disabled": n.disabled
246
246
  }));
247
247
  P(() => {
248
- e.emit("mounted", u, n.value);
248
+ e.emit("mounted", r, n.value);
249
249
  });
250
- function o(i) {
251
- n.disabled || e.emit("active", i, {
250
+ function o(p) {
251
+ n.disabled || e.emit("active", p, {
252
252
  name: n.name,
253
253
  value: n.value
254
254
  });
255
255
  }
256
- return () => w("div", {
257
- ref: u,
256
+ return () => M("div", {
257
+ ref: r,
258
258
  class: s.value,
259
- onClick: (i) => o(i)
260
- }, [n.icon && w("i", {
259
+ onClick: (p) => o(p)
260
+ }, [n.icon && M("i", {
261
261
  class: n.icon
262
262
  }, null), n.name]);
263
263
  }
264
- }), k = /* @__PURE__ */ F({
264
+ }), k = /* @__PURE__ */ N({
265
265
  name: "FCapsule",
266
- props: L,
266
+ props: W,
267
267
  emits: ["change", "update:modelValue"],
268
268
  setup(n, e) {
269
- const u = y(n.items), l = y(), s = 2, o = y(n.modelValue), i = y("none"), g = y(n.type), j = S(() => {
270
- const a = {
269
+ const r = m(n.items), a = m(), s = 2, o = m(n.modelValue), p = m("none"), h = m(n.type), O = V(() => {
270
+ const l = {
271
271
  "f-capsule-container": !0
272
272
  };
273
- return g.value && (a[g.value] = !0), a;
274
- }), r = S(() => ({})), f = S(() => ({
273
+ return h.value && (l[h.value] = !0), l;
274
+ }), c = V(() => ({})), f = V(() => ({
275
275
  "f-capsule": !0
276
- })), p = y(s), d = y(0), h = y(0), b = S(() => ({
277
- left: `${p.value}px`,
276
+ })), i = m(s), d = m(0), y = m(0), g = V(() => ({
277
+ left: `${i.value}px`,
278
278
  width: `${d.value}px`,
279
- transition: i.value
280
- })), R = S(() => ({
281
- width: `${h.value}px`
279
+ transition: p.value
280
+ })), B = V(() => ({
281
+ width: `${y.value}px`
282
282
  })), A = /* @__PURE__ */ new Map();
283
- function V(a) {
283
+ function S(l) {
284
284
  var t;
285
- if (A.has(a.value)) {
286
- const c = (t = A.get(a.value)) == null ? void 0 : t.value;
287
- if (c) {
288
- const m = c.getBoundingClientRect(), B = l.value.getBoundingClientRect();
289
- p.value = m.left - B.left + s + l.value.scrollLeft, d.value = m.width - 2 * s;
285
+ if (A.has(l.value)) {
286
+ const u = (t = A.get(l.value)) == null ? void 0 : t.value;
287
+ if (u) {
288
+ const b = u.getBoundingClientRect(), $ = a.value.getBoundingClientRect();
289
+ i.value = b.left - $.left + s + a.value.scrollLeft, d.value = b.width - 2 * s;
290
290
  }
291
291
  }
292
292
  }
293
- function M(a, t) {
294
- const c = a.value;
295
- o.value = c, e.emit("update:modelValue", c), V(a), t && e.emit("change", c);
293
+ function R(l, t) {
294
+ const u = l.value;
295
+ o.value = u, e.emit("update:modelValue", u), S(l), t && e.emit("change", u);
296
296
  }
297
- function C(a) {
298
- const t = u.value.findIndex((c) => c.value === a);
299
- t > -1 && M(u.value[t], !1);
297
+ function E(l) {
298
+ const t = r.value.findIndex((u) => u.value === l);
299
+ t > -1 && R(r.value[t], !1);
300
300
  }
301
- D(() => n.modelValue, (a) => {
302
- o.value = a, C(o.value);
303
- }), D(() => n.items, async (a) => {
304
- const t = a.filter((c) => c.show);
305
- v(t), u.value = t, await T(), C(o.value), h.value = Array.from(A.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
301
+ D(() => n.modelValue, (l) => {
302
+ o.value = l, E(o.value);
303
+ }), D(() => n.items, async (l) => {
304
+ const t = l.filter((u) => u.show);
305
+ j(t), r.value = t, await T(), E(o.value), y.value = Array.from(A.values()).reduce((u, b) => (u += b.value.clientWidth, u), 0);
306
306
  }), P(async () => {
307
- C(o.value), await T(), i.value = "0.1s ease-out all", h.value = Array.from(A.values()).reduce((a, t) => (a += t.value.clientWidth, a), 0);
307
+ E(o.value), await T(), p.value = "0.1s ease-out all", y.value = Array.from(A.values()).reduce((l, t) => (l += t.value.clientWidth, l), 0);
308
308
  });
309
- function $(a, t) {
310
- M(t, !0);
309
+ function C(l, t) {
310
+ R(t, !0);
311
311
  }
312
- function E(a, t) {
313
- A.set(t, a);
312
+ function v(l, t) {
313
+ A.set(t, l);
314
314
  }
315
- function v(a) {
315
+ function j(l) {
316
316
  Array.from(A.keys()).forEach((t) => {
317
- a.find((m) => m.value === t) || A.delete(t);
317
+ l.find((b) => b.value === t) || A.delete(t);
318
318
  });
319
319
  }
320
- function O(a, t) {
321
- return w(G, {
322
- name: a.name,
323
- value: a.value,
324
- isActive: a.value === o.value,
320
+ function w(l, t) {
321
+ return M(H, {
322
+ name: l.name,
323
+ value: l.value,
324
+ isActive: l.value === o.value,
325
325
  index: t,
326
- disabled: a.disabled,
327
- key: a.value,
328
- onMounted: E,
329
- onActive: $
326
+ disabled: l.disabled,
327
+ key: l.value,
328
+ onMounted: v,
329
+ onActive: C
330
330
  }, null);
331
331
  }
332
- return () => w("span", {
333
- ref: l,
334
- class: j.value,
335
- style: r.value
336
- }, [w("span", {
332
+ return () => M("span", {
333
+ ref: a,
334
+ class: O.value,
335
+ style: c.value
336
+ }, [M("span", {
337
337
  class: "f-capsule-pane"
338
- }, [u.value.map((a, t) => O(a, t))]), w("small", {
338
+ }, [r.value.map((l, t) => w(l, t))]), M("small", {
339
339
  class: f.value,
340
- style: b.value
341
- }, null), w("div", {
340
+ style: g.value
341
+ }, null), M("div", {
342
342
  class: "f-capsule-board",
343
- style: R.value
343
+ style: B.value
344
344
  }, null)]);
345
345
  }
346
346
  });
347
- function be(n, e, u) {
348
- var E;
349
- function l() {
347
+ function be(n, e, r) {
348
+ var C;
349
+ function a() {
350
350
  }
351
- const s = "", o = "", i = y();
352
- function g() {
351
+ const s = "", o = "", p = m();
352
+ function h() {
353
353
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
354
354
  }
355
- function j() {
355
+ function O() {
356
356
  return !1;
357
357
  }
358
- function r() {
358
+ function c() {
359
359
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
360
360
  }
361
361
  function f() {
362
362
  return (e == null ? void 0 : e.schema.componentType) === "frame";
363
363
  }
364
- function p(v) {
364
+ function i(v) {
365
365
  if (!v || !v.value)
366
366
  return null;
367
367
  if (v.value.schema && v.value.schema.type === "component")
368
368
  return v.value;
369
- const O = y(v == null ? void 0 : v.value.parent), a = p(O);
370
- return a || null;
369
+ const j = m(v == null ? void 0 : v.value.parent), w = i(j);
370
+ return w || null;
371
371
  }
372
372
  function d(v = e) {
373
- const { componentInstance: O, designerItemElementRef: a } = v;
374
- return !O || !O.value ? null : O.value.canMove ? a : d(v.parent);
373
+ const { componentInstance: j, designerItemElementRef: w } = v;
374
+ return !j || !j.value ? null : j.value.canMove ? w : d(v.parent);
375
375
  }
376
- function h(v) {
377
- return !!u;
376
+ function y(v) {
377
+ return !!r;
378
378
  }
379
- function b() {
379
+ function g() {
380
380
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
381
381
  }
382
- function R() {
383
- }
384
- function A(v, O) {
382
+ function B() {
385
383
  }
386
- function V(v, O) {
387
- const { componentType: a } = v;
388
- let t = N(a, v, O);
389
- const c = a.toLowerCase().replace("-", "_");
390
- return t && !t.id && t.type === a && (t.id = `${c}_${Math.random().toString().slice(2, 6)}`), t;
384
+ function A(v, j) {
391
385
  }
392
- function M(v, O) {
393
- const a = String(v.getAttribute("data-controltype")), t = v.getAttribute("data-feature"), c = t ? JSON.parse(t) : {};
394
- c.parentComponentInstance = i.value;
395
- let m = N(a, c);
396
- const B = a.toLowerCase().replace("-", "_");
397
- return m && !m.id && m.type === a && (m.id = `${B}_${Math.random().toString().slice(2, 6)}`), m;
386
+ function S(v, j) {
387
+ const { componentType: w } = v;
388
+ let l = z(w, v, j);
389
+ const t = w.toLowerCase().replace("-", "_");
390
+ return l && !l.id && l.type === w && (l.id = `${t}_${Math.random().toString().slice(2, 6)}`), l;
398
391
  }
399
- function C(v) {
392
+ function R(v) {
400
393
  }
401
- function $(...v) {
394
+ function E(...v) {
402
395
  }
403
- return i.value = {
404
- canMove: g(),
405
- canSelectParent: j(),
406
- canDelete: r(),
396
+ return p.value = {
397
+ canMove: h(),
398
+ canSelectParent: O(),
399
+ canDelete: c(),
407
400
  canNested: !f(),
408
401
  contents: e == null ? void 0 : e.schema.contents,
409
402
  elementRef: n,
410
- parent: (E = e == null ? void 0 : e.parent) == null ? void 0 : E.componentInstance,
403
+ parent: (C = e == null ? void 0 : e.parent) == null ? void 0 : C.componentInstance,
411
404
  schema: e == null ? void 0 : e.schema,
412
405
  styles: s,
413
406
  designerClass: o,
414
- canAccepts: h,
415
- getBelongedComponentInstance: p,
407
+ canAccepts: y,
408
+ getBelongedComponentInstance: i,
416
409
  getDraggableDesignItemElement: d,
417
- getDraggingDisplayText: b,
418
- getPropConfig: $,
419
- getDragScopeElement: R,
410
+ getDraggingDisplayText: g,
411
+ getPropConfig: E,
412
+ getDragScopeElement: B,
420
413
  onAcceptMovedChildElement: A,
421
- onAcceptNewChildElement: M,
422
- onChildElementMovedOut: C,
423
- addNewChildComponentSchema: V,
424
- updateDragAndDropRules: l,
425
- triggerBelongedComponentToMoveWhenMoved: y(!1),
426
- triggerBelongedComponentToDeleteWhenDeleted: y(!1)
427
- }, i;
414
+ onChildElementMovedOut: R,
415
+ addNewChildComponentSchema: S,
416
+ updateDragAndDropRules: a,
417
+ triggerBelongedComponentToMoveWhenMoved: m(!1),
418
+ triggerBelongedComponentToDeleteWhenDeleted: m(!1)
419
+ }, p;
428
420
  }
429
- const Oe = /* @__PURE__ */ F({
421
+ const je = /* @__PURE__ */ N({
430
422
  name: "FCapsuleDesign",
431
- props: L,
423
+ props: W,
432
424
  emits: ["change", "update:modelValue"],
433
425
  setup(n, e) {
434
- const u = y(n.items), l = y(), s = 2, o = y(n.modelValue), i = y("none"), g = y(n.type), j = Q("design-item-context"), r = be(l, j);
426
+ const r = m(n.items), a = m(), s = 2, o = m(n.modelValue), p = m("none"), h = m(n.type), O = Q("design-item-context"), c = be(a, O);
435
427
  P(() => {
436
- l.value.componentInstance = r;
437
- }), e.expose(r.value);
438
- const f = S(() => {
428
+ a.value.componentInstance = c;
429
+ }), e.expose(c.value);
430
+ const f = V(() => {
439
431
  const t = {
440
432
  "f-capsule-container": !0
441
433
  };
442
- return g.value && (t[g.value] = !0), t;
443
- }), p = S(() => ({})), d = S(() => ({
434
+ return h.value && (t[h.value] = !0), t;
435
+ }), i = V(() => ({})), d = V(() => ({
444
436
  "f-capsule": !0
445
- })), h = y(s), b = y(0), R = y(0), A = S(() => ({
446
- left: `${h.value}px`,
447
- width: `${b.value}px`,
448
- transition: i.value
449
- })), V = S(() => ({
450
- width: `${R.value}px`
451
- })), M = /* @__PURE__ */ new Map();
452
- function C(t) {
453
- var c;
454
- if (M.has(t.value)) {
455
- const m = (c = M.get(t.value)) == null ? void 0 : c.value;
456
- if (m) {
457
- const B = m.getBoundingClientRect(), H = l.value.getBoundingClientRect();
458
- h.value = B.left - H.left + s + l.value.scrollLeft, b.value = B.width - 2 * s;
437
+ })), y = m(s), g = m(0), B = m(0), A = V(() => ({
438
+ left: `${y.value}px`,
439
+ width: `${g.value}px`,
440
+ transition: p.value
441
+ })), S = V(() => ({
442
+ width: `${B.value}px`
443
+ })), R = /* @__PURE__ */ new Map();
444
+ function E(t) {
445
+ var u;
446
+ if (R.has(t.value)) {
447
+ const b = (u = R.get(t.value)) == null ? void 0 : u.value;
448
+ if (b) {
449
+ const $ = b.getBoundingClientRect(), J = a.value.getBoundingClientRect();
450
+ y.value = $.left - J.left + s + a.value.scrollLeft, g.value = $.width - 2 * s;
459
451
  }
460
452
  }
461
453
  }
462
- function $(t, c) {
463
- const m = t.value;
464
- o.value = m, e.emit("update:modelValue", m), C(t), c && e.emit("change", m);
454
+ function C(t, u) {
455
+ const b = t.value;
456
+ o.value = b, e.emit("update:modelValue", b), E(t), u && e.emit("change", b);
465
457
  }
466
- function E(t) {
467
- const c = u.value.findIndex((m) => m.value === t);
468
- c > -1 && $(u.value[c], !1);
458
+ function v(t) {
459
+ const u = r.value.findIndex((b) => b.value === t);
460
+ u > -1 && C(r.value[u], !1);
469
461
  }
470
462
  D(() => n.modelValue, (t) => {
471
- o.value = t, E(o.value);
463
+ o.value = t, v(o.value);
472
464
  }), D(() => n.items, async (t) => {
473
- u.value = t, await T(), E(o.value), R.value = Array.from(M.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
465
+ r.value = t, await T(), v(o.value), B.value = Array.from(R.values()).reduce((u, b) => (u += b.value.clientWidth, u), 0);
474
466
  }), P(async () => {
475
- E(o.value), await T(), i.value = "0.1s ease-out all", R.value = Array.from(M.values()).reduce((t, c) => (t += c.value.clientWidth, t), 0);
467
+ v(o.value), await T(), p.value = "0.1s ease-out all", B.value = Array.from(R.values()).reduce((t, u) => (t += u.value.clientWidth, t), 0);
476
468
  });
477
- function v(t, c) {
478
- $(c, !0);
469
+ function j(t, u) {
470
+ C(u, !0);
479
471
  }
480
- function O(t, c) {
481
- M.set(c, t);
472
+ function w(t, u) {
473
+ R.set(u, t);
482
474
  }
483
- function a(t, c) {
484
- return w(G, {
475
+ function l(t, u) {
476
+ return M(H, {
485
477
  name: t.name,
486
478
  value: t.value,
487
479
  isActive: t.value === o.value,
488
- index: c,
489
- onMounted: O,
490
- onActive: v
480
+ index: u,
481
+ onMounted: w,
482
+ onActive: j
491
483
  }, null);
492
484
  }
493
- return () => w("span", {
494
- ref: l,
485
+ return () => M("span", {
486
+ ref: a,
495
487
  class: f.value,
496
- style: p.value
497
- }, [w("span", {
488
+ style: i.value
489
+ }, [M("span", {
498
490
  class: "f-capsule-pane"
499
- }, [u.value.map((t, c) => a(t, c))]), w("small", {
491
+ }, [r.value.map((t, u) => l(t, u))]), M("small", {
500
492
  class: d.value,
501
493
  style: A.value
502
- }, null), w("div", {
494
+ }, null), M("div", {
503
495
  class: "f-capsule-board",
504
- style: V.value
496
+ style: S.value
505
497
  }, null)]);
506
498
  }
507
499
  });
508
- k.register = (n, e, u) => {
509
- n.capsule = k, e.capsule = z;
500
+ k.register = (n, e, r) => {
501
+ n.capsule = k, e.capsule = G;
510
502
  };
511
- k.registerDesigner = (n, e, u) => {
512
- n.capsule = Oe, e.capsule = z;
503
+ k.registerDesigner = (n, e, r) => {
504
+ n.capsule = je, e.capsule = G;
513
505
  };
514
506
  const Me = X(k);
515
507
  export {
516
508
  k as FCapsule,
517
509
  ge as capsuleItemProps,
518
- L as capsuleProps,
510
+ W as capsuleProps,
519
511
  Me as default,
520
- z as propsResolver
512
+ G as propsResolver
521
513
  };