@farris/ui-vue 1.7.0-beta.3 → 1.7.0-beta.4
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 +10 -1
- package/components/avatar/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +178 -176
- package/components/calendar/index.umd.cjs +2 -2
- package/components/collection-property-editor/index.esm.js +48 -46
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +319 -300
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +2287 -1161
- package/components/comment/index.umd.cjs +7 -7
- package/components/component/index.esm.js +3 -1
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +926 -901
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-view/index.esm.js +898 -899
- package/components/data-view/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +3 -1
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +239 -221
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +11 -9
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/expression-editor/index.esm.js +1299 -1279
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +731 -678
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +1792 -1772
- package/components/filter-condition-editor/index.umd.cjs +4 -4
- package/components/image/index.esm.js +246 -240
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +9 -7
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +1 -1
- package/components/list-view/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +2009 -886
- package/components/locale/index.umd.cjs +6 -6
- package/components/number-range/index.esm.js +190 -181
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +734 -714
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +60 -49
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +2461 -2500
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-group/index.esm.js +30 -30
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +238 -238
- package/components/schema-selector/index.umd.cjs +4 -4
- package/components/section/index.esm.js +217 -302
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +1793 -1773
- package/components/sort-condition-editor/index.umd.cjs +4 -4
- package/components/transfer/index.esm.js +155 -155
- package/components/transfer/index.umd.cjs +3 -3
- package/designer/data-grid/index.esm.js +895 -867
- package/designer/data-grid/index.umd.cjs +5 -5
- package/designer/data-view/index.esm.js +145 -144
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/drawer/index.esm.js +73 -71
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +87 -65
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +14 -3
- package/designer/farris-designer.all.umd.cjs +3 -3
- package/designer/input-group/index.esm.js +34 -14
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1 -1
- package/designer/list-view/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +15 -2
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +129 -119
- package/designer/section/index.umd.cjs +1 -1
- package/designer/time-picker/index.esm.js +140 -131
- package/designer/time-picker/index.umd.cjs +1 -1
- package/farris.all.esm.js +13578 -12394
- package/farris.all.umd.cjs +26 -26
- package/index.css +1 -1
- package/locales/data-grid/ui/en.json +2 -1
- package/locales/data-grid/ui/zh-CHS.json +2 -1
- package/locales/data-grid/ui/zh-CHT.json +2 -1
- package/locales/designer/en.json +12 -10
- package/locales/designer/zh-CHS.json +19 -17
- package/locales/designer/zh-CHT.json +19 -17
- package/locales/ui/en.json +4 -2
- package/locales/ui/zh-CHS.json +11 -9
- package/locales/ui/zh-CHT.json +11 -9
- package/package.json +1 -1
- package/package.zip +0 -0
- package/types/combo-list/src/composition/types.d.ts +1 -0
- package/types/condition/src/composition/condition-value/number-spinner-value.d.ts +1 -1
- package/types/condition/src/composition/use-field-config.d.ts +1 -1
- package/types/condition/src/condition.props.d.ts +1 -1
- package/types/data-view/designer/property-config/use-command-option.d.ts +12 -0
- package/types/image/src/property-config/image.property-config.d.ts +5 -5
- package/types/locale/src/lib/locale.service.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +7 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +0 -20
- package/types/section/src/designer/section.design.props.d.ts +17 -0
- package/types/section/src/section.props.d.ts +0 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as v, computed as P, createVNode as s, Fragment as U, watch as E, withModifiers as Be, withDirectives as Me, vModelText as Pe, defineComponent as N, onMounted as Q, inject as Y } from "vue";
|
|
2
2
|
import { resolveAppearance as ue, createPropsResolver as de } from "../dynamic-resolver/index.esm.js";
|
|
3
3
|
import { getCustomStyle as ie, getCustomClass as J, FormSchemaEntityFieldType$Type as Le, withInstall as He } from "../common/index.esm.js";
|
|
4
|
-
import { useFilter as Ae, useIdentify as Ee, useHierarchy as je, useGroupData as $e, useDataView as Ge, useSelection as Ne, usePagination as _e, useRow as ze, useEdit as Ue, useVisualDataBound as
|
|
4
|
+
import { useFilter as Ae, useIdentify as Ee, useHierarchy as je, useGroupData as $e, useDataView as Ge, useSelection as Ne, usePagination as _e, useRow as ze, useEdit as Ue, useVisualDataBound as De, useVisualDataCell as We, useVisualDataRow as qe, useVisualGroupRow as Ke, useVisualSummaryRow as Xe, useVisualData as Ye, useSidebar as Je, useColumn as Qe, useVirtualScroll as Ze, getPagination as et } from "../data-view/index.esm.js";
|
|
5
5
|
import { LocaleService as Z } from "../locale/index.esm.js";
|
|
6
6
|
import { FCheckbox as ee } from "../checkbox/index.esm.js";
|
|
7
7
|
import tt from "../button-edit/index.esm.js";
|
|
@@ -116,7 +116,7 @@ const ot = /* @__PURE__ */ new Map([
|
|
|
116
116
|
properties: ft,
|
|
117
117
|
required: mt
|
|
118
118
|
};
|
|
119
|
-
function gt(e, t,
|
|
119
|
+
function gt(e, t, l) {
|
|
120
120
|
return t;
|
|
121
121
|
}
|
|
122
122
|
const ht = "order", pt = "A Farris Component", yt = "object", bt = {
|
|
@@ -280,418 +280,418 @@ const ht = "order", pt = "A Farris Component", yt = "object", bt = {
|
|
|
280
280
|
pagination: { type: Object, default: { enable: !1, size: 20 } }
|
|
281
281
|
};
|
|
282
282
|
function wt(e, t) {
|
|
283
|
-
function
|
|
284
|
-
const
|
|
283
|
+
function l(a) {
|
|
284
|
+
const o = [];
|
|
285
285
|
let f = a.nextNode();
|
|
286
286
|
for (; f; )
|
|
287
|
-
|
|
288
|
-
return
|
|
287
|
+
o.push(f), f = a.nextNode();
|
|
288
|
+
return o;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function n(a, o) {
|
|
291
291
|
const f = document.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
292
|
-
return
|
|
293
|
-
const
|
|
294
|
-
let
|
|
295
|
-
for (;
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
292
|
+
return l(f).map((b) => ({ textNode: b, text: (b.textContent || "").toLocaleLowerCase() })).map(({ textNode: b, text: m }) => {
|
|
293
|
+
const g = [];
|
|
294
|
+
let O = 0;
|
|
295
|
+
for (; O < m.length; ) {
|
|
296
|
+
const d = m.indexOf(o, O);
|
|
297
|
+
if (d === -1)
|
|
298
298
|
break;
|
|
299
|
-
|
|
299
|
+
g.push(d), O = d + o.length;
|
|
300
300
|
}
|
|
301
|
-
return
|
|
302
|
-
const
|
|
303
|
-
return
|
|
301
|
+
return g.map((d) => {
|
|
302
|
+
const i = new Range();
|
|
303
|
+
return i.setStart(b, d), i.setEnd(b, d + o.length), i;
|
|
304
304
|
});
|
|
305
305
|
}).flat();
|
|
306
306
|
}
|
|
307
307
|
function c(a) {
|
|
308
308
|
if (!CSS.highlights || (CSS.highlights.clear(), !a || !t))
|
|
309
309
|
return;
|
|
310
|
-
const
|
|
310
|
+
const o = n(t.value, a.toLocaleLowerCase()), f = new Highlight(...o);
|
|
311
311
|
CSS.highlights.set("search-result", f);
|
|
312
312
|
}
|
|
313
313
|
return { search: c };
|
|
314
314
|
}
|
|
315
|
-
function oe(e, t,
|
|
316
|
-
const
|
|
317
|
-
var p,
|
|
318
|
-
return ((p = e.selection) == null ? void 0 : p.multiSelect) && ((
|
|
315
|
+
function oe(e, t, l, n, c, a, o, f, w, y) {
|
|
316
|
+
const k = v(e.size), b = v(e.textField), m = v(e.titleField), g = v(e.disableField), O = P(() => {
|
|
317
|
+
var p, R;
|
|
318
|
+
return ((p = e.selection) == null ? void 0 : p.multiSelect) && ((R = e.selection) == null ? void 0 : R.showCheckbox);
|
|
319
319
|
}), {
|
|
320
|
-
onMouseenterItem:
|
|
321
|
-
onMouseoverItem:
|
|
322
|
-
onMouseoutItem:
|
|
320
|
+
onMouseenterItem: d,
|
|
321
|
+
onMouseoverItem: i,
|
|
322
|
+
onMouseoutItem: S
|
|
323
323
|
} = a, {
|
|
324
|
-
getKey:
|
|
324
|
+
getKey: r,
|
|
325
325
|
listViewItemClass: u,
|
|
326
326
|
listViewItemStyle: V,
|
|
327
|
-
onCheckItem:
|
|
328
|
-
onClickItem:
|
|
329
|
-
} =
|
|
327
|
+
onCheckItem: T,
|
|
328
|
+
onClickItem: I
|
|
329
|
+
} = o, F = P(() => {
|
|
330
330
|
const p = {
|
|
331
331
|
"text-overflow": "ellipsis",
|
|
332
332
|
overflow: "hidden",
|
|
333
333
|
"white-space": "nowrap"
|
|
334
334
|
};
|
|
335
335
|
return e.itemClass ? p : {
|
|
336
|
-
margin:
|
|
336
|
+
margin: k.value === "small" ? "0.25rem 0" : "8px 0",
|
|
337
337
|
...p
|
|
338
338
|
};
|
|
339
339
|
});
|
|
340
|
-
function x(p,
|
|
341
|
-
return p.checked = f.findIndexInSelectedItems(p) > -1,
|
|
342
|
-
class: u(p,
|
|
343
|
-
id:
|
|
344
|
-
key:
|
|
345
|
-
style: V(p,
|
|
346
|
-
onClick: (A) =>
|
|
347
|
-
onMouseenter: (A) =>
|
|
348
|
-
onMouseover: (A) =>
|
|
349
|
-
onMouseout: (A) =>
|
|
350
|
-
}, [
|
|
340
|
+
function x(p, R, j) {
|
|
341
|
+
return p.checked = f.findIndexInSelectedItems(p) > -1, s("li", {
|
|
342
|
+
class: u(p, R),
|
|
343
|
+
id: r(p, R),
|
|
344
|
+
key: r(p, R),
|
|
345
|
+
style: V(p, R),
|
|
346
|
+
onClick: (A) => I(p, R, A),
|
|
347
|
+
onMouseenter: (A) => d(A, p, R),
|
|
348
|
+
onMouseover: (A) => i(A, p, R),
|
|
349
|
+
onMouseout: (A) => S(A, p, R)
|
|
350
|
+
}, [O.value && s("div", {
|
|
351
351
|
class: "f-list-select",
|
|
352
352
|
onClick: (A) => A.stopPropagation()
|
|
353
|
-
}, [
|
|
354
|
-
id: "list-" +
|
|
353
|
+
}, [s(ee, {
|
|
354
|
+
id: "list-" + r(p, R),
|
|
355
355
|
customClass: "listview-checkbox float-left",
|
|
356
|
-
disabled: p[
|
|
356
|
+
disabled: p[g.value],
|
|
357
357
|
checked: p.checked,
|
|
358
358
|
"onUpdate:checked": (A) => p.checked = A,
|
|
359
359
|
onChange: (A) => {
|
|
360
|
-
|
|
360
|
+
T(p, R, !A.checked);
|
|
361
361
|
}
|
|
362
|
-
}, null)]),
|
|
362
|
+
}, null)]), s("div", {
|
|
363
363
|
class: "f-list-content"
|
|
364
|
-
}, [
|
|
364
|
+
}, [s("div", {
|
|
365
365
|
class: e.itemContentClass,
|
|
366
|
-
style:
|
|
367
|
-
title: p.raw[
|
|
368
|
-
}, [p.raw[
|
|
366
|
+
style: F.value,
|
|
367
|
+
title: p.raw[m.value] || p.raw[b.value]
|
|
368
|
+
}, [p.raw[b.value]])])]);
|
|
369
369
|
}
|
|
370
370
|
return {
|
|
371
371
|
renderItem: x
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function Ft(e, t,
|
|
375
|
-
const
|
|
376
|
-
onMouseenterItem:
|
|
377
|
-
onMouseoverItem:
|
|
378
|
-
onMouseoutItem:
|
|
374
|
+
function Ft(e, t, l, n, c, a, o, f, w, y) {
|
|
375
|
+
const k = v(e.multiSelect), b = v(e.disableField), m = v(e.textField), {
|
|
376
|
+
onMouseenterItem: g,
|
|
377
|
+
onMouseoverItem: O,
|
|
378
|
+
onMouseoutItem: d
|
|
379
379
|
} = a, {
|
|
380
|
-
getKey:
|
|
381
|
-
listViewItemClass:
|
|
382
|
-
listViewItemStyle:
|
|
380
|
+
getKey: i,
|
|
381
|
+
listViewItemClass: S,
|
|
382
|
+
listViewItemStyle: r,
|
|
383
383
|
onCheckItem: u,
|
|
384
384
|
onClickItem: V
|
|
385
|
-
} =
|
|
386
|
-
function
|
|
387
|
-
return e.contentTemplate ?
|
|
388
|
-
item:
|
|
385
|
+
} = o;
|
|
386
|
+
function T(F, x, p) {
|
|
387
|
+
return e.contentTemplate ? s(U, null, [e.contentTemplate({
|
|
388
|
+
item: F.raw,
|
|
389
389
|
index: x,
|
|
390
390
|
selectedItem: p
|
|
391
|
-
})]) : t.slots.content ?
|
|
392
|
-
item:
|
|
391
|
+
})]) : t.slots.content ? s(U, null, [t.slots.content && t.slots.content({
|
|
392
|
+
item: F.raw,
|
|
393
393
|
index: x,
|
|
394
394
|
selectedItem: p
|
|
395
|
-
})]) :
|
|
395
|
+
})]) : s("div", {
|
|
396
396
|
style: "margin: 10px 0;"
|
|
397
|
-
}, [
|
|
398
|
-
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
401
|
-
class:
|
|
402
|
-
id:
|
|
403
|
-
key:
|
|
404
|
-
style:
|
|
405
|
-
onClick: (
|
|
406
|
-
onMouseenter: (
|
|
407
|
-
onMouseover: (
|
|
408
|
-
onMouseout: (
|
|
409
|
-
}, [
|
|
397
|
+
}, [F.raw[m.value || "name"]]);
|
|
398
|
+
}
|
|
399
|
+
function I(F, x, p) {
|
|
400
|
+
return s("li", {
|
|
401
|
+
class: S(F, x),
|
|
402
|
+
id: i(F, x),
|
|
403
|
+
key: i(F, x),
|
|
404
|
+
style: r(F, x),
|
|
405
|
+
onClick: (R) => V(F, x, R),
|
|
406
|
+
onMouseenter: (R) => g(R, F, x),
|
|
407
|
+
onMouseover: (R) => O(R, F, x),
|
|
408
|
+
onMouseout: (R) => d(R, F, x)
|
|
409
|
+
}, [k.value && s("div", {
|
|
410
410
|
class: "f-list-select",
|
|
411
|
-
onClick: (
|
|
412
|
-
}, [
|
|
413
|
-
id: "list-" +
|
|
411
|
+
onClick: (R) => R.stopPropagation()
|
|
412
|
+
}, [s(ee, {
|
|
413
|
+
id: "list-" + i(F, x),
|
|
414
414
|
customClass: "listview-checkbox",
|
|
415
|
-
disabled:
|
|
416
|
-
checked:
|
|
417
|
-
"onUpdate:checked": (
|
|
418
|
-
onChange: (
|
|
419
|
-
}, null)]),
|
|
415
|
+
disabled: F[b.value],
|
|
416
|
+
checked: F.checked,
|
|
417
|
+
"onUpdate:checked": (R) => F.checked = R,
|
|
418
|
+
onChange: (R) => u(F, x, !R.checked)
|
|
419
|
+
}, null)]), s("div", {
|
|
420
420
|
class: "f-list-content"
|
|
421
|
-
}, [
|
|
421
|
+
}, [T(F, x, p)])]);
|
|
422
422
|
}
|
|
423
423
|
return {
|
|
424
|
-
renderItem:
|
|
424
|
+
renderItem: I
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
function It(e, t,
|
|
428
|
-
const
|
|
429
|
-
onMouseenterItem:
|
|
430
|
-
onMouseoverItem:
|
|
431
|
-
onMouseoutItem:
|
|
427
|
+
function It(e, t, l, n, c, a, o, f, w, y) {
|
|
428
|
+
const k = v(e.multiSelect), b = v(e.disableField), m = v(e.textField), {
|
|
429
|
+
onMouseenterItem: g,
|
|
430
|
+
onMouseoverItem: O,
|
|
431
|
+
onMouseoutItem: d
|
|
432
432
|
} = a, {
|
|
433
|
-
getKey:
|
|
434
|
-
listViewItemClass:
|
|
435
|
-
onCheckItem:
|
|
433
|
+
getKey: i,
|
|
434
|
+
listViewItemClass: S,
|
|
435
|
+
onCheckItem: r,
|
|
436
436
|
onClickItem: u
|
|
437
|
-
} =
|
|
437
|
+
} = o, {
|
|
438
438
|
dragstart: V,
|
|
439
|
-
dragenter:
|
|
440
|
-
dragover:
|
|
441
|
-
dragend:
|
|
442
|
-
} =
|
|
439
|
+
dragenter: T,
|
|
440
|
+
dragover: I,
|
|
441
|
+
dragend: F
|
|
442
|
+
} = n, {
|
|
443
443
|
removeItem: x
|
|
444
|
-
} =
|
|
445
|
-
margin:
|
|
444
|
+
} = w, p = P(() => ({
|
|
445
|
+
margin: k.value ? "10px 0" : "10px 0px 10px 14px"
|
|
446
446
|
}));
|
|
447
|
-
function
|
|
448
|
-
const
|
|
449
|
-
|
|
447
|
+
function R(h, C = "") {
|
|
448
|
+
const H = h.target;
|
|
449
|
+
H.title = H.scrollWidth > H.clientWidth ? C : "";
|
|
450
450
|
}
|
|
451
451
|
function j(h) {
|
|
452
|
-
return
|
|
452
|
+
return s("div", {
|
|
453
453
|
style: p.value,
|
|
454
|
-
onMouseenter: (
|
|
455
|
-
}, [h.raw[
|
|
454
|
+
onMouseenter: (C) => R(C, h.raw[m.value || "name"])
|
|
455
|
+
}, [h.raw[m.value || "name"]]);
|
|
456
456
|
}
|
|
457
457
|
function A() {
|
|
458
458
|
return t.slots.itemContent ? t.slots.itemContent : j;
|
|
459
459
|
}
|
|
460
|
-
const
|
|
461
|
-
function
|
|
462
|
-
return
|
|
463
|
-
class:
|
|
464
|
-
id:
|
|
465
|
-
key:
|
|
466
|
-
onClick: (
|
|
467
|
-
onMouseenter: (
|
|
468
|
-
onMouseover: (
|
|
469
|
-
onMouseout: (
|
|
460
|
+
const G = A();
|
|
461
|
+
function M(h, C, H) {
|
|
462
|
+
return s("li", {
|
|
463
|
+
class: S(h, C),
|
|
464
|
+
id: i(h, C),
|
|
465
|
+
key: i(h, C),
|
|
466
|
+
onClick: (B) => u(h, C, B),
|
|
467
|
+
onMouseenter: (B) => g(B, h, C),
|
|
468
|
+
onMouseover: (B) => O(B, h, C),
|
|
469
|
+
onMouseout: (B) => d(B, h, C),
|
|
470
470
|
draggable: "true",
|
|
471
|
-
onDragstart: (
|
|
472
|
-
onDragenter: (
|
|
473
|
-
onDragend: (
|
|
474
|
-
onDragover: (
|
|
475
|
-
}, [
|
|
471
|
+
onDragstart: (B) => V(B, h, C),
|
|
472
|
+
onDragenter: (B) => T(B, C),
|
|
473
|
+
onDragend: (B) => F(B, h),
|
|
474
|
+
onDragover: (B) => I(B)
|
|
475
|
+
}, [k.value && s("div", {
|
|
476
476
|
class: "f-list-select",
|
|
477
|
-
onClick: (
|
|
478
|
-
}, [
|
|
479
|
-
id: "list-" +
|
|
477
|
+
onClick: (B) => B.stopPropagation()
|
|
478
|
+
}, [s(ee, {
|
|
479
|
+
id: "list-" + i(h, C),
|
|
480
480
|
customClass: "listview-checkbox",
|
|
481
|
-
disabled: h[
|
|
481
|
+
disabled: h[b.value] || !h.checked,
|
|
482
482
|
checked: h.checked,
|
|
483
|
-
"onUpdate:checked": (
|
|
484
|
-
onChange: (
|
|
485
|
-
}, null)]),
|
|
483
|
+
"onUpdate:checked": (B) => h.checked = B,
|
|
484
|
+
onChange: (B) => r(h, C, !B.checked)
|
|
485
|
+
}, null)]), s("div", {
|
|
486
486
|
class: "f-list-content"
|
|
487
|
-
}, [
|
|
487
|
+
}, [G(h)]), s("div", {
|
|
488
488
|
class: "f-list-remove",
|
|
489
|
-
onClick: (
|
|
490
|
-
|
|
489
|
+
onClick: (B) => {
|
|
490
|
+
B.stopPropagation(), x(C);
|
|
491
491
|
}
|
|
492
|
-
}, [
|
|
492
|
+
}, [s("div", {
|
|
493
493
|
class: "f-list-remove-icon"
|
|
494
|
-
}, [
|
|
494
|
+
}, [s("i", {
|
|
495
495
|
class: "f-icon f-icon-remove_face"
|
|
496
|
-
}, null)])]),
|
|
496
|
+
}, null)])]), s("div", {
|
|
497
497
|
class: "f-list-handle"
|
|
498
|
-
}, [
|
|
498
|
+
}, [s("div", null, [s("i", {
|
|
499
499
|
class: "f-icon f-icon-drag-vertical"
|
|
500
500
|
}, null)])])]);
|
|
501
501
|
}
|
|
502
502
|
return {
|
|
503
|
-
renderItem:
|
|
503
|
+
renderItem: M
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
function Vt(e, t,
|
|
507
|
-
var
|
|
508
|
-
const
|
|
509
|
-
collpaseGroupIconClass:
|
|
506
|
+
function Vt(e, t, l, n, c, a, o, f, w, y) {
|
|
507
|
+
var i;
|
|
508
|
+
const k = v(((i = e.group) == null ? void 0 : i.groupFields) || []), {
|
|
509
|
+
collpaseGroupIconClass: b
|
|
510
510
|
} = c, {
|
|
511
|
-
toggleGroupRow:
|
|
512
|
-
} =
|
|
513
|
-
function
|
|
514
|
-
|
|
515
|
-
}
|
|
516
|
-
function
|
|
517
|
-
return t.slots.group ?
|
|
518
|
-
item:
|
|
519
|
-
index:
|
|
511
|
+
toggleGroupRow: m
|
|
512
|
+
} = y;
|
|
513
|
+
function g(S, r) {
|
|
514
|
+
r.collapse = !r.collapse, l.value = m(r.collapse ? "collapse" : "expand", r, l.value);
|
|
515
|
+
}
|
|
516
|
+
function O(S, r, u) {
|
|
517
|
+
return t.slots.group ? s(U, null, [t.slots.content && t.slots.group({
|
|
518
|
+
item: S.raw,
|
|
519
|
+
index: r,
|
|
520
520
|
selectedItem: u
|
|
521
|
-
})]) :
|
|
521
|
+
})]) : s("div", {
|
|
522
522
|
class: "f-navlookup-recentHeader",
|
|
523
|
-
onClick: (V) =>
|
|
524
|
-
}, [
|
|
523
|
+
onClick: (V) => g(V, S)
|
|
524
|
+
}, [s("div", {
|
|
525
525
|
class: "fv-grid-group-row-icon"
|
|
526
|
-
}, [
|
|
527
|
-
class:
|
|
528
|
-
}, null)]),
|
|
526
|
+
}, [s("span", {
|
|
527
|
+
class: b(S)
|
|
528
|
+
}, null)]), s("div", {
|
|
529
529
|
class: "f-navlookup-recommandLabel"
|
|
530
|
-
}, [
|
|
530
|
+
}, [S.raw[k.value[S.layer]]])]);
|
|
531
531
|
}
|
|
532
|
-
function
|
|
533
|
-
return
|
|
532
|
+
function d(S, r, u) {
|
|
533
|
+
return S.layer > -1 && O(S, r, u);
|
|
534
534
|
}
|
|
535
535
|
return {
|
|
536
|
-
renderItem:
|
|
536
|
+
renderItem: d
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
|
-
function kt(e, t,
|
|
540
|
-
const { dataView: c } =
|
|
541
|
-
function
|
|
539
|
+
function kt(e, t, l, n) {
|
|
540
|
+
const { dataView: c } = l, { updateSelectedItems: a } = n;
|
|
541
|
+
function o(f) {
|
|
542
542
|
if (f > -1 && f < c.value.length) {
|
|
543
543
|
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(c.value[f]))
|
|
544
544
|
return;
|
|
545
|
-
const
|
|
546
|
-
a(), t.emit("removeItem",
|
|
545
|
+
const w = c.value.splice(f, 1);
|
|
546
|
+
a(), t.emit("removeItem", w[0]);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
return { removeItem:
|
|
549
|
+
return { removeItem: o };
|
|
550
550
|
}
|
|
551
|
-
function Tt(e, t,
|
|
552
|
-
const
|
|
551
|
+
function Tt(e, t, l, n, c, a, o, f, w, y) {
|
|
552
|
+
const k = v(e.view), b = v(e.view === "CardView"), m = v({}), g = kt(e, t, n, w), O = P(() => ({
|
|
553
553
|
"f-list-view-group": !0,
|
|
554
554
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
555
|
-
"d-flex":
|
|
556
|
-
"flex-wrap":
|
|
557
|
-
})),
|
|
558
|
-
|
|
559
|
-
function
|
|
560
|
-
return
|
|
561
|
-
}
|
|
562
|
-
const
|
|
555
|
+
"d-flex": b.value,
|
|
556
|
+
"flex-wrap": b.value
|
|
557
|
+
})), d = P(() => !!l.value && l.value.length > 0), i = P(() => l.value.length === 0);
|
|
558
|
+
P(() => i.value && !t.slots.empty);
|
|
559
|
+
function S() {
|
|
560
|
+
return k.value === "SingleView" ? oe : k.value === "DraggableView" ? It : (k.value === "ContentView" || k.value === "CardView") && (e.contentTemplate || t.slots.content) ? Ft : oe;
|
|
561
|
+
}
|
|
562
|
+
const r = S(), {
|
|
563
563
|
renderItem: u
|
|
564
|
-
} =
|
|
564
|
+
} = r(e, t, l, y, c, a, w, o, g, f), {
|
|
565
565
|
renderItem: V
|
|
566
|
-
} = Vt(e, t,
|
|
567
|
-
function
|
|
568
|
-
return
|
|
566
|
+
} = Vt(e, t, l, y, c, a, w, o, g, f), T = [u, V];
|
|
567
|
+
function I() {
|
|
568
|
+
return l.value.filter((p) => p.visible !== !1).map((p, R) => T[p.type](p, R, m));
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
return
|
|
570
|
+
function F() {
|
|
571
|
+
return s("div", {
|
|
572
572
|
class: "f-list-view-emptydata",
|
|
573
573
|
style: "margin: 0 auto;"
|
|
574
|
-
}, [
|
|
574
|
+
}, [s("p", {
|
|
575
575
|
class: "f-empty-title"
|
|
576
576
|
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() : Z.getLocaleValue("listView.emptyMessage")])]);
|
|
577
577
|
}
|
|
578
578
|
function x() {
|
|
579
|
-
return
|
|
580
|
-
class:
|
|
579
|
+
return s("ul", {
|
|
580
|
+
class: O.value,
|
|
581
581
|
style: "list-style: none;"
|
|
582
|
-
}, [
|
|
582
|
+
}, [d.value && I(), i.value && F()]);
|
|
583
583
|
}
|
|
584
584
|
return {
|
|
585
585
|
renderListArea: x
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
function xt(e, t,
|
|
589
|
-
function
|
|
590
|
-
return t.slots.header &&
|
|
588
|
+
function xt(e, t, l) {
|
|
589
|
+
function n() {
|
|
590
|
+
return t.slots.header && s("div", {
|
|
591
591
|
class: "f-list-view-header"
|
|
592
592
|
}, [t.slots.header()]);
|
|
593
593
|
}
|
|
594
594
|
return {
|
|
595
|
-
renderHeader:
|
|
595
|
+
renderHeader: n
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
function se(e, t,
|
|
599
|
-
const
|
|
600
|
-
function
|
|
598
|
+
function se(e, t, l) {
|
|
599
|
+
const n = v(e.headerClass), c = v(e.placeholder), a = v(""), o = P(() => !a.value), f = P(() => !!a.value);
|
|
600
|
+
function w(m) {
|
|
601
601
|
a.value = "";
|
|
602
602
|
}
|
|
603
|
-
E(a, (
|
|
604
|
-
e.enableHighlightSearch &&
|
|
603
|
+
E(a, (m) => {
|
|
604
|
+
e.enableHighlightSearch && l.search(m), t.emit("afterSearch", m);
|
|
605
605
|
});
|
|
606
|
-
const
|
|
607
|
-
const
|
|
606
|
+
const y = P(() => {
|
|
607
|
+
const m = {
|
|
608
608
|
"form-group": !0,
|
|
609
609
|
"farris-form-group": !0
|
|
610
610
|
};
|
|
611
|
-
return
|
|
611
|
+
return n.value && n.value.split(" ").reduce((O, d) => (O[d] = !0, O), m), m;
|
|
612
612
|
});
|
|
613
|
-
function
|
|
613
|
+
function k(m) {
|
|
614
614
|
}
|
|
615
|
-
function
|
|
616
|
-
return
|
|
615
|
+
function b() {
|
|
616
|
+
return s("div", {
|
|
617
617
|
class: "f-list-view-header",
|
|
618
|
-
onClick: Be(() =>
|
|
619
|
-
}, [
|
|
620
|
-
class:
|
|
621
|
-
}, [
|
|
618
|
+
onClick: Be(() => k, ["prevent", "stop"])
|
|
619
|
+
}, [s("div", {
|
|
620
|
+
class: y.value
|
|
621
|
+
}, [s("div", {
|
|
622
622
|
class: "farris-input-wrap"
|
|
623
|
-
}, [
|
|
623
|
+
}, [s("div", {
|
|
624
624
|
class: "f-cmp-inputgroup"
|
|
625
|
-
}, [
|
|
625
|
+
}, [s("div", {
|
|
626
626
|
class: "input-group f-state-editable"
|
|
627
|
-
}, [Me(
|
|
627
|
+
}, [Me(s("input", {
|
|
628
628
|
class: "form-control f-utils-fill text-left",
|
|
629
|
-
"onUpdate:modelValue": (
|
|
629
|
+
"onUpdate:modelValue": (m) => a.value = m,
|
|
630
630
|
name: "input-group-value",
|
|
631
631
|
type: "text",
|
|
632
632
|
placeholder: c.value,
|
|
633
633
|
autocomplete: "off"
|
|
634
|
-
}, null), [[Pe, a.value]]),
|
|
634
|
+
}, null), [[Pe, a.value]]), s("div", {
|
|
635
635
|
class: "input-group-append"
|
|
636
|
-
}, [f.value &&
|
|
636
|
+
}, [f.value && s("span", {
|
|
637
637
|
class: "input-group-text input-group-clear",
|
|
638
|
-
onClick: (
|
|
639
|
-
}, [
|
|
638
|
+
onClick: (m) => w()
|
|
639
|
+
}, [s("i", {
|
|
640
640
|
class: "f-icon f-icon-close-circle"
|
|
641
|
-
}, null)]),
|
|
641
|
+
}, null)]), o.value && s("span", {
|
|
642
642
|
class: "input-group-text"
|
|
643
|
-
}, [
|
|
643
|
+
}, [s("span", {
|
|
644
644
|
class: "f-icon f-icon-search"
|
|
645
645
|
}, null)])])])])])])]);
|
|
646
646
|
}
|
|
647
647
|
return {
|
|
648
|
-
renderHeader:
|
|
648
|
+
renderHeader: b
|
|
649
649
|
};
|
|
650
650
|
}
|
|
651
651
|
function Ot() {
|
|
652
|
-
const e =
|
|
653
|
-
function a(
|
|
654
|
-
|
|
652
|
+
const e = v(""), t = v(-1), l = v(""), n = v(-1), c = v(!1);
|
|
653
|
+
function a(b, m, g) {
|
|
654
|
+
n.value = g;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
c.value || (
|
|
656
|
+
function o(b, m, g) {
|
|
657
|
+
c.value || (n.value = g);
|
|
658
658
|
}
|
|
659
|
-
function f(
|
|
660
|
-
|
|
659
|
+
function f(b, m, g) {
|
|
660
|
+
n.value = -1;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function w() {
|
|
663
663
|
c.value = !0;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function y() {
|
|
666
666
|
c.value = !1;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function k() {
|
|
669
669
|
t.value = -1, e.value = "";
|
|
670
670
|
}
|
|
671
671
|
return {
|
|
672
672
|
activeIndex: t,
|
|
673
|
-
focusedItemId:
|
|
674
|
-
hoverIndex:
|
|
675
|
-
clearActiveItem:
|
|
673
|
+
focusedItemId: l,
|
|
674
|
+
hoverIndex: n,
|
|
675
|
+
clearActiveItem: k,
|
|
676
676
|
onMouseenterItem: a,
|
|
677
|
-
onMouseoverItem:
|
|
677
|
+
onMouseoverItem: o,
|
|
678
678
|
onMouseoutItem: f,
|
|
679
|
-
resumeHover:
|
|
680
|
-
suspendHover:
|
|
679
|
+
resumeHover: y,
|
|
680
|
+
suspendHover: w
|
|
681
681
|
};
|
|
682
682
|
}
|
|
683
|
-
function Rt(e, t,
|
|
684
|
-
const c =
|
|
685
|
-
let
|
|
686
|
-
function
|
|
687
|
-
const x =
|
|
688
|
-
|
|
689
|
-
}
|
|
690
|
-
function
|
|
691
|
-
const { left:
|
|
683
|
+
function Rt(e, t, l, n) {
|
|
684
|
+
const c = v(e.idField), { dataView: a } = l, o = v(-1), f = v(!1), { activeIndex: w, focusedItemId: y, hoverIndex: k, resumeHover: b, suspendHover: m } = n;
|
|
685
|
+
let g, O = 0, d = 0;
|
|
686
|
+
function i(I, F) {
|
|
687
|
+
const x = I - O, p = F - d;
|
|
688
|
+
g.style.left = parseInt(g.style.left) + x + "px", g.style.top = parseInt(g.style.top) + p + "px", O = I, d = F;
|
|
689
|
+
}
|
|
690
|
+
function S(I) {
|
|
691
|
+
const { left: F, top: x } = I.getBoundingClientRect(), p = I.cloneNode(!0);
|
|
692
692
|
return p.style.cssText = `
|
|
693
693
|
position:absolute;
|
|
694
|
-
left:${
|
|
694
|
+
left:${F}px;
|
|
695
695
|
top:${document.documentElement.scrollTop ? x + document.documentElement.scrollTop : x}px;
|
|
696
696
|
z-index: 999999;
|
|
697
697
|
border: 1px solid #e2e3e5;
|
|
@@ -703,115 +703,115 @@ function Rt(e, t, n, l) {
|
|
|
703
703
|
align-items: center;
|
|
704
704
|
float: none;
|
|
705
705
|
text-align: initial;
|
|
706
|
-
width:${getComputedStyle(
|
|
707
|
-
height:${getComputedStyle(
|
|
706
|
+
width:${getComputedStyle(I).width};
|
|
707
|
+
height:${getComputedStyle(I).height};
|
|
708
708
|
`, p.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", p.children[0].children[0].style.cssText = `
|
|
709
709
|
margin: 10px 0px 10px 14px;
|
|
710
710
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
711
711
|
`, p.children[1].style.cssText = "width: 30px;color: #f4625f;padding: 0 14px 0 0", p.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(p), p;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
if (
|
|
715
|
-
if (
|
|
713
|
+
function r(I, F, x) {
|
|
714
|
+
if (I.stopPropagation(), m(), F) {
|
|
715
|
+
if (g = S(I.target), I.dataTransfer) {
|
|
716
716
|
const p = new Image();
|
|
717
|
-
p.src = "",
|
|
717
|
+
p.src = "", I.dataTransfer.setDragImage(p, 0, 0);
|
|
718
718
|
}
|
|
719
|
-
|
|
720
|
-
|
|
719
|
+
O = I.pageX, d = I.pageY, setTimeout(() => {
|
|
720
|
+
o.value = x, f.value = !0, F.moving = !0;
|
|
721
721
|
});
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
-
function u(
|
|
725
|
-
if (
|
|
726
|
-
const x = a.value[
|
|
727
|
-
p.splice(
|
|
724
|
+
function u(I, F) {
|
|
725
|
+
if (I.preventDefault(), o.value !== F) {
|
|
726
|
+
const x = a.value[o.value], p = a.value;
|
|
727
|
+
p.splice(o.value, 1), p.splice(F, 0, x), o.value = F, i(I.pageX, I.pageY);
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
|
-
function V(
|
|
731
|
-
|
|
730
|
+
function V(I) {
|
|
731
|
+
I.preventDefault(), I.dataTransfer && (I.dataTransfer.dropEffect = "move"), i(I.pageX, I.pageY);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
|
|
733
|
+
function T(I, F) {
|
|
734
|
+
F && (F.moving = !1, g && (document.body.removeChild(g), g = null)), a.value.forEach((x, p) => {
|
|
735
735
|
x.__fv_index__ = p;
|
|
736
|
-
}), f.value = !1,
|
|
736
|
+
}), f.value = !1, b(), k.value = F.raw.__fv_index__, w.value = F.raw.__fv_index__, y.value = F.raw[c.value], t.emit("change", a.value), t.emit("activeChange", [F.raw]);
|
|
737
737
|
}
|
|
738
738
|
return {
|
|
739
|
-
dragstart:
|
|
739
|
+
dragstart: r,
|
|
740
740
|
dragenter: u,
|
|
741
741
|
dragover: V,
|
|
742
|
-
dragend:
|
|
742
|
+
dragend: T,
|
|
743
743
|
isDragging: f
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
|
-
function Bt(e, t,
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
const
|
|
750
|
-
let
|
|
751
|
-
return h.data ?
|
|
746
|
+
function Bt(e, t, l, n, c, a) {
|
|
747
|
+
const o = v(e.idField), f = v(e.disableField), w = v(e.draggable);
|
|
748
|
+
v(e.itemClass);
|
|
749
|
+
const y = v(e.selection.multiSelect ?? !1), k = v(e.selection.multiSelectMode), { isDragging: b } = n, { activeIndex: m, focusedItemId: g, hoverIndex: O } = c, { clearSelection: d, getSelectedItems: i, toggleSelectItem: S, currentSelectedDataId: r } = a, u = v(i()), V = (M) => u.value.length === 0 ? !1 : u.value.some((h) => {
|
|
750
|
+
let C = "";
|
|
751
|
+
return h.data ? C = h.data[o.value] : C = h[o.value], C === M;
|
|
752
752
|
});
|
|
753
|
-
function
|
|
754
|
-
u.value =
|
|
753
|
+
function T() {
|
|
754
|
+
u.value = i();
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
756
|
+
function I(M, h) {
|
|
757
|
+
return M.raw[o.value] != null ? M.raw[o.value] : "";
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
const
|
|
759
|
+
function F(M, h) {
|
|
760
|
+
const C = {
|
|
761
761
|
"f-list-view-group-item": !0,
|
|
762
|
-
"f-list-view-draggable-item":
|
|
763
|
-
"f-un-click": !
|
|
764
|
-
"f-un-select": !!
|
|
762
|
+
"f-list-view-draggable-item": w.value,
|
|
763
|
+
"f-un-click": !M.checked,
|
|
764
|
+
"f-un-select": !!M.raw[f.value],
|
|
765
765
|
"f-listview-active": (
|
|
766
766
|
// 多选
|
|
767
|
-
|
|
768
|
-
!
|
|
767
|
+
y.value && V(I(M)) || // 单选
|
|
768
|
+
!y.value && M.raw[o.value] === r.value
|
|
769
769
|
),
|
|
770
|
-
"f-listview-hover": !
|
|
771
|
-
moving: !!
|
|
770
|
+
"f-listview-hover": !b.value && h === O.value,
|
|
771
|
+
moving: !!M.moving
|
|
772
772
|
};
|
|
773
773
|
if (typeof e.itemClass == "string")
|
|
774
|
-
return J(
|
|
774
|
+
return J(C, e.itemClass);
|
|
775
775
|
if (typeof e.itemClass == "function") {
|
|
776
|
-
const
|
|
777
|
-
return J(
|
|
776
|
+
const H = e.itemClass(M);
|
|
777
|
+
return J(C, H);
|
|
778
778
|
}
|
|
779
|
-
return
|
|
779
|
+
return C;
|
|
780
780
|
}
|
|
781
|
-
function x(
|
|
782
|
-
const
|
|
781
|
+
function x(M, h) {
|
|
782
|
+
const C = (
|
|
783
783
|
// 多选
|
|
784
|
-
|
|
785
|
-
!
|
|
786
|
-
),
|
|
787
|
-
if (
|
|
788
|
-
return ie(
|
|
784
|
+
y.value && V(I(M)) || // 单选
|
|
785
|
+
!y.value && M.raw[o.value] === r.value
|
|
786
|
+
), H = {};
|
|
787
|
+
if (C && (H.backgroundColor = "#dae9ff"), typeof e.itemStyle == "string")
|
|
788
|
+
return ie(H, e.itemStyle);
|
|
789
789
|
if (typeof e.itemStyle == "function") {
|
|
790
|
-
const
|
|
791
|
-
return ie(
|
|
790
|
+
const B = e.itemStyle(M);
|
|
791
|
+
return ie(H, B);
|
|
792
792
|
}
|
|
793
|
-
return
|
|
793
|
+
return H;
|
|
794
794
|
}
|
|
795
|
-
const p =
|
|
796
|
-
function
|
|
797
|
-
|
|
795
|
+
const p = P(() => !y.value);
|
|
796
|
+
function R(M, h, C) {
|
|
797
|
+
M.checked = C, !M.raw[f.value] && (p.value && (g.value = M.raw[o.value]), S(M));
|
|
798
798
|
}
|
|
799
|
-
const j =
|
|
800
|
-
function
|
|
801
|
-
if (
|
|
802
|
-
|
|
799
|
+
const j = P(() => y.value && k.value === "OnCheckClearByClick"), A = P(() => !y.value || y.value && (k.value === "OnCheckAndClick" || k.value === "OnClick"));
|
|
800
|
+
function G(M, h, C) {
|
|
801
|
+
if (M.raw[f.value]) {
|
|
802
|
+
C == null || C.preventDefault(), C == null || C.stopPropagation();
|
|
803
803
|
return;
|
|
804
804
|
}
|
|
805
|
-
|
|
805
|
+
g.value = M.raw[o.value], m.value = h, j.value && d(), A.value && (S(M), T()), t.emit("clickItem", { data: u.value, index: h, dataItem: M.raw }), t.emit("activeChange", u.value);
|
|
806
806
|
}
|
|
807
807
|
return {
|
|
808
|
-
getKey:
|
|
808
|
+
getKey: I,
|
|
809
809
|
selectedItems: u,
|
|
810
|
-
listViewItemClass:
|
|
810
|
+
listViewItemClass: F,
|
|
811
811
|
listViewItemStyle: x,
|
|
812
|
-
updateSelectedItems:
|
|
813
|
-
onCheckItem:
|
|
814
|
-
onClickItem:
|
|
812
|
+
updateSelectedItems: T,
|
|
813
|
+
onCheckItem: R,
|
|
814
|
+
onClickItem: G
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
817
|
const fe = /* @__PURE__ */ N({
|
|
@@ -819,62 +819,62 @@ const fe = /* @__PURE__ */ N({
|
|
|
819
819
|
props: St,
|
|
820
820
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
821
821
|
setup(e, t) {
|
|
822
|
-
const
|
|
822
|
+
const l = v(), n = v(!0), c = v(!1), a = v([]), o = 0, f = v(e.columns), w = Ae(e, t), y = Ee(e), k = je(e), b = $e(e, y), m = Ge(e, /* @__PURE__ */ new Map(), w, k, y), g = Ne(e, m, y, a, t), O = wt(e, l), d = _e(e, m), i = P(() => m.dataView.value.length), S = ze(e, t, g, y), r = Ue(e, t, y, S, a), u = De(e), V = We(e, {}, u), T = qe(e, m, r, k, y, u, V), I = Ke(e, y, V, T), F = Xe(e, y, V, T), x = Ye(e, f, m, i, o, T, I, F), {
|
|
823
823
|
getVisualData: p
|
|
824
824
|
} = x;
|
|
825
|
-
a.value = p(0,
|
|
826
|
-
const
|
|
827
|
-
const
|
|
825
|
+
a.value = p(0, i.value + o - 1);
|
|
826
|
+
const R = P(() => {
|
|
827
|
+
const L = {
|
|
828
828
|
"f-list-view": !0,
|
|
829
829
|
"f-list-view-multiple": e.multiSelect
|
|
830
830
|
};
|
|
831
|
-
return e.size !== "default" && (
|
|
832
|
-
}), j =
|
|
831
|
+
return e.size !== "default" && (L[`${e.size}-item`] = !0), J(L, e.customClass);
|
|
832
|
+
}), j = P(() => !!t.slots.footer || n.value);
|
|
833
833
|
function A() {
|
|
834
834
|
return e.header === "SearchBar" ? se : e.header === "ContentHeader" ? xt : se;
|
|
835
835
|
}
|
|
836
|
-
const
|
|
837
|
-
renderHeader:
|
|
838
|
-
} =
|
|
839
|
-
renderListArea:
|
|
840
|
-
} = Tt(e, t, a,
|
|
841
|
-
function _(
|
|
842
|
-
|
|
836
|
+
const G = A(), {
|
|
837
|
+
renderHeader: M
|
|
838
|
+
} = G(e, t, O), h = Ot(), C = Rt(e, t, m, h), H = Bt(e, t, a, C, h, g), {
|
|
839
|
+
renderListArea: B
|
|
840
|
+
} = Tt(e, t, a, m, b, h, g, x, H, C);
|
|
841
|
+
function _(L) {
|
|
842
|
+
O.search(L);
|
|
843
843
|
}
|
|
844
|
-
function ge(
|
|
845
|
-
|
|
844
|
+
function ge(L) {
|
|
845
|
+
L && (m.load(L), a.value = p(0, i.value + o - 1));
|
|
846
846
|
}
|
|
847
847
|
function he() {
|
|
848
|
-
|
|
848
|
+
g.clearSelection(), h.clearActiveItem();
|
|
849
849
|
}
|
|
850
850
|
function pe() {
|
|
851
|
-
return
|
|
851
|
+
return H.selectedItems.value;
|
|
852
852
|
}
|
|
853
853
|
function ye() {
|
|
854
|
-
return
|
|
854
|
+
return H.selectedItems.value.map((L) => L[y.idField.value]);
|
|
855
855
|
}
|
|
856
|
-
function le(
|
|
857
|
-
|
|
856
|
+
function le(L) {
|
|
857
|
+
g.selectedValues.value = L, H.updateSelectedItems();
|
|
858
858
|
}
|
|
859
859
|
function be() {
|
|
860
|
-
return
|
|
860
|
+
return g.currentSelectedDataId.value;
|
|
861
861
|
}
|
|
862
|
-
function Ce(
|
|
863
|
-
|
|
862
|
+
function Ce(L) {
|
|
863
|
+
S.activeRowById(L);
|
|
864
864
|
}
|
|
865
|
-
function Se(
|
|
866
|
-
const
|
|
867
|
-
z &&
|
|
865
|
+
function Se(L) {
|
|
866
|
+
const $ = y.idField.value, z = a.value.find((K) => K.raw[$] === L), D = a.value.findIndex((K) => K.raw[$] === L);
|
|
867
|
+
z && D > -1 && H.onClickItem(z, D);
|
|
868
868
|
}
|
|
869
|
-
function we(
|
|
870
|
-
const
|
|
871
|
-
z &&
|
|
869
|
+
function we(L) {
|
|
870
|
+
const $ = y.idField.value, z = a.value.find((D) => D.raw[$] === L);
|
|
871
|
+
z && S.changeRow(z);
|
|
872
872
|
}
|
|
873
|
-
function Fe(
|
|
874
|
-
|
|
873
|
+
function Fe(L) {
|
|
874
|
+
d.updatePagination(L);
|
|
875
875
|
}
|
|
876
|
-
function Ie(
|
|
877
|
-
return a.value.filter((
|
|
876
|
+
function Ie(L) {
|
|
877
|
+
return a.value.filter(($) => L.includes($.raw[e.idField]));
|
|
878
878
|
}
|
|
879
879
|
t.expose({
|
|
880
880
|
search: _,
|
|
@@ -890,29 +890,29 @@ const fe = /* @__PURE__ */ N({
|
|
|
890
890
|
getVisibleDataByIds: Ie,
|
|
891
891
|
selectRowById: we
|
|
892
892
|
});
|
|
893
|
-
function Ve(
|
|
894
|
-
e.multiSelect && (
|
|
893
|
+
function Ve(L) {
|
|
894
|
+
e.multiSelect && (L.preventDefault(), L.stopPropagation());
|
|
895
895
|
}
|
|
896
|
-
E(() => e.selectionValues, (
|
|
897
|
-
|
|
896
|
+
E(() => e.selectionValues, (L, $) => {
|
|
897
|
+
L !== $ && le(L);
|
|
898
898
|
});
|
|
899
|
-
const ke = Je(e,
|
|
899
|
+
const ke = Je(e, g), {
|
|
900
900
|
sidebarWidth: Te,
|
|
901
901
|
showSidebarCheckBox: nn
|
|
902
902
|
} = ke, xe = Qe(e, t), {
|
|
903
903
|
applyColumnSorter: ln,
|
|
904
904
|
columnContext: Oe,
|
|
905
905
|
updateColumnRenderContext: an
|
|
906
|
-
} = xe, Re = Ze(e,
|
|
906
|
+
} = xe, Re = Ze(e, m, a, Oe, x, i, o, Te, r), {
|
|
907
907
|
shouldRenderPagination: on
|
|
908
|
-
} =
|
|
908
|
+
} = d, {
|
|
909
909
|
renderDataGridPagination: sn
|
|
910
|
-
} = et(e, t,
|
|
911
|
-
return () =>
|
|
912
|
-
class:
|
|
910
|
+
} = et(e, t, m, Re, d, g);
|
|
911
|
+
return () => s("div", {
|
|
912
|
+
class: R.value,
|
|
913
913
|
onClick: Ve
|
|
914
|
-
}, [
|
|
915
|
-
ref:
|
|
914
|
+
}, [M(), s("div", {
|
|
915
|
+
ref: l,
|
|
916
916
|
class: "f-list-view-content",
|
|
917
917
|
onMouseover: () => {
|
|
918
918
|
c.value = !0;
|
|
@@ -920,7 +920,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
920
920
|
onMouseleave: () => {
|
|
921
921
|
c.value = !1;
|
|
922
922
|
}
|
|
923
|
-
}, [
|
|
923
|
+
}, [B()]), j.value && s("div", {
|
|
924
924
|
class: "f-list-view-footer"
|
|
925
925
|
}, [e.footerTemplate ? e.footerTemplate() : t.slots.footer && t.slots.footer()])]);
|
|
926
926
|
}
|
|
@@ -951,25 +951,25 @@ const fe = /* @__PURE__ */ N({
|
|
|
951
951
|
customClass: { type: Object, default: {} }
|
|
952
952
|
};
|
|
953
953
|
function Pt(e, t) {
|
|
954
|
-
function n
|
|
955
|
-
|
|
954
|
+
function l(n) {
|
|
955
|
+
n.stopPropagation(), e.disabled || t.emit("click", n);
|
|
956
956
|
}
|
|
957
957
|
return {
|
|
958
|
-
onClickButton:
|
|
958
|
+
onClickButton: l
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
961
|
function Lt(e) {
|
|
962
|
-
const t =
|
|
963
|
-
const
|
|
962
|
+
const t = P(() => {
|
|
963
|
+
const n = {
|
|
964
964
|
"f-icon": !0
|
|
965
965
|
};
|
|
966
966
|
if (e.icon) {
|
|
967
967
|
const c = e.icon.trim().split(" ");
|
|
968
|
-
c && c.length && c.reduce((a,
|
|
968
|
+
c && c.length && c.reduce((a, o) => (a[o] = !0, a), n);
|
|
969
969
|
}
|
|
970
|
-
return
|
|
971
|
-
}),
|
|
972
|
-
return { iconClass: t, shouldShowIcon:
|
|
970
|
+
return n;
|
|
971
|
+
}), l = P(() => !!(e.icon && e.icon.trim()));
|
|
972
|
+
return { iconClass: t, shouldShowIcon: l };
|
|
973
973
|
}
|
|
974
974
|
const me = /* @__PURE__ */ N({
|
|
975
975
|
name: "FButton",
|
|
@@ -977,26 +977,26 @@ const me = /* @__PURE__ */ N({
|
|
|
977
977
|
emits: ["click"],
|
|
978
978
|
setup(e, t) {
|
|
979
979
|
const {
|
|
980
|
-
onClickButton:
|
|
980
|
+
onClickButton: l
|
|
981
981
|
} = Pt(e, t), {
|
|
982
|
-
iconClass:
|
|
982
|
+
iconClass: n,
|
|
983
983
|
shouldShowIcon: c
|
|
984
|
-
} = Lt(e), a =
|
|
985
|
-
const
|
|
984
|
+
} = Lt(e), a = P(() => {
|
|
985
|
+
const o = {
|
|
986
986
|
btn: !0,
|
|
987
987
|
"btn-lg": e.size === "large",
|
|
988
988
|
"btn-md": e.size !== "large" && e.size !== "small",
|
|
989
989
|
"btn-sm": e.size === "small",
|
|
990
990
|
"btn-icontext": c.value
|
|
991
991
|
};
|
|
992
|
-
return
|
|
992
|
+
return o[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((f, w) => (f[w] = e.customClass[w], f), o), o;
|
|
993
993
|
});
|
|
994
|
-
return () =>
|
|
994
|
+
return () => s("button", {
|
|
995
995
|
class: a.value,
|
|
996
996
|
disabled: e.disabled,
|
|
997
|
-
onClick: (
|
|
998
|
-
}, [c.value &&
|
|
999
|
-
class:
|
|
997
|
+
onClick: (o) => l(o)
|
|
998
|
+
}, [c.value && s("i", {
|
|
999
|
+
class: n.value
|
|
1000
1000
|
}, null), t.slots.default && t.slots.default()]);
|
|
1001
1001
|
}
|
|
1002
1002
|
}), Ht = /* @__PURE__ */ new Map([
|
|
@@ -1217,13 +1217,13 @@ const me = /* @__PURE__ */ N({
|
|
|
1217
1217
|
required: _t,
|
|
1218
1218
|
ignore: zt
|
|
1219
1219
|
};
|
|
1220
|
-
function
|
|
1220
|
+
function Dt(e, t, l) {
|
|
1221
1221
|
return t;
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1224
|
-
function e(t,
|
|
1223
|
+
function Wt() {
|
|
1224
|
+
function e(t, l, n) {
|
|
1225
1225
|
const c = {};
|
|
1226
|
-
return c.beforeOpen = (a) =>
|
|
1226
|
+
return c.beforeOpen = (a) => l.call("beforeOpen", t, [a, t], n), c;
|
|
1227
1227
|
}
|
|
1228
1228
|
return {
|
|
1229
1229
|
resolve: e
|
|
@@ -1398,9 +1398,9 @@ const ne = {
|
|
|
1398
1398
|
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
1399
1399
|
minPanelWidth: { type: Number, default: 160 },
|
|
1400
1400
|
popupOnClick: { type: Boolean, default: !0 }
|
|
1401
|
-
},
|
|
1401
|
+
}, qt = Object.assign({}, ne, {
|
|
1402
1402
|
readonly: {}
|
|
1403
|
-
}), ve = de(ne, Ut, Ht,
|
|
1403
|
+
}), ve = de(ne, Ut, Ht, Dt), Kt = Wt(), Xt = {
|
|
1404
1404
|
dataSource: { type: Array, default: [] },
|
|
1405
1405
|
enableSearch: { type: Boolean, default: !1 },
|
|
1406
1406
|
idField: { type: String, default: "id" },
|
|
@@ -1426,226 +1426,246 @@ const ne = {
|
|
|
1426
1426
|
props: Xt,
|
|
1427
1427
|
emits: ["selectionChange"],
|
|
1428
1428
|
setup(e, t) {
|
|
1429
|
-
const
|
|
1429
|
+
const l = v(), n = v(e.dataSource), c = v([]), a = v(e.separator), o = v(e.width), f = v(e.maxHeight), w = P(() => e.multiSelect), y = v(e.multiSelect ? String(e.selectedValues).split(a.value) : [e.selectedValues]), k = P(() => ({
|
|
1430
1430
|
enableSelectRow: !0,
|
|
1431
1431
|
multiSelect: e.multiSelect,
|
|
1432
1432
|
multiSelectMode: "OnCheckAndClick",
|
|
1433
|
-
showCheckbox:
|
|
1433
|
+
showCheckbox: w.value,
|
|
1434
1434
|
showSelectAll: !1,
|
|
1435
1435
|
showSelection: !0
|
|
1436
1436
|
}));
|
|
1437
1437
|
E(e.dataSource, () => {
|
|
1438
|
-
|
|
1439
|
-
}),
|
|
1440
|
-
const
|
|
1441
|
-
const
|
|
1442
|
-
return
|
|
1438
|
+
n.value = e.dataSource;
|
|
1439
|
+
}), P(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
1440
|
+
const b = P(() => {
|
|
1441
|
+
const i = {};
|
|
1442
|
+
return o.value !== void 0 && (i.width = `${o.value}px`), f.value !== void 0 && f.value > 0 && (i.maxHeight = `${f.value}px`), i;
|
|
1443
1443
|
});
|
|
1444
|
-
function i
|
|
1445
|
-
|
|
1444
|
+
function m(i) {
|
|
1445
|
+
l.value.search(i);
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1448
|
-
c.value =
|
|
1447
|
+
function g(i) {
|
|
1448
|
+
c.value = i.map((S) => Object.assign({}, S)), y.value = i.map((S) => S[e.idField]), t.emit("selectionChange", c.value);
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function O(i) {
|
|
1451
1451
|
if (e.enableHighlightSearch)
|
|
1452
1452
|
return;
|
|
1453
|
-
let
|
|
1453
|
+
let S = [];
|
|
1454
1454
|
const {
|
|
1455
|
-
searchOption:
|
|
1455
|
+
searchOption: r
|
|
1456
1456
|
} = e;
|
|
1457
|
-
typeof
|
|
1457
|
+
typeof r == "function" ? S = n.value.filter((u) => r(i, u)) : S = n.value.filter((u) => u[e.valueField].indexOf(i) > -1 || u[e.textField].indexOf(i) > -1), l.value.updateDataSource(S);
|
|
1458
1458
|
}
|
|
1459
|
-
E([() => e.selectedValues], ([
|
|
1460
|
-
e.multiSelect ?
|
|
1459
|
+
E([() => e.selectedValues], ([i]) => {
|
|
1460
|
+
e.multiSelect ? y.value = i.split(a.value) : y.value = [i];
|
|
1461
1461
|
});
|
|
1462
|
-
function
|
|
1463
|
-
|
|
1462
|
+
function d(i) {
|
|
1463
|
+
l.value.activeRowById(i);
|
|
1464
1464
|
}
|
|
1465
1465
|
return Q(() => {
|
|
1466
|
-
var
|
|
1466
|
+
var i, S;
|
|
1467
1467
|
if (!e.multiSelect) {
|
|
1468
|
-
const
|
|
1469
|
-
let u =
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1468
|
+
const r = (i = y.value) == null ? void 0 : i[0];
|
|
1469
|
+
let u = r;
|
|
1470
|
+
const V = n.value.map((T) => T[e.valueField || e.idField]);
|
|
1471
|
+
if (!nt(r) && V.includes(r)) {
|
|
1472
|
+
const T = typeof r, I = typeof ((S = n.value[0]) == null ? void 0 : S[e.valueField || e.idField]);
|
|
1473
|
+
I === "number" && T !== I && (u = Number(r)), I === "boolean" && T !== I && (u = r === "true" ? !0 : r === "false" ? !1 : r), d(u);
|
|
1473
1474
|
}
|
|
1474
1475
|
}
|
|
1475
1476
|
}), t.expose({
|
|
1476
|
-
search:
|
|
1477
|
-
activeRowById:
|
|
1478
|
-
}), () =>
|
|
1477
|
+
search: m,
|
|
1478
|
+
activeRowById: d
|
|
1479
|
+
}), () => s("div", {
|
|
1479
1480
|
class: "f-combo-list-container",
|
|
1480
|
-
style:
|
|
1481
|
-
}, [
|
|
1482
|
-
ref:
|
|
1481
|
+
style: b.value
|
|
1482
|
+
}, [s(lt, {
|
|
1483
|
+
ref: l,
|
|
1483
1484
|
size: "small",
|
|
1484
1485
|
itemClass: "f-combo-list-item",
|
|
1485
1486
|
itemContentClass: "text-truncate",
|
|
1486
1487
|
header: "ContentHeader",
|
|
1487
1488
|
headerClass: "f-combo-list-search-box",
|
|
1488
|
-
data:
|
|
1489
|
+
data: n.value,
|
|
1489
1490
|
idField: e.idField,
|
|
1490
1491
|
textField: e.textField,
|
|
1491
1492
|
titleField: e.titleField,
|
|
1492
1493
|
multiSelect: e.multiSelect,
|
|
1493
|
-
selection:
|
|
1494
|
+
selection: k.value,
|
|
1494
1495
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1495
|
-
selectionValues:
|
|
1496
|
-
onSelectionUpdate:
|
|
1497
|
-
onAfterSearch:
|
|
1496
|
+
selectionValues: y.value,
|
|
1497
|
+
onSelectionUpdate: g,
|
|
1498
|
+
onAfterSearch: O
|
|
1498
1499
|
}, null)]);
|
|
1499
1500
|
}
|
|
1500
1501
|
});
|
|
1501
1502
|
function Jt(e) {
|
|
1502
|
-
const t =
|
|
1503
|
-
function a(
|
|
1504
|
-
const i = e.multiSelect ? String(
|
|
1505
|
-
return
|
|
1506
|
-
const
|
|
1507
|
-
return
|
|
1503
|
+
const t = v(""), l = v(e.modelValue), n = v(e.data || []), c = v(e.editable);
|
|
1504
|
+
function a(d) {
|
|
1505
|
+
const i = e.multiSelect ? String(d).split(e.separator) : [String(d)], S = i.map((V) => [V, !0]), r = new Map(S);
|
|
1506
|
+
return n.value.filter((V) => r.has(String(V[e.valueField]))).sort((V, T) => {
|
|
1507
|
+
const I = i.indexOf(V[e.valueField]), F = i.indexOf(T[e.valueField]);
|
|
1508
|
+
return I - F;
|
|
1508
1509
|
});
|
|
1509
1510
|
}
|
|
1510
|
-
function
|
|
1511
|
-
const i = a(
|
|
1512
|
-
t.value = c.value ? i ||
|
|
1511
|
+
function o(d) {
|
|
1512
|
+
const i = a(d).map((S) => S[e.textField]).join(e.separator);
|
|
1513
|
+
t.value = c.value ? i || d : i;
|
|
1513
1514
|
}
|
|
1514
|
-
function f(
|
|
1515
|
+
function f(d) {
|
|
1515
1516
|
if (e.multiSelect) {
|
|
1516
|
-
const i =
|
|
1517
|
-
return
|
|
1517
|
+
const i = d.split(e.separator).map((r) => [r, !0]), S = new Map(i);
|
|
1518
|
+
return n.value.filter((r) => S.has(r[e.textField]));
|
|
1518
1519
|
}
|
|
1519
|
-
return
|
|
1520
|
+
return n.value.filter((i) => "" + i[e.textField] === d);
|
|
1520
1521
|
}
|
|
1521
|
-
function
|
|
1522
|
+
function w(d) {
|
|
1522
1523
|
const i = {};
|
|
1523
|
-
return i[e.idField] =
|
|
1524
|
+
return i[e.idField] = d, i[e.textField] = d, [i];
|
|
1524
1525
|
}
|
|
1525
|
-
function
|
|
1526
|
-
let i = f(
|
|
1527
|
-
const
|
|
1528
|
-
return c.value && !
|
|
1526
|
+
function y(d) {
|
|
1527
|
+
let i = f(d);
|
|
1528
|
+
const S = i && i.length > 0;
|
|
1529
|
+
return c.value && !S && (i = w(d)), i;
|
|
1529
1530
|
}
|
|
1530
|
-
function
|
|
1531
|
-
const { url:
|
|
1532
|
-
if (!
|
|
1531
|
+
function k() {
|
|
1532
|
+
const { url: d, method: i = "GET", headers: S = { "Content-Type": "application/json;charset=utf-8;" }, body: r = null } = e.remote;
|
|
1533
|
+
if (!d)
|
|
1533
1534
|
return;
|
|
1534
|
-
const
|
|
1535
|
-
let
|
|
1536
|
-
fetch(new Request(
|
|
1537
|
-
var
|
|
1538
|
-
if (
|
|
1539
|
-
return
|
|
1540
|
-
throw
|
|
1541
|
-
}).then((
|
|
1542
|
-
|
|
1543
|
-
}).catch((
|
|
1544
|
-
console.warn(
|
|
1535
|
+
const u = i.toLowerCase() === "get" ? { method: i, headers: S } : { method: i, headers: S, body: r };
|
|
1536
|
+
let V = !1;
|
|
1537
|
+
fetch(new Request(d, u)).then((T) => {
|
|
1538
|
+
var F, x;
|
|
1539
|
+
if (T.status === 200)
|
|
1540
|
+
return V = !!((x = (F = T.headers) == null ? void 0 : F.get("content-type")) != null && x.includes("application/json")), V ? T.text() : T.json();
|
|
1541
|
+
throw T.status === 405 ? new Error(Z.getLocaleValue("comboList.remoteError")) : new Error(T.statusText);
|
|
1542
|
+
}).then((T) => {
|
|
1543
|
+
T.length && (n.value = V ? JSON.parse(T) : T);
|
|
1544
|
+
}).catch((T) => {
|
|
1545
|
+
console.warn(T);
|
|
1545
1546
|
});
|
|
1546
1547
|
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
}).catch((
|
|
1550
|
-
console.log(
|
|
1551
|
-
}) :
|
|
1552
|
-
|
|
1553
|
-
}), E([
|
|
1548
|
+
e.remote && (e.load ? e.load().then((d) => {
|
|
1549
|
+
n.value = d;
|
|
1550
|
+
}).catch((d) => {
|
|
1551
|
+
console.log(d);
|
|
1552
|
+
}) : k()), E(() => e.data, () => {
|
|
1553
|
+
n.value = e.data;
|
|
1554
|
+
}), E([n], ([d]) => {
|
|
1554
1555
|
if (e.modelValue != null) {
|
|
1555
|
-
const i =
|
|
1556
|
+
const i = d.find((S) => S[e.valueField] === e.modelValue);
|
|
1556
1557
|
i && (t.value = i[e.textField]);
|
|
1557
1558
|
}
|
|
1558
|
-
}), E(() => e.modelValue, (
|
|
1559
|
-
|
|
1560
|
-
})
|
|
1559
|
+
}), E(() => e.modelValue, (d) => {
|
|
1560
|
+
l.value = d, o(d);
|
|
1561
|
+
});
|
|
1562
|
+
function b(d) {
|
|
1563
|
+
n.value = d;
|
|
1564
|
+
}
|
|
1565
|
+
function m() {
|
|
1566
|
+
return n.value;
|
|
1567
|
+
}
|
|
1568
|
+
function g() {
|
|
1569
|
+
return t.value;
|
|
1570
|
+
}
|
|
1571
|
+
function O() {
|
|
1572
|
+
const d = typeof e.beforeOpen == "function";
|
|
1573
|
+
return !e.beforeOpen || !d ? Promise.resolve(!0) : Promise.resolve().then(() => e.beforeOpen({ instance: { updateDataSource: b, getData: m, getDisplayText: g } })).then((i) => typeof (i == null ? void 0 : i.canOpen) == "boolean" ? i == null ? void 0 : i.canOpen : !0);
|
|
1574
|
+
}
|
|
1575
|
+
return e.beforeOpen ? O().then((d) => {
|
|
1576
|
+
d && o(e.modelValue);
|
|
1577
|
+
}) : o(e.modelValue), {
|
|
1578
|
+
dataSource: n,
|
|
1579
|
+
displayText: t,
|
|
1580
|
+
editable: c,
|
|
1581
|
+
modelValue: l,
|
|
1582
|
+
beforeOpenList: O,
|
|
1583
|
+
getItemsByDisplayText: f,
|
|
1584
|
+
getItemsByValue: a,
|
|
1585
|
+
getSelectedItemsByDisplayText: y
|
|
1586
|
+
};
|
|
1561
1587
|
}
|
|
1562
|
-
const
|
|
1588
|
+
const W = /* @__PURE__ */ N({
|
|
1563
1589
|
name: "FComboList",
|
|
1564
1590
|
props: ne,
|
|
1565
1591
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1566
1592
|
setup(e, t) {
|
|
1567
|
-
const
|
|
1568
|
-
dataSource:
|
|
1569
|
-
displayText:
|
|
1570
|
-
editable:
|
|
1571
|
-
modelValue:
|
|
1572
|
-
getItemsByDisplayText:
|
|
1573
|
-
getItemsByValue:
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1593
|
+
const l = v(), n = v(), c = v(e.disabled || e.readonly), a = v(e.enableClear), o = v(e.enableSearch), f = v(e.readonly), {
|
|
1594
|
+
dataSource: w,
|
|
1595
|
+
displayText: y,
|
|
1596
|
+
editable: k,
|
|
1597
|
+
modelValue: b,
|
|
1598
|
+
getItemsByDisplayText: m,
|
|
1599
|
+
getItemsByValue: g,
|
|
1600
|
+
beforeOpenList: O
|
|
1601
|
+
} = Jt(e), d = v(e.dropDownIcon);
|
|
1602
|
+
d.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (d.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
|
|
1603
|
+
const i = P(() => e.multiSelect), S = P(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1604
|
+
function r() {
|
|
1605
|
+
!i.value && n.value && n.value.hidePopup();
|
|
1579
1606
|
}
|
|
1580
|
-
function
|
|
1581
|
-
|
|
1582
|
-
let
|
|
1583
|
-
h.length === 1 ?
|
|
1584
|
-
}
|
|
1585
|
-
function u() {
|
|
1586
|
-
const h = d(o.value);
|
|
1587
|
-
m(h);
|
|
1607
|
+
function u(h) {
|
|
1608
|
+
y.value = h.map((H) => H[e.textField]).join(e.separator);
|
|
1609
|
+
let C = "";
|
|
1610
|
+
h.length === 1 ? C = h[0][e.valueField] : C = h.map((H) => H[e.valueField]).join(e.separator), b.value !== C && (b.value = C, t.emit("update:modelValue", b.value), t.emit("change", h, b.value));
|
|
1588
1611
|
}
|
|
1589
1612
|
function V() {
|
|
1590
|
-
|
|
1613
|
+
const h = g(b.value);
|
|
1614
|
+
u(h);
|
|
1615
|
+
}
|
|
1616
|
+
function T() {
|
|
1617
|
+
f.value || y.value;
|
|
1591
1618
|
}
|
|
1592
|
-
function
|
|
1593
|
-
var
|
|
1594
|
-
|
|
1619
|
+
function I(h) {
|
|
1620
|
+
var C;
|
|
1621
|
+
b.value = "", (C = l.value) == null || C.activeRowById(""), t.emit("update:modelValue", ""), t.emit("change", [], ""), t.emit("clear");
|
|
1595
1622
|
}
|
|
1596
|
-
function
|
|
1597
|
-
var
|
|
1598
|
-
e.enableSearch && e.enableHighlightSearch && ((
|
|
1623
|
+
function F(h) {
|
|
1624
|
+
var C, H;
|
|
1625
|
+
e.enableSearch && e.enableHighlightSearch && ((C = l.value) == null || C.search(h)), (H = l.value) == null || H.activeRowById(h), t.emit("change", [b.value], b.value);
|
|
1599
1626
|
}
|
|
1600
|
-
function
|
|
1627
|
+
function x(h) {
|
|
1601
1628
|
if (e.multiSelect) {
|
|
1602
|
-
const
|
|
1629
|
+
const C = m(h);
|
|
1603
1630
|
e.viewType;
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1631
|
+
const B = C.map((_) => _[e.idField || e.valueField]).join(e.separator);
|
|
1632
|
+
b.value !== B && (b.value = B, t.emit("update:modelValue", b.value), t.emit("change", C, b.value));
|
|
1606
1633
|
}
|
|
1607
1634
|
}
|
|
1608
|
-
function
|
|
1609
|
-
return
|
|
1635
|
+
function p() {
|
|
1636
|
+
return y.value;
|
|
1610
1637
|
}
|
|
1611
|
-
function
|
|
1638
|
+
function R(h) {
|
|
1612
1639
|
const {
|
|
1613
|
-
value:
|
|
1640
|
+
value: C
|
|
1614
1641
|
} = h.target;
|
|
1615
|
-
|
|
1642
|
+
F(C), t.emit("input", C);
|
|
1616
1643
|
}
|
|
1617
|
-
function
|
|
1618
|
-
|
|
1644
|
+
function j() {
|
|
1645
|
+
n.value.hidePopup();
|
|
1619
1646
|
}
|
|
1620
|
-
function
|
|
1621
|
-
|
|
1647
|
+
function A(h) {
|
|
1648
|
+
w.value = h;
|
|
1622
1649
|
}
|
|
1623
|
-
function
|
|
1624
|
-
return
|
|
1650
|
+
function G() {
|
|
1651
|
+
return w.value;
|
|
1625
1652
|
}
|
|
1626
|
-
const
|
|
1627
|
-
getDisplayText:
|
|
1628
|
-
hidePopup:
|
|
1629
|
-
updateDataSource:
|
|
1630
|
-
getData:
|
|
1653
|
+
const M = {
|
|
1654
|
+
getDisplayText: p,
|
|
1655
|
+
hidePopup: j,
|
|
1656
|
+
updateDataSource: A,
|
|
1657
|
+
getData: G
|
|
1631
1658
|
};
|
|
1632
|
-
t.expose(
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
instance: $
|
|
1637
|
-
})).then((R) => typeof (R == null ? void 0 : R.canOpen) == "boolean" ? R == null ? void 0 : R.canOpen : !0);
|
|
1638
|
-
}
|
|
1639
|
-
return E([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h, y, R, M, _]) => {
|
|
1640
|
-
c.value = h, F.value = y, a.value = R, s.value = M, f.value = _;
|
|
1641
|
-
}), () => r(tt, {
|
|
1642
|
-
ref: l,
|
|
1659
|
+
return t.expose(M), E([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h, C, H, B, _]) => {
|
|
1660
|
+
c.value = h, k.value = C, a.value = H, o.value = B, f.value = _;
|
|
1661
|
+
}), () => s(tt, {
|
|
1662
|
+
ref: n,
|
|
1643
1663
|
id: e.id,
|
|
1644
1664
|
disable: c.value,
|
|
1645
1665
|
readonly: f.value,
|
|
1646
1666
|
forcePlaceholder: e.forcePlaceholder,
|
|
1647
|
-
editable:
|
|
1648
|
-
buttonContent:
|
|
1667
|
+
editable: k.value,
|
|
1668
|
+
buttonContent: d.value,
|
|
1649
1669
|
placeholder: e.placeholder === "请选择" ? Z.getLocaleValue("comboList.placeholder") : e.placeholder,
|
|
1650
1670
|
enableClear: a.value,
|
|
1651
1671
|
maxLength: e.maxLength,
|
|
@@ -1653,57 +1673,57 @@ const q = /* @__PURE__ */ N({
|
|
|
1653
1673
|
enableTitle: e.enableTitle,
|
|
1654
1674
|
multiSelect: e.multiSelect,
|
|
1655
1675
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1656
|
-
modelValue:
|
|
1657
|
-
"onUpdate:modelValue": (h) =>
|
|
1676
|
+
modelValue: y.value,
|
|
1677
|
+
"onUpdate:modelValue": (h) => y.value = h,
|
|
1658
1678
|
focusOnCreated: e.focusOnCreated,
|
|
1659
1679
|
selectOnCreated: e.selectOnCreated,
|
|
1660
|
-
onClear:
|
|
1661
|
-
onClick:
|
|
1662
|
-
onChange:
|
|
1663
|
-
onBlur:
|
|
1664
|
-
onInput:
|
|
1665
|
-
beforeOpen:
|
|
1680
|
+
onClear: I,
|
|
1681
|
+
onClick: T,
|
|
1682
|
+
onChange: x,
|
|
1683
|
+
onBlur: V,
|
|
1684
|
+
onInput: R,
|
|
1685
|
+
beforeOpen: O,
|
|
1666
1686
|
placement: e.placement,
|
|
1667
1687
|
popupMinWidth: e.minPanelWidth,
|
|
1668
1688
|
popupClass: "f-combo-list-wrapper",
|
|
1669
1689
|
popupOnClick: e.popupOnClick,
|
|
1670
1690
|
limitContentBySpace: !0
|
|
1671
1691
|
}, {
|
|
1672
|
-
default: () => [
|
|
1673
|
-
ref:
|
|
1692
|
+
default: () => [s(Yt, {
|
|
1693
|
+
ref: l,
|
|
1674
1694
|
idField: e.idField,
|
|
1675
1695
|
valueField: e.valueField,
|
|
1676
1696
|
textField: e.textField,
|
|
1677
1697
|
titleField: e.titleField,
|
|
1678
|
-
dataSource:
|
|
1679
|
-
selectedValues:
|
|
1698
|
+
dataSource: w.value,
|
|
1699
|
+
selectedValues: b.value,
|
|
1680
1700
|
separator: e.separator,
|
|
1681
1701
|
multiSelect: e.multiSelect,
|
|
1682
|
-
enableSearch:
|
|
1702
|
+
enableSearch: o.value,
|
|
1683
1703
|
maxHeight: e.maxHeight,
|
|
1684
1704
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1685
|
-
width: e.fitEditor ?
|
|
1705
|
+
width: e.fitEditor ? S.value : void 0,
|
|
1686
1706
|
onSelectionChange: (h) => {
|
|
1687
|
-
|
|
1707
|
+
u(h), r();
|
|
1688
1708
|
}
|
|
1689
1709
|
}, null)]
|
|
1690
1710
|
});
|
|
1691
1711
|
}
|
|
1692
1712
|
}), re = {
|
|
1693
1713
|
convertFrom: (e, t) => (e.editor.remote || {})[t],
|
|
1694
|
-
convertTo: (e, t,
|
|
1695
|
-
e.editor.remote = e.editor.remote || {}, e.editor.remote[t] =
|
|
1714
|
+
convertTo: (e, t, l) => {
|
|
1715
|
+
e.editor.remote = e.editor.remote || {}, e.editor.remote[t] = l;
|
|
1696
1716
|
}
|
|
1697
1717
|
};
|
|
1698
1718
|
class Qt extends at {
|
|
1699
|
-
constructor(t,
|
|
1700
|
-
super(t,
|
|
1719
|
+
constructor(t, l) {
|
|
1720
|
+
super(t, l);
|
|
1701
1721
|
}
|
|
1702
1722
|
getCommonEditorProperties(t) {
|
|
1703
|
-
var
|
|
1723
|
+
var l, n, c;
|
|
1704
1724
|
return {
|
|
1705
1725
|
viewType: {
|
|
1706
|
-
visible: !!((
|
|
1726
|
+
visible: !!((l = t.editor) != null && l.multiSelect),
|
|
1707
1727
|
description: "数据展示类型,有标签和文本两种方式",
|
|
1708
1728
|
title: "数据展示类型",
|
|
1709
1729
|
type: "enum",
|
|
@@ -1716,7 +1736,7 @@ class Qt extends at {
|
|
|
1716
1736
|
refreshPanelAfterChanged: !0
|
|
1717
1737
|
},
|
|
1718
1738
|
separator: {
|
|
1719
|
-
visible: !!((
|
|
1739
|
+
visible: !!((n = t.editor) != null && n.multiSelect) && ((c = t.editor) == null ? void 0 : c.viewType) === "text",
|
|
1720
1740
|
description: "下拉列表启用多选且数据展示类型为文本时的分隔符",
|
|
1721
1741
|
title: "分隔符",
|
|
1722
1742
|
type: "enum",
|
|
@@ -1746,14 +1766,14 @@ class Qt extends at {
|
|
|
1746
1766
|
};
|
|
1747
1767
|
}
|
|
1748
1768
|
getEditorProperties(t) {
|
|
1749
|
-
var a,
|
|
1750
|
-
const
|
|
1751
|
-
let
|
|
1769
|
+
var a, o;
|
|
1770
|
+
const l = this;
|
|
1771
|
+
let n = "";
|
|
1752
1772
|
if (((a = t == null ? void 0 : t.binding) == null ? void 0 : a.type) === "Form") {
|
|
1753
1773
|
const f = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1754
|
-
(
|
|
1774
|
+
(o = f == null ? void 0 : f.schemaField) != null && o.type && (n = f.schemaField.type.$type);
|
|
1755
1775
|
}
|
|
1756
|
-
return
|
|
1776
|
+
return l.getComponentConfig(t, { type: "combo-list" }, {
|
|
1757
1777
|
// enableSearch: {
|
|
1758
1778
|
// description: "编辑状态下启用搜索",
|
|
1759
1779
|
// title: "允许编辑",
|
|
@@ -1782,7 +1802,7 @@ class Qt extends at {
|
|
|
1782
1802
|
title: "数据",
|
|
1783
1803
|
type: "array",
|
|
1784
1804
|
visible: !t.editor.dataSourceType || t.editor.dataSourceType === "static",
|
|
1785
|
-
...
|
|
1805
|
+
...l.getItemCollectionEditor(t, t.editor.valueField, t.editor.textField),
|
|
1786
1806
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1787
1807
|
refreshPanelAfterChanged: !0
|
|
1788
1808
|
},
|
|
@@ -1830,7 +1850,7 @@ class Qt extends at {
|
|
|
1830
1850
|
multiSelect: {
|
|
1831
1851
|
description: "",
|
|
1832
1852
|
title: "启用多选",
|
|
1833
|
-
visible: !
|
|
1853
|
+
visible: !n || n === "StringType",
|
|
1834
1854
|
type: "boolean",
|
|
1835
1855
|
refreshPanelAfterChanged: !0
|
|
1836
1856
|
},
|
|
@@ -1846,33 +1866,33 @@ class Qt extends at {
|
|
|
1846
1866
|
}
|
|
1847
1867
|
},
|
|
1848
1868
|
...this.getCommonEditorProperties(t)
|
|
1849
|
-
}, (f,
|
|
1850
|
-
if (!f || !
|
|
1869
|
+
}, (f, w) => {
|
|
1870
|
+
if (!f || !w.editor)
|
|
1851
1871
|
return;
|
|
1852
|
-
const
|
|
1872
|
+
const y = this;
|
|
1853
1873
|
switch (f.propertyID) {
|
|
1854
1874
|
case "dataSourceType": {
|
|
1855
|
-
f.propertyValue === "static" ? (
|
|
1875
|
+
f.propertyValue === "static" ? (w.editor.valueField = "value", w.editor.textField = "name", w.editor.remote = null) : f.propertyValue === "dynamic" && (w.editor.remote = { method: "GET" }, w.editor.valueField = "value", w.editor.textField = "name");
|
|
1856
1876
|
break;
|
|
1857
1877
|
}
|
|
1858
1878
|
case "data": {
|
|
1859
|
-
!
|
|
1879
|
+
!y.checkEnumDataReadonly(w) && w.formatter && (w.formatter.data = [...f.propertyValue]);
|
|
1860
1880
|
break;
|
|
1861
1881
|
}
|
|
1862
1882
|
case "viewType":
|
|
1863
|
-
f.propertyValue === "tag" && (
|
|
1883
|
+
f.propertyValue === "tag" && (w.editor.editable = !1);
|
|
1864
1884
|
}
|
|
1865
1885
|
});
|
|
1866
1886
|
}
|
|
1867
|
-
getGridFieldEdtiorProperties(t,
|
|
1868
|
-
var
|
|
1869
|
-
const
|
|
1887
|
+
getGridFieldEdtiorProperties(t, l) {
|
|
1888
|
+
var o, f, w, y, k, b;
|
|
1889
|
+
const n = this;
|
|
1870
1890
|
let c = "";
|
|
1871
|
-
if (((
|
|
1872
|
-
const
|
|
1873
|
-
(f =
|
|
1891
|
+
if (((o = t == null ? void 0 : t.binding) == null ? void 0 : o.type) === "Form") {
|
|
1892
|
+
const m = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1893
|
+
(f = m == null ? void 0 : m.schemaField) != null && f.type && (c = m.schemaField.type.$type);
|
|
1874
1894
|
}
|
|
1875
|
-
return
|
|
1895
|
+
return n.getComponentConfig(t, { type: "combo-list" }, {
|
|
1876
1896
|
// editable: {
|
|
1877
1897
|
// description: "",
|
|
1878
1898
|
// title: "允许编辑",
|
|
@@ -1884,25 +1904,25 @@ class Qt extends at {
|
|
|
1884
1904
|
title: "启用清空",
|
|
1885
1905
|
type: "boolean"
|
|
1886
1906
|
},
|
|
1887
|
-
dataSourceType: {
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
},
|
|
1907
|
+
// dataSourceType: {
|
|
1908
|
+
// description: "",
|
|
1909
|
+
// title: "数据源类型",
|
|
1910
|
+
// type: "enum",
|
|
1911
|
+
// editor: {
|
|
1912
|
+
// default: "static",
|
|
1913
|
+
// data: [
|
|
1914
|
+
// { id: "static", name: "静态" },
|
|
1915
|
+
// { id: "dynamic", name: "动态" }
|
|
1916
|
+
// ]
|
|
1917
|
+
// },
|
|
1918
|
+
// refreshPanelAfterChanged: true
|
|
1919
|
+
// },
|
|
1900
1920
|
data: {
|
|
1901
1921
|
description: "",
|
|
1902
1922
|
title: "数据",
|
|
1903
1923
|
type: "array",
|
|
1904
|
-
visible: !((
|
|
1905
|
-
...
|
|
1924
|
+
visible: !((w = t.editor) != null && w.dataSourceType) || ((y = t.editor) == null ? void 0 : y.dataSourceType) === "static",
|
|
1925
|
+
...n.getItemCollectionEditor(t, (k = t.editor) == null ? void 0 : k.valueField, (b = t.editor) == null ? void 0 : b.textField),
|
|
1906
1926
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1907
1927
|
refreshPanelAfterChanged: !0
|
|
1908
1928
|
},
|
|
@@ -1937,33 +1957,33 @@ class Qt extends at {
|
|
|
1937
1957
|
}
|
|
1938
1958
|
},
|
|
1939
1959
|
...this.getCommonEditorProperties(t)
|
|
1940
|
-
}, (
|
|
1941
|
-
if (!
|
|
1960
|
+
}, (m, g) => {
|
|
1961
|
+
if (!m || !g.editor)
|
|
1942
1962
|
return;
|
|
1943
|
-
const
|
|
1944
|
-
switch (
|
|
1963
|
+
const O = this;
|
|
1964
|
+
switch (m.propertyID) {
|
|
1945
1965
|
case "dataSourceType": {
|
|
1946
|
-
|
|
1966
|
+
m.propertyValue === "static" ? (g.editor.valueField = "value", g.editor.textField = "name", g.editor.remote = null) : m.propertyValue === "dynamic" && (g.editor.remote = { method: "GET" }, g.editor.valueField = "value", g.editor.textField = "name");
|
|
1947
1967
|
break;
|
|
1948
1968
|
}
|
|
1949
1969
|
case "data": {
|
|
1950
|
-
!
|
|
1970
|
+
!O.checkEnumDataReadonly(g) && g.formatter && (g.formatter.data = [...m.propertyValue]);
|
|
1951
1971
|
break;
|
|
1952
1972
|
}
|
|
1953
1973
|
}
|
|
1954
1974
|
});
|
|
1955
1975
|
}
|
|
1956
|
-
setEditorPropertyRelates(t,
|
|
1957
|
-
if (!t || !
|
|
1976
|
+
setEditorPropertyRelates(t, l, n) {
|
|
1977
|
+
if (!t || !l.editor)
|
|
1958
1978
|
return;
|
|
1959
1979
|
const c = this;
|
|
1960
1980
|
switch (t.propertyID) {
|
|
1961
1981
|
case "dataSourceType": {
|
|
1962
|
-
t.propertyValue === "static" && (
|
|
1982
|
+
t.propertyValue === "static" && (l.editor.valueField = "value", l.editor.textField = "name", l.editor.remote = {});
|
|
1963
1983
|
break;
|
|
1964
1984
|
}
|
|
1965
1985
|
case "data": {
|
|
1966
|
-
!c.checkEnumDataReadonly(
|
|
1986
|
+
!c.checkEnumDataReadonly(l) && l.formatter && (l.formatter.data = [...t.propertyValue]);
|
|
1967
1987
|
break;
|
|
1968
1988
|
}
|
|
1969
1989
|
}
|
|
@@ -1971,10 +1991,10 @@ class Qt extends at {
|
|
|
1971
1991
|
/**
|
|
1972
1992
|
* 切换绑定属性
|
|
1973
1993
|
*/
|
|
1974
|
-
changeBindingField(t,
|
|
1994
|
+
changeBindingField(t, l, n) {
|
|
1975
1995
|
var a;
|
|
1976
|
-
super.changeBindingField(t,
|
|
1977
|
-
const c =
|
|
1996
|
+
super.changeBindingField(t, l);
|
|
1997
|
+
const c = n;
|
|
1978
1998
|
t.editor && ((a = c == null ? void 0 : c.type) == null ? void 0 : a.$type) === Le.EnumType && (t.editor.data = c.type.enumValues || []);
|
|
1979
1999
|
}
|
|
1980
2000
|
/**
|
|
@@ -1984,58 +2004,58 @@ class Qt extends at {
|
|
|
1984
2004
|
* @param showPosition 面板展示位置
|
|
1985
2005
|
* @param customEvent 输入控件特有的事件配置
|
|
1986
2006
|
*/
|
|
1987
|
-
getEventPropertyConfig(t,
|
|
2007
|
+
getEventPropertyConfig(t, l = "card", n, c) {
|
|
1988
2008
|
const a = this;
|
|
1989
|
-
let
|
|
2009
|
+
let o = [
|
|
1990
2010
|
{
|
|
1991
2011
|
label: "onChange",
|
|
1992
2012
|
name: "值变化事件"
|
|
1993
2013
|
},
|
|
1994
|
-
{
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
},
|
|
2014
|
+
// {
|
|
2015
|
+
// label: 'onClear',
|
|
2016
|
+
// name: '清空事件'
|
|
2017
|
+
// },
|
|
1998
2018
|
{
|
|
1999
2019
|
label: "beforeOpen",
|
|
2000
|
-
name: "
|
|
2020
|
+
name: "下拉面板前事件"
|
|
2001
2021
|
}
|
|
2002
2022
|
];
|
|
2003
|
-
|
|
2004
|
-
const f = a.eventsEditorUtils.formProperties(t, a.viewModelId,
|
|
2023
|
+
n && (o = o.concat(n)), this.appendFieldValueChangeEvents(t, o);
|
|
2024
|
+
const f = a.eventsEditorUtils.formProperties(t, a.viewModelId, o);
|
|
2005
2025
|
return {
|
|
2006
2026
|
title: "事件",
|
|
2007
2027
|
hideTitle: !0,
|
|
2008
2028
|
properties: a.createBaseEventProperty(f),
|
|
2009
2029
|
tabId: "commands",
|
|
2010
2030
|
tabName: "交互",
|
|
2011
|
-
setPropertyRelates(
|
|
2012
|
-
const
|
|
2013
|
-
delete t[a.viewModelId],
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2031
|
+
setPropertyRelates(k, b) {
|
|
2032
|
+
const m = k.propertyValue;
|
|
2033
|
+
delete t[a.viewModelId], m && (m.setPropertyRelates = this.setPropertyRelates, a.eventsEditorUtils.saveRelatedParameters(t, a.viewModelId, m.events, m)), c && c(k, b, m);
|
|
2034
|
+
const g = a.designViewModelUtils.getDgViewModel(a.viewModelId);
|
|
2035
|
+
g && a.designViewModelField && g.changeField(a.designViewModelField.id, { valueChanging: t.fieldValueChanging, valueChanged: t.fieldValueChanged }), t.editor.beforeOpen !== t.beforeOpen && (t.editor.beforeOpen = t.beforeOpen), t.editor.onChange !== t.onChange && (t.editor.onChange = t.onChange), t.editor.onClear !== t.onClear && (t.editor.onClear = t.onClear);
|
|
2016
2036
|
}
|
|
2017
2037
|
};
|
|
2018
2038
|
}
|
|
2019
2039
|
}
|
|
2020
2040
|
function Zt(e, t) {
|
|
2021
|
-
const
|
|
2022
|
-
function
|
|
2023
|
-
return new Qt(c, t).getPropertyConfig(
|
|
2041
|
+
const l = e.schema;
|
|
2042
|
+
function n(c, a) {
|
|
2043
|
+
return new Qt(c, t).getPropertyConfig(l, a);
|
|
2024
2044
|
}
|
|
2025
2045
|
return {
|
|
2026
|
-
getPropsConfig:
|
|
2046
|
+
getPropsConfig: n
|
|
2027
2047
|
};
|
|
2028
2048
|
}
|
|
2029
2049
|
const en = /* @__PURE__ */ N({
|
|
2030
2050
|
name: "FComboListDesign",
|
|
2031
|
-
props:
|
|
2051
|
+
props: qt,
|
|
2032
2052
|
emits: ["clear", "update:modelValue", "change"],
|
|
2033
2053
|
setup(e, t) {
|
|
2034
|
-
const
|
|
2054
|
+
const l = v(), n = Y("designer-host-service"), c = Y("design-item-context"), a = Zt(c, n), o = ce(l, c, a);
|
|
2035
2055
|
return Q(() => {
|
|
2036
|
-
|
|
2037
|
-
}), t.expose(
|
|
2038
|
-
ref:
|
|
2056
|
+
l.value.componentInstance = o;
|
|
2057
|
+
}), t.expose(o.value), () => s(it, {
|
|
2058
|
+
ref: l,
|
|
2039
2059
|
buttonContent: e.dropDownIcon,
|
|
2040
2060
|
readonly: !0,
|
|
2041
2061
|
editable: !1,
|
|
@@ -2045,232 +2065,232 @@ const en = /* @__PURE__ */ N({
|
|
|
2045
2065
|
}, null);
|
|
2046
2066
|
}
|
|
2047
2067
|
});
|
|
2048
|
-
|
|
2049
|
-
e["combo-list"] =
|
|
2068
|
+
W.register = (e, t, l, n) => {
|
|
2069
|
+
e["combo-list"] = W, t["combo-list"] = ve, n["combo-list"] = { callbackResolver: Kt };
|
|
2050
2070
|
};
|
|
2051
|
-
|
|
2071
|
+
W.registerDesigner = (e, t, l) => {
|
|
2052
2072
|
e["combo-list"] = en, t["combo-list"] = ve;
|
|
2053
2073
|
};
|
|
2054
|
-
const
|
|
2074
|
+
const q = He(W), X = /* @__PURE__ */ N({
|
|
2055
2075
|
name: "FOrder",
|
|
2056
2076
|
props: te,
|
|
2057
2077
|
emits: ["change"],
|
|
2058
2078
|
setup(e, t) {
|
|
2059
|
-
const
|
|
2079
|
+
const l = v(), n = v(e.items);
|
|
2060
2080
|
function c() {
|
|
2061
2081
|
var u;
|
|
2062
|
-
const
|
|
2063
|
-
|
|
2082
|
+
const r = Array.isArray(e.items) ? e.items : [];
|
|
2083
|
+
n.value = [...r], (u = l.value) == null || u.updateDataSource(n.value);
|
|
2064
2084
|
}
|
|
2065
2085
|
E(() => e.items, c);
|
|
2066
|
-
const a =
|
|
2086
|
+
const a = v("排序列"), o = v("排序方式"), f = v("添加排序列"), w = [{
|
|
2067
2087
|
id: "asc",
|
|
2068
2088
|
name: "升序"
|
|
2069
2089
|
}, {
|
|
2070
2090
|
id: "desc",
|
|
2071
2091
|
name: "降序"
|
|
2072
|
-
}],
|
|
2073
|
-
function
|
|
2074
|
-
const
|
|
2075
|
-
|
|
2092
|
+
}], y = v(/* @__PURE__ */ new Map());
|
|
2093
|
+
function k() {
|
|
2094
|
+
const r = n.value.map((u) => [u.id, !0]);
|
|
2095
|
+
y.value = new Map(r);
|
|
2076
2096
|
}
|
|
2077
|
-
|
|
2078
|
-
const
|
|
2097
|
+
k();
|
|
2098
|
+
const b = P(() => e.dataSource.map((r) => (r.disabled = y.value.has(r.id), r))), m = P(() => ({
|
|
2079
2099
|
"f-order": !0
|
|
2080
2100
|
}));
|
|
2081
|
-
function
|
|
2082
|
-
|
|
2101
|
+
function g(r) {
|
|
2102
|
+
n.value = n.value.filter((u) => u.id !== r.id), k(), t.emit("change", n.value);
|
|
2083
2103
|
}
|
|
2084
|
-
function
|
|
2085
|
-
|
|
2104
|
+
function O() {
|
|
2105
|
+
n.value = [...n.value, {
|
|
2086
2106
|
id: Date.now().toString(),
|
|
2087
2107
|
name: "",
|
|
2088
2108
|
order: "asc"
|
|
2089
|
-
}],
|
|
2109
|
+
}], k(), t.emit("change", n.value);
|
|
2090
2110
|
}
|
|
2091
|
-
function
|
|
2092
|
-
if (
|
|
2093
|
-
const u =
|
|
2111
|
+
function d(r) {
|
|
2112
|
+
if (r && r.length === 1) {
|
|
2113
|
+
const u = r[0], V = n.value.find((T) => T.id === u.id);
|
|
2094
2114
|
V && (V.name = u.name);
|
|
2095
2115
|
}
|
|
2096
|
-
|
|
2116
|
+
k(), t.emit("change", n.value);
|
|
2097
2117
|
}
|
|
2098
|
-
function
|
|
2099
|
-
if (
|
|
2118
|
+
function i(r) {
|
|
2119
|
+
if (r && r.length) {
|
|
2100
2120
|
const u = /* @__PURE__ */ new Map();
|
|
2101
|
-
|
|
2121
|
+
r.reduce((V, T) => (V.set(T.id, T), V), u), n.value = r.map((V) => u.get(V.id)), t.emit("change", n.value);
|
|
2102
2122
|
}
|
|
2103
2123
|
}
|
|
2104
|
-
function
|
|
2105
|
-
return
|
|
2106
|
-
ref:
|
|
2124
|
+
function S() {
|
|
2125
|
+
return s(fe, {
|
|
2126
|
+
ref: l,
|
|
2107
2127
|
style: "flex:1",
|
|
2108
|
-
data:
|
|
2128
|
+
data: n.value,
|
|
2109
2129
|
draggable: !0,
|
|
2110
2130
|
view: "DraggableView",
|
|
2111
2131
|
"keep-order": !0,
|
|
2112
2132
|
itemClass: "f-order-item",
|
|
2113
|
-
onRemoveItem:
|
|
2114
|
-
onChange:
|
|
2133
|
+
onRemoveItem: g,
|
|
2134
|
+
onChange: i
|
|
2115
2135
|
}, {
|
|
2116
|
-
header: () =>
|
|
2136
|
+
header: () => s("div", {
|
|
2117
2137
|
class: "f-order-header"
|
|
2118
|
-
}, [
|
|
2138
|
+
}, [s("span", {
|
|
2119
2139
|
class: "f-order-header-order-field"
|
|
2120
|
-
}, [a.value]),
|
|
2140
|
+
}, [a.value]), s("span", {
|
|
2121
2141
|
class: "f-order-header-order-type"
|
|
2122
|
-
}, [
|
|
2123
|
-
itemContent: (
|
|
2142
|
+
}, [o.value])]),
|
|
2143
|
+
itemContent: (r) => s("div", {
|
|
2124
2144
|
class: "f-order-item-content"
|
|
2125
|
-
}, [
|
|
2145
|
+
}, [s(q, {
|
|
2126
2146
|
class: "f-order-item-content-order-field",
|
|
2127
|
-
data:
|
|
2147
|
+
data: b.value,
|
|
2128
2148
|
valueField: "id",
|
|
2129
2149
|
textField: "name",
|
|
2130
2150
|
idField: "id",
|
|
2131
|
-
modelValue:
|
|
2132
|
-
"onUpdate:modelValue": (u) =>
|
|
2133
|
-
onChange:
|
|
2134
|
-
onClear:
|
|
2135
|
-
}, null),
|
|
2151
|
+
modelValue: r.raw.id,
|
|
2152
|
+
"onUpdate:modelValue": (u) => r.raw.id = u,
|
|
2153
|
+
onChange: d,
|
|
2154
|
+
onClear: d
|
|
2155
|
+
}, null), s(q, {
|
|
2136
2156
|
class: "f-order-item-content-order-type",
|
|
2137
|
-
data:
|
|
2157
|
+
data: w,
|
|
2138
2158
|
valueField: "id",
|
|
2139
2159
|
textField: "name",
|
|
2140
2160
|
idField: "id",
|
|
2141
|
-
modelValue:
|
|
2142
|
-
"onUpdate:modelValue": (u) =>
|
|
2143
|
-
onChange:
|
|
2161
|
+
modelValue: r.raw.order,
|
|
2162
|
+
"onUpdate:modelValue": (u) => r.raw.order = u,
|
|
2163
|
+
onChange: d
|
|
2144
2164
|
}, null)]),
|
|
2145
|
-
footer: () =>
|
|
2165
|
+
footer: () => s("div", {
|
|
2146
2166
|
class: "f-order-footer"
|
|
2147
|
-
}, [
|
|
2167
|
+
}, [s(me, {
|
|
2148
2168
|
type: "link",
|
|
2149
2169
|
class: "f-order-add-button",
|
|
2150
|
-
onClick:
|
|
2170
|
+
onClick: O
|
|
2151
2171
|
}, {
|
|
2152
|
-
default: () =>
|
|
2172
|
+
default: () => s(U, null, [s("span", {
|
|
2153
2173
|
class: "f-order-add-icon"
|
|
2154
|
-
}, [
|
|
2174
|
+
}, [s("i", {
|
|
2155
2175
|
class: "f-icon f-icon-add"
|
|
2156
2176
|
}, null)]), f.value])
|
|
2157
2177
|
})])
|
|
2158
2178
|
});
|
|
2159
2179
|
}
|
|
2160
|
-
return () =>
|
|
2161
|
-
class:
|
|
2162
|
-
}, [
|
|
2180
|
+
return () => s("div", {
|
|
2181
|
+
class: m.value
|
|
2182
|
+
}, [S()]);
|
|
2163
2183
|
}
|
|
2164
2184
|
}), tn = /* @__PURE__ */ N({
|
|
2165
2185
|
name: "FOrderDesign",
|
|
2166
2186
|
props: te,
|
|
2167
2187
|
emits: ["change"],
|
|
2168
2188
|
setup(e, t) {
|
|
2169
|
-
const
|
|
2189
|
+
const l = v(e.items), n = v("排序列"), c = v("排序方式"), a = v("添加排序列"), o = [{
|
|
2170
2190
|
id: "asc",
|
|
2171
2191
|
name: "升序"
|
|
2172
2192
|
}, {
|
|
2173
2193
|
id: "desc",
|
|
2174
2194
|
name: "降序"
|
|
2175
|
-
}], f =
|
|
2195
|
+
}], f = v(/* @__PURE__ */ new Map()), w = v(), y = Y("design-item-context"), k = ce(w, y);
|
|
2176
2196
|
Q(() => {
|
|
2177
|
-
|
|
2178
|
-
}), t.expose(
|
|
2179
|
-
function
|
|
2180
|
-
const u =
|
|
2197
|
+
w.value.componentInstance = k;
|
|
2198
|
+
}), t.expose(k.value);
|
|
2199
|
+
function b() {
|
|
2200
|
+
const u = l.value.map((V) => [V.id, !0]);
|
|
2181
2201
|
f.value = new Map(u);
|
|
2182
2202
|
}
|
|
2183
|
-
|
|
2184
|
-
const
|
|
2203
|
+
b();
|
|
2204
|
+
const m = P(() => e.dataSource.map((u) => (u.disabled = f.value.has(u.id), u))), g = P(() => ({
|
|
2185
2205
|
"f-order": !0
|
|
2186
2206
|
}));
|
|
2187
|
-
function
|
|
2188
|
-
|
|
2207
|
+
function O(u) {
|
|
2208
|
+
l.value = l.value.filter((V) => V.id !== u.id), b(), t.emit("change", l.value);
|
|
2189
2209
|
}
|
|
2190
|
-
function
|
|
2191
|
-
|
|
2210
|
+
function d() {
|
|
2211
|
+
l.value = [...l.value, {
|
|
2192
2212
|
id: Date.now().toString(),
|
|
2193
2213
|
name: "",
|
|
2194
2214
|
order: "asc"
|
|
2195
|
-
}],
|
|
2215
|
+
}], b(), t.emit("change", l.value);
|
|
2196
2216
|
}
|
|
2197
|
-
function
|
|
2198
|
-
|
|
2217
|
+
function i(u) {
|
|
2218
|
+
b(), t.emit("change", l.value);
|
|
2199
2219
|
}
|
|
2200
|
-
function
|
|
2220
|
+
function S(u) {
|
|
2201
2221
|
if (u && u.length) {
|
|
2202
2222
|
const V = /* @__PURE__ */ new Map();
|
|
2203
|
-
u.reduce((
|
|
2223
|
+
u.reduce((T, I) => (T.set(I.id, I), T), V), l.value = u.map((T) => V.get(T.id)), t.emit("change", l.value);
|
|
2204
2224
|
}
|
|
2205
2225
|
}
|
|
2206
|
-
function
|
|
2207
|
-
return
|
|
2226
|
+
function r() {
|
|
2227
|
+
return s(fe, {
|
|
2208
2228
|
style: "flex:1",
|
|
2209
|
-
data:
|
|
2229
|
+
data: l.value,
|
|
2210
2230
|
draggable: !0,
|
|
2211
2231
|
view: "DraggableView",
|
|
2212
2232
|
"keep-order": !0,
|
|
2213
2233
|
itemClass: "f-order-item",
|
|
2214
|
-
onRemoveItem:
|
|
2215
|
-
onChange:
|
|
2234
|
+
onRemoveItem: O,
|
|
2235
|
+
onChange: S
|
|
2216
2236
|
}, {
|
|
2217
|
-
header: () =>
|
|
2237
|
+
header: () => s("div", {
|
|
2218
2238
|
class: "f-order-header"
|
|
2219
|
-
}, [
|
|
2239
|
+
}, [s("span", {
|
|
2220
2240
|
class: "f-order-header-order-field"
|
|
2221
|
-
}, [
|
|
2241
|
+
}, [n.value]), s("span", {
|
|
2222
2242
|
class: "f-order-header-order-type"
|
|
2223
2243
|
}, [c.value])]),
|
|
2224
|
-
itemContent: (u) =>
|
|
2244
|
+
itemContent: (u) => s("div", {
|
|
2225
2245
|
class: "f-order-item-content"
|
|
2226
|
-
}, [
|
|
2246
|
+
}, [s(q, {
|
|
2227
2247
|
class: "f-order-item-content-order-field",
|
|
2228
|
-
data:
|
|
2248
|
+
data: m.value,
|
|
2229
2249
|
valueField: "id",
|
|
2230
2250
|
textField: "name",
|
|
2231
2251
|
idField: "id",
|
|
2232
2252
|
modelValue: u.id,
|
|
2233
2253
|
"onUpdate:modelValue": (V) => u.id = V,
|
|
2234
|
-
onChange:
|
|
2235
|
-
onClear:
|
|
2236
|
-
}, null),
|
|
2254
|
+
onChange: i,
|
|
2255
|
+
onClear: i
|
|
2256
|
+
}, null), s(q, {
|
|
2237
2257
|
class: "f-order-item-content-order-type",
|
|
2238
|
-
data:
|
|
2258
|
+
data: o,
|
|
2239
2259
|
valueField: "id",
|
|
2240
2260
|
textField: "name",
|
|
2241
2261
|
idField: "id",
|
|
2242
2262
|
modelValue: u.order,
|
|
2243
2263
|
"onUpdate:modelValue": (V) => u.order = V,
|
|
2244
|
-
onChange:
|
|
2264
|
+
onChange: i
|
|
2245
2265
|
}, null)]),
|
|
2246
|
-
footer: () =>
|
|
2266
|
+
footer: () => s("div", {
|
|
2247
2267
|
class: "f-order-footer"
|
|
2248
|
-
}, [
|
|
2268
|
+
}, [s(me, {
|
|
2249
2269
|
type: "link",
|
|
2250
2270
|
class: "f-order-add-button",
|
|
2251
|
-
onClick:
|
|
2271
|
+
onClick: d
|
|
2252
2272
|
}, {
|
|
2253
|
-
default: () =>
|
|
2273
|
+
default: () => s(U, null, [s("span", {
|
|
2254
2274
|
class: "f-order-add-icon"
|
|
2255
|
-
}, [
|
|
2275
|
+
}, [s("i", {
|
|
2256
2276
|
class: "f-icon f-icon-add"
|
|
2257
2277
|
}, null)]), a.value])
|
|
2258
2278
|
})])
|
|
2259
2279
|
});
|
|
2260
2280
|
}
|
|
2261
|
-
return () =>
|
|
2262
|
-
ref:
|
|
2263
|
-
class:
|
|
2264
|
-
}, [
|
|
2281
|
+
return () => s("div", {
|
|
2282
|
+
ref: w,
|
|
2283
|
+
class: g.value
|
|
2284
|
+
}, [r()]);
|
|
2265
2285
|
}
|
|
2266
2286
|
}), Cn = {
|
|
2267
2287
|
install(e) {
|
|
2268
2288
|
e.component(X.name, X);
|
|
2269
2289
|
},
|
|
2270
|
-
register(e, t,
|
|
2290
|
+
register(e, t, l, n) {
|
|
2271
2291
|
e.order = X, t.order = ae;
|
|
2272
2292
|
},
|
|
2273
|
-
registerDesigner(e, t,
|
|
2293
|
+
registerDesigner(e, t, l) {
|
|
2274
2294
|
e.order = tn, t.order = ae;
|
|
2275
2295
|
}
|
|
2276
2296
|
};
|