@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,227 +1,227 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var U = (
|
|
4
|
-
import { getCustomStyle as Z, getCustomClass as ee, excludeProperties as
|
|
5
|
-
import
|
|
6
|
-
import { resolveAppearance as
|
|
7
|
-
import { ref as
|
|
8
|
-
import { DgControl as
|
|
9
|
-
import { useFilter as
|
|
1
|
+
var ge = Object.defineProperty;
|
|
2
|
+
var ve = (o, e, t) => e in o ? ge(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var U = (o, e, t) => ve(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { getCustomStyle as Z, getCustomClass as ee, excludeProperties as he, withInstall as we } from "../../components/common/index.esm.js";
|
|
5
|
+
import ye, { listViewProps as Ce, FListViewTable as be } from "../../components/list-view/index.esm.js";
|
|
6
|
+
import { resolveAppearance as Ie, createPropsResolver as se, getPropsResolverGenerator as ie, createCollectionBindingResolver as Ve } from "../../components/dynamic-resolver/index.esm.js";
|
|
7
|
+
import { ref as b, computed as $, createVNode as l, Fragment as j, watch as Se, withModifiers as Me, withDirectives as ke, vModelText as xe, createTextVNode as O, defineComponent as oe, inject as K, onMounted as ae } from "vue";
|
|
8
|
+
import { DgControl as A, canvasChanged as Ee, refreshCanvas as Te, useDesignerComponent as le } from "../../components/designer-canvas/index.esm.js";
|
|
9
|
+
import { useFilter as Pe, useIdentify as Fe, useHierarchy as Re, useGroupData as Ne, useDataView as Be, useSelection as Ue, useRow as $e, useEdit as De, useVisualDataBound as Oe, useVisualDataCell as Ae, useVisualDataRow as Le, useVisualGroupRow as _e, useVisualSummaryRow as je, useVisualData as Ge } from "../../components/data-view/index.esm.js";
|
|
10
10
|
import { LocaleService as qe } from "../../components/locale/index.esm.js";
|
|
11
11
|
import { FCheckbox as X } from "../../components/checkbox/index.esm.js";
|
|
12
|
-
import { cloneDeep as
|
|
13
|
-
function
|
|
14
|
-
function t(
|
|
12
|
+
import { cloneDeep as He } from "lodash-es";
|
|
13
|
+
function We(o, e) {
|
|
14
|
+
function t(i) {
|
|
15
15
|
const s = [];
|
|
16
|
-
let
|
|
17
|
-
for (;
|
|
18
|
-
s.push(
|
|
16
|
+
let c = i.nextNode();
|
|
17
|
+
for (; c; )
|
|
18
|
+
s.push(c), c = i.nextNode();
|
|
19
19
|
return s;
|
|
20
20
|
}
|
|
21
|
-
function n(
|
|
22
|
-
const
|
|
23
|
-
return t(
|
|
21
|
+
function n(i, s) {
|
|
22
|
+
const c = document.createTreeWalker(i, NodeFilter.SHOW_TEXT);
|
|
23
|
+
return t(c).map((m) => ({ textNode: m, text: (m.textContent || "").toLocaleLowerCase() })).map(({ textNode: m, text: f }) => {
|
|
24
24
|
const g = [];
|
|
25
25
|
let w = 0;
|
|
26
26
|
for (; w < f.length; ) {
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
27
|
+
const y = f.indexOf(s, w);
|
|
28
|
+
if (y === -1)
|
|
29
29
|
break;
|
|
30
|
-
g.push(
|
|
30
|
+
g.push(y), w = y + s.length;
|
|
31
31
|
}
|
|
32
|
-
return g.map((
|
|
32
|
+
return g.map((y) => {
|
|
33
33
|
const h = new Range();
|
|
34
|
-
return h.setStart(
|
|
34
|
+
return h.setStart(m, y), h.setEnd(m, y + s.length), h;
|
|
35
35
|
});
|
|
36
36
|
}).flat();
|
|
37
37
|
}
|
|
38
|
-
function a(
|
|
39
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
38
|
+
function a(i) {
|
|
39
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !i || !e))
|
|
40
40
|
return;
|
|
41
|
-
const s = n(e.value,
|
|
42
|
-
CSS.highlights.set("search-result",
|
|
41
|
+
const s = n(e.value, i.toLocaleLowerCase()), c = new Highlight(...s);
|
|
42
|
+
CSS.highlights.set("search-result", c);
|
|
43
43
|
}
|
|
44
44
|
return { search: a };
|
|
45
45
|
}
|
|
46
|
-
function te(
|
|
47
|
-
const
|
|
48
|
-
var
|
|
49
|
-
return ((
|
|
46
|
+
function te(o, e, t, n, a, i, s, c, r, u) {
|
|
47
|
+
const d = b(o.size), m = b(o.textField), f = b(o.titleField), g = b(o.disableField), w = $(() => {
|
|
48
|
+
var p, T;
|
|
49
|
+
return ((p = o.selection) == null ? void 0 : p.multiSelect) && ((T = o.selection) == null ? void 0 : T.showCheckbox);
|
|
50
50
|
}), {
|
|
51
|
-
onMouseenterItem:
|
|
51
|
+
onMouseenterItem: y,
|
|
52
52
|
onMouseoverItem: h,
|
|
53
53
|
onMouseoutItem: S
|
|
54
|
-
} =
|
|
55
|
-
getKey:
|
|
56
|
-
listViewItemClass:
|
|
54
|
+
} = i, {
|
|
55
|
+
getKey: k,
|
|
56
|
+
listViewItemClass: x,
|
|
57
57
|
listViewItemStyle: F,
|
|
58
|
-
onCheckItem:
|
|
58
|
+
onCheckItem: B,
|
|
59
59
|
onClickItem: v
|
|
60
|
-
} = s,
|
|
61
|
-
const
|
|
60
|
+
} = s, M = $(() => {
|
|
61
|
+
const p = {
|
|
62
62
|
"text-overflow": "ellipsis",
|
|
63
63
|
overflow: "hidden",
|
|
64
64
|
"white-space": "nowrap"
|
|
65
65
|
};
|
|
66
|
-
return
|
|
67
|
-
margin:
|
|
68
|
-
...
|
|
66
|
+
return o.itemClass ? p : {
|
|
67
|
+
margin: d.value === "small" ? "0.25rem 0" : "8px 0",
|
|
68
|
+
...p
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
|
-
function
|
|
72
|
-
return
|
|
73
|
-
class:
|
|
74
|
-
id:
|
|
75
|
-
key:
|
|
76
|
-
style: F(
|
|
77
|
-
onClick: (
|
|
78
|
-
onMouseenter: (
|
|
79
|
-
onMouseover: (
|
|
80
|
-
onMouseout: (
|
|
71
|
+
function C(p, T, R) {
|
|
72
|
+
return p.checked = c.findIndexInSelectedItems(p) > -1, l("li", {
|
|
73
|
+
class: x(p, T),
|
|
74
|
+
id: k(p, T),
|
|
75
|
+
key: k(p, T),
|
|
76
|
+
style: F(p, T),
|
|
77
|
+
onClick: (N) => v(p, T, N),
|
|
78
|
+
onMouseenter: (N) => y(N, p, T),
|
|
79
|
+
onMouseover: (N) => h(N, p, T),
|
|
80
|
+
onMouseout: (N) => S(N, p, T)
|
|
81
81
|
}, [w.value && l("div", {
|
|
82
82
|
class: "f-list-select",
|
|
83
|
-
onClick: (
|
|
83
|
+
onClick: (N) => N.stopPropagation()
|
|
84
84
|
}, [l(X, {
|
|
85
|
-
id: "list-" +
|
|
85
|
+
id: "list-" + k(p, T),
|
|
86
86
|
customClass: "listview-checkbox float-left",
|
|
87
|
-
disabled:
|
|
88
|
-
checked:
|
|
89
|
-
"onUpdate:checked": (
|
|
90
|
-
onChange: (
|
|
91
|
-
|
|
87
|
+
disabled: p[g.value],
|
|
88
|
+
checked: p.checked,
|
|
89
|
+
"onUpdate:checked": (N) => p.checked = N,
|
|
90
|
+
onChange: (N) => {
|
|
91
|
+
B(p, T, !N.checked);
|
|
92
92
|
}
|
|
93
93
|
}, null)]), l("div", {
|
|
94
94
|
class: "f-list-content"
|
|
95
95
|
}, [l("div", {
|
|
96
|
-
class:
|
|
97
|
-
style:
|
|
98
|
-
title:
|
|
99
|
-
}, [
|
|
96
|
+
class: o.itemContentClass,
|
|
97
|
+
style: M.value,
|
|
98
|
+
title: p.raw[f.value] || p.raw[m.value]
|
|
99
|
+
}, [p.raw[m.value]])])]);
|
|
100
100
|
}
|
|
101
101
|
return {
|
|
102
|
-
renderItem:
|
|
102
|
+
renderItem: C
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
const
|
|
105
|
+
function ze(o, e, t, n, a, i, s, c, r, u) {
|
|
106
|
+
const d = b(o.multiSelect), m = b(o.disableField), f = b(o.textField), {
|
|
107
107
|
onMouseenterItem: g,
|
|
108
108
|
onMouseoverItem: w,
|
|
109
|
-
onMouseoutItem:
|
|
110
|
-
} =
|
|
109
|
+
onMouseoutItem: y
|
|
110
|
+
} = i, {
|
|
111
111
|
getKey: h,
|
|
112
112
|
listViewItemClass: S,
|
|
113
|
-
listViewItemStyle:
|
|
114
|
-
onCheckItem:
|
|
113
|
+
listViewItemStyle: k,
|
|
114
|
+
onCheckItem: x,
|
|
115
115
|
onClickItem: F,
|
|
116
|
-
updateSelectedItems:
|
|
116
|
+
updateSelectedItems: B
|
|
117
117
|
} = s;
|
|
118
|
-
function v(
|
|
119
|
-
return
|
|
120
|
-
item:
|
|
121
|
-
index:
|
|
122
|
-
selectedItem:
|
|
118
|
+
function v(C, p, T) {
|
|
119
|
+
return o.contentTemplate ? l(j, null, [o.contentTemplate({
|
|
120
|
+
item: C.raw,
|
|
121
|
+
index: p,
|
|
122
|
+
selectedItem: T
|
|
123
123
|
})]) : e.slots.content ? l(j, null, [e.slots.content && e.slots.content({
|
|
124
|
-
item:
|
|
125
|
-
index:
|
|
126
|
-
selectedItem:
|
|
124
|
+
item: C.raw,
|
|
125
|
+
index: p,
|
|
126
|
+
selectedItem: T
|
|
127
127
|
})]) : l("div", {
|
|
128
128
|
style: "margin: 10px 0;"
|
|
129
|
-
}, [
|
|
129
|
+
}, [C.raw[f.value || "name"]]);
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function M(C, p, T) {
|
|
132
132
|
return l("li", {
|
|
133
|
-
class: S(
|
|
134
|
-
id: h(
|
|
135
|
-
key: h(
|
|
136
|
-
style:
|
|
137
|
-
onClick: (R) => F(
|
|
138
|
-
onMouseenter: (R) => g(R,
|
|
139
|
-
onMouseover: (R) => w(R,
|
|
140
|
-
onMouseout: (R) =>
|
|
141
|
-
}, [
|
|
133
|
+
class: S(C, p),
|
|
134
|
+
id: h(C, p),
|
|
135
|
+
key: h(C, p),
|
|
136
|
+
style: k(C, p),
|
|
137
|
+
onClick: (R) => F(C, p, R),
|
|
138
|
+
onMouseenter: (R) => g(R, C, p),
|
|
139
|
+
onMouseover: (R) => w(R, C, p),
|
|
140
|
+
onMouseout: (R) => y(R, C, p)
|
|
141
|
+
}, [d.value && l("div", {
|
|
142
142
|
class: "f-list-select",
|
|
143
143
|
onClick: (R) => R.stopPropagation()
|
|
144
144
|
}, [l(X, {
|
|
145
|
-
id: "list-" + h(
|
|
145
|
+
id: "list-" + h(C, p),
|
|
146
146
|
customClass: "listview-checkbox",
|
|
147
|
-
disabled:
|
|
148
|
-
checked:
|
|
149
|
-
"onUpdate:checked": (R) =>
|
|
147
|
+
disabled: C[m.value],
|
|
148
|
+
checked: C.checked,
|
|
149
|
+
"onUpdate:checked": (R) => C.checked = R,
|
|
150
150
|
onChange: (R) => {
|
|
151
|
-
|
|
151
|
+
x(C, p, !R.checked), B();
|
|
152
152
|
}
|
|
153
153
|
}, null)]), l("div", {
|
|
154
154
|
class: "f-list-content"
|
|
155
|
-
}, [v(
|
|
155
|
+
}, [v(C, p, T)])]);
|
|
156
156
|
}
|
|
157
157
|
return {
|
|
158
|
-
renderItem:
|
|
158
|
+
renderItem: M
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
const
|
|
161
|
+
function Ke(o, e, t, n, a, i, s, c, r, u) {
|
|
162
|
+
const d = b(o.multiSelect), m = b(o.disableField), f = b(o.textField), {
|
|
163
163
|
onMouseenterItem: g,
|
|
164
164
|
onMouseoverItem: w,
|
|
165
|
-
onMouseoutItem:
|
|
166
|
-
} =
|
|
165
|
+
onMouseoutItem: y
|
|
166
|
+
} = i, {
|
|
167
167
|
getKey: h,
|
|
168
168
|
listViewItemClass: S,
|
|
169
|
-
onCheckItem:
|
|
170
|
-
onClickItem:
|
|
169
|
+
onCheckItem: k,
|
|
170
|
+
onClickItem: x
|
|
171
171
|
} = s, {
|
|
172
172
|
dragstart: F,
|
|
173
|
-
dragenter:
|
|
173
|
+
dragenter: B,
|
|
174
174
|
dragover: v,
|
|
175
|
-
dragend:
|
|
175
|
+
dragend: M
|
|
176
176
|
} = n, {
|
|
177
|
-
removeItem:
|
|
178
|
-
} =
|
|
179
|
-
margin:
|
|
177
|
+
removeItem: C
|
|
178
|
+
} = r, p = $(() => ({
|
|
179
|
+
margin: d.value ? "10px 0" : "10px 0px 10px 14px"
|
|
180
180
|
}));
|
|
181
|
-
function
|
|
181
|
+
function T(V, I = "") {
|
|
182
182
|
const D = V.target;
|
|
183
183
|
D.title = D.scrollWidth > D.clientWidth ? I : "";
|
|
184
184
|
}
|
|
185
185
|
function R(V) {
|
|
186
186
|
return l("div", {
|
|
187
|
-
style:
|
|
188
|
-
onMouseenter: (I) =>
|
|
187
|
+
style: p.value,
|
|
188
|
+
onMouseenter: (I) => T(I, V.raw[f.value || "name"])
|
|
189
189
|
}, [V.raw[f.value || "name"]]);
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function N() {
|
|
192
192
|
return e.slots.itemContent ? e.slots.itemContent : R;
|
|
193
193
|
}
|
|
194
|
-
const
|
|
195
|
-
function
|
|
194
|
+
const L = N();
|
|
195
|
+
function E(V, I, D) {
|
|
196
196
|
return l("li", {
|
|
197
197
|
class: S(V, I),
|
|
198
198
|
id: h(V, I),
|
|
199
199
|
key: h(V, I),
|
|
200
|
-
onClick: (P) =>
|
|
200
|
+
onClick: (P) => x(V, I, P),
|
|
201
201
|
onMouseenter: (P) => g(P, V, I),
|
|
202
202
|
onMouseover: (P) => w(P, V, I),
|
|
203
|
-
onMouseout: (P) =>
|
|
203
|
+
onMouseout: (P) => y(P, V, I),
|
|
204
204
|
draggable: "true",
|
|
205
205
|
onDragstart: (P) => F(P, V, I),
|
|
206
|
-
onDragenter: (P) =>
|
|
207
|
-
onDragend: (P) =>
|
|
206
|
+
onDragenter: (P) => B(P, I),
|
|
207
|
+
onDragend: (P) => M(P, V),
|
|
208
208
|
onDragover: (P) => v(P)
|
|
209
|
-
}, [
|
|
209
|
+
}, [d.value && l("div", {
|
|
210
210
|
class: "f-list-select",
|
|
211
211
|
onClick: (P) => P.stopPropagation()
|
|
212
212
|
}, [l(X, {
|
|
213
213
|
id: "list-" + h(V, I),
|
|
214
214
|
customClass: "listview-checkbox",
|
|
215
|
-
disabled: V[
|
|
215
|
+
disabled: V[m.value] || !V.checked,
|
|
216
216
|
checked: V.checked,
|
|
217
217
|
"onUpdate:checked": (P) => V.checked = P,
|
|
218
|
-
onChange: (P) =>
|
|
218
|
+
onChange: (P) => k(V, I, !P.checked)
|
|
219
219
|
}, null)]), l("div", {
|
|
220
220
|
class: "f-list-content"
|
|
221
|
-
}, [
|
|
221
|
+
}, [L(V)]), l("div", {
|
|
222
222
|
class: "f-list-remove",
|
|
223
223
|
onClick: (P) => {
|
|
224
|
-
P.stopPropagation(),
|
|
224
|
+
P.stopPropagation(), C(I);
|
|
225
225
|
}
|
|
226
226
|
}, [l("div", {
|
|
227
227
|
class: "f-list-remove-icon"
|
|
@@ -234,92 +234,92 @@ function Xe(i, e, t, n, a, o, s, d, c, p) {
|
|
|
234
234
|
}, null)])])]);
|
|
235
235
|
}
|
|
236
236
|
return {
|
|
237
|
-
renderItem:
|
|
237
|
+
renderItem: E
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Xe(o, e, t, n, a, i, s, c, r, u) {
|
|
241
241
|
var h;
|
|
242
|
-
const
|
|
243
|
-
collpaseGroupIconClass:
|
|
242
|
+
const d = b(((h = o.group) == null ? void 0 : h.groupFields) || []), {
|
|
243
|
+
collpaseGroupIconClass: m
|
|
244
244
|
} = a, {
|
|
245
245
|
toggleGroupRow: f
|
|
246
|
-
} =
|
|
247
|
-
function g(S,
|
|
248
|
-
|
|
246
|
+
} = u;
|
|
247
|
+
function g(S, k) {
|
|
248
|
+
k.collapse = !k.collapse, t.value = f(k.collapse ? "collapse" : "expand", k, t.value);
|
|
249
249
|
}
|
|
250
|
-
function w(S,
|
|
250
|
+
function w(S, k, x) {
|
|
251
251
|
return e.slots.group ? l(j, null, [e.slots.content && e.slots.group({
|
|
252
252
|
item: S.raw,
|
|
253
|
-
index:
|
|
254
|
-
selectedItem:
|
|
253
|
+
index: k,
|
|
254
|
+
selectedItem: x
|
|
255
255
|
})]) : l("div", {
|
|
256
256
|
class: "f-navlookup-recentHeader",
|
|
257
257
|
onClick: (F) => g(F, S)
|
|
258
258
|
}, [l("div", {
|
|
259
259
|
class: "fv-grid-group-row-icon"
|
|
260
260
|
}, [l("span", {
|
|
261
|
-
class:
|
|
261
|
+
class: m(S)
|
|
262
262
|
}, null)]), l("div", {
|
|
263
263
|
class: "f-navlookup-recommandLabel"
|
|
264
|
-
}, [S.raw[
|
|
264
|
+
}, [S.raw[d.value[S.layer]]])]);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
return S.layer > -1 && w(S,
|
|
266
|
+
function y(S, k, x) {
|
|
267
|
+
return S.layer > -1 && w(S, k, x);
|
|
268
268
|
}
|
|
269
269
|
return {
|
|
270
|
-
renderItem:
|
|
270
|
+
renderItem: y
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const { dataView: a } = t, { updateSelectedItems:
|
|
275
|
-
function s(
|
|
276
|
-
if (
|
|
277
|
-
if (
|
|
273
|
+
function Ye(o, e, t, n) {
|
|
274
|
+
const { dataView: a } = t, { updateSelectedItems: i } = n;
|
|
275
|
+
function s(c) {
|
|
276
|
+
if (c > -1 && c < a.value.length) {
|
|
277
|
+
if (o != null && o.checkBeforeRemoveItem && !o.checkBeforeRemoveItem(a.value[c]))
|
|
278
278
|
return;
|
|
279
|
-
const
|
|
280
|
-
|
|
279
|
+
const r = a.value.splice(c, 1);
|
|
280
|
+
i(), e.emit("removeItem", r[0]);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
return { removeItem: s };
|
|
284
284
|
}
|
|
285
|
-
function
|
|
286
|
-
const
|
|
285
|
+
function Je(o, e, t, n, a, i, s, c, r, u) {
|
|
286
|
+
const d = b(o.view), m = b(o.view === "CardView"), f = b({}), g = Ye(o, e, n, r), w = $(() => ({
|
|
287
287
|
"f-list-view-group": !0,
|
|
288
|
-
"f-list-view-group-multiselect":
|
|
289
|
-
"d-flex":
|
|
290
|
-
"flex-wrap":
|
|
291
|
-
})),
|
|
288
|
+
"f-list-view-group-multiselect": o.multiSelect,
|
|
289
|
+
"d-flex": m.value,
|
|
290
|
+
"flex-wrap": m.value
|
|
291
|
+
})), y = $(() => !!t.value && t.value.length > 0), h = $(() => t.value.length === 0);
|
|
292
292
|
$(() => h.value && !e.slots.empty);
|
|
293
293
|
function S() {
|
|
294
|
-
return
|
|
294
|
+
return d.value === "SingleView" ? te : d.value === "DraggableView" ? Ke : (d.value === "ContentView" || d.value === "CardView") && (o.contentTemplate || e.slots.content) ? ze : te;
|
|
295
295
|
}
|
|
296
|
-
const
|
|
297
|
-
renderItem:
|
|
298
|
-
} =
|
|
296
|
+
const k = S(), {
|
|
297
|
+
renderItem: x
|
|
298
|
+
} = k(o, e, t, u, a, i, r, s, g, c), {
|
|
299
299
|
renderItem: F
|
|
300
|
-
} =
|
|
300
|
+
} = Xe(o, e, t, u, a, i, r, s, g, c), B = [x, F];
|
|
301
301
|
function v() {
|
|
302
|
-
return t.value.filter((
|
|
302
|
+
return t.value.filter((p) => p.visible !== !1).map((p, T) => B[p.type](p, T, f));
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function M() {
|
|
305
305
|
return l("div", {
|
|
306
306
|
class: "f-list-view-emptydata",
|
|
307
307
|
style: "margin: 0 auto;"
|
|
308
308
|
}, [l("p", {
|
|
309
309
|
class: "f-empty-title"
|
|
310
|
-
}, [
|
|
310
|
+
}, [o.emptyTemplate ? o.emptyTemplate() : e.slots.empty ? e.slots.empty() : qe.getLocaleValue("listView.emptyMessage")])]);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function C() {
|
|
313
313
|
return l("ul", {
|
|
314
314
|
class: w.value,
|
|
315
315
|
style: "list-style: none;"
|
|
316
|
-
}, [
|
|
316
|
+
}, [y.value && v(), h.value && M()]);
|
|
317
317
|
}
|
|
318
318
|
return {
|
|
319
|
-
renderListArea:
|
|
319
|
+
renderListArea: C
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Qe(o, e, t) {
|
|
323
323
|
function n() {
|
|
324
324
|
return e.slots.header && l("div", {
|
|
325
325
|
class: "f-list-view-header"
|
|
@@ -329,47 +329,47 @@ function Ze(i, e, t) {
|
|
|
329
329
|
renderHeader: n
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
function ne(
|
|
333
|
-
const n =
|
|
334
|
-
function
|
|
335
|
-
|
|
332
|
+
function ne(o, e, t) {
|
|
333
|
+
const n = b(o.headerClass), a = b(o.placeholder), i = b(""), s = $(() => !i.value), c = $(() => !!i.value);
|
|
334
|
+
function r(f) {
|
|
335
|
+
i.value = "";
|
|
336
336
|
}
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
Se(i, (f) => {
|
|
338
|
+
o.enableHighlightSearch && t.search(f), e.emit("afterSearch", f);
|
|
339
339
|
});
|
|
340
|
-
const
|
|
340
|
+
const u = $(() => {
|
|
341
341
|
const f = {
|
|
342
342
|
"form-group": !0,
|
|
343
343
|
"farris-form-group": !0
|
|
344
344
|
};
|
|
345
|
-
return n.value && n.value.split(" ").reduce((w,
|
|
345
|
+
return n.value && n.value.split(" ").reduce((w, y) => (w[y] = !0, w), f), f;
|
|
346
346
|
});
|
|
347
|
-
function
|
|
347
|
+
function d(f) {
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function m() {
|
|
350
350
|
return l("div", {
|
|
351
351
|
class: "f-list-view-header",
|
|
352
|
-
onClick:
|
|
352
|
+
onClick: Me(() => d, ["prevent", "stop"])
|
|
353
353
|
}, [l("div", {
|
|
354
|
-
class:
|
|
354
|
+
class: u.value
|
|
355
355
|
}, [l("div", {
|
|
356
356
|
class: "farris-input-wrap"
|
|
357
357
|
}, [l("div", {
|
|
358
358
|
class: "f-cmp-inputgroup"
|
|
359
359
|
}, [l("div", {
|
|
360
360
|
class: "input-group f-state-editable"
|
|
361
|
-
}, [
|
|
361
|
+
}, [ke(l("input", {
|
|
362
362
|
class: "form-control f-utils-fill text-left",
|
|
363
|
-
"onUpdate:modelValue": (f) =>
|
|
363
|
+
"onUpdate:modelValue": (f) => i.value = f,
|
|
364
364
|
name: "input-group-value",
|
|
365
365
|
type: "text",
|
|
366
366
|
placeholder: a.value,
|
|
367
367
|
autocomplete: "off"
|
|
368
|
-
}, null), [[
|
|
368
|
+
}, null), [[xe, i.value]]), l("div", {
|
|
369
369
|
class: "input-group-append"
|
|
370
|
-
}, [
|
|
370
|
+
}, [c.value && l("span", {
|
|
371
371
|
class: "input-group-text input-group-clear",
|
|
372
|
-
onClick: (f) =>
|
|
372
|
+
onClick: (f) => r()
|
|
373
373
|
}, [l("i", {
|
|
374
374
|
class: "f-icon f-icon-close-circle"
|
|
375
375
|
}, null)]), s.value && l("span", {
|
|
@@ -379,54 +379,54 @@ function ne(i, e, t) {
|
|
|
379
379
|
}, null)])])])])])])]);
|
|
380
380
|
}
|
|
381
381
|
return {
|
|
382
|
-
renderHeader:
|
|
382
|
+
renderHeader: m
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
const
|
|
387
|
-
function
|
|
385
|
+
function Ze() {
|
|
386
|
+
const o = b(""), e = b(-1), t = b(""), n = b(-1), a = b(!1);
|
|
387
|
+
function i(m, f, g) {
|
|
388
388
|
n.value = g;
|
|
389
389
|
}
|
|
390
|
-
function s(
|
|
390
|
+
function s(m, f, g) {
|
|
391
391
|
a.value || (n.value = g);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function c(m, f, g) {
|
|
394
394
|
n.value = -1;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function r() {
|
|
397
397
|
a.value = !0;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function u() {
|
|
400
400
|
a.value = !1;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
e.value = -1,
|
|
402
|
+
function d() {
|
|
403
|
+
e.value = -1, o.value = "";
|
|
404
404
|
}
|
|
405
405
|
return {
|
|
406
406
|
activeIndex: e,
|
|
407
407
|
focusedItemId: t,
|
|
408
408
|
hoverIndex: n,
|
|
409
|
-
clearActiveItem:
|
|
410
|
-
onMouseenterItem:
|
|
409
|
+
clearActiveItem: d,
|
|
410
|
+
onMouseenterItem: i,
|
|
411
411
|
onMouseoverItem: s,
|
|
412
|
-
onMouseoutItem:
|
|
413
|
-
resumeHover:
|
|
414
|
-
suspendHover:
|
|
412
|
+
onMouseoutItem: c,
|
|
413
|
+
resumeHover: u,
|
|
414
|
+
suspendHover: r
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
function
|
|
418
|
-
const a =
|
|
419
|
-
let g, w = 0,
|
|
420
|
-
function h(v,
|
|
421
|
-
const
|
|
422
|
-
g.style.left = parseInt(g.style.left) +
|
|
417
|
+
function et(o, e, t, n) {
|
|
418
|
+
const a = b(o.idField), { dataView: i } = t, s = b(-1), c = b(!1), { activeIndex: r, focusedItemId: u, hoverIndex: d, resumeHover: m, suspendHover: f } = n;
|
|
419
|
+
let g, w = 0, y = 0;
|
|
420
|
+
function h(v, M) {
|
|
421
|
+
const C = v - w, p = M - y;
|
|
422
|
+
g.style.left = parseInt(g.style.left) + C + "px", g.style.top = parseInt(g.style.top) + p + "px", w = v, y = M;
|
|
423
423
|
}
|
|
424
424
|
function S(v) {
|
|
425
|
-
const { left:
|
|
426
|
-
return
|
|
425
|
+
const { left: M, top: C } = v.getBoundingClientRect(), p = v.cloneNode(!0);
|
|
426
|
+
return p.className = p.className + " f-listview-drag-moving", p.style.cssText = `
|
|
427
427
|
position:absolute;
|
|
428
|
-
left:${
|
|
429
|
-
top:${document.documentElement.scrollTop ?
|
|
428
|
+
left:${M}px;
|
|
429
|
+
top:${document.documentElement.scrollTop ? C + document.documentElement.scrollTop : C}px;
|
|
430
430
|
z-index: 999999;
|
|
431
431
|
pointer-events: none;
|
|
432
432
|
border-radius: 10px;
|
|
@@ -437,219 +437,219 @@ function tt(i, e, t, n) {
|
|
|
437
437
|
text-align: initial;
|
|
438
438
|
width:${getComputedStyle(v).width};
|
|
439
439
|
height:${getComputedStyle(v).height};
|
|
440
|
-
`,
|
|
440
|
+
`, p.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", p.children[0].children[0].style.cssText = `
|
|
441
441
|
margin: 10px 0px 10px 14px;
|
|
442
442
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
443
|
-
`,
|
|
443
|
+
`, p.children[1].style.cssText = "width: 30px;padding: 0 14px 0 0", p.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(p), p;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
446
|
-
if (v.stopPropagation(), f(),
|
|
445
|
+
function k(v, M, C) {
|
|
446
|
+
if (v.stopPropagation(), f(), M) {
|
|
447
447
|
if (g = S(v.target), v.dataTransfer) {
|
|
448
|
-
const
|
|
449
|
-
|
|
448
|
+
const p = new Image();
|
|
449
|
+
p.src = "", v.dataTransfer.setDragImage(p, 0, 0);
|
|
450
450
|
}
|
|
451
|
-
w = v.pageX,
|
|
452
|
-
s.value =
|
|
451
|
+
w = v.pageX, y = v.pageY, setTimeout(() => {
|
|
452
|
+
s.value = C, c.value = !0, M.moving = !0;
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
function
|
|
457
|
-
if (v.preventDefault(), s.value !==
|
|
458
|
-
const
|
|
459
|
-
|
|
456
|
+
function x(v, M) {
|
|
457
|
+
if (v.preventDefault(), s.value !== M) {
|
|
458
|
+
const C = i.value[s.value], p = i.value;
|
|
459
|
+
p.splice(s.value, 1), p.splice(M, 0, C), s.value = M, h(v.pageX, v.pageY);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
function F(v) {
|
|
463
463
|
v.preventDefault(), v.dataTransfer && (v.dataTransfer.dropEffect = "move"), h(v.pageX, v.pageY);
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}),
|
|
465
|
+
function B(v, M) {
|
|
466
|
+
M && (M.moving = !1, g && (document.body.removeChild(g), g = null)), i.value.forEach((C, p) => {
|
|
467
|
+
C.__fv_index__ = p;
|
|
468
|
+
}), c.value = !1, m(), d.value = M.raw.__fv_index__, r.value = M.raw.__fv_index__, u.value = M.raw[a.value], e.emit("change", i.value), e.emit("activeChange", [M.raw]);
|
|
469
469
|
}
|
|
470
470
|
return {
|
|
471
|
-
dragstart:
|
|
472
|
-
dragenter:
|
|
471
|
+
dragstart: k,
|
|
472
|
+
dragenter: x,
|
|
473
473
|
dragover: F,
|
|
474
|
-
dragend:
|
|
475
|
-
isDragging:
|
|
474
|
+
dragend: B,
|
|
475
|
+
isDragging: c
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
const s =
|
|
480
|
-
|
|
481
|
-
const
|
|
478
|
+
function tt(o, e, t, n, a, i) {
|
|
479
|
+
const s = b(o.idField), c = b(o.disableField), r = b(o.draggable);
|
|
480
|
+
b(o.itemClass);
|
|
481
|
+
const u = b(o.selection.multiSelect ?? !1), d = b(o.selection.multiSelectMode), { isDragging: m } = n, { activeIndex: f, focusedItemId: g, hoverIndex: w } = a, { clearSelection: y, getSelectedItems: h, toggleSelectItem: S, currentSelectedDataId: k } = i, x = b(h()), F = (E) => x.value.length === 0 ? !1 : x.value.some((V) => {
|
|
482
482
|
let I = "";
|
|
483
|
-
return V.data ? I = V.data[s.value] : I = V[s.value], I ===
|
|
483
|
+
return V.data ? I = V.data[s.value] : I = V[s.value], I === E;
|
|
484
484
|
});
|
|
485
|
-
function
|
|
486
|
-
|
|
485
|
+
function B() {
|
|
486
|
+
x.value = h();
|
|
487
487
|
}
|
|
488
|
-
function v(
|
|
489
|
-
return
|
|
488
|
+
function v(E, V) {
|
|
489
|
+
return E.raw[s.value] != null ? E.raw[s.value] : "";
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function M(E, V) {
|
|
492
492
|
const I = {
|
|
493
493
|
"f-list-view-group-item": !0,
|
|
494
|
-
"f-list-view-draggable-item":
|
|
495
|
-
"f-un-click": !
|
|
496
|
-
"f-un-select": !!
|
|
494
|
+
"f-list-view-draggable-item": r.value,
|
|
495
|
+
"f-un-click": !E.checked,
|
|
496
|
+
"f-un-select": !!E.raw[c.value],
|
|
497
497
|
"f-listview-active": (
|
|
498
498
|
// 多选
|
|
499
|
-
|
|
500
|
-
!
|
|
499
|
+
u.value && F(v(E)) || // 单选
|
|
500
|
+
!u.value && E.raw[s.value] === k.value
|
|
501
501
|
),
|
|
502
|
-
"f-listview-hover": !
|
|
503
|
-
moving: !!
|
|
502
|
+
"f-listview-hover": !m.value && V === w.value,
|
|
503
|
+
moving: !!E.moving
|
|
504
504
|
};
|
|
505
|
-
if (typeof
|
|
506
|
-
return ee(I,
|
|
507
|
-
if (typeof
|
|
508
|
-
const D =
|
|
505
|
+
if (typeof o.itemClass == "string")
|
|
506
|
+
return ee(I, o.itemClass);
|
|
507
|
+
if (typeof o.itemClass == "function") {
|
|
508
|
+
const D = o.itemClass(E);
|
|
509
509
|
return ee(I, D);
|
|
510
510
|
}
|
|
511
511
|
return I;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function C(E, V) {
|
|
514
514
|
const I = {};
|
|
515
|
-
if (typeof
|
|
516
|
-
return Z(I,
|
|
517
|
-
if (typeof
|
|
518
|
-
const D =
|
|
515
|
+
if (typeof o.itemStyle == "string")
|
|
516
|
+
return Z(I, o.itemStyle);
|
|
517
|
+
if (typeof o.itemStyle == "function") {
|
|
518
|
+
const D = o.itemStyle(E);
|
|
519
519
|
return Z(I, D);
|
|
520
520
|
}
|
|
521
521
|
return I;
|
|
522
522
|
}
|
|
523
|
-
const
|
|
524
|
-
function
|
|
525
|
-
|
|
523
|
+
const p = $(() => !u.value);
|
|
524
|
+
function T(E, V, I) {
|
|
525
|
+
E.checked = I, !E.raw[c.value] && (p.value && (g.value = E.raw[s.value]), S(E));
|
|
526
526
|
}
|
|
527
|
-
const R = $(() =>
|
|
528
|
-
function
|
|
529
|
-
if (
|
|
527
|
+
const R = $(() => u.value && d.value === "OnCheckClearByClick"), N = $(() => !u.value || u.value && (d.value === "OnCheckAndClick" || d.value === "OnClick"));
|
|
528
|
+
function L(E, V, I) {
|
|
529
|
+
if (E.raw[c.value]) {
|
|
530
530
|
I == null || I.preventDefault(), I == null || I.stopPropagation();
|
|
531
531
|
return;
|
|
532
532
|
}
|
|
533
|
-
|
|
533
|
+
k.value = E.raw[s.value], g.value = E.raw[s.value], f.value = V, R.value && y(), N.value && (S(E), B()), e.emit("clickItem", { data: x.value, index: V, dataItem: E.raw }), e.emit("activeChange", x.value);
|
|
534
534
|
}
|
|
535
535
|
return {
|
|
536
536
|
getKey: v,
|
|
537
|
-
selectedItems:
|
|
538
|
-
listViewItemClass:
|
|
539
|
-
listViewItemStyle:
|
|
540
|
-
updateSelectedItems:
|
|
541
|
-
onCheckItem:
|
|
542
|
-
onClickItem:
|
|
537
|
+
selectedItems: x,
|
|
538
|
+
listViewItemClass: M,
|
|
539
|
+
listViewItemStyle: C,
|
|
540
|
+
updateSelectedItems: B,
|
|
541
|
+
onCheckItem: T,
|
|
542
|
+
onClickItem: L
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
|
-
const
|
|
546
|
-
["appearance",
|
|
547
|
-
]),
|
|
548
|
-
function
|
|
545
|
+
const q = /* @__PURE__ */ new Map([
|
|
546
|
+
["appearance", Ie]
|
|
547
|
+
]), nt = "root-viewmodel";
|
|
548
|
+
function st(o, e) {
|
|
549
549
|
const {
|
|
550
550
|
formSchemaUtils: t,
|
|
551
551
|
designViewModelUtils: n
|
|
552
552
|
} = e;
|
|
553
|
-
function a(
|
|
553
|
+
function a(d) {
|
|
554
554
|
return {
|
|
555
|
-
id: `${
|
|
556
|
-
code: `${
|
|
557
|
-
name:
|
|
558
|
-
bindTo:
|
|
559
|
-
parent:
|
|
555
|
+
id: `${d.componentId}-component-viewmodel`,
|
|
556
|
+
code: `${d.componentId}-component-viewmodel`,
|
|
557
|
+
name: d.componentName,
|
|
558
|
+
bindTo: d.bindTo,
|
|
559
|
+
parent: nt,
|
|
560
560
|
fields: [],
|
|
561
561
|
commands: [],
|
|
562
562
|
states: [],
|
|
563
563
|
enableValidation: !0
|
|
564
564
|
};
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
const
|
|
568
|
-
return Object.assign(
|
|
569
|
-
id: `${
|
|
570
|
-
component: `${
|
|
571
|
-
}),
|
|
566
|
+
function i(d) {
|
|
567
|
+
const m = o.getSchemaByType("component-ref");
|
|
568
|
+
return Object.assign(m, {
|
|
569
|
+
id: `${d.componentId}-component-ref`,
|
|
570
|
+
component: `${d.componentId}-component`
|
|
571
|
+
}), m;
|
|
572
572
|
}
|
|
573
|
-
function s(
|
|
574
|
-
var h, S,
|
|
575
|
-
const g = (S = (h =
|
|
573
|
+
function s(d, m, f) {
|
|
574
|
+
var h, S, k, x;
|
|
575
|
+
const g = (S = (h = m == null ? void 0 : m.parentComponentInstance) == null ? void 0 : h.schema) == null ? void 0 : S.type, w = (x = (k = t.getFormSchema()) == null ? void 0 : k.module) == null ? void 0 : x.templateId;
|
|
576
576
|
if (["double-list-template", "tree-list-template", "list-template"].includes(w))
|
|
577
|
-
return
|
|
578
|
-
const
|
|
579
|
-
if (g &&
|
|
580
|
-
const F =
|
|
577
|
+
return d;
|
|
578
|
+
const y = [A["content-container"].type, A["response-layout-item"].type, A["splitter-pane"].type, A.drawer.type];
|
|
579
|
+
if (g && y.includes(g)) {
|
|
580
|
+
const F = o.getSchemaByType(
|
|
581
581
|
"section",
|
|
582
582
|
{
|
|
583
|
-
parentComponentInstance:
|
|
584
|
-
mainTitle:
|
|
583
|
+
parentComponentInstance: m.parentComponentInstance,
|
|
584
|
+
mainTitle: m.componentName
|
|
585
585
|
},
|
|
586
586
|
e
|
|
587
587
|
);
|
|
588
588
|
if (F && F.contents && F.contents.length) {
|
|
589
|
-
const
|
|
590
|
-
return
|
|
589
|
+
const B = F.contents[0];
|
|
590
|
+
return B.contents = [d], F;
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
return
|
|
593
|
+
return d;
|
|
594
594
|
}
|
|
595
|
-
function d
|
|
596
|
-
var w,
|
|
597
|
-
const
|
|
595
|
+
function c(d) {
|
|
596
|
+
var w, y, h;
|
|
597
|
+
const m = o.getSchemaByType("list-view");
|
|
598
598
|
let f = !1;
|
|
599
|
-
const g = (h = (
|
|
600
|
-
return g && g.includes("f-page-main") && (f = !0), Object.assign(
|
|
601
|
-
id:
|
|
599
|
+
const g = (h = (y = (w = d.parentComponentInstance) == null ? void 0 : w.schema) == null ? void 0 : y.appearance) == null ? void 0 : h.class;
|
|
600
|
+
return g && g.includes("f-page-main") && (f = !0), Object.assign(m, {
|
|
601
|
+
id: d.componentId + "-listView",
|
|
602
602
|
appearance: {
|
|
603
603
|
class: f ? "" : "f-grid-is-sub"
|
|
604
604
|
},
|
|
605
605
|
type: "list-view",
|
|
606
|
-
dataSource:
|
|
606
|
+
dataSource: d.dataSource || "",
|
|
607
607
|
pagination: {
|
|
608
608
|
enable: !1
|
|
609
609
|
}
|
|
610
|
-
}), [
|
|
610
|
+
}), [m];
|
|
611
611
|
}
|
|
612
|
-
function
|
|
613
|
-
var
|
|
614
|
-
const
|
|
612
|
+
function r(d) {
|
|
613
|
+
var y, h, S;
|
|
614
|
+
const m = o.getSchemaByType("component"), f = c(d);
|
|
615
615
|
let g = !1;
|
|
616
|
-
const w = (S = (h = (
|
|
617
|
-
return w && w.includes("f-page-main") && (g = !0), Object.assign(
|
|
618
|
-
id: `${
|
|
619
|
-
viewModel: `${
|
|
620
|
-
componentType:
|
|
616
|
+
const w = (S = (h = (y = d.parentComponentInstance) == null ? void 0 : y.schema) == null ? void 0 : h.appearance) == null ? void 0 : S.class;
|
|
617
|
+
return w && w.includes("f-page-main") && (g = !0), Object.assign(m, {
|
|
618
|
+
id: `${d.componentId}-component`,
|
|
619
|
+
viewModel: `${d.componentId}-component-viewmodel`,
|
|
620
|
+
componentType: d.componentType,
|
|
621
621
|
contents: f,
|
|
622
622
|
appearance: {
|
|
623
623
|
class: g ? "f-struct-wrapper f-utils-fill-flex-column" : ""
|
|
624
624
|
}
|
|
625
|
-
}),
|
|
625
|
+
}), m;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
const
|
|
629
|
-
return w.module.viewmodels.push(g), w.module.components.push(f), n.assembleDesignViewModel(), s(
|
|
627
|
+
function u(d) {
|
|
628
|
+
const m = i(d), f = r(d), g = a(d), w = t.getFormSchema();
|
|
629
|
+
return w.module.viewmodels.push(g), w.module.components.push(f), n.assembleDesignViewModel(), s(m, d);
|
|
630
630
|
}
|
|
631
|
-
return { createComponent:
|
|
631
|
+
return { createComponent: u };
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
var
|
|
633
|
+
function H(o, e, t, n) {
|
|
634
|
+
var i, s, c, r, u, d;
|
|
635
635
|
const a = t.parentComponentInstance;
|
|
636
636
|
if (a && n) {
|
|
637
|
-
const
|
|
638
|
-
componentId: `list-view-${
|
|
639
|
-
componentName: ((
|
|
637
|
+
const m = Math.random().toString(36).slice(2, 6), f = {
|
|
638
|
+
componentId: `list-view-${m}`,
|
|
639
|
+
componentName: ((i = t.bindingSourceContext) == null ? void 0 : i.entityTitle) || ((c = (s = t.bindingSourceContext) == null ? void 0 : s.bindingEntity) == null ? void 0 : c.name) || `列表-${m}`,
|
|
640
640
|
componentType: "list-view",
|
|
641
641
|
parentContainerId: a.schema.id,
|
|
642
642
|
parentComponentInstance: a,
|
|
643
643
|
// editable: true,
|
|
644
|
-
bindTo: ((
|
|
645
|
-
dataSource: (
|
|
644
|
+
bindTo: ((r = t.bindingSourceContext) == null ? void 0 : r.bindTo) || "",
|
|
645
|
+
dataSource: (d = (u = t.bindingSourceContext) == null ? void 0 : u.bindingEntity) == null ? void 0 : d.label
|
|
646
646
|
// selectedFields: context.bindingSourceContext?.bindingEntityFields
|
|
647
|
-
}, { createComponent: g } =
|
|
647
|
+
}, { createComponent: g } = st(o, n);
|
|
648
648
|
return g(f);
|
|
649
649
|
} else
|
|
650
650
|
return e;
|
|
651
651
|
}
|
|
652
|
-
const
|
|
652
|
+
const it = "https://json-schema.org/draft/2020-12/schema", ot = "https://farris-design.gitee.io/list-view.schema.json", at = "list-view", lt = "A Farris Component", rt = "object", ct = {
|
|
653
653
|
id: {
|
|
654
654
|
description: "The unique identifier for list-view",
|
|
655
655
|
type: "string"
|
|
@@ -741,59 +741,59 @@ const ot = "https://json-schema.org/draft/2020-12/schema", at = "https://farris-
|
|
|
741
741
|
type: "string",
|
|
742
742
|
default: ""
|
|
743
743
|
}
|
|
744
|
-
},
|
|
744
|
+
}, dt = [
|
|
745
745
|
"id",
|
|
746
746
|
"type"
|
|
747
|
-
],
|
|
747
|
+
], ut = {
|
|
748
748
|
onClickItem: "行点击事件"
|
|
749
749
|
}, re = {
|
|
750
|
-
$schema:
|
|
751
|
-
$id:
|
|
752
|
-
title:
|
|
753
|
-
description:
|
|
754
|
-
type:
|
|
755
|
-
properties:
|
|
756
|
-
required:
|
|
757
|
-
events:
|
|
758
|
-
}, Y =
|
|
750
|
+
$schema: it,
|
|
751
|
+
$id: ot,
|
|
752
|
+
title: at,
|
|
753
|
+
description: lt,
|
|
754
|
+
type: rt,
|
|
755
|
+
properties: ct,
|
|
756
|
+
required: dt,
|
|
757
|
+
events: ut
|
|
758
|
+
}, Y = he(Ce, "headerTemplate"), Lt = se(Y, re, q, H), ce = ie(
|
|
759
759
|
Y,
|
|
760
760
|
re,
|
|
761
|
-
|
|
762
|
-
|
|
761
|
+
q,
|
|
762
|
+
H
|
|
763
763
|
), z = {
|
|
764
764
|
"tab-page": { type: "tab-page" },
|
|
765
765
|
section: { type: "section" },
|
|
766
766
|
"list-view": { name: "列表" }
|
|
767
767
|
};
|
|
768
|
-
function
|
|
769
|
-
const { formSchemaUtils: e, formStateMachineUtils: t } =
|
|
770
|
-
function n(
|
|
768
|
+
function mt(o) {
|
|
769
|
+
const { formSchemaUtils: e, formStateMachineUtils: t } = o;
|
|
770
|
+
function n(r, u = "") {
|
|
771
771
|
return {
|
|
772
|
-
path:
|
|
773
|
-
field:
|
|
774
|
-
fullPath:
|
|
772
|
+
path: u + r.code,
|
|
773
|
+
field: r.id,
|
|
774
|
+
fullPath: r.code
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
-
function a(
|
|
778
|
-
const
|
|
779
|
-
return
|
|
777
|
+
function a(r, u = "") {
|
|
778
|
+
const d = e.getViewModelById(r);
|
|
779
|
+
return d ? d.states.map((m) => n(m, u)) : [];
|
|
780
780
|
}
|
|
781
|
-
function
|
|
782
|
-
const
|
|
783
|
-
if (
|
|
784
|
-
return
|
|
785
|
-
const
|
|
786
|
-
return [...
|
|
781
|
+
function i(r) {
|
|
782
|
+
const u = e.getRootViewModelId(), d = a(r);
|
|
783
|
+
if (r === u)
|
|
784
|
+
return d;
|
|
785
|
+
const m = a(u, "root-component.");
|
|
786
|
+
return [...d, ...m];
|
|
787
787
|
}
|
|
788
|
-
function s(
|
|
789
|
-
return
|
|
788
|
+
function s(r) {
|
|
789
|
+
return r.binding && r.binding.path || r.id || "";
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function c() {
|
|
792
792
|
return t && t.getRenderStates() || [];
|
|
793
793
|
}
|
|
794
|
-
return { getVariables:
|
|
794
|
+
return { getVariables: i, getControlName: s, getStateMachines: c };
|
|
795
795
|
}
|
|
796
|
-
class
|
|
796
|
+
class pt {
|
|
797
797
|
constructor(e) {
|
|
798
798
|
U(this, "sessionVariables", [
|
|
799
799
|
{
|
|
@@ -842,19 +842,19 @@ class ft {
|
|
|
842
842
|
required: "必填表达式"
|
|
843
843
|
});
|
|
844
844
|
U(this, "getExpressionConverter", (e, t) => ({
|
|
845
|
-
convertFrom: (n, a,
|
|
846
|
-
const
|
|
847
|
-
return
|
|
845
|
+
convertFrom: (n, a, i, s) => {
|
|
846
|
+
const c = i.getExpressionRuleValue(e, t || a);
|
|
847
|
+
return c && c.value || "";
|
|
848
848
|
},
|
|
849
|
-
convertTo: (n, a,
|
|
850
|
-
var
|
|
851
|
-
if (a === "dataPicking" && (
|
|
852
|
-
const
|
|
853
|
-
((
|
|
854
|
-
(
|
|
855
|
-
)) ? n.dictPickingExpressionId =
|
|
849
|
+
convertTo: (n, a, i, s, c) => {
|
|
850
|
+
var r;
|
|
851
|
+
if (a === "dataPicking" && (i != null && i.target)) {
|
|
852
|
+
const u = `${i.target}_dataPicking`;
|
|
853
|
+
((r = i.rules) == null ? void 0 : r.some(
|
|
854
|
+
(m) => m.id === u && m.value
|
|
855
|
+
)) ? n.dictPickingExpressionId = u : delete n.dictPickingExpressionId;
|
|
856
856
|
}
|
|
857
|
-
s.updateExpression(
|
|
857
|
+
s.updateExpression(i);
|
|
858
858
|
}
|
|
859
859
|
}));
|
|
860
860
|
this.formSchemaService = e;
|
|
@@ -866,8 +866,8 @@ class ft {
|
|
|
866
866
|
const a = n.find((s) => s.target === e);
|
|
867
867
|
if (!a)
|
|
868
868
|
return "";
|
|
869
|
-
const
|
|
870
|
-
return
|
|
869
|
+
const i = a.rules.find((s) => s.type === t);
|
|
870
|
+
return i || "";
|
|
871
871
|
}
|
|
872
872
|
// 获取上下文表单变量
|
|
873
873
|
getContextFormVariables() {
|
|
@@ -878,12 +878,12 @@ class ft {
|
|
|
878
878
|
if (!n || !n.states || n.states.length === 0)
|
|
879
879
|
return [];
|
|
880
880
|
const a = [];
|
|
881
|
-
return n.states.filter((
|
|
881
|
+
return n.states.filter((i) => i.category === "remote").forEach((i) => {
|
|
882
882
|
a.push({
|
|
883
|
-
key:
|
|
884
|
-
name:
|
|
885
|
-
description:
|
|
886
|
-
category:
|
|
883
|
+
key: i.code,
|
|
884
|
+
name: i.name,
|
|
885
|
+
description: i.name,
|
|
886
|
+
category: i.category
|
|
887
887
|
});
|
|
888
888
|
}), a;
|
|
889
889
|
}
|
|
@@ -899,11 +899,11 @@ class ft {
|
|
|
899
899
|
buildEntityFieldsTreeData(e = null, t) {
|
|
900
900
|
const n = [];
|
|
901
901
|
return e == null || e.forEach((a) => {
|
|
902
|
-
var
|
|
903
|
-
const
|
|
902
|
+
var c;
|
|
903
|
+
const i = this.createTreeNode(a, t);
|
|
904
904
|
let s = [];
|
|
905
|
-
(
|
|
906
|
-
data:
|
|
905
|
+
(c = a.type) != null && c.fields && (s = this.buildEntityFieldsTreeData(a.type.fields, [...t, a.label])), n.push({
|
|
906
|
+
data: i,
|
|
907
907
|
children: s,
|
|
908
908
|
expanded: !0
|
|
909
909
|
});
|
|
@@ -912,12 +912,12 @@ class ft {
|
|
|
912
912
|
buildChildEntityTreeData(e = null, t) {
|
|
913
913
|
const n = [];
|
|
914
914
|
return e == null || e.forEach((a) => {
|
|
915
|
-
var
|
|
916
|
-
const
|
|
917
|
-
|
|
918
|
-
const s = this.buildEntityFieldsTreeData((
|
|
919
|
-
|
|
920
|
-
data:
|
|
915
|
+
var r, u;
|
|
916
|
+
const i = this.createTreeNode(a, t);
|
|
917
|
+
i.type = "entity";
|
|
918
|
+
const s = this.buildEntityFieldsTreeData((r = a.type) == null ? void 0 : r.fields, [...t, a.label]), c = this.buildChildEntityTreeData((u = a.type) == null ? void 0 : u.entities, [...t, a.label]);
|
|
919
|
+
c != null && c.length && (s == null || s.push(...c)), n.push({
|
|
920
|
+
data: i,
|
|
921
921
|
children: s || [],
|
|
922
922
|
// 空值回退
|
|
923
923
|
expanded: !0
|
|
@@ -958,58 +958,58 @@ class ft {
|
|
|
958
958
|
};
|
|
959
959
|
}
|
|
960
960
|
onBeforeOpenExpression(e, t, n) {
|
|
961
|
-
const a = n === "Field" ? e.binding.field : e.id,
|
|
962
|
-
message: ["validate", "required", "dataPicking"].includes(t) &&
|
|
961
|
+
const a = n === "Field" ? e.binding.field : e.id, i = this.getExpressionRule(a, t), s = this.getEntitiesAndVariables(), c = {
|
|
962
|
+
message: ["validate", "required", "dataPicking"].includes(t) && i ? i.message : "",
|
|
963
963
|
...s
|
|
964
964
|
};
|
|
965
|
-
return
|
|
965
|
+
return i.messageType != null && (c.messageType = i.messageType), c;
|
|
966
966
|
}
|
|
967
967
|
buildRule(e, t, n, a) {
|
|
968
|
-
const { expression:
|
|
968
|
+
const { expression: i, message: s, messageType: c } = t, r = {
|
|
969
969
|
id: `${e}_${n}`,
|
|
970
970
|
type: n,
|
|
971
|
-
value:
|
|
971
|
+
value: i
|
|
972
972
|
};
|
|
973
|
-
return (n === "validate" || n === "dataPicking" || n === "required") && (
|
|
973
|
+
return (n === "validate" || n === "dataPicking" || n === "required") && (r.message = s), n === "dataPicking" && (r.messageType = c), n === "validate" && a && (r.elementId = a), r;
|
|
974
974
|
}
|
|
975
975
|
getExpressionData() {
|
|
976
976
|
const { expressions: e } = this.formSchemaService.getFormSchema().module;
|
|
977
977
|
return e || [];
|
|
978
978
|
}
|
|
979
979
|
updateExpression(e, t, n, a) {
|
|
980
|
-
const
|
|
981
|
-
let
|
|
982
|
-
const
|
|
983
|
-
if (
|
|
984
|
-
const
|
|
985
|
-
if (
|
|
986
|
-
|
|
980
|
+
const i = t === "Field" ? e.binding.field : e.id, s = this.buildRule(i, n, a, e.type === "form-group" ? e.id : "");
|
|
981
|
+
let r = this.getExpressionData().find((d) => d.targetType === t && d.target === i);
|
|
982
|
+
const u = (d) => d.value.trim() === "";
|
|
983
|
+
if (r) {
|
|
984
|
+
const d = r.rules.find((m) => m.id === s.id);
|
|
985
|
+
if (d)
|
|
986
|
+
u(s) ? r.rules = r.rules.filter((m) => m.id !== s.id) : (Object.assign(d, s), a === "validate" && e.type === "form-group" && (d.elementId = e.id));
|
|
987
987
|
else {
|
|
988
|
-
if (
|
|
988
|
+
if (u(s))
|
|
989
989
|
return null;
|
|
990
|
-
|
|
990
|
+
r.rules = r.rules || [], r.rules.push(s);
|
|
991
991
|
}
|
|
992
992
|
} else {
|
|
993
|
-
if (
|
|
993
|
+
if (u(s))
|
|
994
994
|
return null;
|
|
995
|
-
|
|
996
|
-
target: `${
|
|
995
|
+
r = {
|
|
996
|
+
target: `${i}`,
|
|
997
997
|
rules: [s],
|
|
998
998
|
targetType: t
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
return
|
|
1001
|
+
return r;
|
|
1002
1002
|
}
|
|
1003
1003
|
getExpressionEditorOptions(e, t, n, a) {
|
|
1004
|
-
return n.reduce((
|
|
1005
|
-
var
|
|
1006
|
-
const
|
|
1007
|
-
return
|
|
1008
|
-
hide: t === "Field" ? !!((
|
|
1004
|
+
return n.reduce((i, s) => {
|
|
1005
|
+
var r, u;
|
|
1006
|
+
const c = t === "Field" ? (r = e == null ? void 0 : e.binding) == null ? void 0 : r.field : e.id;
|
|
1007
|
+
return i[s] = {
|
|
1008
|
+
hide: t === "Field" ? !!((u = e == null ? void 0 : e.binding) != null && u.field) : !1,
|
|
1009
1009
|
description: "",
|
|
1010
1010
|
title: this.expressionNames[s],
|
|
1011
1011
|
type: "string",
|
|
1012
|
-
$converter: this.getExpressionConverter(
|
|
1012
|
+
$converter: this.getExpressionConverter(c),
|
|
1013
1013
|
refreshPanelAfterChanged: !0,
|
|
1014
1014
|
editor: {
|
|
1015
1015
|
type: "expression-editor",
|
|
@@ -1018,26 +1018,26 @@ class ft {
|
|
|
1018
1018
|
showMessage: s === "validate" || s === "dataPicking" || s === "required",
|
|
1019
1019
|
showMessageType: s === "dataPicking",
|
|
1020
1020
|
beforeOpen: () => this.onBeforeOpenExpression(e, s, t),
|
|
1021
|
-
onSubmitModal: (
|
|
1022
|
-
const
|
|
1021
|
+
onSubmitModal: (d) => {
|
|
1022
|
+
const m = this.updateExpression(e, t, d, s);
|
|
1023
1023
|
if (a) {
|
|
1024
|
-
const f = this.buildRule(
|
|
1024
|
+
const f = this.buildRule(c, d, s);
|
|
1025
1025
|
a(f);
|
|
1026
1026
|
}
|
|
1027
|
-
return
|
|
1027
|
+
return m;
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
|
-
},
|
|
1030
|
+
}, i;
|
|
1031
1031
|
}, {});
|
|
1032
1032
|
}
|
|
1033
1033
|
getExpressionInfo(e, t, n) {
|
|
1034
|
-
const a = t === "Field" ? e.binding.field : e.id,
|
|
1035
|
-
value:
|
|
1034
|
+
const a = t === "Field" ? e.binding.field : e.id, i = this.getExpressionRule(a, n), s = {
|
|
1035
|
+
value: i && i.value,
|
|
1036
1036
|
targetId: a,
|
|
1037
1037
|
targetType: t,
|
|
1038
1038
|
expressionType: n
|
|
1039
1039
|
};
|
|
1040
|
-
return
|
|
1040
|
+
return i && i.message && (s.message = i.message), s;
|
|
1041
1041
|
}
|
|
1042
1042
|
getExpressionConfig(e, t, n = ["compute", "dependency", "validate"], a) {
|
|
1043
1043
|
return {
|
|
@@ -1060,7 +1060,7 @@ class ft {
|
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
class
|
|
1063
|
+
class ft {
|
|
1064
1064
|
constructor(e, t) {
|
|
1065
1065
|
U(this, "componentId");
|
|
1066
1066
|
U(this, "viewModelId");
|
|
@@ -1095,7 +1095,7 @@ class gt {
|
|
|
1095
1095
|
if (t) {
|
|
1096
1096
|
if (!this.designViewModelField) {
|
|
1097
1097
|
const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1098
|
-
this.designViewModelField = a.fields.find((
|
|
1098
|
+
this.designViewModelField = a.fields.find((i) => i.id === t);
|
|
1099
1099
|
}
|
|
1100
1100
|
e.updateOn = (n = this.designViewModelField) == null ? void 0 : n.updateOn;
|
|
1101
1101
|
}
|
|
@@ -1121,7 +1121,7 @@ class gt {
|
|
|
1121
1121
|
valueField: "value",
|
|
1122
1122
|
idField: "value",
|
|
1123
1123
|
editable: !1,
|
|
1124
|
-
data: [{ value: e.type, name:
|
|
1124
|
+
data: [{ value: e.type, name: A[e.type] && A[e.type].name }]
|
|
1125
1125
|
}
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
@@ -1131,7 +1131,7 @@ class gt {
|
|
|
1131
1131
|
const a = {
|
|
1132
1132
|
title: "外观",
|
|
1133
1133
|
description: "Appearance"
|
|
1134
|
-
},
|
|
1134
|
+
}, i = {
|
|
1135
1135
|
class: {
|
|
1136
1136
|
title: "class样式",
|
|
1137
1137
|
type: "string",
|
|
@@ -1148,20 +1148,20 @@ class gt {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
};
|
|
1150
1150
|
for (const s in t)
|
|
1151
|
-
|
|
1151
|
+
i[s] = Object.assign(i[s] || {}, t[s]);
|
|
1152
1152
|
return {
|
|
1153
1153
|
...a,
|
|
1154
|
-
properties: { ...
|
|
1155
|
-
setPropertyRelates(s,
|
|
1154
|
+
properties: { ...i },
|
|
1155
|
+
setPropertyRelates(s, c) {
|
|
1156
1156
|
if (s) {
|
|
1157
1157
|
switch (s && s.propertyID) {
|
|
1158
1158
|
case "class":
|
|
1159
1159
|
case "style": {
|
|
1160
|
-
|
|
1160
|
+
Ee.value++;
|
|
1161
1161
|
break;
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
|
-
n && n(s, e,
|
|
1164
|
+
n && n(s, e, c);
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
1167
|
};
|
|
@@ -1176,12 +1176,12 @@ class gt {
|
|
|
1176
1176
|
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
|
|
1177
1177
|
* @returns
|
|
1178
1178
|
*/
|
|
1179
|
-
getPropertyEditorParams(e, t = [], n = "visible", a = {},
|
|
1180
|
-
const { getVariables:
|
|
1179
|
+
getPropertyEditorParams(e, t = [], n = "visible", a = {}, i = {}, s = "") {
|
|
1180
|
+
const { getVariables: c, getControlName: r, getStateMachines: u } = mt(this.designerHostService), d = this.getRealTargetType(e), m = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], f = {
|
|
1181
1181
|
type: "property-editor",
|
|
1182
|
-
propertyTypes:
|
|
1182
|
+
propertyTypes: m
|
|
1183
1183
|
};
|
|
1184
|
-
return
|
|
1184
|
+
return m.map((g) => {
|
|
1185
1185
|
switch (g) {
|
|
1186
1186
|
case "Const":
|
|
1187
1187
|
Object.assign(f, {
|
|
@@ -1190,30 +1190,30 @@ class gt {
|
|
|
1190
1190
|
}, a);
|
|
1191
1191
|
break;
|
|
1192
1192
|
case "Expression":
|
|
1193
|
-
f.expressionConfig = this.getExpressionOptions(e,
|
|
1193
|
+
f.expressionConfig = this.getExpressionOptions(e, d, s || n);
|
|
1194
1194
|
break;
|
|
1195
1195
|
case "StateMachine":
|
|
1196
|
-
f.stateMachines =
|
|
1196
|
+
f.stateMachines = u();
|
|
1197
1197
|
break;
|
|
1198
1198
|
case "Variable":
|
|
1199
1199
|
Object.assign(f, {
|
|
1200
|
-
controlName:
|
|
1200
|
+
controlName: r(e),
|
|
1201
1201
|
newVariablePrefix: "is",
|
|
1202
1202
|
newVariableType: "Boolean",
|
|
1203
|
-
variables:
|
|
1203
|
+
variables: c(this.viewModelId),
|
|
1204
1204
|
parentComponentId: this.componentId === "root-component" ? "" : "root-component",
|
|
1205
1205
|
onBeforeOpenVariables: (w) => {
|
|
1206
|
-
w.value =
|
|
1206
|
+
w.value = c(this.viewModelId);
|
|
1207
1207
|
}
|
|
1208
|
-
},
|
|
1208
|
+
}, i), this.designerContext.designerMode === "PC_RTC" && (f.newVariablePrefix = "ext_" + f.newVariablePrefix);
|
|
1209
1209
|
break;
|
|
1210
1210
|
}
|
|
1211
1211
|
}), f;
|
|
1212
1212
|
}
|
|
1213
1213
|
getVisibleProperty(e, t = "") {
|
|
1214
|
-
var
|
|
1214
|
+
var i;
|
|
1215
1215
|
let n = ["Const", "Variable", "StateMachine", "Expression"];
|
|
1216
|
-
return t === "gridFieldEditor" ? n = ["Const", "Expression"] : t === "form-group" && !((
|
|
1216
|
+
return t === "gridFieldEditor" ? n = ["Const", "Expression"] : t === "form-group" && !((i = e.binding) != null && i.field) && (n = ["Const", "Variable", "StateMachine"]), {
|
|
1217
1217
|
visible: {
|
|
1218
1218
|
title: "是否可见",
|
|
1219
1219
|
type: "boolean",
|
|
@@ -1229,26 +1229,26 @@ class gt {
|
|
|
1229
1229
|
* @returns
|
|
1230
1230
|
*/
|
|
1231
1231
|
getBehaviorConfig(e, t = "", n = {}, a) {
|
|
1232
|
-
const
|
|
1232
|
+
const i = {
|
|
1233
1233
|
title: "行为",
|
|
1234
1234
|
description: ""
|
|
1235
1235
|
}, s = this.getVisibleProperty(e, t);
|
|
1236
|
-
for (const
|
|
1237
|
-
s[
|
|
1238
|
-
const
|
|
1236
|
+
for (const r in n)
|
|
1237
|
+
s[r] = Object.assign(s[r] || {}, n[r]);
|
|
1238
|
+
const c = this;
|
|
1239
1239
|
return {
|
|
1240
|
-
...
|
|
1240
|
+
...i,
|
|
1241
1241
|
properties: { ...s },
|
|
1242
|
-
setPropertyRelates(
|
|
1243
|
-
if (
|
|
1244
|
-
switch (
|
|
1242
|
+
setPropertyRelates(r, u) {
|
|
1243
|
+
if (r) {
|
|
1244
|
+
switch (r.propertyID) {
|
|
1245
1245
|
case "disabled":
|
|
1246
1246
|
case "readonly":
|
|
1247
1247
|
case "visible":
|
|
1248
|
-
|
|
1248
|
+
c.afterMutilEditorChanged(e, r);
|
|
1249
1249
|
break;
|
|
1250
1250
|
}
|
|
1251
|
-
a && a(
|
|
1251
|
+
a && a(r, u);
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
1254
|
};
|
|
@@ -1271,8 +1271,8 @@ class gt {
|
|
|
1271
1271
|
const n = t && t.parent && t.parent.schema;
|
|
1272
1272
|
if (!n)
|
|
1273
1273
|
return;
|
|
1274
|
-
const a = n.contents.findIndex((s) => s.id === e),
|
|
1275
|
-
n.contents.splice(a, 1), n.contents.splice(a, 0,
|
|
1274
|
+
const a = n.contents.findIndex((s) => s.id === e), i = He(n.contents[a]);
|
|
1275
|
+
n.contents.splice(a, 1), n.contents.splice(a, 0, i), Te();
|
|
1276
1276
|
}
|
|
1277
1277
|
/**
|
|
1278
1278
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -1302,16 +1302,16 @@ class gt {
|
|
|
1302
1302
|
const t = e.propertyValue;
|
|
1303
1303
|
if (!((t && t.type) === "Expression" && t.expressionInfo))
|
|
1304
1304
|
return;
|
|
1305
|
-
const { expressionId:
|
|
1305
|
+
const { expressionId: i, expressionInfo: s } = t, { targetId: c, targetType: r, expressionType: u, value: d, message: m } = s, f = this.formSchemaUtils.getModule();
|
|
1306
1306
|
f.expressions = f.expressions || [];
|
|
1307
1307
|
const { expressions: g } = f;
|
|
1308
|
-
let w = g.find((h) => h.target ===
|
|
1309
|
-
w || (w = { target:
|
|
1310
|
-
const
|
|
1311
|
-
if (
|
|
1312
|
-
|
|
1308
|
+
let w = g.find((h) => h.target === c);
|
|
1309
|
+
w || (w = { target: c, rules: [], targetType: r }, g.push(w));
|
|
1310
|
+
const y = w.rules.find((h) => h.type === u);
|
|
1311
|
+
if (y)
|
|
1312
|
+
y.value = d, y.message = m;
|
|
1313
1313
|
else {
|
|
1314
|
-
const h = { id:
|
|
1314
|
+
const h = { id: i, type: u, value: d, message: m };
|
|
1315
1315
|
w.rules.push(h);
|
|
1316
1316
|
}
|
|
1317
1317
|
delete t.expressionInfo;
|
|
@@ -1326,11 +1326,11 @@ class gt {
|
|
|
1326
1326
|
const n = e.propertyValue;
|
|
1327
1327
|
if (n && n.type === "Expression")
|
|
1328
1328
|
return;
|
|
1329
|
-
const
|
|
1330
|
-
!
|
|
1329
|
+
const i = e.propertyID, s = this.formSchemaUtils.getExpressions(), c = t.binding ? t.binding.field : t.id, r = s.find((u) => u.target === c);
|
|
1330
|
+
!r || !r.rules || (r.rules = r.rules.filter((u) => u.type !== i));
|
|
1331
1331
|
}
|
|
1332
1332
|
getExpressionOptions(e, t, n) {
|
|
1333
|
-
return new
|
|
1333
|
+
return new pt(this.formSchemaUtils).getExpressionOptions(e, t, n);
|
|
1334
1334
|
}
|
|
1335
1335
|
getRealTargetType(e) {
|
|
1336
1336
|
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(e.type) > -1 ? "Button" : e.binding && e.binding.field ? "Field" : "Container";
|
|
@@ -1349,7 +1349,7 @@ class gt {
|
|
|
1349
1349
|
}, t;
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
|
-
class
|
|
1352
|
+
class gt extends ft {
|
|
1353
1353
|
constructor(e, t) {
|
|
1354
1354
|
super(e, t);
|
|
1355
1355
|
}
|
|
@@ -1357,13 +1357,13 @@ class vt extends gt {
|
|
|
1357
1357
|
return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
1358
1358
|
}
|
|
1359
1359
|
getBasicPropConfig(e) {
|
|
1360
|
-
var s,
|
|
1361
|
-
const t = (
|
|
1360
|
+
var s, c, r;
|
|
1361
|
+
const t = (r = (c = (s = this.formSchemaUtils.getFormSchema()) == null ? void 0 : s.module) == null ? void 0 : c.entity[0]) == null ? void 0 : r.entities[0], n = this.assembleSchemaEntityToTree(t, 0), a = this, i = super.getBasicPropConfig(e);
|
|
1362
1362
|
this.propertyConfig.categories.basic = {
|
|
1363
1363
|
description: "Basic Information",
|
|
1364
1364
|
title: "基本信息",
|
|
1365
1365
|
properties: {
|
|
1366
|
-
...
|
|
1366
|
+
...i.properties,
|
|
1367
1367
|
dataSource: {
|
|
1368
1368
|
description: "绑定数据源",
|
|
1369
1369
|
title: "绑定数据源",
|
|
@@ -1377,13 +1377,13 @@ class vt extends gt {
|
|
|
1377
1377
|
readonly: !0
|
|
1378
1378
|
}
|
|
1379
1379
|
},
|
|
1380
|
-
setPropertyRelates(
|
|
1381
|
-
switch (
|
|
1380
|
+
setPropertyRelates(u, d) {
|
|
1381
|
+
switch (u && u.propertyID) {
|
|
1382
1382
|
case "dataSource": {
|
|
1383
|
-
const
|
|
1384
|
-
if (
|
|
1385
|
-
const f = n.find((g) => g.label ===
|
|
1386
|
-
|
|
1383
|
+
const m = a.formSchemaUtils.getViewModelById(a.viewModelId);
|
|
1384
|
+
if (m) {
|
|
1385
|
+
const f = n.find((g) => g.label === u.propertyValue);
|
|
1386
|
+
m.bindTo = f.bindTo;
|
|
1387
1387
|
}
|
|
1388
1388
|
a.designViewModelUtils.assembleDesignViewModel();
|
|
1389
1389
|
break;
|
|
@@ -1395,16 +1395,16 @@ class vt extends gt {
|
|
|
1395
1395
|
/**
|
|
1396
1396
|
* 将schema实体表组装成树
|
|
1397
1397
|
*/
|
|
1398
|
-
assembleSchemaEntityToTree(e, t, n, a = "",
|
|
1398
|
+
assembleSchemaEntityToTree(e, t, n, a = "", i = []) {
|
|
1399
1399
|
const s = a ? `${a}/${e.label}` : "/";
|
|
1400
|
-
return
|
|
1400
|
+
return i.push({
|
|
1401
1401
|
id: e.id,
|
|
1402
1402
|
name: e.name,
|
|
1403
1403
|
label: e.label,
|
|
1404
1404
|
layer: t,
|
|
1405
1405
|
parent: n && n.id,
|
|
1406
1406
|
bindTo: s.replace("//", "/")
|
|
1407
|
-
}), e.type.entities && e.type.entities.length && e.type.entities.map((
|
|
1407
|
+
}), e.type.entities && e.type.entities.length && e.type.entities.map((c) => this.assembleSchemaEntityToTree(c, t + 1, e, s, i)), i;
|
|
1408
1408
|
}
|
|
1409
1409
|
getAppearanceProperties(e) {
|
|
1410
1410
|
this.propertyConfig.categories.appearance = {
|
|
@@ -1422,7 +1422,7 @@ class vt extends gt {
|
|
|
1422
1422
|
editor: {
|
|
1423
1423
|
type: "code-editor",
|
|
1424
1424
|
language: "javascript",
|
|
1425
|
-
leftTemplate: () => l(j, null, [l("h5", null, [
|
|
1425
|
+
leftTemplate: () => l(j, null, [l("h5", null, [O("示例代码")]), l("pre", null, [`
|
|
1426
1426
|
(dataItem) => {
|
|
1427
1427
|
if(dataItem.code === '0001') {
|
|
1428
1428
|
return 'bg-danger text-center';
|
|
@@ -1442,7 +1442,7 @@ class vt extends gt {
|
|
|
1442
1442
|
editor: {
|
|
1443
1443
|
type: "code-editor",
|
|
1444
1444
|
language: "javascript",
|
|
1445
|
-
leftTemplate: () => l(j, null, [l("h5", null, [
|
|
1445
|
+
leftTemplate: () => l(j, null, [l("h5", null, [O("示例代码")]), l("pre", null, [`
|
|
1446
1446
|
(dataItem) => {
|
|
1447
1447
|
if(dataItem.code === '0001') {
|
|
1448
1448
|
return 'textAlign:center;color:green';
|
|
@@ -1505,18 +1505,18 @@ class vt extends gt {
|
|
|
1505
1505
|
name: "行点击事件"
|
|
1506
1506
|
}];
|
|
1507
1507
|
(s = e.pagination) == null || s.enable;
|
|
1508
|
-
const n = this, a = n.eventsEditorUtils.formProperties(e, n.viewModelId, t),
|
|
1508
|
+
const n = this, a = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), i = n.createBaseEventProperty(a);
|
|
1509
1509
|
this.propertyConfig.categories.eventsEditor = {
|
|
1510
1510
|
title: "事件",
|
|
1511
1511
|
hideTitle: !0,
|
|
1512
|
-
properties:
|
|
1512
|
+
properties: i,
|
|
1513
1513
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1514
1514
|
refreshPanelAfterChanged: !0,
|
|
1515
1515
|
tabId: "commands",
|
|
1516
1516
|
tabName: "交互",
|
|
1517
|
-
setPropertyRelates(
|
|
1518
|
-
const
|
|
1519
|
-
delete e[n.viewModelId],
|
|
1517
|
+
setPropertyRelates(c, r) {
|
|
1518
|
+
const u = c.propertyValue;
|
|
1519
|
+
delete e[n.viewModelId], u && (u.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, u.events, u)), e.remoteSort = !!e.columnSorted, e.command && (e.command.onClickEditCommand = e.onClickEditCommand, e.command.onClickDeleteCommand = e.onClickDeleteCommand);
|
|
1520
1520
|
}
|
|
1521
1521
|
};
|
|
1522
1522
|
}
|
|
@@ -1525,53 +1525,53 @@ class vt extends gt {
|
|
|
1525
1525
|
return e && e.bindTo ? e.bindTo.trim() !== "/" : !1;
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
const t =
|
|
1530
|
-
function
|
|
1528
|
+
function vt(o, e) {
|
|
1529
|
+
const t = o.schema, n = b(!0), a = b(!0);
|
|
1530
|
+
function i(m) {
|
|
1531
1531
|
return !1;
|
|
1532
1532
|
}
|
|
1533
1533
|
function s() {
|
|
1534
1534
|
return !1;
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1536
|
+
function c() {
|
|
1537
1537
|
return !1;
|
|
1538
1538
|
}
|
|
1539
|
-
function
|
|
1539
|
+
function r() {
|
|
1540
1540
|
return !0;
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1543
|
-
return new
|
|
1542
|
+
function u(m) {
|
|
1543
|
+
return new gt(m, e).getPropertyConfig(t);
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1546
|
-
var
|
|
1547
|
-
if (
|
|
1548
|
-
const
|
|
1545
|
+
function d() {
|
|
1546
|
+
var m, f, g, w;
|
|
1547
|
+
if (o && e) {
|
|
1548
|
+
const y = (m = o == null ? void 0 : o.componentInstance) == null ? void 0 : m.value.belongedComponentId;
|
|
1549
1549
|
let h = "", S = "";
|
|
1550
|
-
const { formSchemaUtils:
|
|
1551
|
-
if (
|
|
1552
|
-
const F =
|
|
1550
|
+
const { formSchemaUtils: k } = e;
|
|
1551
|
+
if (y) {
|
|
1552
|
+
const F = k.getRootViewModelId(), B = k.getComponentByViewModelId(F), v = k.selectNode(B, (M) => M.contents && M.contents.find((C) => C.component === y));
|
|
1553
1553
|
(v == null ? void 0 : v.type) === ((f = z["tab-page"]) == null ? void 0 : f.type) && ((g = v == null ? void 0 : v.contents) != null && g.length) && (h = v.title || ""), (v == null ? void 0 : v.type) === ((w = z.section) == null ? void 0 : w.type) && (v == null ? void 0 : v.showHeader) !== !1 && (h = v.mainTitle || ""), h = h ? `${h} > ` : "", S = h ? v.id : "";
|
|
1554
1554
|
}
|
|
1555
|
-
const
|
|
1556
|
-
e == null || e.formSchemaUtils.getControlBasicInfoMap().set(
|
|
1557
|
-
componentTitle:
|
|
1558
|
-
parentPathName: `${h}${
|
|
1555
|
+
const x = z["list-view"].name;
|
|
1556
|
+
e == null || e.formSchemaUtils.getControlBasicInfoMap().set(o.schema.id, {
|
|
1557
|
+
componentTitle: x,
|
|
1558
|
+
parentPathName: `${h}${x}`,
|
|
1559
1559
|
reliedComponentId: S
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
1563
|
return {
|
|
1564
|
-
canAccepts:
|
|
1564
|
+
canAccepts: i,
|
|
1565
1565
|
checkCanDeleteComponent: s,
|
|
1566
|
-
checkCanMoveComponent:
|
|
1567
|
-
hideNestedPaddingInDesginerView:
|
|
1566
|
+
checkCanMoveComponent: c,
|
|
1567
|
+
hideNestedPaddingInDesginerView: r,
|
|
1568
1568
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1569
1569
|
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1570
|
-
getPropsConfig:
|
|
1571
|
-
setComponentBasicInfoMap:
|
|
1570
|
+
getPropsConfig: u,
|
|
1571
|
+
setComponentBasicInfoMap: d
|
|
1572
1572
|
};
|
|
1573
1573
|
}
|
|
1574
|
-
const
|
|
1574
|
+
const ht = "https://json-schema.org/draft/2020-12/schema", wt = "https://farris-design.gitee.io/list-view-table.schema.json", yt = "list-view-table", Ct = "A Farris Component", bt = "object", It = {
|
|
1575
1575
|
id: {
|
|
1576
1576
|
description: "The unique identifier for list-view-table",
|
|
1577
1577
|
type: "string"
|
|
@@ -1633,18 +1633,18 @@ const wt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-
|
|
|
1633
1633
|
type: "boolean",
|
|
1634
1634
|
default: !0
|
|
1635
1635
|
}
|
|
1636
|
-
},
|
|
1636
|
+
}, Vt = [
|
|
1637
1637
|
"id",
|
|
1638
1638
|
"type"
|
|
1639
1639
|
], de = {
|
|
1640
|
-
$schema:
|
|
1641
|
-
$id:
|
|
1642
|
-
title:
|
|
1643
|
-
description:
|
|
1644
|
-
type:
|
|
1645
|
-
properties:
|
|
1646
|
-
required:
|
|
1647
|
-
},
|
|
1640
|
+
$schema: ht,
|
|
1641
|
+
$id: wt,
|
|
1642
|
+
title: yt,
|
|
1643
|
+
description: Ct,
|
|
1644
|
+
type: bt,
|
|
1645
|
+
properties: It,
|
|
1646
|
+
required: Vt
|
|
1647
|
+
}, St = "list-view-table", Mt = "A Farris Component", kt = "object", xt = {
|
|
1648
1648
|
basic: {
|
|
1649
1649
|
description: "Basic Infomation",
|
|
1650
1650
|
title: "基本信息",
|
|
@@ -1666,25 +1666,25 @@ const wt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-
|
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
|
-
},
|
|
1670
|
-
title:
|
|
1671
|
-
description:
|
|
1672
|
-
type:
|
|
1673
|
-
categories:
|
|
1669
|
+
}, Et = {
|
|
1670
|
+
title: St,
|
|
1671
|
+
description: Mt,
|
|
1672
|
+
type: kt,
|
|
1673
|
+
categories: xt
|
|
1674
1674
|
}, J = {
|
|
1675
1675
|
data: { type: Array, default: [] }
|
|
1676
1676
|
};
|
|
1677
|
-
se(J, de,
|
|
1677
|
+
se(J, de, q, H, Et);
|
|
1678
1678
|
const ue = ie(
|
|
1679
1679
|
J,
|
|
1680
1680
|
de,
|
|
1681
|
-
|
|
1682
|
-
|
|
1681
|
+
q,
|
|
1682
|
+
H
|
|
1683
1683
|
), me = /* @__PURE__ */ oe({
|
|
1684
1684
|
name: "FListViewTableDesign",
|
|
1685
1685
|
props: J,
|
|
1686
1686
|
emits: ["outputValue", "currentEvent", "selectionChanged"],
|
|
1687
|
-
setup(
|
|
1687
|
+
setup(o, e) {
|
|
1688
1688
|
const t = [{
|
|
1689
1689
|
name: "任芳",
|
|
1690
1690
|
code: "1.山东大学",
|
|
@@ -1735,11 +1735,11 @@ const ue = ie(
|
|
|
1735
1735
|
amount: 84.13,
|
|
1736
1736
|
avatar: "./assets/avatar7.png"
|
|
1737
1737
|
}];
|
|
1738
|
-
$(() =>
|
|
1739
|
-
const n =
|
|
1738
|
+
$(() => o.data.length > 0 ? o.data : t);
|
|
1739
|
+
const n = b(), a = K("design-item-context"), i = le(n, a);
|
|
1740
1740
|
return ae(() => {
|
|
1741
|
-
n.value.componentInstance =
|
|
1742
|
-
}), e.expose(
|
|
1741
|
+
n.value.componentInstance = i;
|
|
1742
|
+
}), e.expose(i.value), () => l("div", {
|
|
1743
1743
|
ref: n
|
|
1744
1744
|
}, [l("div", {
|
|
1745
1745
|
class: "ide-list-view h-100"
|
|
@@ -1773,9 +1773,9 @@ const ue = ie(
|
|
|
1773
1773
|
class: "listview-item-btns"
|
|
1774
1774
|
}, [l("button", {
|
|
1775
1775
|
class: "btn btn-link"
|
|
1776
|
-
}, [
|
|
1776
|
+
}, [O(" "), "编辑"]), l("button", {
|
|
1777
1777
|
class: "btn btn-link"
|
|
1778
|
-
}, [
|
|
1778
|
+
}, [O(" "), "删除"])])])])])]), l("li", {
|
|
1779
1779
|
class: "ide-list-view-group-item"
|
|
1780
1780
|
}, [l("div", {
|
|
1781
1781
|
class: "ide-list-content"
|
|
@@ -1799,7 +1799,7 @@ const ue = ie(
|
|
|
1799
1799
|
class: "listview-item-btns"
|
|
1800
1800
|
}, [l("button", {
|
|
1801
1801
|
class: "btn btn-link"
|
|
1802
|
-
}, [
|
|
1802
|
+
}, [O(" "), "编辑"]), l("button", {
|
|
1803
1803
|
class: "btn btn-link"
|
|
1804
1804
|
}, ["删除"])])])])])]), l("li", {
|
|
1805
1805
|
class: "ide-list-view-group-item"
|
|
@@ -1825,7 +1825,7 @@ const ue = ie(
|
|
|
1825
1825
|
class: "listview-item-btns"
|
|
1826
1826
|
}, [l("button", {
|
|
1827
1827
|
class: "btn btn-link"
|
|
1828
|
-
}, [
|
|
1828
|
+
}, [O(" "), "编辑"]), l("button", {
|
|
1829
1829
|
class: "btn btn-link"
|
|
1830
1830
|
}, ["删除"])])])])])])])])])])]);
|
|
1831
1831
|
}
|
|
@@ -1833,62 +1833,62 @@ const ue = ie(
|
|
|
1833
1833
|
name: "FListViewDesign",
|
|
1834
1834
|
props: Y,
|
|
1835
1835
|
emits: ["checkValuesChange", "clickItem", "selectionChange", "removeItem", "change"],
|
|
1836
|
-
setup(
|
|
1837
|
-
const t =
|
|
1838
|
-
getVisualData:
|
|
1839
|
-
} =
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
}), e.expose(
|
|
1843
|
-
const
|
|
1836
|
+
setup(o, e) {
|
|
1837
|
+
const t = b(), n = b(!0), a = b(!1), i = b([]), s = 0, c = b(o.columns), r = Pe(o, e), u = Fe(o), d = Re(o), m = Ne(o, u), f = Be(o, /* @__PURE__ */ new Map(), r, d, u), g = Ue(o, f, u, i, e), w = We(o, t), y = b(), h = K("designer-host-service"), S = K("design-item-context"), k = vt(S, h), x = le(y, S, k), F = $(() => f.dataView.value.length), B = $e(o, e, g, u), v = De(o, e, u, B, i), M = Oe(o), C = Ae(o, {}, M), p = Le(o, f, v, d, u, M, C), T = _e(o, u, C, p), R = je(o, u, C, p), N = Ge(o, c, f, F, s, p, T, R), {
|
|
1838
|
+
getVisualData: L
|
|
1839
|
+
} = N;
|
|
1840
|
+
i.value = L(0, F.value + s - 1), ae(() => {
|
|
1841
|
+
y.value.componentInstance = x;
|
|
1842
|
+
}), e.expose(x.value);
|
|
1843
|
+
const E = $(() => {
|
|
1844
1844
|
const _ = {
|
|
1845
1845
|
"f-list-view": !0,
|
|
1846
|
-
"f-list-view-multiple":
|
|
1846
|
+
"f-list-view-multiple": o.multiSelect,
|
|
1847
1847
|
"w-100": !0,
|
|
1848
1848
|
"h-100": !0
|
|
1849
1849
|
};
|
|
1850
|
-
return
|
|
1851
|
-
}),
|
|
1852
|
-
function
|
|
1853
|
-
return
|
|
1850
|
+
return o.size !== "default" && (_[`${o.size}-item`] = !0), _;
|
|
1851
|
+
}), V = $(() => !!e.slots.footer || n.value);
|
|
1852
|
+
function I() {
|
|
1853
|
+
return o.header === "SearchBar" ? ne : o.header === "ContentHeader" ? Qe : ne;
|
|
1854
1854
|
}
|
|
1855
|
-
const
|
|
1856
|
-
renderHeader:
|
|
1857
|
-
} =
|
|
1858
|
-
|
|
1859
|
-
function
|
|
1860
|
-
|
|
1855
|
+
const D = I(), {
|
|
1856
|
+
renderHeader: P
|
|
1857
|
+
} = D(o, e, w), W = Ze(), Q = et(o, e, f, W), pe = tt(o, e, i, Q, W, g);
|
|
1858
|
+
Je(o, e, i, f, m, W, g, N, pe, Q);
|
|
1859
|
+
function fe(_) {
|
|
1860
|
+
o.multiSelect && (_.preventDefault(), _.stopPropagation());
|
|
1861
1861
|
}
|
|
1862
1862
|
return () => l("div", {
|
|
1863
|
-
ref:
|
|
1864
|
-
class:
|
|
1865
|
-
onClick:
|
|
1866
|
-
}, [
|
|
1867
|
-
ref:
|
|
1863
|
+
ref: y,
|
|
1864
|
+
class: E.value,
|
|
1865
|
+
onClick: fe
|
|
1866
|
+
}, [P(), l("div", {
|
|
1867
|
+
ref: t,
|
|
1868
1868
|
class: "f-list-view-content",
|
|
1869
1869
|
onMouseover: () => {
|
|
1870
|
-
|
|
1870
|
+
a.value = !0;
|
|
1871
1871
|
},
|
|
1872
1872
|
onMouseleave: () => {
|
|
1873
|
-
|
|
1873
|
+
a.value = !1;
|
|
1874
1874
|
}
|
|
1875
|
-
}, [l(me, null, null)]),
|
|
1875
|
+
}, [l(me, null, null)]), V.value && l("div", {
|
|
1876
1876
|
class: "f-list-view-footer"
|
|
1877
1877
|
}, [e.slots.footer && e.slots.footer()])]);
|
|
1878
1878
|
}
|
|
1879
|
-
}),
|
|
1880
|
-
G.register = (
|
|
1881
|
-
|
|
1879
|
+
}), Tt = Ve();
|
|
1880
|
+
G.register = (o, e, t, n, a) => {
|
|
1881
|
+
o["list-view"] = ye, e["list-view"] = ce(a), o["list-view-table"] = be, e["list-view-table"] = ue(a), n["list-view"] = { bindingResolver: Tt };
|
|
1882
1882
|
};
|
|
1883
|
-
G.registerDesigner = (
|
|
1884
|
-
|
|
1883
|
+
G.registerDesigner = (o, e, t, n) => {
|
|
1884
|
+
o["list-view"] = G, e["list-view"] = ce(n), o["list-view-table"] = me, e["list-view-table"] = ue(n);
|
|
1885
1885
|
};
|
|
1886
|
-
const
|
|
1886
|
+
const _t = we(G);
|
|
1887
1887
|
export {
|
|
1888
1888
|
G as FListViewDesign,
|
|
1889
|
-
|
|
1890
|
-
|
|
1889
|
+
Tt as bindingResolver,
|
|
1890
|
+
_t as default,
|
|
1891
1891
|
Y as listViewDesignProps,
|
|
1892
|
-
|
|
1892
|
+
Lt as propsResolver,
|
|
1893
1893
|
ce as propsResolverGenerator
|
|
1894
1894
|
};
|