@farris/ui-vue 1.2.7 → 1.2.9

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 (246) hide show
  1. package/components/accordion/index.esm.js +136 -136
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +418 -456
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/border-editor/index.esm.js +4 -4
  6. package/components/border-editor/index.umd.cjs +1 -1
  7. package/components/button/index.esm.js +1 -1
  8. package/components/button/index.umd.cjs +1 -1
  9. package/components/button-edit/index.esm.js +363 -436
  10. package/components/button-edit/index.umd.cjs +1 -1
  11. package/components/button-group/index.esm.js +5 -5
  12. package/components/button-group/index.umd.cjs +1 -1
  13. package/components/calendar/index.esm.js +417 -417
  14. package/components/calendar/index.umd.cjs +1 -1
  15. package/components/capsule/index.esm.js +176 -176
  16. package/components/capsule/index.umd.cjs +1 -1
  17. package/components/checkbox/index.esm.js +557 -594
  18. package/components/checkbox/index.umd.cjs +1 -1
  19. package/components/color-picker/index.esm.js +119 -119
  20. package/components/color-picker/index.umd.cjs +2 -2
  21. package/components/combo-list/index.esm.js +502 -535
  22. package/components/combo-list/index.umd.cjs +1 -1
  23. package/components/combo-tree/index.esm.js +69 -69
  24. package/components/combo-tree/index.umd.cjs +1 -1
  25. package/components/component/index.esm.js +387 -275
  26. package/components/component/index.umd.cjs +1 -1
  27. package/components/condition/index.esm.js +1219 -983
  28. package/components/condition/index.umd.cjs +1 -1
  29. package/components/content-container/index.esm.js +292 -219
  30. package/components/content-container/index.umd.cjs +1 -1
  31. package/components/data-grid/index.css +1 -1
  32. package/components/data-grid/index.esm.js +5718 -5546
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3291 -2930
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2650 -2682
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/dependent-base/style.js +1 -0
  39. package/components/dependent-fluid/style.js +1 -0
  40. package/components/dependent-icon/style.js +1 -0
  41. package/components/dependent-input/style.js +1 -0
  42. package/components/dependent-table/style.js +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +945 -932
  45. package/components/designer-canvas/index.umd.cjs +1 -1
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +175 -133
  48. package/components/designer-outline/index.umd.cjs +1 -1
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -1
  51. package/components/discussion-editor/index.esm.js +1 -1
  52. package/components/discussion-editor/index.umd.cjs +1 -1
  53. package/components/dropdown/index.esm.js +246 -246
  54. package/components/dropdown/index.umd.cjs +2 -2
  55. package/components/dynamic-form/index.esm.js +1319 -1172
  56. package/components/dynamic-form/index.umd.cjs +1 -1
  57. package/components/dynamic-resolver/index.esm.js +119 -82
  58. package/components/dynamic-resolver/index.umd.cjs +1 -1
  59. package/components/dynamic-view/index.esm.js +258 -249
  60. package/components/dynamic-view/index.umd.cjs +1 -1
  61. package/components/enum-editor/index.esm.js +3 -3
  62. package/components/enum-editor/index.umd.cjs +1 -1
  63. package/components/events-editor/index.esm.js +569 -514
  64. package/components/events-editor/index.umd.cjs +1 -1
  65. package/components/expression-editor/index.esm.js +104 -104
  66. package/components/expression-editor/index.umd.cjs +1 -1
  67. package/components/external-container/index.css +1 -1
  68. package/components/external-container/index.esm.js +3122 -2686
  69. package/components/external-container/index.umd.cjs +1 -1
  70. package/components/field-selector/index.css +1 -1
  71. package/components/field-selector/index.esm.js +6780 -6608
  72. package/components/field-selector/index.umd.cjs +1 -1
  73. package/components/filter-bar/index.css +1 -1
  74. package/components/filter-bar/index.esm.js +1466 -1523
  75. package/components/filter-bar/index.umd.cjs +1 -1
  76. package/components/flow-canvas/index.css +1 -1
  77. package/components/flow-canvas/index.esm.js +1048 -1035
  78. package/components/flow-canvas/index.umd.cjs +1 -1
  79. package/components/image-cropper/index.esm.js +422 -422
  80. package/components/image-cropper/index.umd.cjs +1 -1
  81. package/components/input-group/index.esm.js +674 -716
  82. package/components/input-group/index.umd.cjs +1 -1
  83. package/components/layout/index.esm.js +291 -291
  84. package/components/layout/index.umd.cjs +1 -1
  85. package/components/list-nav/index.esm.js +303 -230
  86. package/components/list-nav/index.umd.cjs +1 -1
  87. package/components/list-view/index.css +1 -1
  88. package/components/list-view/index.esm.js +2486 -2130
  89. package/components/list-view/index.umd.cjs +1 -1
  90. package/components/lookup/index.css +1 -1
  91. package/components/lookup/index.esm.js +7474 -7272
  92. package/components/lookup/index.umd.cjs +1 -1
  93. package/components/mapping-editor/index.css +1 -1
  94. package/components/mapping-editor/index.esm.js +6139 -5949
  95. package/components/mapping-editor/index.umd.cjs +1 -1
  96. package/components/message-box/index.esm.js +1 -1
  97. package/components/message-box/index.umd.cjs +1 -1
  98. package/components/modal/index.esm.js +1 -1
  99. package/components/modal/index.umd.cjs +1 -1
  100. package/components/nav/index.esm.js +432 -371
  101. package/components/nav/index.umd.cjs +3 -3
  102. package/components/number-range/index.esm.js +1124 -0
  103. package/components/number-range/index.umd.cjs +1 -0
  104. package/components/number-range/package.json +8 -0
  105. package/components/number-range/style.js +6 -0
  106. package/components/number-spinner/index.esm.js +1155 -0
  107. package/components/number-spinner/index.umd.cjs +1 -0
  108. package/components/number-spinner/package.json +8 -0
  109. package/components/number-spinner/style.js +4 -0
  110. package/components/order/index.css +1 -1
  111. package/components/order/index.esm.js +1215 -1178
  112. package/components/order/index.umd.cjs +1 -1
  113. package/components/page-footer/index.esm.js +147 -147
  114. package/components/page-footer/index.umd.cjs +1 -1
  115. package/components/page-header/index.esm.js +1240 -1346
  116. package/components/page-header/index.umd.cjs +1 -1
  117. package/components/pagination/index.esm.js +489 -428
  118. package/components/pagination/index.umd.cjs +1 -1
  119. package/components/progress/index.esm.js +220 -220
  120. package/components/progress/index.umd.cjs +3 -3
  121. package/components/property-editor/index.esm.js +1512 -1540
  122. package/components/property-editor/index.umd.cjs +3 -3
  123. package/components/property-panel/index.css +1 -1
  124. package/components/property-panel/index.esm.js +749 -815
  125. package/components/property-panel/index.umd.cjs +1 -1
  126. package/components/query-solution/index.css +1 -0
  127. package/components/query-solution/index.esm.js +7074 -0
  128. package/components/query-solution/index.umd.cjs +1 -0
  129. package/components/query-solution/package.json +8 -0
  130. package/components/query-solution/style.js +2 -0
  131. package/components/radio-button/index.esm.js +86 -86
  132. package/components/radio-button/index.umd.cjs +1 -1
  133. package/components/radio-group/index.esm.js +442 -479
  134. package/components/radio-group/index.umd.cjs +1 -1
  135. package/components/rate/index.esm.js +213 -208
  136. package/components/rate/index.umd.cjs +1 -1
  137. package/components/response-layout/index.esm.js +116 -116
  138. package/components/response-layout/index.umd.cjs +1 -1
  139. package/components/response-layout-editor/index.esm.js +943 -918
  140. package/components/response-layout-editor/index.umd.cjs +1 -1
  141. package/components/response-toolbar/index.esm.js +1174 -1295
  142. package/components/response-toolbar/index.umd.cjs +1 -1
  143. package/components/schema-selector/index.css +1 -1
  144. package/components/schema-selector/index.esm.js +5383 -5171
  145. package/components/schema-selector/index.umd.cjs +2 -2
  146. package/components/search-box/index.esm.js +201 -201
  147. package/components/search-box/index.umd.cjs +1 -1
  148. package/components/section/index.esm.js +684 -542
  149. package/components/section/index.umd.cjs +1 -1
  150. package/components/smoke-detector/index.esm.js +121 -121
  151. package/components/smoke-detector/index.umd.cjs +1 -1
  152. package/components/spacing-editor/index.esm.js +2 -2
  153. package/components/spacing-editor/index.umd.cjs +1 -1
  154. package/components/splitter/index.esm.js +1158 -382
  155. package/components/splitter/index.umd.cjs +1 -1
  156. package/components/step/index.esm.js +232 -232
  157. package/components/step/index.umd.cjs +1 -1
  158. package/components/switch/index.esm.js +451 -487
  159. package/components/switch/index.umd.cjs +1 -1
  160. package/components/tabs/index.esm.js +2078 -2168
  161. package/components/tabs/index.umd.cjs +1 -1
  162. package/components/tags/index.esm.js +318 -320
  163. package/components/tags/index.umd.cjs +1 -1
  164. package/components/text/index.esm.js +192 -192
  165. package/components/text/index.umd.cjs +1 -1
  166. package/components/textarea/index.esm.js +471 -497
  167. package/components/textarea/index.umd.cjs +1 -1
  168. package/components/time-picker/index.esm.js +1421 -1441
  169. package/components/time-picker/index.umd.cjs +1 -1
  170. package/components/transfer/index.css +1 -1
  171. package/components/transfer/index.esm.js +430 -421
  172. package/components/transfer/index.umd.cjs +1 -1
  173. package/components/tree-grid/index.css +1 -1
  174. package/components/tree-grid/index.esm.js +6806 -6624
  175. package/components/tree-grid/index.umd.cjs +1 -1
  176. package/components/tree-view/index.esm.js +2793 -2433
  177. package/components/tree-view/index.umd.cjs +1 -1
  178. package/components/uploader/index.esm.js +165 -165
  179. package/components/uploader/index.umd.cjs +2 -2
  180. package/components/verify-detail/index.esm.js +255 -255
  181. package/components/verify-detail/index.umd.cjs +1 -1
  182. package/components/video/index.esm.js +413 -334
  183. package/components/video/index.umd.cjs +1 -1
  184. package/components/weather/index.esm.js +902 -902
  185. package/components/weather/index.umd.cjs +4 -4
  186. package/farris.all.esm.js +54155 -52847
  187. package/farris.all.umd.cjs +9 -9
  188. package/index.css +1 -1
  189. package/package.json +1 -1
  190. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  191. package/types/checkbox/index.d.ts +1 -0
  192. package/types/combo-list/src/components/list-container.component.d.ts +3 -0
  193. package/types/combo-list/src/components/list-container.props.d.ts +5 -1
  194. package/types/common/entity/entity-schema.d.ts +258 -0
  195. package/types/component/src/component-ref.props.d.ts +4 -0
  196. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  197. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  198. package/types/data-grid/index.d.ts +5 -2
  199. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  200. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  201. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  202. package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  203. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  204. package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
  205. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  206. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  207. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  208. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  209. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  210. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  211. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  212. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  213. package/types/data-view/composition/types.d.ts +19 -7
  214. package/types/data-view/composition/use-edit.d.ts +2 -1
  215. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  216. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  217. package/types/designer-canvas/src/types.d.ts +3 -3
  218. package/types/dynamic-form/index.d.ts +3 -1
  219. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  220. package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
  221. package/types/dynamic-form/src/types.d.ts +1 -1
  222. package/types/dynamic-resolver/index.d.ts +1 -0
  223. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  224. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  225. package/types/dynamic-resolver/src/types.d.ts +3 -2
  226. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  227. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
  228. package/types/modal/src/modal.props.d.ts +1 -4
  229. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
  230. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
  231. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  232. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  233. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  234. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  235. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  236. package/types/tabs/src/composition/types.d.ts +2 -2
  237. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  238. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  239. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  240. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  241. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  242. package/types/tags/index.d.ts +36 -5
  243. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  244. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  245. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  246. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
@@ -1,56 +1,57 @@
1
- import { ref as i, defineComponent as ye, computed as P, watch as q, nextTick as ue, createVNode as b, inject as we, onMounted as De } from "vue";
2
- import { cloneDeep as Be } from "lodash-es";
3
- function Ae(a, e, v) {
1
+ import { withInstall as we } from "../common/index.esm.js";
2
+ import { ref as i, defineComponent as he, computed as I, watch as q, nextTick as ue, createVNode as T, inject as De, onMounted as Be } from "vue";
3
+ import { cloneDeep as Ae } from "lodash-es";
4
+ function Ce(a, e, v) {
4
5
  return e;
5
6
  }
6
- const be = {}, Te = {};
7
+ const ye = {}, be = {};
7
8
  function fe(a) {
8
- const { properties: e, title: v } = a, g = Object.keys(e).reduce((r, h) => (r[h] = e[h].type === "object" && e[h].properties ? fe(e[h]) : Be(e[h].default), r), {});
9
- return g.id = `${v}-${Date.now()}`, g;
9
+ const { properties: e, title: v, ignore: g } = a, n = g && Array.isArray(g), h = Object.keys(e).reduce((y, w) => ((!n || !g.find((C) => C == w)) && (y[w] = e[w].type === "object" && e[w].properties ? fe(e[w]) : Ae(e[w].default)), y), {});
10
+ return (!n || !g.find((y) => y == "id")) && (h.id = `${v}-${Date.now()}`), h;
10
11
  }
11
- function ie(a, e = {}) {
12
- const v = be[a];
13
- if (v) {
14
- let g = fe(v);
15
- const r = Te[a];
16
- return g = r ? r({ getSchemaByType: ie }, g, e) : g, g;
12
+ function ie(a, e = {}, v) {
13
+ const g = ye[a];
14
+ if (g) {
15
+ let n = fe(g);
16
+ const h = be[a];
17
+ return n = h ? h({ getSchemaByType: ie }, n, e, v) : n, n;
17
18
  }
18
19
  return null;
19
20
  }
20
21
  function Se(a, e) {
21
22
  const v = fe(e);
22
- return Object.keys(a).reduce((g, r) => (g[r] = a[r], g), v), v;
23
+ return Object.keys(a).reduce((g, n) => (g[n] && typeof g[n] == "object" ? Object.assign(g[n], a[n]) : g[n] = a[n], g), v), v;
23
24
  }
24
- function Ce(a, e) {
25
- return Object.keys(a).filter((g) => a[g] != null).reduce((g, r) => {
26
- if (e.has(r)) {
27
- const h = e.get(r);
25
+ function Oe(a, e) {
26
+ return Object.keys(a).filter((g) => a[g] != null).reduce((g, n) => {
27
+ if (e.has(n)) {
28
+ const h = e.get(n);
28
29
  if (typeof h == "string")
29
- g[h] = a[r];
30
+ g[h] = a[n];
30
31
  else {
31
- const w = h(r, a[r], a);
32
- Object.assign(g, w);
32
+ const y = h(n, a[n], a);
33
+ Object.assign(g, y);
33
34
  }
34
35
  } else
35
- g[r] = a[r];
36
+ g[n] = a[n];
36
37
  return g;
37
38
  }, {});
38
39
  }
39
- function Oe(a, e, v = /* @__PURE__ */ new Map()) {
40
+ function je(a, e, v = /* @__PURE__ */ new Map()) {
40
41
  const g = Se(a, e);
41
- return Ce(g, v);
42
+ return Oe(g, v);
42
43
  }
43
- function je(a = {}) {
44
+ function Me(a = {}) {
44
45
  function e(c, p, d, f) {
45
46
  if (typeof d == "number")
46
47
  return f[c].length === d;
47
48
  if (typeof d == "object") {
48
- const T = Object.keys(d)[0], D = d[T];
49
- if (T === "not")
49
+ const k = Object.keys(d)[0], D = d[k];
50
+ if (k === "not")
50
51
  return Number(f[c].length) !== Number(D);
51
- if (T === "moreThan")
52
+ if (k === "moreThan")
52
53
  return Number(f[c].length) >= Number(D);
53
- if (T === "lessThan")
54
+ if (k === "lessThan")
54
55
  return Number(f[c].length) <= Number(D);
55
56
  }
56
57
  return !1;
@@ -63,51 +64,51 @@ function je(a = {}) {
63
64
  ["getProperty", v]
64
65
  ]);
65
66
  Object.keys(a).reduce((c, p) => (c.set(p, a[p]), c), g);
66
- function r(c, p) {
67
+ function n(c, p) {
67
68
  const d = c;
68
69
  return typeof p == "number" ? [{ target: d, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: d, operator: "getProperty", param: c, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
69
70
  if (f === "length")
70
71
  return { target: d, operator: "length", param: null, value: p[f] };
71
- const T = f, D = p[f];
72
- return { target: d, operator: "getProperty", param: T, value: D };
72
+ const k = f, D = p[f];
73
+ return { target: d, operator: "getProperty", param: k, value: D };
73
74
  }) : [];
74
75
  }
75
76
  function h(c) {
76
77
  return Object.keys(c).reduce((d, f) => {
77
- const T = r(f, c[f]);
78
- return d.push(...T), d;
78
+ const k = n(f, c[f]);
79
+ return d.push(...k), d;
79
80
  }, []);
80
81
  }
81
- function w(c, p) {
82
+ function y(c, p) {
82
83
  if (g.has(c.operator)) {
83
84
  const d = g.get(c.operator);
84
85
  return d && d(c.target, c.param, c.value, p) || !1;
85
86
  }
86
87
  return !1;
87
88
  }
88
- function O(c, p) {
89
- return h(c).reduce((T, D) => T && w(D, p), !0);
89
+ function w(c, p) {
90
+ return h(c).reduce((k, D) => k && y(D, p), !0);
90
91
  }
91
92
  function C(c, p) {
92
- const d = Object.keys(c), f = d.includes("allOf"), T = d.includes("anyOf"), D = f || T, y = (D ? c[D ? f ? "allOf" : "anyOf" : "allOf"] : [c]).map((V) => O(V, p));
93
- return f ? !y.includes(!1) : y.includes(!0);
93
+ const d = Object.keys(c), f = d.includes("allOf"), k = d.includes("anyOf"), D = f || k, b = (D ? c[D ? f ? "allOf" : "anyOf" : "allOf"] : [c]).map((F) => w(F, p));
94
+ return f ? !b.includes(!1) : b.includes(!0);
94
95
  }
95
96
  return { parseValueSchema: C };
96
97
  }
97
- const Me = {}, Ee = {};
98
- je();
99
- function Pe(a, e, v = /* @__PURE__ */ new Map(), g = (w, O, C) => O, r = {}, h = (w) => w) {
100
- return be[e.title] = e, Te[e.title] = g, Me[e.title] = r, Ee[e.title] = h, (w = {}) => {
101
- const O = Oe(w, e, v), C = Object.keys(a).reduce((c, p) => (c[p] = a[p].default, c), {});
102
- return Object.assign(C, O);
98
+ const Ee = {}, Pe = {};
99
+ Me();
100
+ function Ie(a, e, v = /* @__PURE__ */ new Map(), g = (y, w, C) => w, n = {}, h = (y) => y) {
101
+ return ye[e.title] = e, be[e.title] = g, Ee[e.title] = n, Pe[e.title] = h, (y = {}) => {
102
+ const w = je(y, e, v), C = Object.keys(a).reduce((c, p) => (c[p] = a[p].default, c), {});
103
+ return Object.assign(C, w);
103
104
  };
104
105
  }
105
- function Re(a, e) {
106
+ function Le(a, e) {
106
107
  return { customClass: e.class, customStyle: e.style };
107
108
  }
108
- const Le = /* @__PURE__ */ new Map([
109
- ["appearance", Re]
110
- ]), Ie = "tags", Ne = "A Farris Component", $e = "object", Ve = {
109
+ const Re = /* @__PURE__ */ new Map([
110
+ ["appearance", Le]
111
+ ]), Ne = "tags", $e = "A Farris Component", Ve = "object", Fe = {
111
112
  basic: {
112
113
  description: "Basic Infomation",
113
114
  title: "基本信息",
@@ -129,12 +130,12 @@ const Le = /* @__PURE__ */ new Map([
129
130
  }
130
131
  }
131
132
  }
132
- }, Fe = {
133
- title: Ie,
134
- description: Ne,
135
- type: $e,
136
- categories: Ve
137
- }, We = "https://json-schema.org/draft/2020-12/schema", xe = "https://farris-design.gitee.io/tags.schema.json", qe = "tags", He = "A Farris Component", _e = "object", Xe = {
133
+ }, We = {
134
+ title: Ne,
135
+ description: $e,
136
+ type: Ve,
137
+ categories: Fe
138
+ }, xe = "https://json-schema.org/draft/2020-12/schema", qe = "https://farris-design.gitee.io/tags.schema.json", He = "tags", _e = "A Farris Component", Xe = "object", Je = {
138
139
  id: {
139
140
  description: "The unique identifier for tags",
140
141
  type: "string"
@@ -196,17 +197,17 @@ const Le = /* @__PURE__ */ new Map([
196
197
  type: "boolean",
197
198
  default: !0
198
199
  }
199
- }, Je = [
200
+ }, ze = [
200
201
  "id",
201
202
  "type"
202
- ], ze = {
203
- $schema: We,
204
- $id: xe,
205
- title: qe,
206
- description: He,
207
- type: _e,
208
- properties: Xe,
209
- required: Je
203
+ ], Ge = {
204
+ $schema: xe,
205
+ $id: qe,
206
+ title: He,
207
+ description: _e,
208
+ type: Xe,
209
+ properties: Je,
210
+ required: ze
210
211
  }, de = {
211
212
  activeTag: { type: String, default: "" },
212
213
  addButtonText: { type: String, default: "" },
@@ -223,18 +224,18 @@ const Le = /* @__PURE__ */ new Map([
223
224
  wrapText: { type: Boolean, default: !1 },
224
225
  draggable: { type: Boolean, default: !1 },
225
226
  disable: { type: Boolean, default: !1 }
226
- }, he = Pe(de, ze, Le, Ae, Fe);
227
+ }, Te = Ie(de, Ge, Re, Ce, We);
227
228
  function ke(a, e, v, g) {
228
- const r = i(-1), h = i(!1);
229
- function w(p, d, f) {
229
+ const n = i(-1), h = i(!1);
230
+ function y(p, d, f) {
230
231
  p.stopPropagation(), d && setTimeout(() => {
231
- r.value = f, h.value = !0, d.moving = !0;
232
+ n.value = f, h.value = !0, d.moving = !0;
232
233
  });
233
234
  }
234
- function O(p, d) {
235
- if (p.preventDefault(), r.value !== d) {
236
- const f = g.value[r.value], T = g.value;
237
- T.splice(r.value, 1), T.splice(d, 0, f), r.value = d;
235
+ function w(p, d) {
236
+ if (p.preventDefault(), n.value !== d) {
237
+ const f = g.value[n.value], k = g.value;
238
+ k.splice(n.value, 1), k.splice(d, 0, f), n.value = d;
238
239
  }
239
240
  }
240
241
  function C(p, d) {
@@ -244,72 +245,72 @@ function ke(a, e, v, g) {
244
245
  d && (d.moving = !1), v.value = g.value.filter((f) => f.type === "Tag").map((f) => f.payload), h.value = !1, e.emit("change", v.value);
245
246
  }
246
247
  return {
247
- dragstart: w,
248
- dragenter: O,
248
+ dragstart: y,
249
+ dragenter: w,
249
250
  dragover: C,
250
251
  dragend: c,
251
252
  isDragging: h
252
253
  };
253
254
  }
254
- const ce = /* @__PURE__ */ ye({
255
+ const G = /* @__PURE__ */ he({
255
256
  name: "FTags",
256
257
  props: de,
257
258
  emits: ["remove", "selectionChange", "change"],
258
259
  setup(a, e) {
259
- const v = i(a.selectable), g = i(a.customClass), r = i(a.data), h = i(a.tagType), w = i(a.tagStyle), O = i(a.showColor), C = i(a.customStyle), c = i(a.activeTag), p = i(a.showClose), d = i(a.addButtonText), f = i(), T = i(a.wrapText), D = i();
260
+ const v = i(a.selectable), g = i(a.customClass), n = i(a.data), h = i(a.tagType), y = i(a.tagStyle), w = i(a.showColor), C = i(a.customStyle), c = i(a.activeTag), p = i(a.showClose), d = i(a.addButtonText), f = i(), k = i(a.wrapText), D = i();
260
261
  i(a.disable);
261
262
  const B = i(!1);
262
- function E() {
263
- const n = r.value.map((s) => ({
263
+ function P() {
264
+ const r = n.value.map((s) => ({
264
265
  type: "Tag",
265
266
  payload: s
266
267
  }));
267
- return a.showAddButton && n.push({
268
+ return a.showAddButton && r.push({
268
269
  type: "AddButton"
269
- }), n;
270
+ }), r;
270
271
  }
271
- const y = i(E());
272
- function N(n) {
273
- r.value = n, y.value = E();
272
+ const b = i(P());
273
+ function $(r) {
274
+ n.value = r, b.value = P();
274
275
  }
275
- const V = P(() => y.value.findIndex((n) => n.type === "Input")), F = ke(a, e, r, y), {
276
- dragstart: R,
276
+ const F = I(() => b.value.findIndex((r) => r.type === "Input")), W = ke(a, e, n, b), {
277
+ dragstart: L,
277
278
  dragenter: m,
278
- dragover: A,
279
- dragend: k
280
- } = F;
281
- q(() => a.data, (n) => N(n)), q(() => a.showAddButton, () => {
282
- y.value = E();
283
- }), q(() => a.disable, (n) => {
284
- y.value = E();
285
- }), q(() => a.activeTag, (n) => {
286
- c.value = n;
287
- }), q(B, (n) => {
288
- const s = [...y.value];
289
- n ? s.length > 0 && s[s.length - 1].type !== "Input" && (s.splice(s.length - 1, 1), s.splice(s.length, 0, {
279
+ dragover: O,
280
+ dragend: A
281
+ } = W;
282
+ q(() => a.data, (r) => $(r)), q(() => a.showAddButton, () => {
283
+ b.value = P();
284
+ }), q(() => a.disable, (r) => {
285
+ b.value = P();
286
+ }), q(() => a.activeTag, (r) => {
287
+ c.value = r;
288
+ }), q(B, (r) => {
289
+ const s = [...b.value];
290
+ r ? s.length > 0 && s[s.length - 1].type !== "Input" && (s.splice(s.length - 1, 1), s.splice(s.length, 0, {
290
291
  type: "Input"
291
- }), y.value = s, ue(() => {
292
+ }), b.value = s, ue(() => {
292
293
  var u;
293
294
  D.value && ((u = D.value) == null || u.focus());
294
295
  })) : s.length > 0 && s[s.length - 1].type !== "AddButton" && (s.splice(s.length - 1, 1), s.splice(s.length, 0, {
295
296
  type: "AddButton"
296
- }), y.value = s);
297
+ }), b.value = s);
297
298
  });
298
- const $ = P(() => {
299
- const n = {
299
+ const M = I(() => {
300
+ const r = {
300
301
  "farris-tags": !0,
301
302
  "farris-tags-checkable": v.value,
302
- "farris-tags-nowrap": !T.value
303
+ "farris-tags-nowrap": !k.value
303
304
  };
304
- return g.value.split(" ").reduce((s, u) => (s[u] = !0, s), n), n;
305
+ return g.value.split(" ").reduce((s, u) => (s[u] = !0, s), r), r;
305
306
  });
306
- function W(n) {
307
+ function V(r) {
307
308
  const s = {
308
309
  "farris-tag-item": !0,
309
- "farris-tag-item-checked": v.value && n.checked,
310
+ "farris-tag-item-checked": v.value && r.checked,
310
311
  "farris-tag-item-checkable": v.value,
311
- "farris-tag-item-has-color": O.value,
312
- "farris-tag-item-actived": c.value === n.name
312
+ "farris-tag-item-has-color": w.value,
313
+ "farris-tag-item-actived": c.value === r.name
313
314
  };
314
315
  if (h.value) {
315
316
  const u = `farris-tag-item-${h.value}`;
@@ -317,23 +318,23 @@ const ce = /* @__PURE__ */ ye({
317
318
  }
318
319
  return s;
319
320
  }
320
- const L = P(() => {
321
- const n = {};
321
+ const R = I(() => {
322
+ const r = {};
322
323
  return C.value && C.value.split(";").reduce((s, u) => {
323
324
  const j = u.split(":");
324
325
  return s[j[0]] = j[1], s;
325
- }, n), n;
326
+ }, r), r;
326
327
  });
327
- function H(n, s) {
328
- !a.disable && v.value && (!s.hasOwnProperty("selectable") || s.selectable) && (s.checked = !s.checked, c.value = s.checked ? s.name : "", s.checked && r.value.filter((u) => u.name !== s.name).forEach((u) => {
328
+ function H(r, s) {
329
+ !a.disable && v.value && (!s.hasOwnProperty("selectable") || s.selectable) && (s.checked = !s.checked, c.value = s.checked ? s.name : "", s.checked && n.value.filter((u) => u.name !== s.name).forEach((u) => {
329
330
  u.checked = !s.checked;
330
- }), e.emit("change", r.value), e.emit("selectionChange", s));
331
+ }), e.emit("change", n.value), e.emit("selectionChange", s));
331
332
  }
332
- function G(n, s) {
333
+ function Q(r, s) {
333
334
  let u;
334
- switch (n.key) {
335
+ switch (r.key) {
335
336
  case "Backspace":
336
- r.value = r.value.filter((j) => j.name !== s.name), e.emit("change", r.value);
337
+ n.value = n.value.filter((j) => j.name !== s.name), e.emit("change", n.value);
337
338
  break;
338
339
  case "ArrowLeft":
339
340
  u = Math.max(f.value.scrollLeft + 20, 0), f.value.scrollLeft = u;
@@ -342,140 +343,140 @@ const ce = /* @__PURE__ */ ye({
342
343
  u = Math.max(f.value.scrollLeft - 20, 0), f.value.scrollLeft = u;
343
344
  }
344
345
  }
345
- function Q(n, s) {
346
- const u = r.value.findIndex((j) => j.name === s.name);
346
+ function U(r, s) {
347
+ const u = n.value.findIndex((j) => j.name === s.name);
347
348
  if (u > -1) {
348
- const [j] = r.value.splice(u, 1);
349
- y.value = E(), e.emit("change", r.value), e.emit("remove", {
350
- tags: r.value,
349
+ const [j] = n.value.splice(u, 1);
350
+ b.value = P(), e.emit("change", n.value), e.emit("remove", {
351
+ tags: n.value,
351
352
  remove: j
352
353
  });
353
354
  }
354
- n.stopPropagation();
355
+ r.stopPropagation();
355
356
  }
356
- const U = P(() => ({
357
+ const Y = I(() => ({
357
358
  "farris-tag-item": !0,
358
359
  "farris-tag-add-button": !0,
359
360
  "farris-tag-add-button-disabled": !a.enableAddButton
360
361
  }));
361
- function Y(n) {
362
- n.stopPropagation(), B.value = !0;
363
- }
364
- function Z() {
365
- return !a.disable && b("li", {
366
- class: U.value,
367
- onClick: (n) => Y(n)
368
- }, [b("span", {
362
+ function Z(r) {
363
+ r.stopPropagation(), B.value = !0;
364
+ }
365
+ function K() {
366
+ return !a.disable && T("li", {
367
+ class: Y.value,
368
+ onClick: (r) => Z(r)
369
+ }, [T("span", {
369
370
  class: "f-icon f-icon-amplification"
370
- }, null), d.value && b("span", {
371
+ }, null), d.value && T("span", {
371
372
  class: "farris-tag-add-text"
372
373
  }, [d.value])]);
373
374
  }
374
- function _(n, s, u) {
375
- n > -1 && (r.value.splice(n, 0, {
375
+ function _(r, s, u) {
376
+ r > -1 && (n.value.splice(r, 0, {
376
377
  name: s,
377
378
  value: u,
378
379
  selectable: v.value
379
- }), y.value = E(), B.value = !1, e.emit("change", r.value));
380
+ }), b.value = P(), B.value = !1, e.emit("change", n.value));
380
381
  }
381
- function X(n) {
382
- if (n && n.value) {
383
- const s = n.value, u = V.value;
384
- _(u, s, s), n.innerText = "";
382
+ function X(r) {
383
+ if (r && r.value) {
384
+ const s = r.value, u = F.value;
385
+ _(u, s, s), r.innerText = "";
385
386
  } else
386
387
  B.value = !1;
387
388
  }
388
- function K(n) {
389
- const s = n.target;
389
+ function ee(r) {
390
+ const s = r.target;
390
391
  s && s.value ? X(s) : B.value = !1;
391
392
  }
392
- function pe(n) {
393
- n.key === "Enter" && X(n.target);
393
+ function ge(r) {
394
+ r.key === "Enter" && X(r.target);
394
395
  }
395
- function ee() {
396
- return !a.disable && b("li", {
396
+ function te() {
397
+ return !a.disable && T("li", {
397
398
  class: "farris-tag-input-box"
398
- }, [b("input", {
399
+ }, [T("input", {
399
400
  title: "farris-tag-input-box",
400
401
  ref: D,
401
402
  class: "form-control",
402
- onKeyup: pe,
403
- onBlur: K
403
+ onKeyup: ge,
404
+ onBlur: ee
404
405
  }, null)]);
405
406
  }
406
- function te(n, s) {
407
- return b("li", {
408
- class: W(n),
409
- style: L.value,
407
+ function ae(r, s) {
408
+ return T("li", {
409
+ class: V(r),
410
+ style: R.value,
410
411
  tabindex: 0,
411
- id: n.name,
412
- key: n.name,
413
- onClick: (u) => H(u, n),
414
- onKeydown: (u) => G(u, n),
412
+ id: r.name,
413
+ key: r.name,
414
+ onClick: (u) => H(u, r),
415
+ onKeydown: (u) => Q(u, r),
415
416
  draggable: "true",
416
- onDragstart: (u) => R(u, n, s),
417
+ onDragstart: (u) => L(u, r, s),
417
418
  onDragenter: (u) => m(u, s),
418
- onDragend: (u) => k(u, n),
419
- onDragover: (u) => A(u, s)
420
- }, [b("span", {
421
- title: n.name,
419
+ onDragend: (u) => A(u, r),
420
+ onDragover: (u) => O(u, s)
421
+ }, [T("span", {
422
+ title: r.name,
422
423
  class: "tag-box"
423
- }, [n.name]), !a.disable && p.value && b("span", {
424
+ }, [r.name]), !a.disable && p.value && T("span", {
424
425
  class: "tag-delete"
425
- }, [b("i", {
426
+ }, [T("i", {
426
427
  class: "f-icon f-icon-close",
427
- onClick: (u) => Q(u, n)
428
+ onClick: (u) => U(u, r)
428
429
  }, null)])]);
429
430
  }
430
431
  function J() {
431
- return y.value.map((n, s) => {
432
- switch (n.type) {
432
+ return b.value.map((r, s) => {
433
+ switch (r.type) {
433
434
  case "Tag":
434
- return te(n.payload, s);
435
+ return ae(r.payload, s);
435
436
  case "AddButton":
436
- return Z();
437
+ return K();
437
438
  case "Input":
438
- return ee();
439
+ return te();
439
440
  }
440
441
  });
441
442
  }
442
- const z = P(() => ({
443
+ const z = I(() => ({
443
444
  "farris-tags-item-container": !0,
444
- "farris-tag-item-capsule": w.value === "capsule"
445
+ "farris-tag-item-capsule": y.value === "capsule"
445
446
  }));
446
- function ae(n) {
447
- const s = Math.max(f.value.scrollLeft - n.deltaX, 0);
447
+ function ne(r) {
448
+ const s = Math.max(f.value.scrollLeft - r.deltaX, 0);
448
449
  f.value.scrollLeft = s;
449
450
  }
450
- function ne(n) {
451
+ function re(r) {
451
452
  var u;
452
- n.preventDefault(), n.stopPropagation();
453
- const s = (u = n.dataTransfer) == null ? void 0 : u.getData("Text");
453
+ r.preventDefault(), r.stopPropagation();
454
+ const s = (u = r.dataTransfer) == null ? void 0 : u.getData("Text");
454
455
  if (s) {
455
- const j = s.split(":"), se = j[0], x = j[1];
456
- [...r.value].findIndex((t) => (console.log(`${t.value} === ${x} is ${t.value === x}`), t.value === x)) > -1 || _(r.value.length, se, x);
456
+ const j = s.split(":"), le = j[0], x = j[1];
457
+ [...n.value].findIndex((t) => (console.log(`${t.value} === ${x} is ${t.value === x}`), t.value === x)) > -1 || _(n.value.length, le, x);
457
458
  }
458
459
  }
459
- function re(n) {
460
- n.preventDefault();
460
+ function se(r) {
461
+ r.preventDefault();
461
462
  }
462
- return () => b("div", {
463
- class: $.value,
464
- onDrop: ne,
465
- onDragover: re
466
- }, [b("ul", {
463
+ return () => T("div", {
464
+ class: M.value,
465
+ onDrop: re,
466
+ onDragover: se
467
+ }, [T("ul", {
467
468
  ref: f,
468
469
  class: z.value,
469
- onWheel: (n) => ae(n)
470
+ onWheel: (r) => ne(r)
470
471
  }, [J()])]);
471
472
  }
472
473
  });
473
- function Ge(a, e, v) {
474
- var R;
474
+ function Qe(a, e, v) {
475
+ var L;
475
476
  function g() {
476
477
  }
477
- const r = "", h = "", w = i();
478
- function O() {
478
+ const n = "", h = "", y = i();
479
+ function w() {
479
480
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
480
481
  }
481
482
  function C() {
@@ -492,14 +493,14 @@ function Ge(a, e, v) {
492
493
  return null;
493
494
  if (m.value.schema && m.value.schema.type === "component")
494
495
  return m.value;
495
- const A = i(m == null ? void 0 : m.value.parent), k = d(A);
496
- return k || null;
496
+ const O = i(m == null ? void 0 : m.value.parent), A = d(O);
497
+ return A || null;
497
498
  }
498
499
  function f(m = e) {
499
- const { componentInstance: A, designerItemElementRef: k } = m;
500
- return !A || !A.value ? null : A.value.canMove ? k : f(m.parent);
500
+ const { componentInstance: O, designerItemElementRef: A } = m;
501
+ return !O || !O.value ? null : O.value.canMove ? A : f(m.parent);
501
502
  }
502
- function T(m) {
503
+ function k(m) {
503
504
  return !!v;
504
505
  }
505
506
  function D() {
@@ -507,64 +508,64 @@ function Ge(a, e, v) {
507
508
  }
508
509
  function B() {
509
510
  }
510
- function E(m, A) {
511
+ function P(m, O) {
511
512
  }
512
- function y(m) {
513
+ function b(m, O) {
513
514
  const { componentType: A } = m;
514
- let k = ie(A, m);
515
- const $ = A.toLowerCase().replace("-", "_");
516
- return k && !k.id && k.type === A && (k.id = `${$}_${Math.random().toString().slice(2, 6)}`), k;
515
+ let M = ie(A, m, O);
516
+ const V = A.toLowerCase().replace("-", "_");
517
+ return M && !M.id && M.type === A && (M.id = `${V}_${Math.random().toString().slice(2, 6)}`), M;
517
518
  }
518
- function N(m, A) {
519
- const k = String(m.getAttribute("data-controltype")), $ = m.getAttribute("data-feature"), W = $ ? JSON.parse($) : {};
520
- W.parentComponentInstance = w.value;
521
- let L = ie(k, W);
522
- const H = k.toLowerCase().replace("-", "_");
523
- return L && !L.id && L.type === k && (L.id = `${H}_${Math.random().toString().slice(2, 6)}`), L;
519
+ function $(m, O) {
520
+ const A = String(m.getAttribute("data-controltype")), M = m.getAttribute("data-feature"), V = M ? JSON.parse(M) : {};
521
+ V.parentComponentInstance = y.value;
522
+ let R = ie(A, V);
523
+ const H = A.toLowerCase().replace("-", "_");
524
+ return R && !R.id && R.type === A && (R.id = `${H}_${Math.random().toString().slice(2, 6)}`), R;
524
525
  }
525
- function V(m) {
526
+ function F(m) {
526
527
  }
527
- function F(...m) {
528
+ function W(...m) {
528
529
  }
529
- return w.value = {
530
- canMove: O(),
530
+ return y.value = {
531
+ canMove: w(),
531
532
  canSelectParent: C(),
532
533
  canDelete: c(),
533
534
  canNested: !p(),
534
535
  contents: e == null ? void 0 : e.schema.contents,
535
536
  elementRef: a,
536
- parent: (R = e == null ? void 0 : e.parent) == null ? void 0 : R.componentInstance,
537
+ parent: (L = e == null ? void 0 : e.parent) == null ? void 0 : L.componentInstance,
537
538
  schema: e == null ? void 0 : e.schema,
538
- styles: r,
539
+ styles: n,
539
540
  designerClass: h,
540
- canAccepts: T,
541
+ canAccepts: k,
541
542
  getBelongedComponentInstance: d,
542
543
  getDraggableDesignItemElement: f,
543
544
  getDraggingDisplayText: D,
544
- getPropConfig: F,
545
+ getPropConfig: W,
545
546
  getDragScopeElement: B,
546
- onAcceptMovedChildElement: E,
547
- onAcceptNewChildElement: N,
548
- onChildElementMovedOut: V,
549
- addNewChildComponentSchema: y,
547
+ onAcceptMovedChildElement: P,
548
+ onAcceptNewChildElement: $,
549
+ onChildElementMovedOut: F,
550
+ addNewChildComponentSchema: b,
550
551
  updateDragAndDropRules: g,
551
552
  triggerBelongedComponentToMoveWhenMoved: i(!1),
552
553
  triggerBelongedComponentToDeleteWhenDeleted: i(!1)
553
- }, w;
554
+ }, y;
554
555
  }
555
- const Qe = /* @__PURE__ */ ye({
556
+ const Ue = /* @__PURE__ */ he({
556
557
  name: "FTagsDesign",
557
558
  props: de,
558
559
  emits: ["remove", "selectionChange", "change"],
559
560
  setup(a, e) {
560
- const v = i(a.selectable), g = i(a.customClass), r = i(a.data), h = i(a.tagType), w = i(a.tagStyle), O = i(a.showColor), C = i(a.activeTag), c = i(a.customStyle), p = i(a.showClose), d = i(a.showAddButton), f = i(a.showInput), T = i(a.addButtonText), D = i(a.enableAddButton);
561
+ const v = i(a.selectable), g = i(a.customClass), n = i(a.data), h = i(a.tagType), y = i(a.tagStyle), w = i(a.showColor), C = i(a.activeTag), c = i(a.customStyle), p = i(a.showClose), d = i(a.showAddButton), f = i(a.showInput), k = i(a.addButtonText), D = i(a.enableAddButton);
561
562
  i(a.placeholder), i(""), i();
562
- const B = i(), E = i(a.wrapText), y = i(), N = i(), V = we("design-item-context"), F = Ge(N, V);
563
- De(() => {
564
- N.value.componentInstance = F;
565
- }), e.expose(F.value);
566
- function R() {
567
- const t = r.value.map((l) => ({
563
+ const B = i(), P = i(a.wrapText), b = i(), $ = i(), F = De("design-item-context"), W = Qe($, F);
564
+ Be(() => {
565
+ $.value.componentInstance = W;
566
+ }), e.expose(W.value);
567
+ function L() {
568
+ const t = n.value.map((l) => ({
568
569
  type: "Tag",
569
570
  payload: l
570
571
  }));
@@ -572,31 +573,31 @@ const Qe = /* @__PURE__ */ ye({
572
573
  type: "AddButton"
573
574
  }), t;
574
575
  }
575
- const m = i(R());
576
- function A(t) {
577
- r.value = t, m.value = R();
576
+ const m = i(L());
577
+ function O(t) {
578
+ n.value = t, m.value = L();
578
579
  }
579
- const k = P(() => m.value.findIndex((t) => t.type === "Input")), $ = ke(a, e, r, m), {
580
- dragstart: W,
581
- dragenter: L,
580
+ const A = I(() => m.value.findIndex((t) => t.type === "Input")), M = ke(a, e, n, m), {
581
+ dragstart: V,
582
+ dragenter: R,
582
583
  dragover: H,
583
- dragend: G
584
- } = $;
585
- q(() => a.data, (t) => A(t));
586
- const Q = P(() => {
584
+ dragend: Q
585
+ } = M;
586
+ q(() => a.data, (t) => O(t));
587
+ const U = I(() => {
587
588
  const t = {
588
589
  "farris-tags": !0,
589
590
  "farris-tags-checkable": v.value,
590
- "farris-tags-nowrap": !E.value
591
+ "farris-tags-nowrap": !P.value
591
592
  };
592
593
  return g.value.split(" ").reduce((l, o) => (l[o] = !0, l), t), t;
593
594
  });
594
- function U(t) {
595
+ function Y(t) {
595
596
  const l = {
596
597
  "farris-tag-item": !0,
597
598
  "farris-tag-item-checked": v.value && t.checked,
598
599
  "farris-tag-item-checkable": v.value,
599
- "farris-tag-item-has-color": O.value,
600
+ "farris-tag-item-has-color": w.value,
600
601
  "farris-tag-item-actived": C.value === t.name
601
602
  };
602
603
  if (h.value) {
@@ -605,23 +606,23 @@ const Qe = /* @__PURE__ */ ye({
605
606
  }
606
607
  return l;
607
608
  }
608
- const Y = P(() => {
609
+ const Z = I(() => {
609
610
  const t = {};
610
611
  return c.value && c.value.split(";").reduce((l, o) => {
611
612
  const S = o.split(":");
612
613
  return l[S[0]] = S[1], l;
613
614
  }, t), t;
614
615
  });
615
- function Z(t, l) {
616
- v.value && l.selectable && (l.checked = !l.checked, C.value = l.checked ? l.name : "", l.checked && r.value.filter((o) => o.name !== l.name).forEach((o) => {
616
+ function K(t, l) {
617
+ v.value && l.selectable && (l.checked = !l.checked, C.value = l.checked ? l.name : "", l.checked && n.value.filter((o) => o.name !== l.name).forEach((o) => {
617
618
  o.checked = !l.checked;
618
- }), e.emit("change", r.value), e.emit("selectionChange", l));
619
+ }), e.emit("change", n.value), e.emit("selectionChange", l));
619
620
  }
620
621
  function _(t, l) {
621
622
  let o;
622
623
  switch (t.key) {
623
624
  case "Backspace":
624
- r.value = r.value.filter((S) => S.name !== l.name), e.emit("change", r.value);
625
+ n.value = n.value.filter((S) => S.name !== l.name), e.emit("change", n.value);
625
626
  break;
626
627
  case "ArrowLeft":
627
628
  o = Math.max(B.value.scrollLeft + 20, 0), B.value.scrollLeft = o;
@@ -631,93 +632,93 @@ const Qe = /* @__PURE__ */ ye({
631
632
  }
632
633
  }
633
634
  function X(t, l) {
634
- const o = r.value.findIndex((S) => S.name === l.name);
635
+ const o = n.value.findIndex((S) => S.name === l.name);
635
636
  if (o > -1) {
636
- const [S] = r.value.splice(o, 1);
637
- m.value = R(), e.emit("change", r.value), e.emit("remove", r.value, S, o);
637
+ const [S] = n.value.splice(o, 1);
638
+ m.value = L(), e.emit("change", n.value), e.emit("remove", n.value, S, o);
638
639
  }
639
640
  t.stopPropagation();
640
641
  }
641
- const K = P(() => ({
642
+ const ee = I(() => ({
642
643
  "farris-tag-item": !0,
643
644
  "farris-tag-add-button": !0,
644
645
  "farris-tag-add-button-disabled": !D.value
645
646
  }));
646
- function pe(t) {
647
+ function ge(t) {
647
648
  }
648
- function ee() {
649
- return b("li", {
650
- class: K.value,
649
+ function te() {
650
+ return T("li", {
651
+ class: ee.value,
651
652
  onClick: (t) => void 0
652
- }, [b("span", {
653
+ }, [T("span", {
653
654
  class: "f-icon f-icon-amplification"
654
- }, null), b("span", {
655
+ }, null), T("span", {
655
656
  class: "farris-tag-add-text"
656
- }, [T.value])]);
657
+ }, [k.value])]);
657
658
  }
658
- function te(t) {
659
+ function ae(t) {
659
660
  if (t && !t.innerText) {
660
- const l = k.value;
661
+ const l = A.value;
661
662
  if (l > 0) {
662
- const [o] = r.value.splice(l - 1, 1);
663
- m.value.splice(l - 1, 1), e.emit("remove", r.value, o, l - 1);
663
+ const [o] = n.value.splice(l - 1, 1);
664
+ m.value.splice(l - 1, 1), e.emit("remove", n.value, o, l - 1);
664
665
  }
665
666
  }
666
667
  }
667
668
  function J(t, l, o) {
668
- t > -1 && (r.value.splice(t, 0, {
669
+ t > -1 && (n.value.splice(t, 0, {
669
670
  name: l,
670
671
  value: o,
671
672
  selectable: v.value
672
- }), m.value = R(), e.emit("change", r.value));
673
+ }), m.value = L(), e.emit("change", n.value));
673
674
  }
674
675
  function z(t) {
675
676
  if (t && t.innerText) {
676
- const l = t.innerText, o = k.value;
677
+ const l = t.innerText, o = A.value;
677
678
  J(o, l, l), t.innerText = "";
678
679
  }
679
680
  }
680
- function ae(t) {
681
+ function ne(t) {
681
682
  const l = t.target;
682
- l && (l.innerText ? z(l) : e.emit("change", r.value));
683
+ l && (l.innerText ? z(l) : e.emit("change", n.value));
683
684
  }
684
- function ne(t) {
685
- t.key === "Enter" && z(t.target), t.key === "Backspace" && (te(t.target), ue(() => {
685
+ function re(t) {
686
+ t.key === "Enter" && z(t.target), t.key === "Backspace" && (ae(t.target), ue(() => {
686
687
  var l;
687
- y.value && ((l = y.value) == null || l.focus());
688
+ b.value && ((l = b.value) == null || l.focus());
688
689
  }));
689
690
  }
690
- function re() {
691
- return b("li", {
691
+ function se() {
692
+ return T("li", {
692
693
  class: "farris-tag-input-box"
693
- }, [b("div", {
694
- ref: y,
694
+ }, [T("div", {
695
+ ref: b,
695
696
  class: "form-control",
696
697
  contenteditable: "true",
697
- onKeyup: ne,
698
- onBlur: ae
698
+ onKeyup: re,
699
+ onBlur: ne
699
700
  }, null)]);
700
701
  }
701
- function n(t, l) {
702
- return b("li", {
703
- class: U(t),
704
- style: Y.value,
702
+ function r(t, l) {
703
+ return T("li", {
704
+ class: Y(t),
705
+ style: Z.value,
705
706
  tabindex: 0,
706
707
  id: t.name,
707
708
  key: t.name,
708
- onClick: (o) => Z(o, t),
709
+ onClick: (o) => K(o, t),
709
710
  onKeydown: (o) => _(o, t),
710
711
  draggable: "true",
711
- onDragstart: (o) => W(o, t, l),
712
- onDragenter: (o) => L(o, l),
713
- onDragend: (o) => G(o, t),
712
+ onDragstart: (o) => V(o, t, l),
713
+ onDragenter: (o) => R(o, l),
714
+ onDragend: (o) => Q(o, t),
714
715
  onDragover: (o) => H(o, l)
715
- }, [b("div", {
716
+ }, [T("div", {
716
717
  title: t.name,
717
718
  class: "tag-box"
718
- }, [t.name]), p.value && b("span", {
719
+ }, [t.name]), p.value && T("span", {
719
720
  class: "tag-delete"
720
- }, [b("i", {
721
+ }, [T("i", {
721
722
  class: "f-icon f-icon-close",
722
723
  onClick: (o) => X(o, t)
723
724
  }, null)])]);
@@ -726,28 +727,28 @@ const Qe = /* @__PURE__ */ ye({
726
727
  return m.value.map((t, l) => {
727
728
  switch (t.type) {
728
729
  case "Tag":
729
- return n(t.payload, l);
730
+ return r(t.payload, l);
730
731
  case "AddButton":
731
- return ee();
732
+ return te();
732
733
  case "Input":
733
- return re();
734
+ return se();
734
735
  }
735
736
  });
736
737
  }
737
- const u = P(() => ({
738
+ const u = I(() => ({
738
739
  "farris-tags-item-container": !0,
739
- "farris-tag-item-capsule": w.value === "capsule"
740
+ "farris-tag-item-capsule": y.value === "capsule"
740
741
  }));
741
742
  function j(t) {
742
743
  const l = Math.max(B.value.scrollLeft - t.deltaX, 0);
743
744
  B.value.scrollLeft = l;
744
745
  }
745
- function se(t) {
746
- const l = B.value, o = r.value.length - 1;
746
+ function le(t) {
747
+ const l = B.value, o = n.value.length - 1;
747
748
  if (l) {
748
- const S = Array.from(l.children).filter((I) => I.className.indexOf("farris-tag-item") > -1).findIndex((I) => {
749
- const M = I.getBoundingClientRect(), le = window.getComputedStyle(I), me = parseInt(le["margin-left"], 10) + M.width + parseInt(le["margin-right"], 10);
750
- return M.left + me > t;
749
+ const S = Array.from(l.children).filter((N) => N.className.indexOf("farris-tag-item") > -1).findIndex((N) => {
750
+ const E = N.getBoundingClientRect(), oe = window.getComputedStyle(N), me = parseInt(oe["margin-left"], 10) + E.width + parseInt(oe["margin-right"], 10);
751
+ return E.left + me > t;
751
752
  });
752
753
  if (S > -1)
753
754
  return S;
@@ -756,53 +757,50 @@ const Qe = /* @__PURE__ */ ye({
756
757
  }
757
758
  function x(t) {
758
759
  if (f.value) {
759
- const o = se(t.clientX) + 1, I = m.value.filter((M) => M.type !== "Input");
760
- I.splice(o, 0, {
760
+ const o = le(t.clientX) + 1, N = m.value.filter((E) => E.type !== "Input");
761
+ N.splice(o, 0, {
761
762
  type: "Input"
762
- }), m.value = I, ue(() => {
763
- var M;
764
- y.value && ((M = y.value) == null || M.focus());
763
+ }), m.value = N, ue(() => {
764
+ var E;
765
+ b.value && ((E = b.value) == null || E.focus());
765
766
  });
766
767
  }
767
768
  }
768
- function ge(t) {
769
+ function pe(t) {
769
770
  var o;
770
771
  t.preventDefault(), t.stopPropagation();
771
772
  const l = (o = t.dataTransfer) == null ? void 0 : o.getData("Text");
772
773
  if (l) {
773
- const S = l.split(":"), I = S[0], M = S[1];
774
- [...r.value].findIndex((oe) => (console.log(`${oe.value} === ${M} is ${oe.value === M}`), oe.value === M)) > -1 || J(r.value.length, I, M);
774
+ const S = l.split(":"), N = S[0], E = S[1];
775
+ [...n.value].findIndex((ce) => (console.log(`${ce.value} === ${E} is ${ce.value === E}`), ce.value === E)) > -1 || J(n.value.length, N, E);
775
776
  }
776
777
  }
777
778
  function ve(t) {
778
779
  t.preventDefault();
779
780
  }
780
- return () => b("div", {
781
- ref: N,
782
- class: Q.value,
781
+ return () => T("div", {
782
+ ref: $,
783
+ class: U.value,
783
784
  onClick: x,
784
- onDrop: ge,
785
+ onDrop: pe,
785
786
  onDragover: ve
786
- }, [b("ul", {
787
+ }, [T("ul", {
787
788
  ref: B,
788
789
  class: u.value,
789
790
  onWheel: (t) => j(t)
790
791
  }, [s()])]);
791
792
  }
792
- }), Ze = {
793
- install(a) {
794
- a.component(ce.name, ce);
795
- },
796
- register(a, e, v, g) {
797
- a.tags = ce, e.tags = he;
798
- },
799
- registerDesigner(a, e, v) {
800
- a.tags = Qe, e.tags = he;
801
- }
793
+ });
794
+ G.register = (a, e, v, g) => {
795
+ a.tags = G, e.tags = Te;
796
+ };
797
+ G.registerDesigner = (a, e, v) => {
798
+ a.tags = Ue, e.tags = Te;
802
799
  };
800
+ const et = we(G);
803
801
  export {
804
- ce as FTags,
805
- Ze as default,
806
- he as propsResolver,
802
+ G as FTags,
803
+ et as default,
804
+ Te as propsResolver,
807
805
  de as tagsProps
808
806
  };