@farris/ui-vue 1.2.7 → 1.2.8
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.
- package/components/accordion/index.esm.js +79 -79
- package/components/avatar/index.esm.js +393 -440
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +452 -498
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +31630 -31224
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { ref as i, defineComponent as ye, computed as P, watch as q, nextTick as ue, createVNode as b, inject as we, onMounted as De } from "vue";
|
|
2
2
|
import { cloneDeep as Be } from "lodash-es";
|
|
3
|
-
function Ae(
|
|
3
|
+
function Ae(t, e, v) {
|
|
4
4
|
return e;
|
|
5
5
|
}
|
|
6
6
|
const be = {}, Te = {};
|
|
7
|
-
function fe(
|
|
8
|
-
const { properties: e, title: v } =
|
|
7
|
+
function fe(t) {
|
|
8
|
+
const { properties: e, title: v } = t, g = Object.keys(e).reduce((s, h) => (s[h] = e[h].type === "object" && e[h].properties ? fe(e[h]) : Be(e[h].default), s), {});
|
|
9
9
|
return g.id = `${v}-${Date.now()}`, g;
|
|
10
10
|
}
|
|
11
|
-
function ie(
|
|
12
|
-
const v = be[
|
|
11
|
+
function ie(t, e = {}) {
|
|
12
|
+
const v = be[t];
|
|
13
13
|
if (v) {
|
|
14
14
|
let g = fe(v);
|
|
15
|
-
const
|
|
16
|
-
return g =
|
|
15
|
+
const s = Te[t];
|
|
16
|
+
return g = s ? s({ getSchemaByType: ie }, g, e) : g, g;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Ce(t, e) {
|
|
21
21
|
const v = fe(e);
|
|
22
|
-
return Object.keys(
|
|
22
|
+
return Object.keys(t).reduce((g, s) => (g[s] && typeof g[s] == "object" ? Object.assign(g[s], t[s]) : g[s] = t[s], g), v), v;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return Object.keys(
|
|
26
|
-
if (e.has(
|
|
27
|
-
const h = e.get(
|
|
24
|
+
function Se(t, e) {
|
|
25
|
+
return Object.keys(t).filter((g) => t[g] != null).reduce((g, s) => {
|
|
26
|
+
if (e.has(s)) {
|
|
27
|
+
const h = e.get(s);
|
|
28
28
|
if (typeof h == "string")
|
|
29
|
-
g[h] =
|
|
29
|
+
g[h] = t[s];
|
|
30
30
|
else {
|
|
31
|
-
const w = h(
|
|
31
|
+
const w = h(s, t[s], t);
|
|
32
32
|
Object.assign(g, w);
|
|
33
33
|
}
|
|
34
34
|
} else
|
|
35
|
-
g[
|
|
35
|
+
g[s] = t[s];
|
|
36
36
|
return g;
|
|
37
37
|
}, {});
|
|
38
38
|
}
|
|
39
|
-
function Oe(
|
|
40
|
-
const g =
|
|
41
|
-
return
|
|
39
|
+
function Oe(t, e, v = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const g = Ce(t, e);
|
|
41
|
+
return Se(g, v);
|
|
42
42
|
}
|
|
43
|
-
function je(
|
|
43
|
+
function je(t = {}) {
|
|
44
44
|
function e(c, p, d, f) {
|
|
45
45
|
if (typeof d == "number")
|
|
46
46
|
return f[c].length === d;
|
|
@@ -62,8 +62,8 @@ function je(a = {}) {
|
|
|
62
62
|
["length", e],
|
|
63
63
|
["getProperty", v]
|
|
64
64
|
]);
|
|
65
|
-
Object.keys(
|
|
66
|
-
function
|
|
65
|
+
Object.keys(t).reduce((c, p) => (c.set(p, t[p]), c), g);
|
|
66
|
+
function s(c, p) {
|
|
67
67
|
const d = c;
|
|
68
68
|
return typeof p == "number" ? [{ target: d, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: d, operator: "getProperty", param: c, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
|
|
69
69
|
if (f === "length")
|
|
@@ -74,7 +74,7 @@ function je(a = {}) {
|
|
|
74
74
|
}
|
|
75
75
|
function h(c) {
|
|
76
76
|
return Object.keys(c).reduce((d, f) => {
|
|
77
|
-
const T =
|
|
77
|
+
const T = s(f, c[f]);
|
|
78
78
|
return d.push(...T), d;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
@@ -88,21 +88,21 @@ function je(a = {}) {
|
|
|
88
88
|
function O(c, p) {
|
|
89
89
|
return h(c).reduce((T, D) => T && w(D, p), !0);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function S(c, p) {
|
|
92
92
|
const d = Object.keys(c), f = d.includes("allOf"), T = d.includes("anyOf"), D = f || T, y = (D ? c[D ? f ? "allOf" : "anyOf" : "allOf"] : [c]).map((V) => O(V, p));
|
|
93
93
|
return f ? !y.includes(!1) : y.includes(!0);
|
|
94
94
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: S };
|
|
96
96
|
}
|
|
97
97
|
const Me = {}, Ee = {};
|
|
98
98
|
je();
|
|
99
|
-
function Pe(
|
|
100
|
-
return be[e.title] = e, Te[e.title] = g, Me[e.title] =
|
|
101
|
-
const O = Oe(w, e, v),
|
|
102
|
-
return Object.assign(
|
|
99
|
+
function Pe(t, e, v = /* @__PURE__ */ new Map(), g = (w, O, S) => O, s = {}, h = (w) => w) {
|
|
100
|
+
return be[e.title] = e, Te[e.title] = g, Me[e.title] = s, Ee[e.title] = h, (w = {}) => {
|
|
101
|
+
const O = Oe(w, e, v), S = Object.keys(t).reduce((c, p) => (c[p] = t[p].default, c), {});
|
|
102
|
+
return Object.assign(S, O);
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function Re(
|
|
105
|
+
function Re(t, e) {
|
|
106
106
|
return { customClass: e.class, customStyle: e.style };
|
|
107
107
|
}
|
|
108
108
|
const Le = /* @__PURE__ */ new Map([
|
|
@@ -224,20 +224,20 @@ const Le = /* @__PURE__ */ new Map([
|
|
|
224
224
|
draggable: { type: Boolean, default: !1 },
|
|
225
225
|
disable: { type: Boolean, default: !1 }
|
|
226
226
|
}, he = Pe(de, ze, Le, Ae, Fe);
|
|
227
|
-
function ke(
|
|
228
|
-
const
|
|
227
|
+
function ke(t, e, v, g) {
|
|
228
|
+
const s = i(-1), h = i(!1);
|
|
229
229
|
function w(p, d, f) {
|
|
230
230
|
p.stopPropagation(), d && setTimeout(() => {
|
|
231
|
-
|
|
231
|
+
s.value = f, h.value = !0, d.moving = !0;
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
function O(p, d) {
|
|
235
|
-
if (p.preventDefault(),
|
|
236
|
-
const f = g.value[
|
|
237
|
-
T.splice(
|
|
235
|
+
if (p.preventDefault(), s.value !== d) {
|
|
236
|
+
const f = g.value[s.value], T = g.value;
|
|
237
|
+
T.splice(s.value, 1), T.splice(d, 0, f), s.value = d;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function S(p, d) {
|
|
241
241
|
p.preventDefault(), p.dataTransfer && (p.dataTransfer.dropEffect = "move");
|
|
242
242
|
}
|
|
243
243
|
function c(p, d) {
|
|
@@ -246,7 +246,7 @@ function ke(a, e, v, g) {
|
|
|
246
246
|
return {
|
|
247
247
|
dragstart: w,
|
|
248
248
|
dragenter: O,
|
|
249
|
-
dragover:
|
|
249
|
+
dragover: S,
|
|
250
250
|
dragend: c,
|
|
251
251
|
isDragging: h
|
|
252
252
|
};
|
|
@@ -255,45 +255,45 @@ const ce = /* @__PURE__ */ ye({
|
|
|
255
255
|
name: "FTags",
|
|
256
256
|
props: de,
|
|
257
257
|
emits: ["remove", "selectionChange", "change"],
|
|
258
|
-
setup(
|
|
259
|
-
const v = i(
|
|
260
|
-
i(
|
|
258
|
+
setup(t, e) {
|
|
259
|
+
const v = i(t.selectable), g = i(t.customClass), s = i(t.data), h = i(t.tagType), w = i(t.tagStyle), O = i(t.showColor), S = i(t.customStyle), c = i(t.activeTag), p = i(t.showClose), d = i(t.addButtonText), f = i(), T = i(t.wrapText), D = i();
|
|
260
|
+
i(t.disable);
|
|
261
261
|
const B = i(!1);
|
|
262
262
|
function E() {
|
|
263
|
-
const n =
|
|
263
|
+
const n = s.value.map((l) => ({
|
|
264
264
|
type: "Tag",
|
|
265
|
-
payload:
|
|
265
|
+
payload: l
|
|
266
266
|
}));
|
|
267
|
-
return
|
|
267
|
+
return t.showAddButton && n.push({
|
|
268
268
|
type: "AddButton"
|
|
269
269
|
}), n;
|
|
270
270
|
}
|
|
271
271
|
const y = i(E());
|
|
272
272
|
function N(n) {
|
|
273
|
-
|
|
273
|
+
s.value = n, y.value = E();
|
|
274
274
|
}
|
|
275
|
-
const V = P(() => y.value.findIndex((n) => n.type === "Input")), F = ke(
|
|
275
|
+
const V = P(() => y.value.findIndex((n) => n.type === "Input")), F = ke(t, e, s, y), {
|
|
276
276
|
dragstart: R,
|
|
277
277
|
dragenter: m,
|
|
278
278
|
dragover: A,
|
|
279
279
|
dragend: k
|
|
280
280
|
} = F;
|
|
281
|
-
q(() =>
|
|
281
|
+
q(() => t.data, (n) => N(n)), q(() => t.showAddButton, () => {
|
|
282
282
|
y.value = E();
|
|
283
|
-
}), q(() =>
|
|
283
|
+
}), q(() => t.disable, (n) => {
|
|
284
284
|
y.value = E();
|
|
285
|
-
}), q(() =>
|
|
285
|
+
}), q(() => t.activeTag, (n) => {
|
|
286
286
|
c.value = n;
|
|
287
287
|
}), q(B, (n) => {
|
|
288
|
-
const
|
|
289
|
-
n ?
|
|
288
|
+
const l = [...y.value];
|
|
289
|
+
n ? l.length > 0 && l[l.length - 1].type !== "Input" && (l.splice(l.length - 1, 1), l.splice(l.length, 0, {
|
|
290
290
|
type: "Input"
|
|
291
|
-
}), y.value =
|
|
291
|
+
}), y.value = l, ue(() => {
|
|
292
292
|
var u;
|
|
293
293
|
D.value && ((u = D.value) == null || u.focus());
|
|
294
|
-
})) :
|
|
294
|
+
})) : l.length > 0 && l[l.length - 1].type !== "AddButton" && (l.splice(l.length - 1, 1), l.splice(l.length, 0, {
|
|
295
295
|
type: "AddButton"
|
|
296
|
-
}), y.value =
|
|
296
|
+
}), y.value = l);
|
|
297
297
|
});
|
|
298
298
|
const $ = P(() => {
|
|
299
299
|
const n = {
|
|
@@ -301,10 +301,10 @@ const ce = /* @__PURE__ */ ye({
|
|
|
301
301
|
"farris-tags-checkable": v.value,
|
|
302
302
|
"farris-tags-nowrap": !T.value
|
|
303
303
|
};
|
|
304
|
-
return g.value.split(" ").reduce((
|
|
304
|
+
return g.value.split(" ").reduce((l, u) => (l[u] = !0, l), n), n;
|
|
305
305
|
});
|
|
306
306
|
function W(n) {
|
|
307
|
-
const
|
|
307
|
+
const l = {
|
|
308
308
|
"farris-tag-item": !0,
|
|
309
309
|
"farris-tag-item-checked": v.value && n.checked,
|
|
310
310
|
"farris-tag-item-checkable": v.value,
|
|
@@ -313,27 +313,27 @@ const ce = /* @__PURE__ */ ye({
|
|
|
313
313
|
};
|
|
314
314
|
if (h.value) {
|
|
315
315
|
const u = `farris-tag-item-${h.value}`;
|
|
316
|
-
|
|
316
|
+
l[u] = !0;
|
|
317
317
|
}
|
|
318
|
-
return
|
|
318
|
+
return l;
|
|
319
319
|
}
|
|
320
320
|
const L = P(() => {
|
|
321
321
|
const n = {};
|
|
322
|
-
return
|
|
322
|
+
return S.value && S.value.split(";").reduce((l, u) => {
|
|
323
323
|
const j = u.split(":");
|
|
324
|
-
return
|
|
324
|
+
return l[j[0]] = j[1], l;
|
|
325
325
|
}, n), n;
|
|
326
326
|
});
|
|
327
|
-
function H(n,
|
|
328
|
-
!
|
|
329
|
-
u.checked = !
|
|
330
|
-
}), e.emit("change",
|
|
327
|
+
function H(n, l) {
|
|
328
|
+
!t.disable && v.value && (!l.hasOwnProperty("selectable") || l.selectable) && (l.checked = !l.checked, c.value = l.checked ? l.name : "", l.checked && s.value.filter((u) => u.name !== l.name).forEach((u) => {
|
|
329
|
+
u.checked = !l.checked;
|
|
330
|
+
}), e.emit("change", s.value), e.emit("selectionChange", l));
|
|
331
331
|
}
|
|
332
|
-
function G(n,
|
|
332
|
+
function G(n, l) {
|
|
333
333
|
let u;
|
|
334
334
|
switch (n.key) {
|
|
335
335
|
case "Backspace":
|
|
336
|
-
|
|
336
|
+
s.value = s.value.filter((j) => j.name !== l.name), e.emit("change", s.value);
|
|
337
337
|
break;
|
|
338
338
|
case "ArrowLeft":
|
|
339
339
|
u = Math.max(f.value.scrollLeft + 20, 0), f.value.scrollLeft = u;
|
|
@@ -342,12 +342,12 @@ const ce = /* @__PURE__ */ ye({
|
|
|
342
342
|
u = Math.max(f.value.scrollLeft - 20, 0), f.value.scrollLeft = u;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
function Q(n,
|
|
346
|
-
const u =
|
|
345
|
+
function Q(n, l) {
|
|
346
|
+
const u = s.value.findIndex((j) => j.name === l.name);
|
|
347
347
|
if (u > -1) {
|
|
348
|
-
const [j] =
|
|
349
|
-
y.value = E(), e.emit("change",
|
|
350
|
-
tags:
|
|
348
|
+
const [j] = s.value.splice(u, 1);
|
|
349
|
+
y.value = E(), e.emit("change", s.value), e.emit("remove", {
|
|
350
|
+
tags: s.value,
|
|
351
351
|
remove: j
|
|
352
352
|
});
|
|
353
353
|
}
|
|
@@ -356,13 +356,13 @@ const ce = /* @__PURE__ */ ye({
|
|
|
356
356
|
const U = P(() => ({
|
|
357
357
|
"farris-tag-item": !0,
|
|
358
358
|
"farris-tag-add-button": !0,
|
|
359
|
-
"farris-tag-add-button-disabled": !
|
|
359
|
+
"farris-tag-add-button-disabled": !t.enableAddButton
|
|
360
360
|
}));
|
|
361
361
|
function Y(n) {
|
|
362
362
|
n.stopPropagation(), B.value = !0;
|
|
363
363
|
}
|
|
364
364
|
function Z() {
|
|
365
|
-
return !
|
|
365
|
+
return !t.disable && b("li", {
|
|
366
366
|
class: U.value,
|
|
367
367
|
onClick: (n) => Y(n)
|
|
368
368
|
}, [b("span", {
|
|
@@ -371,39 +371,39 @@ const ce = /* @__PURE__ */ ye({
|
|
|
371
371
|
class: "farris-tag-add-text"
|
|
372
372
|
}, [d.value])]);
|
|
373
373
|
}
|
|
374
|
-
function _(n,
|
|
375
|
-
n > -1 && (
|
|
376
|
-
name:
|
|
374
|
+
function _(n, l, u) {
|
|
375
|
+
n > -1 && (s.value.splice(n, 0, {
|
|
376
|
+
name: l,
|
|
377
377
|
value: u,
|
|
378
378
|
selectable: v.value
|
|
379
|
-
}), y.value = E(), B.value = !1, e.emit("change",
|
|
379
|
+
}), y.value = E(), B.value = !1, e.emit("change", s.value));
|
|
380
380
|
}
|
|
381
381
|
function X(n) {
|
|
382
382
|
if (n && n.value) {
|
|
383
|
-
const
|
|
384
|
-
_(u,
|
|
383
|
+
const l = n.value, u = V.value;
|
|
384
|
+
_(u, l, l), n.innerText = "";
|
|
385
385
|
} else
|
|
386
386
|
B.value = !1;
|
|
387
387
|
}
|
|
388
388
|
function K(n) {
|
|
389
|
-
const
|
|
390
|
-
|
|
389
|
+
const l = n.target;
|
|
390
|
+
l && l.value ? X(l) : B.value = !1;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function ge(n) {
|
|
393
393
|
n.key === "Enter" && X(n.target);
|
|
394
394
|
}
|
|
395
395
|
function ee() {
|
|
396
|
-
return !
|
|
396
|
+
return !t.disable && b("li", {
|
|
397
397
|
class: "farris-tag-input-box"
|
|
398
398
|
}, [b("input", {
|
|
399
399
|
title: "farris-tag-input-box",
|
|
400
400
|
ref: D,
|
|
401
401
|
class: "form-control",
|
|
402
|
-
onKeyup:
|
|
402
|
+
onKeyup: ge,
|
|
403
403
|
onBlur: K
|
|
404
404
|
}, null)]);
|
|
405
405
|
}
|
|
406
|
-
function te(n,
|
|
406
|
+
function te(n, l) {
|
|
407
407
|
return b("li", {
|
|
408
408
|
class: W(n),
|
|
409
409
|
style: L.value,
|
|
@@ -413,14 +413,14 @@ const ce = /* @__PURE__ */ ye({
|
|
|
413
413
|
onClick: (u) => H(u, n),
|
|
414
414
|
onKeydown: (u) => G(u, n),
|
|
415
415
|
draggable: "true",
|
|
416
|
-
onDragstart: (u) => R(u, n,
|
|
417
|
-
onDragenter: (u) => m(u,
|
|
416
|
+
onDragstart: (u) => R(u, n, l),
|
|
417
|
+
onDragenter: (u) => m(u, l),
|
|
418
418
|
onDragend: (u) => k(u, n),
|
|
419
|
-
onDragover: (u) => A(u,
|
|
419
|
+
onDragover: (u) => A(u, l)
|
|
420
420
|
}, [b("span", {
|
|
421
421
|
title: n.name,
|
|
422
422
|
class: "tag-box"
|
|
423
|
-
}, [n.name]), !
|
|
423
|
+
}, [n.name]), !t.disable && p.value && b("span", {
|
|
424
424
|
class: "tag-delete"
|
|
425
425
|
}, [b("i", {
|
|
426
426
|
class: "f-icon f-icon-close",
|
|
@@ -428,10 +428,10 @@ const ce = /* @__PURE__ */ ye({
|
|
|
428
428
|
}, null)])]);
|
|
429
429
|
}
|
|
430
430
|
function J() {
|
|
431
|
-
return y.value.map((n,
|
|
431
|
+
return y.value.map((n, l) => {
|
|
432
432
|
switch (n.type) {
|
|
433
433
|
case "Tag":
|
|
434
|
-
return te(n.payload,
|
|
434
|
+
return te(n.payload, l);
|
|
435
435
|
case "AddButton":
|
|
436
436
|
return Z();
|
|
437
437
|
case "Input":
|
|
@@ -444,25 +444,25 @@ const ce = /* @__PURE__ */ ye({
|
|
|
444
444
|
"farris-tag-item-capsule": w.value === "capsule"
|
|
445
445
|
}));
|
|
446
446
|
function ae(n) {
|
|
447
|
-
const
|
|
448
|
-
f.value.scrollLeft =
|
|
447
|
+
const l = Math.max(f.value.scrollLeft - n.deltaX, 0);
|
|
448
|
+
f.value.scrollLeft = l;
|
|
449
449
|
}
|
|
450
450
|
function ne(n) {
|
|
451
451
|
var u;
|
|
452
452
|
n.preventDefault(), n.stopPropagation();
|
|
453
|
-
const
|
|
454
|
-
if (
|
|
455
|
-
const j =
|
|
456
|
-
[...
|
|
453
|
+
const l = (u = n.dataTransfer) == null ? void 0 : u.getData("Text");
|
|
454
|
+
if (l) {
|
|
455
|
+
const j = l.split(":"), le = j[0], x = j[1];
|
|
456
|
+
[...s.value].findIndex((a) => (console.log(`${a.value} === ${x} is ${a.value === x}`), a.value === x)) > -1 || _(s.value.length, le, x);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function se(n) {
|
|
460
460
|
n.preventDefault();
|
|
461
461
|
}
|
|
462
462
|
return () => b("div", {
|
|
463
463
|
class: $.value,
|
|
464
464
|
onDrop: ne,
|
|
465
|
-
onDragover:
|
|
465
|
+
onDragover: se
|
|
466
466
|
}, [b("ul", {
|
|
467
467
|
ref: f,
|
|
468
468
|
class: z.value,
|
|
@@ -470,15 +470,15 @@ const ce = /* @__PURE__ */ ye({
|
|
|
470
470
|
}, [J()])]);
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
|
-
function Ge(
|
|
473
|
+
function Ge(t, e, v) {
|
|
474
474
|
var R;
|
|
475
475
|
function g() {
|
|
476
476
|
}
|
|
477
|
-
const
|
|
477
|
+
const s = "", h = "", w = i();
|
|
478
478
|
function O() {
|
|
479
479
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function S() {
|
|
482
482
|
return !1;
|
|
483
483
|
}
|
|
484
484
|
function c() {
|
|
@@ -528,14 +528,14 @@ function Ge(a, e, v) {
|
|
|
528
528
|
}
|
|
529
529
|
return w.value = {
|
|
530
530
|
canMove: O(),
|
|
531
|
-
canSelectParent:
|
|
531
|
+
canSelectParent: S(),
|
|
532
532
|
canDelete: c(),
|
|
533
533
|
canNested: !p(),
|
|
534
534
|
contents: e == null ? void 0 : e.schema.contents,
|
|
535
|
-
elementRef:
|
|
535
|
+
elementRef: t,
|
|
536
536
|
parent: (R = e == null ? void 0 : e.parent) == null ? void 0 : R.componentInstance,
|
|
537
537
|
schema: e == null ? void 0 : e.schema,
|
|
538
|
-
styles:
|
|
538
|
+
styles: s,
|
|
539
539
|
designerClass: h,
|
|
540
540
|
canAccepts: T,
|
|
541
541
|
getBelongedComponentInstance: d,
|
|
@@ -556,72 +556,72 @@ const Qe = /* @__PURE__ */ ye({
|
|
|
556
556
|
name: "FTagsDesign",
|
|
557
557
|
props: de,
|
|
558
558
|
emits: ["remove", "selectionChange", "change"],
|
|
559
|
-
setup(
|
|
560
|
-
const v = i(
|
|
561
|
-
i(
|
|
562
|
-
const B = i(), E = i(
|
|
559
|
+
setup(t, e) {
|
|
560
|
+
const v = i(t.selectable), g = i(t.customClass), s = i(t.data), h = i(t.tagType), w = i(t.tagStyle), O = i(t.showColor), S = i(t.activeTag), c = i(t.customStyle), p = i(t.showClose), d = i(t.showAddButton), f = i(t.showInput), T = i(t.addButtonText), D = i(t.enableAddButton);
|
|
561
|
+
i(t.placeholder), i(""), i();
|
|
562
|
+
const B = i(), E = i(t.wrapText), y = i(), N = i(), V = we("design-item-context"), F = Ge(N, V);
|
|
563
563
|
De(() => {
|
|
564
564
|
N.value.componentInstance = F;
|
|
565
565
|
}), e.expose(F.value);
|
|
566
566
|
function R() {
|
|
567
|
-
const
|
|
567
|
+
const a = s.value.map((r) => ({
|
|
568
568
|
type: "Tag",
|
|
569
|
-
payload:
|
|
569
|
+
payload: r
|
|
570
570
|
}));
|
|
571
|
-
return d.value &&
|
|
571
|
+
return d.value && a.push({
|
|
572
572
|
type: "AddButton"
|
|
573
|
-
}),
|
|
573
|
+
}), a;
|
|
574
574
|
}
|
|
575
575
|
const m = i(R());
|
|
576
|
-
function A(
|
|
577
|
-
|
|
576
|
+
function A(a) {
|
|
577
|
+
s.value = a, m.value = R();
|
|
578
578
|
}
|
|
579
|
-
const k = P(() => m.value.findIndex((
|
|
579
|
+
const k = P(() => m.value.findIndex((a) => a.type === "Input")), $ = ke(t, e, s, m), {
|
|
580
580
|
dragstart: W,
|
|
581
581
|
dragenter: L,
|
|
582
582
|
dragover: H,
|
|
583
583
|
dragend: G
|
|
584
584
|
} = $;
|
|
585
|
-
q(() =>
|
|
585
|
+
q(() => t.data, (a) => A(a));
|
|
586
586
|
const Q = P(() => {
|
|
587
|
-
const
|
|
587
|
+
const a = {
|
|
588
588
|
"farris-tags": !0,
|
|
589
589
|
"farris-tags-checkable": v.value,
|
|
590
590
|
"farris-tags-nowrap": !E.value
|
|
591
591
|
};
|
|
592
|
-
return g.value.split(" ").reduce((
|
|
592
|
+
return g.value.split(" ").reduce((r, o) => (r[o] = !0, r), a), a;
|
|
593
593
|
});
|
|
594
|
-
function U(
|
|
595
|
-
const
|
|
594
|
+
function U(a) {
|
|
595
|
+
const r = {
|
|
596
596
|
"farris-tag-item": !0,
|
|
597
|
-
"farris-tag-item-checked": v.value &&
|
|
597
|
+
"farris-tag-item-checked": v.value && a.checked,
|
|
598
598
|
"farris-tag-item-checkable": v.value,
|
|
599
599
|
"farris-tag-item-has-color": O.value,
|
|
600
|
-
"farris-tag-item-actived":
|
|
600
|
+
"farris-tag-item-actived": S.value === a.name
|
|
601
601
|
};
|
|
602
602
|
if (h.value) {
|
|
603
603
|
const o = `farris-tag-item-${h.value}`;
|
|
604
|
-
|
|
604
|
+
r[o] = !0;
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return r;
|
|
607
607
|
}
|
|
608
608
|
const Y = P(() => {
|
|
609
|
-
const
|
|
610
|
-
return c.value && c.value.split(";").reduce((
|
|
611
|
-
const
|
|
612
|
-
return
|
|
613
|
-
},
|
|
609
|
+
const a = {};
|
|
610
|
+
return c.value && c.value.split(";").reduce((r, o) => {
|
|
611
|
+
const C = o.split(":");
|
|
612
|
+
return r[C[0]] = C[1], r;
|
|
613
|
+
}, a), a;
|
|
614
614
|
});
|
|
615
|
-
function Z(
|
|
616
|
-
v.value &&
|
|
617
|
-
o.checked = !
|
|
618
|
-
}), e.emit("change",
|
|
615
|
+
function Z(a, r) {
|
|
616
|
+
v.value && r.selectable && (r.checked = !r.checked, S.value = r.checked ? r.name : "", r.checked && s.value.filter((o) => o.name !== r.name).forEach((o) => {
|
|
617
|
+
o.checked = !r.checked;
|
|
618
|
+
}), e.emit("change", s.value), e.emit("selectionChange", r));
|
|
619
619
|
}
|
|
620
|
-
function _(
|
|
620
|
+
function _(a, r) {
|
|
621
621
|
let o;
|
|
622
|
-
switch (
|
|
622
|
+
switch (a.key) {
|
|
623
623
|
case "Backspace":
|
|
624
|
-
|
|
624
|
+
s.value = s.value.filter((C) => C.name !== r.name), e.emit("change", s.value);
|
|
625
625
|
break;
|
|
626
626
|
case "ArrowLeft":
|
|
627
627
|
o = Math.max(B.value.scrollLeft + 20, 0), B.value.scrollLeft = o;
|
|
@@ -630,64 +630,64 @@ const Qe = /* @__PURE__ */ ye({
|
|
|
630
630
|
o = Math.max(B.value.scrollLeft - 20, 0), B.value.scrollLeft = o;
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
function X(
|
|
634
|
-
const o =
|
|
633
|
+
function X(a, r) {
|
|
634
|
+
const o = s.value.findIndex((C) => C.name === r.name);
|
|
635
635
|
if (o > -1) {
|
|
636
|
-
const [
|
|
637
|
-
m.value = R(), e.emit("change",
|
|
636
|
+
const [C] = s.value.splice(o, 1);
|
|
637
|
+
m.value = R(), e.emit("change", s.value), e.emit("remove", s.value, C, o);
|
|
638
638
|
}
|
|
639
|
-
|
|
639
|
+
a.stopPropagation();
|
|
640
640
|
}
|
|
641
641
|
const K = P(() => ({
|
|
642
642
|
"farris-tag-item": !0,
|
|
643
643
|
"farris-tag-add-button": !0,
|
|
644
644
|
"farris-tag-add-button-disabled": !D.value
|
|
645
645
|
}));
|
|
646
|
-
function
|
|
646
|
+
function ge(a) {
|
|
647
647
|
}
|
|
648
648
|
function ee() {
|
|
649
649
|
return b("li", {
|
|
650
650
|
class: K.value,
|
|
651
|
-
onClick: (
|
|
651
|
+
onClick: (a) => void 0
|
|
652
652
|
}, [b("span", {
|
|
653
653
|
class: "f-icon f-icon-amplification"
|
|
654
654
|
}, null), b("span", {
|
|
655
655
|
class: "farris-tag-add-text"
|
|
656
656
|
}, [T.value])]);
|
|
657
657
|
}
|
|
658
|
-
function te(
|
|
659
|
-
if (
|
|
660
|
-
const
|
|
661
|
-
if (
|
|
662
|
-
const [o] =
|
|
663
|
-
m.value.splice(
|
|
658
|
+
function te(a) {
|
|
659
|
+
if (a && !a.innerText) {
|
|
660
|
+
const r = k.value;
|
|
661
|
+
if (r > 0) {
|
|
662
|
+
const [o] = s.value.splice(r - 1, 1);
|
|
663
|
+
m.value.splice(r - 1, 1), e.emit("remove", s.value, o, r - 1);
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
function J(
|
|
668
|
-
|
|
669
|
-
name:
|
|
667
|
+
function J(a, r, o) {
|
|
668
|
+
a > -1 && (s.value.splice(a, 0, {
|
|
669
|
+
name: r,
|
|
670
670
|
value: o,
|
|
671
671
|
selectable: v.value
|
|
672
|
-
}), m.value = R(), e.emit("change",
|
|
672
|
+
}), m.value = R(), e.emit("change", s.value));
|
|
673
673
|
}
|
|
674
|
-
function z(
|
|
675
|
-
if (
|
|
676
|
-
const
|
|
677
|
-
J(o,
|
|
674
|
+
function z(a) {
|
|
675
|
+
if (a && a.innerText) {
|
|
676
|
+
const r = a.innerText, o = k.value;
|
|
677
|
+
J(o, r, r), a.innerText = "";
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
-
function ae(
|
|
681
|
-
const
|
|
682
|
-
|
|
680
|
+
function ae(a) {
|
|
681
|
+
const r = a.target;
|
|
682
|
+
r && (r.innerText ? z(r) : e.emit("change", s.value));
|
|
683
683
|
}
|
|
684
|
-
function ne(
|
|
685
|
-
|
|
686
|
-
var
|
|
687
|
-
y.value && ((
|
|
684
|
+
function ne(a) {
|
|
685
|
+
a.key === "Enter" && z(a.target), a.key === "Backspace" && (te(a.target), ue(() => {
|
|
686
|
+
var r;
|
|
687
|
+
y.value && ((r = y.value) == null || r.focus());
|
|
688
688
|
}));
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function se() {
|
|
691
691
|
return b("li", {
|
|
692
692
|
class: "farris-tag-input-box"
|
|
693
693
|
}, [b("div", {
|
|
@@ -698,39 +698,39 @@ const Qe = /* @__PURE__ */ ye({
|
|
|
698
698
|
onBlur: ae
|
|
699
699
|
}, null)]);
|
|
700
700
|
}
|
|
701
|
-
function n(
|
|
701
|
+
function n(a, r) {
|
|
702
702
|
return b("li", {
|
|
703
|
-
class: U(
|
|
703
|
+
class: U(a),
|
|
704
704
|
style: Y.value,
|
|
705
705
|
tabindex: 0,
|
|
706
|
-
id:
|
|
707
|
-
key:
|
|
708
|
-
onClick: (o) => Z(o,
|
|
709
|
-
onKeydown: (o) => _(o,
|
|
706
|
+
id: a.name,
|
|
707
|
+
key: a.name,
|
|
708
|
+
onClick: (o) => Z(o, a),
|
|
709
|
+
onKeydown: (o) => _(o, a),
|
|
710
710
|
draggable: "true",
|
|
711
|
-
onDragstart: (o) => W(o,
|
|
712
|
-
onDragenter: (o) => L(o,
|
|
713
|
-
onDragend: (o) => G(o,
|
|
714
|
-
onDragover: (o) => H(o,
|
|
711
|
+
onDragstart: (o) => W(o, a, r),
|
|
712
|
+
onDragenter: (o) => L(o, r),
|
|
713
|
+
onDragend: (o) => G(o, a),
|
|
714
|
+
onDragover: (o) => H(o, r)
|
|
715
715
|
}, [b("div", {
|
|
716
|
-
title:
|
|
716
|
+
title: a.name,
|
|
717
717
|
class: "tag-box"
|
|
718
|
-
}, [
|
|
718
|
+
}, [a.name]), p.value && b("span", {
|
|
719
719
|
class: "tag-delete"
|
|
720
720
|
}, [b("i", {
|
|
721
721
|
class: "f-icon f-icon-close",
|
|
722
|
-
onClick: (o) => X(o,
|
|
722
|
+
onClick: (o) => X(o, a)
|
|
723
723
|
}, null)])]);
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
return m.value.map((
|
|
727
|
-
switch (
|
|
725
|
+
function l() {
|
|
726
|
+
return m.value.map((a, r) => {
|
|
727
|
+
switch (a.type) {
|
|
728
728
|
case "Tag":
|
|
729
|
-
return n(
|
|
729
|
+
return n(a.payload, r);
|
|
730
730
|
case "AddButton":
|
|
731
731
|
return ee();
|
|
732
732
|
case "Input":
|
|
733
|
-
return
|
|
733
|
+
return se();
|
|
734
734
|
}
|
|
735
735
|
});
|
|
736
736
|
}
|
|
@@ -738,25 +738,25 @@ const Qe = /* @__PURE__ */ ye({
|
|
|
738
738
|
"farris-tags-item-container": !0,
|
|
739
739
|
"farris-tag-item-capsule": w.value === "capsule"
|
|
740
740
|
}));
|
|
741
|
-
function j(
|
|
742
|
-
const
|
|
743
|
-
B.value.scrollLeft =
|
|
744
|
-
}
|
|
745
|
-
function
|
|
746
|
-
const
|
|
747
|
-
if (
|
|
748
|
-
const
|
|
749
|
-
const M = I.getBoundingClientRect(),
|
|
750
|
-
return M.left + me >
|
|
741
|
+
function j(a) {
|
|
742
|
+
const r = Math.max(B.value.scrollLeft - a.deltaX, 0);
|
|
743
|
+
B.value.scrollLeft = r;
|
|
744
|
+
}
|
|
745
|
+
function le(a) {
|
|
746
|
+
const r = B.value, o = s.value.length - 1;
|
|
747
|
+
if (r) {
|
|
748
|
+
const C = Array.from(r.children).filter((I) => I.className.indexOf("farris-tag-item") > -1).findIndex((I) => {
|
|
749
|
+
const M = I.getBoundingClientRect(), re = window.getComputedStyle(I), me = parseInt(re["margin-left"], 10) + M.width + parseInt(re["margin-right"], 10);
|
|
750
|
+
return M.left + me > a;
|
|
751
751
|
});
|
|
752
|
-
if (
|
|
753
|
-
return
|
|
752
|
+
if (C > -1)
|
|
753
|
+
return C;
|
|
754
754
|
}
|
|
755
755
|
return o;
|
|
756
756
|
}
|
|
757
|
-
function x(
|
|
757
|
+
function x(a) {
|
|
758
758
|
if (f.value) {
|
|
759
|
-
const o =
|
|
759
|
+
const o = le(a.clientX) + 1, I = m.value.filter((M) => M.type !== "Input");
|
|
760
760
|
I.splice(o, 0, {
|
|
761
761
|
type: "Input"
|
|
762
762
|
}), m.value = I, ue(() => {
|
|
@@ -765,39 +765,39 @@ const Qe = /* @__PURE__ */ ye({
|
|
|
765
765
|
});
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function pe(a) {
|
|
769
769
|
var o;
|
|
770
|
-
|
|
771
|
-
const
|
|
772
|
-
if (
|
|
773
|
-
const
|
|
774
|
-
[...
|
|
770
|
+
a.preventDefault(), a.stopPropagation();
|
|
771
|
+
const r = (o = a.dataTransfer) == null ? void 0 : o.getData("Text");
|
|
772
|
+
if (r) {
|
|
773
|
+
const C = r.split(":"), I = C[0], M = C[1];
|
|
774
|
+
[...s.value].findIndex((oe) => (console.log(`${oe.value} === ${M} is ${oe.value === M}`), oe.value === M)) > -1 || J(s.value.length, I, M);
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
|
-
function ve(
|
|
778
|
-
|
|
777
|
+
function ve(a) {
|
|
778
|
+
a.preventDefault();
|
|
779
779
|
}
|
|
780
780
|
return () => b("div", {
|
|
781
781
|
ref: N,
|
|
782
782
|
class: Q.value,
|
|
783
783
|
onClick: x,
|
|
784
|
-
onDrop:
|
|
784
|
+
onDrop: pe,
|
|
785
785
|
onDragover: ve
|
|
786
786
|
}, [b("ul", {
|
|
787
787
|
ref: B,
|
|
788
788
|
class: u.value,
|
|
789
|
-
onWheel: (
|
|
790
|
-
}, [
|
|
789
|
+
onWheel: (a) => j(a)
|
|
790
|
+
}, [l()])]);
|
|
791
791
|
}
|
|
792
792
|
}), Ze = {
|
|
793
|
-
install(
|
|
794
|
-
|
|
793
|
+
install(t) {
|
|
794
|
+
t.component(ce.name, ce);
|
|
795
795
|
},
|
|
796
|
-
register(
|
|
797
|
-
|
|
796
|
+
register(t, e, v, g) {
|
|
797
|
+
t.tags = ce, e.tags = he;
|
|
798
798
|
},
|
|
799
|
-
registerDesigner(
|
|
800
|
-
|
|
799
|
+
registerDesigner(t, e, v) {
|
|
800
|
+
t.tags = Qe, e.tags = he;
|
|
801
801
|
}
|
|
802
802
|
};
|
|
803
803
|
export {
|