@farris/ui-vue 1.3.5 → 1.3.6

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