@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,9 +1,9 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { getCustomStyle as
|
|
3
|
-
import { useFilter as
|
|
4
|
-
import { LocaleService as
|
|
5
|
-
import { FCheckbox as
|
|
6
|
-
const
|
|
1
|
+
import { ref as f, computed as x, createVNode as n, Fragment as N, watch as Z, withModifiers as we, withDirectives as ye, vModelText as Ie, defineComponent as ee, createTextVNode as Y } from "vue";
|
|
2
|
+
import { getCustomStyle as $, getCustomClass as W } from "../common/index.esm.js";
|
|
3
|
+
import { useFilter as Se, useIdentify as ke, useHierarchy as be, useGroupData as Ve, useDataView as Fe, useSelection as De, usePagination as Me, useRow as Re, useEdit as Te, useVisualDataBound as Oe, useVisualDataCell as Be, useVisualDataRow as He, useVisualGroupRow as Pe, useVisualSummaryRow as xe, useVisualData as je, useSidebar as Le, useColumn as _e, useVirtualScroll as Ge, getPagination as Ae } from "../data-view/index.esm.js";
|
|
4
|
+
import { LocaleService as Ee } from "../locale/index.esm.js";
|
|
5
|
+
import { FCheckbox as K } from "../checkbox/index.esm.js";
|
|
6
|
+
const te = {
|
|
7
7
|
/** 列集合 */
|
|
8
8
|
columns: {
|
|
9
9
|
type: Array,
|
|
@@ -71,218 +71,218 @@ const le = {
|
|
|
71
71
|
/** 分页 */
|
|
72
72
|
pagination: { type: Object, default: { enable: !1, size: 20 } }
|
|
73
73
|
};
|
|
74
|
-
function
|
|
75
|
-
function
|
|
76
|
-
const
|
|
77
|
-
let
|
|
78
|
-
for (;
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
return
|
|
85
|
-
const
|
|
86
|
-
let
|
|
87
|
-
for (;
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
74
|
+
function Ne(e, l) {
|
|
75
|
+
function p(a) {
|
|
76
|
+
const o = [];
|
|
77
|
+
let v = a.nextNode();
|
|
78
|
+
for (; v; )
|
|
79
|
+
o.push(v), v = a.nextNode();
|
|
80
|
+
return o;
|
|
81
|
+
}
|
|
82
|
+
function w(a, o) {
|
|
83
|
+
const v = document.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
84
|
+
return p(v).map((y) => ({ textNode: y, text: (y.textContent || "").toLocaleLowerCase() })).map(({ textNode: y, text: s }) => {
|
|
85
|
+
const u = [];
|
|
86
|
+
let M = 0;
|
|
87
|
+
for (; M < s.length; ) {
|
|
88
|
+
const I = s.indexOf(o, M);
|
|
89
|
+
if (I === -1)
|
|
90
90
|
break;
|
|
91
|
-
|
|
91
|
+
u.push(I), M = I + o.length;
|
|
92
92
|
}
|
|
93
|
-
return
|
|
94
|
-
const
|
|
95
|
-
return
|
|
93
|
+
return u.map((I) => {
|
|
94
|
+
const h = new Range();
|
|
95
|
+
return h.setStart(y, I), h.setEnd(y, I + o.length), h;
|
|
96
96
|
});
|
|
97
97
|
}).flat();
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function g(a) {
|
|
100
100
|
if (!CSS.highlights || (CSS.highlights.clear(), !a || !l))
|
|
101
101
|
return;
|
|
102
|
-
const
|
|
103
|
-
CSS.highlights.set("search-result",
|
|
102
|
+
const o = w(l.value, a.toLocaleLowerCase()), v = new Highlight(...o);
|
|
103
|
+
CSS.highlights.set("search-result", v);
|
|
104
104
|
}
|
|
105
|
-
return { search:
|
|
105
|
+
return { search: g };
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const
|
|
109
|
-
var t,
|
|
110
|
-
return ((t = e.selection) == null ? void 0 : t.multiSelect) && ((
|
|
107
|
+
function q(e, l, p, w, g, a, o, v, O, m) {
|
|
108
|
+
const b = f(e.size), y = f(e.textField), s = f(e.titleField), u = f(e.disableField), M = x(() => {
|
|
109
|
+
var t, V;
|
|
110
|
+
return ((t = e.selection) == null ? void 0 : t.multiSelect) && ((V = e.selection) == null ? void 0 : V.showCheckbox);
|
|
111
111
|
}), {
|
|
112
|
-
onMouseenterItem:
|
|
113
|
-
onMouseoverItem:
|
|
114
|
-
onMouseoutItem:
|
|
112
|
+
onMouseenterItem: I,
|
|
113
|
+
onMouseoverItem: h,
|
|
114
|
+
onMouseoutItem: F
|
|
115
115
|
} = a, {
|
|
116
|
-
getKey:
|
|
117
|
-
listViewItemClass:
|
|
118
|
-
listViewItemStyle:
|
|
116
|
+
getKey: D,
|
|
117
|
+
listViewItemClass: T,
|
|
118
|
+
listViewItemStyle: P,
|
|
119
119
|
onCheckItem: j,
|
|
120
|
-
onClickItem:
|
|
121
|
-
} =
|
|
120
|
+
onClickItem: d
|
|
121
|
+
} = o, C = x(() => {
|
|
122
122
|
const t = {
|
|
123
123
|
"text-overflow": "ellipsis",
|
|
124
124
|
overflow: "hidden",
|
|
125
125
|
"white-space": "nowrap"
|
|
126
126
|
};
|
|
127
127
|
return e.itemClass ? t : {
|
|
128
|
-
margin:
|
|
128
|
+
margin: b.value === "small" ? "0.25rem 0" : "8px 0",
|
|
129
129
|
...t
|
|
130
130
|
};
|
|
131
131
|
});
|
|
132
|
-
function
|
|
133
|
-
return t.checked =
|
|
134
|
-
class:
|
|
135
|
-
id:
|
|
136
|
-
key:
|
|
137
|
-
style:
|
|
138
|
-
onClick: (H) =>
|
|
139
|
-
onMouseenter: (H) =>
|
|
140
|
-
onMouseover: (H) =>
|
|
141
|
-
onMouseout: (H) =>
|
|
142
|
-
}, [
|
|
132
|
+
function i(t, V, B) {
|
|
133
|
+
return t.checked = v.findIndexInSelectedItems(t) > -1, n("li", {
|
|
134
|
+
class: T(t, V),
|
|
135
|
+
id: D(t, V),
|
|
136
|
+
key: D(t, V),
|
|
137
|
+
style: P(t, V),
|
|
138
|
+
onClick: (H) => d(t, V, H),
|
|
139
|
+
onMouseenter: (H) => I(H, t, V),
|
|
140
|
+
onMouseover: (H) => h(H, t, V),
|
|
141
|
+
onMouseout: (H) => F(H, t, V)
|
|
142
|
+
}, [M.value && n("div", {
|
|
143
143
|
class: "f-list-select",
|
|
144
144
|
onClick: (H) => H.stopPropagation()
|
|
145
|
-
}, [n(
|
|
146
|
-
id: "list-" +
|
|
145
|
+
}, [n(K, {
|
|
146
|
+
id: "list-" + D(t, V),
|
|
147
147
|
customClass: "listview-checkbox float-left",
|
|
148
|
-
disabled: t[
|
|
148
|
+
disabled: t[u.value],
|
|
149
149
|
checked: t.checked,
|
|
150
150
|
"onUpdate:checked": (H) => t.checked = H,
|
|
151
151
|
onChange: (H) => {
|
|
152
|
-
j(t,
|
|
152
|
+
j(t, V, !H.checked);
|
|
153
153
|
}
|
|
154
154
|
}, null)]), n("div", {
|
|
155
155
|
class: "f-list-content"
|
|
156
156
|
}, [n("div", {
|
|
157
157
|
class: e.itemContentClass,
|
|
158
158
|
style: C.value,
|
|
159
|
-
title: t.raw[
|
|
160
|
-
}, [t.raw[
|
|
159
|
+
title: t.raw[s.value] || t.raw[y.value]
|
|
160
|
+
}, [t.raw[y.value]])])]);
|
|
161
161
|
}
|
|
162
162
|
return {
|
|
163
|
-
renderItem:
|
|
163
|
+
renderItem: i
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
const
|
|
168
|
-
onMouseenterItem:
|
|
169
|
-
onMouseoverItem:
|
|
170
|
-
onMouseoutItem:
|
|
166
|
+
function ze(e, l, p, w, g, a, o, v, O, m) {
|
|
167
|
+
const b = f(e.multiSelect), y = f(e.disableField), s = f(e.textField), {
|
|
168
|
+
onMouseenterItem: u,
|
|
169
|
+
onMouseoverItem: M,
|
|
170
|
+
onMouseoutItem: I
|
|
171
171
|
} = a, {
|
|
172
|
-
getKey:
|
|
173
|
-
listViewItemClass:
|
|
174
|
-
listViewItemStyle:
|
|
175
|
-
onCheckItem:
|
|
176
|
-
onClickItem:
|
|
172
|
+
getKey: h,
|
|
173
|
+
listViewItemClass: F,
|
|
174
|
+
listViewItemStyle: D,
|
|
175
|
+
onCheckItem: T,
|
|
176
|
+
onClickItem: P,
|
|
177
177
|
updateSelectedItems: j
|
|
178
|
-
} =
|
|
179
|
-
function i
|
|
180
|
-
return e.contentTemplate ? n(
|
|
181
|
-
item:
|
|
178
|
+
} = o;
|
|
179
|
+
function d(i, t, V) {
|
|
180
|
+
return e.contentTemplate ? n(N, null, [e.contentTemplate({
|
|
181
|
+
item: i.raw,
|
|
182
182
|
index: t,
|
|
183
|
-
selectedItem:
|
|
184
|
-
})]) : l.slots.content ? n(
|
|
185
|
-
item:
|
|
183
|
+
selectedItem: V
|
|
184
|
+
})]) : l.slots.content ? n(N, null, [l.slots.content && l.slots.content({
|
|
185
|
+
item: i.raw,
|
|
186
186
|
index: t,
|
|
187
|
-
selectedItem:
|
|
187
|
+
selectedItem: V
|
|
188
188
|
})]) : n("div", {
|
|
189
189
|
style: "margin: 10px 0;"
|
|
190
|
-
}, [
|
|
190
|
+
}, [i.raw[s.value || "name"]]);
|
|
191
191
|
}
|
|
192
|
-
function C(
|
|
192
|
+
function C(i, t, V) {
|
|
193
193
|
return n("li", {
|
|
194
|
-
class:
|
|
195
|
-
id:
|
|
196
|
-
key:
|
|
197
|
-
style:
|
|
198
|
-
onClick: (B) =>
|
|
199
|
-
onMouseenter: (B) =>
|
|
200
|
-
onMouseover: (B) =>
|
|
201
|
-
onMouseout: (B) =>
|
|
202
|
-
}, [
|
|
194
|
+
class: F(i, t),
|
|
195
|
+
id: h(i, t),
|
|
196
|
+
key: h(i, t),
|
|
197
|
+
style: D(i, t),
|
|
198
|
+
onClick: (B) => P(i, t, B),
|
|
199
|
+
onMouseenter: (B) => u(B, i, t),
|
|
200
|
+
onMouseover: (B) => M(B, i, t),
|
|
201
|
+
onMouseout: (B) => I(B, i, t)
|
|
202
|
+
}, [b.value && n("div", {
|
|
203
203
|
class: "f-list-select",
|
|
204
204
|
onClick: (B) => B.stopPropagation()
|
|
205
|
-
}, [n(
|
|
206
|
-
id: "list-" +
|
|
205
|
+
}, [n(K, {
|
|
206
|
+
id: "list-" + h(i, t),
|
|
207
207
|
customClass: "listview-checkbox",
|
|
208
|
-
disabled:
|
|
209
|
-
checked:
|
|
210
|
-
"onUpdate:checked": (B) =>
|
|
208
|
+
disabled: i[y.value],
|
|
209
|
+
checked: i.checked,
|
|
210
|
+
"onUpdate:checked": (B) => i.checked = B,
|
|
211
211
|
onChange: (B) => {
|
|
212
|
-
|
|
212
|
+
T(i, t, !B.checked), j();
|
|
213
213
|
}
|
|
214
214
|
}, null)]), n("div", {
|
|
215
215
|
class: "f-list-content"
|
|
216
|
-
}, [i
|
|
216
|
+
}, [d(i, t, V)])]);
|
|
217
217
|
}
|
|
218
218
|
return {
|
|
219
219
|
renderItem: C
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
const
|
|
224
|
-
onMouseenterItem:
|
|
225
|
-
onMouseoverItem:
|
|
226
|
-
onMouseoutItem:
|
|
222
|
+
function Ue(e, l, p, w, g, a, o, v, O, m) {
|
|
223
|
+
const b = f(e.multiSelect), y = f(e.disableField), s = f(e.textField), {
|
|
224
|
+
onMouseenterItem: u,
|
|
225
|
+
onMouseoverItem: M,
|
|
226
|
+
onMouseoutItem: I
|
|
227
227
|
} = a, {
|
|
228
|
-
getKey:
|
|
229
|
-
listViewItemClass:
|
|
230
|
-
onCheckItem:
|
|
231
|
-
onClickItem:
|
|
232
|
-
} =
|
|
233
|
-
dragstart:
|
|
228
|
+
getKey: h,
|
|
229
|
+
listViewItemClass: F,
|
|
230
|
+
onCheckItem: D,
|
|
231
|
+
onClickItem: T
|
|
232
|
+
} = o, {
|
|
233
|
+
dragstart: P,
|
|
234
234
|
dragenter: j,
|
|
235
|
-
dragover:
|
|
235
|
+
dragover: d,
|
|
236
236
|
dragend: C
|
|
237
|
-
} =
|
|
238
|
-
removeItem:
|
|
239
|
-
} = O, t =
|
|
240
|
-
margin:
|
|
237
|
+
} = w, {
|
|
238
|
+
removeItem: i
|
|
239
|
+
} = O, t = x(() => ({
|
|
240
|
+
margin: b.value ? "10px 0" : "10px 0px 10px 14px"
|
|
241
241
|
}));
|
|
242
|
-
function
|
|
243
|
-
const L =
|
|
242
|
+
function V(r, c = "") {
|
|
243
|
+
const L = r.target;
|
|
244
244
|
L.title = L.scrollWidth > L.clientWidth ? c : "";
|
|
245
245
|
}
|
|
246
|
-
function B(
|
|
246
|
+
function B(r) {
|
|
247
247
|
return n("div", {
|
|
248
248
|
style: t.value,
|
|
249
|
-
onMouseenter: (c) =>
|
|
250
|
-
}, [
|
|
249
|
+
onMouseenter: (c) => V(c, r.raw[s.value || "name"])
|
|
250
|
+
}, [r.raw[s.value || "name"]]);
|
|
251
251
|
}
|
|
252
252
|
function H() {
|
|
253
253
|
return l.slots.itemContent ? l.slots.itemContent : B;
|
|
254
254
|
}
|
|
255
255
|
const G = H();
|
|
256
|
-
function
|
|
256
|
+
function S(r, c, L) {
|
|
257
257
|
return n("li", {
|
|
258
|
-
class:
|
|
259
|
-
id:
|
|
260
|
-
key:
|
|
261
|
-
onClick: (
|
|
262
|
-
onMouseenter: (
|
|
263
|
-
onMouseover: (
|
|
264
|
-
onMouseout: (
|
|
258
|
+
class: F(r, c),
|
|
259
|
+
id: h(r, c),
|
|
260
|
+
key: h(r, c),
|
|
261
|
+
onClick: (R) => T(r, c, R),
|
|
262
|
+
onMouseenter: (R) => u(R, r, c),
|
|
263
|
+
onMouseover: (R) => M(R, r, c),
|
|
264
|
+
onMouseout: (R) => I(R, r, c),
|
|
265
265
|
draggable: "true",
|
|
266
|
-
onDragstart: (
|
|
267
|
-
onDragenter: (
|
|
268
|
-
onDragend: (
|
|
269
|
-
onDragover: (
|
|
270
|
-
}, [
|
|
266
|
+
onDragstart: (R) => P(R, r, c),
|
|
267
|
+
onDragenter: (R) => j(R, c),
|
|
268
|
+
onDragend: (R) => C(R, r),
|
|
269
|
+
onDragover: (R) => d(R)
|
|
270
|
+
}, [b.value && n("div", {
|
|
271
271
|
class: "f-list-select",
|
|
272
|
-
onClick: (
|
|
273
|
-
}, [n(
|
|
274
|
-
id: "list-" +
|
|
272
|
+
onClick: (R) => R.stopPropagation()
|
|
273
|
+
}, [n(K, {
|
|
274
|
+
id: "list-" + h(r, c),
|
|
275
275
|
customClass: "listview-checkbox",
|
|
276
|
-
disabled:
|
|
277
|
-
checked:
|
|
278
|
-
"onUpdate:checked": (
|
|
279
|
-
onChange: (
|
|
276
|
+
disabled: r[y.value] || !r.checked,
|
|
277
|
+
checked: r.checked,
|
|
278
|
+
"onUpdate:checked": (R) => r.checked = R,
|
|
279
|
+
onChange: (R) => D(r, c, !R.checked)
|
|
280
280
|
}, null)]), n("div", {
|
|
281
281
|
class: "f-list-content"
|
|
282
|
-
}, [G(
|
|
282
|
+
}, [G(r)]), n("div", {
|
|
283
283
|
class: "f-list-remove",
|
|
284
|
-
onClick: (
|
|
285
|
-
|
|
284
|
+
onClick: (R) => {
|
|
285
|
+
R.stopPropagation(), i(c);
|
|
286
286
|
}
|
|
287
287
|
}, [n("div", {
|
|
288
288
|
class: "f-list-remove-icon"
|
|
@@ -295,72 +295,72 @@ function Xe(e, l, I, p, w, a, s, o, O, T) {
|
|
|
295
295
|
}, null)])])]);
|
|
296
296
|
}
|
|
297
297
|
return {
|
|
298
|
-
renderItem:
|
|
298
|
+
renderItem: S
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
var
|
|
303
|
-
const
|
|
304
|
-
collpaseGroupIconClass:
|
|
305
|
-
} =
|
|
306
|
-
toggleGroupRow:
|
|
307
|
-
} =
|
|
308
|
-
function
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
function
|
|
312
|
-
return l.slots.group ? n(
|
|
313
|
-
item:
|
|
314
|
-
index:
|
|
315
|
-
selectedItem:
|
|
301
|
+
function We(e, l, p, w, g, a, o, v, O, m) {
|
|
302
|
+
var h;
|
|
303
|
+
const b = f(((h = e.group) == null ? void 0 : h.groupFields) || []), {
|
|
304
|
+
collpaseGroupIconClass: y
|
|
305
|
+
} = g, {
|
|
306
|
+
toggleGroupRow: s
|
|
307
|
+
} = m;
|
|
308
|
+
function u(F, D) {
|
|
309
|
+
D.collapse = !D.collapse, p.value = s(D.collapse ? "collapse" : "expand", D, p.value);
|
|
310
|
+
}
|
|
311
|
+
function M(F, D, T) {
|
|
312
|
+
return l.slots.group ? n(N, null, [l.slots.content && l.slots.group({
|
|
313
|
+
item: F.raw,
|
|
314
|
+
index: D,
|
|
315
|
+
selectedItem: T
|
|
316
316
|
})]) : n("div", {
|
|
317
317
|
class: "f-navlookup-recentHeader",
|
|
318
|
-
onClick: (
|
|
318
|
+
onClick: (P) => u(P, F)
|
|
319
319
|
}, [n("div", {
|
|
320
320
|
class: "fv-grid-group-row-icon"
|
|
321
321
|
}, [n("span", {
|
|
322
|
-
class:
|
|
322
|
+
class: y(F)
|
|
323
323
|
}, null)]), n("div", {
|
|
324
324
|
class: "f-navlookup-recommandLabel"
|
|
325
|
-
}, [
|
|
325
|
+
}, [F.raw[b.value[F.layer]]])]);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
return
|
|
327
|
+
function I(F, D, T) {
|
|
328
|
+
return F.layer > -1 && M(F, D, T);
|
|
329
329
|
}
|
|
330
330
|
return {
|
|
331
|
-
renderItem:
|
|
331
|
+
renderItem: I
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
const { dataView:
|
|
336
|
-
function
|
|
337
|
-
if (
|
|
338
|
-
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(
|
|
334
|
+
function Ke(e, l, p, w) {
|
|
335
|
+
const { dataView: g } = p, { updateSelectedItems: a } = w;
|
|
336
|
+
function o(v) {
|
|
337
|
+
if (v > -1 && v < g.value.length) {
|
|
338
|
+
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(g.value[v]))
|
|
339
339
|
return;
|
|
340
|
-
const O =
|
|
340
|
+
const O = g.value.splice(v, 1);
|
|
341
341
|
a(), l.emit("removeItem", O[0]);
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
return { removeItem:
|
|
344
|
+
return { removeItem: o };
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
const
|
|
346
|
+
function Xe(e, l, p, w, g, a, o, v, O, m) {
|
|
347
|
+
const b = f(e.view), y = f(e.view === "CardView"), s = f({}), u = Ke(e, l, w, O), M = x(() => ({
|
|
348
348
|
"f-list-view-group": !0,
|
|
349
349
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
350
|
-
"d-flex":
|
|
351
|
-
"flex-wrap":
|
|
352
|
-
})),
|
|
353
|
-
|
|
354
|
-
function
|
|
355
|
-
return
|
|
356
|
-
}
|
|
357
|
-
const
|
|
358
|
-
renderItem:
|
|
359
|
-
} =
|
|
360
|
-
renderItem:
|
|
361
|
-
} =
|
|
362
|
-
function
|
|
363
|
-
return
|
|
350
|
+
"d-flex": y.value,
|
|
351
|
+
"flex-wrap": y.value
|
|
352
|
+
})), I = x(() => !!p.value && p.value.length > 0), h = x(() => p.value.length === 0);
|
|
353
|
+
x(() => h.value && !l.slots.empty);
|
|
354
|
+
function F() {
|
|
355
|
+
return b.value === "SingleView" ? q : b.value === "DraggableView" ? Ue : (b.value === "ContentView" || b.value === "CardView") && (e.contentTemplate || l.slots.content) ? ze : q;
|
|
356
|
+
}
|
|
357
|
+
const D = F(), {
|
|
358
|
+
renderItem: T
|
|
359
|
+
} = D(e, l, p, m, g, a, O, o, u, v), {
|
|
360
|
+
renderItem: P
|
|
361
|
+
} = We(e, l, p, m, g, a, O, o, u, v), j = [T, P];
|
|
362
|
+
function d() {
|
|
363
|
+
return p.value.filter((t) => t.visible !== !1).map((t, V) => j[t.type](t, V, s));
|
|
364
364
|
}
|
|
365
365
|
function C() {
|
|
366
366
|
return n("div", {
|
|
@@ -368,126 +368,126 @@ function qe(e, l, I, p, w, a, s, o, O, T) {
|
|
|
368
368
|
style: "margin: 0 auto;"
|
|
369
369
|
}, [n("p", {
|
|
370
370
|
class: "f-empty-title"
|
|
371
|
-
}, [e.emptyTemplate ? e.emptyTemplate() : l.slots.empty ? l.slots.empty() :
|
|
371
|
+
}, [e.emptyTemplate ? e.emptyTemplate() : l.slots.empty ? l.slots.empty() : Ee.getLocaleValue("listView.emptyMessage")])]);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function i() {
|
|
374
374
|
return n("ul", {
|
|
375
|
-
class:
|
|
375
|
+
class: M.value,
|
|
376
376
|
style: "list-style: none;"
|
|
377
|
-
}, [
|
|
377
|
+
}, [I.value && d(), h.value && C()]);
|
|
378
378
|
}
|
|
379
379
|
return {
|
|
380
|
-
renderListArea:
|
|
380
|
+
renderListArea: i
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
function
|
|
383
|
+
function Ye(e, l, p) {
|
|
384
|
+
function w() {
|
|
385
385
|
return l.slots.header && n("div", {
|
|
386
386
|
class: "f-list-view-header"
|
|
387
387
|
}, [l.slots.header()]);
|
|
388
388
|
}
|
|
389
389
|
return {
|
|
390
|
-
renderHeader:
|
|
390
|
+
renderHeader: w
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
const
|
|
395
|
-
function O(
|
|
393
|
+
function J(e, l, p) {
|
|
394
|
+
const w = f(e.headerClass), g = f(e.placeholder), a = f(""), o = x(() => !a.value), v = x(() => !!a.value);
|
|
395
|
+
function O(s) {
|
|
396
396
|
a.value = "";
|
|
397
397
|
}
|
|
398
|
-
|
|
399
|
-
e.enableHighlightSearch &&
|
|
398
|
+
Z(a, (s) => {
|
|
399
|
+
e.enableHighlightSearch && p.search(s), l.emit("afterSearch", s);
|
|
400
400
|
});
|
|
401
|
-
const
|
|
402
|
-
const
|
|
401
|
+
const m = x(() => {
|
|
402
|
+
const s = {
|
|
403
403
|
"form-group": !0,
|
|
404
404
|
"farris-form-group": !0
|
|
405
405
|
};
|
|
406
|
-
return
|
|
406
|
+
return w.value && w.value.split(" ").reduce((M, I) => (M[I] = !0, M), s), s;
|
|
407
407
|
});
|
|
408
|
-
function
|
|
408
|
+
function b(s) {
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function y() {
|
|
411
411
|
return n("div", {
|
|
412
412
|
class: "f-list-view-header",
|
|
413
|
-
onClick:
|
|
413
|
+
onClick: we(() => b, ["prevent", "stop"])
|
|
414
414
|
}, [n("div", {
|
|
415
|
-
class:
|
|
415
|
+
class: m.value
|
|
416
416
|
}, [n("div", {
|
|
417
417
|
class: "farris-input-wrap"
|
|
418
418
|
}, [n("div", {
|
|
419
419
|
class: "f-cmp-inputgroup"
|
|
420
420
|
}, [n("div", {
|
|
421
421
|
class: "input-group f-state-editable"
|
|
422
|
-
}, [
|
|
422
|
+
}, [ye(n("input", {
|
|
423
423
|
class: "form-control f-utils-fill text-left",
|
|
424
|
-
"onUpdate:modelValue": (
|
|
424
|
+
"onUpdate:modelValue": (s) => a.value = s,
|
|
425
425
|
name: "input-group-value",
|
|
426
426
|
type: "text",
|
|
427
|
-
placeholder:
|
|
427
|
+
placeholder: g.value,
|
|
428
428
|
autocomplete: "off"
|
|
429
|
-
}, null), [[
|
|
429
|
+
}, null), [[Ie, a.value]]), n("div", {
|
|
430
430
|
class: "input-group-append"
|
|
431
|
-
}, [
|
|
431
|
+
}, [v.value && n("span", {
|
|
432
432
|
class: "input-group-text input-group-clear",
|
|
433
|
-
onClick: (
|
|
433
|
+
onClick: (s) => O()
|
|
434
434
|
}, [n("i", {
|
|
435
435
|
class: "f-icon f-icon-close-circle"
|
|
436
|
-
}, null)]),
|
|
436
|
+
}, null)]), o.value && n("span", {
|
|
437
437
|
class: "input-group-text"
|
|
438
438
|
}, [n("span", {
|
|
439
439
|
class: "f-icon f-icon-search"
|
|
440
440
|
}, null)])])])])])])]);
|
|
441
441
|
}
|
|
442
442
|
return {
|
|
443
|
-
renderHeader:
|
|
443
|
+
renderHeader: y
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
const e =
|
|
448
|
-
function a(
|
|
449
|
-
|
|
446
|
+
function $e() {
|
|
447
|
+
const e = f(""), l = f(-1), p = f(""), w = f(-1), g = f(!1);
|
|
448
|
+
function a(y, s, u) {
|
|
449
|
+
w.value = u;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
451
|
+
function o(y, s, u) {
|
|
452
|
+
g.value || (w.value = u);
|
|
453
453
|
}
|
|
454
|
-
function
|
|
455
|
-
|
|
454
|
+
function v(y, s, u) {
|
|
455
|
+
w.value = -1;
|
|
456
456
|
}
|
|
457
457
|
function O() {
|
|
458
|
-
|
|
458
|
+
g.value = !0;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
|
|
460
|
+
function m() {
|
|
461
|
+
g.value = !1;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function b() {
|
|
464
464
|
l.value = -1, e.value = "";
|
|
465
465
|
}
|
|
466
466
|
return {
|
|
467
467
|
activeIndex: l,
|
|
468
|
-
focusedItemId:
|
|
469
|
-
hoverIndex:
|
|
470
|
-
clearActiveItem:
|
|
468
|
+
focusedItemId: p,
|
|
469
|
+
hoverIndex: w,
|
|
470
|
+
clearActiveItem: b,
|
|
471
471
|
onMouseenterItem: a,
|
|
472
|
-
onMouseoverItem:
|
|
473
|
-
onMouseoutItem:
|
|
474
|
-
resumeHover:
|
|
472
|
+
onMouseoverItem: o,
|
|
473
|
+
onMouseoutItem: v,
|
|
474
|
+
resumeHover: m,
|
|
475
475
|
suspendHover: O
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
const
|
|
480
|
-
let
|
|
481
|
-
function
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
function
|
|
486
|
-
const { left: C, top:
|
|
478
|
+
function qe(e, l, p, w) {
|
|
479
|
+
const g = f(e.idField), { dataView: a } = p, o = f(-1), v = f(!1), { activeIndex: O, focusedItemId: m, hoverIndex: b, resumeHover: y, suspendHover: s } = w;
|
|
480
|
+
let u, M = 0, I = 0;
|
|
481
|
+
function h(d, C) {
|
|
482
|
+
const i = d - M, t = C - I;
|
|
483
|
+
u.style.left = parseInt(u.style.left) + i + "px", u.style.top = parseInt(u.style.top) + t + "px", M = d, I = C;
|
|
484
|
+
}
|
|
485
|
+
function F(d) {
|
|
486
|
+
const { left: C, top: i } = d.getBoundingClientRect(), t = d.cloneNode(!0);
|
|
487
487
|
return t.className = t.className + " f-listview-drag-moving", t.style.cssText = `
|
|
488
488
|
position:absolute;
|
|
489
489
|
left:${C}px;
|
|
490
|
-
top:${document.documentElement.scrollTop ?
|
|
490
|
+
top:${document.documentElement.scrollTop ? i + document.documentElement.scrollTop : i}px;
|
|
491
491
|
z-index: 999999;
|
|
492
492
|
pointer-events: none;
|
|
493
493
|
border-radius: 10px;
|
|
@@ -496,230 +496,229 @@ function Ze(e, l, I, p) {
|
|
|
496
496
|
align-items: center;
|
|
497
497
|
float: none;
|
|
498
498
|
text-align: initial;
|
|
499
|
-
width:${getComputedStyle(
|
|
500
|
-
height:${getComputedStyle(
|
|
499
|
+
width:${getComputedStyle(d).width};
|
|
500
|
+
height:${getComputedStyle(d).height};
|
|
501
501
|
`, t.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", t.children[0].children[0].style.cssText = `
|
|
502
502
|
margin: 10px 0px 10px 14px;
|
|
503
503
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
504
504
|
`, t.children[1].style.cssText = "width: 30px;padding: 0 14px 0 0", t.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(t), t;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
if (
|
|
508
|
-
if (
|
|
506
|
+
function D(d, C, i) {
|
|
507
|
+
if (d.stopPropagation(), s(), C) {
|
|
508
|
+
if (u = F(d.target), d.dataTransfer) {
|
|
509
509
|
const t = new Image();
|
|
510
|
-
t.src = "",
|
|
510
|
+
t.src = "", d.dataTransfer.setDragImage(t, 0, 0);
|
|
511
511
|
}
|
|
512
|
-
|
|
513
|
-
|
|
512
|
+
M = d.pageX, I = d.pageY, setTimeout(() => {
|
|
513
|
+
o.value = i, v.value = !0, C.moving = !0;
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
function
|
|
518
|
-
if (
|
|
519
|
-
const
|
|
520
|
-
t.splice(
|
|
517
|
+
function T(d, C) {
|
|
518
|
+
if (d.preventDefault(), o.value !== C) {
|
|
519
|
+
const i = a.value[o.value], t = a.value;
|
|
520
|
+
t.splice(o.value, 1), t.splice(C, 0, i), o.value = C, h(d.pageX, d.pageY);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
|
|
523
|
+
function P(d) {
|
|
524
|
+
d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "move"), h(d.pageX, d.pageY);
|
|
525
525
|
}
|
|
526
|
-
function j(
|
|
527
|
-
C && (C.moving = !1,
|
|
528
|
-
|
|
529
|
-
}),
|
|
526
|
+
function j(d, C) {
|
|
527
|
+
C && (C.moving = !1, u && (document.body.removeChild(u), u = null)), a.value.forEach((i, t) => {
|
|
528
|
+
i.__fv_index__ = t;
|
|
529
|
+
}), v.value = !1, y(), b.value = C.raw.__fv_index__, O.value = C.raw.__fv_index__, m.value = C.raw[g.value], l.emit("change", a.value), l.emit("activeChange", [C.raw]);
|
|
530
530
|
}
|
|
531
531
|
return {
|
|
532
|
-
dragstart:
|
|
533
|
-
dragenter:
|
|
534
|
-
dragover:
|
|
532
|
+
dragstart: D,
|
|
533
|
+
dragenter: T,
|
|
534
|
+
dragover: P,
|
|
535
535
|
dragend: j,
|
|
536
|
-
isDragging:
|
|
536
|
+
isDragging: v
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
|
-
function
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
const
|
|
539
|
+
function Je(e, l, p, w, g, a) {
|
|
540
|
+
const o = f(e.idField), v = f(e.disableField), O = f(e.draggable);
|
|
541
|
+
f(e.itemClass);
|
|
542
|
+
const m = f(e.selection.multiSelect ?? !1), b = f(e.selection.multiSelectMode), { isDragging: y } = w, { activeIndex: s, focusedItemId: u, hoverIndex: M } = g, { clearSelection: I, getSelectedItems: h, toggleSelectItem: F, currentSelectedDataId: D } = a, T = f(h()), P = (S) => T.value.length === 0 ? !1 : T.value.some((r) => {
|
|
543
543
|
let c = "";
|
|
544
|
-
return
|
|
544
|
+
return r.data ? c = r.data[o.value] : c = r[o.value], c === S;
|
|
545
545
|
});
|
|
546
546
|
function j() {
|
|
547
|
-
|
|
547
|
+
T.value = h();
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
return
|
|
549
|
+
function d(S, r) {
|
|
550
|
+
return S.raw[o.value] != null ? S.raw[o.value] : "";
|
|
551
551
|
}
|
|
552
|
-
function C(
|
|
552
|
+
function C(S, r) {
|
|
553
553
|
const c = {
|
|
554
554
|
"f-list-view-group-item": !0,
|
|
555
555
|
"f-list-view-draggable-item": O.value,
|
|
556
|
-
"f-un-click": !
|
|
557
|
-
"f-un-select": !!
|
|
556
|
+
"f-un-click": !S.checked,
|
|
557
|
+
"f-un-select": !!S.raw[v.value],
|
|
558
558
|
"f-listview-active": (
|
|
559
559
|
// 多选
|
|
560
|
-
|
|
561
|
-
!
|
|
560
|
+
m.value && P(d(S)) || // 单选
|
|
561
|
+
!m.value && S.raw[o.value] === D.value
|
|
562
562
|
),
|
|
563
|
-
"f-listview-hover": !
|
|
564
|
-
moving: !!
|
|
563
|
+
"f-listview-hover": !y.value && r === M.value,
|
|
564
|
+
moving: !!S.moving
|
|
565
565
|
};
|
|
566
566
|
if (typeof e.itemClass == "string")
|
|
567
|
-
return
|
|
567
|
+
return W(c, e.itemClass);
|
|
568
568
|
if (typeof e.itemClass == "function") {
|
|
569
|
-
const L = e.itemClass(
|
|
570
|
-
return
|
|
569
|
+
const L = e.itemClass(S);
|
|
570
|
+
return W(c, L);
|
|
571
571
|
}
|
|
572
572
|
return c;
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function i(S, r) {
|
|
575
575
|
const c = {};
|
|
576
576
|
if (typeof e.itemStyle == "string")
|
|
577
|
-
return
|
|
577
|
+
return $(c, e.itemStyle);
|
|
578
578
|
if (typeof e.itemStyle == "function") {
|
|
579
|
-
const L = e.itemStyle(
|
|
580
|
-
return
|
|
579
|
+
const L = e.itemStyle(S);
|
|
580
|
+
return $(c, L);
|
|
581
581
|
}
|
|
582
582
|
return c;
|
|
583
583
|
}
|
|
584
|
-
const t =
|
|
585
|
-
function
|
|
586
|
-
|
|
584
|
+
const t = x(() => !m.value);
|
|
585
|
+
function V(S, r, c) {
|
|
586
|
+
S.checked = c, !S.raw[v.value] && (t.value && (u.value = S.raw[o.value]), F(S));
|
|
587
587
|
}
|
|
588
|
-
const B =
|
|
589
|
-
function G(
|
|
590
|
-
if (
|
|
588
|
+
const B = x(() => m.value && b.value === "OnCheckClearByClick"), H = x(() => !m.value || m.value && (b.value === "OnCheckAndClick" || b.value === "OnClick"));
|
|
589
|
+
function G(S, r, c) {
|
|
590
|
+
if (S.raw[v.value]) {
|
|
591
591
|
c == null || c.preventDefault(), c == null || c.stopPropagation();
|
|
592
592
|
return;
|
|
593
593
|
}
|
|
594
|
-
|
|
594
|
+
D.value = S.raw[o.value], u.value = S.raw[o.value], s.value = r, B.value && I(), H.value && (F(S), j()), l.emit("clickItem", { data: T.value, index: r, dataItem: S.raw }), l.emit("activeChange", T.value);
|
|
595
595
|
}
|
|
596
596
|
return {
|
|
597
|
-
getKey:
|
|
598
|
-
selectedItems:
|
|
597
|
+
getKey: d,
|
|
598
|
+
selectedItems: T,
|
|
599
599
|
listViewItemClass: C,
|
|
600
|
-
listViewItemStyle:
|
|
600
|
+
listViewItemStyle: i,
|
|
601
601
|
updateSelectedItems: j,
|
|
602
|
-
onCheckItem:
|
|
602
|
+
onCheckItem: V,
|
|
603
603
|
onClickItem: G
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
|
-
const
|
|
606
|
+
const U = /* @__PURE__ */ ee({
|
|
607
607
|
name: "FListView",
|
|
608
|
-
props:
|
|
608
|
+
props: te,
|
|
609
609
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
610
610
|
setup(e, l) {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
const V = {
|
|
611
|
+
const p = f(), w = f(!0), g = f(!1), a = f([]), o = 0, v = f(e.columns), O = Se(e, l), m = ke(e), b = be(e), y = Ve(e, m), s = Fe(e, /* @__PURE__ */ new Map(), O, b, m), u = De(e, s, m, a, l), M = Ne(e, p), I = Me(e, s), h = x(() => s.dataView.value.length), F = Re(e, l, u, m), D = Te(e, l, m, F, a), T = Oe(e), P = Be(e, {}, T), j = He(e, s, D, b, m, T, P), d = Pe(e, m, P, j), C = xe(e, m, P, j), i = je(e, v, s, h, o, j, d, C), {
|
|
612
|
+
getVisualData: t
|
|
613
|
+
} = i;
|
|
614
|
+
a.value = t(0, h.value + o - 1);
|
|
615
|
+
const V = x(() => {
|
|
616
|
+
const k = {
|
|
618
617
|
"f-list-view": !0,
|
|
619
618
|
"f-list-view-multiple": e.multiSelect
|
|
620
619
|
};
|
|
621
|
-
return e.size !== "default" && (
|
|
622
|
-
}),
|
|
623
|
-
function
|
|
624
|
-
return e.header === "SearchBar" ?
|
|
620
|
+
return e.size !== "default" && (k[`${e.size}-item`] = !0), W(k, e.customClass);
|
|
621
|
+
}), B = x(() => !!l.slots.footer || w.value);
|
|
622
|
+
function H() {
|
|
623
|
+
return e.header === "SearchBar" ? J : e.header === "ContentHeader" ? Ye : J;
|
|
625
624
|
}
|
|
626
|
-
const
|
|
627
|
-
renderHeader:
|
|
628
|
-
} =
|
|
629
|
-
renderListArea:
|
|
630
|
-
} =
|
|
631
|
-
function
|
|
632
|
-
|
|
625
|
+
const G = H(), {
|
|
626
|
+
renderHeader: S
|
|
627
|
+
} = G(e, l, M), r = $e(), c = qe(e, l, s, r), L = Je(e, l, a, c, r, u), {
|
|
628
|
+
renderListArea: R
|
|
629
|
+
} = Xe(e, l, a, s, y, r, u, i, L, c);
|
|
630
|
+
function ne(k) {
|
|
631
|
+
M.search(k);
|
|
633
632
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
633
|
+
function le(k) {
|
|
634
|
+
k && (s.load(k), a.value = t(0, h.value + o - 1));
|
|
636
635
|
}
|
|
637
|
-
function
|
|
638
|
-
|
|
636
|
+
function ae() {
|
|
637
|
+
u.clearSelection(), r.clearActiveItem();
|
|
639
638
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
639
|
+
function oe() {
|
|
640
|
+
return L.selectedItems.value;
|
|
642
641
|
}
|
|
643
|
-
function
|
|
644
|
-
return
|
|
642
|
+
function se() {
|
|
643
|
+
return L.selectedItems.value.map((k) => k[m.idField.value]);
|
|
645
644
|
}
|
|
646
|
-
function
|
|
647
|
-
|
|
645
|
+
function X(k) {
|
|
646
|
+
u.selectedValues.value = k, L.updateSelectedItems();
|
|
648
647
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
648
|
+
function ie() {
|
|
649
|
+
return u.currentSelectedDataId.value;
|
|
651
650
|
}
|
|
652
|
-
function
|
|
653
|
-
|
|
651
|
+
function ue(k) {
|
|
652
|
+
F.activeRowById(k);
|
|
654
653
|
}
|
|
655
|
-
function
|
|
656
|
-
const _ =
|
|
657
|
-
|
|
654
|
+
function ce(k) {
|
|
655
|
+
const _ = m.idField.value, A = a.value.find((z) => z.raw[_] === k), E = a.value.findIndex((z) => z.raw[_] === k);
|
|
656
|
+
A && E > -1 && L.onClickItem(A, E);
|
|
658
657
|
}
|
|
659
|
-
function
|
|
660
|
-
const _ =
|
|
661
|
-
|
|
658
|
+
function re(k) {
|
|
659
|
+
const _ = m.idField.value, A = a.value.find((E) => E.raw[_] === k);
|
|
660
|
+
A && F.changeRow(A);
|
|
662
661
|
}
|
|
663
|
-
function
|
|
664
|
-
|
|
662
|
+
function de(k) {
|
|
663
|
+
I.updatePagination(k);
|
|
665
664
|
}
|
|
666
|
-
function
|
|
667
|
-
return
|
|
665
|
+
function fe(k) {
|
|
666
|
+
return a.value.filter((_) => k.includes(_.raw[e.idField]));
|
|
668
667
|
}
|
|
669
668
|
l.expose({
|
|
670
|
-
search:
|
|
671
|
-
updateDataSource:
|
|
672
|
-
clearSelection:
|
|
673
|
-
getSelections:
|
|
674
|
-
updateSelectionByIds:
|
|
675
|
-
getSelectionIds:
|
|
676
|
-
activeRowById:
|
|
677
|
-
getCurrentRowId:
|
|
678
|
-
clickRowItemById:
|
|
679
|
-
updatePagination:
|
|
680
|
-
getVisibleDataByIds:
|
|
681
|
-
selectRowById:
|
|
669
|
+
search: ne,
|
|
670
|
+
updateDataSource: le,
|
|
671
|
+
clearSelection: ae,
|
|
672
|
+
getSelections: oe,
|
|
673
|
+
updateSelectionByIds: X,
|
|
674
|
+
getSelectionIds: se,
|
|
675
|
+
activeRowById: ue,
|
|
676
|
+
getCurrentRowId: ie,
|
|
677
|
+
clickRowItemById: ce,
|
|
678
|
+
updatePagination: de,
|
|
679
|
+
getVisibleDataByIds: fe,
|
|
680
|
+
selectRowById: re
|
|
682
681
|
});
|
|
683
|
-
function
|
|
684
|
-
e.multiSelect && (
|
|
682
|
+
function ve(k) {
|
|
683
|
+
e.multiSelect && (k.preventDefault(), k.stopPropagation());
|
|
685
684
|
}
|
|
686
|
-
|
|
687
|
-
|
|
685
|
+
Z(() => e.selectionValues, (k, _) => {
|
|
686
|
+
k !== _ && X(k);
|
|
688
687
|
});
|
|
689
|
-
const
|
|
690
|
-
sidebarWidth:
|
|
691
|
-
showSidebarCheckBox:
|
|
692
|
-
} =
|
|
693
|
-
applyColumnSorter:
|
|
694
|
-
columnContext:
|
|
695
|
-
updateColumnRenderContext:
|
|
696
|
-
} =
|
|
697
|
-
shouldRenderPagination:
|
|
698
|
-
} =
|
|
699
|
-
renderDataGridPagination:
|
|
700
|
-
} =
|
|
688
|
+
const me = Le(e, u), {
|
|
689
|
+
sidebarWidth: ge,
|
|
690
|
+
showSidebarCheckBox: Qe
|
|
691
|
+
} = me, he = _e(e, l), {
|
|
692
|
+
applyColumnSorter: Ze,
|
|
693
|
+
columnContext: Ce,
|
|
694
|
+
updateColumnRenderContext: et
|
|
695
|
+
} = he, pe = Ge(e, s, a, Ce, i, h, o, ge, D), {
|
|
696
|
+
shouldRenderPagination: tt
|
|
697
|
+
} = I, {
|
|
698
|
+
renderDataGridPagination: nt
|
|
699
|
+
} = Ae(e, l, s, pe, I, u);
|
|
701
700
|
return () => n("div", {
|
|
702
|
-
class:
|
|
703
|
-
onClick:
|
|
704
|
-
}, [
|
|
701
|
+
class: V.value,
|
|
702
|
+
onClick: ve
|
|
703
|
+
}, [S(), n("div", {
|
|
705
704
|
ref: p,
|
|
706
705
|
class: "f-list-view-content",
|
|
707
706
|
onMouseover: () => {
|
|
708
|
-
|
|
707
|
+
g.value = !0;
|
|
709
708
|
},
|
|
710
709
|
onMouseleave: () => {
|
|
711
|
-
|
|
710
|
+
g.value = !1;
|
|
712
711
|
}
|
|
713
|
-
}, [
|
|
712
|
+
}, [R()]), B.value && n("div", {
|
|
714
713
|
class: "f-list-view-footer"
|
|
715
714
|
}, [e.footerTemplate ? e.footerTemplate() : l.slots.footer && l.slots.footer()])]);
|
|
716
715
|
}
|
|
717
|
-
}),
|
|
716
|
+
}), Q = /* @__PURE__ */ ee({
|
|
718
717
|
name: "FListViewTable",
|
|
719
|
-
props:
|
|
718
|
+
props: te,
|
|
720
719
|
emits: ["outputValue", "currentEvent", "selectionChanged"],
|
|
721
720
|
setup(e, l) {
|
|
722
|
-
const
|
|
721
|
+
const p = [{
|
|
723
722
|
name: "任芳",
|
|
724
723
|
code: "1.PO20198989001",
|
|
725
724
|
date: "2024-02-19",
|
|
@@ -754,10 +753,10 @@ const W = /* @__PURE__ */ ne({
|
|
|
754
753
|
desc: "导游5",
|
|
755
754
|
amount: 84.13,
|
|
756
755
|
avatar: "./assets/avatar5.png"
|
|
757
|
-
}],
|
|
756
|
+
}], w = x(() => e.data.length > 0 ? e.data : p);
|
|
758
757
|
return () => {
|
|
759
|
-
var
|
|
760
|
-
return n(
|
|
758
|
+
var g;
|
|
759
|
+
return n(N, null, [(g = w.value) == null ? void 0 : g.map((a) => n("div", {
|
|
761
760
|
class: "f-template-listview-row"
|
|
762
761
|
}, [n("div", {
|
|
763
762
|
class: "list-view-item-title"
|
|
@@ -779,22 +778,22 @@ const W = /* @__PURE__ */ ne({
|
|
|
779
778
|
class: "content-message"
|
|
780
779
|
}, [n("div", {
|
|
781
780
|
class: "ower"
|
|
782
|
-
}, [n("p", null, [
|
|
781
|
+
}, [n("p", null, [Y("创建人")]), n("p", {
|
|
783
782
|
class: "con"
|
|
784
783
|
}, [a.name])]), n("div", {
|
|
785
784
|
class: "date"
|
|
786
|
-
}, [n("p", null, [
|
|
785
|
+
}, [n("p", null, [Y("创建时间")]), n("p", {
|
|
787
786
|
class: "con"
|
|
788
787
|
}, [a.date])])])])]))]);
|
|
789
788
|
};
|
|
790
789
|
}
|
|
791
790
|
});
|
|
792
|
-
|
|
793
|
-
e.component(
|
|
791
|
+
U.install = (e) => {
|
|
792
|
+
e.component(U.name, U), e.component(Q.name, Q);
|
|
794
793
|
};
|
|
795
794
|
export {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
795
|
+
U as FListView,
|
|
796
|
+
Q as FListViewTable,
|
|
797
|
+
U as default,
|
|
798
|
+
te as listViewProps
|
|
800
799
|
};
|