@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,35 +1,35 @@
1
1
  import { withInstall as De } from "../common/index.esm.js";
2
- import { ref as i, defineComponent as ye, computed as I, watch as q, nextTick as ue, createVNode as T, inject as Be, onMounted as Ae } from "vue";
3
- import { isPlainObject as he, cloneDeep as Ce } from "lodash-es";
2
+ import { ref as i, defineComponent as he, computed as R, watch as F, nextTick as ue, createVNode as T, inject as Be, onMounted as Ae } from "vue";
3
+ import { isPlainObject as me, cloneDeep as Ce } from "lodash-es";
4
4
  function Se(a, e, v) {
5
5
  return e;
6
6
  }
7
- const be = {}, Te = {};
8
- function fe(a) {
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]) : Ce(e[w].default)), y), {});
10
- return (!n || !g.find((y) => y == "id")) && (h.id = `${v}-${Date.now()}`), h;
7
+ const ye = {}, be = {};
8
+ function ie(a) {
9
+ const { properties: e, title: v, ignore: g } = a, n = g && Array.isArray(g), m = Object.keys(e).reduce((y, D) => ((!n || !g.find((C) => C == D)) && (y[D] = e[D].type === "object" && e[D].properties ? ie(e[D]) : Ce(e[D].default)), y), {});
10
+ return v && (!n || !g.find((y) => y == "id")) && (m.id = `${v}-${Date.now()}`), m;
11
11
  }
12
- function ie(a, e = {}, v) {
13
- const g = be[a];
12
+ function Te(a, e = {}, v) {
13
+ const g = ye[a];
14
14
  if (g) {
15
- let n = fe(g);
16
- const h = Te[a];
17
- return n = h ? h({ getSchemaByType: ie }, n, e, v) : n, n;
15
+ let n = ie(g);
16
+ const m = be[a];
17
+ return n = m ? m({ getSchemaByType: Te }, n, e, v) : n, n;
18
18
  }
19
19
  return null;
20
20
  }
21
21
  function Oe(a, e) {
22
- const v = fe(e);
23
- return Object.keys(a).reduce((g, n) => (g[n] && he(g[n]) && he(a[n]) ? Object.assign(g[n], a[n]) : g[n] = a[n], g), v), v;
22
+ const v = ie(e);
23
+ return Object.keys(a).reduce((g, n) => (g[n] && me(g[n]) && me(a[n]) ? Object.assign(g[n], a[n]) : g[n] = a[n], g), v), v;
24
24
  }
25
25
  function je(a, e) {
26
26
  return Object.keys(a).filter((g) => a[g] != null).reduce((g, n) => {
27
27
  if (e.has(n)) {
28
- const h = e.get(n);
29
- if (typeof h == "string")
30
- g[h] = a[n];
28
+ const m = e.get(n);
29
+ if (typeof m == "string")
30
+ g[m] = a[n];
31
31
  else {
32
- const y = h(n, a[n], a);
32
+ const y = m(n, a[n], a);
33
33
  Object.assign(g, y);
34
34
  }
35
35
  } else
@@ -46,13 +46,13 @@ function Ee(a = {}) {
46
46
  if (typeof d == "number")
47
47
  return f[c].length === d;
48
48
  if (typeof d == "object") {
49
- const k = Object.keys(d)[0], D = d[k];
49
+ const k = Object.keys(d)[0], B = d[k];
50
50
  if (k === "not")
51
- return Number(f[c].length) !== Number(D);
51
+ return Number(f[c].length) !== Number(B);
52
52
  if (k === "moreThan")
53
- return Number(f[c].length) >= Number(D);
53
+ return Number(f[c].length) >= Number(B);
54
54
  if (k === "lessThan")
55
- return Number(f[c].length) <= Number(D);
55
+ return Number(f[c].length) <= Number(B);
56
56
  }
57
57
  return !1;
58
58
  }
@@ -69,11 +69,11 @@ function Ee(a = {}) {
69
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) => {
70
70
  if (f === "length")
71
71
  return { target: d, operator: "length", param: null, value: p[f] };
72
- const k = f, D = p[f];
73
- return { target: d, operator: "getProperty", param: k, value: D };
72
+ const k = f, B = p[f];
73
+ return { target: d, operator: "getProperty", param: k, value: B };
74
74
  }) : [];
75
75
  }
76
- function h(c) {
76
+ function m(c) {
77
77
  return Object.keys(c).reduce((d, f) => {
78
78
  const k = n(f, c[f]);
79
79
  return d.push(...k), d;
@@ -86,28 +86,28 @@ function Ee(a = {}) {
86
86
  }
87
87
  return !1;
88
88
  }
89
- function w(c, p) {
90
- return h(c).reduce((k, D) => k && y(D, p), !0);
89
+ function D(c, p) {
90
+ return m(c).reduce((k, B) => k && y(B, p), !0);
91
91
  }
92
92
  function C(c, p) {
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));
93
+ const d = Object.keys(c), f = d.includes("allOf"), k = d.includes("anyOf"), B = f || k, b = (B ? c[B ? f ? "allOf" : "anyOf" : "allOf"] : [c]).map((N) => D(N, p));
94
94
  return f ? !b.includes(!1) : b.includes(!0);
95
95
  }
96
96
  return { parseValueSchema: C };
97
97
  }
98
- const Pe = {}, Ie = {};
98
+ const Pe = {}, Re = {};
99
99
  Ee();
100
- function Le(a, e, v = /* @__PURE__ */ new Map(), g = (y, w, C) => w, n = {}, h = (y) => y) {
101
- return be[e.title] = e, Te[e.title] = g, Pe[e.title] = n, Ie[e.title] = h, (y = {}) => {
102
- const w = Me(y, e, v), C = Object.keys(a).reduce((c, p) => (c[p] = a[p].default, c), {});
103
- return Object.assign(C, w);
100
+ function Ie(a, e, v = /* @__PURE__ */ new Map(), g = (y, D, C) => D, n = {}, m = (y) => y) {
101
+ return ye[e.title] = e, be[e.title] = g, Pe[e.title] = n, Re[e.title] = m, (y = {}) => {
102
+ const D = Me(y, e, v), C = Object.keys(a).reduce((c, p) => (c[p] = a[p].default, c), {});
103
+ return Object.assign(C, D);
104
104
  };
105
105
  }
106
- function Re(a, e) {
106
+ function Le(a, e) {
107
107
  return { customClass: e.class, customStyle: e.style };
108
108
  }
109
109
  const Ne = /* @__PURE__ */ new Map([
110
- ["appearance", Re]
110
+ ["appearance", Le]
111
111
  ]), $e = "tags", Ve = "A Farris Component", Fe = "object", We = {
112
112
  basic: {
113
113
  description: "Basic Infomation",
@@ -130,12 +130,12 @@ const Ne = /* @__PURE__ */ new Map([
130
130
  }
131
131
  }
132
132
  }
133
- }, xe = {
133
+ }, qe = {
134
134
  title: $e,
135
135
  description: Ve,
136
136
  type: Fe,
137
137
  categories: We
138
- }, qe = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-design.gitee.io/tags.schema.json", _e = "tags", Xe = "A Farris Component", Je = "object", ze = {
138
+ }, He = "https://json-schema.org/draft/2020-12/schema", xe = "https://farris-design.gitee.io/tags.schema.json", Xe = "tags", _e = "A Farris Component", ze = "object", Ge = {
139
139
  id: {
140
140
  description: "The unique identifier for tags",
141
141
  type: "string"
@@ -197,18 +197,18 @@ const Ne = /* @__PURE__ */ new Map([
197
197
  type: "boolean",
198
198
  default: !0
199
199
  }
200
- }, Ge = [
200
+ }, Je = [
201
201
  "id",
202
202
  "type"
203
203
  ], Qe = {
204
- $schema: qe,
205
- $id: He,
206
- title: _e,
207
- description: Xe,
208
- type: Je,
209
- properties: ze,
210
- required: Ge
211
- }, de = {
204
+ $schema: He,
205
+ $id: xe,
206
+ title: Xe,
207
+ description: _e,
208
+ type: ze,
209
+ properties: Ge,
210
+ required: Je
211
+ }, fe = {
212
212
  activeTag: { type: String, default: "" },
213
213
  addButtonText: { type: String, default: "" },
214
214
  customClass: { type: String, default: "" },
@@ -224,15 +224,15 @@ const Ne = /* @__PURE__ */ new Map([
224
224
  wrapText: { type: Boolean, default: !1 },
225
225
  draggable: { type: Boolean, default: !1 },
226
226
  disable: { type: Boolean, default: !1 }
227
- }, ke = Le(de, Qe, Ne, Se, xe);
227
+ }, ke = Ie(fe, Qe, Ne, Se, qe);
228
228
  function we(a, e, v, g) {
229
- const n = i(-1), h = i(!1);
229
+ const n = i(-1), m = i(!1);
230
230
  function y(p, d, f) {
231
231
  p.stopPropagation(), d && setTimeout(() => {
232
- n.value = f, h.value = !0, d.moving = !0;
232
+ n.value = f, m.value = !0, d.moving = !0;
233
233
  });
234
234
  }
235
- function w(p, d) {
235
+ function D(p, d) {
236
236
  if (p.preventDefault(), n.value !== d) {
237
237
  const f = g.value[n.value], k = g.value;
238
238
  k.splice(n.value, 1), k.splice(d, 0, f), n.value = d;
@@ -242,99 +242,99 @@ function we(a, e, v, g) {
242
242
  p.preventDefault(), p.dataTransfer && (p.dataTransfer.dropEffect = "move");
243
243
  }
244
244
  function c(p, d) {
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
+ d && (d.moving = !1), v.value = g.value.filter((f) => f.type === "Tag").map((f) => f.payload), m.value = !1, e.emit("change", v.value);
246
246
  }
247
247
  return {
248
248
  dragstart: y,
249
- dragenter: w,
249
+ dragenter: D,
250
250
  dragover: C,
251
251
  dragend: c,
252
- isDragging: h
252
+ isDragging: m
253
253
  };
254
254
  }
255
- const G = /* @__PURE__ */ ye({
255
+ const _ = /* @__PURE__ */ he({
256
256
  name: "FTags",
257
- props: de,
257
+ props: fe,
258
258
  emits: ["remove", "selectionChange", "change"],
259
259
  setup(a, e) {
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
+ const v = i(a.selectable), g = i(a.customClass), n = i(a.data), m = i(a.tagType), y = i(a.tagStyle), D = 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), B = i();
261
261
  i(a.disable);
262
- const B = i(!1);
263
- function P() {
264
- const r = n.value.map((s) => ({
262
+ const A = i(!1);
263
+ function E() {
264
+ const s = n.value.map((l) => ({
265
265
  type: "Tag",
266
- payload: s
266
+ payload: l
267
267
  }));
268
- return a.showAddButton && r.push({
268
+ return a.showAddButton && s.push({
269
269
  type: "AddButton"
270
- }), r;
271
- }
272
- const b = i(P());
273
- function $(r) {
274
- n.value = r, b.value = P();
275
- }
276
- const F = I(() => b.value.findIndex((r) => r.type === "Input")), W = we(a, e, n, b), {
277
- dragstart: L,
278
- dragenter: m,
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, {
270
+ }), s;
271
+ }
272
+ const b = i(E());
273
+ function L(s) {
274
+ n.value = s, b.value = E();
275
+ }
276
+ const N = R(() => b.value.findIndex((s) => s.type === "Input")), $ = we(a, e, n, b), {
277
+ dragstart: h,
278
+ dragenter: w,
279
+ dragover: j,
280
+ dragend: P
281
+ } = $;
282
+ F(() => a.data, (s) => L(s)), F(() => a.showAddButton, () => {
283
+ b.value = E();
284
+ }), F(() => a.disable, (s) => {
285
+ b.value = E();
286
+ }), F(() => a.activeTag, (s) => {
287
+ c.value = s;
288
+ }), F(A, (s) => {
289
+ const l = [...b.value];
290
+ s ? l.length > 0 && l[l.length - 1].type !== "Input" && (l.splice(l.length - 1, 1), l.splice(l.length, 0, {
291
291
  type: "Input"
292
- }), b.value = s, ue(() => {
292
+ }), b.value = l, ue(() => {
293
293
  var u;
294
- D.value && ((u = D.value) == null || u.focus());
295
- })) : s.length > 0 && s[s.length - 1].type !== "AddButton" && (s.splice(s.length - 1, 1), s.splice(s.length, 0, {
294
+ B.value && ((u = B.value) == null || u.focus());
295
+ })) : l.length > 0 && l[l.length - 1].type !== "AddButton" && (l.splice(l.length - 1, 1), l.splice(l.length, 0, {
296
296
  type: "AddButton"
297
- }), b.value = s);
297
+ }), b.value = l);
298
298
  });
299
- const M = I(() => {
300
- const r = {
299
+ const W = R(() => {
300
+ const s = {
301
301
  "farris-tags": !0,
302
302
  "farris-tags-checkable": v.value,
303
303
  "farris-tags-nowrap": !k.value
304
304
  };
305
- return g.value.split(" ").reduce((s, u) => (s[u] = !0, s), r), r;
305
+ return g.value.split(" ").reduce((l, u) => (l[u] = !0, l), s), s;
306
306
  });
307
- function V(r) {
308
- const s = {
307
+ function z(s) {
308
+ const l = {
309
309
  "farris-tag-item": !0,
310
- "farris-tag-item-checked": v.value && r.checked,
310
+ "farris-tag-item-checked": v.value && s.checked,
311
311
  "farris-tag-item-checkable": v.value,
312
- "farris-tag-item-has-color": w.value,
313
- "farris-tag-item-actived": c.value === r.name
312
+ "farris-tag-item-has-color": D.value,
313
+ "farris-tag-item-actived": c.value === s.name
314
314
  };
315
- if (h.value) {
316
- const u = `farris-tag-item-${h.value}`;
317
- s[u] = !0;
315
+ if (m.value) {
316
+ const u = `farris-tag-item-${m.value}`;
317
+ l[u] = !0;
318
318
  }
319
- return s;
320
- }
321
- const R = I(() => {
322
- const r = {};
323
- return C.value && C.value.split(";").reduce((s, u) => {
324
- const j = u.split(":");
325
- return s[j[0]] = j[1], s;
326
- }, r), r;
319
+ return l;
320
+ }
321
+ const G = R(() => {
322
+ const s = {};
323
+ return C.value && C.value.split(";").reduce((l, u) => {
324
+ const O = u.split(":");
325
+ return l[O[0]] = O[1], l;
326
+ }, s), s;
327
327
  });
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) => {
330
- u.checked = !s.checked;
331
- }), e.emit("change", n.value), e.emit("selectionChange", s));
328
+ function J(s, l) {
329
+ !a.disable && v.value && (!l.hasOwnProperty("selectable") || l.selectable) && (l.checked = !l.checked, c.value = l.checked ? l.name : "", l.checked && n.value.filter((u) => u.name !== l.name).forEach((u) => {
330
+ u.checked = !l.checked;
331
+ }), e.emit("change", n.value), e.emit("selectionChange", l));
332
332
  }
333
- function Q(r, s) {
333
+ function Q(s, l) {
334
334
  let u;
335
- switch (r.key) {
335
+ switch (s.key) {
336
336
  case "Backspace":
337
- n.value = n.value.filter((j) => j.name !== s.name), e.emit("change", n.value);
337
+ n.value = n.value.filter((O) => O.name !== l.name), e.emit("change", n.value);
338
338
  break;
339
339
  case "ArrowLeft":
340
340
  u = Math.max(f.value.scrollLeft + 20, 0), f.value.scrollLeft = u;
@@ -343,96 +343,96 @@ const G = /* @__PURE__ */ ye({
343
343
  u = Math.max(f.value.scrollLeft - 20, 0), f.value.scrollLeft = u;
344
344
  }
345
345
  }
346
- function U(r, s) {
347
- const u = n.value.findIndex((j) => j.name === s.name);
346
+ function U(s, l) {
347
+ const u = n.value.findIndex((O) => O.name === l.name);
348
348
  if (u > -1) {
349
- const [j] = n.value.splice(u, 1);
350
- b.value = P(), e.emit("change", n.value), e.emit("remove", {
349
+ const [O] = n.value.splice(u, 1);
350
+ b.value = E(), e.emit("change", n.value), e.emit("remove", {
351
351
  tags: n.value,
352
- remove: j
352
+ remove: O
353
353
  });
354
354
  }
355
- r.stopPropagation();
355
+ s.stopPropagation();
356
356
  }
357
- const Y = I(() => ({
357
+ const Y = R(() => ({
358
358
  "farris-tag-item": !0,
359
359
  "farris-tag-add-button": !0,
360
360
  "farris-tag-add-button-disabled": !a.enableAddButton
361
361
  }));
362
- function Z(r) {
363
- r.stopPropagation(), B.value = !0;
362
+ function Z(s) {
363
+ s.stopPropagation(), A.value = !0;
364
364
  }
365
365
  function K() {
366
366
  return !a.disable && T("li", {
367
367
  class: Y.value,
368
- onClick: (r) => Z(r)
368
+ onClick: (s) => Z(s)
369
369
  }, [T("span", {
370
370
  class: "f-icon f-icon-amplification"
371
371
  }, null), d.value && T("span", {
372
372
  class: "farris-tag-add-text"
373
373
  }, [d.value])]);
374
374
  }
375
- function _(r, s, u) {
376
- r > -1 && (n.value.splice(r, 0, {
377
- name: s,
375
+ function q(s, l, u) {
376
+ s > -1 && (n.value.splice(s, 0, {
377
+ name: l,
378
378
  value: u,
379
379
  selectable: v.value
380
- }), b.value = P(), B.value = !1, e.emit("change", n.value));
380
+ }), b.value = E(), A.value = !1, e.emit("change", n.value));
381
381
  }
382
- function X(r) {
383
- if (r && r.value) {
384
- const s = r.value, u = F.value;
385
- _(u, s, s), r.innerText = "";
382
+ function H(s) {
383
+ if (s && s.value) {
384
+ const l = s.value, u = N.value;
385
+ q(u, l, l), s.innerText = "";
386
386
  } else
387
- B.value = !1;
387
+ A.value = !1;
388
388
  }
389
- function ee(r) {
390
- const s = r.target;
391
- s && s.value ? X(s) : B.value = !1;
389
+ function ee(s) {
390
+ const l = s.target;
391
+ l && l.value ? H(l) : A.value = !1;
392
392
  }
393
- function ge(r) {
394
- r.key === "Enter" && X(r.target);
393
+ function de(s) {
394
+ s.key === "Enter" && H(s.target);
395
395
  }
396
396
  function te() {
397
397
  return !a.disable && T("li", {
398
398
  class: "farris-tag-input-box"
399
399
  }, [T("input", {
400
400
  title: "farris-tag-input-box",
401
- ref: D,
401
+ ref: B,
402
402
  class: "form-control",
403
- onKeyup: ge,
403
+ onKeyup: de,
404
404
  onBlur: ee
405
405
  }, null)]);
406
406
  }
407
- function ae(r, s) {
407
+ function ae(s, l) {
408
408
  return T("li", {
409
- class: V(r),
410
- style: R.value,
409
+ class: z(s),
410
+ style: G.value,
411
411
  tabindex: 0,
412
- id: r.name,
413
- key: r.name,
414
- onClick: (u) => H(u, r),
415
- onKeydown: (u) => Q(u, r),
412
+ id: s.name,
413
+ key: s.name,
414
+ onClick: (u) => J(u, s),
415
+ onKeydown: (u) => Q(u, s),
416
416
  draggable: "true",
417
- onDragstart: (u) => L(u, r, s),
418
- onDragenter: (u) => m(u, s),
419
- onDragend: (u) => A(u, r),
420
- onDragover: (u) => O(u, s)
417
+ onDragstart: (u) => h(u, s, l),
418
+ onDragenter: (u) => w(u, l),
419
+ onDragend: (u) => P(u, s),
420
+ onDragover: (u) => j(u, l)
421
421
  }, [T("span", {
422
- title: r.name,
422
+ title: s.name,
423
423
  class: "tag-box"
424
- }, [r.name]), !a.disable && p.value && T("span", {
424
+ }, [s.name]), !a.disable && p.value && T("span", {
425
425
  class: "tag-delete"
426
426
  }, [T("i", {
427
427
  class: "f-icon f-icon-close",
428
- onClick: (u) => U(u, r)
428
+ onClick: (u) => U(u, s)
429
429
  }, null)])]);
430
430
  }
431
- function J() {
432
- return b.value.map((r, s) => {
433
- switch (r.type) {
431
+ function x() {
432
+ return b.value.map((s, l) => {
433
+ switch (s.type) {
434
434
  case "Tag":
435
- return ae(r.payload, s);
435
+ return ae(s.payload, l);
436
436
  case "AddButton":
437
437
  return K();
438
438
  case "Input":
@@ -440,43 +440,43 @@ const G = /* @__PURE__ */ ye({
440
440
  }
441
441
  });
442
442
  }
443
- const z = I(() => ({
443
+ const X = R(() => ({
444
444
  "farris-tags-item-container": !0,
445
445
  "farris-tag-item-capsule": y.value === "capsule"
446
446
  }));
447
- function ne(r) {
448
- const s = Math.max(f.value.scrollLeft - r.deltaX, 0);
449
- f.value.scrollLeft = s;
447
+ function ne(s) {
448
+ const l = Math.max(f.value.scrollLeft - s.deltaX, 0);
449
+ f.value.scrollLeft = l;
450
450
  }
451
- function re(r) {
451
+ function se(s) {
452
452
  var u;
453
- r.preventDefault(), r.stopPropagation();
454
- const s = (u = r.dataTransfer) == null ? void 0 : u.getData("Text");
455
- if (s) {
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);
453
+ s.preventDefault(), s.stopPropagation();
454
+ const l = (u = s.dataTransfer) == null ? void 0 : u.getData("Text");
455
+ if (l) {
456
+ const O = l.split(":"), re = O[0], V = O[1];
457
+ [...n.value].findIndex((t) => (console.log(`${t.value} === ${V} is ${t.value === V}`), t.value === V)) > -1 || q(n.value.length, re, V);
458
458
  }
459
459
  }
460
- function se(r) {
461
- r.preventDefault();
460
+ function le(s) {
461
+ s.preventDefault();
462
462
  }
463
463
  return () => T("div", {
464
- class: M.value,
465
- onDrop: re,
466
- onDragover: se
464
+ class: W.value,
465
+ onDrop: se,
466
+ onDragover: le
467
467
  }, [T("ul", {
468
468
  ref: f,
469
- class: z.value,
470
- onWheel: (r) => ne(r)
471
- }, [J()])]);
469
+ class: X.value,
470
+ onWheel: (s) => ne(s)
471
+ }, [x()])]);
472
472
  }
473
473
  });
474
474
  function Ue(a, e, v) {
475
- var L;
475
+ var $;
476
476
  function g() {
477
477
  }
478
- const n = "", h = "", y = i();
479
- function w() {
478
+ const n = "", m = "", y = i();
479
+ function D() {
480
480
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
481
481
  }
482
482
  function C() {
@@ -488,163 +488,155 @@ function Ue(a, e, v) {
488
488
  function p() {
489
489
  return (e == null ? void 0 : e.schema.componentType) === "frame";
490
490
  }
491
- function d(m) {
492
- if (!m || !m.value)
491
+ function d(h) {
492
+ if (!h || !h.value)
493
493
  return null;
494
- if (m.value.schema && m.value.schema.type === "component")
495
- return m.value;
496
- const O = i(m == null ? void 0 : m.value.parent), A = d(O);
497
- return A || null;
494
+ if (h.value.schema && h.value.schema.type === "component")
495
+ return h.value;
496
+ const w = i(h == null ? void 0 : h.value.parent), j = d(w);
497
+ return j || null;
498
498
  }
499
- function f(m = e) {
500
- const { componentInstance: O, designerItemElementRef: A } = m;
501
- return !O || !O.value ? null : O.value.canMove ? A : f(m.parent);
499
+ function f(h = e) {
500
+ const { componentInstance: w, designerItemElementRef: j } = h;
501
+ return !w || !w.value ? null : w.value.canMove ? j : f(h.parent);
502
502
  }
503
- function k(m) {
503
+ function k(h) {
504
504
  return !!v;
505
505
  }
506
- function D() {
507
- return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
508
- }
509
506
  function B() {
507
+ return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
510
508
  }
511
- function P(m, O) {
509
+ function A() {
512
510
  }
513
- function b(m, O) {
514
- const { componentType: A } = m;
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;
511
+ function E(h, w) {
518
512
  }
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;
513
+ function b(h, w) {
514
+ const { componentType: j } = h;
515
+ let P = Te(j, h, w);
516
+ const W = j.toLowerCase().replace("-", "_");
517
+ return P && !P.id && P.type === j && (P.id = `${W}_${Math.random().toString().slice(2, 6)}`), P;
525
518
  }
526
- function F(m) {
519
+ function L(h) {
527
520
  }
528
- function W(...m) {
521
+ function N(...h) {
529
522
  }
530
523
  return y.value = {
531
- canMove: w(),
524
+ canMove: D(),
532
525
  canSelectParent: C(),
533
526
  canDelete: c(),
534
527
  canNested: !p(),
535
528
  contents: e == null ? void 0 : e.schema.contents,
536
529
  elementRef: a,
537
- parent: (L = e == null ? void 0 : e.parent) == null ? void 0 : L.componentInstance,
530
+ parent: ($ = e == null ? void 0 : e.parent) == null ? void 0 : $.componentInstance,
538
531
  schema: e == null ? void 0 : e.schema,
539
532
  styles: n,
540
- designerClass: h,
533
+ designerClass: m,
541
534
  canAccepts: k,
542
535
  getBelongedComponentInstance: d,
543
536
  getDraggableDesignItemElement: f,
544
- getDraggingDisplayText: D,
545
- getPropConfig: W,
546
- getDragScopeElement: B,
547
- onAcceptMovedChildElement: P,
548
- onAcceptNewChildElement: $,
549
- onChildElementMovedOut: F,
537
+ getDraggingDisplayText: B,
538
+ getPropConfig: N,
539
+ getDragScopeElement: A,
540
+ onAcceptMovedChildElement: E,
541
+ onChildElementMovedOut: L,
550
542
  addNewChildComponentSchema: b,
551
543
  updateDragAndDropRules: g,
552
544
  triggerBelongedComponentToMoveWhenMoved: i(!1),
553
545
  triggerBelongedComponentToDeleteWhenDeleted: i(!1)
554
546
  }, y;
555
547
  }
556
- const Ye = /* @__PURE__ */ ye({
548
+ const Ye = /* @__PURE__ */ he({
557
549
  name: "FTagsDesign",
558
- props: de,
550
+ props: fe,
559
551
  emits: ["remove", "selectionChange", "change"],
560
552
  setup(a, e) {
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);
553
+ const v = i(a.selectable), g = i(a.customClass), n = i(a.data), m = i(a.tagType), y = i(a.tagStyle), D = 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), B = i(a.enableAddButton);
562
554
  i(a.placeholder), i(""), i();
563
- const B = i(), P = i(a.wrapText), b = i(), $ = i(), F = Be("design-item-context"), W = Ue($, F);
555
+ const A = i(), E = i(a.wrapText), b = i(), L = i(), N = Be("design-item-context"), $ = Ue(L, N);
564
556
  Ae(() => {
565
- $.value.componentInstance = W;
566
- }), e.expose(W.value);
567
- function L() {
568
- const t = n.value.map((l) => ({
557
+ L.value.componentInstance = $;
558
+ }), e.expose($.value);
559
+ function h() {
560
+ const t = n.value.map((r) => ({
569
561
  type: "Tag",
570
- payload: l
562
+ payload: r
571
563
  }));
572
564
  return d.value && t.push({
573
565
  type: "AddButton"
574
566
  }), t;
575
567
  }
576
- const m = i(L());
577
- function O(t) {
578
- n.value = t, m.value = L();
568
+ const w = i(h());
569
+ function j(t) {
570
+ n.value = t, w.value = h();
579
571
  }
580
- const A = I(() => m.value.findIndex((t) => t.type === "Input")), M = we(a, e, n, m), {
581
- dragstart: V,
582
- dragenter: R,
583
- dragover: H,
572
+ const P = R(() => w.value.findIndex((t) => t.type === "Input")), W = we(a, e, n, w), {
573
+ dragstart: z,
574
+ dragenter: G,
575
+ dragover: J,
584
576
  dragend: Q
585
- } = M;
586
- q(() => a.data, (t) => O(t));
587
- const U = I(() => {
577
+ } = W;
578
+ F(() => a.data, (t) => j(t));
579
+ const U = R(() => {
588
580
  const t = {
589
581
  "farris-tags": !0,
590
582
  "farris-tags-checkable": v.value,
591
- "farris-tags-nowrap": !P.value
583
+ "farris-tags-nowrap": !E.value
592
584
  };
593
- return g.value.split(" ").reduce((l, o) => (l[o] = !0, l), t), t;
585
+ return g.value.split(" ").reduce((r, o) => (r[o] = !0, r), t), t;
594
586
  });
595
587
  function Y(t) {
596
- const l = {
588
+ const r = {
597
589
  "farris-tag-item": !0,
598
590
  "farris-tag-item-checked": v.value && t.checked,
599
591
  "farris-tag-item-checkable": v.value,
600
- "farris-tag-item-has-color": w.value,
592
+ "farris-tag-item-has-color": D.value,
601
593
  "farris-tag-item-actived": C.value === t.name
602
594
  };
603
- if (h.value) {
604
- const o = `farris-tag-item-${h.value}`;
605
- l[o] = !0;
595
+ if (m.value) {
596
+ const o = `farris-tag-item-${m.value}`;
597
+ r[o] = !0;
606
598
  }
607
- return l;
599
+ return r;
608
600
  }
609
- const Z = I(() => {
601
+ const Z = R(() => {
610
602
  const t = {};
611
- return c.value && c.value.split(";").reduce((l, o) => {
603
+ return c.value && c.value.split(";").reduce((r, o) => {
612
604
  const S = o.split(":");
613
- return l[S[0]] = S[1], l;
605
+ return r[S[0]] = S[1], r;
614
606
  }, t), t;
615
607
  });
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) => {
618
- o.checked = !l.checked;
619
- }), e.emit("change", n.value), e.emit("selectionChange", l));
608
+ function K(t, r) {
609
+ v.value && r.selectable && (r.checked = !r.checked, C.value = r.checked ? r.name : "", r.checked && n.value.filter((o) => o.name !== r.name).forEach((o) => {
610
+ o.checked = !r.checked;
611
+ }), e.emit("change", n.value), e.emit("selectionChange", r));
620
612
  }
621
- function _(t, l) {
613
+ function q(t, r) {
622
614
  let o;
623
615
  switch (t.key) {
624
616
  case "Backspace":
625
- n.value = n.value.filter((S) => S.name !== l.name), e.emit("change", n.value);
617
+ n.value = n.value.filter((S) => S.name !== r.name), e.emit("change", n.value);
626
618
  break;
627
619
  case "ArrowLeft":
628
- o = Math.max(B.value.scrollLeft + 20, 0), B.value.scrollLeft = o;
620
+ o = Math.max(A.value.scrollLeft + 20, 0), A.value.scrollLeft = o;
629
621
  break;
630
622
  case "ArrowRight":
631
- o = Math.max(B.value.scrollLeft - 20, 0), B.value.scrollLeft = o;
623
+ o = Math.max(A.value.scrollLeft - 20, 0), A.value.scrollLeft = o;
632
624
  }
633
625
  }
634
- function X(t, l) {
635
- const o = n.value.findIndex((S) => S.name === l.name);
626
+ function H(t, r) {
627
+ const o = n.value.findIndex((S) => S.name === r.name);
636
628
  if (o > -1) {
637
629
  const [S] = n.value.splice(o, 1);
638
- m.value = L(), e.emit("change", n.value), e.emit("remove", n.value, S, o);
630
+ w.value = h(), e.emit("change", n.value), e.emit("remove", n.value, S, o);
639
631
  }
640
632
  t.stopPropagation();
641
633
  }
642
- const ee = I(() => ({
634
+ const ee = R(() => ({
643
635
  "farris-tag-item": !0,
644
636
  "farris-tag-add-button": !0,
645
- "farris-tag-add-button-disabled": !D.value
637
+ "farris-tag-add-button-disabled": !B.value
646
638
  }));
647
- function ge(t) {
639
+ function de(t) {
648
640
  }
649
641
  function te() {
650
642
  return T("li", {
@@ -658,48 +650,48 @@ const Ye = /* @__PURE__ */ ye({
658
650
  }
659
651
  function ae(t) {
660
652
  if (t && !t.innerText) {
661
- const l = A.value;
662
- if (l > 0) {
663
- const [o] = n.value.splice(l - 1, 1);
664
- m.value.splice(l - 1, 1), e.emit("remove", n.value, o, l - 1);
653
+ const r = P.value;
654
+ if (r > 0) {
655
+ const [o] = n.value.splice(r - 1, 1);
656
+ w.value.splice(r - 1, 1), e.emit("remove", n.value, o, r - 1);
665
657
  }
666
658
  }
667
659
  }
668
- function J(t, l, o) {
660
+ function x(t, r, o) {
669
661
  t > -1 && (n.value.splice(t, 0, {
670
- name: l,
662
+ name: r,
671
663
  value: o,
672
664
  selectable: v.value
673
- }), m.value = L(), e.emit("change", n.value));
665
+ }), w.value = h(), e.emit("change", n.value));
674
666
  }
675
- function z(t) {
667
+ function X(t) {
676
668
  if (t && t.innerText) {
677
- const l = t.innerText, o = A.value;
678
- J(o, l, l), t.innerText = "";
669
+ const r = t.innerText, o = P.value;
670
+ x(o, r, r), t.innerText = "";
679
671
  }
680
672
  }
681
673
  function ne(t) {
682
- const l = t.target;
683
- l && (l.innerText ? z(l) : e.emit("change", n.value));
674
+ const r = t.target;
675
+ r && (r.innerText ? X(r) : e.emit("change", n.value));
684
676
  }
685
- function re(t) {
686
- t.key === "Enter" && z(t.target), t.key === "Backspace" && (ae(t.target), ue(() => {
687
- var l;
688
- b.value && ((l = b.value) == null || l.focus());
677
+ function se(t) {
678
+ t.key === "Enter" && X(t.target), t.key === "Backspace" && (ae(t.target), ue(() => {
679
+ var r;
680
+ b.value && ((r = b.value) == null || r.focus());
689
681
  }));
690
682
  }
691
- function se() {
683
+ function le() {
692
684
  return T("li", {
693
685
  class: "farris-tag-input-box"
694
686
  }, [T("div", {
695
687
  ref: b,
696
688
  class: "form-control",
697
689
  contenteditable: "true",
698
- onKeyup: re,
690
+ onKeyup: se,
699
691
  onBlur: ne
700
692
  }, null)]);
701
693
  }
702
- function r(t, l) {
694
+ function s(t, r) {
703
695
  return T("li", {
704
696
  class: Y(t),
705
697
  style: Z.value,
@@ -707,12 +699,12 @@ const Ye = /* @__PURE__ */ ye({
707
699
  id: t.name,
708
700
  key: t.name,
709
701
  onClick: (o) => K(o, t),
710
- onKeydown: (o) => _(o, t),
702
+ onKeydown: (o) => q(o, t),
711
703
  draggable: "true",
712
- onDragstart: (o) => V(o, t, l),
713
- onDragenter: (o) => R(o, l),
704
+ onDragstart: (o) => z(o, t, r),
705
+ onDragenter: (o) => G(o, r),
714
706
  onDragend: (o) => Q(o, t),
715
- onDragover: (o) => H(o, l)
707
+ onDragover: (o) => J(o, r)
716
708
  }, [T("div", {
717
709
  title: t.name,
718
710
  class: "tag-box"
@@ -720,87 +712,87 @@ const Ye = /* @__PURE__ */ ye({
720
712
  class: "tag-delete"
721
713
  }, [T("i", {
722
714
  class: "f-icon f-icon-close",
723
- onClick: (o) => X(o, t)
715
+ onClick: (o) => H(o, t)
724
716
  }, null)])]);
725
717
  }
726
- function s() {
727
- return m.value.map((t, l) => {
718
+ function l() {
719
+ return w.value.map((t, r) => {
728
720
  switch (t.type) {
729
721
  case "Tag":
730
- return r(t.payload, l);
722
+ return s(t.payload, r);
731
723
  case "AddButton":
732
724
  return te();
733
725
  case "Input":
734
- return se();
726
+ return le();
735
727
  }
736
728
  });
737
729
  }
738
- const u = I(() => ({
730
+ const u = R(() => ({
739
731
  "farris-tags-item-container": !0,
740
732
  "farris-tag-item-capsule": y.value === "capsule"
741
733
  }));
742
- function j(t) {
743
- const l = Math.max(B.value.scrollLeft - t.deltaX, 0);
744
- B.value.scrollLeft = l;
734
+ function O(t) {
735
+ const r = Math.max(A.value.scrollLeft - t.deltaX, 0);
736
+ A.value.scrollLeft = r;
745
737
  }
746
- function le(t) {
747
- const l = B.value, o = n.value.length - 1;
748
- if (l) {
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;
738
+ function re(t) {
739
+ const r = A.value, o = n.value.length - 1;
740
+ if (r) {
741
+ const S = Array.from(r.children).filter((I) => I.className.indexOf("farris-tag-item") > -1).findIndex((I) => {
742
+ const M = I.getBoundingClientRect(), oe = window.getComputedStyle(I), ve = parseInt(oe["margin-left"], 10) + M.width + parseInt(oe["margin-right"], 10);
743
+ return M.left + ve > t;
752
744
  });
753
745
  if (S > -1)
754
746
  return S;
755
747
  }
756
748
  return o;
757
749
  }
758
- function x(t) {
750
+ function V(t) {
759
751
  if (f.value) {
760
- const o = le(t.clientX) + 1, N = m.value.filter((E) => E.type !== "Input");
761
- N.splice(o, 0, {
752
+ const o = re(t.clientX) + 1, I = w.value.filter((M) => M.type !== "Input");
753
+ I.splice(o, 0, {
762
754
  type: "Input"
763
- }), m.value = N, ue(() => {
764
- var E;
765
- b.value && ((E = b.value) == null || E.focus());
755
+ }), w.value = I, ue(() => {
756
+ var M;
757
+ b.value && ((M = b.value) == null || M.focus());
766
758
  });
767
759
  }
768
760
  }
769
- function pe(t) {
761
+ function ge(t) {
770
762
  var o;
771
763
  t.preventDefault(), t.stopPropagation();
772
- const l = (o = t.dataTransfer) == null ? void 0 : o.getData("Text");
773
- if (l) {
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);
764
+ const r = (o = t.dataTransfer) == null ? void 0 : o.getData("Text");
765
+ if (r) {
766
+ const S = r.split(":"), I = S[0], M = S[1];
767
+ [...n.value].findIndex((ce) => (console.log(`${ce.value} === ${M} is ${ce.value === M}`), ce.value === M)) > -1 || x(n.value.length, I, M);
776
768
  }
777
769
  }
778
- function ve(t) {
770
+ function pe(t) {
779
771
  t.preventDefault();
780
772
  }
781
773
  return () => T("div", {
782
- ref: $,
774
+ ref: L,
783
775
  class: U.value,
784
- onClick: x,
785
- onDrop: pe,
786
- onDragover: ve
776
+ onClick: V,
777
+ onDrop: ge,
778
+ onDragover: pe
787
779
  }, [T("ul", {
788
- ref: B,
780
+ ref: A,
789
781
  class: u.value,
790
- onWheel: (t) => j(t)
791
- }, [s()])]);
782
+ onWheel: (t) => O(t)
783
+ }, [l()])]);
792
784
  }
793
785
  });
794
- G.register = (a, e, v, g) => {
795
- a.tags = G, e.tags = ke;
786
+ _.register = (a, e, v, g) => {
787
+ a.tags = _, e.tags = ke;
796
788
  };
797
- G.registerDesigner = (a, e, v) => {
789
+ _.registerDesigner = (a, e, v) => {
798
790
  a.tags = Ye, e.tags = ke;
799
791
  };
800
- const tt = De(G);
792
+ const tt = De(_);
801
793
  export {
802
- G as FTags,
794
+ _ as FTags,
803
795
  tt as default,
804
796
  ke as propsResolver,
805
- de as tagsProps
797
+ fe as tagsProps
806
798
  };