@farris/ui-vue 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/common/index.esm.js +2 -2
- package/components/common/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +137 -135
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +2316 -2299
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +1929 -1920
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1 -1
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/style.css +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +836 -790
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +382 -378
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +1167 -1150
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +131 -127
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +1 -1
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/style.css +1 -1
- package/components/list-view/index.esm.js +128 -124
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +2156 -2139
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +3137 -3120
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/order/index.esm.js +859 -815
- package/components/order/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +75 -73
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +63 -61
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2002 -1956
- package/components/schema-selector/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +165 -192
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2 -2
- package/components/tabs/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +95 -93
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2316 -2299
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +296 -295
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +2517 -2483
- package/farris.all.umd.cjs +7 -7
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/condition/index.d.ts +60 -1
- package/types/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +3 -3
- package/types/list-view/src/composition/types.d.ts +1 -1
- package/types/message-box/index.d.ts +84 -1
- package/types/notify/index.d.ts +84 -1
- package/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var $ = (e, t, n) =>
|
|
4
|
-
import { ref as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { useIdentify as
|
|
1
|
+
var Ce = Object.defineProperty;
|
|
2
|
+
var Se = (e, t, n) => t in e ? Ce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var $ = (e, t, n) => Se(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as b, computed as O, createVNode as h, Fragment as Q, watch as N, withModifiers as we, withDirectives as Fe, vModelText as Te, defineComponent as H, inject as q, onMounted as ie, nextTick as ke } from "vue";
|
|
5
|
+
import { cloneDeep as Me } from "lodash-es";
|
|
6
|
+
import { useIdentify as Ve, useHierarchy as De, useGroupData as je, usePagination as Ie, useDataView as Pe, useSelection as Be, useEdit as Oe, useVisualDataBound as Ae, useVisualDataCell as xe, useVisualDataRow as Le, useVisualGroupRow as $e, useVisualSummaryRow as Ee, useVisualData as Ne } from "@farris/ui-vue/components/data-view";
|
|
7
7
|
import { FCheckBox as X } from "@farris/ui-vue/components/checkbox";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useDesignerComponent as
|
|
11
|
-
const
|
|
8
|
+
import He from "@farris/ui-vue/components/list-view";
|
|
9
|
+
import le from "@farris/ui-vue/components/button-edit";
|
|
10
|
+
import { useDesignerComponent as Re } from "@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-component";
|
|
11
|
+
const se = {}, ce = {};
|
|
12
12
|
function Y(e) {
|
|
13
|
-
const { properties: t, title: n } = e, o = Object.keys(t).reduce((c, s) => (c[s] = t[s].type === "object" && t[s].properties ? Y(t[s]) :
|
|
13
|
+
const { properties: t, title: n } = e, o = Object.keys(t).reduce((c, s) => (c[s] = t[s].type === "object" && t[s].properties ? Y(t[s]) : Me(t[s].default), c), {});
|
|
14
14
|
return o.id = `${n}-${Date.now()}`, o;
|
|
15
15
|
}
|
|
16
16
|
function R(e, t = {}) {
|
|
17
|
-
const n =
|
|
17
|
+
const n = se[e];
|
|
18
18
|
if (n) {
|
|
19
19
|
let o = Y(n);
|
|
20
|
-
const c =
|
|
20
|
+
const c = ce[e];
|
|
21
21
|
return o = c ? c({ getSchemaByType: R }, o, t) : o, o;
|
|
22
22
|
}
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ue(e, t) {
|
|
26
26
|
const n = Y(t);
|
|
27
27
|
return Object.keys(e).reduce((o, c) => (o[c] = e[c], o), n), n;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function ze(e, t) {
|
|
30
30
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, c) => {
|
|
31
31
|
if (t.has(c)) {
|
|
32
32
|
const s = t.get(c);
|
|
@@ -41,65 +41,65 @@ function Ee(e, t) {
|
|
|
41
41
|
return o;
|
|
42
42
|
}, {});
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const o =
|
|
46
|
-
return
|
|
44
|
+
function Ge(e, t, n = /* @__PURE__ */ new Map()) {
|
|
45
|
+
const o = Ue(e, t);
|
|
46
|
+
return ze(o, n);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
function t(
|
|
48
|
+
function _e(e = {}) {
|
|
49
|
+
function t(f, y, a, r) {
|
|
50
50
|
if (typeof a == "number")
|
|
51
|
-
return
|
|
51
|
+
return r[f].length === a;
|
|
52
52
|
if (typeof a == "object") {
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
56
|
-
if (
|
|
57
|
-
return Number(
|
|
58
|
-
if (
|
|
59
|
-
return Number(
|
|
53
|
+
const w = Object.keys(a)[0], l = a[w];
|
|
54
|
+
if (w === "not")
|
|
55
|
+
return Number(r[f].length) !== Number(l);
|
|
56
|
+
if (w === "moreThan")
|
|
57
|
+
return Number(r[f].length) >= Number(l);
|
|
58
|
+
if (w === "lessThan")
|
|
59
|
+
return Number(r[f].length) <= Number(l);
|
|
60
60
|
}
|
|
61
61
|
return !1;
|
|
62
62
|
}
|
|
63
|
-
function n(
|
|
64
|
-
return
|
|
63
|
+
function n(f, y, a, r) {
|
|
64
|
+
return r[f] && r[f].propertyValue && String(r[f].propertyValue.value) === String(a);
|
|
65
65
|
}
|
|
66
66
|
const o = /* @__PURE__ */ new Map([
|
|
67
67
|
["length", t],
|
|
68
68
|
["getProperty", n]
|
|
69
69
|
]);
|
|
70
|
-
Object.keys(e).reduce((
|
|
71
|
-
function c(
|
|
72
|
-
const a =
|
|
73
|
-
return typeof
|
|
74
|
-
if (
|
|
75
|
-
return { target: a, operator: "length", param: null, value:
|
|
76
|
-
const
|
|
77
|
-
return { target: a, operator: "getProperty", param:
|
|
70
|
+
Object.keys(e).reduce((f, y) => (f.set(y, e[y]), f), o);
|
|
71
|
+
function c(f, y) {
|
|
72
|
+
const a = f;
|
|
73
|
+
return typeof y == "number" ? [{ target: a, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: a, operator: "getProperty", param: f, value: !!y }] : typeof y == "object" ? Object.keys(y).map((r) => {
|
|
74
|
+
if (r === "length")
|
|
75
|
+
return { target: a, operator: "length", param: null, value: y[r] };
|
|
76
|
+
const w = r, l = y[r];
|
|
77
|
+
return { target: a, operator: "getProperty", param: w, value: l };
|
|
78
78
|
}) : [];
|
|
79
79
|
}
|
|
80
|
-
function s(
|
|
81
|
-
return Object.keys(
|
|
82
|
-
const
|
|
83
|
-
return a.push(...
|
|
80
|
+
function s(f) {
|
|
81
|
+
return Object.keys(f).reduce((a, r) => {
|
|
82
|
+
const w = c(r, f[r]);
|
|
83
|
+
return a.push(...w), a;
|
|
84
84
|
}, []);
|
|
85
85
|
}
|
|
86
|
-
function d(
|
|
87
|
-
if (o.has(
|
|
88
|
-
const a = o.get(
|
|
89
|
-
return a && a(
|
|
86
|
+
function d(f, y) {
|
|
87
|
+
if (o.has(f.operator)) {
|
|
88
|
+
const a = o.get(f.operator);
|
|
89
|
+
return a && a(f.target, f.param, f.value, y) || !1;
|
|
90
90
|
}
|
|
91
91
|
return !1;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return s(
|
|
93
|
+
function m(f, y) {
|
|
94
|
+
return s(f).reduce((w, l) => w && d(l, y), !0);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
const a = Object.keys(
|
|
98
|
-
return
|
|
96
|
+
function S(f, y) {
|
|
97
|
+
const a = Object.keys(f), r = a.includes("allOf"), w = a.includes("anyOf"), l = r || w, u = (l ? f[l ? r ? "allOf" : "anyOf" : "allOf"] : [f]).map((T) => m(T, y));
|
|
98
|
+
return r ? !u.includes(!1) : u.includes(!0);
|
|
99
99
|
}
|
|
100
|
-
return { parseValueSchema:
|
|
100
|
+
return { parseValueSchema: S };
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const M = {
|
|
103
103
|
Button: { type: "Button", name: "按钮", icon: "Button" },
|
|
104
104
|
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
105
105
|
ToolBar: { type: "ToolBar", name: "工具栏", icon: "ButtonGroup" },
|
|
@@ -210,20 +210,20 @@ const k = {
|
|
|
210
210
|
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
211
211
|
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
212
212
|
/** 审批类 end */
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
function Z(e, t, n = /* @__PURE__ */ new Map(), o = (d,
|
|
216
|
-
return
|
|
217
|
-
const
|
|
218
|
-
return Object.assign(
|
|
213
|
+
}, We = {}, qe = {};
|
|
214
|
+
_e();
|
|
215
|
+
function Z(e, t, n = /* @__PURE__ */ new Map(), o = (d, m, S) => m, c = {}, s = (d) => d) {
|
|
216
|
+
return se[t.title] = t, ce[t.title] = o, We[t.title] = c, qe[t.title] = s, (d = {}) => {
|
|
217
|
+
const m = Ge(d, t, n), S = Object.keys(e).reduce((f, y) => (f[y] = e[y].default, f), {});
|
|
218
|
+
return Object.assign(S, m);
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
function J(e, t) {
|
|
222
222
|
return { customClass: t.class, customStyle: t.style };
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const Qe = /* @__PURE__ */ new Map([
|
|
225
225
|
["appearance", J]
|
|
226
|
-
]),
|
|
226
|
+
]), Xe = "https://json-schema.org/draft/2020-12/schema", Ye = "https://farris-design.gitee.io/order.schema.json", Ze = "order", Je = "A Farris Component", Ke = "object", et = {
|
|
227
227
|
id: {
|
|
228
228
|
description: "The unique identifier for a order",
|
|
229
229
|
type: "string"
|
|
@@ -315,22 +315,22 @@ const ze = /* @__PURE__ */ new Map([
|
|
|
315
315
|
type: "sting",
|
|
316
316
|
default: ""
|
|
317
317
|
}
|
|
318
|
-
},
|
|
318
|
+
}, tt = [
|
|
319
319
|
"id",
|
|
320
320
|
"type"
|
|
321
|
-
],
|
|
322
|
-
$schema:
|
|
323
|
-
$id:
|
|
324
|
-
title:
|
|
325
|
-
description:
|
|
326
|
-
type:
|
|
327
|
-
properties:
|
|
328
|
-
required:
|
|
321
|
+
], nt = {
|
|
322
|
+
$schema: Xe,
|
|
323
|
+
$id: Ye,
|
|
324
|
+
title: Ze,
|
|
325
|
+
description: Je,
|
|
326
|
+
type: Ke,
|
|
327
|
+
properties: et,
|
|
328
|
+
required: tt
|
|
329
329
|
};
|
|
330
|
-
function
|
|
330
|
+
function ot(e, t, n) {
|
|
331
331
|
return t;
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const at = "order", rt = "A Farris Component", it = "object", lt = {
|
|
334
334
|
basic: {
|
|
335
335
|
description: "Basic Infomation",
|
|
336
336
|
title: "基本信息",
|
|
@@ -412,11 +412,11 @@ const Ke = "order", et = "A Farris Component", tt = "object", nt = {
|
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
},
|
|
416
|
-
title:
|
|
417
|
-
description:
|
|
418
|
-
type:
|
|
419
|
-
categories:
|
|
415
|
+
}, st = {
|
|
416
|
+
title: at,
|
|
417
|
+
description: rt,
|
|
418
|
+
type: it,
|
|
419
|
+
categories: lt
|
|
420
420
|
}, K = {
|
|
421
421
|
dataSource: {
|
|
422
422
|
type: Array,
|
|
@@ -436,13 +436,13 @@ const Ke = "order", et = "A Farris Component", tt = "object", nt = {
|
|
|
436
436
|
{ id: "3", name: "开票日期", order: "asc" }
|
|
437
437
|
]
|
|
438
438
|
}
|
|
439
|
-
},
|
|
439
|
+
}, oe = Z(K, nt, Qe, ot, st), ct = /* @__PURE__ */ new Map([
|
|
440
440
|
["appearance", J]
|
|
441
441
|
]);
|
|
442
|
-
function
|
|
442
|
+
function ut(e, t, n) {
|
|
443
443
|
return t;
|
|
444
444
|
}
|
|
445
|
-
const
|
|
445
|
+
const dt = "https://json-schema.org/draft/2020-12/schema", pt = "https://farris-design.gitee.io/list-view.schema.json", ft = "list-view", mt = "A Farris Component", yt = "object", gt = {
|
|
446
446
|
id: {
|
|
447
447
|
description: "The unique identifier for list-view",
|
|
448
448
|
type: "string"
|
|
@@ -504,18 +504,18 @@ const rt = "https://json-schema.org/draft/2020-12/schema", lt = "https://farris-
|
|
|
504
504
|
type: "boolean",
|
|
505
505
|
default: !0
|
|
506
506
|
}
|
|
507
|
-
},
|
|
507
|
+
}, ht = [
|
|
508
508
|
"id",
|
|
509
509
|
"type"
|
|
510
|
-
],
|
|
511
|
-
$schema:
|
|
512
|
-
$id:
|
|
513
|
-
title:
|
|
514
|
-
description:
|
|
515
|
-
type:
|
|
516
|
-
properties:
|
|
517
|
-
required:
|
|
518
|
-
},
|
|
510
|
+
], vt = {
|
|
511
|
+
$schema: dt,
|
|
512
|
+
$id: pt,
|
|
513
|
+
title: ft,
|
|
514
|
+
description: mt,
|
|
515
|
+
type: yt,
|
|
516
|
+
properties: gt,
|
|
517
|
+
required: ht
|
|
518
|
+
}, bt = "list-view", Ct = "A Farris Component", St = "object", wt = {
|
|
519
519
|
basic: {
|
|
520
520
|
description: "Basic Infomation",
|
|
521
521
|
title: "基本信息",
|
|
@@ -537,12 +537,12 @@ const rt = "https://json-schema.org/draft/2020-12/schema", lt = "https://farris-
|
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
-
},
|
|
541
|
-
title:
|
|
542
|
-
description:
|
|
543
|
-
type:
|
|
544
|
-
categories:
|
|
545
|
-
},
|
|
540
|
+
}, Ft = {
|
|
541
|
+
title: bt,
|
|
542
|
+
description: Ct,
|
|
543
|
+
type: St,
|
|
544
|
+
categories: wt
|
|
545
|
+
}, ue = {
|
|
546
546
|
/** 列集合 */
|
|
547
547
|
columns: {
|
|
548
548
|
type: Array,
|
|
@@ -582,243 +582,245 @@ const rt = "https://json-schema.org/draft/2020-12/schema", lt = "https://farris-
|
|
|
582
582
|
keepOrder: { type: Boolean, default: !1 },
|
|
583
583
|
disableField: { type: String, default: "disabled" }
|
|
584
584
|
};
|
|
585
|
-
Z(
|
|
586
|
-
function
|
|
585
|
+
Z(ue, vt, ct, ut, Ft);
|
|
586
|
+
function Tt(e, t) {
|
|
587
587
|
function n(s) {
|
|
588
588
|
const d = [];
|
|
589
|
-
let
|
|
590
|
-
for (;
|
|
591
|
-
d.push(
|
|
589
|
+
let m = s.nextNode();
|
|
590
|
+
for (; m; )
|
|
591
|
+
d.push(m), m = s.nextNode();
|
|
592
592
|
return d;
|
|
593
593
|
}
|
|
594
594
|
function o(s, d) {
|
|
595
|
-
const
|
|
596
|
-
return n(
|
|
597
|
-
const
|
|
595
|
+
const m = document.createTreeWalker(s, NodeFilter.SHOW_TEXT);
|
|
596
|
+
return n(m).map((a) => ({ textNode: a, text: (a.textContent || "").toLocaleLowerCase() })).map(({ textNode: a, text: r }) => {
|
|
597
|
+
const w = [];
|
|
598
598
|
let l = 0;
|
|
599
|
-
for (; l <
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
599
|
+
for (; l < r.length; ) {
|
|
600
|
+
const g = r.indexOf(d, l);
|
|
601
|
+
if (g === -1)
|
|
602
602
|
break;
|
|
603
|
-
|
|
603
|
+
w.push(g), l = g + d.length;
|
|
604
604
|
}
|
|
605
|
-
return
|
|
606
|
-
const
|
|
607
|
-
return
|
|
605
|
+
return w.map((g) => {
|
|
606
|
+
const i = new Range();
|
|
607
|
+
return i.setStart(a, g), i.setEnd(a, g + d.length), i;
|
|
608
608
|
});
|
|
609
609
|
}).flat();
|
|
610
610
|
}
|
|
611
611
|
function c(s) {
|
|
612
612
|
if (!CSS.highlights || (CSS.highlights.clear(), !s || !t))
|
|
613
613
|
return;
|
|
614
|
-
const d = o(t.value, s.toLocaleLowerCase()),
|
|
615
|
-
CSS.highlights.set("search-result",
|
|
614
|
+
const d = o(t.value, s.toLocaleLowerCase()), m = new Highlight(...d);
|
|
615
|
+
CSS.highlights.set("search-result", m);
|
|
616
616
|
}
|
|
617
617
|
return { search: c };
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
const
|
|
621
|
-
onMouseenterItem:
|
|
622
|
-
onMouseoverItem:
|
|
619
|
+
function ae(e, t, n, o, c, s, d, m, S, f) {
|
|
620
|
+
const y = b(e.size), a = b(e.textField), r = b(e.titleField), w = b(e.multiSelect), l = b(e.disableField), {
|
|
621
|
+
onMouseenterItem: g,
|
|
622
|
+
onMouseoverItem: i,
|
|
623
623
|
onMouseoutItem: u
|
|
624
624
|
} = s, {
|
|
625
|
-
getKey:
|
|
626
|
-
listViewItemClass:
|
|
627
|
-
onCheckItem:
|
|
628
|
-
onClickItem:
|
|
629
|
-
} = d,
|
|
630
|
-
margin:
|
|
625
|
+
getKey: F,
|
|
626
|
+
listViewItemClass: T,
|
|
627
|
+
onCheckItem: j,
|
|
628
|
+
onClickItem: C
|
|
629
|
+
} = d, v = O(() => ({
|
|
630
|
+
margin: y.value === "small" ? "0.25rem 0" : "10px 0"
|
|
631
631
|
}));
|
|
632
|
-
function D(
|
|
633
|
-
return
|
|
634
|
-
class:
|
|
635
|
-
id:
|
|
636
|
-
key:
|
|
637
|
-
onClick: (
|
|
638
|
-
onMouseenter: (
|
|
639
|
-
onMouseover: (
|
|
640
|
-
onMouseout: (
|
|
641
|
-
}, [
|
|
632
|
+
function D(p, V, A) {
|
|
633
|
+
return p.checked = m.findIndexInSelectedItems(p) > -1, h("li", {
|
|
634
|
+
class: T(p, V),
|
|
635
|
+
id: F(p, V),
|
|
636
|
+
key: F(p, V),
|
|
637
|
+
onClick: (k) => C(k, p, V),
|
|
638
|
+
onMouseenter: (k) => g(k, p, V),
|
|
639
|
+
onMouseover: (k) => i(k, p, V),
|
|
640
|
+
onMouseout: (k) => u(k, p, V)
|
|
641
|
+
}, [w.value && h("div", {
|
|
642
642
|
class: "f-list-select",
|
|
643
|
-
onClick: (
|
|
644
|
-
}, [
|
|
645
|
-
id: "list-" +
|
|
643
|
+
onClick: (k) => k.stopPropagation()
|
|
644
|
+
}, [h(X, {
|
|
645
|
+
id: "list-" + F(p, V),
|
|
646
646
|
customClass: "listview-checkbox",
|
|
647
|
-
disabled:
|
|
648
|
-
checked:
|
|
649
|
-
"onUpdate:checked": (
|
|
650
|
-
onChange: (
|
|
651
|
-
|
|
647
|
+
disabled: p[l.value],
|
|
648
|
+
checked: p.checked,
|
|
649
|
+
"onUpdate:checked": (k) => p.checked = k,
|
|
650
|
+
onChange: (k) => {
|
|
651
|
+
j(p, V, !k.checked);
|
|
652
|
+
}
|
|
653
|
+
}, null)]), h("div", {
|
|
652
654
|
class: "f-list-content"
|
|
653
|
-
}, [
|
|
654
|
-
style:
|
|
655
|
-
title:
|
|
656
|
-
}, [
|
|
655
|
+
}, [h("div", {
|
|
656
|
+
style: v.value,
|
|
657
|
+
title: p.raw[r.value] || p.raw[a.value]
|
|
658
|
+
}, [p.raw[a.value]])])]);
|
|
657
659
|
}
|
|
658
660
|
return {
|
|
659
661
|
renderItem: D
|
|
660
662
|
};
|
|
661
663
|
}
|
|
662
|
-
function
|
|
663
|
-
const
|
|
664
|
-
onMouseenterItem:
|
|
665
|
-
onMouseoverItem:
|
|
664
|
+
function kt(e, t, n, o, c, s, d, m, S, f) {
|
|
665
|
+
const y = b(e.multiSelect), a = b(e.disableField), {
|
|
666
|
+
onMouseenterItem: r,
|
|
667
|
+
onMouseoverItem: w,
|
|
666
668
|
onMouseoutItem: l
|
|
667
669
|
} = s, {
|
|
668
|
-
getKey:
|
|
669
|
-
listViewItemClass:
|
|
670
|
+
getKey: g,
|
|
671
|
+
listViewItemClass: i,
|
|
670
672
|
onCheckItem: u,
|
|
671
|
-
onClickItem:
|
|
673
|
+
onClickItem: F
|
|
672
674
|
} = d;
|
|
673
|
-
function
|
|
674
|
-
return t.slots.content ?
|
|
675
|
-
item:
|
|
676
|
-
index:
|
|
675
|
+
function T(C, v, D) {
|
|
676
|
+
return t.slots.content ? h(Q, null, [t.slots.content && t.slots.content({
|
|
677
|
+
item: C.raw,
|
|
678
|
+
index: v,
|
|
677
679
|
selectedItem: D
|
|
678
|
-
})]) :
|
|
680
|
+
})]) : h("div", {
|
|
679
681
|
style: "margin: 10px 0;"
|
|
680
|
-
}, [
|
|
681
|
-
}
|
|
682
|
-
function
|
|
683
|
-
return
|
|
684
|
-
class:
|
|
685
|
-
id:
|
|
686
|
-
key:
|
|
687
|
-
onClick: (
|
|
688
|
-
onMouseenter: (
|
|
689
|
-
onMouseover: (
|
|
690
|
-
onMouseout: (
|
|
691
|
-
}, [
|
|
682
|
+
}, [C.raw.name]);
|
|
683
|
+
}
|
|
684
|
+
function j(C, v, D) {
|
|
685
|
+
return h("li", {
|
|
686
|
+
class: i(C, v),
|
|
687
|
+
id: g(C, v),
|
|
688
|
+
key: g(C, v),
|
|
689
|
+
onClick: (p) => F(p, C, v),
|
|
690
|
+
onMouseenter: (p) => r(p, C, v),
|
|
691
|
+
onMouseover: (p) => w(p, C, v),
|
|
692
|
+
onMouseout: (p) => l(p, C, v)
|
|
693
|
+
}, [y.value && h("div", {
|
|
692
694
|
class: "f-list-select",
|
|
693
|
-
onClick: (
|
|
694
|
-
}, [
|
|
695
|
-
id: "list-" +
|
|
695
|
+
onClick: (p) => p.stopPropagation()
|
|
696
|
+
}, [h(X, {
|
|
697
|
+
id: "list-" + g(C, v),
|
|
696
698
|
customClass: "listview-checkbox",
|
|
697
|
-
disabled:
|
|
698
|
-
checked:
|
|
699
|
-
"onUpdate:checked": (
|
|
700
|
-
onChange: (
|
|
701
|
-
}, null)]),
|
|
699
|
+
disabled: C[a.value] || !C.checked,
|
|
700
|
+
checked: C.checked,
|
|
701
|
+
"onUpdate:checked": (p) => C.checked = p,
|
|
702
|
+
onChange: (p) => u(C, v, !p.checked)
|
|
703
|
+
}, null)]), h("div", {
|
|
702
704
|
class: "f-list-content"
|
|
703
|
-
}, [
|
|
705
|
+
}, [T(C, v, D)])]);
|
|
704
706
|
}
|
|
705
707
|
return {
|
|
706
|
-
renderItem:
|
|
708
|
+
renderItem: j
|
|
707
709
|
};
|
|
708
710
|
}
|
|
709
|
-
function
|
|
710
|
-
const
|
|
711
|
-
onMouseenterItem:
|
|
712
|
-
onMouseoverItem:
|
|
711
|
+
function Mt(e, t, n, o, c, s, d, m, S, f) {
|
|
712
|
+
const y = b(e.multiSelect), a = b(e.disableField), {
|
|
713
|
+
onMouseenterItem: r,
|
|
714
|
+
onMouseoverItem: w,
|
|
713
715
|
onMouseoutItem: l
|
|
714
716
|
} = s, {
|
|
715
|
-
getKey:
|
|
716
|
-
listViewItemClass:
|
|
717
|
+
getKey: g,
|
|
718
|
+
listViewItemClass: i,
|
|
717
719
|
onCheckItem: u,
|
|
718
|
-
onClickItem:
|
|
720
|
+
onClickItem: F
|
|
719
721
|
} = d, {
|
|
720
|
-
dragstart:
|
|
721
|
-
dragenter:
|
|
722
|
-
dragover:
|
|
723
|
-
dragend:
|
|
722
|
+
dragstart: T,
|
|
723
|
+
dragenter: j,
|
|
724
|
+
dragover: C,
|
|
725
|
+
dragend: v
|
|
724
726
|
} = o, {
|
|
725
727
|
removeItem: D
|
|
726
|
-
} =
|
|
727
|
-
margin:
|
|
728
|
+
} = S, p = O(() => ({
|
|
729
|
+
margin: y.value ? "10px 0" : "10px 0px 10px 14px"
|
|
728
730
|
}));
|
|
729
|
-
function
|
|
730
|
-
return
|
|
731
|
-
style:
|
|
731
|
+
function V(I) {
|
|
732
|
+
return h("div", {
|
|
733
|
+
style: p.value
|
|
732
734
|
}, [I.raw.name]);
|
|
733
735
|
}
|
|
734
|
-
function
|
|
735
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
736
|
-
}
|
|
737
|
-
const
|
|
738
|
-
function
|
|
739
|
-
return
|
|
740
|
-
class:
|
|
741
|
-
id:
|
|
742
|
-
key:
|
|
743
|
-
onClick: (P) =>
|
|
744
|
-
onMouseenter: (P) =>
|
|
745
|
-
onMouseover: (P) =>
|
|
746
|
-
onMouseout: (P) => l(P, I,
|
|
736
|
+
function A() {
|
|
737
|
+
return t.slots.itemContent ? t.slots.itemContent : V;
|
|
738
|
+
}
|
|
739
|
+
const k = A();
|
|
740
|
+
function x(I, B, E) {
|
|
741
|
+
return h("li", {
|
|
742
|
+
class: i(I, B),
|
|
743
|
+
id: g(I, B),
|
|
744
|
+
key: g(I, B),
|
|
745
|
+
onClick: (P) => F(P, I, B),
|
|
746
|
+
onMouseenter: (P) => r(P, I, B),
|
|
747
|
+
onMouseover: (P) => w(P, I, B),
|
|
748
|
+
onMouseout: (P) => l(P, I, B),
|
|
747
749
|
draggable: "true",
|
|
748
|
-
onDragstart: (P) =>
|
|
749
|
-
onDragenter: (P) =>
|
|
750
|
-
onDragend: (P) =>
|
|
751
|
-
onDragover: (P) =>
|
|
752
|
-
}, [
|
|
750
|
+
onDragstart: (P) => T(P, I, B),
|
|
751
|
+
onDragenter: (P) => j(P, B),
|
|
752
|
+
onDragend: (P) => v(P, I),
|
|
753
|
+
onDragover: (P) => C(P, B)
|
|
754
|
+
}, [y.value && h("div", {
|
|
753
755
|
class: "f-list-select",
|
|
754
756
|
onClick: (P) => P.stopPropagation()
|
|
755
|
-
}, [
|
|
756
|
-
id: "list-" +
|
|
757
|
+
}, [h(X, {
|
|
758
|
+
id: "list-" + g(I, B),
|
|
757
759
|
customClass: "listview-checkbox",
|
|
758
760
|
disabled: I[a.value] || !I.checked,
|
|
759
761
|
checked: I.checked,
|
|
760
762
|
"onUpdate:checked": (P) => I.checked = P,
|
|
761
|
-
onChange: (P) => u(I,
|
|
762
|
-
}, null)]),
|
|
763
|
+
onChange: (P) => u(I, B, !P.checked)
|
|
764
|
+
}, null)]), h("div", {
|
|
763
765
|
class: "f-list-content"
|
|
764
|
-
}, [
|
|
766
|
+
}, [k(I)]), h("div", {
|
|
765
767
|
class: "f-list-remove",
|
|
766
|
-
onClick: (P) => D(
|
|
767
|
-
}, [
|
|
768
|
+
onClick: (P) => D(B)
|
|
769
|
+
}, [h("div", {
|
|
768
770
|
class: "f-list-remove-icon"
|
|
769
|
-
}, [
|
|
771
|
+
}, [h("i", {
|
|
770
772
|
class: "f-icon f-icon-remove_face"
|
|
771
|
-
}, null)])]),
|
|
773
|
+
}, null)])]), h("div", {
|
|
772
774
|
class: "f-list-handle"
|
|
773
|
-
}, [
|
|
775
|
+
}, [h("div", null, [h("i", {
|
|
774
776
|
class: "f-icon f-icon-drag-vertical"
|
|
775
777
|
}, null)])])]);
|
|
776
778
|
}
|
|
777
779
|
return {
|
|
778
|
-
renderItem:
|
|
780
|
+
renderItem: x
|
|
779
781
|
};
|
|
780
782
|
}
|
|
781
|
-
function
|
|
782
|
-
var
|
|
783
|
-
const
|
|
783
|
+
function Vt(e, t, n, o, c, s, d, m, S, f) {
|
|
784
|
+
var g;
|
|
785
|
+
const y = b(((g = e.group) == null ? void 0 : g.groupFields) || []), {
|
|
784
786
|
collpaseGroupIconClass: a
|
|
785
787
|
} = c, {
|
|
786
|
-
toggleGroupRow:
|
|
787
|
-
} =
|
|
788
|
-
function
|
|
789
|
-
u.collapse = !u.collapse, n.value =
|
|
788
|
+
toggleGroupRow: r
|
|
789
|
+
} = f;
|
|
790
|
+
function w(i, u) {
|
|
791
|
+
u.collapse = !u.collapse, n.value = r(u.collapse ? "collapse" : "expand", u, n.value);
|
|
790
792
|
}
|
|
791
|
-
function l(
|
|
792
|
-
return
|
|
793
|
+
function l(i, u, F) {
|
|
794
|
+
return i.layer > -1 && h("div", {
|
|
793
795
|
class: "f-navlookup-recentHeader",
|
|
794
|
-
onClick: (
|
|
795
|
-
}, [
|
|
796
|
+
onClick: (T) => w(T, i)
|
|
797
|
+
}, [h("div", {
|
|
796
798
|
class: "fv-grid-group-row-icon"
|
|
797
|
-
}, [
|
|
798
|
-
class: a(
|
|
799
|
-
}, null)]),
|
|
799
|
+
}, [h("span", {
|
|
800
|
+
class: a(i)
|
|
801
|
+
}, null)]), h("div", {
|
|
800
802
|
class: "f-navlookup-recommandLabel"
|
|
801
|
-
}, [
|
|
803
|
+
}, [i.raw[y.value[i.layer]]])]);
|
|
802
804
|
}
|
|
803
805
|
return {
|
|
804
806
|
renderItem: l
|
|
805
807
|
};
|
|
806
808
|
}
|
|
807
|
-
function
|
|
808
|
-
const e =
|
|
809
|
-
function c(
|
|
809
|
+
function Dt() {
|
|
810
|
+
const e = b(-1), t = b(""), n = b(-1), o = b(!1);
|
|
811
|
+
function c(f, y, a) {
|
|
810
812
|
n.value = a;
|
|
811
813
|
}
|
|
812
|
-
function s(
|
|
814
|
+
function s(f, y, a) {
|
|
813
815
|
o.value || (n.value = a);
|
|
814
816
|
}
|
|
815
|
-
function d(
|
|
817
|
+
function d(f, y, a) {
|
|
816
818
|
n.value = -1;
|
|
817
819
|
}
|
|
818
|
-
function
|
|
820
|
+
function m() {
|
|
819
821
|
o.value = !0;
|
|
820
822
|
}
|
|
821
|
-
function
|
|
823
|
+
function S() {
|
|
822
824
|
o.value = !1;
|
|
823
825
|
}
|
|
824
826
|
return {
|
|
@@ -828,40 +830,40 @@ function Ft() {
|
|
|
828
830
|
onMouseenterItem: c,
|
|
829
831
|
onMouseoverItem: s,
|
|
830
832
|
onMouseoutItem: d,
|
|
831
|
-
resumeHover:
|
|
832
|
-
suspendHover:
|
|
833
|
+
resumeHover: S,
|
|
834
|
+
suspendHover: m
|
|
833
835
|
};
|
|
834
836
|
}
|
|
835
|
-
function
|
|
836
|
-
const c =
|
|
837
|
-
function
|
|
838
|
-
u.stopPropagation(),
|
|
839
|
-
d.value =
|
|
837
|
+
function jt(e, t, n, o) {
|
|
838
|
+
const c = b(e.idField), { dataView: s } = n, d = b(-1), m = b(!1), { activeIndex: S, focusedItemId: f, hoverIndex: y, resumeHover: a, suspendHover: r } = o;
|
|
839
|
+
function w(u, F, T) {
|
|
840
|
+
u.stopPropagation(), r(), F && setTimeout(() => {
|
|
841
|
+
d.value = T, m.value = !0, F.moving = !0;
|
|
840
842
|
});
|
|
841
843
|
}
|
|
842
|
-
function l(u,
|
|
843
|
-
if (u.preventDefault(), d.value !==
|
|
844
|
-
const
|
|
845
|
-
|
|
844
|
+
function l(u, F) {
|
|
845
|
+
if (u.preventDefault(), d.value !== F) {
|
|
846
|
+
const T = s.value[d.value], j = s.value;
|
|
847
|
+
j.splice(d.value, 1), j.splice(F, 0, T), d.value = F;
|
|
846
848
|
}
|
|
847
849
|
}
|
|
848
|
-
function
|
|
850
|
+
function g(u, F) {
|
|
849
851
|
u.preventDefault(), u.dataTransfer && (u.dataTransfer.dropEffect = "move");
|
|
850
852
|
}
|
|
851
|
-
function
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
}),
|
|
853
|
+
function i(u, F) {
|
|
854
|
+
F && (F.moving = !1), s.value.forEach((T, j) => {
|
|
855
|
+
T.__fv_index__ = j;
|
|
856
|
+
}), m.value = !1, a(), y.value = F.raw.__fv_index__, S.value = F.raw.__fv_index__, f.value = F.raw[c.value], t.emit("change", s.value), t.emit("activeChange", F);
|
|
855
857
|
}
|
|
856
858
|
return {
|
|
857
|
-
dragstart:
|
|
859
|
+
dragstart: w,
|
|
858
860
|
dragenter: l,
|
|
859
|
-
dragover:
|
|
860
|
-
dragend:
|
|
861
|
-
isDragging:
|
|
861
|
+
dragover: g,
|
|
862
|
+
dragend: i,
|
|
863
|
+
isDragging: m
|
|
862
864
|
};
|
|
863
865
|
}
|
|
864
|
-
function
|
|
866
|
+
function It(e, t, n) {
|
|
865
867
|
const { dataView: o } = n;
|
|
866
868
|
function c(s) {
|
|
867
869
|
if (s > -1 && s < o.value.length) {
|
|
@@ -871,81 +873,81 @@ function kt(e, t, n) {
|
|
|
871
873
|
}
|
|
872
874
|
return { removeItem: c };
|
|
873
875
|
}
|
|
874
|
-
function
|
|
875
|
-
const d =
|
|
876
|
-
|
|
877
|
-
const { isDragging:
|
|
878
|
-
function
|
|
876
|
+
function Pt(e, t, n, o, c, s) {
|
|
877
|
+
const d = b(e.idField), m = b(e.disableField), S = b(e.draggable), f = b(e.itemClass), y = b(e.selection.multiSelect ?? !1), a = b(e.selection.multiSelectMode);
|
|
878
|
+
b(!0);
|
|
879
|
+
const { isDragging: r } = o, { activeIndex: w, focusedItemId: l, hoverIndex: g } = c, { clearSelection: i, getSelectedItems: u, toggleSelectItem: F } = s, T = b(u());
|
|
880
|
+
function j(k, x) {
|
|
879
881
|
const I = {
|
|
880
882
|
"f-list-view-group-item": !0,
|
|
881
|
-
"f-list-view-draggable-item":
|
|
882
|
-
"f-un-click": !
|
|
883
|
-
"f-un-select": !!
|
|
884
|
-
"f-listview-active":
|
|
885
|
-
"f-listview-hover": !
|
|
886
|
-
moving: !!
|
|
883
|
+
"f-list-view-draggable-item": S.value,
|
|
884
|
+
"f-un-click": !k.checked,
|
|
885
|
+
"f-un-select": !!k.raw[m.value],
|
|
886
|
+
"f-listview-active": k.raw.__fv_index__ === w.value,
|
|
887
|
+
"f-listview-hover": !r.value && x === g.value,
|
|
888
|
+
moving: !!k.moving
|
|
887
889
|
};
|
|
888
|
-
return
|
|
890
|
+
return f.value.split(" ").reduce((E, P) => (E[P] = !0, E), I), I;
|
|
889
891
|
}
|
|
890
|
-
function
|
|
891
|
-
return
|
|
892
|
+
function C(k, x) {
|
|
893
|
+
return k.raw[d.value] || "";
|
|
892
894
|
}
|
|
893
|
-
const
|
|
894
|
-
function D(
|
|
895
|
-
|
|
895
|
+
const v = O(() => !y.value);
|
|
896
|
+
function D(k, x, I) {
|
|
897
|
+
k.checked = I, !k.raw[m.value] && (v.value && (l.value = k.raw[d.value]), F(k));
|
|
896
898
|
}
|
|
897
|
-
const
|
|
898
|
-
function
|
|
899
|
-
if (
|
|
900
|
-
|
|
899
|
+
const p = O(() => y.value && a.value === "OnCheckClearByClick"), V = O(() => !y.value || y.value && (a.value === "OnCheckAndClick" || a.value === "OnClick"));
|
|
900
|
+
function A(k, x, I) {
|
|
901
|
+
if (x.raw[m.value]) {
|
|
902
|
+
k.preventDefault(), k.stopPropagation();
|
|
901
903
|
return;
|
|
902
904
|
}
|
|
903
|
-
l.value =
|
|
905
|
+
l.value = x.raw[d.value], w.value = I, p.value && i(n.value), V.value && (F(x), T.value = u()), t.emit("clickItem", { data: T.value, index: I }), t.emit("activeChange", T.value);
|
|
904
906
|
}
|
|
905
907
|
return {
|
|
906
|
-
getKey:
|
|
907
|
-
listViewItemClass:
|
|
908
|
+
getKey: C,
|
|
909
|
+
listViewItemClass: j,
|
|
908
910
|
onCheckItem: D,
|
|
909
|
-
onClickItem:
|
|
911
|
+
onClickItem: A
|
|
910
912
|
};
|
|
911
913
|
}
|
|
912
|
-
function
|
|
913
|
-
const
|
|
914
|
+
function Bt(e, t, n, o, c, s, d) {
|
|
915
|
+
const m = b(e.view), S = b(e.view === "CardView"), f = b({}), y = b("暂无数据"), a = Dt(), r = jt(e, t, o, a), w = It(e, t, o), l = Pt(e, t, n, r, a, s), g = O(() => ({
|
|
914
916
|
"f-list-view-group": !0,
|
|
915
|
-
"d-flex":
|
|
916
|
-
"flex-wrap":
|
|
917
|
-
})),
|
|
918
|
-
function
|
|
919
|
-
return
|
|
917
|
+
"d-flex": S.value,
|
|
918
|
+
"flex-wrap": S.value
|
|
919
|
+
})), i = O(() => !!n.value && n.value.length > 0), u = O(() => n.value.length === 0), F = O(() => u.value && !t.slots.empty);
|
|
920
|
+
function T() {
|
|
921
|
+
return m.value === "SingleView" ? ae : m.value === "DraggableView" ? Mt : (m.value === "ContentView" || m.value === "CardView") && t.slots.content ? kt : ae;
|
|
920
922
|
}
|
|
921
|
-
const
|
|
922
|
-
renderItem:
|
|
923
|
-
} =
|
|
924
|
-
renderItem:
|
|
925
|
-
} =
|
|
926
|
-
function
|
|
927
|
-
return n.value.filter((
|
|
923
|
+
const j = T(), {
|
|
924
|
+
renderItem: C
|
|
925
|
+
} = j(e, t, n, r, c, a, l, s, w, d), {
|
|
926
|
+
renderItem: v
|
|
927
|
+
} = Vt(e, t, n, r, c, a, l, s, w, d), D = [C, v];
|
|
928
|
+
function p() {
|
|
929
|
+
return n.value.filter((k) => k.visible !== !1).map((k, x) => D[k.type](k, x, f));
|
|
928
930
|
}
|
|
929
|
-
function
|
|
930
|
-
return
|
|
931
|
+
function V() {
|
|
932
|
+
return h("div", {
|
|
931
933
|
class: "f-list-view-emptydata"
|
|
932
|
-
}, [
|
|
934
|
+
}, [h("p", {
|
|
933
935
|
class: "f-empty-title"
|
|
934
|
-
}, [
|
|
936
|
+
}, [y.value])]);
|
|
935
937
|
}
|
|
936
|
-
function
|
|
937
|
-
return
|
|
938
|
-
class:
|
|
938
|
+
function A() {
|
|
939
|
+
return h("ul", {
|
|
940
|
+
class: g.value,
|
|
939
941
|
style: "list-style: none;"
|
|
940
|
-
}, [
|
|
942
|
+
}, [i.value && p(), F.value && V(), t.slots.empty && t.slots.empty()]);
|
|
941
943
|
}
|
|
942
944
|
return {
|
|
943
|
-
renderListArea:
|
|
945
|
+
renderListArea: A
|
|
944
946
|
};
|
|
945
947
|
}
|
|
946
|
-
function
|
|
948
|
+
function Ot(e, t, n) {
|
|
947
949
|
function o() {
|
|
948
|
-
return t.slots.header &&
|
|
950
|
+
return t.slots.header && h("div", {
|
|
949
951
|
class: "f-list-view-header"
|
|
950
952
|
}, [t.slots.header()]);
|
|
951
953
|
}
|
|
@@ -953,52 +955,52 @@ function Dt(e, t, n) {
|
|
|
953
955
|
renderHeader: o
|
|
954
956
|
};
|
|
955
957
|
}
|
|
956
|
-
function
|
|
957
|
-
const o =
|
|
958
|
-
function
|
|
958
|
+
function re(e, t, n) {
|
|
959
|
+
const o = b(e.headerClass), c = b(e.placeholder), s = b(""), d = O(() => !s.value), m = O(() => !!s.value);
|
|
960
|
+
function S(r) {
|
|
959
961
|
s.value = "";
|
|
960
962
|
}
|
|
961
|
-
N(s, (
|
|
962
|
-
n.search(
|
|
963
|
+
N(s, (r) => {
|
|
964
|
+
n.search(r);
|
|
963
965
|
});
|
|
964
|
-
const
|
|
965
|
-
const
|
|
966
|
+
const f = O(() => {
|
|
967
|
+
const r = {
|
|
966
968
|
"form-group": !0,
|
|
967
969
|
"farris-form-group": !0
|
|
968
970
|
};
|
|
969
|
-
return o.value && o.value.split(" ").reduce((l,
|
|
971
|
+
return o.value && o.value.split(" ").reduce((l, g) => (l[g] = !0, l), r), r;
|
|
970
972
|
});
|
|
971
|
-
function
|
|
973
|
+
function y(r) {
|
|
972
974
|
}
|
|
973
975
|
function a() {
|
|
974
|
-
return
|
|
976
|
+
return h("div", {
|
|
975
977
|
class: "f-list-view-header",
|
|
976
|
-
onClick:
|
|
977
|
-
}, [
|
|
978
|
-
class:
|
|
979
|
-
}, [
|
|
978
|
+
onClick: we(() => y, ["prevent", "stop"])
|
|
979
|
+
}, [h("div", {
|
|
980
|
+
class: f.value
|
|
981
|
+
}, [h("div", {
|
|
980
982
|
class: "farris-input-wrap"
|
|
981
|
-
}, [
|
|
983
|
+
}, [h("div", {
|
|
982
984
|
class: "f-cmp-inputgroup"
|
|
983
|
-
}, [
|
|
985
|
+
}, [h("div", {
|
|
984
986
|
class: "input-group f-state-editable"
|
|
985
|
-
}, [
|
|
987
|
+
}, [Fe(h("input", {
|
|
986
988
|
class: "form-control f-utils-fill text-left",
|
|
987
|
-
"onUpdate:modelValue": (
|
|
989
|
+
"onUpdate:modelValue": (r) => s.value = r,
|
|
988
990
|
name: "input-group-value",
|
|
989
991
|
type: "text",
|
|
990
992
|
placeholder: c.value,
|
|
991
993
|
autocomplete: "off"
|
|
992
|
-
}, null), [[
|
|
994
|
+
}, null), [[Te, s.value]]), h("div", {
|
|
993
995
|
class: "input-group-append"
|
|
994
|
-
}, [
|
|
996
|
+
}, [m.value && h("span", {
|
|
995
997
|
class: "input-group-text input-group-clear",
|
|
996
|
-
onClick: (
|
|
997
|
-
}, [
|
|
998
|
+
onClick: (r) => S()
|
|
999
|
+
}, [h("i", {
|
|
998
1000
|
class: "f-icon f-icon-close-circle"
|
|
999
|
-
}, null)]), d.value &&
|
|
1001
|
+
}, null)]), d.value && h("span", {
|
|
1000
1002
|
class: "input-group-text"
|
|
1001
|
-
}, [
|
|
1003
|
+
}, [h("span", {
|
|
1002
1004
|
class: "f-icon f-icon-search"
|
|
1003
1005
|
}, null)])])])])])])]);
|
|
1004
1006
|
}
|
|
@@ -1006,47 +1008,47 @@ function ae(e, t, n) {
|
|
|
1006
1008
|
renderHeader: a
|
|
1007
1009
|
};
|
|
1008
1010
|
}
|
|
1009
|
-
const
|
|
1011
|
+
const de = /* @__PURE__ */ H({
|
|
1010
1012
|
name: "FListView",
|
|
1011
|
-
props:
|
|
1013
|
+
props: ue,
|
|
1012
1014
|
emits: ["checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
1013
1015
|
setup(e, t) {
|
|
1014
|
-
const n =
|
|
1016
|
+
const n = b(), o = b(!0), c = b(!1), s = b([]), d = 0, m = b(e.columns), S = Ve(e), f = De(e), y = je(e, S), a = Ie(e), r = Pe(e, /* @__PURE__ */ new Map(), f, S, a), w = Be(e, r, S, s, t), l = Tt(e, n), g = O(() => r.dataView.value.length), i = Oe(e, S), u = Ae(), F = xe(e, {}, u), T = Le(e, i, f, S, u, F), j = $e(e, S, F, T), C = Ee(e, S, F, T), v = Ne(e, m, r, g, d, T, j, C), {
|
|
1015
1017
|
getVisualData: D
|
|
1016
|
-
} =
|
|
1017
|
-
s.value = D(0,
|
|
1018
|
-
const
|
|
1019
|
-
const
|
|
1018
|
+
} = v;
|
|
1019
|
+
s.value = D(0, g.value + d - 1);
|
|
1020
|
+
const p = O(() => {
|
|
1021
|
+
const L = {
|
|
1020
1022
|
"f-list-view": !0,
|
|
1021
1023
|
"f-list-view-multiple": e.multiSelect
|
|
1022
1024
|
};
|
|
1023
|
-
return e.size !== "default" && (
|
|
1024
|
-
}),
|
|
1025
|
-
function
|
|
1026
|
-
return e.header === "SearchBar" ?
|
|
1025
|
+
return e.size !== "default" && (L[`${e.size}-item`] = !0), L;
|
|
1026
|
+
}), V = O(() => !!t.slots.footer || o.value);
|
|
1027
|
+
function A() {
|
|
1028
|
+
return e.header === "SearchBar" ? re : e.header === "ContentHeader" ? Ot : re;
|
|
1027
1029
|
}
|
|
1028
|
-
const
|
|
1029
|
-
renderHeader:
|
|
1030
|
-
} =
|
|
1030
|
+
const k = A(), {
|
|
1031
|
+
renderHeader: x
|
|
1032
|
+
} = k(e, t, l), {
|
|
1031
1033
|
renderListArea: I
|
|
1032
|
-
} =
|
|
1033
|
-
function
|
|
1034
|
-
l.search(
|
|
1034
|
+
} = Bt(e, t, s, r, y, w, v);
|
|
1035
|
+
function B(L) {
|
|
1036
|
+
l.search(L);
|
|
1035
1037
|
}
|
|
1036
|
-
function E(
|
|
1037
|
-
|
|
1038
|
+
function E(L) {
|
|
1039
|
+
L && (r.load(L), s.value = D(0, g.value + d - 1));
|
|
1038
1040
|
}
|
|
1039
1041
|
t.expose({
|
|
1040
|
-
search:
|
|
1042
|
+
search: B,
|
|
1041
1043
|
updateDataSource: E
|
|
1042
1044
|
});
|
|
1043
|
-
function P(
|
|
1044
|
-
e.multiSelect && (
|
|
1045
|
+
function P(L) {
|
|
1046
|
+
e.multiSelect && (L.preventDefault(), L.stopPropagation());
|
|
1045
1047
|
}
|
|
1046
|
-
return () =>
|
|
1047
|
-
class:
|
|
1048
|
+
return () => h("div", {
|
|
1049
|
+
class: p.value,
|
|
1048
1050
|
onClick: P
|
|
1049
|
-
}, [
|
|
1051
|
+
}, [x(), h("div", {
|
|
1050
1052
|
ref: n,
|
|
1051
1053
|
class: "f-list-view-content",
|
|
1052
1054
|
onMouseover: () => {
|
|
@@ -1055,11 +1057,11 @@ const ue = /* @__PURE__ */ H({
|
|
|
1055
1057
|
onMouseleave: () => {
|
|
1056
1058
|
c.value = !1;
|
|
1057
1059
|
}
|
|
1058
|
-
}, [I()]),
|
|
1060
|
+
}, [I()]), V.value && h("div", {
|
|
1059
1061
|
class: "f-list-view-footer"
|
|
1060
1062
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
1061
1063
|
}
|
|
1062
|
-
}),
|
|
1064
|
+
}), At = {
|
|
1063
1065
|
/**
|
|
1064
1066
|
* 组件标识
|
|
1065
1067
|
*/
|
|
@@ -1085,7 +1087,7 @@ const ue = /* @__PURE__ */ H({
|
|
|
1085
1087
|
*/
|
|
1086
1088
|
customClass: { type: Object, default: {} }
|
|
1087
1089
|
};
|
|
1088
|
-
function
|
|
1090
|
+
function xt(e, t) {
|
|
1089
1091
|
function n(o) {
|
|
1090
1092
|
o.stopPropagation(), e.disabled || t.emit("click", o);
|
|
1091
1093
|
}
|
|
@@ -1093,8 +1095,8 @@ function It(e, t) {
|
|
|
1093
1095
|
onClickButton: n
|
|
1094
1096
|
};
|
|
1095
1097
|
}
|
|
1096
|
-
function
|
|
1097
|
-
const t =
|
|
1098
|
+
function Lt(e) {
|
|
1099
|
+
const t = O(() => {
|
|
1098
1100
|
const o = {
|
|
1099
1101
|
"f-icon": !0
|
|
1100
1102
|
};
|
|
@@ -1103,20 +1105,20 @@ function Pt(e) {
|
|
|
1103
1105
|
c && c.length && c.reduce((s, d) => (s[d] = !0, s), o);
|
|
1104
1106
|
}
|
|
1105
1107
|
return o;
|
|
1106
|
-
}), n =
|
|
1108
|
+
}), n = O(() => !!(e.icon && e.icon.trim()));
|
|
1107
1109
|
return { iconClass: t, shouldShowIcon: n };
|
|
1108
1110
|
}
|
|
1109
|
-
const
|
|
1111
|
+
const pe = /* @__PURE__ */ H({
|
|
1110
1112
|
name: "FButton",
|
|
1111
|
-
props:
|
|
1113
|
+
props: At,
|
|
1112
1114
|
emits: ["click"],
|
|
1113
1115
|
setup(e, t) {
|
|
1114
1116
|
const {
|
|
1115
1117
|
onClickButton: n
|
|
1116
|
-
} =
|
|
1118
|
+
} = xt(e, t), {
|
|
1117
1119
|
iconClass: o,
|
|
1118
1120
|
shouldShowIcon: c
|
|
1119
|
-
} =
|
|
1121
|
+
} = Lt(e), s = O(() => {
|
|
1120
1122
|
const d = {
|
|
1121
1123
|
btn: !0,
|
|
1122
1124
|
"btn-lg": e.size === "large",
|
|
@@ -1124,19 +1126,19 @@ const de = /* @__PURE__ */ H({
|
|
|
1124
1126
|
"btn-sm": e.size === "small",
|
|
1125
1127
|
"btn-icontext": c.value
|
|
1126
1128
|
};
|
|
1127
|
-
return d[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((
|
|
1129
|
+
return d[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((m, S) => (m[S] = e.customClass[S], m), d), d;
|
|
1128
1130
|
});
|
|
1129
|
-
return () =>
|
|
1131
|
+
return () => h("button", {
|
|
1130
1132
|
class: s.value,
|
|
1131
1133
|
disabled: e.disabled,
|
|
1132
1134
|
onClick: (d) => n(d)
|
|
1133
|
-
}, [c.value &&
|
|
1135
|
+
}, [c.value && h("i", {
|
|
1134
1136
|
class: o.value
|
|
1135
1137
|
}, null), t.slots.default && t.slots.default()]);
|
|
1136
1138
|
}
|
|
1137
|
-
}),
|
|
1139
|
+
}), $t = /* @__PURE__ */ new Map([
|
|
1138
1140
|
["appearance", J]
|
|
1139
|
-
]),
|
|
1141
|
+
]), Et = "https://json-schema.org/draft/2020-12/schema", Nt = "https://farris-design.gitee.io/combo-list.schema.json", Ht = "combo-list", Rt = "A Farris Input Component", Ut = "object", zt = {
|
|
1140
1142
|
id: {
|
|
1141
1143
|
description: "The unique identifier for a combo list",
|
|
1142
1144
|
type: "string"
|
|
@@ -1247,19 +1249,19 @@ const de = /* @__PURE__ */ H({
|
|
|
1247
1249
|
type: "sting",
|
|
1248
1250
|
default: ""
|
|
1249
1251
|
}
|
|
1250
|
-
},
|
|
1252
|
+
}, Gt = [
|
|
1251
1253
|
"id",
|
|
1252
1254
|
"type"
|
|
1253
|
-
],
|
|
1254
|
-
$schema:
|
|
1255
|
-
$id:
|
|
1256
|
-
title:
|
|
1257
|
-
description:
|
|
1258
|
-
type:
|
|
1259
|
-
properties:
|
|
1260
|
-
required:
|
|
1255
|
+
], _t = {
|
|
1256
|
+
$schema: Et,
|
|
1257
|
+
$id: Nt,
|
|
1258
|
+
title: Ht,
|
|
1259
|
+
description: Rt,
|
|
1260
|
+
type: Ut,
|
|
1261
|
+
properties: zt,
|
|
1262
|
+
required: Gt
|
|
1261
1263
|
};
|
|
1262
|
-
function
|
|
1264
|
+
function Wt(e, t, n) {
|
|
1263
1265
|
return t;
|
|
1264
1266
|
}
|
|
1265
1267
|
const ee = {
|
|
@@ -1422,7 +1424,7 @@ const ee = {
|
|
|
1422
1424
|
* 打开前
|
|
1423
1425
|
*/
|
|
1424
1426
|
beforeOpen: { type: Function, default: null }
|
|
1425
|
-
},
|
|
1427
|
+
}, fe = Z(ee, _t, $t, Wt), qt = {
|
|
1426
1428
|
dataSource: { type: Array, default: [] },
|
|
1427
1429
|
enableSearch: { type: Boolean, default: !1 },
|
|
1428
1430
|
idField: { type: String, default: "id" },
|
|
@@ -1437,31 +1439,31 @@ const ee = {
|
|
|
1437
1439
|
/** 值变化事件 */
|
|
1438
1440
|
onSelectionChange: { type: Function, default: () => {
|
|
1439
1441
|
} }
|
|
1440
|
-
},
|
|
1442
|
+
}, Qt = /* @__PURE__ */ H({
|
|
1441
1443
|
name: "FComboListContainer",
|
|
1442
|
-
props:
|
|
1444
|
+
props: qt,
|
|
1443
1445
|
emits: ["selectionChange"],
|
|
1444
1446
|
setup(e, t) {
|
|
1445
|
-
const n =
|
|
1447
|
+
const n = b(e.dataSource), o = b([]), c = b(e.separator), s = b(e.width), d = b(e.maxHeight), m = b(String(e.selectedValues).split(c.value));
|
|
1446
1448
|
N(e.dataSource, () => {
|
|
1447
1449
|
n.value = e.dataSource;
|
|
1448
1450
|
});
|
|
1449
|
-
const
|
|
1451
|
+
const S = O(() => e.enableSearch ? "SearchBar" : "ContentHeader"), f = O(() => {
|
|
1450
1452
|
const a = {};
|
|
1451
1453
|
return s.value !== void 0 && (a.width = `${s.value}px`), d.value !== void 0 && d.value > 0 && (a.maxHeight = `${d.value}px`), a;
|
|
1452
1454
|
});
|
|
1453
|
-
function
|
|
1454
|
-
o.value = a.map((
|
|
1455
|
+
function y(a) {
|
|
1456
|
+
o.value = a.map((r) => Object.assign({}, r)), m.value = a.map((r) => r[e.idField]), t.emit("selectionChange", o.value);
|
|
1455
1457
|
}
|
|
1456
1458
|
return N([() => e.selectedValues], ([a]) => {
|
|
1457
|
-
|
|
1458
|
-
}), () =>
|
|
1459
|
+
m.value = a.split(c.value);
|
|
1460
|
+
}), () => h("div", {
|
|
1459
1461
|
class: "f-combo-list-container pl-3",
|
|
1460
|
-
style:
|
|
1461
|
-
}, [
|
|
1462
|
+
style: f.value
|
|
1463
|
+
}, [h(He, {
|
|
1462
1464
|
size: "small",
|
|
1463
1465
|
itemClass: "f-combo-list-item",
|
|
1464
|
-
header:
|
|
1466
|
+
header: S.value,
|
|
1465
1467
|
headerClass: "f-combo-list-search-box",
|
|
1466
1468
|
data: n.value,
|
|
1467
1469
|
idField: e.idField,
|
|
@@ -1469,104 +1471,104 @@ const ee = {
|
|
|
1469
1471
|
titleField: e.titleField,
|
|
1470
1472
|
multiSelect: e.multiSelect,
|
|
1471
1473
|
multiSelectMode: "OnCheckAndClick",
|
|
1472
|
-
selectionValues:
|
|
1473
|
-
onSelectionChange:
|
|
1474
|
+
selectionValues: m.value,
|
|
1475
|
+
onSelectionChange: y
|
|
1474
1476
|
}, null)]);
|
|
1475
1477
|
}
|
|
1476
1478
|
});
|
|
1477
|
-
function
|
|
1478
|
-
const t =
|
|
1479
|
+
function Xt(e) {
|
|
1480
|
+
const t = b(""), n = b(e.modelValue), o = b(e.data || []), c = b(e.editable);
|
|
1479
1481
|
function s(a) {
|
|
1480
|
-
const
|
|
1481
|
-
return o.value.filter((l) =>
|
|
1482
|
+
const r = String(a).split(e.separator).map((l) => [l, !0]), w = new Map(r);
|
|
1483
|
+
return o.value.filter((l) => w.has(String(l[e.valueField])));
|
|
1482
1484
|
}
|
|
1483
1485
|
function d(a) {
|
|
1484
|
-
const
|
|
1485
|
-
t.value = c.value ?
|
|
1486
|
+
const r = s(a).map((w) => w[e.textField]).join(e.separator);
|
|
1487
|
+
t.value = c.value ? r || a : r;
|
|
1486
1488
|
}
|
|
1487
|
-
function
|
|
1488
|
-
const
|
|
1489
|
-
return o.value.filter((l) =>
|
|
1489
|
+
function m(a) {
|
|
1490
|
+
const r = a.split(e.separator).map((l) => [l, !0]), w = new Map(r);
|
|
1491
|
+
return o.value.filter((l) => w.has(l[e.textField]));
|
|
1490
1492
|
}
|
|
1491
|
-
function
|
|
1492
|
-
const
|
|
1493
|
-
return
|
|
1493
|
+
function S(a) {
|
|
1494
|
+
const r = {};
|
|
1495
|
+
return r[e.idField] = a, r[e.textField] = a, [r];
|
|
1494
1496
|
}
|
|
1495
|
-
function
|
|
1496
|
-
let
|
|
1497
|
-
const
|
|
1498
|
-
return c.value && !
|
|
1499
|
-
}
|
|
1500
|
-
function
|
|
1501
|
-
const { url: a, method:
|
|
1502
|
-
let
|
|
1503
|
-
fetch(a,
|
|
1504
|
-
var
|
|
1497
|
+
function f(a) {
|
|
1498
|
+
let r = m(a);
|
|
1499
|
+
const w = r && r.length > 0;
|
|
1500
|
+
return c.value && !w && (r = S(a)), r;
|
|
1501
|
+
}
|
|
1502
|
+
function y() {
|
|
1503
|
+
const { url: a, method: r = "GET", headers: w = {}, body: l = null } = e.remote, g = r.toLowerCase() == "get" ? { method: r, headers: w } : { method: r, headers: w, body: l };
|
|
1504
|
+
let i = !1;
|
|
1505
|
+
fetch(a, g).then((u) => {
|
|
1506
|
+
var T, j;
|
|
1505
1507
|
if (u.status === 200)
|
|
1506
|
-
return
|
|
1508
|
+
return i = !!((j = (T = u.headers) == null ? void 0 : T.get("content-type")) != null && j.includes("application/json")), i ? u.text() : u.json();
|
|
1507
1509
|
throw new Error(u.statusText);
|
|
1508
1510
|
}).then((u) => {
|
|
1509
|
-
o.value =
|
|
1511
|
+
o.value = i ? JSON.parse(u) : u;
|
|
1510
1512
|
}).catch((u) => {
|
|
1511
1513
|
console.error(u);
|
|
1512
1514
|
});
|
|
1513
1515
|
}
|
|
1514
|
-
return e.remote &&
|
|
1516
|
+
return e.remote && y(), N(() => e.data, () => {
|
|
1515
1517
|
o.value = e.data;
|
|
1516
1518
|
}), N([o], ([a]) => {
|
|
1517
1519
|
if (e.modelValue) {
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
+
const r = a.find((w) => w[e.valueField] === e.modelValue);
|
|
1521
|
+
r && (t.value = r[e.textField]);
|
|
1520
1522
|
}
|
|
1521
1523
|
}), N(() => e.modelValue, (a) => {
|
|
1522
1524
|
n.value = a, d(a);
|
|
1523
|
-
}), d(e.modelValue), { dataSource: o, displayText: t, editable: c, modelValue: n, getItemsByDisplayText:
|
|
1525
|
+
}), d(e.modelValue), { dataSource: o, displayText: t, editable: c, modelValue: n, getItemsByDisplayText: m, getItemsByValue: s, getSelectedItemsByDisplayText: f };
|
|
1524
1526
|
}
|
|
1525
1527
|
const U = /* @__PURE__ */ H({
|
|
1526
1528
|
name: "FComboList",
|
|
1527
1529
|
props: ee,
|
|
1528
1530
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1529
1531
|
setup(e, t) {
|
|
1530
|
-
const n =
|
|
1531
|
-
dataSource:
|
|
1532
|
-
displayText:
|
|
1533
|
-
editable:
|
|
1534
|
-
modelValue:
|
|
1532
|
+
const n = b(), o = b(e.disabled), c = b(e.enableClear), s = b(e.enableSearch), d = b(e.readonly), {
|
|
1533
|
+
dataSource: m,
|
|
1534
|
+
displayText: S,
|
|
1535
|
+
editable: f,
|
|
1536
|
+
modelValue: y,
|
|
1535
1537
|
getSelectedItemsByDisplayText: a
|
|
1536
|
-
} =
|
|
1538
|
+
} = Xt(e), r = O(() => e.multiSelect), w = O(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1537
1539
|
function l() {
|
|
1538
|
-
!
|
|
1540
|
+
!r.value && n.value && n.value.hidePopup();
|
|
1539
1541
|
}
|
|
1540
|
-
function
|
|
1541
|
-
|
|
1542
|
+
function g(C) {
|
|
1543
|
+
S.value = C.map((v) => v[e.textField]).join(e.separator), C.length === 1 ? y.value = C[0][e.valueField] : y.value = C.map((v) => v[e.valueField]).join(e.separator), t.emit("update:modelValue", y.value), t.emit("change", C, y.value), l();
|
|
1542
1544
|
}
|
|
1543
|
-
function
|
|
1545
|
+
function i() {
|
|
1544
1546
|
d.value || n.value.togglePopup();
|
|
1545
1547
|
}
|
|
1546
|
-
function u(
|
|
1547
|
-
|
|
1548
|
+
function u(C) {
|
|
1549
|
+
y.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1548
1550
|
}
|
|
1549
|
-
function
|
|
1550
|
-
const
|
|
1551
|
-
|
|
1551
|
+
function F(C) {
|
|
1552
|
+
const v = a(C);
|
|
1553
|
+
g(v);
|
|
1552
1554
|
}
|
|
1553
|
-
function
|
|
1554
|
-
return
|
|
1555
|
+
function T() {
|
|
1556
|
+
return S.value;
|
|
1555
1557
|
}
|
|
1556
|
-
function
|
|
1557
|
-
t.emit("input",
|
|
1558
|
+
function j(C) {
|
|
1559
|
+
t.emit("input", C);
|
|
1558
1560
|
}
|
|
1559
1561
|
return t.expose({
|
|
1560
|
-
getDisplayText:
|
|
1561
|
-
}), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([
|
|
1562
|
-
o.value =
|
|
1563
|
-
}), () =>
|
|
1562
|
+
getDisplayText: T
|
|
1563
|
+
}), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([C, v, D, p, V]) => {
|
|
1564
|
+
o.value = C, f.value = v, c.value = D, s.value = p, d.value = V;
|
|
1565
|
+
}), () => h(le, {
|
|
1564
1566
|
ref: n,
|
|
1565
1567
|
id: e.id,
|
|
1566
1568
|
disable: o.value,
|
|
1567
1569
|
readonly: d.value,
|
|
1568
1570
|
forcePlaceholder: e.forcePlaceholder,
|
|
1569
|
-
editable:
|
|
1571
|
+
editable: f.value,
|
|
1570
1572
|
buttonContent: e.dropDownIcon,
|
|
1571
1573
|
placeholder: e.placeholder,
|
|
1572
1574
|
enableClear: c.value,
|
|
@@ -1575,35 +1577,35 @@ const U = /* @__PURE__ */ H({
|
|
|
1575
1577
|
enableTitle: e.enableTitle,
|
|
1576
1578
|
multiSelect: e.multiSelect,
|
|
1577
1579
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1578
|
-
modelValue:
|
|
1579
|
-
"onUpdate:modelValue": (
|
|
1580
|
+
modelValue: S.value,
|
|
1581
|
+
"onUpdate:modelValue": (C) => S.value = C,
|
|
1580
1582
|
focusOnCreated: e.focusOnCreated,
|
|
1581
1583
|
selectOnCreated: e.selectOnCreated,
|
|
1582
1584
|
onClear: u,
|
|
1583
|
-
onClick:
|
|
1584
|
-
onChange:
|
|
1585
|
-
onInput:
|
|
1585
|
+
onClick: i,
|
|
1586
|
+
onChange: F,
|
|
1587
|
+
onInput: j,
|
|
1586
1588
|
beforeOpen: e.beforeOpen
|
|
1587
1589
|
}, {
|
|
1588
|
-
default: () => [
|
|
1590
|
+
default: () => [h(Qt, {
|
|
1589
1591
|
idField: e.idField,
|
|
1590
1592
|
valueField: e.valueField,
|
|
1591
1593
|
textField: e.textField,
|
|
1592
1594
|
titleField: e.titleField,
|
|
1593
|
-
dataSource:
|
|
1594
|
-
selectedValues:
|
|
1595
|
+
dataSource: m.value,
|
|
1596
|
+
selectedValues: y.value,
|
|
1595
1597
|
multiSelect: e.multiSelect,
|
|
1596
1598
|
enableSearch: s.value,
|
|
1597
1599
|
maxHeight: e.maxHeight,
|
|
1598
|
-
width: e.fitEditor ?
|
|
1599
|
-
onSelectionChange:
|
|
1600
|
+
width: e.fitEditor ? w.value : void 0,
|
|
1601
|
+
onSelectionChange: g
|
|
1600
1602
|
}, null)]
|
|
1601
1603
|
});
|
|
1602
1604
|
}
|
|
1603
1605
|
});
|
|
1604
|
-
function
|
|
1606
|
+
function Yt(e, t) {
|
|
1605
1607
|
e.schema;
|
|
1606
|
-
const n =
|
|
1608
|
+
const n = b(!0), o = b(!0);
|
|
1607
1609
|
function c(a) {
|
|
1608
1610
|
return !1;
|
|
1609
1611
|
}
|
|
@@ -1613,29 +1615,29 @@ function _t(e, t) {
|
|
|
1613
1615
|
function d() {
|
|
1614
1616
|
return !1;
|
|
1615
1617
|
}
|
|
1616
|
-
function
|
|
1618
|
+
function m() {
|
|
1617
1619
|
return !0;
|
|
1618
1620
|
}
|
|
1619
|
-
function
|
|
1621
|
+
function S(a) {
|
|
1620
1622
|
}
|
|
1621
|
-
function
|
|
1623
|
+
function f() {
|
|
1622
1624
|
}
|
|
1623
|
-
function
|
|
1625
|
+
function y(a) {
|
|
1624
1626
|
return null;
|
|
1625
1627
|
}
|
|
1626
1628
|
return {
|
|
1627
1629
|
canAccepts: c,
|
|
1628
1630
|
checkCanDeleteComponent: s,
|
|
1629
1631
|
checkCanMoveComponent: d,
|
|
1630
|
-
hideNestedPaddingInDesginerView:
|
|
1631
|
-
onAcceptMovedChildElement:
|
|
1632
|
-
resolveComponentContext:
|
|
1632
|
+
hideNestedPaddingInDesginerView: m,
|
|
1633
|
+
onAcceptMovedChildElement: S,
|
|
1634
|
+
resolveComponentContext: f,
|
|
1633
1635
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1634
1636
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1635
|
-
getPropsConfig:
|
|
1637
|
+
getPropsConfig: y
|
|
1636
1638
|
};
|
|
1637
1639
|
}
|
|
1638
|
-
class
|
|
1640
|
+
class me {
|
|
1639
1641
|
static getEditorTypesByMDataType(t) {
|
|
1640
1642
|
return this.fieldControlTypeMapping[t];
|
|
1641
1643
|
}
|
|
@@ -1643,62 +1645,62 @@ class fe {
|
|
|
1643
1645
|
/**
|
|
1644
1646
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1645
1647
|
*/
|
|
1646
|
-
$(
|
|
1648
|
+
$(me, "fieldControlTypeMapping", {
|
|
1647
1649
|
String: [
|
|
1648
|
-
{ key:
|
|
1649
|
-
{ key:
|
|
1650
|
-
{ key:
|
|
1651
|
-
{ key:
|
|
1652
|
-
{ key:
|
|
1653
|
-
{ key:
|
|
1654
|
-
{ key:
|
|
1655
|
-
{ key:
|
|
1650
|
+
{ key: M["input-group"].type, value: M["input-group"].name },
|
|
1651
|
+
{ key: M.lookup.type, value: M.lookup.name },
|
|
1652
|
+
{ key: M.Image.type, value: M.Image.name },
|
|
1653
|
+
{ key: M["date-picker"].type, value: M["date-picker"].name },
|
|
1654
|
+
{ key: M["check-box"].type, value: M["check-box"].name },
|
|
1655
|
+
{ key: M["radio-group"].type, value: M["radio-group"].name },
|
|
1656
|
+
{ key: M["combo-list"].type, value: M["combo-list"].name },
|
|
1657
|
+
{ key: M.textarea.type, value: M.textarea.name }
|
|
1656
1658
|
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
1657
1659
|
],
|
|
1658
1660
|
Text: [
|
|
1659
|
-
{ key:
|
|
1660
|
-
{ key:
|
|
1661
|
-
{ key:
|
|
1661
|
+
{ key: M.textarea.type, value: M.textarea.name },
|
|
1662
|
+
{ key: M.avatar.type, value: M.avatar.name },
|
|
1663
|
+
{ key: M.lookup.type, value: M.lookup.name }
|
|
1662
1664
|
],
|
|
1663
1665
|
Decimal: [
|
|
1664
|
-
{ key:
|
|
1666
|
+
{ key: M["number-spinner"].type, value: M["number-spinner"].name }
|
|
1665
1667
|
],
|
|
1666
1668
|
Integer: [
|
|
1667
|
-
{ key:
|
|
1669
|
+
{ key: M["number-spinner"].type, value: M["number-spinner"].name }
|
|
1668
1670
|
],
|
|
1669
1671
|
Number: [
|
|
1670
|
-
{ key:
|
|
1672
|
+
{ key: M["number-spinner"].type, value: M["number-spinner"].name }
|
|
1671
1673
|
],
|
|
1672
1674
|
BigNumber: [
|
|
1673
|
-
{ key:
|
|
1675
|
+
{ key: M["number-spinner"].type, value: M["number-spinner"].name }
|
|
1674
1676
|
],
|
|
1675
1677
|
Date: [
|
|
1676
|
-
{ key:
|
|
1678
|
+
{ key: M["date-picker"].type, value: M["date-picker"].name }
|
|
1677
1679
|
],
|
|
1678
1680
|
DateTime: [
|
|
1679
|
-
{ key:
|
|
1681
|
+
{ key: M["date-picker"].type, value: M["date-picker"].name }
|
|
1680
1682
|
],
|
|
1681
1683
|
Boolean: [
|
|
1682
|
-
{ key:
|
|
1683
|
-
{ key:
|
|
1684
|
+
{ key: M.switch.type, value: M.switch.name },
|
|
1685
|
+
{ key: M["check-box"].type, value: M["check-box"].name }
|
|
1684
1686
|
],
|
|
1685
1687
|
Enum: [
|
|
1686
|
-
{ key:
|
|
1687
|
-
{ key:
|
|
1688
|
+
{ key: M["combo-list"].type, value: M["combo-list"].name },
|
|
1689
|
+
{ key: M["radio-group"].type, value: M["radio-group"].name }
|
|
1688
1690
|
],
|
|
1689
1691
|
Object: [
|
|
1690
|
-
{ key:
|
|
1691
|
-
{ key:
|
|
1692
|
-
{ key:
|
|
1692
|
+
{ key: M.lookup.type, value: M.lookup.name },
|
|
1693
|
+
{ key: M["combo-list"].type, value: M["combo-list"].name },
|
|
1694
|
+
{ key: M["radio-group"].type, value: M["radio-group"].name }
|
|
1693
1695
|
],
|
|
1694
1696
|
EmployeeSelector: [
|
|
1695
|
-
{ key:
|
|
1697
|
+
{ key: M.EmployeeSelector.type, value: M.EmployeeSelector.name }
|
|
1696
1698
|
],
|
|
1697
1699
|
AdminOrganizationSelector: [
|
|
1698
|
-
{ key:
|
|
1700
|
+
{ key: M.AdminOrganizationSelector.type, value: M.AdminOrganizationSelector.name }
|
|
1699
1701
|
]
|
|
1700
1702
|
});
|
|
1701
|
-
class
|
|
1703
|
+
class Zt {
|
|
1702
1704
|
constructor(t, n) {
|
|
1703
1705
|
$(this, "componentId");
|
|
1704
1706
|
$(this, "viewModelId");
|
|
@@ -1751,7 +1753,7 @@ class Wt {
|
|
|
1751
1753
|
type: "combo-list",
|
|
1752
1754
|
textField: "value",
|
|
1753
1755
|
valueField: "key",
|
|
1754
|
-
data:
|
|
1756
|
+
data: me.getEditorTypesByMDataType(n.designViewModelField.type.name)
|
|
1755
1757
|
}
|
|
1756
1758
|
},
|
|
1757
1759
|
label: {
|
|
@@ -1777,13 +1779,13 @@ class Wt {
|
|
|
1777
1779
|
* @param newControlType 新控件类型
|
|
1778
1780
|
*/
|
|
1779
1781
|
changeControlType(t, n) {
|
|
1780
|
-
var
|
|
1782
|
+
var f, y, a, r, w;
|
|
1781
1783
|
const o = n.propertyValue, c = this.formSchemaUtils.getComponentById(this.componentId);
|
|
1782
1784
|
let s = this.getControlParentContainer(t.id, c);
|
|
1783
1785
|
if (!s)
|
|
1784
1786
|
return;
|
|
1785
|
-
const d = s.contents.findIndex((l) => l.id === t.id),
|
|
1786
|
-
let
|
|
1787
|
+
const d = s.contents.findIndex((l) => l.id === t.id), m = s.contents[d];
|
|
1788
|
+
let S;
|
|
1787
1789
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1788
1790
|
editor: {
|
|
1789
1791
|
$type: o
|
|
@@ -1791,20 +1793,20 @@ class Wt {
|
|
|
1791
1793
|
name: this.designViewModelField.name,
|
|
1792
1794
|
require: this.designViewModelField.require,
|
|
1793
1795
|
readonly: this.designViewModelField.readonly
|
|
1794
|
-
}, !1),
|
|
1795
|
-
id:
|
|
1796
|
-
appearance:
|
|
1797
|
-
size:
|
|
1798
|
-
label:
|
|
1799
|
-
}), Object.assign(
|
|
1800
|
-
isTextArea:
|
|
1796
|
+
}, !1), S = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(S, {
|
|
1797
|
+
id: m.id,
|
|
1798
|
+
appearance: m.appearance,
|
|
1799
|
+
size: m.size,
|
|
1800
|
+
label: m.label
|
|
1801
|
+
}), Object.assign(S.editor, {
|
|
1802
|
+
isTextArea: S.isTextArea && m.isTextArea,
|
|
1801
1803
|
type: o || "",
|
|
1802
|
-
placeHolder: (
|
|
1803
|
-
holdPlace: (
|
|
1804
|
-
readonly: (a =
|
|
1805
|
-
require: (
|
|
1806
|
-
visible: (
|
|
1807
|
-
}), s.contents.splice(d, 1,
|
|
1804
|
+
placeHolder: (f = m.editor) == null ? void 0 : f.placeHolder,
|
|
1805
|
+
holdPlace: (y = m.editor) == null ? void 0 : y.holdPlace,
|
|
1806
|
+
readonly: (a = m.editor) == null ? void 0 : a.readonly,
|
|
1807
|
+
require: (r = m.editor) == null ? void 0 : r.require,
|
|
1808
|
+
visible: (w = m.editor) == null ? void 0 : w.visible
|
|
1809
|
+
}), s.contents.splice(d, 1, S);
|
|
1808
1810
|
}
|
|
1809
1811
|
getAppearanceConfig(t = null) {
|
|
1810
1812
|
return {
|
|
@@ -1874,7 +1876,7 @@ class Wt {
|
|
|
1874
1876
|
};
|
|
1875
1877
|
}
|
|
1876
1878
|
}
|
|
1877
|
-
class
|
|
1879
|
+
class Jt extends Zt {
|
|
1878
1880
|
constructor(t, n) {
|
|
1879
1881
|
super(t, n);
|
|
1880
1882
|
}
|
|
@@ -1944,7 +1946,7 @@ class qt extends Wt {
|
|
|
1944
1946
|
return { ...c, properties: { ...s } };
|
|
1945
1947
|
}
|
|
1946
1948
|
}
|
|
1947
|
-
class
|
|
1949
|
+
class Kt extends Jt {
|
|
1948
1950
|
constructor(t, n) {
|
|
1949
1951
|
super(t, n);
|
|
1950
1952
|
}
|
|
@@ -1968,19 +1970,19 @@ class Qt extends qt {
|
|
|
1968
1970
|
});
|
|
1969
1971
|
}
|
|
1970
1972
|
}
|
|
1971
|
-
function
|
|
1973
|
+
function en(e, t) {
|
|
1972
1974
|
const {
|
|
1973
1975
|
canAccepts: n,
|
|
1974
1976
|
checkCanDeleteComponent: o,
|
|
1975
1977
|
checkCanMoveComponent: c,
|
|
1976
1978
|
hideNestedPaddingInDesginerView: s,
|
|
1977
1979
|
onAcceptMovedChildElement: d,
|
|
1978
|
-
resolveComponentContext:
|
|
1979
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1980
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1981
|
-
} =
|
|
1982
|
-
function a(
|
|
1983
|
-
return new
|
|
1980
|
+
resolveComponentContext: m,
|
|
1981
|
+
triggerBelongedComponentToMoveWhenMoved: S,
|
|
1982
|
+
triggerBelongedComponentToDeleteWhenDeleted: f
|
|
1983
|
+
} = Yt(e), y = e.schema;
|
|
1984
|
+
function a(r) {
|
|
1985
|
+
return new Kt(r, t).getPropertyConfig(y);
|
|
1984
1986
|
}
|
|
1985
1987
|
return {
|
|
1986
1988
|
canAccepts: n,
|
|
@@ -1988,21 +1990,21 @@ function Xt(e, t) {
|
|
|
1988
1990
|
checkCanMoveComponent: c,
|
|
1989
1991
|
hideNestedPaddingInDesginerView: s,
|
|
1990
1992
|
onAcceptMovedChildElement: d,
|
|
1991
|
-
resolveComponentContext:
|
|
1992
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1993
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1993
|
+
resolveComponentContext: m,
|
|
1994
|
+
triggerBelongedComponentToMoveWhenMoved: S,
|
|
1995
|
+
triggerBelongedComponentToDeleteWhenDeleted: f,
|
|
1994
1996
|
getPropsConfig: a
|
|
1995
1997
|
};
|
|
1996
1998
|
}
|
|
1997
|
-
const
|
|
1999
|
+
const tn = /* @__PURE__ */ H({
|
|
1998
2000
|
name: "FComboListDesign",
|
|
1999
2001
|
props: ee,
|
|
2000
2002
|
emits: ["clear", "update:modelValue", "change"],
|
|
2001
2003
|
setup(e, t) {
|
|
2002
|
-
const n =
|
|
2004
|
+
const n = b(), o = q("designer-host-service"), c = q("design-item-context"), s = en(c, o), d = Re(n, c, s);
|
|
2003
2005
|
return ie(() => {
|
|
2004
2006
|
n.value.componentInstance = d;
|
|
2005
|
-
}), t.expose(d.value), () =>
|
|
2007
|
+
}), t.expose(d.value), () => h(le, {
|
|
2006
2008
|
ref: n,
|
|
2007
2009
|
id: e.id,
|
|
2008
2010
|
disable: e.disabled,
|
|
@@ -2019,63 +2021,63 @@ const Yt = /* @__PURE__ */ H({
|
|
|
2019
2021
|
inputType: e.multiSelect ? "tag" : "text"
|
|
2020
2022
|
}, null);
|
|
2021
2023
|
}
|
|
2022
|
-
}),
|
|
2024
|
+
}), nn = (e) => {
|
|
2023
2025
|
const t = e;
|
|
2024
2026
|
return t.install = function(n) {
|
|
2025
2027
|
n.component(t.name, e);
|
|
2026
2028
|
}, e;
|
|
2027
2029
|
};
|
|
2028
2030
|
U.register = (e, t, n, o) => {
|
|
2029
|
-
e["combo-list"] = U, t["combo-list"] =
|
|
2031
|
+
e["combo-list"] = U, t["combo-list"] = fe;
|
|
2030
2032
|
};
|
|
2031
2033
|
U.registerDesigner = (e, t, n) => {
|
|
2032
|
-
e["combo-list"] =
|
|
2034
|
+
e["combo-list"] = tn, t["combo-list"] = fe;
|
|
2033
2035
|
};
|
|
2034
|
-
const z =
|
|
2036
|
+
const z = nn(U), _ = /* @__PURE__ */ H({
|
|
2035
2037
|
name: "FOrder",
|
|
2036
2038
|
props: K,
|
|
2037
2039
|
emits: ["change"],
|
|
2038
2040
|
setup(e, t) {
|
|
2039
|
-
const n =
|
|
2041
|
+
const n = b(e.items), o = b("排序列"), c = b("排序方式"), s = b("添加排序列"), d = [{
|
|
2040
2042
|
id: "asc",
|
|
2041
2043
|
name: "升序"
|
|
2042
2044
|
}, {
|
|
2043
2045
|
id: "desc",
|
|
2044
2046
|
name: "降序"
|
|
2045
|
-
}],
|
|
2046
|
-
function
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2047
|
+
}], m = b(/* @__PURE__ */ new Map());
|
|
2048
|
+
function S() {
|
|
2049
|
+
const i = n.value.map((u) => [u.id, !0]);
|
|
2050
|
+
m.value = new Map(i);
|
|
2049
2051
|
}
|
|
2050
|
-
|
|
2051
|
-
const
|
|
2052
|
+
S();
|
|
2053
|
+
const f = O(() => e.dataSource.map((i) => (i.disabled = m.value.has(i.id), i))), y = O(() => ({
|
|
2052
2054
|
"f-order": !0
|
|
2053
2055
|
}));
|
|
2054
|
-
function a(
|
|
2055
|
-
n.value = n.value.filter((u) => u.id !==
|
|
2056
|
+
function a(i) {
|
|
2057
|
+
n.value = n.value.filter((u) => u.id !== i.id), S(), t.emit("change", n.value);
|
|
2056
2058
|
}
|
|
2057
|
-
function
|
|
2059
|
+
function r() {
|
|
2058
2060
|
n.value = [...n.value, {
|
|
2059
2061
|
id: Date.now().toString(),
|
|
2060
2062
|
name: "",
|
|
2061
2063
|
order: "asc"
|
|
2062
|
-
}],
|
|
2064
|
+
}], S(), t.emit("change", n.value);
|
|
2063
2065
|
}
|
|
2064
|
-
function
|
|
2065
|
-
if (
|
|
2066
|
-
const u =
|
|
2067
|
-
|
|
2066
|
+
function w(i) {
|
|
2067
|
+
if (i && i.length === 1) {
|
|
2068
|
+
const u = i[0], F = n.value.find((T) => T.id === u.id);
|
|
2069
|
+
F && (F.name = u.name);
|
|
2068
2070
|
}
|
|
2069
|
-
|
|
2071
|
+
S(), t.emit("change", n.value);
|
|
2070
2072
|
}
|
|
2071
|
-
function l(
|
|
2072
|
-
if (
|
|
2073
|
+
function l(i) {
|
|
2074
|
+
if (i && i.length) {
|
|
2073
2075
|
const u = /* @__PURE__ */ new Map();
|
|
2074
|
-
|
|
2076
|
+
i.reduce((F, T) => (F.set(T.id, T), F), u), n.value = i.map((F) => u.get(F.id)), t.emit("change", n.value);
|
|
2075
2077
|
}
|
|
2076
2078
|
}
|
|
2077
|
-
function
|
|
2078
|
-
return
|
|
2079
|
+
function g() {
|
|
2080
|
+
return h(de, {
|
|
2079
2081
|
style: "flex:1",
|
|
2080
2082
|
data: n.value,
|
|
2081
2083
|
draggable: !0,
|
|
@@ -2085,145 +2087,145 @@ const z = Zt(U), _ = /* @__PURE__ */ H({
|
|
|
2085
2087
|
onRemoveItem: a,
|
|
2086
2088
|
onChange: l
|
|
2087
2089
|
}, {
|
|
2088
|
-
header: () =>
|
|
2090
|
+
header: () => h("div", {
|
|
2089
2091
|
class: "f-order-header"
|
|
2090
|
-
}, [
|
|
2092
|
+
}, [h("span", {
|
|
2091
2093
|
class: "f-order-header-order-field"
|
|
2092
|
-
}, [o.value]),
|
|
2094
|
+
}, [o.value]), h("span", {
|
|
2093
2095
|
class: "f-order-header-order-type"
|
|
2094
2096
|
}, [c.value])]),
|
|
2095
|
-
itemContent: (
|
|
2097
|
+
itemContent: (i) => h("div", {
|
|
2096
2098
|
class: "f-order-item-content"
|
|
2097
|
-
}, [
|
|
2099
|
+
}, [h(z, {
|
|
2098
2100
|
class: "f-order-item-content-order-field",
|
|
2099
|
-
data:
|
|
2101
|
+
data: f.value,
|
|
2100
2102
|
valueField: "id",
|
|
2101
2103
|
textField: "name",
|
|
2102
2104
|
idField: "id",
|
|
2103
|
-
modelValue:
|
|
2104
|
-
"onUpdate:modelValue": (u) =>
|
|
2105
|
-
onChange:
|
|
2106
|
-
onClear:
|
|
2107
|
-
}, null),
|
|
2105
|
+
modelValue: i.id,
|
|
2106
|
+
"onUpdate:modelValue": (u) => i.id = u,
|
|
2107
|
+
onChange: w,
|
|
2108
|
+
onClear: w
|
|
2109
|
+
}, null), h(z, {
|
|
2108
2110
|
class: "f-order-item-content-order-type",
|
|
2109
2111
|
data: d,
|
|
2110
2112
|
valueField: "id",
|
|
2111
2113
|
textField: "name",
|
|
2112
2114
|
idField: "id",
|
|
2113
|
-
modelValue:
|
|
2114
|
-
"onUpdate:modelValue": (u) =>
|
|
2115
|
-
onChange:
|
|
2115
|
+
modelValue: i.order,
|
|
2116
|
+
"onUpdate:modelValue": (u) => i.order = u,
|
|
2117
|
+
onChange: w
|
|
2116
2118
|
}, null)]),
|
|
2117
|
-
footer: () =>
|
|
2119
|
+
footer: () => h("div", {
|
|
2118
2120
|
class: "f-order-footer"
|
|
2119
|
-
}, [
|
|
2121
|
+
}, [h(pe, {
|
|
2120
2122
|
type: "link",
|
|
2121
2123
|
class: "f-order-add-button",
|
|
2122
|
-
onClick:
|
|
2124
|
+
onClick: r
|
|
2123
2125
|
}, {
|
|
2124
|
-
default: () =>
|
|
2126
|
+
default: () => h(Q, null, [h("span", {
|
|
2125
2127
|
class: "f-order-add-icon"
|
|
2126
|
-
}, [
|
|
2128
|
+
}, [h("i", {
|
|
2127
2129
|
class: "f-icon f-icon-add"
|
|
2128
2130
|
}, null)]), s.value])
|
|
2129
2131
|
})])
|
|
2130
2132
|
});
|
|
2131
2133
|
}
|
|
2132
|
-
return () =>
|
|
2133
|
-
class:
|
|
2134
|
-
}, [
|
|
2134
|
+
return () => h("div", {
|
|
2135
|
+
class: y.value
|
|
2136
|
+
}, [g()]);
|
|
2135
2137
|
}
|
|
2136
2138
|
});
|
|
2137
|
-
function
|
|
2138
|
-
var
|
|
2139
|
+
function on(e, t, n) {
|
|
2140
|
+
var C;
|
|
2139
2141
|
function o() {
|
|
2140
2142
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
2141
2143
|
}
|
|
2142
2144
|
o();
|
|
2143
|
-
const c = n && n.getStyles && n.getStyles() || "", s = n && n.getDesignerClass && n.getDesignerClass() || "", d =
|
|
2144
|
-
function
|
|
2145
|
+
const c = n && n.getStyles && n.getStyles() || "", s = n && n.getDesignerClass && n.getDesignerClass() || "", d = b();
|
|
2146
|
+
function m() {
|
|
2145
2147
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
2146
2148
|
}
|
|
2147
|
-
function
|
|
2149
|
+
function S() {
|
|
2148
2150
|
return !1;
|
|
2149
2151
|
}
|
|
2150
|
-
function
|
|
2152
|
+
function f() {
|
|
2151
2153
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
2152
2154
|
}
|
|
2153
|
-
function
|
|
2155
|
+
function y() {
|
|
2154
2156
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
2155
2157
|
}
|
|
2156
|
-
function a(
|
|
2157
|
-
if (!
|
|
2158
|
+
function a(v) {
|
|
2159
|
+
if (!v || !v.value)
|
|
2158
2160
|
return null;
|
|
2159
|
-
if (
|
|
2160
|
-
return
|
|
2161
|
-
const D =
|
|
2162
|
-
return
|
|
2161
|
+
if (v.value.schema && v.value.schema.type === "component")
|
|
2162
|
+
return v.value;
|
|
2163
|
+
const D = b(v == null ? void 0 : v.value.parent), p = a(D);
|
|
2164
|
+
return p || null;
|
|
2163
2165
|
}
|
|
2164
|
-
function
|
|
2165
|
-
const { componentInstance: D, designerItemElementRef:
|
|
2166
|
-
return !D || !D.value ? null : D.value.canMove ?
|
|
2166
|
+
function r(v = t) {
|
|
2167
|
+
const { componentInstance: D, designerItemElementRef: p } = v;
|
|
2168
|
+
return !D || !D.value ? null : D.value.canMove ? p : r(v.parent);
|
|
2167
2169
|
}
|
|
2168
|
-
function
|
|
2169
|
-
return !!n && n.canAccepts(
|
|
2170
|
+
function w(v) {
|
|
2171
|
+
return !!n && n.canAccepts(v);
|
|
2170
2172
|
}
|
|
2171
2173
|
function l() {
|
|
2172
2174
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2173
2175
|
}
|
|
2174
|
-
function
|
|
2176
|
+
function g() {
|
|
2175
2177
|
}
|
|
2176
|
-
function
|
|
2178
|
+
function i(v, D) {
|
|
2177
2179
|
D && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(D);
|
|
2178
2180
|
}
|
|
2179
|
-
function u(
|
|
2180
|
-
const { componentType: D } =
|
|
2181
|
-
let
|
|
2182
|
-
n && n.onResolveNewComponentSchema && (
|
|
2183
|
-
const
|
|
2184
|
-
return
|
|
2181
|
+
function u(v) {
|
|
2182
|
+
const { componentType: D } = v;
|
|
2183
|
+
let p = R(D, v);
|
|
2184
|
+
n && n.onResolveNewComponentSchema && (p = n.onResolveNewComponentSchema(v, p));
|
|
2185
|
+
const V = D.toLowerCase().replace("-", "_");
|
|
2186
|
+
return p && !p.id && p.type === D && (p.id = `${V}_${Math.random().toString().slice(2, 6)}`), p;
|
|
2185
2187
|
}
|
|
2186
|
-
function
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2189
|
-
let
|
|
2190
|
-
n && n.onAcceptNewChildElement && (
|
|
2191
|
-
const
|
|
2192
|
-
return
|
|
2188
|
+
function F(v, D) {
|
|
2189
|
+
const p = String(v.getAttribute("data-controltype")), V = v.getAttribute("data-feature"), A = V ? JSON.parse(V) : {};
|
|
2190
|
+
A.parentComponentInstance = d.value;
|
|
2191
|
+
let k = R(p, A);
|
|
2192
|
+
n && n.onAcceptNewChildElement && (k = n.onAcceptNewChildElement(v, D, k));
|
|
2193
|
+
const x = p.toLowerCase().replace("-", "_");
|
|
2194
|
+
return k && !k.id && k.type === p && (k.id = `${x}_${Math.random().toString().slice(2, 6)}`), k;
|
|
2193
2195
|
}
|
|
2194
|
-
function v
|
|
2196
|
+
function T(v) {
|
|
2195
2197
|
}
|
|
2196
|
-
function
|
|
2198
|
+
function j(...v) {
|
|
2197
2199
|
if (n && n.getPropsConfig)
|
|
2198
|
-
return n.getPropsConfig(...
|
|
2200
|
+
return n.getPropsConfig(...v);
|
|
2199
2201
|
}
|
|
2200
2202
|
return d.value = {
|
|
2201
|
-
canMove:
|
|
2202
|
-
canSelectParent:
|
|
2203
|
-
canDelete:
|
|
2204
|
-
canNested: !
|
|
2203
|
+
canMove: m(),
|
|
2204
|
+
canSelectParent: S(),
|
|
2205
|
+
canDelete: f(),
|
|
2206
|
+
canNested: !y(),
|
|
2205
2207
|
contents: t == null ? void 0 : t.schema.contents,
|
|
2206
2208
|
elementRef: e,
|
|
2207
|
-
parent: (
|
|
2209
|
+
parent: (C = t == null ? void 0 : t.parent) == null ? void 0 : C.componentInstance,
|
|
2208
2210
|
schema: t == null ? void 0 : t.schema,
|
|
2209
2211
|
styles: c,
|
|
2210
2212
|
designerClass: s,
|
|
2211
|
-
canAccepts:
|
|
2213
|
+
canAccepts: w,
|
|
2212
2214
|
getBelongedComponentInstance: a,
|
|
2213
|
-
getDraggableDesignItemElement:
|
|
2215
|
+
getDraggableDesignItemElement: r,
|
|
2214
2216
|
getDraggingDisplayText: l,
|
|
2215
|
-
getPropConfig:
|
|
2216
|
-
getDragScopeElement:
|
|
2217
|
-
onAcceptMovedChildElement:
|
|
2218
|
-
onAcceptNewChildElement:
|
|
2219
|
-
onChildElementMovedOut:
|
|
2217
|
+
getPropConfig: j,
|
|
2218
|
+
getDragScopeElement: g,
|
|
2219
|
+
onAcceptMovedChildElement: i,
|
|
2220
|
+
onAcceptNewChildElement: F,
|
|
2221
|
+
onChildElementMovedOut: T,
|
|
2220
2222
|
addNewChildComponentSchema: u,
|
|
2221
2223
|
updateDragAndDropRules: o,
|
|
2222
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
2223
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
2224
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || b(!1),
|
|
2225
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || b(!1)
|
|
2224
2226
|
}, d;
|
|
2225
2227
|
}
|
|
2226
|
-
function
|
|
2228
|
+
function an() {
|
|
2227
2229
|
function e(t) {
|
|
2228
2230
|
var c, s;
|
|
2229
2231
|
if (!t)
|
|
@@ -2233,8 +2235,8 @@ function Kt() {
|
|
|
2233
2235
|
return !1;
|
|
2234
2236
|
const o = (s = n.schema.appearance) == null ? void 0 : s.class;
|
|
2235
2237
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
2236
|
-
const d = n.schema.type,
|
|
2237
|
-
if (n.schema.type !== "response-layout-item" && !
|
|
2238
|
+
const d = n.schema.type, m = (d === "response-form" || d === "content-container") && o && o.includes("farris-form");
|
|
2239
|
+
if (n.schema.type !== "response-layout-item" && !m)
|
|
2238
2240
|
return !1;
|
|
2239
2241
|
}
|
|
2240
2242
|
return t.controlType !== "field-set";
|
|
@@ -2243,7 +2245,7 @@ function Kt() {
|
|
|
2243
2245
|
basalDragulaRuleForContainer: e
|
|
2244
2246
|
};
|
|
2245
2247
|
}
|
|
2246
|
-
const
|
|
2248
|
+
const rn = "https://json-schema.org/draft/2020-12/schema", ln = "https://farris-design.gitee.io/dragging-rules.schema.json", sn = "Dragging Rules", cn = "The rules of designer canvas", un = "object", dn = {
|
|
2247
2249
|
"f-page": {
|
|
2248
2250
|
description: "The root class of page designed by farris.",
|
|
2249
2251
|
type: "object",
|
|
@@ -2807,39 +2809,39 @@ const en = "https://json-schema.org/draft/2020-12/schema", tn = "https://farris-
|
|
|
2807
2809
|
description: "",
|
|
2808
2810
|
type: "object"
|
|
2809
2811
|
}
|
|
2810
|
-
},
|
|
2811
|
-
$schema:
|
|
2812
|
-
$id:
|
|
2813
|
-
title:
|
|
2814
|
-
description:
|
|
2815
|
-
type:
|
|
2816
|
-
properties:
|
|
2817
|
-
required:
|
|
2812
|
+
}, pn = [], fn = {
|
|
2813
|
+
$schema: rn,
|
|
2814
|
+
$id: ln,
|
|
2815
|
+
title: sn,
|
|
2816
|
+
description: cn,
|
|
2817
|
+
type: un,
|
|
2818
|
+
properties: dn,
|
|
2819
|
+
required: pn
|
|
2818
2820
|
}, W = /* @__PURE__ */ new Map();
|
|
2819
|
-
function
|
|
2820
|
-
function e(l,
|
|
2821
|
-
var
|
|
2822
|
-
if (typeof
|
|
2823
|
-
return ((
|
|
2824
|
-
if (typeof
|
|
2825
|
-
const
|
|
2826
|
-
if (
|
|
2827
|
-
return Number(u[l].length) !== Number(
|
|
2828
|
-
if (
|
|
2829
|
-
return Number(u[l].length) >= Number(
|
|
2830
|
-
if (
|
|
2831
|
-
return Number(u[l].length) <= Number(
|
|
2821
|
+
function mn() {
|
|
2822
|
+
function e(l, g, i, u) {
|
|
2823
|
+
var F;
|
|
2824
|
+
if (typeof i == "number")
|
|
2825
|
+
return ((F = u[l]) == null ? void 0 : F.length) === i;
|
|
2826
|
+
if (typeof i == "object") {
|
|
2827
|
+
const T = Object.keys(i)[0], j = i[T];
|
|
2828
|
+
if (T === "not")
|
|
2829
|
+
return Number(u[l].length) !== Number(j);
|
|
2830
|
+
if (T === "moreThan")
|
|
2831
|
+
return Number(u[l].length) >= Number(j);
|
|
2832
|
+
if (T === "lessThan")
|
|
2833
|
+
return Number(u[l].length) <= Number(j);
|
|
2832
2834
|
}
|
|
2833
2835
|
return !1;
|
|
2834
2836
|
}
|
|
2835
|
-
function t(l,
|
|
2836
|
-
return typeof
|
|
2837
|
+
function t(l, g, i, u) {
|
|
2838
|
+
return typeof i == "boolean" ? u.childrenClassList.includes(g) === !!i : !1;
|
|
2837
2839
|
}
|
|
2838
|
-
function n(l,
|
|
2839
|
-
return typeof
|
|
2840
|
+
function n(l, g, i, u) {
|
|
2841
|
+
return typeof i == "boolean" ? u.parentClassList.includes(g) === !!i : !1;
|
|
2840
2842
|
}
|
|
2841
|
-
function o(l,
|
|
2842
|
-
return typeof
|
|
2843
|
+
function o(l, g, i, u) {
|
|
2844
|
+
return typeof i == "boolean" ? u.parentClassList.includes(g) === !!i : !1;
|
|
2843
2845
|
}
|
|
2844
2846
|
const c = /* @__PURE__ */ new Map([
|
|
2845
2847
|
["length", e],
|
|
@@ -2847,258 +2849,300 @@ function cn() {
|
|
|
2847
2849
|
["hasSibling", o],
|
|
2848
2850
|
["hasParent", n]
|
|
2849
2851
|
]);
|
|
2850
|
-
function s(l,
|
|
2851
|
-
const
|
|
2852
|
-
return typeof
|
|
2852
|
+
function s(l, g) {
|
|
2853
|
+
const i = l;
|
|
2854
|
+
return typeof g == "number" ? [{ target: i, operator: "length", param: null, value: Number(g) }] : typeof g == "object" ? Object.keys(g).map((u) => {
|
|
2853
2855
|
if (u === "length")
|
|
2854
|
-
return { target:
|
|
2855
|
-
const
|
|
2856
|
-
return { target:
|
|
2856
|
+
return { target: i, operator: "length", param: null, value: g[u] };
|
|
2857
|
+
const F = u, T = g[u];
|
|
2858
|
+
return { target: i, operator: l === "children" ? "hasChildren" : l === "parent" ? "hasParent" : "hasSibling", param: F, value: T };
|
|
2857
2859
|
}) : [];
|
|
2858
2860
|
}
|
|
2859
|
-
function d(l,
|
|
2861
|
+
function d(l, g) {
|
|
2860
2862
|
if (c.has(l.operator)) {
|
|
2861
|
-
const
|
|
2862
|
-
return
|
|
2863
|
+
const i = c.get(l.operator);
|
|
2864
|
+
return i && i(l.target, l.param, l.value, g) || !1;
|
|
2863
2865
|
}
|
|
2864
2866
|
return !1;
|
|
2865
2867
|
}
|
|
2866
|
-
function
|
|
2867
|
-
return Object.keys(l).reduce((
|
|
2868
|
-
const
|
|
2869
|
-
return
|
|
2870
|
-
}, []).reduce((
|
|
2871
|
-
}
|
|
2872
|
-
function
|
|
2873
|
-
const
|
|
2874
|
-
return u ? !
|
|
2875
|
-
}
|
|
2876
|
-
function
|
|
2877
|
-
const
|
|
2878
|
-
return
|
|
2879
|
-
}
|
|
2880
|
-
function
|
|
2881
|
-
return (
|
|
2882
|
-
const
|
|
2883
|
-
return l && l.properties && Object.keys(l.properties).reduce((u,
|
|
2884
|
-
const
|
|
2885
|
-
return u[
|
|
2886
|
-
},
|
|
2868
|
+
function m(l, g) {
|
|
2869
|
+
return Object.keys(l).reduce((T, j) => {
|
|
2870
|
+
const C = s(j, l[j]);
|
|
2871
|
+
return T.push(...C), T;
|
|
2872
|
+
}, []).reduce((T, j) => T && d(j, g), !0);
|
|
2873
|
+
}
|
|
2874
|
+
function S(l, g) {
|
|
2875
|
+
const i = Object.keys(l), u = i.includes("allOf"), F = i.includes("anyOf"), T = u || F, v = (T ? l[T ? u ? "allOf" : "anyOf" : "allOf"] : [l]).map((p) => m(p, g));
|
|
2876
|
+
return u ? !v.includes(!1) : v.includes(!0);
|
|
2877
|
+
}
|
|
2878
|
+
function f(l, g) {
|
|
2879
|
+
const i = l.const;
|
|
2880
|
+
return i ? typeof i == "boolean" ? i : typeof i == "object" ? S(i, g) : !1 : !1;
|
|
2881
|
+
}
|
|
2882
|
+
function y(l) {
|
|
2883
|
+
return (g) => {
|
|
2884
|
+
const i = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2885
|
+
return l && l.properties && Object.keys(l.properties).reduce((u, F) => {
|
|
2886
|
+
const T = l.properties[F];
|
|
2887
|
+
return u[F] = f(T, g), u;
|
|
2888
|
+
}, i), i;
|
|
2887
2889
|
};
|
|
2888
2890
|
}
|
|
2889
|
-
function a(l,
|
|
2890
|
-
if (
|
|
2891
|
-
const { rules: u, contents:
|
|
2892
|
-
|
|
2893
|
-
(
|
|
2891
|
+
function a(l, g, i) {
|
|
2892
|
+
if (g.type === "object" && g.properties) {
|
|
2893
|
+
const { rules: u, contents: F } = g.properties;
|
|
2894
|
+
i.set(l, y(u)), F && Object.keys(F.properties).forEach(
|
|
2895
|
+
(T) => a(T, F.properties[T], i)
|
|
2894
2896
|
);
|
|
2895
2897
|
}
|
|
2896
2898
|
}
|
|
2897
|
-
function
|
|
2898
|
-
const { properties: l } =
|
|
2899
|
-
Object.keys(l).forEach((
|
|
2900
|
-
a(
|
|
2899
|
+
function r() {
|
|
2900
|
+
const { properties: l } = fn;
|
|
2901
|
+
Object.keys(l).forEach((g) => {
|
|
2902
|
+
a(g, l[g], W);
|
|
2901
2903
|
});
|
|
2902
2904
|
}
|
|
2903
|
-
function
|
|
2904
|
-
const
|
|
2905
|
-
return W.has(l) ? W.get(l)(
|
|
2905
|
+
function w(l, g) {
|
|
2906
|
+
const i = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2907
|
+
return W.has(l) ? W.get(l)(g) : i;
|
|
2906
2908
|
}
|
|
2907
|
-
return
|
|
2909
|
+
return r(), { getRuleValue: w };
|
|
2908
2910
|
}
|
|
2909
|
-
function
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2911
|
+
function yn(e, t) {
|
|
2912
|
+
var D;
|
|
2913
|
+
const n = e.schema, o = (D = e.parent) == null ? void 0 : D.schema, c = mn(), s = b(!1), d = b(!1);
|
|
2914
|
+
let m = !0, S = !1, f, y = !1;
|
|
2915
|
+
function a(p) {
|
|
2916
|
+
return f && f.componentClassList && f.componentClassList.includes("f-form-layout") && f.componentClassList.includes("farris-form") ? p.sourceType === "control" && p.controlCategory === "input" || p.sourceType === "move" && p.controlType === "form-group" : !0;
|
|
2914
2917
|
}
|
|
2915
|
-
function
|
|
2916
|
-
return !(!
|
|
2918
|
+
function r(p) {
|
|
2919
|
+
return !(!an().basalDragulaRuleForContainer(p) || !m || !a(p));
|
|
2917
2920
|
}
|
|
2918
|
-
function
|
|
2919
|
-
|
|
2920
|
-
const
|
|
2921
|
-
const
|
|
2922
|
-
return
|
|
2923
|
-
}, []) : [],
|
|
2924
|
-
|
|
2921
|
+
function w() {
|
|
2922
|
+
s.value = !1, d.value = !1;
|
|
2923
|
+
const p = n, V = p.appearance && p.appearance.class || "", A = V.split(" "), k = p.contents || [], x = k.length ? k[0] : null, I = x && x.appearance ? x.appearance.class : "", B = I ? I.split(" ") : [], E = k.length ? k.reduce((te, G) => {
|
|
2924
|
+
const ne = G && G.appearance ? G.appearance.class : "", be = ne ? ne.split(" ") : [];
|
|
2925
|
+
return te.push(...be), te;
|
|
2926
|
+
}, []) : [], P = o, L = P && P.appearance && P.appearance.class || "", ye = L ? L.split(" ") : [];
|
|
2927
|
+
f = {
|
|
2925
2928
|
componentClass: V,
|
|
2926
|
-
componentClassList:
|
|
2927
|
-
childContents:
|
|
2928
|
-
firstChildContent:
|
|
2929
|
-
firstChildClass:
|
|
2930
|
-
firstChildClassList:
|
|
2931
|
-
parent:
|
|
2932
|
-
parentClass:
|
|
2933
|
-
parentClassList:
|
|
2934
|
-
children:
|
|
2935
|
-
childrenClassList:
|
|
2929
|
+
componentClassList: A,
|
|
2930
|
+
childContents: k,
|
|
2931
|
+
firstChildContent: x,
|
|
2932
|
+
firstChildClass: I,
|
|
2933
|
+
firstChildClassList: B,
|
|
2934
|
+
parent: P,
|
|
2935
|
+
parentClass: L,
|
|
2936
|
+
parentClassList: ye,
|
|
2937
|
+
children: k,
|
|
2938
|
+
childrenClassList: E
|
|
2936
2939
|
};
|
|
2937
|
-
const { canAccept:
|
|
2938
|
-
return
|
|
2940
|
+
const { canAccept: ge, fixed: he, hidePadding: ve } = c.getRuleValue(A[0], f);
|
|
2941
|
+
return m = ge, S = ve, y = he, !0;
|
|
2939
2942
|
}
|
|
2940
|
-
function
|
|
2941
|
-
|
|
2943
|
+
function l(p) {
|
|
2944
|
+
ke();
|
|
2942
2945
|
}
|
|
2943
|
-
function
|
|
2944
|
-
return
|
|
2946
|
+
function g() {
|
|
2947
|
+
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2945
2948
|
}
|
|
2946
|
-
function
|
|
2947
|
-
const
|
|
2948
|
-
if ((
|
|
2949
|
-
const { label:
|
|
2950
|
-
return
|
|
2949
|
+
function i(p, V) {
|
|
2950
|
+
const A = n;
|
|
2951
|
+
if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2952
|
+
const { label: I } = p, B = R("form-group");
|
|
2953
|
+
return B.editor = V, B.label = I, u(B), delete B.editor.id, delete B.editor.binding, delete B.editor.appearance, delete B.editor.visible, B;
|
|
2951
2954
|
}
|
|
2952
2955
|
return V;
|
|
2953
2956
|
}
|
|
2954
|
-
function
|
|
2955
|
-
const
|
|
2956
|
-
if (
|
|
2957
|
-
const
|
|
2958
|
-
|
|
2957
|
+
function u(p) {
|
|
2958
|
+
const V = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
2959
|
+
if (V && V.schema && V.schema.componentType) {
|
|
2960
|
+
const A = V.schema.componentType, k = F(A);
|
|
2961
|
+
p.appearance || (p.appearance = {}), p.appearance.class = k;
|
|
2959
2962
|
}
|
|
2960
|
-
return g;
|
|
2961
2963
|
}
|
|
2962
|
-
function
|
|
2963
|
-
|
|
2964
|
+
function F(p) {
|
|
2965
|
+
let V = "";
|
|
2966
|
+
switch (p) {
|
|
2967
|
+
case "form-col-1": {
|
|
2968
|
+
V = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2969
|
+
break;
|
|
2970
|
+
}
|
|
2971
|
+
case "form-col-12": {
|
|
2972
|
+
V = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2973
|
+
break;
|
|
2974
|
+
}
|
|
2975
|
+
case "form-col-2": {
|
|
2976
|
+
V = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2977
|
+
break;
|
|
2978
|
+
}
|
|
2979
|
+
case "form-col-3": {
|
|
2980
|
+
V = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
2981
|
+
break;
|
|
2982
|
+
}
|
|
2983
|
+
case "form-col-4": {
|
|
2984
|
+
V = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
2985
|
+
break;
|
|
2986
|
+
}
|
|
2987
|
+
case "form-col-6": {
|
|
2988
|
+
V = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2989
|
+
break;
|
|
2990
|
+
}
|
|
2991
|
+
case "frame": {
|
|
2992
|
+
V = "col-12";
|
|
2993
|
+
break;
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2996
|
+
return V;
|
|
2964
2997
|
}
|
|
2965
|
-
function
|
|
2966
|
-
|
|
2998
|
+
function T(p, V, A) {
|
|
2999
|
+
const k = n;
|
|
3000
|
+
if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3001
|
+
const B = String(p.innerText), E = R("form-group");
|
|
3002
|
+
return E.editor = A, E.label = B, E;
|
|
3003
|
+
}
|
|
3004
|
+
return A;
|
|
2967
3005
|
}
|
|
2968
|
-
function
|
|
2969
|
-
return
|
|
3006
|
+
function j() {
|
|
3007
|
+
return !y;
|
|
3008
|
+
}
|
|
3009
|
+
function C() {
|
|
3010
|
+
return !y;
|
|
3011
|
+
}
|
|
3012
|
+
function v() {
|
|
3013
|
+
return S;
|
|
2970
3014
|
}
|
|
2971
3015
|
return {
|
|
2972
|
-
canAccepts:
|
|
2973
|
-
checkCanDeleteComponent:
|
|
2974
|
-
checkCanMoveComponent:
|
|
2975
|
-
getStyles:
|
|
2976
|
-
hideNestedPaddingInDesginerView:
|
|
2977
|
-
onAcceptNewChildElement:
|
|
2978
|
-
onAcceptMovedChildElement:
|
|
2979
|
-
resolveComponentContext:
|
|
2980
|
-
onResolveNewComponentSchema:
|
|
2981
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2982
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3016
|
+
canAccepts: r,
|
|
3017
|
+
checkCanDeleteComponent: C,
|
|
3018
|
+
checkCanMoveComponent: j,
|
|
3019
|
+
getStyles: g,
|
|
3020
|
+
hideNestedPaddingInDesginerView: v,
|
|
3021
|
+
onAcceptNewChildElement: T,
|
|
3022
|
+
onAcceptMovedChildElement: l,
|
|
3023
|
+
resolveComponentContext: w,
|
|
3024
|
+
onResolveNewComponentSchema: i,
|
|
3025
|
+
triggerBelongedComponentToMoveWhenMoved: s,
|
|
3026
|
+
triggerBelongedComponentToDeleteWhenDeleted: d
|
|
2983
3027
|
};
|
|
2984
3028
|
}
|
|
2985
|
-
const
|
|
3029
|
+
const gn = /* @__PURE__ */ H({
|
|
2986
3030
|
name: "FOrderDesign",
|
|
2987
3031
|
props: K,
|
|
2988
3032
|
emits: ["change"],
|
|
2989
3033
|
setup(e, t) {
|
|
2990
|
-
var
|
|
2991
|
-
const n =
|
|
3034
|
+
var j;
|
|
3035
|
+
const n = b(e.items), o = b("排序列"), c = b("排序方式"), s = b("添加排序列"), d = [{
|
|
2992
3036
|
id: "asc",
|
|
2993
3037
|
name: "升序"
|
|
2994
3038
|
}, {
|
|
2995
3039
|
id: "desc",
|
|
2996
3040
|
name: "降序"
|
|
2997
|
-
}],
|
|
3041
|
+
}], m = b(/* @__PURE__ */ new Map()), S = b(), f = q("design-item-context"), y = yn(f.schema, (j = f.parent) == null ? void 0 : j.schema), a = on(S, f, y);
|
|
2998
3042
|
ie(() => {
|
|
2999
|
-
|
|
3043
|
+
S.value.componentInstance = a;
|
|
3000
3044
|
}), t.expose(a.value);
|
|
3001
|
-
function
|
|
3002
|
-
const
|
|
3003
|
-
|
|
3045
|
+
function r() {
|
|
3046
|
+
const C = n.value.map((v) => [v.id, !0]);
|
|
3047
|
+
m.value = new Map(C);
|
|
3004
3048
|
}
|
|
3005
|
-
|
|
3006
|
-
const
|
|
3049
|
+
r();
|
|
3050
|
+
const w = O(() => e.dataSource.map((C) => (C.disabled = m.value.has(C.id), C))), l = O(() => ({
|
|
3007
3051
|
"f-order": !0
|
|
3008
3052
|
}));
|
|
3009
|
-
function
|
|
3010
|
-
n.value = n.value.filter((
|
|
3053
|
+
function g(C) {
|
|
3054
|
+
n.value = n.value.filter((v) => v.id !== C.id), r(), t.emit("change", n.value);
|
|
3011
3055
|
}
|
|
3012
|
-
function
|
|
3056
|
+
function i() {
|
|
3013
3057
|
n.value = [...n.value, {
|
|
3014
3058
|
id: Date.now().toString(),
|
|
3015
3059
|
name: "",
|
|
3016
3060
|
order: "asc"
|
|
3017
|
-
}],
|
|
3061
|
+
}], r(), t.emit("change", n.value);
|
|
3018
3062
|
}
|
|
3019
|
-
function u(
|
|
3020
|
-
|
|
3063
|
+
function u(C) {
|
|
3064
|
+
r(), t.emit("change", n.value);
|
|
3021
3065
|
}
|
|
3022
|
-
function
|
|
3023
|
-
if (
|
|
3024
|
-
const
|
|
3025
|
-
|
|
3066
|
+
function F(C) {
|
|
3067
|
+
if (C && C.length) {
|
|
3068
|
+
const v = /* @__PURE__ */ new Map();
|
|
3069
|
+
C.reduce((D, p) => (D.set(p.id, p), D), v), n.value = C.map((D) => v.get(D.id)), t.emit("change", n.value);
|
|
3026
3070
|
}
|
|
3027
3071
|
}
|
|
3028
|
-
function
|
|
3029
|
-
return
|
|
3072
|
+
function T() {
|
|
3073
|
+
return h(de, {
|
|
3030
3074
|
style: "flex:1",
|
|
3031
3075
|
data: n.value,
|
|
3032
3076
|
draggable: !0,
|
|
3033
3077
|
view: "DraggableView",
|
|
3034
3078
|
"keep-order": !0,
|
|
3035
3079
|
itemClass: "f-order-item",
|
|
3036
|
-
onRemoveItem:
|
|
3037
|
-
onChange:
|
|
3080
|
+
onRemoveItem: g,
|
|
3081
|
+
onChange: F
|
|
3038
3082
|
}, {
|
|
3039
|
-
header: () =>
|
|
3083
|
+
header: () => h("div", {
|
|
3040
3084
|
class: "f-order-header"
|
|
3041
|
-
}, [
|
|
3085
|
+
}, [h("span", {
|
|
3042
3086
|
class: "f-order-header-order-field"
|
|
3043
|
-
}, [o.value]),
|
|
3087
|
+
}, [o.value]), h("span", {
|
|
3044
3088
|
class: "f-order-header-order-type"
|
|
3045
3089
|
}, [c.value])]),
|
|
3046
|
-
itemContent: (
|
|
3090
|
+
itemContent: (C) => h("div", {
|
|
3047
3091
|
class: "f-order-item-content"
|
|
3048
|
-
}, [
|
|
3092
|
+
}, [h(z, {
|
|
3049
3093
|
class: "f-order-item-content-order-field",
|
|
3050
|
-
data:
|
|
3094
|
+
data: w.value,
|
|
3051
3095
|
valueField: "id",
|
|
3052
3096
|
textField: "name",
|
|
3053
3097
|
idField: "id",
|
|
3054
|
-
modelValue:
|
|
3055
|
-
"onUpdate:modelValue": (
|
|
3098
|
+
modelValue: C.id,
|
|
3099
|
+
"onUpdate:modelValue": (v) => C.id = v,
|
|
3056
3100
|
onChange: u,
|
|
3057
3101
|
onClear: u
|
|
3058
|
-
}, null),
|
|
3102
|
+
}, null), h(z, {
|
|
3059
3103
|
class: "f-order-item-content-order-type",
|
|
3060
3104
|
data: d,
|
|
3061
3105
|
valueField: "id",
|
|
3062
3106
|
textField: "name",
|
|
3063
3107
|
idField: "id",
|
|
3064
|
-
modelValue:
|
|
3065
|
-
"onUpdate:modelValue": (
|
|
3108
|
+
modelValue: C.order,
|
|
3109
|
+
"onUpdate:modelValue": (v) => C.order = v,
|
|
3066
3110
|
onChange: u
|
|
3067
3111
|
}, null)]),
|
|
3068
|
-
footer: () =>
|
|
3112
|
+
footer: () => h("div", {
|
|
3069
3113
|
class: "f-order-footer"
|
|
3070
|
-
}, [
|
|
3114
|
+
}, [h(pe, {
|
|
3071
3115
|
type: "link",
|
|
3072
3116
|
class: "f-order-add-button",
|
|
3073
|
-
onClick:
|
|
3117
|
+
onClick: i
|
|
3074
3118
|
}, {
|
|
3075
|
-
default: () =>
|
|
3119
|
+
default: () => h(Q, null, [h("span", {
|
|
3076
3120
|
class: "f-order-add-icon"
|
|
3077
|
-
}, [
|
|
3121
|
+
}, [h("i", {
|
|
3078
3122
|
class: "f-icon f-icon-add"
|
|
3079
3123
|
}, null)]), s.value])
|
|
3080
3124
|
})])
|
|
3081
3125
|
});
|
|
3082
3126
|
}
|
|
3083
|
-
return () =>
|
|
3084
|
-
ref:
|
|
3127
|
+
return () => h("div", {
|
|
3128
|
+
ref: S,
|
|
3085
3129
|
class: l.value
|
|
3086
|
-
}, [
|
|
3130
|
+
}, [T()]);
|
|
3087
3131
|
}
|
|
3088
|
-
}),
|
|
3132
|
+
}), kn = {
|
|
3089
3133
|
install(e) {
|
|
3090
3134
|
e.component(_.name, _);
|
|
3091
3135
|
},
|
|
3092
3136
|
register(e, t, n, o) {
|
|
3093
|
-
e.order = _, t.order =
|
|
3137
|
+
e.order = _, t.order = oe;
|
|
3094
3138
|
},
|
|
3095
3139
|
registerDesigner(e, t, n) {
|
|
3096
|
-
e.order =
|
|
3140
|
+
e.order = gn, t.order = oe;
|
|
3097
3141
|
}
|
|
3098
3142
|
};
|
|
3099
3143
|
export {
|
|
3100
3144
|
_ as FOrder,
|
|
3101
|
-
|
|
3145
|
+
kn as default,
|
|
3102
3146
|
K as orderProps,
|
|
3103
|
-
|
|
3147
|
+
oe as propsResolver
|
|
3104
3148
|
};
|