@farris/ui-vue 1.0.0 → 1.0.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.
- package/combo-list/index.esm.js +495 -493
- package/combo-list/index.umd.js +1 -1
- package/condition/index.esm.js +1927 -1925
- package/condition/index.umd.js +1 -1
- package/data-grid/index.esm.js +1927 -1925
- package/data-grid/index.umd.js +1 -1
- package/designer-canvas/index.esm.js +1630 -1628
- package/designer-canvas/index.umd.js +1 -1
- package/dynamic-form/index.esm.js +1927 -1925
- package/dynamic-form/index.umd.js +1 -1
- package/dynamic-view/index.esm.js +1158 -1156
- package/dynamic-view/index.umd.js +1 -1
- package/farris.all.esm.js +2180 -2178
- package/farris.all.umd.js +5 -5
- package/order/index.esm.js +598 -596
- package/order/index.umd.js +1 -1
- package/package.json +4 -4
package/order/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as a, computed as
|
|
1
|
+
import { ref as a, computed as I, watch as W, defineComponent as z, createVNode as v, withDirectives as Q, vModelCheckbox as Fe, Fragment as te, withModifiers as Oe, vModelText as Pe, Teleport as se, createApp as Ve, onUnmounted as ce, nextTick as K, vShow as re, onMounted as de, mergeProps as Me } from "vue";
|
|
2
2
|
const Le = {
|
|
3
3
|
dataSource: { type: Array, default: [] },
|
|
4
4
|
items: { type: Array, default: [] }
|
|
@@ -21,39 +21,39 @@ const Le = {
|
|
|
21
21
|
disableField: { type: String, default: "disabled" }
|
|
22
22
|
};
|
|
23
23
|
function je(e, t, o, l, n) {
|
|
24
|
-
const i = a(e.idField), u = a(e.disableField), s = a(e.draggable),
|
|
24
|
+
const i = a(e.idField), u = a(e.disableField), s = a(e.draggable), p = a(e.itemClass), c = a(e.multiSelect), r = a(e.multiSelectMode);
|
|
25
25
|
a(!0);
|
|
26
|
-
const { isDragging:
|
|
27
|
-
function
|
|
26
|
+
const { isDragging: d } = o, { activeIndex: f, focusedItemId: b, hoverIndex: m } = l, { clearSelection: y, selectedItems: T, toggleSelectItem: B } = n;
|
|
27
|
+
function x(C, j) {
|
|
28
28
|
const M = {
|
|
29
29
|
"f-list-view-group-item": !0,
|
|
30
30
|
"f-list-view-draggable-item": s.value,
|
|
31
|
-
"f-un-click": !!
|
|
32
|
-
"f-un-select": !!
|
|
33
|
-
"f-listview-active":
|
|
34
|
-
"f-listview-hover": !
|
|
35
|
-
moving: !!
|
|
31
|
+
"f-un-click": !!C.unClick,
|
|
32
|
+
"f-un-select": !!C[u.value],
|
|
33
|
+
"f-listview-active": C.__fv_index__ === f.value,
|
|
34
|
+
"f-listview-hover": !d.value && j === m.value,
|
|
35
|
+
moving: !!C.moving
|
|
36
36
|
};
|
|
37
|
-
return
|
|
37
|
+
return p.value.split(" ").reduce((X, R) => (X[R] = !0, X), M), M;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
function h(C, j) {
|
|
40
|
+
return C[i.value] || "";
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
function O(
|
|
44
|
-
|
|
42
|
+
const S = I(() => !c.value);
|
|
43
|
+
function O(C, j) {
|
|
44
|
+
C.unClick || C[u.value] || (S.value && (b.value = C[i.value]), B(C, j));
|
|
45
45
|
}
|
|
46
|
-
const F =
|
|
47
|
-
function L(
|
|
46
|
+
const F = I(() => c.value && r.value === "OnCheckClearByClick"), E = I(() => !c.value || c.value && (r.value === "OnCheckAndClick" || r.value === "OnClick"));
|
|
47
|
+
function L(C, j, M) {
|
|
48
48
|
if (j.unClick || j[u.value]) {
|
|
49
|
-
|
|
49
|
+
C.preventDefault(), C.stopPropagation();
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
b.value = j[i.value], f.value = M, F.value && y(), E.value && B(j, M), t.emit("clickItem", { data: T.value, index: M });
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
55
|
-
getKey:
|
|
56
|
-
listViewItemClass:
|
|
55
|
+
getKey: h,
|
|
56
|
+
listViewItemClass: x,
|
|
57
57
|
onCheckItem: O,
|
|
58
58
|
onClickItem: L
|
|
59
59
|
};
|
|
@@ -62,27 +62,27 @@ function De(e, t, o) {
|
|
|
62
62
|
const l = a(e.idField), n = a(e.multiSelect);
|
|
63
63
|
a(e.multiSelectMode);
|
|
64
64
|
const { getSelectionItems: i } = o, u = a(i(e.selectionValues));
|
|
65
|
-
W(() => e.selectionValues, (
|
|
66
|
-
u.value = a(i(
|
|
65
|
+
W(() => e.selectionValues, (f) => {
|
|
66
|
+
u.value = a(i(f)).value;
|
|
67
67
|
});
|
|
68
|
-
const s =
|
|
69
|
-
function
|
|
70
|
-
return
|
|
68
|
+
const s = I(() => !n.value);
|
|
69
|
+
function p(f) {
|
|
70
|
+
return f[l.value] || "";
|
|
71
71
|
}
|
|
72
|
-
function c(
|
|
73
|
-
return u.value.findIndex((
|
|
72
|
+
function c(f) {
|
|
73
|
+
return u.value.findIndex((m) => p(m) === p(f));
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
u.value.forEach((
|
|
77
|
-
|
|
75
|
+
function r() {
|
|
76
|
+
u.value.forEach((f) => {
|
|
77
|
+
f.checked = !1;
|
|
78
78
|
}), u.value = [];
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
s.value &&
|
|
82
|
-
const
|
|
83
|
-
|
|
80
|
+
function d(f, b) {
|
|
81
|
+
s.value && r();
|
|
82
|
+
const m = c(f);
|
|
83
|
+
m > -1 ? (u.value.splice(m, 1), f.checked = !1) : (u.value.push(f), f.checked = !0), t.emit("selectionChange", u.value);
|
|
84
84
|
}
|
|
85
|
-
return { clearSelection:
|
|
85
|
+
return { clearSelection: r, findIndexInSelectedItems: c, selectedItems: u, toggleSelectItem: d };
|
|
86
86
|
}
|
|
87
87
|
function Ae(e, t) {
|
|
88
88
|
function o(i) {
|
|
@@ -94,18 +94,18 @@ function Ae(e, t) {
|
|
|
94
94
|
}
|
|
95
95
|
function l(i, u) {
|
|
96
96
|
const s = document.createTreeWalker(i, NodeFilter.SHOW_TEXT);
|
|
97
|
-
return o(s).map((
|
|
98
|
-
const
|
|
99
|
-
let
|
|
100
|
-
for (;
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
97
|
+
return o(s).map((d) => ({ textNode: d, text: (d.textContent || "").toLocaleLowerCase() })).map(({ textNode: d, text: f }) => {
|
|
98
|
+
const b = [];
|
|
99
|
+
let m = 0;
|
|
100
|
+
for (; m < f.length; ) {
|
|
101
|
+
const y = f.indexOf(u, m);
|
|
102
|
+
if (y === -1)
|
|
103
103
|
break;
|
|
104
|
-
|
|
104
|
+
b.push(y), m = y + u.length;
|
|
105
105
|
}
|
|
106
|
-
return
|
|
107
|
-
const
|
|
108
|
-
return
|
|
106
|
+
return b.map((y) => {
|
|
107
|
+
const T = new Range();
|
|
108
|
+
return T.setStart(d, y), T.setEnd(d, y + u.length), T;
|
|
109
109
|
});
|
|
110
110
|
}).flat();
|
|
111
111
|
}
|
|
@@ -139,16 +139,16 @@ const Ee = {
|
|
|
139
139
|
}
|
|
140
140
|
return W(() => e.checked, (u) => {
|
|
141
141
|
o.value = u;
|
|
142
|
-
}), () =>
|
|
142
|
+
}), () => v("div", {
|
|
143
143
|
class: "custom-control custom-checkbox custom-control-inline listview-checkbox"
|
|
144
|
-
}, [Q(
|
|
144
|
+
}, [Q(v("input", {
|
|
145
145
|
id: n.value,
|
|
146
146
|
title: n.value,
|
|
147
147
|
type: "checkbox",
|
|
148
148
|
class: "custom-control-input",
|
|
149
149
|
"onUpdate:modelValue": (u) => o.value = u,
|
|
150
150
|
onChange: (u) => console.log(u)
|
|
151
|
-
}, null), [[Fe, o.value]]),
|
|
151
|
+
}, null), [[Fe, o.value]]), v("label", {
|
|
152
152
|
for: n.value,
|
|
153
153
|
class: "custom-control-label",
|
|
154
154
|
onClick: (u) => i(u)
|
|
@@ -156,153 +156,153 @@ const Ee = {
|
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
function ae(e, t, o, l, n, i, u, s) {
|
|
159
|
-
const
|
|
160
|
-
onMouseenterItem:
|
|
161
|
-
onMouseoverItem:
|
|
162
|
-
onMouseoutItem:
|
|
159
|
+
const p = a(e.size), c = a(e.textField), r = a(e.multiSelect), d = a(e.disableField), {
|
|
160
|
+
onMouseenterItem: f,
|
|
161
|
+
onMouseoverItem: b,
|
|
162
|
+
onMouseoutItem: m
|
|
163
163
|
} = n, {
|
|
164
|
-
getKey:
|
|
165
|
-
listViewItemClass:
|
|
164
|
+
getKey: y,
|
|
165
|
+
listViewItemClass: T,
|
|
166
166
|
onCheckItem: B,
|
|
167
|
-
onClickItem:
|
|
168
|
-
} = i,
|
|
169
|
-
margin:
|
|
167
|
+
onClickItem: x
|
|
168
|
+
} = i, h = I(() => ({
|
|
169
|
+
margin: p.value === "small" ? "0.25rem 0" : "10px 0"
|
|
170
170
|
}));
|
|
171
|
-
function
|
|
172
|
-
return O.checked = u.findIndexInSelectedItems(O) > -1,
|
|
173
|
-
class:
|
|
174
|
-
id:
|
|
175
|
-
key:
|
|
176
|
-
onClick: (L) =>
|
|
177
|
-
onMouseenter: (L) =>
|
|
178
|
-
onMouseover: (L) =>
|
|
179
|
-
onMouseout: (L) =>
|
|
180
|
-
}, [
|
|
171
|
+
function S(O, F, E) {
|
|
172
|
+
return O.checked = u.findIndexInSelectedItems(O) > -1, v("li", {
|
|
173
|
+
class: T(O, F),
|
|
174
|
+
id: y(O, F),
|
|
175
|
+
key: y(O, F),
|
|
176
|
+
onClick: (L) => x(L, O, F),
|
|
177
|
+
onMouseenter: (L) => f(L, O, F),
|
|
178
|
+
onMouseover: (L) => b(L, O, F),
|
|
179
|
+
onMouseout: (L) => m(L, O, F)
|
|
180
|
+
}, [r.value && v("div", {
|
|
181
181
|
class: "f-list-select",
|
|
182
182
|
onClick: (L) => L.stopPropagation()
|
|
183
|
-
}, [
|
|
184
|
-
id: "list-" +
|
|
185
|
-
disabled: O[
|
|
183
|
+
}, [v(ne, {
|
|
184
|
+
id: "list-" + y(O, F),
|
|
185
|
+
disabled: O[d.value] || O.unClick,
|
|
186
186
|
checked: O.checked,
|
|
187
187
|
onChange: (L) => B(O, F)
|
|
188
|
-
}, null)]),
|
|
188
|
+
}, null)]), v("div", {
|
|
189
189
|
class: "f-list-content"
|
|
190
|
-
}, [
|
|
191
|
-
style:
|
|
190
|
+
}, [v("div", {
|
|
191
|
+
style: h.value
|
|
192
192
|
}, [O[c.value]])])]);
|
|
193
193
|
}
|
|
194
194
|
return {
|
|
195
|
-
renderItem:
|
|
195
|
+
renderItem: S
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
function He(e, t, o, l, n, i, u, s) {
|
|
199
|
-
const
|
|
200
|
-
onMouseenterItem:
|
|
201
|
-
onMouseoverItem:
|
|
202
|
-
onMouseoutItem:
|
|
199
|
+
const p = a(e.multiSelect), c = a(e.disableField), {
|
|
200
|
+
onMouseenterItem: r,
|
|
201
|
+
onMouseoverItem: d,
|
|
202
|
+
onMouseoutItem: f
|
|
203
203
|
} = n, {
|
|
204
|
-
getKey:
|
|
205
|
-
listViewItemClass:
|
|
206
|
-
onCheckItem:
|
|
207
|
-
onClickItem:
|
|
204
|
+
getKey: b,
|
|
205
|
+
listViewItemClass: m,
|
|
206
|
+
onCheckItem: y,
|
|
207
|
+
onClickItem: T
|
|
208
208
|
} = i;
|
|
209
|
-
function B(
|
|
210
|
-
return t.slots.content ?
|
|
211
|
-
item:
|
|
212
|
-
index:
|
|
209
|
+
function B(h, S, O) {
|
|
210
|
+
return t.slots.content ? v(te, null, [t.slots.content && t.slots.content({
|
|
211
|
+
item: h,
|
|
212
|
+
index: S,
|
|
213
213
|
selectedItem: O
|
|
214
|
-
})]) :
|
|
214
|
+
})]) : v("div", {
|
|
215
215
|
style: "margin: 10px 0;"
|
|
216
|
-
}, [
|
|
217
|
-
}
|
|
218
|
-
function
|
|
219
|
-
return
|
|
220
|
-
class: h
|
|
221
|
-
id:
|
|
222
|
-
key:
|
|
223
|
-
onClick: (F) =>
|
|
224
|
-
onMouseenter: (F) =>
|
|
225
|
-
onMouseover: (F) =>
|
|
226
|
-
onMouseout: (F) =>
|
|
227
|
-
}, [
|
|
216
|
+
}, [h.name]);
|
|
217
|
+
}
|
|
218
|
+
function x(h, S, O) {
|
|
219
|
+
return v("li", {
|
|
220
|
+
class: m(h, S),
|
|
221
|
+
id: b(h, S),
|
|
222
|
+
key: b(h, S),
|
|
223
|
+
onClick: (F) => T(F, h, S),
|
|
224
|
+
onMouseenter: (F) => r(F, h, S),
|
|
225
|
+
onMouseover: (F) => d(F, h, S),
|
|
226
|
+
onMouseout: (F) => f(F, h, S)
|
|
227
|
+
}, [p.value && v("div", {
|
|
228
228
|
class: "f-list-select",
|
|
229
229
|
onClick: (F) => F.stopPropagation()
|
|
230
|
-
}, [
|
|
231
|
-
id: "list-" +
|
|
232
|
-
disabled:
|
|
233
|
-
checked:
|
|
234
|
-
onChange: (F) =>
|
|
235
|
-
}, null)]),
|
|
230
|
+
}, [v(ne, {
|
|
231
|
+
id: "list-" + b(h, S),
|
|
232
|
+
disabled: h[c.value] || h.unClick,
|
|
233
|
+
checked: h.checked,
|
|
234
|
+
onChange: (F) => y(h, S)
|
|
235
|
+
}, null)]), v("div", {
|
|
236
236
|
class: "f-list-content"
|
|
237
|
-
}, [B(
|
|
237
|
+
}, [B(h, S, O)])]);
|
|
238
238
|
}
|
|
239
239
|
return {
|
|
240
|
-
renderItem:
|
|
240
|
+
renderItem: x
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
243
|
function We(e, t, o, l, n, i, u, s) {
|
|
244
|
-
const
|
|
245
|
-
onMouseenterItem:
|
|
246
|
-
onMouseoverItem:
|
|
247
|
-
onMouseoutItem:
|
|
244
|
+
const p = a(e.multiSelect), c = a(e.disableField), {
|
|
245
|
+
onMouseenterItem: r,
|
|
246
|
+
onMouseoverItem: d,
|
|
247
|
+
onMouseoutItem: f
|
|
248
248
|
} = n, {
|
|
249
|
-
getKey:
|
|
250
|
-
listViewItemClass:
|
|
251
|
-
onCheckItem:
|
|
252
|
-
onClickItem:
|
|
249
|
+
getKey: b,
|
|
250
|
+
listViewItemClass: m,
|
|
251
|
+
onCheckItem: y,
|
|
252
|
+
onClickItem: T
|
|
253
253
|
} = i, {
|
|
254
254
|
dragstart: B,
|
|
255
|
-
dragenter:
|
|
256
|
-
dragover:
|
|
257
|
-
dragend:
|
|
255
|
+
dragenter: x,
|
|
256
|
+
dragover: h,
|
|
257
|
+
dragend: S
|
|
258
258
|
} = l, {
|
|
259
259
|
removeItem: O
|
|
260
|
-
} = s, F =
|
|
261
|
-
margin:
|
|
260
|
+
} = s, F = I(() => ({
|
|
261
|
+
margin: p.value ? "10px 0" : "10px 0px 10px 14px"
|
|
262
262
|
}));
|
|
263
263
|
function E(M) {
|
|
264
|
-
return
|
|
264
|
+
return v("div", {
|
|
265
265
|
style: F.value
|
|
266
266
|
}, [M.name]);
|
|
267
267
|
}
|
|
268
268
|
function L() {
|
|
269
269
|
return t.slots.itemContent ? t.slots.itemContent : E;
|
|
270
270
|
}
|
|
271
|
-
const
|
|
271
|
+
const C = L();
|
|
272
272
|
function j(M, D, X) {
|
|
273
|
-
return
|
|
274
|
-
class:
|
|
275
|
-
id:
|
|
276
|
-
key:
|
|
277
|
-
onClick: (R) =>
|
|
278
|
-
onMouseenter: (R) =>
|
|
279
|
-
onMouseover: (R) =>
|
|
280
|
-
onMouseout: (R) =>
|
|
273
|
+
return v("li", {
|
|
274
|
+
class: m(M, D),
|
|
275
|
+
id: b(M, D),
|
|
276
|
+
key: b(M, D),
|
|
277
|
+
onClick: (R) => T(R, M, D),
|
|
278
|
+
onMouseenter: (R) => r(R, M, D),
|
|
279
|
+
onMouseover: (R) => d(R, M, D),
|
|
280
|
+
onMouseout: (R) => f(R, M, D),
|
|
281
281
|
draggable: "true",
|
|
282
282
|
onDragstart: (R) => B(R, M, D),
|
|
283
|
-
onDragenter: (R) =>
|
|
284
|
-
onDragend: (R) =>
|
|
285
|
-
onDragover: (R) =>
|
|
286
|
-
}, [
|
|
283
|
+
onDragenter: (R) => x(R, D),
|
|
284
|
+
onDragend: (R) => S(R, M),
|
|
285
|
+
onDragover: (R) => h(R, D)
|
|
286
|
+
}, [p.value && v("div", {
|
|
287
287
|
class: "f-list-select",
|
|
288
288
|
onClick: (R) => R.stopPropagation()
|
|
289
|
-
}, [
|
|
290
|
-
id: "list-" +
|
|
289
|
+
}, [v(ne, {
|
|
290
|
+
id: "list-" + b(M, D),
|
|
291
291
|
disabled: M[c.value] || M.unClick,
|
|
292
292
|
checked: M.checked,
|
|
293
|
-
onChange: (R) =>
|
|
294
|
-
}, null)]),
|
|
293
|
+
onChange: (R) => y(M, D)
|
|
294
|
+
}, null)]), v("div", {
|
|
295
295
|
class: "f-list-content"
|
|
296
|
-
}, [
|
|
296
|
+
}, [C(M)]), v("div", {
|
|
297
297
|
class: "f-list-remove",
|
|
298
298
|
onClick: (R) => O(D)
|
|
299
|
-
}, [
|
|
299
|
+
}, [v("div", {
|
|
300
300
|
class: "f-list-remove-icon"
|
|
301
|
-
}, [
|
|
301
|
+
}, [v("i", {
|
|
302
302
|
class: "f-icon f-icon-remove_face"
|
|
303
|
-
}, null)])]),
|
|
303
|
+
}, null)])]), v("div", {
|
|
304
304
|
class: "f-list-handle"
|
|
305
|
-
}, [
|
|
305
|
+
}, [v("div", null, [v("i", {
|
|
306
306
|
class: "f-icon f-icon-drag-vertical"
|
|
307
307
|
}, null)])])]);
|
|
308
308
|
}
|
|
@@ -312,7 +312,7 @@ function We(e, t, o, l, n, i, u, s) {
|
|
|
312
312
|
}
|
|
313
313
|
function _e(e, t, o) {
|
|
314
314
|
function l() {
|
|
315
|
-
return t.slots.header &&
|
|
315
|
+
return t.slots.header && v("div", {
|
|
316
316
|
class: "f-list-view-header"
|
|
317
317
|
}, [t.slots.header()]);
|
|
318
318
|
}
|
|
@@ -321,62 +321,62 @@ function _e(e, t, o) {
|
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
323
|
function le(e, t, o) {
|
|
324
|
-
const l = a(e.headerClass), n = a(e.placeholder), i = a(""), u =
|
|
325
|
-
function
|
|
324
|
+
const l = a(e.headerClass), n = a(e.placeholder), i = a(""), u = I(() => !i.value), s = I(() => !!i.value);
|
|
325
|
+
function p(f) {
|
|
326
326
|
i.value = "";
|
|
327
327
|
}
|
|
328
|
-
W(i, (
|
|
329
|
-
o.search(
|
|
328
|
+
W(i, (f) => {
|
|
329
|
+
o.search(f);
|
|
330
330
|
});
|
|
331
|
-
const c =
|
|
332
|
-
const
|
|
331
|
+
const c = I(() => {
|
|
332
|
+
const f = {
|
|
333
333
|
"form-group": !0,
|
|
334
334
|
"farris-form-group": !0
|
|
335
335
|
};
|
|
336
|
-
return l.value && l.value.split(" ").reduce((
|
|
336
|
+
return l.value && l.value.split(" ").reduce((m, y) => (m[y] = !0, m), f), f;
|
|
337
337
|
});
|
|
338
|
-
function
|
|
338
|
+
function r(f) {
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
return
|
|
340
|
+
function d() {
|
|
341
|
+
return v("div", {
|
|
342
342
|
class: "f-list-view-header",
|
|
343
|
-
onClick: Oe(
|
|
344
|
-
}, [
|
|
343
|
+
onClick: Oe(r, ["prevent", "stop"])
|
|
344
|
+
}, [v("div", {
|
|
345
345
|
class: c.value
|
|
346
|
-
}, [
|
|
346
|
+
}, [v("div", {
|
|
347
347
|
class: "farris-input-wrap"
|
|
348
|
-
}, [
|
|
348
|
+
}, [v("div", {
|
|
349
349
|
class: "f-cmp-inputgroup"
|
|
350
|
-
}, [
|
|
350
|
+
}, [v("div", {
|
|
351
351
|
class: "input-group f-state-editable"
|
|
352
|
-
}, [Q(
|
|
352
|
+
}, [Q(v("input", {
|
|
353
353
|
class: "form-control f-utils-fill text-left",
|
|
354
|
-
"onUpdate:modelValue": (
|
|
354
|
+
"onUpdate:modelValue": (f) => i.value = f,
|
|
355
355
|
name: "input-group-value",
|
|
356
356
|
type: "text",
|
|
357
357
|
placeholder: n.value,
|
|
358
358
|
autocomplete: "off"
|
|
359
|
-
}, null), [[Pe, i.value]]),
|
|
359
|
+
}, null), [[Pe, i.value]]), v("div", {
|
|
360
360
|
class: "input-group-append"
|
|
361
|
-
}, [s.value &&
|
|
361
|
+
}, [s.value && v("span", {
|
|
362
362
|
class: "input-group-text input-group-clear",
|
|
363
|
-
onClick: (
|
|
364
|
-
}, [
|
|
363
|
+
onClick: (f) => p()
|
|
364
|
+
}, [v("i", {
|
|
365
365
|
class: "f-icon f-icon-close-circle"
|
|
366
|
-
}, null)]), u.value &&
|
|
366
|
+
}, null)]), u.value && v("span", {
|
|
367
367
|
class: "input-group-text"
|
|
368
|
-
}, [
|
|
368
|
+
}, [v("span", {
|
|
369
369
|
class: "f-icon f-icon-search"
|
|
370
370
|
}, null)])])])])])])]);
|
|
371
371
|
}
|
|
372
372
|
return {
|
|
373
|
-
renderHeader:
|
|
373
|
+
renderHeader: d
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
function $e(e, t) {
|
|
377
377
|
const o = a(e.idField), l = a(e.data), n = a(e.data), i = a(e.keepOrder);
|
|
378
378
|
function u() {
|
|
379
|
-
const c = l.value.map((
|
|
379
|
+
const c = l.value.map((r, d) => typeof r != "object" ? { __fv_index__: d, name: r } : (r.__fv_index__ = d, r));
|
|
380
380
|
return n.value = c, c;
|
|
381
381
|
}
|
|
382
382
|
const s = a(u());
|
|
@@ -384,50 +384,50 @@ function $e(e, t) {
|
|
|
384
384
|
() => e.data,
|
|
385
385
|
(c) => {
|
|
386
386
|
if (i.value) {
|
|
387
|
-
const
|
|
388
|
-
l.value = [...
|
|
387
|
+
const r = c.reduce((m, y) => (m.set(y.id, !0), m), /* @__PURE__ */ new Map()), d = l.value.reduce((m, y) => (m.set(y.id, !0), m), /* @__PURE__ */ new Map()), f = s.value.filter((m) => r.has(m.id)), b = c.filter((m) => !d.has(m.id));
|
|
388
|
+
l.value = [...f, ...b];
|
|
389
389
|
} else
|
|
390
390
|
l.value = c;
|
|
391
391
|
s.value = u();
|
|
392
392
|
}
|
|
393
393
|
);
|
|
394
|
-
function
|
|
395
|
-
return c.map((
|
|
396
|
-
const
|
|
397
|
-
return
|
|
398
|
-
}).filter((
|
|
394
|
+
function p(c) {
|
|
395
|
+
return c.map((d) => {
|
|
396
|
+
const f = n.value.findIndex((b) => b[o.value] === d);
|
|
397
|
+
return f > -1 ? n.value[f] : null;
|
|
398
|
+
}).filter((d) => d != null);
|
|
399
399
|
}
|
|
400
400
|
return {
|
|
401
401
|
dataView: s,
|
|
402
|
-
getSelectionItems:
|
|
402
|
+
getSelectionItems: p
|
|
403
403
|
};
|
|
404
404
|
}
|
|
405
405
|
function Ne(e, t, o, l) {
|
|
406
|
-
const n = a(e.idField), { dataView: i } = o, u = a(-1), s = a(!1), { activeIndex:
|
|
407
|
-
function
|
|
408
|
-
B.stopPropagation(),
|
|
409
|
-
u.value =
|
|
406
|
+
const n = a(e.idField), { dataView: i } = o, u = a(-1), s = a(!1), { activeIndex: p, focusedItemId: c, hoverIndex: r, resumeHover: d, suspendHover: f } = l;
|
|
407
|
+
function b(B, x, h) {
|
|
408
|
+
B.stopPropagation(), f(), x && setTimeout(() => {
|
|
409
|
+
u.value = h, s.value = !0, x.moving = !0;
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
if (B.preventDefault(), u.value !==
|
|
414
|
-
const
|
|
415
|
-
|
|
412
|
+
function m(B, x) {
|
|
413
|
+
if (B.preventDefault(), u.value !== x) {
|
|
414
|
+
const h = i.value[u.value], S = i.value;
|
|
415
|
+
S.splice(u.value, 1), S.splice(x, 0, h), u.value = x;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function y(B, x) {
|
|
419
419
|
B.preventDefault(), B.dataTransfer && (B.dataTransfer.dropEffect = "move");
|
|
420
420
|
}
|
|
421
|
-
function
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
}), s.value = !1,
|
|
421
|
+
function T(B, x) {
|
|
422
|
+
x && (x.moving = !1), i.value.forEach((h, S) => {
|
|
423
|
+
h.__fv_index__ = S;
|
|
424
|
+
}), s.value = !1, d(), r.value = x.__fv_index__, p.value = x.__fv_index__, c.value = x[n.value], t.emit("change", i.value);
|
|
425
425
|
}
|
|
426
426
|
return {
|
|
427
|
-
dragstart:
|
|
428
|
-
dragenter:
|
|
429
|
-
dragover:
|
|
430
|
-
dragend:
|
|
427
|
+
dragstart: b,
|
|
428
|
+
dragenter: m,
|
|
429
|
+
dragover: y,
|
|
430
|
+
dragend: T,
|
|
431
431
|
isDragging: s
|
|
432
432
|
};
|
|
433
433
|
}
|
|
@@ -443,19 +443,19 @@ function ze(e, t, o) {
|
|
|
443
443
|
}
|
|
444
444
|
function Xe() {
|
|
445
445
|
const e = a(-1), t = a(""), o = a(-1), l = a(!1);
|
|
446
|
-
function n(c,
|
|
447
|
-
o.value =
|
|
446
|
+
function n(c, r, d) {
|
|
447
|
+
o.value = d;
|
|
448
448
|
}
|
|
449
|
-
function i(c,
|
|
450
|
-
l.value || (o.value =
|
|
449
|
+
function i(c, r, d) {
|
|
450
|
+
l.value || (o.value = d);
|
|
451
451
|
}
|
|
452
|
-
function u(c,
|
|
452
|
+
function u(c, r, d) {
|
|
453
453
|
o.value = -1;
|
|
454
454
|
}
|
|
455
455
|
function s() {
|
|
456
456
|
l.value = !0;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function p() {
|
|
459
459
|
l.value = !1;
|
|
460
460
|
}
|
|
461
461
|
return {
|
|
@@ -465,7 +465,7 @@ function Xe() {
|
|
|
465
465
|
onMouseenterItem: n,
|
|
466
466
|
onMouseoverItem: i,
|
|
467
467
|
onMouseoutItem: u,
|
|
468
|
-
resumeHover:
|
|
468
|
+
resumeHover: p,
|
|
469
469
|
suspendHover: s
|
|
470
470
|
};
|
|
471
471
|
}
|
|
@@ -474,35 +474,35 @@ const fe = /* @__PURE__ */ z({
|
|
|
474
474
|
props: Re,
|
|
475
475
|
emits: ["checkValuesChange", "clickItem", "selectionChange", "removeItem", "change"],
|
|
476
476
|
setup(e, t) {
|
|
477
|
-
const o = a(), l = a(e.view), n = a(e.header), i = a(e.multiSelect), u = a(e.view === "CardView"), s = a(!0),
|
|
477
|
+
const o = a(), l = a(e.view), n = a(e.header), i = a(e.multiSelect), u = a(e.view === "CardView"), s = a(!0), p = a({}), c = a("暂无数据");
|
|
478
478
|
a(!0), a(!1), a("id");
|
|
479
|
-
const
|
|
480
|
-
dataView:
|
|
481
|
-
} =
|
|
479
|
+
const r = $e(e), {
|
|
480
|
+
dataView: d
|
|
481
|
+
} = r, f = I(() => {
|
|
482
482
|
const P = {
|
|
483
483
|
"f-list-view": !0,
|
|
484
484
|
"f-list-view-multiple": i.value
|
|
485
485
|
};
|
|
486
486
|
return e.size !== "default" && (P[`${e.size}-item`] = !0), P;
|
|
487
|
-
}),
|
|
487
|
+
}), b = I(() => ({
|
|
488
488
|
"f-list-view-group": !0,
|
|
489
489
|
"d-flex": u.value,
|
|
490
490
|
"flex-wrap": u.value
|
|
491
|
-
})),
|
|
491
|
+
})), m = I(() => !!d.value && d.value.length > 0), y = Xe(), T = De(e, t, r), B = Ne(e, t, r, y), x = ze(e, t, r), h = je(e, t, B, y, T), S = Ae(e, o), O = I(() => d.value.length === 0), F = I(() => O.value && !t.slots.empty), E = I(() => !!t.slots.footer || s.value);
|
|
492
492
|
function L() {
|
|
493
493
|
return l.value === "SingleView" ? ae : l.value === "DraggableView" ? We : l.value === "ContentView" && t.slots.content ? He : ae;
|
|
494
494
|
}
|
|
495
|
-
const
|
|
495
|
+
const C = L(), {
|
|
496
496
|
renderItem: j
|
|
497
|
-
} =
|
|
497
|
+
} = C(e, t, r, B, y, h, T, x);
|
|
498
498
|
function M() {
|
|
499
499
|
return n.value === "SearchBar" ? le : n.value === "ContentHeader" ? _e : le;
|
|
500
500
|
}
|
|
501
501
|
const D = M(), {
|
|
502
502
|
renderHeader: X
|
|
503
|
-
} = D(e, t,
|
|
503
|
+
} = D(e, t, S);
|
|
504
504
|
function R(P) {
|
|
505
|
-
|
|
505
|
+
S.search(P);
|
|
506
506
|
}
|
|
507
507
|
t.expose({
|
|
508
508
|
search: R
|
|
@@ -510,20 +510,20 @@ const fe = /* @__PURE__ */ z({
|
|
|
510
510
|
function V(P) {
|
|
511
511
|
i.value && (P.preventDefault(), P.stopPropagation());
|
|
512
512
|
}
|
|
513
|
-
return () =>
|
|
514
|
-
class:
|
|
513
|
+
return () => v("div", {
|
|
514
|
+
class: f.value,
|
|
515
515
|
onClick: V
|
|
516
|
-
}, [X(),
|
|
516
|
+
}, [X(), v("div", {
|
|
517
517
|
ref: o,
|
|
518
518
|
class: "f-list-view-content"
|
|
519
|
-
}, [
|
|
520
|
-
class:
|
|
519
|
+
}, [v("ul", {
|
|
520
|
+
class: b.value,
|
|
521
521
|
style: "list-style: none;"
|
|
522
|
-
}, [
|
|
522
|
+
}, [m.value && d.value.map((P, A) => j(P, A, p)), F.value && v("div", {
|
|
523
523
|
class: "f-list-view-emptydata"
|
|
524
|
-
}, [
|
|
524
|
+
}, [v("p", {
|
|
525
525
|
class: "f-empty-title"
|
|
526
|
-
}, [c.value])]), t.slots.empty && t.slots.empty()])]), E.value &&
|
|
526
|
+
}, [c.value])]), t.slots.empty && t.slots.empty()])]), E.value && v("div", {
|
|
527
527
|
class: "f-list-view-footer"
|
|
528
528
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
529
529
|
}
|
|
@@ -566,7 +566,7 @@ const Ue = /* @__PURE__ */ z({
|
|
|
566
566
|
onClickButton: o
|
|
567
567
|
} = Ge(e, t), l = a(e.size), n = a(e.type), i = a(e.disabled);
|
|
568
568
|
a(e.icon);
|
|
569
|
-
const u =
|
|
569
|
+
const u = I(() => {
|
|
570
570
|
const s = {
|
|
571
571
|
btn: !0,
|
|
572
572
|
"btn-lg": l.value === "large",
|
|
@@ -574,7 +574,7 @@ const Ue = /* @__PURE__ */ z({
|
|
|
574
574
|
};
|
|
575
575
|
return n.value && (s[`btn-${n.value}`] = !0), s;
|
|
576
576
|
});
|
|
577
|
-
return
|
|
577
|
+
return I(() => ({})), () => v("button", {
|
|
578
578
|
class: u.value,
|
|
579
579
|
disabled: i.value,
|
|
580
580
|
onClick: (s) => o(s)
|
|
@@ -875,13 +875,13 @@ const st = {
|
|
|
875
875
|
W(e.dataSource, () => {
|
|
876
876
|
o.value = e.dataSource;
|
|
877
877
|
});
|
|
878
|
-
const u =
|
|
879
|
-
function s(
|
|
880
|
-
l.value =
|
|
878
|
+
const u = I(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
879
|
+
function s(p) {
|
|
880
|
+
l.value = p.map((c) => Object.assign({}, c)), i.value = p.map((c) => c[e.idField]), t.emit("selectionChange", l.value);
|
|
881
881
|
}
|
|
882
|
-
return () =>
|
|
882
|
+
return () => v("div", {
|
|
883
883
|
class: "f-combo-list-container"
|
|
884
|
-
}, [
|
|
884
|
+
}, [v(fe, {
|
|
885
885
|
size: "small",
|
|
886
886
|
itemClass: "f-combo-list-item",
|
|
887
887
|
header: u.value,
|
|
@@ -1197,37 +1197,37 @@ const bt = {
|
|
|
1197
1197
|
function n(s) {
|
|
1198
1198
|
t.emit("click"), s.preventDefault(), s.stopPropagation();
|
|
1199
1199
|
}
|
|
1200
|
-
const i =
|
|
1200
|
+
const i = I(() => {
|
|
1201
1201
|
const s = l.value;
|
|
1202
1202
|
if (s) {
|
|
1203
|
-
const
|
|
1203
|
+
const p = s.getBoundingClientRect(), {
|
|
1204
1204
|
left: c,
|
|
1205
|
-
top:
|
|
1206
|
-
height:
|
|
1207
|
-
} =
|
|
1205
|
+
top: r,
|
|
1206
|
+
height: d
|
|
1207
|
+
} = p;
|
|
1208
1208
|
return {
|
|
1209
1209
|
left: c,
|
|
1210
|
-
top:
|
|
1210
|
+
top: r + d
|
|
1211
1211
|
};
|
|
1212
1212
|
}
|
|
1213
1213
|
return o.value;
|
|
1214
|
-
}), u =
|
|
1214
|
+
}), u = I(() => ({
|
|
1215
1215
|
position: "relative",
|
|
1216
1216
|
left: `${i.value.left}px`,
|
|
1217
1217
|
top: `${i.value.top}px`
|
|
1218
1218
|
}));
|
|
1219
|
-
return () =>
|
|
1219
|
+
return () => v(se, {
|
|
1220
1220
|
to: "body"
|
|
1221
1221
|
}, {
|
|
1222
1222
|
default: () => {
|
|
1223
|
-
var s,
|
|
1224
|
-
return [
|
|
1223
|
+
var s, p;
|
|
1224
|
+
return [v("div", {
|
|
1225
1225
|
class: "overlay-container",
|
|
1226
1226
|
style: "pointer-events: auto;",
|
|
1227
1227
|
onClick: (c) => n(c)
|
|
1228
|
-
}, [
|
|
1228
|
+
}, [v("div", {
|
|
1229
1229
|
style: u.value
|
|
1230
|
-
}, [(
|
|
1230
|
+
}, [(p = (s = t.slots).default) == null ? void 0 : p.call(s)])])];
|
|
1231
1231
|
}
|
|
1232
1232
|
});
|
|
1233
1233
|
}
|
|
@@ -1252,7 +1252,7 @@ function St(e) {
|
|
|
1252
1252
|
document.body.removeChild(t);
|
|
1253
1253
|
});
|
|
1254
1254
|
const i = wt(e);
|
|
1255
|
-
return () =>
|
|
1255
|
+
return () => v(Ct, {
|
|
1256
1256
|
"popup-content-position": e.popupPosition,
|
|
1257
1257
|
host: e.host,
|
|
1258
1258
|
onClick: n
|
|
@@ -1268,53 +1268,53 @@ class Tt {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
1270
|
function Bt(e, t, o, l) {
|
|
1271
|
-
const n = a(e.buttonBehavior), i = a(e.popupOnInput), u =
|
|
1271
|
+
const n = a(e.buttonBehavior), i = a(e.popupOnInput), u = I(() => ({
|
|
1272
1272
|
"input-group-append": !0,
|
|
1273
1273
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
1274
|
-
})), s =
|
|
1275
|
-
async function
|
|
1274
|
+
})), s = I(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable);
|
|
1275
|
+
async function p(f) {
|
|
1276
1276
|
if (s.value) {
|
|
1277
|
-
const
|
|
1277
|
+
const b = !!t.slots.default;
|
|
1278
1278
|
n.value === "Overlay" && Tt.show({
|
|
1279
1279
|
host: o.value,
|
|
1280
1280
|
render: () => {
|
|
1281
1281
|
if (t.slots.default)
|
|
1282
1282
|
return t.slots.default();
|
|
1283
1283
|
}
|
|
1284
|
-
}),
|
|
1284
|
+
}), b && n.value === "Popup" && l.togglePopup(), b && i.value && l.hidePopup(), t.emit("clickButton", { origin: f, value: e.modelValue });
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1286
|
+
f.stopPropagation();
|
|
1287
1287
|
}
|
|
1288
|
-
function c(
|
|
1289
|
-
t.emit("mouseEnterIcon",
|
|
1288
|
+
function c(f) {
|
|
1289
|
+
t.emit("mouseEnterIcon", f);
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1292
|
-
t.emit("mouseLeaveIcon",
|
|
1291
|
+
function r(f) {
|
|
1292
|
+
t.emit("mouseLeaveIcon", f);
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function d() {
|
|
1295
1295
|
t.emit("mouseOverButton");
|
|
1296
1296
|
}
|
|
1297
1297
|
return {
|
|
1298
1298
|
buttonClass: u,
|
|
1299
|
-
onClickButton:
|
|
1299
|
+
onClickButton: p,
|
|
1300
1300
|
onMouseEnterButton: c,
|
|
1301
|
-
onMouseLeaveButton:
|
|
1302
|
-
onMouseOverButton:
|
|
1301
|
+
onMouseLeaveButton: r,
|
|
1302
|
+
onMouseOverButton: d
|
|
1303
1303
|
};
|
|
1304
1304
|
}
|
|
1305
1305
|
function It(e, t, o, l, n, i) {
|
|
1306
|
-
const u = a(!1), s =
|
|
1307
|
-
function c(
|
|
1308
|
-
u.value =
|
|
1306
|
+
const u = a(!1), s = I(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: p } = i;
|
|
1307
|
+
function c(b) {
|
|
1308
|
+
u.value = b;
|
|
1309
1309
|
}
|
|
1310
1310
|
W(n, () => {
|
|
1311
1311
|
l.value ? c(!!n.value) : c(!1);
|
|
1312
1312
|
});
|
|
1313
|
-
function
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1313
|
+
function r(b) {
|
|
1314
|
+
const m = !e.readonly && !e.disable && e.editable, y = !e.editable;
|
|
1315
|
+
b.stopPropagation(), (m || y) && (p("", !1), c(!u.value), t.emit("clear"));
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function d(b) {
|
|
1318
1318
|
if (s.value) {
|
|
1319
1319
|
if (!o.value) {
|
|
1320
1320
|
c(!1);
|
|
@@ -1323,89 +1323,89 @@ function It(e, t, o, l, n, i) {
|
|
|
1323
1323
|
(!e.editable || !e.readonly) && !e.disable && c(!0);
|
|
1324
1324
|
}
|
|
1325
1325
|
}
|
|
1326
|
-
function
|
|
1326
|
+
function f(b) {
|
|
1327
1327
|
s.value && c(!1);
|
|
1328
1328
|
}
|
|
1329
1329
|
return {
|
|
1330
1330
|
enableClearButton: s,
|
|
1331
1331
|
showClearButton: u,
|
|
1332
|
-
onClearValue:
|
|
1333
|
-
onMouseEnterTextBox:
|
|
1334
|
-
onMouseLeaveTextBox:
|
|
1332
|
+
onClearValue: r,
|
|
1333
|
+
onMouseEnterTextBox: d,
|
|
1334
|
+
onMouseLeaveTextBox: f
|
|
1335
1335
|
};
|
|
1336
1336
|
}
|
|
1337
1337
|
function kt(e, t, o, l, n) {
|
|
1338
|
-
const i = a(e.popupOnInput), u = a(e.popupOnFocus), { shouldPopupContent: s } = n,
|
|
1339
|
-
let
|
|
1340
|
-
const
|
|
1338
|
+
const i = a(e.popupOnInput), u = a(e.popupOnFocus), { shouldPopupContent: s } = n, p = I(() => e.enableTitle ? o.value : ""), c = I(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), r = I(() => e.readonly || !e.editable);
|
|
1339
|
+
let d = !1;
|
|
1340
|
+
const f = I(() => !e.disable && d), b = I(() => ({
|
|
1341
1341
|
"text-left": e.textAlign === "left",
|
|
1342
1342
|
"text-center": e.textAlign === "center",
|
|
1343
1343
|
"text-right": e.textAlign === "right",
|
|
1344
1344
|
"form-control": !0,
|
|
1345
1345
|
"f-utils-fill": !0
|
|
1346
|
-
})),
|
|
1346
|
+
})), m = I(() => ({
|
|
1347
1347
|
"input-group": !0,
|
|
1348
1348
|
"f-state-disable": e.disable,
|
|
1349
1349
|
"f-state-editable": e.editable && !e.disable && !e.readonly,
|
|
1350
1350
|
"f-state-readonly": e.readonly && !e.disable,
|
|
1351
|
-
"f-state-focus":
|
|
1351
|
+
"f-state-focus": f.value
|
|
1352
1352
|
}));
|
|
1353
|
-
function
|
|
1354
|
-
o.value !==
|
|
1353
|
+
function y(C, j = !0) {
|
|
1354
|
+
o.value !== C && (o.value = C, j && t.emit("change", C), t.emit("update:modelValue", C));
|
|
1355
1355
|
}
|
|
1356
|
-
function C
|
|
1357
|
-
s.value = !1,
|
|
1356
|
+
function T(C) {
|
|
1357
|
+
s.value = !1, y(C, !0);
|
|
1358
1358
|
}
|
|
1359
1359
|
W(
|
|
1360
1360
|
() => e.modelValue,
|
|
1361
|
-
(
|
|
1362
|
-
o.value =
|
|
1361
|
+
(C) => {
|
|
1362
|
+
o.value = C, t.emit("change", C);
|
|
1363
1363
|
}
|
|
1364
1364
|
);
|
|
1365
|
-
function B(
|
|
1366
|
-
|
|
1365
|
+
function B(C) {
|
|
1366
|
+
d = !1, t.emit("blur", C), C.stopPropagation();
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1369
|
-
t.emit("click",
|
|
1368
|
+
function x(C) {
|
|
1369
|
+
t.emit("click", C);
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function h(C) {
|
|
1372
1372
|
if (e.disable) {
|
|
1373
|
-
|
|
1373
|
+
d = !0;
|
|
1374
1374
|
return;
|
|
1375
1375
|
}
|
|
1376
|
-
|
|
1376
|
+
d = !0, r.value || (t.emit("focus", C), u.value && !s.value && n.popup());
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1379
|
-
t.emit("input",
|
|
1380
|
-
const j =
|
|
1381
|
-
l.value = j, o.value !== j &&
|
|
1378
|
+
function S(C) {
|
|
1379
|
+
t.emit("input", C.target.value);
|
|
1380
|
+
const j = C.target.value;
|
|
1381
|
+
l.value = j, o.value !== j && y(j, !1), i.value && !s.value && n.popup();
|
|
1382
1382
|
}
|
|
1383
|
-
function O(
|
|
1384
|
-
|
|
1383
|
+
function O(C) {
|
|
1384
|
+
C.target.tagName !== "INPUT" && C.preventDefault(), C.stopPropagation();
|
|
1385
1385
|
}
|
|
1386
|
-
function F(
|
|
1387
|
-
t.emit("keydown",
|
|
1386
|
+
function F(C) {
|
|
1387
|
+
t.emit("keydown", C);
|
|
1388
1388
|
}
|
|
1389
|
-
function E(
|
|
1390
|
-
|
|
1389
|
+
function E(C) {
|
|
1390
|
+
C.key === "Enter" && (i.value || u.value) && n.hidePopup(), t.emit("keyup", C);
|
|
1391
1391
|
}
|
|
1392
|
-
function L(
|
|
1393
|
-
const j =
|
|
1394
|
-
|
|
1392
|
+
function L(C) {
|
|
1393
|
+
const j = C.target.value;
|
|
1394
|
+
C.stopPropagation(), y(j);
|
|
1395
1395
|
}
|
|
1396
1396
|
return {
|
|
1397
|
-
hasFocusedTextBox:
|
|
1398
|
-
isTextBoxReadonly:
|
|
1399
|
-
textBoxClass:
|
|
1397
|
+
hasFocusedTextBox: f,
|
|
1398
|
+
isTextBoxReadonly: r,
|
|
1399
|
+
textBoxClass: b,
|
|
1400
1400
|
textBoxPlaceholder: c,
|
|
1401
|
-
textBoxTitle:
|
|
1402
|
-
inputGroupClass:
|
|
1403
|
-
changeTextBoxValue:
|
|
1404
|
-
commitValue:
|
|
1401
|
+
textBoxTitle: p,
|
|
1402
|
+
inputGroupClass: m,
|
|
1403
|
+
changeTextBoxValue: y,
|
|
1404
|
+
commitValue: T,
|
|
1405
1405
|
onBlurTextBox: B,
|
|
1406
|
-
onClickTextBox:
|
|
1407
|
-
onFocusTextBox:
|
|
1408
|
-
onInput:
|
|
1406
|
+
onClickTextBox: x,
|
|
1407
|
+
onFocusTextBox: h,
|
|
1408
|
+
onInput: S,
|
|
1409
1409
|
onKeyDownTextBox: F,
|
|
1410
1410
|
onKeyUpTextBox: E,
|
|
1411
1411
|
onMouseDownTextBox: O,
|
|
@@ -1424,10 +1424,10 @@ function xt(e, t, o) {
|
|
|
1424
1424
|
async function s() {
|
|
1425
1425
|
!!t.slots.default && (n.value = !0, await K(), i());
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1427
|
+
function p() {
|
|
1428
1428
|
n.value = !1;
|
|
1429
1429
|
}
|
|
1430
|
-
return { hidePopup:
|
|
1430
|
+
return { hidePopup: p, popup: s, shouldPopupContent: n, togglePopup: u, popoverRef: l };
|
|
1431
1431
|
}
|
|
1432
1432
|
function Ft(e, t, o) {
|
|
1433
1433
|
const {
|
|
@@ -1436,15 +1436,15 @@ function Ft(e, t, o) {
|
|
|
1436
1436
|
textBoxPlaceholder: i,
|
|
1437
1437
|
textBoxTitle: u,
|
|
1438
1438
|
onBlurTextBox: s,
|
|
1439
|
-
onClickTextBox:
|
|
1439
|
+
onClickTextBox: p,
|
|
1440
1440
|
onFocusTextBox: c,
|
|
1441
|
-
onInput:
|
|
1442
|
-
onKeyDownTextBox:
|
|
1443
|
-
onKeyUpTextBox:
|
|
1444
|
-
onMouseDownTextBox:
|
|
1445
|
-
onTextBoxValueChange:
|
|
1441
|
+
onInput: r,
|
|
1442
|
+
onKeyDownTextBox: d,
|
|
1443
|
+
onKeyUpTextBox: f,
|
|
1444
|
+
onMouseDownTextBox: b,
|
|
1445
|
+
onTextBoxValueChange: m
|
|
1446
1446
|
} = o;
|
|
1447
|
-
return () =>
|
|
1447
|
+
return () => v("input", {
|
|
1448
1448
|
name: "input-group-value",
|
|
1449
1449
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
1450
1450
|
class: n.value,
|
|
@@ -1458,13 +1458,13 @@ function Ft(e, t, o) {
|
|
|
1458
1458
|
type: e.inputType,
|
|
1459
1459
|
value: t.value,
|
|
1460
1460
|
onBlur: s,
|
|
1461
|
-
onChange:
|
|
1462
|
-
onClick:
|
|
1461
|
+
onChange: m,
|
|
1462
|
+
onClick: p,
|
|
1463
1463
|
onFocus: c,
|
|
1464
|
-
onInput:
|
|
1465
|
-
onKeydown:
|
|
1466
|
-
onKeyup:
|
|
1467
|
-
onMousedown:
|
|
1464
|
+
onInput: r,
|
|
1465
|
+
onKeydown: d,
|
|
1466
|
+
onKeyup: f,
|
|
1467
|
+
onMousedown: b
|
|
1468
1468
|
}, null);
|
|
1469
1469
|
}
|
|
1470
1470
|
const Ot = {
|
|
@@ -1487,27 +1487,27 @@ const Ot = {
|
|
|
1487
1487
|
};
|
|
1488
1488
|
function Pt(e, t, o, l) {
|
|
1489
1489
|
const n = a(-1), i = a(!1);
|
|
1490
|
-
function u(
|
|
1491
|
-
|
|
1492
|
-
n.value =
|
|
1490
|
+
function u(r, d, f) {
|
|
1491
|
+
r.stopPropagation(), d && setTimeout(() => {
|
|
1492
|
+
n.value = f, i.value = !0, d.moving = !0;
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
1495
|
-
function s(
|
|
1496
|
-
if (
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1495
|
+
function s(r, d) {
|
|
1496
|
+
if (r.preventDefault(), n.value !== d) {
|
|
1497
|
+
const f = l.value[n.value], b = l.value;
|
|
1498
|
+
b.splice(n.value, 1), b.splice(d, 0, f), n.value = d;
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1502
|
-
|
|
1501
|
+
function p(r, d) {
|
|
1502
|
+
r.preventDefault(), r.dataTransfer && (r.dataTransfer.dropEffect = "move");
|
|
1503
1503
|
}
|
|
1504
|
-
function c(
|
|
1505
|
-
|
|
1504
|
+
function c(r, d) {
|
|
1505
|
+
d && (d.moving = !1), o.value = l.value.filter((f) => f.type === "Tag").map((f) => f.payload), i.value = !1, t.emit("change", o.value);
|
|
1506
1506
|
}
|
|
1507
1507
|
return {
|
|
1508
1508
|
dragstart: u,
|
|
1509
1509
|
dragenter: s,
|
|
1510
|
-
dragover:
|
|
1510
|
+
dragover: p,
|
|
1511
1511
|
dragend: c,
|
|
1512
1512
|
isDragging: i
|
|
1513
1513
|
};
|
|
@@ -1517,36 +1517,36 @@ const Vt = /* @__PURE__ */ z({
|
|
|
1517
1517
|
props: Ot,
|
|
1518
1518
|
emits: ["remove", "selectionChange", "change"],
|
|
1519
1519
|
setup(e, t) {
|
|
1520
|
-
const o = a(e.selectable), l = a(e.customClass), n = a(e.data), i = a(e.tagType), u = a(e.tagStyle), s = a(e.showColor),
|
|
1520
|
+
const o = a(e.selectable), l = a(e.customClass), n = a(e.data), i = a(e.tagType), u = a(e.tagStyle), s = a(e.showColor), p = a(e.activeTag), c = a(e.customStyle), r = a(e.showClose), d = a(e.showAddButton), f = a(e.showInput), b = a(e.addButtonText), m = a(e.enableAddButton);
|
|
1521
1521
|
a(e.placeholder), a(""), a();
|
|
1522
|
-
const
|
|
1523
|
-
function
|
|
1522
|
+
const y = a(), T = a(e.wrapText), B = a();
|
|
1523
|
+
function x() {
|
|
1524
1524
|
const g = n.value.map((w) => ({
|
|
1525
1525
|
type: "Tag",
|
|
1526
1526
|
payload: w
|
|
1527
1527
|
}));
|
|
1528
|
-
return
|
|
1528
|
+
return d.value && g.push({
|
|
1529
1529
|
type: "AddButton"
|
|
1530
1530
|
}), g;
|
|
1531
1531
|
}
|
|
1532
|
-
const
|
|
1533
|
-
function
|
|
1534
|
-
n.value = g,
|
|
1532
|
+
const h = a(x());
|
|
1533
|
+
function S(g) {
|
|
1534
|
+
n.value = g, h.value = x();
|
|
1535
1535
|
}
|
|
1536
|
-
const O =
|
|
1536
|
+
const O = I(() => h.value.findIndex((g) => g.type === "Input")), F = Pt(e, t, n, h), {
|
|
1537
1537
|
dragstart: E,
|
|
1538
1538
|
dragenter: L,
|
|
1539
|
-
dragover:
|
|
1539
|
+
dragover: C,
|
|
1540
1540
|
dragend: j
|
|
1541
1541
|
} = F;
|
|
1542
|
-
W(() => e.data, (g) =>
|
|
1543
|
-
const M =
|
|
1542
|
+
W(() => e.data, (g) => S(g));
|
|
1543
|
+
const M = I(() => {
|
|
1544
1544
|
const g = {
|
|
1545
1545
|
"farris-tags": !0,
|
|
1546
1546
|
"farris-tags-checkable": o.value,
|
|
1547
|
-
"farris-tags-nowrap": !
|
|
1547
|
+
"farris-tags-nowrap": !T.value
|
|
1548
1548
|
};
|
|
1549
|
-
return l.value.split(" ").reduce((w,
|
|
1549
|
+
return l.value.split(" ").reduce((w, k) => (w[k] = !0, w), g), g;
|
|
1550
1550
|
});
|
|
1551
1551
|
function D(g) {
|
|
1552
1552
|
const w = {
|
|
@@ -1554,84 +1554,84 @@ const Vt = /* @__PURE__ */ z({
|
|
|
1554
1554
|
"farris-tag-item-checked": o.value && g.checked,
|
|
1555
1555
|
"farris-tag-item-checkable": o.value,
|
|
1556
1556
|
"farris-tag-item-has-color": s.value,
|
|
1557
|
-
"farris-tag-item-actived":
|
|
1557
|
+
"farris-tag-item-actived": p.value === g.name
|
|
1558
1558
|
};
|
|
1559
1559
|
if (i.value) {
|
|
1560
|
-
const
|
|
1561
|
-
w[
|
|
1560
|
+
const k = `farris-tag-item-${i.value}`;
|
|
1561
|
+
w[k] = !0;
|
|
1562
1562
|
}
|
|
1563
1563
|
return w;
|
|
1564
1564
|
}
|
|
1565
|
-
const X =
|
|
1565
|
+
const X = I(() => {
|
|
1566
1566
|
const g = {};
|
|
1567
|
-
return c.value && c.value.split(";").reduce((w,
|
|
1568
|
-
const H =
|
|
1567
|
+
return c.value && c.value.split(";").reduce((w, k) => {
|
|
1568
|
+
const H = k.split(":");
|
|
1569
1569
|
return w[H[0]] = H[1], w;
|
|
1570
1570
|
}, g), g;
|
|
1571
1571
|
});
|
|
1572
1572
|
function R(g, w) {
|
|
1573
|
-
o.value && w.selectable && (w.checked = !w.checked,
|
|
1574
|
-
|
|
1573
|
+
o.value && w.selectable && (w.checked = !w.checked, p.value = w.checked ? w.name : "", w.checked && n.value.filter((k) => k.name !== w.name).forEach((k) => {
|
|
1574
|
+
k.checked = !w.checked;
|
|
1575
1575
|
}), t.emit("change", n.value), t.emit("selectionChange", w));
|
|
1576
1576
|
}
|
|
1577
1577
|
function V(g, w) {
|
|
1578
|
-
let
|
|
1578
|
+
let k;
|
|
1579
1579
|
switch (g.key) {
|
|
1580
1580
|
case "Backspace":
|
|
1581
1581
|
n.value = n.value.filter((H) => H.name !== w.name), t.emit("change", n.value);
|
|
1582
1582
|
break;
|
|
1583
1583
|
case "ArrowLeft":
|
|
1584
|
-
|
|
1584
|
+
k = Math.max(y.value.scrollLeft + 20, 0), y.value.scrollLeft = k;
|
|
1585
1585
|
break;
|
|
1586
1586
|
case "ArrowRight":
|
|
1587
|
-
|
|
1587
|
+
k = Math.max(y.value.scrollLeft - 20, 0), y.value.scrollLeft = k;
|
|
1588
1588
|
}
|
|
1589
1589
|
}
|
|
1590
1590
|
function P(g, w) {
|
|
1591
|
-
const
|
|
1592
|
-
if (
|
|
1593
|
-
const [H] = n.value.splice(
|
|
1594
|
-
|
|
1591
|
+
const k = n.value.findIndex((H) => H.name === w.name);
|
|
1592
|
+
if (k > -1) {
|
|
1593
|
+
const [H] = n.value.splice(k, 1);
|
|
1594
|
+
h.value = x(), t.emit("change", n.value), t.emit("remove", n.value, H, k);
|
|
1595
1595
|
}
|
|
1596
1596
|
g.stopPropagation();
|
|
1597
1597
|
}
|
|
1598
|
-
const A =
|
|
1598
|
+
const A = I(() => ({
|
|
1599
1599
|
"farris-tag-item": !0,
|
|
1600
1600
|
"farris-tag-add-button": !0,
|
|
1601
|
-
"farris-tag-add-button-disabled": !
|
|
1601
|
+
"farris-tag-add-button-disabled": !m.value
|
|
1602
1602
|
}));
|
|
1603
1603
|
function $(g) {
|
|
1604
1604
|
}
|
|
1605
1605
|
function _() {
|
|
1606
|
-
return
|
|
1606
|
+
return v("li", {
|
|
1607
1607
|
class: A.value,
|
|
1608
1608
|
onClick: (g) => void 0
|
|
1609
|
-
}, [
|
|
1609
|
+
}, [v("span", {
|
|
1610
1610
|
class: "f-icon f-icon-amplification"
|
|
1611
|
-
}, null),
|
|
1611
|
+
}, null), v("span", {
|
|
1612
1612
|
class: "farris-tag-add-text"
|
|
1613
|
-
}, [
|
|
1613
|
+
}, [b.value])]);
|
|
1614
1614
|
}
|
|
1615
1615
|
function N(g) {
|
|
1616
1616
|
if (g && !g.innerText) {
|
|
1617
1617
|
const w = O.value;
|
|
1618
1618
|
if (w > 0) {
|
|
1619
|
-
const [
|
|
1620
|
-
|
|
1619
|
+
const [k] = n.value.splice(w - 1, 1);
|
|
1620
|
+
h.value.splice(w - 1, 1), t.emit("remove", n.value, k, w - 1);
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
|
-
function U(g, w,
|
|
1624
|
+
function U(g, w, k) {
|
|
1625
1625
|
g > -1 && (n.value.splice(g, 0, {
|
|
1626
1626
|
name: w,
|
|
1627
|
-
value:
|
|
1627
|
+
value: k,
|
|
1628
1628
|
selectable: o.value
|
|
1629
|
-
}),
|
|
1629
|
+
}), h.value = x(), t.emit("change", n.value));
|
|
1630
1630
|
}
|
|
1631
1631
|
function J(g) {
|
|
1632
1632
|
if (g && g.innerText) {
|
|
1633
|
-
const w = g.innerText,
|
|
1634
|
-
U(
|
|
1633
|
+
const w = g.innerText, k = O.value;
|
|
1634
|
+
U(k, w, w), g.innerText = "";
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
1637
|
function Y(g) {
|
|
@@ -1644,9 +1644,9 @@ const Vt = /* @__PURE__ */ z({
|
|
|
1644
1644
|
}));
|
|
1645
1645
|
}
|
|
1646
1646
|
function be() {
|
|
1647
|
-
return
|
|
1647
|
+
return v("li", {
|
|
1648
1648
|
class: "farris-tag-input-box"
|
|
1649
|
-
}, [
|
|
1649
|
+
}, [v("div", {
|
|
1650
1650
|
ref: B,
|
|
1651
1651
|
class: "form-control",
|
|
1652
1652
|
contenteditable: "true",
|
|
@@ -1655,31 +1655,31 @@ const Vt = /* @__PURE__ */ z({
|
|
|
1655
1655
|
}, null)]);
|
|
1656
1656
|
}
|
|
1657
1657
|
function Ce(g, w) {
|
|
1658
|
-
return
|
|
1658
|
+
return v("li", {
|
|
1659
1659
|
class: D(g),
|
|
1660
1660
|
style: X.value,
|
|
1661
1661
|
tabindex: 0,
|
|
1662
1662
|
id: g.name,
|
|
1663
1663
|
key: g.name,
|
|
1664
|
-
onClick: (
|
|
1665
|
-
onKeydown: (
|
|
1664
|
+
onClick: (k) => R(k, g),
|
|
1665
|
+
onKeydown: (k) => V(k, g),
|
|
1666
1666
|
draggable: "true",
|
|
1667
|
-
onDragstart: (
|
|
1668
|
-
onDragenter: (
|
|
1669
|
-
onDragend: (
|
|
1670
|
-
onDragover: (
|
|
1671
|
-
}, [
|
|
1667
|
+
onDragstart: (k) => E(k, g, w),
|
|
1668
|
+
onDragenter: (k) => L(k, w),
|
|
1669
|
+
onDragend: (k) => j(k, g),
|
|
1670
|
+
onDragover: (k) => C(k, w)
|
|
1671
|
+
}, [v("div", {
|
|
1672
1672
|
title: g.name,
|
|
1673
1673
|
class: "tag-box"
|
|
1674
|
-
}, [g.name]),
|
|
1674
|
+
}, [g.name]), r.value && v("span", {
|
|
1675
1675
|
class: "tag-delete"
|
|
1676
|
-
}, [
|
|
1676
|
+
}, [v("i", {
|
|
1677
1677
|
class: "f-icon f-icon-close",
|
|
1678
|
-
onClick: (
|
|
1678
|
+
onClick: (k) => P(k, g)
|
|
1679
1679
|
}, null)])]);
|
|
1680
1680
|
}
|
|
1681
1681
|
function we() {
|
|
1682
|
-
return
|
|
1682
|
+
return h.value.map((g, w) => {
|
|
1683
1683
|
switch (g.type) {
|
|
1684
1684
|
case "Tag":
|
|
1685
1685
|
return Ce(g.payload, w);
|
|
@@ -1690,16 +1690,16 @@ const Vt = /* @__PURE__ */ z({
|
|
|
1690
1690
|
}
|
|
1691
1691
|
});
|
|
1692
1692
|
}
|
|
1693
|
-
const Se =
|
|
1693
|
+
const Se = I(() => ({
|
|
1694
1694
|
"farris-tags-item-container": !0,
|
|
1695
1695
|
"farris-tag-item-capsule": u.value === "capsule"
|
|
1696
1696
|
}));
|
|
1697
1697
|
function Te(g) {
|
|
1698
|
-
const w = Math.max(
|
|
1699
|
-
|
|
1698
|
+
const w = Math.max(y.value.scrollLeft - g.deltaX, 0);
|
|
1699
|
+
y.value.scrollLeft = w;
|
|
1700
1700
|
}
|
|
1701
1701
|
function Be(g) {
|
|
1702
|
-
const w =
|
|
1702
|
+
const w = y.value, k = n.value.length - 1;
|
|
1703
1703
|
if (w) {
|
|
1704
1704
|
const H = Array.from(w.children).filter((q) => q.className.indexOf("farris-tag-item") > -1).findIndex((q) => {
|
|
1705
1705
|
const G = q.getBoundingClientRect(), Z = window.getComputedStyle(q), oe = parseInt(Z["margin-left"], 10) + G.width + parseInt(Z["margin-right"], 10);
|
|
@@ -1708,22 +1708,22 @@ const Vt = /* @__PURE__ */ z({
|
|
|
1708
1708
|
if (H > -1)
|
|
1709
1709
|
return H;
|
|
1710
1710
|
}
|
|
1711
|
-
return
|
|
1711
|
+
return k;
|
|
1712
1712
|
}
|
|
1713
1713
|
function Ie(g) {
|
|
1714
|
-
if (
|
|
1715
|
-
const
|
|
1716
|
-
q.splice(
|
|
1714
|
+
if (f.value) {
|
|
1715
|
+
const k = Be(g.clientX) + 1, q = h.value.filter((G) => G.type !== "Input");
|
|
1716
|
+
q.splice(k, 0, {
|
|
1717
1717
|
type: "Input"
|
|
1718
|
-
}),
|
|
1718
|
+
}), h.value = q, K(() => {
|
|
1719
1719
|
B.value && B.value.focus();
|
|
1720
1720
|
});
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
1723
|
function ke(g) {
|
|
1724
|
-
var
|
|
1724
|
+
var k;
|
|
1725
1725
|
g.preventDefault(), g.stopPropagation();
|
|
1726
|
-
const w = (
|
|
1726
|
+
const w = (k = g.dataTransfer) == null ? void 0 : k.getData("Text");
|
|
1727
1727
|
if (w) {
|
|
1728
1728
|
const H = w.split(":"), q = H[0], G = H[1];
|
|
1729
1729
|
[...n.value].findIndex((ee) => (console.log(`${ee.value} === ${G} is ${ee.value === G}`), ee.value === G)) > -1 || U(n.value.length, q, G);
|
|
@@ -1732,13 +1732,13 @@ const Vt = /* @__PURE__ */ z({
|
|
|
1732
1732
|
function xe(g) {
|
|
1733
1733
|
g.preventDefault();
|
|
1734
1734
|
}
|
|
1735
|
-
return () =>
|
|
1735
|
+
return () => v("div", {
|
|
1736
1736
|
class: M.value,
|
|
1737
1737
|
onClick: Ie,
|
|
1738
1738
|
onDrop: ke,
|
|
1739
1739
|
onDragover: xe
|
|
1740
|
-
}, [
|
|
1741
|
-
ref:
|
|
1740
|
+
}, [v("ul", {
|
|
1741
|
+
ref: y,
|
|
1742
1742
|
class: Se.value,
|
|
1743
1743
|
onWheel: (g) => Te(g)
|
|
1744
1744
|
}, [we()])]);
|
|
@@ -1747,14 +1747,14 @@ const Vt = /* @__PURE__ */ z({
|
|
|
1747
1747
|
function Mt(e, t, o) {
|
|
1748
1748
|
const l = a(e.separator), {
|
|
1749
1749
|
changeTextBoxValue: n
|
|
1750
|
-
} = o, i =
|
|
1750
|
+
} = o, i = I(() => t.value ? t.value.split(l.value).map((s) => ({
|
|
1751
1751
|
name: s,
|
|
1752
1752
|
selectable: !0
|
|
1753
1753
|
})) : []);
|
|
1754
1754
|
function u(s) {
|
|
1755
|
-
n(s.map((
|
|
1755
|
+
n(s.map((p) => p.name).join(l.value), !0);
|
|
1756
1756
|
}
|
|
1757
|
-
return () =>
|
|
1757
|
+
return () => v(Vt, {
|
|
1758
1758
|
class: "form-control",
|
|
1759
1759
|
data: i.value,
|
|
1760
1760
|
showClose: !0,
|
|
@@ -1770,17 +1770,17 @@ function Lt(e, t, o) {
|
|
|
1770
1770
|
onMouseLeaveButton: u
|
|
1771
1771
|
} = t, {
|
|
1772
1772
|
enableClearButton: s,
|
|
1773
|
-
showClearButton:
|
|
1773
|
+
showClearButton: p,
|
|
1774
1774
|
onClearValue: c
|
|
1775
1775
|
} = o;
|
|
1776
|
-
return () =>
|
|
1776
|
+
return () => v("div", {
|
|
1777
1777
|
class: l.value
|
|
1778
|
-
}, [s.value && Q(
|
|
1778
|
+
}, [s.value && Q(v("span", {
|
|
1779
1779
|
class: "input-group-text input-group-clear",
|
|
1780
1780
|
onClick: c
|
|
1781
|
-
}, [
|
|
1781
|
+
}, [v("i", {
|
|
1782
1782
|
class: "f-icon modal_close"
|
|
1783
|
-
}, null)]), [[re,
|
|
1783
|
+
}, null)]), [[re, p.value]]), e.buttonContent && v("span", {
|
|
1784
1784
|
class: "input-group-text input-group-append-button",
|
|
1785
1785
|
innerHTML: e.buttonContent,
|
|
1786
1786
|
onClick: n,
|
|
@@ -1812,26 +1812,26 @@ const Rt = {
|
|
|
1812
1812
|
minWidth: { type: Number, default: -1 }
|
|
1813
1813
|
};
|
|
1814
1814
|
function jt(e) {
|
|
1815
|
-
const t = e.host ? e.host : "body", o =
|
|
1815
|
+
const t = e.host ? e.host : "body", o = I(() => t === "body" ? 0 : t ? t.getBoundingClientRect().top : 0), l = I(() => t === "body" ? 0 : t ? t.getBoundingClientRect().left : 0), n = I(() => t === "body" ? document.body.getBoundingClientRect().width : t ? t.getBoundingClientRect().width - (e.rightBoundary ? e.rightBoundary.getBoundingClientRect().width : 0) : document.body.getBoundingClientRect().width);
|
|
1816
1816
|
return { host: t, hostLeft: l, hostTop: o, hostWidth: n };
|
|
1817
1817
|
}
|
|
1818
1818
|
function Dt(e, t, o, l) {
|
|
1819
1819
|
var R;
|
|
1820
|
-
const n = a(0), i = a(((R = e.offsetX) == null ? void 0 : R.value) || 0), u = a(-1), s = a(-1),
|
|
1820
|
+
const n = a(0), i = a(((R = e.offsetX) == null ? void 0 : R.value) || 0), u = a(-1), s = a(-1), p = a(-1), c = a(e.placement), r = a(0), d = a(0), f = a(0), b = a(document.documentElement.scrollLeft), m = a(document.documentElement.scrollTop), { hostLeft: y, hostTop: T, hostWidth: B } = l;
|
|
1821
1821
|
W(e.offsetX, (V) => {
|
|
1822
1822
|
n.value = V - i.value;
|
|
1823
1823
|
});
|
|
1824
|
-
const
|
|
1824
|
+
const x = I(() => {
|
|
1825
1825
|
const V = {
|
|
1826
|
-
left: `${
|
|
1827
|
-
top: `${
|
|
1826
|
+
left: `${d.value}px`,
|
|
1827
|
+
top: `${f.value}px`,
|
|
1828
1828
|
transform: `translateX(${n.value}px)`
|
|
1829
1829
|
};
|
|
1830
1830
|
return e.zIndex !== -1 && (V["z-index"] = e.zIndex), u.value !== -1 && (V.width = `${u.value}px`), V;
|
|
1831
|
-
}),
|
|
1832
|
-
left: `${
|
|
1831
|
+
}), h = I(() => ({
|
|
1832
|
+
left: `${r.value}px`
|
|
1833
1833
|
}));
|
|
1834
|
-
function
|
|
1834
|
+
function S(V) {
|
|
1835
1835
|
if (V && e.keepWidthWithReference) {
|
|
1836
1836
|
const P = V.getBoundingClientRect();
|
|
1837
1837
|
u.value = Math.max(e.minWidth, P.width);
|
|
@@ -1842,140 +1842,140 @@ function Dt(e, t, o, l) {
|
|
|
1842
1842
|
return A > 0 ? A : P;
|
|
1843
1843
|
}
|
|
1844
1844
|
function F(V, P, A) {
|
|
1845
|
-
const $ =
|
|
1845
|
+
const $ = r.value, _ = P.left - y.value + P.width / 2 + b.value, N = P.top - T.value - (V.height + A.height) + m.value;
|
|
1846
1846
|
return { popoverLeft: _, popoverTop: N, arrowLeft: $ };
|
|
1847
1847
|
}
|
|
1848
1848
|
function E(V, P, A) {
|
|
1849
|
-
return P.top -
|
|
1849
|
+
return P.top - T.value + (P.height + A.height) + m.value;
|
|
1850
1850
|
}
|
|
1851
1851
|
function L(V, P) {
|
|
1852
|
-
const A = O(P, V), $ = V <= A ?
|
|
1852
|
+
const A = O(P, V), $ = V <= A ? r.value : V - A;
|
|
1853
1853
|
return { popoverLeft: Math.min(V, A), arrowLeft: $ };
|
|
1854
1854
|
}
|
|
1855
|
-
function
|
|
1856
|
-
const $ = P.left -
|
|
1855
|
+
function C(V, P, A) {
|
|
1856
|
+
const $ = P.left - y.value + P.width / 2 - (A.width / 2 - (V.left - y.value)) + b.value, { arrowLeft: _, popoverLeft: N } = L($, V), U = E(V, P, A);
|
|
1857
1857
|
return { popoverLeft: N, popoverTop: U, arrowLeft: _ };
|
|
1858
1858
|
}
|
|
1859
1859
|
function j(V, P, A) {
|
|
1860
|
-
const $ = P.left -
|
|
1860
|
+
const $ = P.left - y.value + b.value, { arrowLeft: _, popoverLeft: N } = L($, V), U = E(V, P, A);
|
|
1861
1861
|
return { popoverLeft: N, popoverTop: U, arrowLeft: _ };
|
|
1862
1862
|
}
|
|
1863
1863
|
const M = /* @__PURE__ */ new Map([
|
|
1864
1864
|
["top", F],
|
|
1865
|
-
["bottom",
|
|
1865
|
+
["bottom", C],
|
|
1866
1866
|
["bottom-left", j]
|
|
1867
1867
|
]);
|
|
1868
1868
|
function D(V) {
|
|
1869
1869
|
var N;
|
|
1870
1870
|
const P = V.getBoundingClientRect();
|
|
1871
|
-
s.value = P.top,
|
|
1871
|
+
s.value = P.top, p.value = P.left;
|
|
1872
1872
|
const A = t.value.getBoundingClientRect(), $ = (N = o.value) == null ? void 0 : N.getBoundingClientRect(), _ = M.get(c.value);
|
|
1873
1873
|
if (_) {
|
|
1874
1874
|
const { arrowLeft: U, popoverLeft: J, popoverTop: Y } = _($, P, A);
|
|
1875
|
-
|
|
1875
|
+
r.value = U, d.value = J, f.value = Y;
|
|
1876
1876
|
}
|
|
1877
|
-
e.keepWidthWithReference &&
|
|
1877
|
+
e.keepWidthWithReference && S(V);
|
|
1878
1878
|
}
|
|
1879
1879
|
function X(V) {
|
|
1880
1880
|
if (V) {
|
|
1881
1881
|
const P = V.getBoundingClientRect();
|
|
1882
|
-
(P.left !==
|
|
1882
|
+
(P.left !== p.value || P.top !== s.value) && D(V);
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
1885
|
return {
|
|
1886
|
-
arrowStyle:
|
|
1887
|
-
popoverStyle:
|
|
1886
|
+
arrowStyle: h,
|
|
1887
|
+
popoverStyle: x,
|
|
1888
1888
|
position: c,
|
|
1889
1889
|
popoverWidth: u,
|
|
1890
|
-
fitToReference:
|
|
1890
|
+
fitToReference: S,
|
|
1891
1891
|
followToReferencePosition: X,
|
|
1892
1892
|
locateToReference: D
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
1895
1895
|
function At(e, t, o, l, n, i, u) {
|
|
1896
|
-
const s = a(e.visible),
|
|
1897
|
-
let
|
|
1898
|
-
function
|
|
1899
|
-
s.value = !1, document.body.removeEventListener("click",
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
if (!n.value.contains(
|
|
1903
|
-
const
|
|
1904
|
-
|
|
1896
|
+
const s = a(e.visible), p = I(() => s.value), { fitToReference: c, locateToReference: r } = u;
|
|
1897
|
+
let d;
|
|
1898
|
+
function f() {
|
|
1899
|
+
s.value = !1, document.body.removeEventListener("click", d), t.emit("hidden");
|
|
1900
|
+
}
|
|
1901
|
+
d = (m) => {
|
|
1902
|
+
if (!n.value.contains(m.target)) {
|
|
1903
|
+
const y = n.value.closest(".popover");
|
|
1904
|
+
y && y.removeEventListener("click", d), f();
|
|
1905
1905
|
}
|
|
1906
1906
|
};
|
|
1907
|
-
async function
|
|
1908
|
-
if (l.value && o.value &&
|
|
1909
|
-
s.value = !0, n.value =
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1907
|
+
async function b(m) {
|
|
1908
|
+
if (l.value && o.value && m) {
|
|
1909
|
+
s.value = !0, n.value = m, await K(), r(m), i.value && c(m), document.body.addEventListener("click", d);
|
|
1910
|
+
const y = m.closest(".popover");
|
|
1911
|
+
y && y.addEventListener("click", d), t.emit("shown");
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
|
-
return t.expose({ hide:
|
|
1914
|
+
return t.expose({ hide: f, show: b, shown: p }), { showPopover: s, hidePopverOnClickBodyHandler: d };
|
|
1915
1915
|
}
|
|
1916
1916
|
function Et(e, t, o, l, n) {
|
|
1917
1917
|
const { popoverWidth: i, fitToReference: u, followToReferencePosition: s } = n;
|
|
1918
|
-
function
|
|
1918
|
+
function p() {
|
|
1919
1919
|
if (o.value) {
|
|
1920
1920
|
s(o.value);
|
|
1921
1921
|
const c = o.value.getBoundingClientRect();
|
|
1922
1922
|
l.value && c.width !== i.value && u(o.value);
|
|
1923
1923
|
}
|
|
1924
1924
|
}
|
|
1925
|
-
return { onResize:
|
|
1925
|
+
return { onResize: p };
|
|
1926
1926
|
}
|
|
1927
1927
|
const Ht = /* @__PURE__ */ z({
|
|
1928
1928
|
name: "FPopover",
|
|
1929
1929
|
props: Rt,
|
|
1930
1930
|
emits: ["shown", "hidden"],
|
|
1931
1931
|
setup(e, t) {
|
|
1932
|
-
const o = a(), l = a(), n = a(e.reference), i = a(e.keepWidthWithReference), u =
|
|
1933
|
-
host:
|
|
1932
|
+
const o = a(), l = a(), n = a(e.reference), i = a(e.keepWidthWithReference), u = I(() => !!e.title), s = jt(e), {
|
|
1933
|
+
host: p
|
|
1934
1934
|
} = s, c = Dt(e, o, l, s), {
|
|
1935
|
-
position:
|
|
1936
|
-
arrowStyle:
|
|
1937
|
-
popoverStyle:
|
|
1938
|
-
fitToReference:
|
|
1939
|
-
locateToReference:
|
|
1935
|
+
position: r,
|
|
1936
|
+
arrowStyle: d,
|
|
1937
|
+
popoverStyle: f,
|
|
1938
|
+
fitToReference: b,
|
|
1939
|
+
locateToReference: m
|
|
1940
1940
|
} = c, {
|
|
1941
|
-
showPopover:
|
|
1942
|
-
hidePopverOnClickBodyHandler:
|
|
1941
|
+
showPopover: y,
|
|
1942
|
+
hidePopverOnClickBodyHandler: T
|
|
1943
1943
|
} = At(e, t, o, l, n, i, c), {
|
|
1944
1944
|
onResize: B
|
|
1945
|
-
} = Et(e, t, n, i, c),
|
|
1946
|
-
const
|
|
1945
|
+
} = Et(e, t, n, i, c), x = I(() => {
|
|
1946
|
+
const S = `popover in popover-${r.value}`, O = `bs-popover-${r.value}`, F = {
|
|
1947
1947
|
"popover-fitcontent": e.fitContent
|
|
1948
1948
|
};
|
|
1949
|
-
return F[
|
|
1950
|
-
}),
|
|
1949
|
+
return F[S] = !0, F[O] = !0, (e.class || "").split(" ").reduce((L, C) => (L[C] = !0, L), F), F;
|
|
1950
|
+
}), h = I(() => ({
|
|
1951
1951
|
"popover-content": !0,
|
|
1952
1952
|
"popover-body": !0
|
|
1953
1953
|
}));
|
|
1954
1954
|
return de(() => {
|
|
1955
|
-
e.reference &&
|
|
1955
|
+
e.reference && m(n.value), i.value && b(n.value), window.addEventListener("resize", B);
|
|
1956
1956
|
}), ce(() => {
|
|
1957
|
-
document.body.removeEventListener("click",
|
|
1958
|
-
}), () =>
|
|
1959
|
-
to:
|
|
1957
|
+
document.body.removeEventListener("click", T), window.removeEventListener("resize", B);
|
|
1958
|
+
}), () => v(se, {
|
|
1959
|
+
to: p
|
|
1960
1960
|
}, {
|
|
1961
1961
|
default: () => {
|
|
1962
|
-
var
|
|
1963
|
-
return [Q(
|
|
1962
|
+
var S;
|
|
1963
|
+
return [Q(v("div", {
|
|
1964
1964
|
ref: l,
|
|
1965
|
-
class:
|
|
1966
|
-
style:
|
|
1965
|
+
class: x.value,
|
|
1966
|
+
style: f.value,
|
|
1967
1967
|
onClick: (O) => {
|
|
1968
1968
|
O.stopPropagation();
|
|
1969
1969
|
}
|
|
1970
|
-
}, [
|
|
1970
|
+
}, [v("div", {
|
|
1971
1971
|
ref: o,
|
|
1972
1972
|
class: "popover-arrow arrow",
|
|
1973
|
-
style:
|
|
1974
|
-
}, null), u.value &&
|
|
1973
|
+
style: d.value
|
|
1974
|
+
}, null), u.value && v("h3", {
|
|
1975
1975
|
class: "popover-title popover-header"
|
|
1976
|
-
}, [e.title]),
|
|
1977
|
-
class:
|
|
1978
|
-
}, [t.slots.default && ((
|
|
1976
|
+
}, [e.title]), v("div", {
|
|
1977
|
+
class: h.value
|
|
1978
|
+
}, [t.slots.default && ((S = t.slots) == null ? void 0 : S.default())])]), [[re, y.value]])];
|
|
1979
1979
|
}
|
|
1980
1980
|
});
|
|
1981
1981
|
}
|
|
@@ -1985,7 +1985,7 @@ function Wt(e, t, o) {
|
|
|
1985
1985
|
hidePopup: n,
|
|
1986
1986
|
popoverRef: i
|
|
1987
1987
|
} = o;
|
|
1988
|
-
return () =>
|
|
1988
|
+
return () => v(Ht, {
|
|
1989
1989
|
ref: i,
|
|
1990
1990
|
visible: !0,
|
|
1991
1991
|
placement: "bottom-left",
|
|
@@ -2011,78 +2011,78 @@ const _t = /* @__PURE__ */ z({
|
|
|
2011
2011
|
const o = a(), l = a(e.customClass), n = a(e.modelValue), i = xt(e, t, o), {
|
|
2012
2012
|
shouldPopupContent: u,
|
|
2013
2013
|
hidePopup: s
|
|
2014
|
-
} = i,
|
|
2015
|
-
hasFocusedTextBox:
|
|
2016
|
-
commitValue:
|
|
2017
|
-
inputGroupClass:
|
|
2018
|
-
} =
|
|
2019
|
-
onMouseEnterTextBox:
|
|
2020
|
-
onMouseLeaveTextBox:
|
|
2021
|
-
} =
|
|
2014
|
+
} = i, p = Bt(e, t, o, i), c = a(""), r = kt(e, t, n, c, i), {
|
|
2015
|
+
hasFocusedTextBox: d,
|
|
2016
|
+
commitValue: f,
|
|
2017
|
+
inputGroupClass: b
|
|
2018
|
+
} = r, m = It(e, t, n, d, c, r), {
|
|
2019
|
+
onMouseEnterTextBox: y,
|
|
2020
|
+
onMouseLeaveTextBox: T
|
|
2021
|
+
} = m, B = I(() => {
|
|
2022
2022
|
const E = {
|
|
2023
2023
|
"f-button-edit": !0,
|
|
2024
2024
|
"f-cmp-inputgroup": !0,
|
|
2025
2025
|
"f-button-edit-nowrap": !e.wrapText
|
|
2026
2026
|
};
|
|
2027
|
-
return l.value && l.value.split(" ").reduce((L,
|
|
2027
|
+
return l.value && l.value.split(" ").reduce((L, C) => (L[C] = !0, L), E), E;
|
|
2028
2028
|
});
|
|
2029
|
-
function
|
|
2030
|
-
return e.multiSelect && e.inputType === "tag" ? Mt(e, n,
|
|
2029
|
+
function x() {
|
|
2030
|
+
return e.multiSelect && e.inputType === "tag" ? Mt(e, n, r) : Ft(e, n, r);
|
|
2031
2031
|
}
|
|
2032
|
-
let
|
|
2032
|
+
let h = x();
|
|
2033
2033
|
W([() => e.multiSelect, () => e.inputType], () => {
|
|
2034
|
-
|
|
2034
|
+
h = x();
|
|
2035
2035
|
});
|
|
2036
|
-
const
|
|
2037
|
-
commitValue:
|
|
2036
|
+
const S = Lt(e, p, m), O = Wt(e, t, i), F = {
|
|
2037
|
+
commitValue: f,
|
|
2038
2038
|
elementRef: o,
|
|
2039
2039
|
hidePopup: s
|
|
2040
2040
|
};
|
|
2041
2041
|
return de(() => {
|
|
2042
2042
|
o.value.componentInstance = F;
|
|
2043
|
-
}), t.expose(F), () =>
|
|
2043
|
+
}), t.expose(F), () => v(te, null, [v("div", Me(t.attrs, {
|
|
2044
2044
|
ref: o,
|
|
2045
2045
|
class: B.value,
|
|
2046
2046
|
id: e.id
|
|
2047
|
-
}), [
|
|
2048
|
-
class:
|
|
2049
|
-
onMouseenter:
|
|
2050
|
-
onMouseleave:
|
|
2051
|
-
}, [
|
|
2047
|
+
}), [v("div", {
|
|
2048
|
+
class: b.value,
|
|
2049
|
+
onMouseenter: y,
|
|
2050
|
+
onMouseleave: T
|
|
2051
|
+
}, [h(), S()])]), u.value && O()]);
|
|
2052
2052
|
}
|
|
2053
2053
|
});
|
|
2054
2054
|
function $t(e) {
|
|
2055
2055
|
const t = a(""), o = a(e.modelValue), l = a(e.data || []), n = a(e.editable);
|
|
2056
2056
|
function i(c) {
|
|
2057
|
-
const
|
|
2058
|
-
return l.value.filter((
|
|
2057
|
+
const r = c.split(e.separator).map((f) => [f, !0]), d = new Map(r);
|
|
2058
|
+
return l.value.filter((f) => d.has(f[e.valueField]));
|
|
2059
2059
|
}
|
|
2060
2060
|
function u(c) {
|
|
2061
|
-
const
|
|
2062
|
-
t.value = n.value ?
|
|
2061
|
+
const r = i(c).map((d) => d[e.textField]).join(e.separator);
|
|
2062
|
+
t.value = n.value ? r || c : r;
|
|
2063
2063
|
}
|
|
2064
2064
|
function s(c) {
|
|
2065
|
-
const
|
|
2066
|
-
return l.value.filter((
|
|
2067
|
-
}
|
|
2068
|
-
function
|
|
2069
|
-
const { url: c, method:
|
|
2070
|
-
fetch(c, { method:
|
|
2071
|
-
if (
|
|
2072
|
-
return
|
|
2073
|
-
throw new Error(
|
|
2074
|
-
}).then((
|
|
2075
|
-
l.value =
|
|
2076
|
-
}).catch((
|
|
2077
|
-
console.error(
|
|
2065
|
+
const r = c.split(e.separator).map((f) => [f, !0]), d = new Map(r);
|
|
2066
|
+
return l.value.filter((f) => d.has(f[e.textField]));
|
|
2067
|
+
}
|
|
2068
|
+
function p() {
|
|
2069
|
+
const { url: c, method: r = "GET", headers: d = {}, body: f = null } = e.remote;
|
|
2070
|
+
fetch(c, { method: r, headers: d, body: f }).then((m) => {
|
|
2071
|
+
if (m.status === 200)
|
|
2072
|
+
return m.json();
|
|
2073
|
+
throw new Error(m.statusText);
|
|
2074
|
+
}).then((m) => {
|
|
2075
|
+
l.value = m;
|
|
2076
|
+
}).catch((m) => {
|
|
2077
|
+
console.error(m);
|
|
2078
2078
|
});
|
|
2079
2079
|
}
|
|
2080
|
-
return e.remote &&
|
|
2080
|
+
return e.remote && p(), W(() => e.data, () => {
|
|
2081
2081
|
l.value = e.data;
|
|
2082
2082
|
}), W([l], ([c]) => {
|
|
2083
2083
|
if (e.modelValue) {
|
|
2084
|
-
const
|
|
2085
|
-
|
|
2084
|
+
const r = c.find((d) => d[e.valueField] === e.modelValue);
|
|
2085
|
+
r && (t.value = r[e.textField]);
|
|
2086
2086
|
}
|
|
2087
2087
|
}), W(() => e.modelValue, (c) => {
|
|
2088
2088
|
o.value = c, u(c);
|
|
@@ -2093,69 +2093,71 @@ const ue = /* @__PURE__ */ z({
|
|
|
2093
2093
|
props: me,
|
|
2094
2094
|
emits: ["clear", "update:modelValue", "change"],
|
|
2095
2095
|
setup(e, t) {
|
|
2096
|
-
const o = a(), {
|
|
2097
|
-
dataSource:
|
|
2098
|
-
displayText:
|
|
2099
|
-
editable:
|
|
2100
|
-
modelValue:
|
|
2101
|
-
getItemsByDisplayText:
|
|
2102
|
-
} = $t(e),
|
|
2103
|
-
function
|
|
2104
|
-
!
|
|
2096
|
+
const o = a(), l = a(e.disabled), n = a(e.enableClear), i = a(e.enableSearch), u = a(e.readonly), {
|
|
2097
|
+
dataSource: s,
|
|
2098
|
+
displayText: p,
|
|
2099
|
+
editable: c,
|
|
2100
|
+
modelValue: r,
|
|
2101
|
+
getItemsByDisplayText: d
|
|
2102
|
+
} = $t(e), f = I(() => e.multiSelect);
|
|
2103
|
+
function b() {
|
|
2104
|
+
!f.value && o.value && o.value.hidePopup();
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2107
|
-
|
|
2106
|
+
function m(h) {
|
|
2107
|
+
p.value = h.map((S) => S[e.textField]).join(e.separator), r.value = h.map((S) => S[e.valueField]).join(e.separator), t.emit("update:modelValue", r.value), t.emit("change", h), b();
|
|
2108
2108
|
}
|
|
2109
|
-
function
|
|
2110
|
-
|
|
2109
|
+
function y(h) {
|
|
2110
|
+
r.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
2111
2111
|
}
|
|
2112
|
-
function
|
|
2113
|
-
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2112
|
+
function T(h) {
|
|
2113
|
+
r.value = h, t.emit("update:modelValue", r.value);
|
|
2114
|
+
const S = {};
|
|
2115
|
+
S[e.idField] = h, S[e.textField] = h, t.emit("change", [S]);
|
|
2116
2116
|
}
|
|
2117
|
-
function
|
|
2118
|
-
if (
|
|
2119
|
-
|
|
2117
|
+
function B(h) {
|
|
2118
|
+
if (c.value) {
|
|
2119
|
+
T(h);
|
|
2120
2120
|
return;
|
|
2121
2121
|
}
|
|
2122
|
-
const
|
|
2123
|
-
|
|
2122
|
+
const S = d(h);
|
|
2123
|
+
m(S);
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
return
|
|
2125
|
+
function x() {
|
|
2126
|
+
return p.value;
|
|
2127
2127
|
}
|
|
2128
2128
|
return t.expose({
|
|
2129
|
-
getDisplayText:
|
|
2130
|
-
}), () =>
|
|
2129
|
+
getDisplayText: x
|
|
2130
|
+
}), W([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h, S, O, F, E]) => {
|
|
2131
|
+
l.value = h, c.value = S, n.value = O, i.value = F, u.value = E;
|
|
2132
|
+
}), () => v(_t, {
|
|
2131
2133
|
ref: o,
|
|
2132
2134
|
id: e.id,
|
|
2133
|
-
disable:
|
|
2134
|
-
readonly:
|
|
2135
|
+
disable: l.value,
|
|
2136
|
+
readonly: u.value,
|
|
2135
2137
|
forcePlaceholder: e.forcePlaceholder,
|
|
2136
|
-
editable:
|
|
2138
|
+
editable: c.value,
|
|
2137
2139
|
buttonContent: e.dropDownIcon,
|
|
2138
2140
|
placeholder: e.placeholder,
|
|
2139
|
-
enableClear:
|
|
2141
|
+
enableClear: n.value,
|
|
2140
2142
|
maxLength: e.maxLength,
|
|
2141
2143
|
tabIndex: e.tabIndex,
|
|
2142
2144
|
enableTitle: e.enableTitle,
|
|
2143
2145
|
multiSelect: e.multiSelect,
|
|
2144
2146
|
inputType: e.multiSelect ? "tag" : "text",
|
|
2145
|
-
modelValue:
|
|
2146
|
-
"onUpdate:modelValue": (
|
|
2147
|
-
onClear:
|
|
2148
|
-
onChange:
|
|
2147
|
+
modelValue: p.value,
|
|
2148
|
+
"onUpdate:modelValue": (h) => p.value = h,
|
|
2149
|
+
onClear: y,
|
|
2150
|
+
onChange: B
|
|
2149
2151
|
}, {
|
|
2150
|
-
default: () => [
|
|
2152
|
+
default: () => [v(ct, {
|
|
2151
2153
|
idField: e.idField,
|
|
2152
2154
|
valueField: e.valueField,
|
|
2153
2155
|
textField: e.textField,
|
|
2154
|
-
dataSource:
|
|
2155
|
-
selectedValues:
|
|
2156
|
+
dataSource: s.value,
|
|
2157
|
+
selectedValues: r.value,
|
|
2156
2158
|
multiSelect: e.multiSelect,
|
|
2157
|
-
enableSearch:
|
|
2158
|
-
onSelectionChange:
|
|
2159
|
+
enableSearch: i.value,
|
|
2160
|
+
onSelectionChange: m
|
|
2159
2161
|
}, null)]
|
|
2160
2162
|
});
|
|
2161
2163
|
}
|
|
@@ -2172,91 +2174,91 @@ const ie = /* @__PURE__ */ z({
|
|
|
2172
2174
|
id: "desc",
|
|
2173
2175
|
name: "降序"
|
|
2174
2176
|
}], s = a(/* @__PURE__ */ new Map());
|
|
2175
|
-
function
|
|
2176
|
-
const
|
|
2177
|
-
s.value = new Map(
|
|
2177
|
+
function p() {
|
|
2178
|
+
const T = o.value.map((B) => [B.id, !0]);
|
|
2179
|
+
s.value = new Map(T);
|
|
2178
2180
|
}
|
|
2179
|
-
|
|
2180
|
-
const c =
|
|
2181
|
+
p();
|
|
2182
|
+
const c = I(() => e.dataSource.map((T) => (T.disabled = s.value.has(T.id), T))), r = I(() => ({
|
|
2181
2183
|
"f-order": !0
|
|
2182
2184
|
}));
|
|
2183
|
-
function
|
|
2184
|
-
o.value = o.value.filter((B) => B.id !==
|
|
2185
|
+
function d(T) {
|
|
2186
|
+
o.value = o.value.filter((B) => B.id !== T.id), p(), t.emit("change", o.value);
|
|
2185
2187
|
}
|
|
2186
|
-
function
|
|
2188
|
+
function f() {
|
|
2187
2189
|
o.value = [...o.value, {
|
|
2188
2190
|
id: Date.now().toString(),
|
|
2189
2191
|
name: "",
|
|
2190
2192
|
order: "asc"
|
|
2191
|
-
}],
|
|
2193
|
+
}], p(), t.emit("change", o.value);
|
|
2192
2194
|
}
|
|
2193
|
-
function
|
|
2194
|
-
|
|
2195
|
+
function b(T) {
|
|
2196
|
+
p(), t.emit("change", o.value);
|
|
2195
2197
|
}
|
|
2196
|
-
function
|
|
2197
|
-
if (
|
|
2198
|
+
function m(T) {
|
|
2199
|
+
if (T && T.length) {
|
|
2198
2200
|
const B = /* @__PURE__ */ new Map();
|
|
2199
|
-
|
|
2201
|
+
T.reduce((x, h) => (x.set(h.id, h), x), B), o.value = T.map((x) => B.get(x.id)), t.emit("change", o.value);
|
|
2200
2202
|
}
|
|
2201
2203
|
}
|
|
2202
|
-
function
|
|
2203
|
-
return
|
|
2204
|
+
function y() {
|
|
2205
|
+
return v(fe, {
|
|
2204
2206
|
style: "flex:1",
|
|
2205
2207
|
data: o.value,
|
|
2206
2208
|
draggable: !0,
|
|
2207
2209
|
view: "DraggableView",
|
|
2208
2210
|
"keep-order": !0,
|
|
2209
2211
|
itemClass: "f-order-item",
|
|
2210
|
-
onRemoveItem:
|
|
2211
|
-
onChange:
|
|
2212
|
+
onRemoveItem: d,
|
|
2213
|
+
onChange: m
|
|
2212
2214
|
}, {
|
|
2213
|
-
header: () =>
|
|
2215
|
+
header: () => v("div", {
|
|
2214
2216
|
class: "f-order-header"
|
|
2215
|
-
}, [
|
|
2217
|
+
}, [v("span", {
|
|
2216
2218
|
class: "f-order-header-order-field"
|
|
2217
|
-
}, [l.value]),
|
|
2219
|
+
}, [l.value]), v("span", {
|
|
2218
2220
|
class: "f-order-header-order-type"
|
|
2219
2221
|
}, [n.value])]),
|
|
2220
|
-
itemContent: (
|
|
2222
|
+
itemContent: (T) => v("div", {
|
|
2221
2223
|
class: "f-order-item-content"
|
|
2222
|
-
}, [
|
|
2224
|
+
}, [v(ue, {
|
|
2223
2225
|
class: "f-order-item-content-order-field",
|
|
2224
2226
|
data: c.value,
|
|
2225
2227
|
valueField: "id",
|
|
2226
2228
|
textField: "name",
|
|
2227
2229
|
idField: "id",
|
|
2228
|
-
modelValue:
|
|
2229
|
-
"onUpdate:modelValue": (B) =>
|
|
2230
|
-
onChange:
|
|
2231
|
-
onClear:
|
|
2232
|
-
}, null),
|
|
2230
|
+
modelValue: T.id,
|
|
2231
|
+
"onUpdate:modelValue": (B) => T.id = B,
|
|
2232
|
+
onChange: b,
|
|
2233
|
+
onClear: b
|
|
2234
|
+
}, null), v(ue, {
|
|
2233
2235
|
class: "f-order-item-content-order-type",
|
|
2234
2236
|
data: u,
|
|
2235
2237
|
valueField: "id",
|
|
2236
2238
|
textField: "name",
|
|
2237
2239
|
idField: "id",
|
|
2238
|
-
modelValue:
|
|
2239
|
-
"onUpdate:modelValue": (B) =>
|
|
2240
|
-
onChange:
|
|
2240
|
+
modelValue: T.order,
|
|
2241
|
+
"onUpdate:modelValue": (B) => T.order = B,
|
|
2242
|
+
onChange: b
|
|
2241
2243
|
}, null)]),
|
|
2242
|
-
footer: () =>
|
|
2244
|
+
footer: () => v("div", {
|
|
2243
2245
|
class: "f-order-footer"
|
|
2244
|
-
}, [
|
|
2246
|
+
}, [v(Ue, {
|
|
2245
2247
|
type: "link",
|
|
2246
2248
|
class: "f-order-add-button",
|
|
2247
|
-
onClick:
|
|
2249
|
+
onClick: f
|
|
2248
2250
|
}, {
|
|
2249
|
-
default: () =>
|
|
2251
|
+
default: () => v(te, null, [v("span", {
|
|
2250
2252
|
class: "f-order-add-icon"
|
|
2251
|
-
}, [
|
|
2253
|
+
}, [v("i", {
|
|
2252
2254
|
class: "f-icon f-icon-add"
|
|
2253
2255
|
}, null)]), i.value])
|
|
2254
2256
|
})])
|
|
2255
2257
|
});
|
|
2256
2258
|
}
|
|
2257
|
-
return () =>
|
|
2258
|
-
class:
|
|
2259
|
-
}, [
|
|
2259
|
+
return () => v("div", {
|
|
2260
|
+
class: r.value
|
|
2261
|
+
}, [y()]);
|
|
2260
2262
|
}
|
|
2261
2263
|
}), zt = {
|
|
2262
2264
|
install(e) {
|