@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
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/avatar/index.esm.js +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import { LocaleService as
|
|
4
|
-
import { resolveAppearance as
|
|
5
|
-
import { getCustomStyle as
|
|
6
|
-
import { useFilter as
|
|
7
|
-
import { FCheckbox as
|
|
8
|
-
import { cloneDeep as
|
|
9
|
-
import { useDesignerComponent as
|
|
10
|
-
const
|
|
11
|
-
["appearance",
|
|
1
|
+
import { ref as u, computed as L, createVNode as l, Fragment as E, watch as N, withModifiers as be, withDirectives as ke, vModelText as Ve, defineComponent as X, onMounted as ae, inject as Fe, createTextVNode as Z } from "vue";
|
|
2
|
+
import Te from "../tree-view/index.esm.js";
|
|
3
|
+
import { LocaleService as q } from "../locale/index.esm.js";
|
|
4
|
+
import { resolveAppearance as Re, createPropsResolver as De } from "../dynamic-resolver/index.esm.js";
|
|
5
|
+
import { getCustomStyle as ee, getCustomClass as K, withInstall as Me } from "../common/index.esm.js";
|
|
6
|
+
import { useFilter as Oe, useIdentify as xe, useHierarchy as je, useGroupData as Be, useDataView as Le, useSelection as Ae, usePagination as Pe, useRow as He, useEdit as _e, useVisualDataBound as Ge, useVisualDataCell as ze, useVisualDataRow as Ee, useVisualGroupRow as Ne, useVisualSummaryRow as Ue, useVisualData as $e, useSidebar as We, useColumn as qe, useVirtualScroll as Ke, getPagination as Xe } from "../data-view/index.esm.js";
|
|
7
|
+
import { FCheckbox as Y } from "../checkbox/index.esm.js";
|
|
8
|
+
import { cloneDeep as te } from "lodash-es";
|
|
9
|
+
import { useDesignerComponent as Ye } from "../designer-canvas/index.esm.js";
|
|
10
|
+
const Je = /* @__PURE__ */ new Map([
|
|
11
|
+
["appearance", Re]
|
|
12
12
|
]);
|
|
13
|
-
function
|
|
13
|
+
function Qe(e, t, d) {
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const Ze = "transfer", et = "A Farris Component", tt = "object", nt = {
|
|
17
17
|
basic: {
|
|
18
18
|
description: "Basic Infomation",
|
|
19
19
|
title: "基本信息",
|
|
@@ -35,12 +35,12 @@ const nt = "transfer", lt = "A Farris Component", at = "object", ot = {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
},
|
|
39
|
-
title:
|
|
40
|
-
description:
|
|
41
|
-
type:
|
|
42
|
-
categories:
|
|
43
|
-
},
|
|
38
|
+
}, lt = {
|
|
39
|
+
title: Ze,
|
|
40
|
+
description: et,
|
|
41
|
+
type: tt,
|
|
42
|
+
categories: nt
|
|
43
|
+
}, at = "https://json-schema.org/draft/2020-12/schema", st = "https://farris-design.gitee.io/transfer.schema.json", ot = "transfer", it = "A Farris Component", ct = "object", ut = {
|
|
44
44
|
id: {
|
|
45
45
|
description: "The unique identifier for transfer",
|
|
46
46
|
type: "string"
|
|
@@ -102,18 +102,18 @@ const nt = "transfer", lt = "A Farris Component", at = "object", ot = {
|
|
|
102
102
|
type: "boolean",
|
|
103
103
|
default: !0
|
|
104
104
|
}
|
|
105
|
-
},
|
|
105
|
+
}, rt = [
|
|
106
106
|
"id",
|
|
107
107
|
"type"
|
|
108
|
-
],
|
|
109
|
-
$schema:
|
|
110
|
-
$id:
|
|
111
|
-
title:
|
|
112
|
-
description:
|
|
113
|
-
type:
|
|
114
|
-
properties:
|
|
115
|
-
required:
|
|
116
|
-
},
|
|
108
|
+
], dt = {
|
|
109
|
+
$schema: at,
|
|
110
|
+
$id: st,
|
|
111
|
+
title: ot,
|
|
112
|
+
description: it,
|
|
113
|
+
type: ct,
|
|
114
|
+
properties: ut,
|
|
115
|
+
required: rt
|
|
116
|
+
}, J = {
|
|
117
117
|
dataSource: {
|
|
118
118
|
type: Array,
|
|
119
119
|
default: []
|
|
@@ -141,7 +141,7 @@ const nt = "transfer", lt = "A Farris Component", at = "object", ot = {
|
|
|
141
141
|
default: "draggable-item--text-truncate",
|
|
142
142
|
validator: (e) => typeof e == "string" || typeof e == "function"
|
|
143
143
|
}
|
|
144
|
-
},
|
|
144
|
+
}, se = De(J, dt, Je, Qe, lt), ft = {
|
|
145
145
|
/** 列集合 */
|
|
146
146
|
columns: {
|
|
147
147
|
type: Array,
|
|
@@ -209,218 +209,218 @@ const nt = "transfer", lt = "A Farris Component", at = "object", ot = {
|
|
|
209
209
|
/** 分页 */
|
|
210
210
|
pagination: { type: Object, default: { enable: !1, size: 20 } }
|
|
211
211
|
};
|
|
212
|
-
function
|
|
213
|
-
function
|
|
214
|
-
const
|
|
215
|
-
let
|
|
216
|
-
for (;
|
|
217
|
-
|
|
218
|
-
return
|
|
212
|
+
function vt(e, t) {
|
|
213
|
+
function d(i) {
|
|
214
|
+
const f = [];
|
|
215
|
+
let o = i.nextNode();
|
|
216
|
+
for (; o; )
|
|
217
|
+
f.push(o), o = i.nextNode();
|
|
218
|
+
return f;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
const
|
|
222
|
-
return
|
|
223
|
-
const
|
|
224
|
-
let
|
|
225
|
-
for (;
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
220
|
+
function T(i, f) {
|
|
221
|
+
const o = document.createTreeWalker(i, NodeFilter.SHOW_TEXT);
|
|
222
|
+
return d(o).map((b) => ({ textNode: b, text: (b.textContent || "").toLocaleLowerCase() })).map(({ textNode: b, text: m }) => {
|
|
223
|
+
const v = [];
|
|
224
|
+
let M = 0;
|
|
225
|
+
for (; M < m.length; ) {
|
|
226
|
+
const V = m.indexOf(f, M);
|
|
227
|
+
if (V === -1)
|
|
228
228
|
break;
|
|
229
|
-
|
|
229
|
+
v.push(V), M = V + f.length;
|
|
230
230
|
}
|
|
231
|
-
return
|
|
232
|
-
const
|
|
233
|
-
return
|
|
231
|
+
return v.map((V) => {
|
|
232
|
+
const k = new Range();
|
|
233
|
+
return k.setStart(b, V), k.setEnd(b, V + f.length), k;
|
|
234
234
|
});
|
|
235
235
|
}).flat();
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
237
|
+
function R(i) {
|
|
238
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !i || !t))
|
|
239
239
|
return;
|
|
240
|
-
const
|
|
241
|
-
CSS.highlights.set("search-result",
|
|
240
|
+
const f = T(t.value, i.toLocaleLowerCase()), o = new Highlight(...f);
|
|
241
|
+
CSS.highlights.set("search-result", o);
|
|
242
242
|
}
|
|
243
|
-
return { search:
|
|
243
|
+
return { search: R };
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
const
|
|
247
|
-
var n,
|
|
248
|
-
return ((n = e.selection) == null ? void 0 : n.multiSelect) && ((
|
|
245
|
+
function ne(e, t, d, T, R, i, f, o, y, C) {
|
|
246
|
+
const S = u(e.size), b = u(e.textField), m = u(e.titleField), v = u(e.disableField), M = L(() => {
|
|
247
|
+
var n, p;
|
|
248
|
+
return ((n = e.selection) == null ? void 0 : n.multiSelect) && ((p = e.selection) == null ? void 0 : p.showCheckbox);
|
|
249
249
|
}), {
|
|
250
|
-
onMouseenterItem:
|
|
251
|
-
onMouseoverItem:
|
|
250
|
+
onMouseenterItem: V,
|
|
251
|
+
onMouseoverItem: k,
|
|
252
252
|
onMouseoutItem: D
|
|
253
|
-
} =
|
|
254
|
-
getKey:
|
|
255
|
-
listViewItemClass:
|
|
253
|
+
} = i, {
|
|
254
|
+
getKey: O,
|
|
255
|
+
listViewItemClass: B,
|
|
256
256
|
listViewItemStyle: A,
|
|
257
|
-
onCheckItem:
|
|
258
|
-
onClickItem:
|
|
259
|
-
} =
|
|
257
|
+
onCheckItem: H,
|
|
258
|
+
onClickItem: h
|
|
259
|
+
} = f, w = L(() => {
|
|
260
260
|
const n = {
|
|
261
261
|
"text-overflow": "ellipsis",
|
|
262
262
|
overflow: "hidden",
|
|
263
263
|
"white-space": "nowrap"
|
|
264
264
|
};
|
|
265
265
|
return e.itemClass ? n : {
|
|
266
|
-
margin:
|
|
266
|
+
margin: S.value === "small" ? "0.25rem 0" : "8px 0",
|
|
267
267
|
...n
|
|
268
268
|
};
|
|
269
269
|
});
|
|
270
|
-
function
|
|
271
|
-
return n.checked =
|
|
272
|
-
class:
|
|
273
|
-
id:
|
|
274
|
-
key:
|
|
275
|
-
style: A(n,
|
|
276
|
-
onClick: (
|
|
277
|
-
onMouseenter: (
|
|
278
|
-
onMouseover: (
|
|
279
|
-
onMouseout: (
|
|
280
|
-
}, [
|
|
270
|
+
function g(n, p, I) {
|
|
271
|
+
return n.checked = o.findIndexInSelectedItems(n) > -1, l("li", {
|
|
272
|
+
class: B(n, p),
|
|
273
|
+
id: O(n, p),
|
|
274
|
+
key: O(n, p),
|
|
275
|
+
style: A(n, p),
|
|
276
|
+
onClick: (F) => h(n, p, F),
|
|
277
|
+
onMouseenter: (F) => V(F, n, p),
|
|
278
|
+
onMouseover: (F) => k(F, n, p),
|
|
279
|
+
onMouseout: (F) => D(F, n, p)
|
|
280
|
+
}, [M.value && l("div", {
|
|
281
281
|
class: "f-list-select",
|
|
282
|
-
onClick: (
|
|
283
|
-
}, [l(
|
|
284
|
-
id: "list-" +
|
|
282
|
+
onClick: (F) => F.stopPropagation()
|
|
283
|
+
}, [l(Y, {
|
|
284
|
+
id: "list-" + O(n, p),
|
|
285
285
|
customClass: "listview-checkbox float-left",
|
|
286
|
-
disabled: n[
|
|
286
|
+
disabled: n[v.value],
|
|
287
287
|
checked: n.checked,
|
|
288
|
-
"onUpdate:checked": (
|
|
289
|
-
onChange: (
|
|
290
|
-
|
|
288
|
+
"onUpdate:checked": (F) => n.checked = F,
|
|
289
|
+
onChange: (F) => {
|
|
290
|
+
H(n, p, !F.checked);
|
|
291
291
|
}
|
|
292
292
|
}, null)]), l("div", {
|
|
293
293
|
class: "f-list-content"
|
|
294
294
|
}, [l("div", {
|
|
295
295
|
class: e.itemContentClass,
|
|
296
296
|
style: w.value,
|
|
297
|
-
title: n.raw[
|
|
298
|
-
}, [n.raw[
|
|
297
|
+
title: n.raw[m.value] || n.raw[b.value]
|
|
298
|
+
}, [n.raw[b.value]])])]);
|
|
299
299
|
}
|
|
300
300
|
return {
|
|
301
|
-
renderItem:
|
|
301
|
+
renderItem: g
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
const
|
|
306
|
-
onMouseenterItem:
|
|
307
|
-
onMouseoverItem:
|
|
308
|
-
onMouseoutItem:
|
|
309
|
-
} =
|
|
310
|
-
getKey:
|
|
304
|
+
function mt(e, t, d, T, R, i, f, o, y, C) {
|
|
305
|
+
const S = u(e.multiSelect), b = u(e.disableField), m = u(e.textField), {
|
|
306
|
+
onMouseenterItem: v,
|
|
307
|
+
onMouseoverItem: M,
|
|
308
|
+
onMouseoutItem: V
|
|
309
|
+
} = i, {
|
|
310
|
+
getKey: k,
|
|
311
311
|
listViewItemClass: D,
|
|
312
|
-
listViewItemStyle:
|
|
313
|
-
onCheckItem:
|
|
312
|
+
listViewItemStyle: O,
|
|
313
|
+
onCheckItem: B,
|
|
314
314
|
onClickItem: A,
|
|
315
|
-
updateSelectedItems:
|
|
316
|
-
} =
|
|
317
|
-
function g
|
|
318
|
-
return e.contentTemplate ? l(
|
|
319
|
-
item:
|
|
315
|
+
updateSelectedItems: H
|
|
316
|
+
} = f;
|
|
317
|
+
function h(g, n, p) {
|
|
318
|
+
return e.contentTemplate ? l(E, null, [e.contentTemplate({
|
|
319
|
+
item: g.raw,
|
|
320
320
|
index: n,
|
|
321
|
-
selectedItem:
|
|
322
|
-
})]) : t.slots.content ? l(
|
|
323
|
-
item:
|
|
321
|
+
selectedItem: p
|
|
322
|
+
})]) : t.slots.content ? l(E, null, [t.slots.content && t.slots.content({
|
|
323
|
+
item: g.raw,
|
|
324
324
|
index: n,
|
|
325
|
-
selectedItem:
|
|
325
|
+
selectedItem: p
|
|
326
326
|
})]) : l("div", {
|
|
327
327
|
style: "margin: 10px 0;"
|
|
328
|
-
}, [
|
|
328
|
+
}, [g.raw[m.value || "name"]]);
|
|
329
329
|
}
|
|
330
|
-
function w(
|
|
330
|
+
function w(g, n, p) {
|
|
331
331
|
return l("li", {
|
|
332
|
-
class: D(
|
|
333
|
-
id:
|
|
334
|
-
key:
|
|
335
|
-
style:
|
|
336
|
-
onClick: (
|
|
337
|
-
onMouseenter: (
|
|
338
|
-
onMouseover: (
|
|
339
|
-
onMouseout: (
|
|
340
|
-
}, [
|
|
332
|
+
class: D(g, n),
|
|
333
|
+
id: k(g, n),
|
|
334
|
+
key: k(g, n),
|
|
335
|
+
style: O(g, n),
|
|
336
|
+
onClick: (I) => A(g, n, I),
|
|
337
|
+
onMouseenter: (I) => v(I, g, n),
|
|
338
|
+
onMouseover: (I) => M(I, g, n),
|
|
339
|
+
onMouseout: (I) => V(I, g, n)
|
|
340
|
+
}, [S.value && l("div", {
|
|
341
341
|
class: "f-list-select",
|
|
342
|
-
onClick: (
|
|
343
|
-
}, [l(
|
|
344
|
-
id: "list-" +
|
|
342
|
+
onClick: (I) => I.stopPropagation()
|
|
343
|
+
}, [l(Y, {
|
|
344
|
+
id: "list-" + k(g, n),
|
|
345
345
|
customClass: "listview-checkbox",
|
|
346
|
-
disabled:
|
|
347
|
-
checked:
|
|
348
|
-
"onUpdate:checked": (
|
|
349
|
-
onChange: (
|
|
350
|
-
|
|
346
|
+
disabled: g[b.value],
|
|
347
|
+
checked: g.checked,
|
|
348
|
+
"onUpdate:checked": (I) => g.checked = I,
|
|
349
|
+
onChange: (I) => {
|
|
350
|
+
B(g, n, !I.checked), H();
|
|
351
351
|
}
|
|
352
352
|
}, null)]), l("div", {
|
|
353
353
|
class: "f-list-content"
|
|
354
|
-
}, [g
|
|
354
|
+
}, [h(g, n, p)])]);
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
357
|
renderItem: w
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
const
|
|
362
|
-
onMouseenterItem:
|
|
363
|
-
onMouseoverItem:
|
|
364
|
-
onMouseoutItem:
|
|
365
|
-
} =
|
|
366
|
-
getKey:
|
|
360
|
+
function gt(e, t, d, T, R, i, f, o, y, C) {
|
|
361
|
+
const S = u(e.multiSelect), b = u(e.disableField), m = u(e.textField), {
|
|
362
|
+
onMouseenterItem: v,
|
|
363
|
+
onMouseoverItem: M,
|
|
364
|
+
onMouseoutItem: V
|
|
365
|
+
} = i, {
|
|
366
|
+
getKey: k,
|
|
367
367
|
listViewItemClass: D,
|
|
368
|
-
onCheckItem:
|
|
369
|
-
onClickItem:
|
|
370
|
-
} =
|
|
368
|
+
onCheckItem: O,
|
|
369
|
+
onClickItem: B
|
|
370
|
+
} = f, {
|
|
371
371
|
dragstart: A,
|
|
372
|
-
dragenter:
|
|
373
|
-
dragover:
|
|
372
|
+
dragenter: H,
|
|
373
|
+
dragover: h,
|
|
374
374
|
dragend: w
|
|
375
|
-
} =
|
|
376
|
-
removeItem:
|
|
377
|
-
} =
|
|
378
|
-
margin:
|
|
375
|
+
} = T, {
|
|
376
|
+
removeItem: g
|
|
377
|
+
} = y, n = L(() => ({
|
|
378
|
+
margin: S.value ? "10px 0" : "10px 0px 10px 14px"
|
|
379
379
|
}));
|
|
380
|
-
function
|
|
381
|
-
const
|
|
382
|
-
|
|
380
|
+
function p(a, s = "") {
|
|
381
|
+
const P = a.target;
|
|
382
|
+
P.title = P.scrollWidth > P.clientWidth ? s : "";
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function I(a) {
|
|
385
385
|
return l("div", {
|
|
386
386
|
style: n.value,
|
|
387
|
-
onMouseenter: (
|
|
388
|
-
}, [
|
|
387
|
+
onMouseenter: (s) => p(s, a.raw[m.value || "name"])
|
|
388
|
+
}, [a.raw[m.value || "name"]]);
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
390
|
+
function F() {
|
|
391
|
+
return t.slots.itemContent ? t.slots.itemContent : I;
|
|
392
392
|
}
|
|
393
|
-
const c =
|
|
394
|
-
function
|
|
393
|
+
const c = F();
|
|
394
|
+
function r(a, s, P) {
|
|
395
395
|
return l("li", {
|
|
396
|
-
class: D(
|
|
397
|
-
id:
|
|
398
|
-
key:
|
|
399
|
-
onClick: (x) =>
|
|
400
|
-
onMouseenter: (x) =>
|
|
401
|
-
onMouseover: (x) =>
|
|
402
|
-
onMouseout: (x) =>
|
|
396
|
+
class: D(a, s),
|
|
397
|
+
id: k(a, s),
|
|
398
|
+
key: k(a, s),
|
|
399
|
+
onClick: (x) => B(a, s, x),
|
|
400
|
+
onMouseenter: (x) => v(x, a, s),
|
|
401
|
+
onMouseover: (x) => M(x, a, s),
|
|
402
|
+
onMouseout: (x) => V(x, a, s),
|
|
403
403
|
draggable: "true",
|
|
404
|
-
onDragstart: (x) => A(x,
|
|
405
|
-
onDragenter: (x) =>
|
|
406
|
-
onDragend: (x) => w(x,
|
|
407
|
-
onDragover: (x) =>
|
|
408
|
-
}, [
|
|
404
|
+
onDragstart: (x) => A(x, a, s),
|
|
405
|
+
onDragenter: (x) => H(x, s),
|
|
406
|
+
onDragend: (x) => w(x, a),
|
|
407
|
+
onDragover: (x) => h(x)
|
|
408
|
+
}, [S.value && l("div", {
|
|
409
409
|
class: "f-list-select",
|
|
410
410
|
onClick: (x) => x.stopPropagation()
|
|
411
|
-
}, [l(
|
|
412
|
-
id: "list-" +
|
|
411
|
+
}, [l(Y, {
|
|
412
|
+
id: "list-" + k(a, s),
|
|
413
413
|
customClass: "listview-checkbox",
|
|
414
|
-
disabled:
|
|
415
|
-
checked:
|
|
416
|
-
"onUpdate:checked": (x) =>
|
|
417
|
-
onChange: (x) =>
|
|
414
|
+
disabled: a[b.value] || !a.checked,
|
|
415
|
+
checked: a.checked,
|
|
416
|
+
"onUpdate:checked": (x) => a.checked = x,
|
|
417
|
+
onChange: (x) => O(a, s, !x.checked)
|
|
418
418
|
}, null)]), l("div", {
|
|
419
419
|
class: "f-list-content"
|
|
420
|
-
}, [c(
|
|
420
|
+
}, [c(a)]), l("div", {
|
|
421
421
|
class: "f-list-remove",
|
|
422
422
|
onClick: (x) => {
|
|
423
|
-
x.stopPropagation(),
|
|
423
|
+
x.stopPropagation(), g(s);
|
|
424
424
|
}
|
|
425
425
|
}, [l("div", {
|
|
426
426
|
class: "f-list-remove-icon"
|
|
@@ -433,72 +433,72 @@ function yt(e, t, r, V, O, f, d, a, p, M) {
|
|
|
433
433
|
}, null)])])]);
|
|
434
434
|
}
|
|
435
435
|
return {
|
|
436
|
-
renderItem:
|
|
436
|
+
renderItem: r
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
function
|
|
440
|
-
var
|
|
441
|
-
const
|
|
442
|
-
collpaseGroupIconClass:
|
|
443
|
-
} =
|
|
444
|
-
toggleGroupRow:
|
|
445
|
-
} =
|
|
446
|
-
function
|
|
447
|
-
|
|
439
|
+
function pt(e, t, d, T, R, i, f, o, y, C) {
|
|
440
|
+
var k;
|
|
441
|
+
const S = u(((k = e.group) == null ? void 0 : k.groupFields) || []), {
|
|
442
|
+
collpaseGroupIconClass: b
|
|
443
|
+
} = R, {
|
|
444
|
+
toggleGroupRow: m
|
|
445
|
+
} = C;
|
|
446
|
+
function v(D, O) {
|
|
447
|
+
O.collapse = !O.collapse, d.value = m(O.collapse ? "collapse" : "expand", O, d.value);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
return t.slots.group ? l(
|
|
449
|
+
function M(D, O, B) {
|
|
450
|
+
return t.slots.group ? l(E, null, [t.slots.content && t.slots.group({
|
|
451
451
|
item: D.raw,
|
|
452
|
-
index:
|
|
453
|
-
selectedItem:
|
|
452
|
+
index: O,
|
|
453
|
+
selectedItem: B
|
|
454
454
|
})]) : l("div", {
|
|
455
455
|
class: "f-navlookup-recentHeader",
|
|
456
|
-
onClick: (A) =>
|
|
456
|
+
onClick: (A) => v(A, D)
|
|
457
457
|
}, [l("div", {
|
|
458
458
|
class: "fv-grid-group-row-icon"
|
|
459
459
|
}, [l("span", {
|
|
460
|
-
class:
|
|
460
|
+
class: b(D)
|
|
461
461
|
}, null)]), l("div", {
|
|
462
462
|
class: "f-navlookup-recommandLabel"
|
|
463
|
-
}, [D.raw[
|
|
463
|
+
}, [D.raw[S.value[D.layer]]])]);
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
return D.layer > -1 &&
|
|
465
|
+
function V(D, O, B) {
|
|
466
|
+
return D.layer > -1 && M(D, O, B);
|
|
467
467
|
}
|
|
468
468
|
return {
|
|
469
|
-
renderItem:
|
|
469
|
+
renderItem: V
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
const { dataView:
|
|
474
|
-
function
|
|
475
|
-
if (
|
|
476
|
-
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(
|
|
472
|
+
function ht(e, t, d, T) {
|
|
473
|
+
const { dataView: R } = d, { updateSelectedItems: i } = T;
|
|
474
|
+
function f(o) {
|
|
475
|
+
if (o > -1 && o < R.value.length) {
|
|
476
|
+
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(R.value[o]))
|
|
477
477
|
return;
|
|
478
|
-
const
|
|
479
|
-
|
|
478
|
+
const y = R.value.splice(o, 1);
|
|
479
|
+
i(), t.emit("removeItem", y[0]);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
return { removeItem:
|
|
482
|
+
return { removeItem: f };
|
|
483
483
|
}
|
|
484
|
-
function
|
|
485
|
-
const
|
|
484
|
+
function yt(e, t, d, T, R, i, f, o, y, C) {
|
|
485
|
+
const S = u(e.view), b = u(e.view === "CardView"), m = u({}), v = ht(e, t, T, y), M = L(() => ({
|
|
486
486
|
"f-list-view-group": !0,
|
|
487
487
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
488
|
-
"d-flex":
|
|
489
|
-
"flex-wrap":
|
|
490
|
-
})),
|
|
491
|
-
L(() =>
|
|
488
|
+
"d-flex": b.value,
|
|
489
|
+
"flex-wrap": b.value
|
|
490
|
+
})), V = L(() => !!d.value && d.value.length > 0), k = L(() => d.value.length === 0);
|
|
491
|
+
L(() => k.value && !t.slots.empty);
|
|
492
492
|
function D() {
|
|
493
|
-
return
|
|
493
|
+
return S.value === "SingleView" ? ne : S.value === "DraggableView" ? gt : (S.value === "ContentView" || S.value === "CardView") && (e.contentTemplate || t.slots.content) ? mt : ne;
|
|
494
494
|
}
|
|
495
|
-
const
|
|
496
|
-
renderItem:
|
|
497
|
-
} =
|
|
495
|
+
const O = D(), {
|
|
496
|
+
renderItem: B
|
|
497
|
+
} = O(e, t, d, C, R, i, y, f, v, o), {
|
|
498
498
|
renderItem: A
|
|
499
|
-
} =
|
|
500
|
-
function
|
|
501
|
-
return
|
|
499
|
+
} = pt(e, t, d, C, R, i, y, f, v, o), H = [B, A];
|
|
500
|
+
function h() {
|
|
501
|
+
return d.value.filter((n) => n.visible !== !1).map((n, p) => H[n.type](n, p, m));
|
|
502
502
|
}
|
|
503
503
|
function w() {
|
|
504
504
|
return l("div", {
|
|
@@ -506,126 +506,126 @@ function wt(e, t, r, V, O, f, d, a, p, M) {
|
|
|
506
506
|
style: "margin: 0 auto;"
|
|
507
507
|
}, [l("p", {
|
|
508
508
|
class: "f-empty-title"
|
|
509
|
-
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() :
|
|
509
|
+
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() : q.getLocaleValue("listView.emptyMessage")])]);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function g() {
|
|
512
512
|
return l("ul", {
|
|
513
|
-
class:
|
|
513
|
+
class: M.value,
|
|
514
514
|
style: "list-style: none;"
|
|
515
|
-
}, [
|
|
515
|
+
}, [V.value && h(), k.value && w()]);
|
|
516
516
|
}
|
|
517
517
|
return {
|
|
518
|
-
renderListArea:
|
|
518
|
+
renderListArea: g
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
|
-
function
|
|
522
|
-
function
|
|
521
|
+
function Ct(e, t, d) {
|
|
522
|
+
function T() {
|
|
523
523
|
return t.slots.header && l("div", {
|
|
524
524
|
class: "f-list-view-header"
|
|
525
525
|
}, [t.slots.header()]);
|
|
526
526
|
}
|
|
527
527
|
return {
|
|
528
|
-
renderHeader:
|
|
528
|
+
renderHeader: T
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
const
|
|
533
|
-
function
|
|
534
|
-
|
|
531
|
+
function le(e, t, d) {
|
|
532
|
+
const T = u(e.headerClass), R = u(e.placeholder), i = u(""), f = L(() => !i.value), o = L(() => !!i.value);
|
|
533
|
+
function y(m) {
|
|
534
|
+
i.value = "";
|
|
535
535
|
}
|
|
536
|
-
|
|
537
|
-
e.enableHighlightSearch &&
|
|
536
|
+
N(i, (m) => {
|
|
537
|
+
e.enableHighlightSearch && d.search(m), t.emit("afterSearch", m);
|
|
538
538
|
});
|
|
539
|
-
const
|
|
540
|
-
const
|
|
539
|
+
const C = L(() => {
|
|
540
|
+
const m = {
|
|
541
541
|
"form-group": !0,
|
|
542
542
|
"farris-form-group": !0
|
|
543
543
|
};
|
|
544
|
-
return
|
|
544
|
+
return T.value && T.value.split(" ").reduce((M, V) => (M[V] = !0, M), m), m;
|
|
545
545
|
});
|
|
546
|
-
function
|
|
546
|
+
function S(m) {
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function b() {
|
|
549
549
|
return l("div", {
|
|
550
550
|
class: "f-list-view-header",
|
|
551
|
-
onClick:
|
|
551
|
+
onClick: be(() => S, ["prevent", "stop"])
|
|
552
552
|
}, [l("div", {
|
|
553
|
-
class:
|
|
553
|
+
class: C.value
|
|
554
554
|
}, [l("div", {
|
|
555
555
|
class: "farris-input-wrap"
|
|
556
556
|
}, [l("div", {
|
|
557
557
|
class: "f-cmp-inputgroup"
|
|
558
558
|
}, [l("div", {
|
|
559
559
|
class: "input-group f-state-editable"
|
|
560
|
-
}, [
|
|
560
|
+
}, [ke(l("input", {
|
|
561
561
|
class: "form-control f-utils-fill text-left",
|
|
562
|
-
"onUpdate:modelValue": (
|
|
562
|
+
"onUpdate:modelValue": (m) => i.value = m,
|
|
563
563
|
name: "input-group-value",
|
|
564
564
|
type: "text",
|
|
565
|
-
placeholder:
|
|
565
|
+
placeholder: R.value,
|
|
566
566
|
autocomplete: "off"
|
|
567
|
-
}, null), [[
|
|
567
|
+
}, null), [[Ve, i.value]]), l("div", {
|
|
568
568
|
class: "input-group-append"
|
|
569
|
-
}, [
|
|
569
|
+
}, [o.value && l("span", {
|
|
570
570
|
class: "input-group-text input-group-clear",
|
|
571
|
-
onClick: (
|
|
571
|
+
onClick: (m) => y()
|
|
572
572
|
}, [l("i", {
|
|
573
573
|
class: "f-icon f-icon-close-circle"
|
|
574
|
-
}, null)]),
|
|
574
|
+
}, null)]), f.value && l("span", {
|
|
575
575
|
class: "input-group-text"
|
|
576
576
|
}, [l("span", {
|
|
577
577
|
class: "f-icon f-icon-search"
|
|
578
578
|
}, null)])])])])])])]);
|
|
579
579
|
}
|
|
580
580
|
return {
|
|
581
|
-
renderHeader:
|
|
581
|
+
renderHeader: b
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
const e =
|
|
586
|
-
function
|
|
587
|
-
|
|
584
|
+
function St() {
|
|
585
|
+
const e = u(""), t = u(-1), d = u(""), T = u(-1), R = u(!1);
|
|
586
|
+
function i(b, m, v) {
|
|
587
|
+
T.value = v;
|
|
588
588
|
}
|
|
589
|
-
function
|
|
590
|
-
|
|
589
|
+
function f(b, m, v) {
|
|
590
|
+
R.value || (T.value = v);
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
|
|
592
|
+
function o(b, m, v) {
|
|
593
|
+
T.value = -1;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
|
|
595
|
+
function y() {
|
|
596
|
+
R.value = !0;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
|
|
598
|
+
function C() {
|
|
599
|
+
R.value = !1;
|
|
600
600
|
}
|
|
601
|
-
function
|
|
601
|
+
function S() {
|
|
602
602
|
t.value = -1, e.value = "";
|
|
603
603
|
}
|
|
604
604
|
return {
|
|
605
605
|
activeIndex: t,
|
|
606
|
-
focusedItemId:
|
|
607
|
-
hoverIndex:
|
|
608
|
-
clearActiveItem:
|
|
609
|
-
onMouseenterItem:
|
|
610
|
-
onMouseoverItem:
|
|
611
|
-
onMouseoutItem:
|
|
612
|
-
resumeHover:
|
|
613
|
-
suspendHover:
|
|
606
|
+
focusedItemId: d,
|
|
607
|
+
hoverIndex: T,
|
|
608
|
+
clearActiveItem: S,
|
|
609
|
+
onMouseenterItem: i,
|
|
610
|
+
onMouseoverItem: f,
|
|
611
|
+
onMouseoutItem: o,
|
|
612
|
+
resumeHover: C,
|
|
613
|
+
suspendHover: y
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
function
|
|
617
|
-
const
|
|
618
|
-
let
|
|
619
|
-
function
|
|
620
|
-
const
|
|
621
|
-
|
|
616
|
+
function wt(e, t, d, T) {
|
|
617
|
+
const R = u(e.idField), { dataView: i } = d, f = u(-1), o = u(!1), { activeIndex: y, focusedItemId: C, hoverIndex: S, resumeHover: b, suspendHover: m } = T;
|
|
618
|
+
let v, M = 0, V = 0;
|
|
619
|
+
function k(h, w) {
|
|
620
|
+
const g = h - M, n = w - V;
|
|
621
|
+
v.style.left = parseInt(v.style.left) + g + "px", v.style.top = parseInt(v.style.top) + n + "px", M = h, V = w;
|
|
622
622
|
}
|
|
623
|
-
function D(
|
|
624
|
-
const { left: w, top:
|
|
623
|
+
function D(h) {
|
|
624
|
+
const { left: w, top: g } = h.getBoundingClientRect(), n = h.cloneNode(!0);
|
|
625
625
|
return n.className = n.className + " f-listview-drag-moving", n.style.cssText = `
|
|
626
626
|
position:absolute;
|
|
627
627
|
left:${w}px;
|
|
628
|
-
top:${document.documentElement.scrollTop ?
|
|
628
|
+
top:${document.documentElement.scrollTop ? g + document.documentElement.scrollTop : g}px;
|
|
629
629
|
z-index: 999999;
|
|
630
630
|
pointer-events: none;
|
|
631
631
|
border-radius: 10px;
|
|
@@ -634,261 +634,260 @@ function kt(e, t, r, V) {
|
|
|
634
634
|
align-items: center;
|
|
635
635
|
float: none;
|
|
636
636
|
text-align: initial;
|
|
637
|
-
width:${getComputedStyle(
|
|
638
|
-
height:${getComputedStyle(
|
|
637
|
+
width:${getComputedStyle(h).width};
|
|
638
|
+
height:${getComputedStyle(h).height};
|
|
639
639
|
`, n.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", n.children[0].children[0].style.cssText = `
|
|
640
640
|
margin: 10px 0px 10px 14px;
|
|
641
641
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
642
642
|
`, n.children[1].style.cssText = "width: 30px;padding: 0 14px 0 0", n.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(n), n;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
if (
|
|
646
|
-
if (
|
|
644
|
+
function O(h, w, g) {
|
|
645
|
+
if (h.stopPropagation(), m(), w) {
|
|
646
|
+
if (v = D(h.target), h.dataTransfer) {
|
|
647
647
|
const n = new Image();
|
|
648
|
-
n.src = "",
|
|
648
|
+
n.src = "", h.dataTransfer.setDragImage(n, 0, 0);
|
|
649
649
|
}
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
M = h.pageX, V = h.pageY, setTimeout(() => {
|
|
651
|
+
f.value = g, o.value = !0, w.moving = !0;
|
|
652
652
|
});
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
function
|
|
656
|
-
if (
|
|
657
|
-
const
|
|
658
|
-
n.splice(
|
|
655
|
+
function B(h, w) {
|
|
656
|
+
if (h.preventDefault(), f.value !== w) {
|
|
657
|
+
const g = i.value[f.value], n = i.value;
|
|
658
|
+
n.splice(f.value, 1), n.splice(w, 0, g), f.value = w, k(h.pageX, h.pageY);
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
|
-
function A(
|
|
662
|
-
|
|
661
|
+
function A(h) {
|
|
662
|
+
h.preventDefault(), h.dataTransfer && (h.dataTransfer.dropEffect = "move"), k(h.pageX, h.pageY);
|
|
663
663
|
}
|
|
664
|
-
function
|
|
665
|
-
w && (w.moving = !1,
|
|
666
|
-
|
|
667
|
-
}),
|
|
664
|
+
function H(h, w) {
|
|
665
|
+
w && (w.moving = !1, v && (document.body.removeChild(v), v = null)), i.value.forEach((g, n) => {
|
|
666
|
+
g.__fv_index__ = n;
|
|
667
|
+
}), o.value = !1, b(), S.value = w.raw.__fv_index__, y.value = w.raw.__fv_index__, C.value = w.raw[R.value], t.emit("change", i.value), t.emit("activeChange", [w.raw]);
|
|
668
668
|
}
|
|
669
669
|
return {
|
|
670
|
-
dragstart:
|
|
671
|
-
dragenter:
|
|
670
|
+
dragstart: O,
|
|
671
|
+
dragenter: B,
|
|
672
672
|
dragover: A,
|
|
673
|
-
dragend:
|
|
674
|
-
isDragging:
|
|
673
|
+
dragend: H,
|
|
674
|
+
isDragging: o
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
const
|
|
681
|
-
let
|
|
682
|
-
return
|
|
677
|
+
function It(e, t, d, T, R, i) {
|
|
678
|
+
const f = u(e.idField), o = u(e.disableField), y = u(e.draggable);
|
|
679
|
+
u(e.itemClass);
|
|
680
|
+
const C = u(e.selection.multiSelect ?? !1), S = u(e.selection.multiSelectMode), { isDragging: b } = T, { activeIndex: m, focusedItemId: v, hoverIndex: M } = R, { clearSelection: V, getSelectedItems: k, toggleSelectItem: D, currentSelectedDataId: O } = i, B = u(k()), A = (r) => B.value.length === 0 ? !1 : B.value.some((a) => {
|
|
681
|
+
let s = "";
|
|
682
|
+
return a.data ? s = a.data[f.value] : s = a[f.value], s === r;
|
|
683
683
|
});
|
|
684
|
-
function
|
|
685
|
-
|
|
684
|
+
function H() {
|
|
685
|
+
B.value = k();
|
|
686
686
|
}
|
|
687
|
-
function
|
|
688
|
-
return
|
|
687
|
+
function h(r, a) {
|
|
688
|
+
return r.raw[f.value] != null ? r.raw[f.value] : "";
|
|
689
689
|
}
|
|
690
|
-
function w(
|
|
691
|
-
const
|
|
690
|
+
function w(r, a) {
|
|
691
|
+
const s = {
|
|
692
692
|
"f-list-view-group-item": !0,
|
|
693
|
-
"f-list-view-draggable-item":
|
|
694
|
-
"f-un-click": !
|
|
695
|
-
"f-un-select": !!
|
|
693
|
+
"f-list-view-draggable-item": y.value,
|
|
694
|
+
"f-un-click": !r.checked,
|
|
695
|
+
"f-un-select": !!r.raw[o.value],
|
|
696
696
|
"f-listview-active": (
|
|
697
697
|
// 多选
|
|
698
|
-
|
|
699
|
-
!
|
|
698
|
+
C.value && A(h(r)) || // 单选
|
|
699
|
+
!C.value && r.raw[f.value] === O.value
|
|
700
700
|
),
|
|
701
|
-
"f-listview-hover": !
|
|
702
|
-
moving: !!
|
|
701
|
+
"f-listview-hover": !b.value && a === M.value,
|
|
702
|
+
moving: !!r.moving
|
|
703
703
|
};
|
|
704
704
|
if (typeof e.itemClass == "string")
|
|
705
|
-
return
|
|
705
|
+
return K(s, e.itemClass);
|
|
706
706
|
if (typeof e.itemClass == "function") {
|
|
707
|
-
const
|
|
708
|
-
return
|
|
707
|
+
const P = e.itemClass(r);
|
|
708
|
+
return K(s, P);
|
|
709
709
|
}
|
|
710
|
-
return
|
|
710
|
+
return s;
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
const
|
|
712
|
+
function g(r, a) {
|
|
713
|
+
const s = {};
|
|
714
714
|
if (typeof e.itemStyle == "string")
|
|
715
|
-
return
|
|
715
|
+
return ee(s, e.itemStyle);
|
|
716
716
|
if (typeof e.itemStyle == "function") {
|
|
717
|
-
const
|
|
718
|
-
return
|
|
717
|
+
const P = e.itemStyle(r);
|
|
718
|
+
return ee(s, P);
|
|
719
719
|
}
|
|
720
|
-
return
|
|
720
|
+
return s;
|
|
721
721
|
}
|
|
722
|
-
const n = L(() => !
|
|
723
|
-
function
|
|
724
|
-
|
|
722
|
+
const n = L(() => !C.value);
|
|
723
|
+
function p(r, a, s) {
|
|
724
|
+
r.checked = s, !r.raw[o.value] && (n.value && (v.value = r.raw[f.value]), D(r));
|
|
725
725
|
}
|
|
726
|
-
const
|
|
727
|
-
function c(
|
|
728
|
-
if (
|
|
729
|
-
|
|
726
|
+
const I = L(() => C.value && S.value === "OnCheckClearByClick"), F = L(() => !C.value || C.value && (S.value === "OnCheckAndClick" || S.value === "OnClick"));
|
|
727
|
+
function c(r, a, s) {
|
|
728
|
+
if (r.raw[o.value]) {
|
|
729
|
+
s == null || s.preventDefault(), s == null || s.stopPropagation();
|
|
730
730
|
return;
|
|
731
731
|
}
|
|
732
|
-
|
|
732
|
+
O.value = r.raw[f.value], v.value = r.raw[f.value], m.value = a, I.value && V(), F.value && (D(r), H()), t.emit("clickItem", { data: B.value, index: a, dataItem: r.raw }), t.emit("activeChange", B.value);
|
|
733
733
|
}
|
|
734
734
|
return {
|
|
735
|
-
getKey:
|
|
736
|
-
selectedItems:
|
|
735
|
+
getKey: h,
|
|
736
|
+
selectedItems: B,
|
|
737
737
|
listViewItemClass: w,
|
|
738
|
-
listViewItemStyle:
|
|
739
|
-
updateSelectedItems:
|
|
740
|
-
onCheckItem:
|
|
738
|
+
listViewItemStyle: g,
|
|
739
|
+
updateSelectedItems: H,
|
|
740
|
+
onCheckItem: p,
|
|
741
741
|
onClickItem: c
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
|
-
const
|
|
744
|
+
const U = /* @__PURE__ */ X({
|
|
745
745
|
name: "FListView",
|
|
746
|
-
props:
|
|
746
|
+
props: ft,
|
|
747
747
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
748
748
|
setup(e, t) {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
const B = {
|
|
749
|
+
const d = u(), T = u(!0), R = u(!1), i = u([]), f = 0, o = u(e.columns), y = Oe(e, t), C = xe(e), S = je(e), b = Be(e, C), m = Le(e, /* @__PURE__ */ new Map(), y, S, C), v = Ae(e, m, C, i, t), M = vt(e, d), V = Pe(e, m), k = L(() => m.dataView.value.length), D = He(e, t, v, C), O = _e(e, t, C, D, i), B = Ge(e), A = ze(e, {}, B), H = Ee(e, m, O, S, C, B, A), h = Ne(e, C, A, H), w = Ue(e, C, A, H), g = $e(e, o, m, k, f, H, h, w), {
|
|
750
|
+
getVisualData: n
|
|
751
|
+
} = g;
|
|
752
|
+
i.value = n(0, k.value + f - 1);
|
|
753
|
+
const p = L(() => {
|
|
754
|
+
const j = {
|
|
756
755
|
"f-list-view": !0,
|
|
757
756
|
"f-list-view-multiple": e.multiSelect
|
|
758
757
|
};
|
|
759
|
-
return e.size !== "default" && (
|
|
760
|
-
}),
|
|
761
|
-
function
|
|
762
|
-
return e.header === "SearchBar" ?
|
|
758
|
+
return e.size !== "default" && (j[`${e.size}-item`] = !0), K(j, e.customClass);
|
|
759
|
+
}), I = L(() => !!t.slots.footer || T.value);
|
|
760
|
+
function F() {
|
|
761
|
+
return e.header === "SearchBar" ? le : e.header === "ContentHeader" ? Ct : le;
|
|
763
762
|
}
|
|
764
|
-
const
|
|
765
|
-
renderHeader:
|
|
766
|
-
} =
|
|
767
|
-
renderListArea:
|
|
768
|
-
} =
|
|
769
|
-
function
|
|
770
|
-
|
|
763
|
+
const c = F(), {
|
|
764
|
+
renderHeader: r
|
|
765
|
+
} = c(e, t, M), a = St(), s = wt(e, t, m, a), P = It(e, t, i, s, a, v), {
|
|
766
|
+
renderListArea: x
|
|
767
|
+
} = yt(e, t, i, m, b, a, v, g, P, s);
|
|
768
|
+
function oe(j) {
|
|
769
|
+
M.search(j);
|
|
771
770
|
}
|
|
772
|
-
function
|
|
773
|
-
|
|
771
|
+
function ie(j) {
|
|
772
|
+
j && (m.load(j), i.value = n(0, k.value + f - 1));
|
|
774
773
|
}
|
|
775
|
-
function
|
|
776
|
-
|
|
774
|
+
function ce() {
|
|
775
|
+
v.clearSelection(), a.clearActiveItem();
|
|
777
776
|
}
|
|
778
|
-
function
|
|
779
|
-
return
|
|
777
|
+
function ue() {
|
|
778
|
+
return P.selectedItems.value;
|
|
780
779
|
}
|
|
781
|
-
function
|
|
782
|
-
return
|
|
780
|
+
function re() {
|
|
781
|
+
return P.selectedItems.value.map((j) => j[C.idField.value]);
|
|
783
782
|
}
|
|
784
|
-
function
|
|
785
|
-
|
|
783
|
+
function Q(j) {
|
|
784
|
+
v.selectedValues.value = j, P.updateSelectedItems();
|
|
786
785
|
}
|
|
787
|
-
function
|
|
788
|
-
return
|
|
786
|
+
function de() {
|
|
787
|
+
return v.currentSelectedDataId.value;
|
|
789
788
|
}
|
|
790
|
-
function
|
|
791
|
-
|
|
789
|
+
function fe(j) {
|
|
790
|
+
D.activeRowById(j);
|
|
792
791
|
}
|
|
793
|
-
function
|
|
794
|
-
const _ =
|
|
795
|
-
|
|
792
|
+
function ve(j) {
|
|
793
|
+
const _ = C.idField.value, G = i.value.find((W) => W.raw[_] === j), z = i.value.findIndex((W) => W.raw[_] === j);
|
|
794
|
+
G && z > -1 && P.onClickItem(G, z);
|
|
796
795
|
}
|
|
797
|
-
function
|
|
798
|
-
const _ =
|
|
799
|
-
|
|
796
|
+
function me(j) {
|
|
797
|
+
const _ = C.idField.value, G = i.value.find((z) => z.raw[_] === j);
|
|
798
|
+
G && D.changeRow(G);
|
|
800
799
|
}
|
|
801
|
-
function
|
|
802
|
-
|
|
800
|
+
function ge(j) {
|
|
801
|
+
V.updatePagination(j);
|
|
803
802
|
}
|
|
804
|
-
function
|
|
805
|
-
return
|
|
803
|
+
function pe(j) {
|
|
804
|
+
return i.value.filter((_) => j.includes(_.raw[e.idField]));
|
|
806
805
|
}
|
|
807
806
|
t.expose({
|
|
808
|
-
search:
|
|
809
|
-
updateDataSource:
|
|
810
|
-
clearSelection:
|
|
811
|
-
getSelections:
|
|
812
|
-
updateSelectionByIds:
|
|
813
|
-
getSelectionIds:
|
|
814
|
-
activeRowById:
|
|
815
|
-
getCurrentRowId:
|
|
816
|
-
clickRowItemById:
|
|
817
|
-
updatePagination:
|
|
818
|
-
getVisibleDataByIds:
|
|
819
|
-
selectRowById:
|
|
807
|
+
search: oe,
|
|
808
|
+
updateDataSource: ie,
|
|
809
|
+
clearSelection: ce,
|
|
810
|
+
getSelections: ue,
|
|
811
|
+
updateSelectionByIds: Q,
|
|
812
|
+
getSelectionIds: re,
|
|
813
|
+
activeRowById: fe,
|
|
814
|
+
getCurrentRowId: de,
|
|
815
|
+
clickRowItemById: ve,
|
|
816
|
+
updatePagination: ge,
|
|
817
|
+
getVisibleDataByIds: pe,
|
|
818
|
+
selectRowById: me
|
|
820
819
|
});
|
|
821
|
-
function
|
|
822
|
-
e.multiSelect && (
|
|
820
|
+
function he(j) {
|
|
821
|
+
e.multiSelect && (j.preventDefault(), j.stopPropagation());
|
|
823
822
|
}
|
|
824
|
-
|
|
825
|
-
|
|
823
|
+
N(() => e.selectionValues, (j, _) => {
|
|
824
|
+
j !== _ && Q(j);
|
|
826
825
|
});
|
|
827
|
-
const
|
|
828
|
-
sidebarWidth:
|
|
829
|
-
showSidebarCheckBox:
|
|
830
|
-
} =
|
|
831
|
-
applyColumnSorter:
|
|
832
|
-
columnContext:
|
|
833
|
-
updateColumnRenderContext:
|
|
834
|
-
} =
|
|
835
|
-
shouldRenderPagination:
|
|
836
|
-
} =
|
|
837
|
-
renderDataGridPagination:
|
|
838
|
-
} =
|
|
826
|
+
const ye = We(e, v), {
|
|
827
|
+
sidebarWidth: Ce,
|
|
828
|
+
showSidebarCheckBox: kt
|
|
829
|
+
} = ye, Se = qe(e, t), {
|
|
830
|
+
applyColumnSorter: Vt,
|
|
831
|
+
columnContext: we,
|
|
832
|
+
updateColumnRenderContext: Ft
|
|
833
|
+
} = Se, Ie = Ke(e, m, i, we, g, k, f, Ce, O), {
|
|
834
|
+
shouldRenderPagination: Tt
|
|
835
|
+
} = V, {
|
|
836
|
+
renderDataGridPagination: Rt
|
|
837
|
+
} = Xe(e, t, m, Ie, V, v);
|
|
839
838
|
return () => l("div", {
|
|
840
|
-
class:
|
|
841
|
-
onClick:
|
|
842
|
-
}, [
|
|
843
|
-
ref:
|
|
839
|
+
class: p.value,
|
|
840
|
+
onClick: he
|
|
841
|
+
}, [r(), l("div", {
|
|
842
|
+
ref: d,
|
|
844
843
|
class: "f-list-view-content",
|
|
845
844
|
onMouseover: () => {
|
|
846
|
-
|
|
845
|
+
R.value = !0;
|
|
847
846
|
},
|
|
848
847
|
onMouseleave: () => {
|
|
849
|
-
|
|
848
|
+
R.value = !1;
|
|
850
849
|
}
|
|
851
|
-
}, [
|
|
850
|
+
}, [x()]), I.value && l("div", {
|
|
852
851
|
class: "f-list-view-footer"
|
|
853
852
|
}, [e.footerTemplate ? e.footerTemplate() : t.slots.footer && t.slots.footer()])]);
|
|
854
853
|
}
|
|
855
|
-
}),
|
|
854
|
+
}), $ = /* @__PURE__ */ X({
|
|
856
855
|
name: "FTransfer",
|
|
857
|
-
props:
|
|
856
|
+
props: J,
|
|
858
857
|
emits: ["change", "activeChange", "selectItem", "unSelecteItem", "removeItem"],
|
|
859
858
|
setup(e, t) {
|
|
860
|
-
const
|
|
861
|
-
let
|
|
862
|
-
function
|
|
863
|
-
const c = /* @__PURE__ */ new Map(),
|
|
864
|
-
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
const
|
|
868
|
-
|
|
859
|
+
const d = u(e.identifyField), T = u(e.displayType), R = u(!1), i = u(e.dataSource), f = u(e.textField), o = u(e.selections || []), y = L(() => o.value.map((c) => c[d.value])), C = /* @__PURE__ */ new Map(), S = u(), b = u(), m = u();
|
|
860
|
+
let v;
|
|
861
|
+
function M() {
|
|
862
|
+
const c = /* @__PURE__ */ new Map(), r = e.selectionValues || [];
|
|
863
|
+
r.length && r.reduce((s, P) => (s.set(P, !0), s), c);
|
|
864
|
+
const a = e.selections || [];
|
|
865
|
+
a.length && (c.clear(), a.reduce((s, P) => (s.set(P[d.value], !0), s), c)), o.value.length || (o.value = i.value.filter((s) => c.has(s[d.value])).map((s) => Object.assign({}, s))), i.value.forEach((s) => {
|
|
866
|
+
const P = s[d.value], x = c.has(P);
|
|
867
|
+
s.checked = x, x && C.set(P, s);
|
|
869
868
|
});
|
|
870
869
|
}
|
|
871
|
-
|
|
872
|
-
|
|
870
|
+
M(), N(() => e.selections, (c) => {
|
|
871
|
+
o.value = c, M();
|
|
873
872
|
});
|
|
874
|
-
const
|
|
873
|
+
const V = L(() => T.value === "List"), k = L(() => T.value === "Tree");
|
|
875
874
|
function D(c) {
|
|
876
|
-
const
|
|
877
|
-
|
|
875
|
+
const r = te(o.value);
|
|
876
|
+
o.value = c.map((a) => Object.assign({}, a)), t.emit("change", o.value, r);
|
|
878
877
|
}
|
|
879
|
-
function
|
|
878
|
+
function O(c) {
|
|
880
879
|
t.emit("selectItem", c);
|
|
881
880
|
}
|
|
882
|
-
function
|
|
881
|
+
function B(c) {
|
|
883
882
|
t.emit("unSelectItem", c);
|
|
884
883
|
}
|
|
885
884
|
function A() {
|
|
886
|
-
return l(
|
|
885
|
+
return l(U, {
|
|
887
886
|
class: "f-utils-fill",
|
|
888
|
-
data:
|
|
887
|
+
data: i.value,
|
|
889
888
|
multiSelect: !0,
|
|
890
889
|
itemClass: "f-transfer-list-item",
|
|
891
|
-
textField:
|
|
890
|
+
textField: f.value,
|
|
892
891
|
selection: {
|
|
893
892
|
enableSelectRow: !0,
|
|
894
893
|
multiSelect: !0,
|
|
@@ -900,18 +899,18 @@ const $ = /* @__PURE__ */ Y({
|
|
|
900
899
|
draggable: !1,
|
|
901
900
|
header: "Search",
|
|
902
901
|
headerClass: "transfer-search-box",
|
|
903
|
-
selectionValues:
|
|
902
|
+
selectionValues: y.value,
|
|
904
903
|
onSelectionUpdate: D
|
|
905
904
|
}, null);
|
|
906
905
|
}
|
|
907
|
-
function
|
|
908
|
-
return l(
|
|
909
|
-
ref:
|
|
910
|
-
data:
|
|
906
|
+
function H() {
|
|
907
|
+
return l(Te, {
|
|
908
|
+
ref: m,
|
|
909
|
+
data: i.value,
|
|
911
910
|
columns: e.columns,
|
|
912
911
|
virtualized: e.virtualized,
|
|
913
912
|
rowOption: e.rowOption,
|
|
914
|
-
textField:
|
|
913
|
+
textField: f.value,
|
|
915
914
|
selection: {
|
|
916
915
|
enableSelectRow: !0,
|
|
917
916
|
multiSelect: !0,
|
|
@@ -920,65 +919,65 @@ const $ = /* @__PURE__ */ Y({
|
|
|
920
919
|
showSelectAll: !1,
|
|
921
920
|
showSelection: !0
|
|
922
921
|
},
|
|
923
|
-
selectionValues:
|
|
922
|
+
selectionValues: y.value,
|
|
924
923
|
onSelectionUpdate: D,
|
|
925
|
-
onSelectItem:
|
|
926
|
-
onUnSelectItem:
|
|
924
|
+
onSelectItem: O,
|
|
925
|
+
onUnSelectItem: B
|
|
927
926
|
}, null);
|
|
928
927
|
}
|
|
929
|
-
function
|
|
928
|
+
function h() {
|
|
930
929
|
return l("div", {
|
|
931
930
|
class: "f-utils-fill option-pane d-flex flex-column"
|
|
932
931
|
}, [l("div", {
|
|
933
932
|
class: "f-utils-flex-column option-pane-content f-utils-fill"
|
|
934
933
|
}, [l("div", {
|
|
935
934
|
class: "container columns-box d-flex f-utils-fill"
|
|
936
|
-
}, [
|
|
935
|
+
}, [V.value && A(), k.value && H()])])]);
|
|
937
936
|
}
|
|
938
937
|
function w(c) {
|
|
939
|
-
const
|
|
940
|
-
if (
|
|
941
|
-
|
|
942
|
-
const
|
|
943
|
-
|
|
938
|
+
const r = c[d.value];
|
|
939
|
+
if (r !== null || r !== void 0) {
|
|
940
|
+
o.value = o.value.filter((s) => s[d.value] !== r);
|
|
941
|
+
const a = C.get(r);
|
|
942
|
+
a && (a.checked = !1, C.delete(r)), t.emit("change", o.value), t.emit("removeItem", c);
|
|
944
943
|
}
|
|
945
944
|
}
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
|
|
945
|
+
N(o, (c) => {
|
|
946
|
+
S.value.updateDataSource(te(c));
|
|
947
|
+
const r = v == null ? void 0 : v[d.value], a = c.find((s) => r === s[d.value]);
|
|
948
|
+
a ? S.value.activeRowById(a[d.value]) : (v = null, S.value.activeRowById(""));
|
|
950
949
|
});
|
|
951
|
-
function
|
|
952
|
-
const
|
|
953
|
-
|
|
950
|
+
function g(c) {
|
|
951
|
+
const r = /* @__PURE__ */ new Map();
|
|
952
|
+
o.value.reduce((a, s) => (a.set(s[d.value], s), a), r), o.value = c.map((a) => r.get(a[d.value])), t.emit("change", o.value);
|
|
954
953
|
}
|
|
955
954
|
function n(c) {
|
|
956
|
-
|
|
955
|
+
v = c[0], t.emit("activeChange", c);
|
|
957
956
|
}
|
|
958
|
-
function
|
|
957
|
+
function p() {
|
|
959
958
|
var c;
|
|
960
|
-
return l(
|
|
961
|
-
ref:
|
|
959
|
+
return l(U, {
|
|
960
|
+
ref: S,
|
|
962
961
|
columns: e.columns,
|
|
963
962
|
style: "flex:1",
|
|
964
|
-
data:
|
|
963
|
+
data: o.value,
|
|
965
964
|
draggable: !0,
|
|
966
965
|
view: "DraggableView",
|
|
967
966
|
"keep-order": !0,
|
|
968
|
-
textField:
|
|
967
|
+
textField: f.value,
|
|
969
968
|
itemClass: e.selectedItemClass,
|
|
970
|
-
onChange:
|
|
969
|
+
onChange: g,
|
|
971
970
|
onRemoveItem: w,
|
|
972
971
|
onActiveChange: n,
|
|
973
972
|
checkBeforeRemoveItem: e.checkBeforeRemoveItem
|
|
974
973
|
}, {
|
|
975
|
-
itemContent: (c = t.slots) != null && c.text ? (
|
|
976
|
-
var
|
|
977
|
-
return ((
|
|
974
|
+
itemContent: (c = t.slots) != null && c.text ? (r) => {
|
|
975
|
+
var a;
|
|
976
|
+
return ((a = t.slots) == null ? void 0 : a.text) && t.slots.text(r);
|
|
978
977
|
} : null
|
|
979
978
|
});
|
|
980
979
|
}
|
|
981
|
-
function
|
|
980
|
+
function I() {
|
|
982
981
|
return l("div", {
|
|
983
982
|
class: "f-utils-fill selection-pane d-flex flex-column"
|
|
984
983
|
}, [l("div", {
|
|
@@ -987,65 +986,65 @@ const $ = /* @__PURE__ */ Y({
|
|
|
987
986
|
class: "selection-pane-title"
|
|
988
987
|
}, [l("span", {
|
|
989
988
|
class: "selection-title"
|
|
990
|
-
}, [
|
|
989
|
+
}, [q.getLocaleValue("transfer.selectedStart")]), l("span", {
|
|
991
990
|
class: "selection-count"
|
|
992
|
-
}, [
|
|
991
|
+
}, [o.value && o.value.length]), l("span", {
|
|
993
992
|
class: "selection-item-title"
|
|
994
|
-
}, [
|
|
993
|
+
}, [q.getLocaleValue("transfer.selectedEnd")])]), l("div", {
|
|
995
994
|
class: "container columns-box f-utils-fill d-flex"
|
|
996
|
-
}, [
|
|
995
|
+
}, [p()])])]);
|
|
997
996
|
}
|
|
998
|
-
const
|
|
997
|
+
const F = L(() => ({
|
|
999
998
|
"f-transfer": !0,
|
|
1000
999
|
row: !0,
|
|
1001
|
-
"f-utils-fill":
|
|
1000
|
+
"f-utils-fill": R.value
|
|
1002
1001
|
}));
|
|
1003
|
-
return
|
|
1004
|
-
|
|
1002
|
+
return ae(() => {
|
|
1003
|
+
b.value && b.value.parentElement && getComputedStyle(b.value.parentElement).display === "flex" && (R.value = !0);
|
|
1005
1004
|
}), () => l("div", {
|
|
1006
|
-
ref:
|
|
1007
|
-
class:
|
|
1005
|
+
ref: b,
|
|
1006
|
+
class: F.value,
|
|
1008
1007
|
style: "height:480px"
|
|
1009
1008
|
}, [t.slots.children ? t.slots.children({
|
|
1010
|
-
selections:
|
|
1011
|
-
}) :
|
|
1009
|
+
selections: o.value
|
|
1010
|
+
}) : h(), I()]);
|
|
1012
1011
|
}
|
|
1013
|
-
}),
|
|
1012
|
+
}), bt = /* @__PURE__ */ X({
|
|
1014
1013
|
name: "FTransferDesign",
|
|
1015
|
-
props:
|
|
1014
|
+
props: J,
|
|
1016
1015
|
emits: ["change"],
|
|
1017
1016
|
setup(e, t) {
|
|
1018
|
-
const
|
|
1019
|
-
function
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1024
|
-
const
|
|
1025
|
-
c.checked =
|
|
1017
|
+
const d = u(e.identifyField), T = u("已选:"), R = u("项数据"), i = u(e.displayType), f = u(!1), o = u(e.dataSource), y = u(e.selections || []), C = L(() => y.value.map((p) => p[d.value])), S = /* @__PURE__ */ new Map();
|
|
1018
|
+
function b() {
|
|
1019
|
+
const p = /* @__PURE__ */ new Map(), I = e.selectionValues || [];
|
|
1020
|
+
I.length && I.reduce((c, r) => (c.set(r, !0), c), p);
|
|
1021
|
+
const F = e.selections || [];
|
|
1022
|
+
F.length && (p.clear(), F.reduce((c, r) => (c.set(r[d.value], !0), c), p)), y.value.length || (y.value = o.value.filter((c) => p.has(c[d.value])).map((c) => Object.assign({}, c))), o.value.forEach((c) => {
|
|
1023
|
+
const r = c[d.value], a = p.has(r);
|
|
1024
|
+
c.checked = a, a && S.set(r, c);
|
|
1026
1025
|
});
|
|
1027
1026
|
}
|
|
1028
|
-
|
|
1029
|
-
const
|
|
1030
|
-
function
|
|
1031
|
-
|
|
1027
|
+
b();
|
|
1028
|
+
const m = L(() => i.value === "List"), v = L(() => i.value === "Tree");
|
|
1029
|
+
function M(p) {
|
|
1030
|
+
y.value = p.map((I) => Object.assign({}, I)), t.emit("change", y.value);
|
|
1032
1031
|
}
|
|
1033
|
-
function
|
|
1034
|
-
return l(
|
|
1032
|
+
function V() {
|
|
1033
|
+
return l(U, {
|
|
1035
1034
|
class: "f-utils-fill",
|
|
1036
|
-
data:
|
|
1035
|
+
data: o.value,
|
|
1037
1036
|
"multi-select": !0,
|
|
1038
1037
|
draggable: !1,
|
|
1039
1038
|
header: "Search",
|
|
1040
1039
|
headerClass: "transfer-search-box",
|
|
1041
|
-
"selection-values":
|
|
1042
|
-
onSelectionChange:
|
|
1040
|
+
"selection-values": C.value,
|
|
1041
|
+
onSelectionChange: M
|
|
1043
1042
|
}, {
|
|
1044
|
-
default: () => [
|
|
1043
|
+
default: () => [Z(" ")]
|
|
1045
1044
|
});
|
|
1046
1045
|
}
|
|
1047
|
-
function
|
|
1048
|
-
return l(
|
|
1046
|
+
function k() {
|
|
1047
|
+
return l(E, null, null);
|
|
1049
1048
|
}
|
|
1050
1049
|
function D() {
|
|
1051
1050
|
return l("div", {
|
|
@@ -1054,34 +1053,34 @@ const $ = /* @__PURE__ */ Y({
|
|
|
1054
1053
|
class: "f-utils-flex-column option-pane-content f-utils-fill"
|
|
1055
1054
|
}, [l("div", {
|
|
1056
1055
|
class: "container columns-box d-flex f-utils-fill"
|
|
1057
|
-
}, [
|
|
1056
|
+
}, [m.value && V(), v.value && k()])])]);
|
|
1058
1057
|
}
|
|
1059
|
-
function
|
|
1060
|
-
const
|
|
1061
|
-
if (
|
|
1062
|
-
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1058
|
+
function O(p) {
|
|
1059
|
+
const I = p[d.value];
|
|
1060
|
+
if (I !== null || I !== void 0) {
|
|
1061
|
+
y.value = y.value.filter((c) => c[d.value] !== I);
|
|
1062
|
+
const F = S.get(I);
|
|
1063
|
+
F && (F.checked = !1, S.delete(I)), t.emit("change", y.value);
|
|
1065
1064
|
}
|
|
1066
1065
|
}
|
|
1067
|
-
function
|
|
1068
|
-
const
|
|
1069
|
-
|
|
1066
|
+
function B(p) {
|
|
1067
|
+
const I = /* @__PURE__ */ new Map();
|
|
1068
|
+
y.value.reduce((F, c) => (F.set(c[d.value], c), F), I), y.value = p.map((F) => I.get(F[d.value])), t.emit("change", y.value);
|
|
1070
1069
|
}
|
|
1071
1070
|
function A() {
|
|
1072
|
-
return l(
|
|
1071
|
+
return l(U, {
|
|
1073
1072
|
style: "flex:1",
|
|
1074
|
-
data:
|
|
1073
|
+
data: y.value,
|
|
1075
1074
|
draggable: !0,
|
|
1076
1075
|
view: "DraggableView",
|
|
1077
1076
|
"keep-order": !0,
|
|
1078
|
-
onChange:
|
|
1079
|
-
onRemoveItem:
|
|
1077
|
+
onChange: B,
|
|
1078
|
+
onRemoveItem: O
|
|
1080
1079
|
}, {
|
|
1081
|
-
default: () => [
|
|
1080
|
+
default: () => [Z(" ")]
|
|
1082
1081
|
});
|
|
1083
1082
|
}
|
|
1084
|
-
function
|
|
1083
|
+
function H() {
|
|
1085
1084
|
return l("div", {
|
|
1086
1085
|
class: "f-utils-fill selection-pane d-flex flex-column"
|
|
1087
1086
|
}, [l("div", {
|
|
@@ -1090,38 +1089,38 @@ const $ = /* @__PURE__ */ Y({
|
|
|
1090
1089
|
class: "selection-pane-title"
|
|
1091
1090
|
}, [l("span", {
|
|
1092
1091
|
class: "selection-title"
|
|
1093
|
-
}, [
|
|
1092
|
+
}, [T.value]), l("span", {
|
|
1094
1093
|
class: "selection-count"
|
|
1095
|
-
}, [
|
|
1094
|
+
}, [y.value && y.value.length]), l("span", {
|
|
1096
1095
|
class: "selection-item-title"
|
|
1097
|
-
}, [
|
|
1096
|
+
}, [R.value])]), l("div", {
|
|
1098
1097
|
class: "container columns-box f-utils-fill d-flex"
|
|
1099
1098
|
}, [A()])])]);
|
|
1100
1099
|
}
|
|
1101
|
-
const
|
|
1100
|
+
const h = L(() => ({
|
|
1102
1101
|
transfer: !0,
|
|
1103
1102
|
row: !0,
|
|
1104
|
-
"f-utils-fill":
|
|
1105
|
-
})), w =
|
|
1106
|
-
return
|
|
1103
|
+
"f-utils-fill": f.value
|
|
1104
|
+
})), w = u(), g = Fe("design-item-context"), n = Ye(w, g);
|
|
1105
|
+
return ae(() => {
|
|
1107
1106
|
w.value.componentInstance = n;
|
|
1108
1107
|
}), t.expose(n.value), () => l("div", {
|
|
1109
1108
|
ref: w,
|
|
1110
|
-
class:
|
|
1109
|
+
class: h.value,
|
|
1111
1110
|
style: "height:480px"
|
|
1112
|
-
}, [D(),
|
|
1111
|
+
}, [D(), H()]);
|
|
1113
1112
|
}
|
|
1114
1113
|
});
|
|
1115
|
-
|
|
1116
|
-
e.transfer =
|
|
1114
|
+
$.register = (e, t, d) => {
|
|
1115
|
+
e.transfer = $, t.transfer = se;
|
|
1117
1116
|
};
|
|
1118
|
-
|
|
1119
|
-
e.transfer =
|
|
1117
|
+
$.registerDesigner = (e, t, d) => {
|
|
1118
|
+
e.transfer = bt, t.transfer = se;
|
|
1120
1119
|
};
|
|
1121
|
-
const
|
|
1120
|
+
const Ht = Me($);
|
|
1122
1121
|
export {
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1122
|
+
$ as FTransfer,
|
|
1123
|
+
Ht as default,
|
|
1124
|
+
se as propsResolver,
|
|
1125
|
+
J as transferProps
|
|
1127
1126
|
};
|