@farris/ui-vue 1.7.0-beta.3 → 1.7.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +10 -1
- package/components/avatar/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +178 -176
- package/components/calendar/index.umd.cjs +2 -2
- package/components/collection-property-editor/index.esm.js +48 -46
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +319 -300
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +2287 -1161
- package/components/comment/index.umd.cjs +7 -7
- package/components/component/index.esm.js +3 -1
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +926 -901
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-view/index.esm.js +898 -899
- package/components/data-view/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +3 -1
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +239 -221
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +11 -9
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/expression-editor/index.esm.js +1299 -1279
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +731 -678
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +1792 -1772
- package/components/filter-condition-editor/index.umd.cjs +4 -4
- package/components/image/index.esm.js +246 -240
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +9 -7
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +1 -1
- package/components/list-view/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +2009 -886
- package/components/locale/index.umd.cjs +6 -6
- package/components/number-range/index.esm.js +190 -181
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +734 -714
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +60 -49
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +2461 -2500
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-group/index.esm.js +30 -30
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +238 -238
- package/components/schema-selector/index.umd.cjs +4 -4
- package/components/section/index.esm.js +217 -302
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +1793 -1773
- package/components/sort-condition-editor/index.umd.cjs +4 -4
- package/components/transfer/index.esm.js +155 -155
- package/components/transfer/index.umd.cjs +3 -3
- package/designer/data-grid/index.esm.js +895 -867
- package/designer/data-grid/index.umd.cjs +5 -5
- package/designer/data-view/index.esm.js +145 -144
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/drawer/index.esm.js +73 -71
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +87 -65
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +14 -3
- package/designer/farris-designer.all.umd.cjs +3 -3
- package/designer/input-group/index.esm.js +34 -14
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1 -1
- package/designer/list-view/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +15 -2
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +129 -119
- package/designer/section/index.umd.cjs +1 -1
- package/designer/time-picker/index.esm.js +140 -131
- package/designer/time-picker/index.umd.cjs +1 -1
- package/farris.all.esm.js +13578 -12394
- package/farris.all.umd.cjs +26 -26
- package/index.css +1 -1
- package/locales/data-grid/ui/en.json +2 -1
- package/locales/data-grid/ui/zh-CHS.json +2 -1
- package/locales/data-grid/ui/zh-CHT.json +2 -1
- package/locales/designer/en.json +12 -10
- package/locales/designer/zh-CHS.json +19 -17
- package/locales/designer/zh-CHT.json +19 -17
- package/locales/ui/en.json +4 -2
- package/locales/ui/zh-CHS.json +11 -9
- package/locales/ui/zh-CHT.json +11 -9
- package/package.json +1 -1
- package/package.zip +0 -0
- package/types/combo-list/src/composition/types.d.ts +1 -0
- package/types/condition/src/composition/condition-value/number-spinner-value.d.ts +1 -1
- package/types/condition/src/composition/use-field-config.d.ts +1 -1
- package/types/condition/src/condition.props.d.ts +1 -1
- package/types/data-view/designer/property-config/use-command-option.d.ts +12 -0
- package/types/image/src/property-config/image.property-config.d.ts +5 -5
- package/types/locale/src/lib/locale.service.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +7 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +0 -20
- package/types/section/src/designer/section.design.props.d.ts +17 -0
- package/types/section/src/section.props.d.ts +0 -25
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as G, watch as pe, computed as Y, createVNode as W, resolveComponent as st, isVNode as gt, nextTick as Ct, inject as xt, Fragment as Ot, createTextVNode as qe, withDirectives as
|
|
1
|
+
import { ref as G, watch as pe, computed as Y, createVNode as W, resolveComponent as st, isVNode as gt, nextTick as Ct, inject as xt, Fragment as Ot, createTextVNode as qe, withDirectives as Mt, vModelCheckbox as It, reactive as Dt } from "vue";
|
|
2
2
|
import { FCheckbox as vt } from "../checkbox/index.esm.js";
|
|
3
3
|
import { useCommonUtils as ut, useArrayProcessor as _t, useNumberFormat as pt, useGuid as Pt, resolveField as _e, useDateFormat as Ht, setFieldValue as ht } from "../common/index.esm.js";
|
|
4
4
|
import Wt from "../popover/index.esm.js";
|
|
5
|
-
import { LocaleService as
|
|
5
|
+
import { LocaleService as Ve } from "../locale/index.esm.js";
|
|
6
6
|
import { F_MODAL_SERVICE_TOKEN as Lt } from "../modal/index.esm.js";
|
|
7
7
|
import { cloneDeep as kt, isUndefined as mt, throttle as At } from "lodash-es";
|
|
8
8
|
import jt from "../transfer/index.esm.js";
|
|
@@ -53,7 +53,7 @@ const Cr = {
|
|
|
53
53
|
var D = /* @__PURE__ */ ((e) => (e[e.none = 0] = "none", e[e.filterable = 1] = "filterable", e[e.sortable = 2] = "sortable", e[e.filtered = 4] = "filtered", e[e.sorted = 8] = "sorted", e[e.ascending = 16] = "ascending", e[e.descending = 32] = "descending", e))(D || {}), cn = /* @__PURE__ */ ((e) => (e.NONE = "none", e.NUMBER = "number", e.DATE = "date", e.TEXT = "boolean", e.IMAGE = "boolean2", e.ENUM = "enum", e.CUSTOM = "custom", e))(cn || {}), ze = /* @__PURE__ */ ((e) => (e.DATE = "date", e.DATE_TIME = "datetime", e.NUMBER = "number", e.ENUM = "enum", e.IMAGE = "image", e.BOOLEAN = "boolean", e.BOOLEAN2 = "boolean2", e.TIMEAGO = "timeago", e.NONE = "none", e.CUSTOM = "custom", e.MULTI_LINGUAL = "multilingual", e))(ze || {});
|
|
54
54
|
function dn(e, n) {
|
|
55
55
|
var x, T, c, g, O, m, y, w, t;
|
|
56
|
-
const { isUndefined: l } = ut(), { pageIndex:
|
|
56
|
+
const { isUndefined: l } = ut(), { pageIndex: o, totalItems: _, pagination: h } = n, r = G((x = e.pagination) == null ? void 0 : x.enable), d = G(((T = e.pagination) == null ? void 0 : T.disabled) || !1), u = G((c = e.pagination) == null ? void 0 : c.size), b = G((g = e.pagination) == null ? void 0 : g.sizeLimits), v = G((O = e.pagination) == null ? void 0 : O.mode), f = G((m = e.pagination) == null ? void 0 : m.showIndex), a = G((y = e.pagination) == null ? void 0 : y.showLimits), k = G(((w = e.pagination) == null ? void 0 : w.showGoto) || !1), s = G(((t = e.pagination) == null ? void 0 : t.showPageInfo) || !0);
|
|
57
57
|
pe(() => {
|
|
58
58
|
var i;
|
|
59
59
|
return (i = e.pagination) == null ? void 0 : i.disabled;
|
|
@@ -68,12 +68,12 @@ function dn(e, n) {
|
|
|
68
68
|
var i;
|
|
69
69
|
return (i = e.pagination) == null ? void 0 : i.showIndex;
|
|
70
70
|
}, (i, S) => {
|
|
71
|
-
i !== S && (
|
|
71
|
+
i !== S && (f.value = i);
|
|
72
72
|
}), pe(() => {
|
|
73
73
|
var i;
|
|
74
74
|
return (i = e.pagination) == null ? void 0 : i.showLimits;
|
|
75
75
|
}, (i, S) => {
|
|
76
|
-
i !== S && (
|
|
76
|
+
i !== S && (a.value = i);
|
|
77
77
|
}), pe(() => {
|
|
78
78
|
var i;
|
|
79
79
|
return (i = e.pagination) == null ? void 0 : i.total;
|
|
@@ -88,7 +88,7 @@ function dn(e, n) {
|
|
|
88
88
|
var i;
|
|
89
89
|
return (i = e.pagination) == null ? void 0 : i.showGoto;
|
|
90
90
|
}, (i, S) => {
|
|
91
|
-
i !== S && (
|
|
91
|
+
i !== S && (k.value = i);
|
|
92
92
|
}), pe(() => {
|
|
93
93
|
var i;
|
|
94
94
|
return (i = e.pagination) == null ? void 0 : i.showPageInfo;
|
|
@@ -98,7 +98,7 @@ function dn(e, n) {
|
|
|
98
98
|
var i;
|
|
99
99
|
return (i = e.pagination) == null ? void 0 : i.index;
|
|
100
100
|
}, (i, S) => {
|
|
101
|
-
i !== S && (
|
|
101
|
+
i !== S && (o.value = i);
|
|
102
102
|
}), pe(() => {
|
|
103
103
|
var i;
|
|
104
104
|
return (i = e.pagination) == null ? void 0 : i.size;
|
|
@@ -108,8 +108,8 @@ function dn(e, n) {
|
|
|
108
108
|
const p = (i) => {
|
|
109
109
|
if (!i)
|
|
110
110
|
return;
|
|
111
|
-
const { enable: S, total: L, size: A, index: B, sizeLimits: q, showGoto: X, showIndex:
|
|
112
|
-
l(S) || (r.value = S), l(B) || (
|
|
111
|
+
const { enable: S, total: L, size: A, index: B, sizeLimits: q, showGoto: X, showIndex: V, showLimits: j, mode: Q, disabled: M } = i;
|
|
112
|
+
l(S) || (r.value = S), l(B) || (o.value = B), l(A) || (u.value = A), l(q) || (b.value = q), l(X) || (k.value = X), l(V) || (f.value = V), l(j) || (a.value = j), l(Q) || (v.value = Q), l(L) || (_.value = L), l(M) || (d.value = M);
|
|
113
113
|
};
|
|
114
114
|
return pe(() => e.pagination, (i, S) => {
|
|
115
115
|
i !== S && (h.value = i, p(i));
|
|
@@ -118,43 +118,43 @@ function dn(e, n) {
|
|
|
118
118
|
pageSize: u,
|
|
119
119
|
pageList: b,
|
|
120
120
|
shouldRenderPagination: r,
|
|
121
|
-
showGotoPage:
|
|
122
|
-
showPageIndex:
|
|
123
|
-
showPageList:
|
|
121
|
+
showGotoPage: k,
|
|
122
|
+
showPageIndex: f,
|
|
123
|
+
showPageList: a,
|
|
124
124
|
showPageInfo: s,
|
|
125
|
-
mode:
|
|
125
|
+
mode: v,
|
|
126
126
|
updatePagination: p
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
function St(e) {
|
|
130
130
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !gt(e);
|
|
131
131
|
}
|
|
132
|
-
function fn(e, n, l,
|
|
132
|
+
function fn(e, n, l, o, _, h, r, d, u, b, v) {
|
|
133
133
|
const {
|
|
134
|
-
updatePagination:
|
|
134
|
+
updatePagination: f
|
|
135
135
|
} = dn(e, l), {
|
|
136
|
-
showSidebarCheckBox:
|
|
136
|
+
showSidebarCheckBox: a
|
|
137
137
|
} = b, {
|
|
138
|
-
showSelectAll:
|
|
138
|
+
showSelectAll: k,
|
|
139
139
|
showSelection: s,
|
|
140
140
|
selectedValues: p,
|
|
141
141
|
updateSelectAllStatus: x,
|
|
142
142
|
keepSelectingOnPaging: T,
|
|
143
143
|
clearSelection: c
|
|
144
144
|
} = u, g = G([]), O = G([]), m = [{
|
|
145
|
-
name:
|
|
145
|
+
name: Ve.getLocaleValue("datagrid.settings.asc"),
|
|
146
146
|
value: "asc",
|
|
147
147
|
icon: "f-icon f-icon-col-ascendingorder"
|
|
148
148
|
}, {
|
|
149
|
-
name:
|
|
149
|
+
name: Ve.getLocaleValue("datagrid.settings.summaryNone"),
|
|
150
150
|
value: "none"
|
|
151
151
|
}, {
|
|
152
|
-
name:
|
|
152
|
+
name: Ve.getLocaleValue("datagrid.settings.desc"),
|
|
153
153
|
value: "desc",
|
|
154
154
|
icon: "f-icon f-icon-col-descendingorder"
|
|
155
155
|
}], y = Y(() => {
|
|
156
|
-
var C,
|
|
157
|
-
return ((C = e.filter) == null ? void 0 : C.mode) === "server" || ((
|
|
156
|
+
var C, N;
|
|
157
|
+
return ((C = e.filter) == null ? void 0 : C.mode) === "server" || ((N = e.sort) == null ? void 0 : N.mode) === "server";
|
|
158
158
|
}), {
|
|
159
159
|
addColumnFilter: w,
|
|
160
160
|
removeColumnFilter: t,
|
|
@@ -162,7 +162,7 @@ function fn(e, n, l, a, _, h, r, d, u, b, f) {
|
|
|
162
162
|
filterFromServer: S
|
|
163
163
|
} = _;
|
|
164
164
|
function L() {
|
|
165
|
-
T.value || c(), l.updateVisibleDataSummary(
|
|
165
|
+
T.value || c(), l.updateVisibleDataSummary(v.value);
|
|
166
166
|
}
|
|
167
167
|
function A(C) {
|
|
168
168
|
O.value = C;
|
|
@@ -171,42 +171,42 @@ function fn(e, n, l, a, _, h, r, d, u, b, f) {
|
|
|
171
171
|
g.value = C;
|
|
172
172
|
}
|
|
173
173
|
function q(C) {
|
|
174
|
-
const
|
|
175
|
-
let E = K ?
|
|
174
|
+
const N = C.status, K = (N & D.sorted) === D.sorted, Z = (N & D.ascending) === D.ascending, ae = (N & D.descending) === D.descending;
|
|
175
|
+
let E = K ? N ^ D.sorted : N;
|
|
176
176
|
return E = Z ? E ^ D.ascending : E, E = ae ? E ^ D.descending : E, E;
|
|
177
177
|
}
|
|
178
178
|
function X(C) {
|
|
179
179
|
C.sortType = "none", C.status = q(C);
|
|
180
|
-
const
|
|
181
|
-
|
|
180
|
+
const N = C.column;
|
|
181
|
+
N && (N.sort = "none", N.sortOrder = 0, n.applyColumnSorter(l, r));
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
183
|
+
function V(C, N) {
|
|
184
|
+
N.column && (N.column.filter = null), l.removeFilter(`field_filter_${N.field}`), X(N), N.filterHistory && N.filterHistory.forEach((K) => {
|
|
185
185
|
K.checked = !1;
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
function j(C) {
|
|
189
189
|
var ae;
|
|
190
|
-
const
|
|
190
|
+
const N = q(C), K = C.sortType === "none" ? N : C.sortType === "asc" ? N | D.sorted | D.ascending : N | D.sorted | D.descending;
|
|
191
191
|
C.status = K;
|
|
192
192
|
const Z = C.column;
|
|
193
193
|
Z && (Z.sort = C.sortType, Z.sortOrder = C.sortType !== "none" ? Z.sortOrder : 0, C.status = K, B(n.createSortConditions(r)), ((ae = e.sort) == null ? void 0 : ae.mode) !== "server" && (n.applyColumnSorter(l, r), d.reCalculateVisualDataRows(), L()));
|
|
194
194
|
}
|
|
195
195
|
function Q(C) {
|
|
196
196
|
var Z, ae;
|
|
197
|
-
const
|
|
198
|
-
C.status =
|
|
197
|
+
const N = (C.status & D.filtered) === D.filtered;
|
|
198
|
+
C.status = N ? C.status ^ D.filtered : C.status | D.filtered, ((Z = C.column) == null ? void 0 : Z.filter) != null && C.column.filter !== "" && C.filter ? w(C) : t(C), A(i()), ((ae = e.filter) == null ? void 0 : ae.mode) !== "server" && (l.refresh(), d.reCalculateVisualDataRows(), L());
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
var
|
|
202
|
-
C.showPopover = !1, C.filterHistory = void 0, h.updateFilterHistory(C, (
|
|
200
|
+
function M(C) {
|
|
201
|
+
var N;
|
|
202
|
+
C.showPopover = !1, C.filterHistory = void 0, h.updateFilterHistory(C, (N = C.column) == null ? void 0 : N.filter), Q(C), j(C), y.value && S({
|
|
203
203
|
filterConditions: O.value,
|
|
204
204
|
sortConditions: g.value
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
function U(C) {
|
|
208
208
|
var Z;
|
|
209
|
-
let
|
|
209
|
+
let N, K;
|
|
210
210
|
return W("div", {
|
|
211
211
|
class: "fv-column-sort-filter-container"
|
|
212
212
|
}, [((Z = C.column) == null ? void 0 : Z.sortable) && W("div", {
|
|
@@ -220,18 +220,18 @@ function fn(e, n, l, a, _, h, r, d, u, b, f) {
|
|
|
220
220
|
class: "fv-column-filter-section"
|
|
221
221
|
}, [W("div", {
|
|
222
222
|
class: "fv-column-filter-section-title"
|
|
223
|
-
}, [
|
|
223
|
+
}, [Ve.getLocaleValue("datagrid.filter.title")]), W("div", {
|
|
224
224
|
class: "fv-column-filter-section-editor"
|
|
225
|
-
}, [
|
|
225
|
+
}, [o.getFilterEditor(C)])]), W("div", {
|
|
226
226
|
class: "fv-column-sort-filter-footer"
|
|
227
227
|
}, [W("div", {
|
|
228
228
|
class: "fv-column-clear-section"
|
|
229
229
|
}, [W(st("f-button"), {
|
|
230
230
|
style: "margin: 4px 0;padding-left: 0;",
|
|
231
231
|
type: "link",
|
|
232
|
-
onClick: (ae) =>
|
|
233
|
-
}, St(
|
|
234
|
-
default: () => [
|
|
232
|
+
onClick: (ae) => V(ae, C)
|
|
233
|
+
}, St(N = Ve.getLocaleValue("datagrid.filter.clear")) ? N : {
|
|
234
|
+
default: () => [N]
|
|
235
235
|
})]), W("div", {
|
|
236
236
|
class: "fv-column-confirm-section"
|
|
237
237
|
}, [W(st("f-button"), {
|
|
@@ -239,136 +239,136 @@ function fn(e, n, l, a, _, h, r, d, u, b, f) {
|
|
|
239
239
|
"f-btn-ml": !0
|
|
240
240
|
},
|
|
241
241
|
size: "small",
|
|
242
|
-
onClick: (ae) =>
|
|
243
|
-
}, St(K =
|
|
242
|
+
onClick: (ae) => M(C)
|
|
243
|
+
}, St(K = Ve.getLocaleValue("datagrid.filter.ok")) ? K : {
|
|
244
244
|
default: () => [K]
|
|
245
245
|
})])])]);
|
|
246
246
|
}
|
|
247
247
|
return {
|
|
248
248
|
renderFilterContainer: U,
|
|
249
|
-
onConfirm:
|
|
249
|
+
onConfirm: M
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
function vn(e) {
|
|
253
253
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !gt(e);
|
|
254
254
|
}
|
|
255
|
-
function hn(e, n, l,
|
|
256
|
-
function p(
|
|
257
|
-
const U =
|
|
255
|
+
function hn(e, n, l, o, _, h, r, d, u, b, v, f, a, k, s) {
|
|
256
|
+
function p(M) {
|
|
257
|
+
const U = M.status;
|
|
258
258
|
return {
|
|
259
259
|
"fv-column-handler": !0,
|
|
260
|
-
"fv-column-handler-active": (U & D.filtered) === D.filtered || (U & D.sorted) === D.sorted ||
|
|
260
|
+
"fv-column-handler-active": (U & D.filtered) === D.filtered || (U & D.sorted) === D.sorted || M.showPopover
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
function x(
|
|
264
|
-
return (
|
|
263
|
+
function x(M) {
|
|
264
|
+
return (M.status & D.sortable) === D.sortable && (M.status & D.filterable) === D.none && (M.status & D.sorted) === D.none;
|
|
265
265
|
}
|
|
266
|
-
function T(
|
|
267
|
-
return (
|
|
266
|
+
function T(M) {
|
|
267
|
+
return (M.status & D.sortable) === D.sortable && (M.status & D.filterable) === D.none && (M.status & D.sorted) === D.sorted && (M.status & D.ascending) === D.ascending;
|
|
268
268
|
}
|
|
269
|
-
function c(
|
|
270
|
-
return (
|
|
269
|
+
function c(M) {
|
|
270
|
+
return (M.status & D.sortable) === D.sortable && (M.status & D.filterable) === D.none && (M.status & D.sorted) === D.sorted && (M.status & D.descending) === D.descending;
|
|
271
271
|
}
|
|
272
|
-
function g(
|
|
273
|
-
return (
|
|
272
|
+
function g(M) {
|
|
273
|
+
return (M.status & D.sortable) === D.none && (M.status & D.filterable) === D.filterable && (M.status & D.sorted) === D.none;
|
|
274
274
|
}
|
|
275
|
-
function O(
|
|
276
|
-
return (
|
|
275
|
+
function O(M) {
|
|
276
|
+
return (M.status & D.sortable) === D.sortable && (M.status & D.filterable) === D.filterable && (M.status & D.sorted) === D.none;
|
|
277
277
|
}
|
|
278
|
-
function m(
|
|
279
|
-
return (
|
|
278
|
+
function m(M) {
|
|
279
|
+
return (M.status & D.sortable) === D.sortable && (M.status & D.filterable) === D.filterable && (M.status & D.sorted) === D.sorted && (M.status & D.ascending) === D.ascending;
|
|
280
280
|
}
|
|
281
|
-
function y(
|
|
282
|
-
return (
|
|
281
|
+
function y(M) {
|
|
282
|
+
return (M.status & D.sortable) === D.sortable && (M.status & D.filterable) === D.filterable && (M.status & D.sorted) === D.sorted && (M.status & D.descending) === D.descending;
|
|
283
283
|
}
|
|
284
|
-
const w = function(
|
|
284
|
+
const w = function(M) {
|
|
285
285
|
return {
|
|
286
286
|
"f-icon": !0,
|
|
287
|
-
"f-icon-col-defaultsort": x(
|
|
288
|
-
"f-icon-col-ascending": T(
|
|
289
|
-
"f-icon-col-descending": c(
|
|
290
|
-
"f-icon-col-filter": g(
|
|
291
|
-
"f-icon-col-defaultfilterandsort": O(
|
|
292
|
-
"f-icon-col-filterandascending": m(
|
|
293
|
-
"f-icon-col-filteranddescending": y(
|
|
287
|
+
"f-icon-col-defaultsort": x(M),
|
|
288
|
+
"f-icon-col-ascending": T(M),
|
|
289
|
+
"f-icon-col-descending": c(M),
|
|
290
|
+
"f-icon-col-filter": g(M),
|
|
291
|
+
"f-icon-col-defaultfilterandsort": O(M),
|
|
292
|
+
"f-icon-col-filterandascending": m(M),
|
|
293
|
+
"f-icon-col-filteranddescending": y(M)
|
|
294
294
|
};
|
|
295
295
|
}, t = /* @__PURE__ */ new Map([[D.sortable, D.sortable | D.sorted | D.ascending], [D.sortable | D.sorted | D.ascending, D.sortable | D.sorted | D.descending], [D.sortable | D.sorted | D.descending, D.sortable]]), {
|
|
296
296
|
renderFilterContainer: i,
|
|
297
297
|
onConfirm: S
|
|
298
|
-
} = fn(e, h, r, d, u, b,
|
|
299
|
-
function A(
|
|
300
|
-
U.filter((C) => C !==
|
|
298
|
+
} = fn(e, h, r, d, u, b, v, f, a, k, s), L = G();
|
|
299
|
+
function A(M, U) {
|
|
300
|
+
U.filter((C) => C !== M && C.showPopover).forEach((C) => {
|
|
301
301
|
C.showPopover = !1;
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
|
-
function B(
|
|
304
|
+
function B(M) {
|
|
305
305
|
let U;
|
|
306
306
|
return W(Wt, {
|
|
307
307
|
ref: L,
|
|
308
308
|
class: "fv-column-handler-popover",
|
|
309
309
|
"z-index": 1050,
|
|
310
310
|
"right-boundary": _.value,
|
|
311
|
-
offsetX: -
|
|
311
|
+
offsetX: -f.offsetX,
|
|
312
312
|
placement: "auto",
|
|
313
313
|
visible: !0,
|
|
314
314
|
onHidden: () => {
|
|
315
|
-
|
|
315
|
+
M.showPopover = !1, S(M);
|
|
316
316
|
}
|
|
317
|
-
}, vn(U = i(
|
|
317
|
+
}, vn(U = i(M)) ? U : {
|
|
318
318
|
default: () => [U]
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
async function q(
|
|
321
|
+
async function q(M, U) {
|
|
322
322
|
U.showPopover = !U.showPopover, await Ct();
|
|
323
323
|
const C = L.value;
|
|
324
|
-
C && C.show(
|
|
324
|
+
C && C.show(M.target);
|
|
325
325
|
}
|
|
326
|
-
function X(
|
|
327
|
-
|
|
326
|
+
function X(M, U) {
|
|
327
|
+
M.filter((C) => C.field !== U.field);
|
|
328
328
|
}
|
|
329
|
-
function M
|
|
329
|
+
function V(M) {
|
|
330
330
|
var K;
|
|
331
|
-
const U =
|
|
331
|
+
const U = M.status;
|
|
332
332
|
if ((U & D.sortable) === D.sortable && (U & D.filterable) === D.none && t.has(U)) {
|
|
333
|
-
const Z = t.get(U), ae = (Z & D.sorted) === D.sorted, E = (Z & D.ascending) === D.ascending, F = (Z & D.descending) === D.descending, R =
|
|
334
|
-
R && (R.sort = E ? "asc" : F ? "desc" : "none", R.sortOrder = ae ? R.sortOrder : 0,
|
|
333
|
+
const Z = t.get(U), ae = (Z & D.sorted) === D.sorted, E = (Z & D.ascending) === D.ascending, F = (Z & D.descending) === D.descending, R = M.column;
|
|
334
|
+
R && (R.sort = E ? "asc" : F ? "desc" : "none", R.sortOrder = ae ? R.sortOrder : 0, M.sortType = R.sort, M.status = Z, ((K = e.sort) == null ? void 0 : K.mode) === "server" ? n.emit("sortChanged", {
|
|
335
335
|
filterConditions: u.createFilterConditions(),
|
|
336
|
-
sortConditions: h.createSortConditions(
|
|
337
|
-
}) : (h.applyColumnSorter(r,
|
|
336
|
+
sortConditions: h.createSortConditions(v)
|
|
337
|
+
}) : (h.applyColumnSorter(r, v), f.reCalculateVisualDataRows()));
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function j(
|
|
341
|
-
X(C, U),
|
|
340
|
+
function j(M, U, C) {
|
|
341
|
+
X(C, U), V(U), A(U, C), (U.status & D.filterable) === D.filterable && q(M, U);
|
|
342
342
|
}
|
|
343
|
-
function Q(
|
|
343
|
+
function Q(M, U, C) {
|
|
344
344
|
return [W("span", {
|
|
345
|
-
class: p(
|
|
346
|
-
onClick: (K) => j(K,
|
|
345
|
+
class: p(M),
|
|
346
|
+
onClick: (K) => j(K, M, C)
|
|
347
347
|
}, [W("i", {
|
|
348
|
-
class: w(
|
|
349
|
-
}, null),
|
|
348
|
+
class: w(M)
|
|
349
|
+
}, null), M && M.column && M.sortType !== "none" && (M.column.sortOrder || ""), M.showPopover && B(M)])];
|
|
350
350
|
}
|
|
351
351
|
return {
|
|
352
352
|
renderHeaderCellHandler: Q
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
355
|
const Nt = "__setting__", Or = "设置", mn = 30, gn = "right", Xe = "setting", Tt = "__command__", kr = "操作", _n = 150, pn = "right", lt = "commands";
|
|
356
|
-
function yn(e, n, l,
|
|
356
|
+
function yn(e, n, l, o, _, h, r) {
|
|
357
357
|
const d = "id", u = G();
|
|
358
358
|
let b;
|
|
359
359
|
const {
|
|
360
|
-
applySortableColumns:
|
|
361
|
-
collectionFilterableColumns:
|
|
362
|
-
collectionSortableColumns:
|
|
363
|
-
columnContext:
|
|
360
|
+
applySortableColumns: v,
|
|
361
|
+
collectionFilterableColumns: f,
|
|
362
|
+
collectionSortableColumns: a,
|
|
363
|
+
columnContext: k,
|
|
364
364
|
updateColumnSettingIcon: s
|
|
365
365
|
} = e, {
|
|
366
366
|
conditions: p
|
|
367
367
|
} = l, {
|
|
368
368
|
calculateColumnsSize: x
|
|
369
|
-
} =
|
|
369
|
+
} = o, {
|
|
370
370
|
fitHorizontalScroll: T
|
|
371
|
-
} = h, c = G([]), g = Y(() => !!c.value.length), O = Y(() =>
|
|
371
|
+
} = h, c = G([]), g = Y(() => !!c.value.length), O = Y(() => k.value.primaryColumns.filter((C) => C.dataType !== lt && C.dataType !== Xe));
|
|
372
372
|
let m = [];
|
|
373
373
|
const y = Y(() => O.value.map((C) => ({
|
|
374
374
|
id: C.field,
|
|
@@ -377,11 +377,11 @@ function yn(e, n, l, a, _, h, r) {
|
|
|
377
377
|
id: C.field,
|
|
378
378
|
name: C.title
|
|
379
379
|
})));
|
|
380
|
-
Y(() =>
|
|
380
|
+
Y(() => a().map((C) => ({
|
|
381
381
|
id: C.field,
|
|
382
382
|
name: C.title,
|
|
383
383
|
order: C.sort
|
|
384
|
-
}))), Y(() =>
|
|
384
|
+
}))), Y(() => f().map((C) => ({
|
|
385
385
|
id: C.field,
|
|
386
386
|
code: C.field,
|
|
387
387
|
controlType: "",
|
|
@@ -394,19 +394,19 @@ function yn(e, n, l, a, _, h, r) {
|
|
|
394
394
|
})));
|
|
395
395
|
function t() {
|
|
396
396
|
const C = /* @__PURE__ */ new Map();
|
|
397
|
-
return O.value.reduce((
|
|
397
|
+
return O.value.reduce((N, K) => (K.visible = !1, N.set(K.field, K), N), C), C;
|
|
398
398
|
}
|
|
399
|
-
function i(C,
|
|
399
|
+
function i(C, N) {
|
|
400
400
|
return C.map(({
|
|
401
401
|
id: Z
|
|
402
402
|
}) => {
|
|
403
|
-
const ae =
|
|
404
|
-
return ae.visible = !0,
|
|
403
|
+
const ae = N.get(Z);
|
|
404
|
+
return ae.visible = !0, N.delete(Z), ae;
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
function S(C) {
|
|
408
|
-
const
|
|
409
|
-
|
|
408
|
+
const N = k.value.primaryColumns.filter((E) => E.dataType === lt), K = k.value.primaryColumns.filter((E) => E.dataType === Xe), Z = t(), ae = i(C, Z);
|
|
409
|
+
N.length || K.length ? k.value.primaryColumns = [...ae, ...Array.from(Z.values()), ...N, ...K] : k.value.primaryColumns = [...ae, ...Array.from(Z.values())], s(), x(), Ct(() => {
|
|
410
410
|
T();
|
|
411
411
|
});
|
|
412
412
|
}
|
|
@@ -424,11 +424,11 @@ function yn(e, n, l, a, _, h, r) {
|
|
|
424
424
|
class: "modal-title"
|
|
425
425
|
}, [W("span", {
|
|
426
426
|
class: "modal-title-label"
|
|
427
|
-
}, [
|
|
427
|
+
}, [Ve.getLocaleValue("datagrid.settings.title")])]),
|
|
428
428
|
default: () => [
|
|
429
429
|
W(zt, {
|
|
430
430
|
id: "display-columns",
|
|
431
|
-
title:
|
|
431
|
+
title: Ve.getLocaleValue("datagrid.settings.visible"),
|
|
432
432
|
class: "container"
|
|
433
433
|
}, {
|
|
434
434
|
default: () => [W(jt, {
|
|
@@ -458,7 +458,7 @@ function yn(e, n, l, a, _, h, r) {
|
|
|
458
458
|
],
|
|
459
459
|
headerSuffix: () => W("div", {
|
|
460
460
|
class: "f-btn-icon f-bare",
|
|
461
|
-
onClick: (
|
|
461
|
+
onClick: (N) => L()
|
|
462
462
|
}, [W("span", {
|
|
463
463
|
class: "f-icon modal_close"
|
|
464
464
|
}, null)])
|
|
@@ -466,7 +466,7 @@ function yn(e, n, l, a, _, h, r) {
|
|
|
466
466
|
}
|
|
467
467
|
function B() {
|
|
468
468
|
const C = /* @__PURE__ */ new Map();
|
|
469
|
-
return
|
|
469
|
+
return a().reduce((N, K) => (K.sort = "none", K.sortOrder = 0, N.set(K.field, K), N), C), C;
|
|
470
470
|
}
|
|
471
471
|
function q(C) {
|
|
472
472
|
return c.value.filter((K) => K.id && K.order).map((K, Z) => {
|
|
@@ -476,20 +476,20 @@ function yn(e, n, l, a, _, h, r) {
|
|
|
476
476
|
}
|
|
477
477
|
function X() {
|
|
478
478
|
if (g.value) {
|
|
479
|
-
const C = B(),
|
|
480
|
-
|
|
479
|
+
const C = B(), N = q(C);
|
|
480
|
+
v(N, n, _), h.reCalculateVisualDataRows(), x();
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function V() {
|
|
484
484
|
u.value && (p.value = u.value.getConditions(), n.refresh(), h.reCalculateVisualDataRows());
|
|
485
485
|
}
|
|
486
486
|
function j() {
|
|
487
|
-
X(),
|
|
487
|
+
X(), V();
|
|
488
488
|
}
|
|
489
489
|
function Q() {
|
|
490
490
|
m = kt(w.value);
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function M() {
|
|
493
493
|
S(m);
|
|
494
494
|
}
|
|
495
495
|
function U() {
|
|
@@ -502,25 +502,25 @@ function yn(e, n, l, a, _, h, r) {
|
|
|
502
502
|
draggable: !0,
|
|
503
503
|
render: A,
|
|
504
504
|
acceptCallback: j,
|
|
505
|
-
rejectCallback:
|
|
505
|
+
rejectCallback: M
|
|
506
506
|
}), Q();
|
|
507
507
|
}
|
|
508
508
|
return {
|
|
509
509
|
acceptCallback: j,
|
|
510
|
-
rejectCallback:
|
|
510
|
+
rejectCallback: M,
|
|
511
511
|
renderSettingsPanel: A,
|
|
512
512
|
openSettingPanel: U
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
|
-
function bn(e, n, l,
|
|
515
|
+
function bn(e, n, l, o, _, h) {
|
|
516
516
|
const r = xt(Lt), d = Y(() => ({
|
|
517
517
|
margin: "0px"
|
|
518
518
|
}));
|
|
519
|
-
function u(
|
|
519
|
+
function u(v) {
|
|
520
520
|
const {
|
|
521
|
-
openSettingPanel:
|
|
522
|
-
} = yn(e, n, l,
|
|
523
|
-
|
|
521
|
+
openSettingPanel: f
|
|
522
|
+
} = yn(e, n, l, o, _, h, r);
|
|
523
|
+
f();
|
|
524
524
|
}
|
|
525
525
|
function b() {
|
|
526
526
|
return W("span", {
|
|
@@ -535,41 +535,41 @@ function bn(e, n, l, a, _, h) {
|
|
|
535
535
|
renderGridSettingsIcon: b
|
|
536
536
|
};
|
|
537
537
|
}
|
|
538
|
-
function wn(e, n, l,
|
|
538
|
+
function wn(e, n, l, o) {
|
|
539
539
|
const h = G(-1), r = G(0), d = G(!1);
|
|
540
540
|
let u = "";
|
|
541
541
|
const b = Y(() => ({
|
|
542
542
|
display: d.value ? "block" : "none",
|
|
543
543
|
left: `${r.value}px`
|
|
544
|
-
})),
|
|
544
|
+
})), v = Y(() => ({
|
|
545
545
|
display: d.value ? "block" : "none"
|
|
546
546
|
}));
|
|
547
|
-
function
|
|
547
|
+
function f(s) {
|
|
548
548
|
const p = s.target.parentElement;
|
|
549
549
|
if (p) {
|
|
550
550
|
const { left: x } = p.getBoundingClientRect();
|
|
551
551
|
r.value = s.clientX - x;
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function a(s) {
|
|
555
555
|
const p = n.value.primaryColumns.filter((T) => T.visible).find((T) => T.field === u) || n.value.leftColumns.filter((T) => T.visible).find((T) => T.field === u) || n.value.rightColumns.filter((T) => T.visible).find((T) => T.field === u), x = s.target.parentElement;
|
|
556
556
|
if (p && x) {
|
|
557
557
|
const { left: T } = x.getBoundingClientRect(), c = s.clientX - T, g = (p.actualWidth || 0) + (c - h.value);
|
|
558
558
|
p.actualWidth = Math.max(40, g), l.calculateColumnsSize();
|
|
559
559
|
}
|
|
560
|
-
r.value = 0, d.value = !1, document.removeEventListener("mousemove",
|
|
560
|
+
r.value = 0, d.value = !1, document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", a), document.body.style.userSelect = "", u = "";
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function k(s, p) {
|
|
563
563
|
u = p, d.value = !0;
|
|
564
564
|
const T = s.composedPath().find((c) => c.className.split(" ")[0] === "fv-grid");
|
|
565
565
|
if (T) {
|
|
566
566
|
const { left: c } = T.getBoundingClientRect();
|
|
567
|
-
r.value = s.clientX - c, h.value = s.clientX - c, document.addEventListener("mousemove",
|
|
567
|
+
r.value = s.clientX - c, h.value = s.clientX - c, document.addEventListener("mousemove", f), document.addEventListener("mouseup", a), document.body.style.userSelect = "none";
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
return { onClickColumnResizeBar:
|
|
570
|
+
return { onClickColumnResizeBar: k, resizeHandleStyle: b, resizeOverlayStyle: v };
|
|
571
571
|
}
|
|
572
|
-
function Nr(e, n, l,
|
|
572
|
+
function Nr(e, n, l, o, _, h, r, d, u, b, v, f, a, k, s, p, x, T, c) {
|
|
573
573
|
const {
|
|
574
574
|
getDifference: g
|
|
575
575
|
} = _t(), {
|
|
@@ -583,20 +583,20 @@ function Nr(e, n, l, a, _, h, r, d, u, b, f, v, o, N, s, p, x, T, c) {
|
|
|
583
583
|
selectedValues: S,
|
|
584
584
|
selectAllStatus: L,
|
|
585
585
|
indeterminateStatus: A
|
|
586
|
-
} =
|
|
586
|
+
} = k, {
|
|
587
587
|
showRowNumer: B,
|
|
588
588
|
showSidebarCheckBox: q,
|
|
589
589
|
sidebarTitle: X,
|
|
590
|
-
sidebarCornerCellStyle:
|
|
590
|
+
sidebarCornerCellStyle: V
|
|
591
591
|
} = s, {
|
|
592
592
|
columnContext: j,
|
|
593
593
|
hasLeftFixedColumn: Q,
|
|
594
|
-
hasRightFixedColumn:
|
|
594
|
+
hasRightFixedColumn: M
|
|
595
595
|
} = h, {
|
|
596
596
|
onClickColumnResizeBar: U,
|
|
597
597
|
resizeHandleStyle: C,
|
|
598
|
-
resizeOverlayStyle:
|
|
599
|
-
} = wn(e, j,
|
|
598
|
+
resizeOverlayStyle: N
|
|
599
|
+
} = wn(e, j, f), {
|
|
600
600
|
gridHeaderColumnsStyle: K,
|
|
601
601
|
leftFixedGridHeaderColumnsStyle: Z,
|
|
602
602
|
rightFixedGridHeaderColumnsStyle: ae
|
|
@@ -619,7 +619,7 @@ function Nr(e, n, l, a, _, h, r, d, u, b, f, v, o, N, s, p, x, T, c) {
|
|
|
619
619
|
const he = Y(() => ({
|
|
620
620
|
"fv-grid-header": !0,
|
|
621
621
|
"fv-grid-header-group-columns": j.value.headerDepth > 1
|
|
622
|
-
})),
|
|
622
|
+
})), Me = Y(() => {
|
|
623
623
|
const se = {
|
|
624
624
|
height: `${j.value.headerDepth * ue}px`
|
|
625
625
|
};
|
|
@@ -633,9 +633,9 @@ function Nr(e, n, l, a, _, h, r, d, u, b, f, v, o, N, s, p, x, T, c) {
|
|
|
633
633
|
return (se.status & D.sortable) === D.sortable || (se.status & D.filterable) === D.filterable;
|
|
634
634
|
}, {
|
|
635
635
|
renderHeaderCellHandler: ne
|
|
636
|
-
} = hn(e, n, l,
|
|
636
|
+
} = hn(e, n, l, o, _, h, r, u, b, v, p, x, k, s, c), {
|
|
637
637
|
renderGridSettingsIcon: re
|
|
638
|
-
} = bn(h, r, b,
|
|
638
|
+
} = bn(h, r, b, f, p, x);
|
|
639
639
|
function Se(se) {
|
|
640
640
|
var Ne;
|
|
641
641
|
const ge = {
|
|
@@ -714,7 +714,7 @@ function Nr(e, n, l, a, _, h, r, d, u, b, f, v, o, N, s, p, x, T, c) {
|
|
|
714
714
|
function Ue() {
|
|
715
715
|
return W("div", {
|
|
716
716
|
class: "fv-grid-header-corner d-flex",
|
|
717
|
-
style:
|
|
717
|
+
style: V.value
|
|
718
718
|
}, [q.value && m.value && !e.hierarchy && W("div", {
|
|
719
719
|
class: "d-inline-flex align-items-center"
|
|
720
720
|
}, [W(vt, {
|
|
@@ -745,18 +745,18 @@ function Nr(e, n, l, a, _, h, r, d, u, b, f, v, o, N, s, p, x, T, c) {
|
|
|
745
745
|
function Je() {
|
|
746
746
|
return W("div", {
|
|
747
747
|
class: he.value,
|
|
748
|
-
style:
|
|
748
|
+
style: Me.value
|
|
749
749
|
}, [z.value && Ue(), Q.value && be(), W("div", {
|
|
750
750
|
class: "fv-grid-header-primary"
|
|
751
751
|
}, [W("div", {
|
|
752
752
|
class: "fv-grid-header-columns",
|
|
753
753
|
style: K.value
|
|
754
|
-
}, [ke(j.value.primaryHeaderColumns)])]),
|
|
754
|
+
}, [ke(j.value.primaryHeaderColumns)])]), M.value && Ge()]);
|
|
755
755
|
}
|
|
756
756
|
function Ze() {
|
|
757
757
|
return W(Ot, null, [W("div", {
|
|
758
758
|
class: "fv-datagrid-resize-overlay",
|
|
759
|
-
style:
|
|
759
|
+
style: N.value
|
|
760
760
|
}, null), W("div", {
|
|
761
761
|
class: "fv-datagrid-resize-proxy",
|
|
762
762
|
style: C.value
|
|
@@ -778,15 +778,15 @@ function Tr() {
|
|
|
778
778
|
renderDisableMask: e
|
|
779
779
|
};
|
|
780
780
|
}
|
|
781
|
-
function Fr(e, n, l,
|
|
781
|
+
function Fr(e, n, l, o, _) {
|
|
782
782
|
const {
|
|
783
783
|
columnContext: h
|
|
784
784
|
} = n, {
|
|
785
785
|
conditions: r,
|
|
786
786
|
clearCondition: d,
|
|
787
787
|
removeCondition: u
|
|
788
|
-
} =
|
|
789
|
-
function
|
|
788
|
+
} = o, b = G([]);
|
|
789
|
+
function v() {
|
|
790
790
|
const p = [];
|
|
791
791
|
Array.from(r.value).forEach((x, T) => {
|
|
792
792
|
var g;
|
|
@@ -802,21 +802,21 @@ function Fr(e, n, l, a, _) {
|
|
|
802
802
|
p.push(c);
|
|
803
803
|
}), b.value = p;
|
|
804
804
|
}
|
|
805
|
-
pe(r, () =>
|
|
806
|
-
function
|
|
805
|
+
pe(r, () => v());
|
|
806
|
+
function f(p) {
|
|
807
807
|
if (p && p.column) {
|
|
808
808
|
p.column.filter = null;
|
|
809
809
|
let x = p.status;
|
|
810
810
|
x = (x & D.filtered) === D.filtered ? x ^ D.filtered : x, p.status = x;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function a(p) {
|
|
814
814
|
u(`field_filter_${p}`);
|
|
815
815
|
const x = h.value.primaryHeaderColumns.find((T) => T.field === p);
|
|
816
|
-
|
|
816
|
+
f(x), l.refresh(), _.reCalculateVisualDataRows();
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
d(), h.value.primaryHeaderColumns.forEach((p) =>
|
|
818
|
+
function k() {
|
|
819
|
+
d(), h.value.primaryHeaderColumns.forEach((p) => f(p)), l.refresh(), _.reCalculateVisualDataRows();
|
|
820
820
|
}
|
|
821
821
|
function s() {
|
|
822
822
|
return W("div", {
|
|
@@ -826,15 +826,15 @@ function Fr(e, n, l, a, _) {
|
|
|
826
826
|
fields: b.value,
|
|
827
827
|
mode: "display-only",
|
|
828
828
|
"show-reset": !0,
|
|
829
|
-
onRemove:
|
|
830
|
-
onReset:
|
|
829
|
+
onRemove: a,
|
|
830
|
+
onReset: k
|
|
831
831
|
}, null)]);
|
|
832
832
|
}
|
|
833
833
|
return {
|
|
834
834
|
renderFilterPanel: s
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
function Er(e, n, l,
|
|
837
|
+
function Er(e, n, l, o, _) {
|
|
838
838
|
const {
|
|
839
839
|
dropOnGroupPanel: h,
|
|
840
840
|
groupColumnItems: r
|
|
@@ -842,35 +842,35 @@ function Er(e, n, l, a, _) {
|
|
|
842
842
|
groupFields: d,
|
|
843
843
|
shouldGroupingData: u,
|
|
844
844
|
showGroupPanel: b
|
|
845
|
-
} =
|
|
846
|
-
function
|
|
845
|
+
} = o, v = G();
|
|
846
|
+
function f(s) {
|
|
847
847
|
d.value = s.map((p) => p.value), n.updateDataView(), _.reCalculateVisualDataRows();
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function a(s) {
|
|
850
850
|
s.preventDefault();
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function k() {
|
|
853
853
|
return u.value && b.value && W("div", {
|
|
854
854
|
class: "fv-grid-group-panel",
|
|
855
855
|
onDrop: h,
|
|
856
|
-
onDragover:
|
|
856
|
+
onDragover: a
|
|
857
857
|
}, [r.value && W(st("f-tags"), {
|
|
858
|
-
ref:
|
|
858
|
+
ref: v,
|
|
859
859
|
style: "margin:0.375rem",
|
|
860
860
|
"tag-type": "default",
|
|
861
861
|
data: r.value,
|
|
862
862
|
"tag-style": "capsule",
|
|
863
863
|
"show-close": !0,
|
|
864
|
-
onChange:
|
|
864
|
+
onChange: f
|
|
865
865
|
}, null)]);
|
|
866
866
|
}
|
|
867
867
|
return {
|
|
868
|
-
renderGroupPanel:
|
|
868
|
+
renderGroupPanel: k
|
|
869
869
|
};
|
|
870
870
|
}
|
|
871
871
|
function Sn(e, n) {
|
|
872
|
-
var
|
|
873
|
-
const l = String(Date.now()),
|
|
872
|
+
var k;
|
|
873
|
+
const l = String(Date.now()), o = ((k = e.rowOption) == null ? void 0 : k.height) || 28, _ = G(n.value.primaryColumnsWidth);
|
|
874
874
|
function h(s) {
|
|
875
875
|
const p = {};
|
|
876
876
|
return s.reduce(
|
|
@@ -884,7 +884,7 @@ function Sn(e, n) {
|
|
|
884
884
|
), p;
|
|
885
885
|
}
|
|
886
886
|
function r(s, p, x) {
|
|
887
|
-
const T =
|
|
887
|
+
const T = o * (x + 1), g = p[s.field].left - T + (p[s.field].width || 0), O = s.parent.height ? `${s.parent.height}px` : "";
|
|
888
888
|
return {
|
|
889
889
|
left: `${T}px`,
|
|
890
890
|
width: `${g}px`,
|
|
@@ -922,13 +922,13 @@ function Sn(e, n) {
|
|
|
922
922
|
// padding: `calc(${rowHeight * cell.rowSpan / 2}px - 1rem) 0`
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function v(s, p) {
|
|
926
926
|
return `${l}_${s.type}_r_${s.index}_c_${p}_${s.refreshKey || ""}`;
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function f(s) {
|
|
929
929
|
return `${l}_${s.type}_r_${s.index}_${s.refreshKey || ""}`;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function a(s) {
|
|
932
932
|
var T;
|
|
933
933
|
const p = s.height ? `${s.height}px` : "", x = {
|
|
934
934
|
top: `${s.top}px`,
|
|
@@ -945,69 +945,69 @@ function Sn(e, n) {
|
|
|
945
945
|
_.value = n.value.primaryColumnsWidth;
|
|
946
946
|
}), {
|
|
947
947
|
calculateCellPositionInRow: h,
|
|
948
|
-
cellKey:
|
|
948
|
+
cellKey: v,
|
|
949
949
|
cellPosition: u,
|
|
950
950
|
groupCellPosition: r,
|
|
951
|
-
rowKey:
|
|
952
|
-
rowPosition:
|
|
951
|
+
rowKey: f,
|
|
952
|
+
rowPosition: a,
|
|
953
953
|
rowSpanCellPosition: b,
|
|
954
954
|
summaryCellPosition: d
|
|
955
955
|
};
|
|
956
956
|
}
|
|
957
957
|
function Cn(e, n, l) {
|
|
958
|
-
const { hasChildrenField:
|
|
958
|
+
const { hasChildrenField: o } = l, _ = G("#9399a0"), h = G(28);
|
|
959
959
|
function r() {
|
|
960
960
|
return [].concat(
|
|
961
|
-
...n.value.filter((
|
|
962
|
-
).sort((
|
|
961
|
+
...n.value.filter((a) => a.raw.__fv_descendant_index__.length !== 0).map((a) => [...a.raw.__fv_descendant_index__.slice(-1)]).flat()
|
|
962
|
+
).sort((a, k) => Number(a) - Number(k));
|
|
963
963
|
}
|
|
964
|
-
function d(
|
|
965
|
-
const
|
|
964
|
+
function d(v) {
|
|
965
|
+
const f = new Array(n.value.length).fill(0);
|
|
966
966
|
if (e.showLines) {
|
|
967
|
-
const
|
|
968
|
-
n.value.forEach((
|
|
969
|
-
const p =
|
|
970
|
-
|
|
971
|
-
}),
|
|
967
|
+
const a = r();
|
|
968
|
+
n.value.forEach((k, s) => {
|
|
969
|
+
const p = a.includes(s), x = k.raw[o.value];
|
|
970
|
+
f[s] = `repeating-linear-gradient(90deg, ${_.value} 0 1px, transparent 0px 2px) ${x ? "-10px" : "0px"} ${h.value / 2}px/20px 1px no-repeat,repeating-linear-gradient(${_.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${p ? "50%" : "100%"} no-repeat`;
|
|
971
|
+
}), f[0] = "";
|
|
972
972
|
}
|
|
973
|
-
return v
|
|
973
|
+
return f[v];
|
|
974
974
|
}
|
|
975
|
-
function u(
|
|
976
|
-
return
|
|
977
|
-
|
|
978
|
-
}),
|
|
975
|
+
function u(v, f, a) {
|
|
976
|
+
return a[v].parents.set(v, !0).forEach((s) => {
|
|
977
|
+
a[s].childsLength = a[s].childWithLines.filter((p) => f[p].visible).length;
|
|
978
|
+
}), f;
|
|
979
979
|
}
|
|
980
|
-
function b(
|
|
981
|
-
const
|
|
980
|
+
function b(v) {
|
|
981
|
+
const f = v.raw.__fv_parent_index__ === void 0 || v.raw.__fv_parent_index__ === -1, k = f ? 0 : 8, s = 0, p = v.raw[o.value], x = `${v.layer * 10 + v.layer * k + s}px`, T = v.visible || mt(v.visible) ? {
|
|
982
982
|
paddingLeft: `calc(${x})`,
|
|
983
983
|
// paddingLeft,
|
|
984
|
-
background: d(
|
|
984
|
+
background: d(v.index),
|
|
985
985
|
display: "flex",
|
|
986
986
|
width: "100%",
|
|
987
987
|
position: "relative"
|
|
988
988
|
} : {
|
|
989
989
|
display: "none"
|
|
990
990
|
};
|
|
991
|
-
return !p &&
|
|
991
|
+
return !p && f && (T.paddingLeft = "calc(1.18rem)"), !p && !f && (T.paddingLeft = `calc(${x} + 1.25rem)`), T;
|
|
992
992
|
}
|
|
993
993
|
return { hierarchyCellContentStyle: b, handleCollapsedPaddingBottom: u };
|
|
994
994
|
}
|
|
995
995
|
function xn(e, n, l) {
|
|
996
|
-
const
|
|
996
|
+
const o = G(e.iconField);
|
|
997
997
|
function _(h, r) {
|
|
998
|
-
if (
|
|
998
|
+
if (o.value)
|
|
999
999
|
return h.raw[e.iconField];
|
|
1000
1000
|
let d = "";
|
|
1001
1001
|
return h.raw[l.value] !== !0 ? d = n.value.leafnodes : d = h.collapse ? n.value.fold : n.value.unfold, d;
|
|
1002
1002
|
}
|
|
1003
1003
|
return { treeNodeIconsClass: _ };
|
|
1004
1004
|
}
|
|
1005
|
-
function On(e, n, l,
|
|
1006
|
-
const { dataView: u, hasRealChildren: b, reOrderVisibleIndex:
|
|
1005
|
+
function On(e, n, l, o, _, h, r, d) {
|
|
1006
|
+
const { dataView: u, hasRealChildren: b, reOrderVisibleIndex: v } = o, { collapseField: f, hasChildrenField: a } = _, { reCalculateVisualDataRows: k, updateVirticalScroll: s } = h;
|
|
1007
1007
|
function p(x) {
|
|
1008
|
-
if (x.raw[
|
|
1008
|
+
if (x.raw[a.value]) {
|
|
1009
1009
|
const c = u.value[x.raw.__fv_index__];
|
|
1010
|
-
c[
|
|
1010
|
+
c[f.value] = !c[f.value], o.toggleChildrenVisibiltyByCollapseStatus(c), c[a.value] = b(c), v(), k(), s(), c[f.value] || n.emit("expandNode", { row: x });
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
1013
|
return { toggleTreeNode: p };
|
|
@@ -1030,7 +1030,7 @@ function kn(e) {
|
|
|
1030
1030
|
"align-items-end": h === "bottom"
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function o(_) {
|
|
1034
1034
|
const { align: h, showEllipsis: r } = _;
|
|
1035
1035
|
return {
|
|
1036
1036
|
"w-100": !0,
|
|
@@ -1040,11 +1040,11 @@ function kn(e) {
|
|
|
1040
1040
|
"text-truncate": r
|
|
1041
1041
|
};
|
|
1042
1042
|
}
|
|
1043
|
-
return { cellContentPosition: n, cellContentClass: l, cellContentClassWithEllipsis:
|
|
1043
|
+
return { cellContentPosition: n, cellContentClass: l, cellContentClassWithEllipsis: o };
|
|
1044
1044
|
}
|
|
1045
|
-
function Rr(e, n, l,
|
|
1045
|
+
function Rr(e, n, l, o, _, h, r, d, u, b, v, f, a) {
|
|
1046
1046
|
const {
|
|
1047
|
-
onClickCell:
|
|
1047
|
+
onClickCell: k
|
|
1048
1048
|
} = h, {
|
|
1049
1049
|
gridCellClass: s,
|
|
1050
1050
|
gridRowClass: p,
|
|
@@ -1064,22 +1064,22 @@ function Rr(e, n, l, a, _, h, r, d, u, b, f, v, o) {
|
|
|
1064
1064
|
shouldShowIcon: S
|
|
1065
1065
|
} = r, {
|
|
1066
1066
|
toggleTreeNode: L
|
|
1067
|
-
} = On(e, n,
|
|
1067
|
+
} = On(e, n, o, _, r, v), {
|
|
1068
1068
|
toggleSelectHierarchyItem: A,
|
|
1069
1069
|
selectTreeNode: B,
|
|
1070
1070
|
unSelectTreeNode: q
|
|
1071
1071
|
} = b, {
|
|
1072
1072
|
cellKey: X,
|
|
1073
|
-
cellPosition:
|
|
1073
|
+
cellPosition: V,
|
|
1074
1074
|
rowKey: j,
|
|
1075
1075
|
rowPosition: Q
|
|
1076
1076
|
} = Sn(e, l), {
|
|
1077
|
-
cellContentClass:
|
|
1077
|
+
cellContentClass: M,
|
|
1078
1078
|
cellContentPosition: U,
|
|
1079
1079
|
cellContentClassWithEllipsis: C
|
|
1080
1080
|
} = kn(), {
|
|
1081
|
-
hierarchyCellContentStyle:
|
|
1082
|
-
} = Cn(e,
|
|
1081
|
+
hierarchyCellContentStyle: N
|
|
1082
|
+
} = Cn(e, o, r), {
|
|
1083
1083
|
treeNodeIconsClass: K
|
|
1084
1084
|
} = xn(e, w, t);
|
|
1085
1085
|
function Z(P, ee) {
|
|
@@ -1169,34 +1169,34 @@ function Rr(e, n, l, a, _, h, r, d, u, b, f, v, o) {
|
|
|
1169
1169
|
function he(P) {
|
|
1170
1170
|
return P.getEditor(P);
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Me(P, ee) {
|
|
1173
1173
|
return n.slots.cellTemplate && E(n.slots.cellTemplate({
|
|
1174
1174
|
cell: ee,
|
|
1175
1175
|
row: P
|
|
1176
1176
|
})) ? fe(ee, P) : ee.mode === Re.editing ? he(ee) : ee.column.columnTemplate ? ee.column.columnTemplate(ee, P) : ee.formatter ? ve(ee, P) : oe(ee);
|
|
1177
1177
|
}
|
|
1178
1178
|
function Le(P, ee, ye) {
|
|
1179
|
-
const ke =
|
|
1179
|
+
const ke = N(P);
|
|
1180
1180
|
return W("div", {
|
|
1181
1181
|
ref: ee.setRef,
|
|
1182
1182
|
key: X(P, ee.index),
|
|
1183
1183
|
class: "fv-grid-hierarchy-cell",
|
|
1184
|
-
style:
|
|
1184
|
+
style: V(P, ee, ye)
|
|
1185
1185
|
}, [W("div", {
|
|
1186
|
-
class:
|
|
1186
|
+
class: M(ee),
|
|
1187
1187
|
style: ke
|
|
1188
|
-
}, [H(P), z(P, ee), ue(P, ee),
|
|
1188
|
+
}, [H(P), z(P, ee), ue(P, ee), Me(P, ee)])]);
|
|
1189
1189
|
}
|
|
1190
1190
|
function I(P, ee, ye) {
|
|
1191
1191
|
return W("div", {
|
|
1192
1192
|
ref: ee.setRef,
|
|
1193
1193
|
key: X(P, ee.index),
|
|
1194
1194
|
class: s(ee, P),
|
|
1195
|
-
style:
|
|
1196
|
-
onClick: (ke) =>
|
|
1195
|
+
style: V(P, ee, ye),
|
|
1196
|
+
onClick: (ke) => k(ke, ee, P, ee.column)
|
|
1197
1197
|
}, [W("div", {
|
|
1198
|
-
class:
|
|
1199
|
-
}, [
|
|
1198
|
+
class: M(ee)
|
|
1199
|
+
}, [Me(P, ee)])]);
|
|
1200
1200
|
}
|
|
1201
1201
|
function ne(P, ee) {
|
|
1202
1202
|
return ee === "left" && l.value.leftColumns.length > 0 && l.value.leftColumns[0].field === P.field || ee === "primary" && l.value.primaryColumns.length > 0 && l.value.primaryColumns[0].field === P.field;
|
|
@@ -1223,9 +1223,9 @@ function Rr(e, n, l, a, _, h, r, d, u, b, f, v, o) {
|
|
|
1223
1223
|
renderDataRow: Se
|
|
1224
1224
|
};
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function Vr(e, n, l) {
|
|
1227
1227
|
const {
|
|
1228
|
-
horizontalScrollThumbStyle:
|
|
1228
|
+
horizontalScrollThumbStyle: o,
|
|
1229
1229
|
onMouseDownScrollThumb: _,
|
|
1230
1230
|
shouldShowHorizontalScrollbar: h
|
|
1231
1231
|
} = l;
|
|
@@ -1234,7 +1234,7 @@ function Mr(e, n, l) {
|
|
|
1234
1234
|
class: "fv-grid-horizontal-scroll"
|
|
1235
1235
|
}, [W("div", {
|
|
1236
1236
|
class: "fv-grid-horizontal-scroll-thumb",
|
|
1237
|
-
style:
|
|
1237
|
+
style: o.value,
|
|
1238
1238
|
onMousedown: (d) => _(d, n, "horizontal")
|
|
1239
1239
|
}, null)]);
|
|
1240
1240
|
}
|
|
@@ -1242,17 +1242,17 @@ function Mr(e, n, l) {
|
|
|
1242
1242
|
renderHorizontalScrollbar: r
|
|
1243
1243
|
};
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function Mr(e, n, l, o, _, h) {
|
|
1246
1246
|
const {
|
|
1247
1247
|
clearSelection: r,
|
|
1248
1248
|
keepSelectingOnPaging: d
|
|
1249
1249
|
} = h, {
|
|
1250
1250
|
pageIndex: u,
|
|
1251
1251
|
totalItems: b,
|
|
1252
|
-
updatePageSize:
|
|
1253
|
-
} = l,
|
|
1254
|
-
pageSize:
|
|
1255
|
-
pageList:
|
|
1252
|
+
updatePageSize: v
|
|
1253
|
+
} = l, f = G(), {
|
|
1254
|
+
pageSize: a,
|
|
1255
|
+
pageList: k,
|
|
1256
1256
|
showGotoPage: s,
|
|
1257
1257
|
showPageIndex: p,
|
|
1258
1258
|
showPageList: x,
|
|
@@ -1262,7 +1262,7 @@ function Vr(e, n, l, a, _, h) {
|
|
|
1262
1262
|
showPageInfo: O
|
|
1263
1263
|
} = _;
|
|
1264
1264
|
function m(S, L) {
|
|
1265
|
-
g.value && T.value !== "server" ? (l.navigatePageTo(S),
|
|
1265
|
+
g.value && T.value !== "server" ? (l.navigatePageTo(S), o.resetScroll()) : (v(L), d.value || r());
|
|
1266
1266
|
}
|
|
1267
1267
|
function y(S) {
|
|
1268
1268
|
const {
|
|
@@ -1296,19 +1296,19 @@ function Vr(e, n, l, a, _, h) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
function i() {
|
|
1298
1298
|
return W(Gt, {
|
|
1299
|
-
ref:
|
|
1299
|
+
ref: f,
|
|
1300
1300
|
mode: "default",
|
|
1301
1301
|
disabled: c.value,
|
|
1302
1302
|
currentPage: u.value,
|
|
1303
1303
|
"onUpdate:currentPage": (S) => u.value = S,
|
|
1304
|
-
pageSize:
|
|
1305
|
-
"onUpdate:pageSize": (S) =>
|
|
1304
|
+
pageSize: a.value,
|
|
1305
|
+
"onUpdate:pageSize": (S) => a.value = S,
|
|
1306
1306
|
showPageInfo: O.value,
|
|
1307
1307
|
showGoButton: s.value,
|
|
1308
1308
|
showPageList: x.value,
|
|
1309
1309
|
showPageNumbers: p.value,
|
|
1310
1310
|
totalItems: b.value,
|
|
1311
|
-
pageList:
|
|
1311
|
+
pageList: k.value,
|
|
1312
1312
|
onPageIndexChanged: y,
|
|
1313
1313
|
onPageSizeChanged: w,
|
|
1314
1314
|
onChanged: t
|
|
@@ -1318,18 +1318,18 @@ function Vr(e, n, l, a, _, h) {
|
|
|
1318
1318
|
renderDataGridPagination: i
|
|
1319
1319
|
};
|
|
1320
1320
|
}
|
|
1321
|
-
function Ir(e, n, l,
|
|
1321
|
+
function Ir(e, n, l, o, _) {
|
|
1322
1322
|
const {
|
|
1323
1323
|
isSelectingHirarchyItem: h,
|
|
1324
1324
|
multiSelectOnClickRow: r,
|
|
1325
1325
|
multiSelectOnlyOnCheck: d,
|
|
1326
1326
|
updateSelectAllStatus: u,
|
|
1327
1327
|
selectItem: b,
|
|
1328
|
-
toggleSelectItem:
|
|
1329
|
-
toggleSelectItemWithoutRow:
|
|
1328
|
+
toggleSelectItem: v,
|
|
1329
|
+
toggleSelectItemWithoutRow: f
|
|
1330
1330
|
} = l, {
|
|
1331
|
-
onMouseoverRow:
|
|
1332
|
-
sidebarRowClass:
|
|
1331
|
+
onMouseoverRow: a,
|
|
1332
|
+
sidebarRowClass: k,
|
|
1333
1333
|
onClickRow: s
|
|
1334
1334
|
} = n, {
|
|
1335
1335
|
showRowNumer: p,
|
|
@@ -1337,7 +1337,7 @@ function Ir(e, n, l, a, _) {
|
|
|
1337
1337
|
sidebarCellPosition: T,
|
|
1338
1338
|
rowKey: c,
|
|
1339
1339
|
cellKey: g
|
|
1340
|
-
} =
|
|
1340
|
+
} = o, {
|
|
1341
1341
|
gridSideStyle: O
|
|
1342
1342
|
} = _, m = Y(() => ({
|
|
1343
1343
|
overflow: "hidden"
|
|
@@ -1354,7 +1354,7 @@ function Ir(e, n, l, a, _) {
|
|
|
1354
1354
|
}, [W("div", {
|
|
1355
1355
|
class: "custom-control custom-checkbox f-checkradio-single",
|
|
1356
1356
|
style: "margin:0;padding-left:0.5rem"
|
|
1357
|
-
}, [
|
|
1357
|
+
}, [Mt(W("input", {
|
|
1358
1358
|
id: g(B),
|
|
1359
1359
|
title: g(B),
|
|
1360
1360
|
type: "checkbox",
|
|
@@ -1375,7 +1375,7 @@ function Ir(e, n, l, a, _) {
|
|
|
1375
1375
|
onClick: (q) => {
|
|
1376
1376
|
w(q, B);
|
|
1377
1377
|
},
|
|
1378
|
-
onMouseover: (q) =>
|
|
1378
|
+
onMouseover: (q) => a(q, B)
|
|
1379
1379
|
}, [W("div", {
|
|
1380
1380
|
title: B.dataIndex,
|
|
1381
1381
|
class: {
|
|
@@ -1386,14 +1386,14 @@ function Ir(e, n, l, a, _) {
|
|
|
1386
1386
|
}, [B.raw.__fv_visible_index__ + 1])]);
|
|
1387
1387
|
}
|
|
1388
1388
|
function S(B, q, X) {
|
|
1389
|
-
B.stopPropagation(), h.value ? r.value ?
|
|
1389
|
+
B.stopPropagation(), h.value ? r.value ? v(X) : b(X) : r.value ? v(X) : d.value ? f(X) : b(X), u();
|
|
1390
1390
|
}
|
|
1391
1391
|
function L(B) {
|
|
1392
1392
|
return (x.value || p.value) && B.value.map((q, X) => W("div", {
|
|
1393
1393
|
key: c(q),
|
|
1394
|
-
class:
|
|
1394
|
+
class: k(q, X),
|
|
1395
1395
|
style: T(q),
|
|
1396
|
-
onClick: (
|
|
1396
|
+
onClick: (V) => S(V, B, q)
|
|
1397
1397
|
}, [x.value && !e.hierarchy && t(q), p.value && i(q)]));
|
|
1398
1398
|
}
|
|
1399
1399
|
function A(B) {
|
|
@@ -1411,7 +1411,7 @@ function Ir(e, n, l, a, _) {
|
|
|
1411
1411
|
}
|
|
1412
1412
|
function Dr(e, n, l) {
|
|
1413
1413
|
const {
|
|
1414
|
-
columnContext:
|
|
1414
|
+
columnContext: o
|
|
1415
1415
|
} = l, _ = G(e.summary), h = Y(() => {
|
|
1416
1416
|
const u = _.value;
|
|
1417
1417
|
return u && u.enable && u.groupFields && u.groupFields.length > 0;
|
|
@@ -1426,9 +1426,9 @@ function Dr(e, n, l) {
|
|
|
1426
1426
|
}, [W("span", {
|
|
1427
1427
|
class: "fv-datagrid-summary-title",
|
|
1428
1428
|
style: r.value
|
|
1429
|
-
}, [
|
|
1429
|
+
}, [Ve.getLocaleValue("datagrid.summary.title")]), W("div", {
|
|
1430
1430
|
class: "fv-datagrid-summary-content"
|
|
1431
|
-
}, [
|
|
1431
|
+
}, [o.value.summaryColumns.map((u) => W("div", {
|
|
1432
1432
|
class: "fv-datagrid-summary-field"
|
|
1433
1433
|
}, [W("span", {
|
|
1434
1434
|
class: "fv-datagrid-summary-field-title"
|
|
@@ -1442,7 +1442,7 @@ function Dr(e, n, l) {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
function Pr(e, n, l) {
|
|
1444
1444
|
const {
|
|
1445
|
-
verticalScrollThumbStyle:
|
|
1445
|
+
verticalScrollThumbStyle: o,
|
|
1446
1446
|
onMouseDownScrollThumb: _,
|
|
1447
1447
|
shouldShowVirticalScrollbar: h
|
|
1448
1448
|
} = l;
|
|
@@ -1451,7 +1451,7 @@ function Pr(e, n, l) {
|
|
|
1451
1451
|
class: "fv-grid-vertical-scroll"
|
|
1452
1452
|
}, [W("div", {
|
|
1453
1453
|
class: "fv-grid-vertical-scroll-thumb",
|
|
1454
|
-
style:
|
|
1454
|
+
style: o.value,
|
|
1455
1455
|
onMousedown: (d) => _(d, n, "vertical")
|
|
1456
1456
|
}, null)]);
|
|
1457
1457
|
}
|
|
@@ -1472,65 +1472,65 @@ function Nn(e) {
|
|
|
1472
1472
|
return !d.hidden;
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
|
-
function l(d, u, b,
|
|
1476
|
-
var
|
|
1477
|
-
switch ((
|
|
1475
|
+
function l(d, u, b, v) {
|
|
1476
|
+
var f, a, k, s, p;
|
|
1477
|
+
switch ((f = d.onClick) == null || f.call(d, u, b.dataIndex, b), d.command) {
|
|
1478
1478
|
case "edit":
|
|
1479
|
-
b.status, $e.editing, (
|
|
1479
|
+
b.status, $e.editing, (k = (a = e.commandOption) == null ? void 0 : a.onClickEditCommand) == null || k.call(a, v, b, d, u);
|
|
1480
1480
|
break;
|
|
1481
1481
|
case "accept":
|
|
1482
1482
|
case "cancel":
|
|
1483
1483
|
b.status, $e.initial;
|
|
1484
1484
|
break;
|
|
1485
1485
|
case "remove":
|
|
1486
|
-
(p = (s = e.commandOption) == null ? void 0 : s.onClickDeleteCommand) == null || p.call(s,
|
|
1486
|
+
(p = (s = e.commandOption) == null ? void 0 : s.onClickDeleteCommand) == null || p.call(s, v, b, d, u);
|
|
1487
1487
|
break;
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1491
|
-
return d === "编辑" ?
|
|
1490
|
+
function o(d) {
|
|
1491
|
+
return d === "编辑" ? Ve.getLocaleValue("datagrid.commandColumn.edit") : d === "确定" ? Ve.getLocaleValue("datagrid.commandColumn.accept") : d === "取消" ? Ve.getLocaleValue("datagrid.commandColumn.cancel") : d === "删除" ? Ve.getLocaleValue("datagrid.commandColumn.remove") : d;
|
|
1492
1492
|
}
|
|
1493
1493
|
function _(d, u) {
|
|
1494
1494
|
const {
|
|
1495
1495
|
column: b
|
|
1496
1496
|
} = d;
|
|
1497
|
-
return b.commands && b.commands.map((
|
|
1497
|
+
return b.commands && b.commands.map((v, f) => f ? n(v, u) && W(bt, {
|
|
1498
1498
|
class: "ml-1",
|
|
1499
|
-
type:
|
|
1500
|
-
size:
|
|
1501
|
-
onClick: (
|
|
1499
|
+
type: v.type,
|
|
1500
|
+
size: v.size || "small",
|
|
1501
|
+
onClick: (a) => l(v, a, u, d),
|
|
1502
1502
|
style: {
|
|
1503
1503
|
"margin-bottom": "3px"
|
|
1504
1504
|
}
|
|
1505
1505
|
}, {
|
|
1506
|
-
default: () => [qe(" "),
|
|
1507
|
-
}) : n(
|
|
1508
|
-
type:
|
|
1509
|
-
size:
|
|
1510
|
-
onClick: (
|
|
1506
|
+
default: () => [qe(" "), o(v.text), qe(" ")]
|
|
1507
|
+
}) : n(v, u) && W(bt, {
|
|
1508
|
+
type: v.type,
|
|
1509
|
+
size: v.size || "small",
|
|
1510
|
+
onClick: (a) => l(v, a, u, d),
|
|
1511
1511
|
style: {
|
|
1512
1512
|
"margin-bottom": "3px"
|
|
1513
1513
|
}
|
|
1514
1514
|
}, {
|
|
1515
|
-
default: () => [qe(" "),
|
|
1515
|
+
default: () => [qe(" "), o(v.text), qe(" ")]
|
|
1516
1516
|
}));
|
|
1517
1517
|
}
|
|
1518
|
-
function h(d, u, b,
|
|
1519
|
-
var
|
|
1520
|
-
(
|
|
1518
|
+
function h(d, u, b, v) {
|
|
1519
|
+
var f, a, k;
|
|
1520
|
+
(f = u.onClick) == null || f.call(u, d, b.dataIndex, b), (k = (a = e.commandOption) == null ? void 0 : a.onHandleAction) == null || k.call(a, v, b, u, d);
|
|
1521
1521
|
}
|
|
1522
1522
|
function r(d, u) {
|
|
1523
|
-
var
|
|
1523
|
+
var f;
|
|
1524
1524
|
const {
|
|
1525
1525
|
column: b
|
|
1526
1526
|
} = d;
|
|
1527
|
-
return ((
|
|
1527
|
+
return ((f = b == null ? void 0 : b.commands) == null ? void 0 : f.find((a) => a.command)) ? _(d, u) : W(Ut, {
|
|
1528
1528
|
data: b.commands,
|
|
1529
|
-
count:
|
|
1529
|
+
count: 2,
|
|
1530
1530
|
size: "small",
|
|
1531
1531
|
placement: "auto",
|
|
1532
|
-
onClick: (
|
|
1533
|
-
h(
|
|
1532
|
+
onClick: (a) => {
|
|
1533
|
+
h(a.payload, a.button, u, d);
|
|
1534
1534
|
}
|
|
1535
1535
|
}, null);
|
|
1536
1536
|
}
|
|
@@ -1545,21 +1545,21 @@ function Hr(e, n) {
|
|
|
1545
1545
|
}, [e.emptyTemplate ? e.emptyTemplate() : W("div", {
|
|
1546
1546
|
class: "f-datagrid-norecords-content",
|
|
1547
1547
|
style: "margin: 0;width: 100%;position: absolute; top: 50%; transform:translateY(-50%);user-select:none"
|
|
1548
|
-
}, [qe(" "),
|
|
1548
|
+
}, [qe(" "), Ve.getLocaleValue("datagrid.emptyMessage")])]);
|
|
1549
1549
|
}
|
|
1550
1550
|
return {
|
|
1551
1551
|
renderEmpty: l
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
1554
|
function Wr(e) {
|
|
1555
|
-
const n = G(e.minHeight), l = G(e.minWidth),
|
|
1555
|
+
const n = G(e.minHeight), l = G(e.minWidth), o = G(e.height), _ = G(e.width), h = Y(() => o.value <= 0 ? 0 : Math.max(o.value, n.value)), r = Y(() => _.value <= 0 ? 0 : Math.max(_.value, l.value));
|
|
1556
1556
|
return pe([
|
|
1557
1557
|
() => e.height,
|
|
1558
1558
|
() => e.width,
|
|
1559
1559
|
() => e.minHeight,
|
|
1560
1560
|
() => e.minWidth
|
|
1561
|
-
], ([u, b,
|
|
1562
|
-
n.value = Number(
|
|
1561
|
+
], ([u, b, v, f]) => {
|
|
1562
|
+
n.value = Number(v), l.value = Number(f), o.value = Number(u), _.value = Number(b);
|
|
1563
1563
|
}), { containerStyleObject: Y(() => ({
|
|
1564
1564
|
height: h.value > 0 ? `${h.value}px` : e.fit ? "100%" : "",
|
|
1565
1565
|
width: r.value > 0 ? `${r.value}px` : e.fit ? "100%" : "",
|
|
@@ -1623,11 +1623,11 @@ function Lr(e, n) {
|
|
|
1623
1623
|
return d.value && d.value.reduce((t, i) => (t.set(i, !0), t), w), y.reduce((t, i) => (i.visible = i.visible !== !1, i.filter = i.filter || Tn, i.fixed === "left" ? (_.value.leftColumns.push(i), _.value.leftColumnsMap.set(i.field, i), _.value.leftColumnsWidth += i.actualWidth) : i.fixed === "right" ? (_.value.rightColumns.push(i), _.value.rightColumnsMap.set(i.field, i), _.value.rightColumnsWidth += i.actualWidth) : (_.value.primaryColumns.push(i), _.value.primaryColumnsMap.set(i.field, i), _.value.primaryColumnsWidth += i.actualWidth), w.has(i.field) && _.value.summaryColumns.push(i), t), _), u(), _;
|
|
1624
1624
|
}
|
|
1625
1625
|
b(e.columns);
|
|
1626
|
-
const
|
|
1627
|
-
function
|
|
1626
|
+
const v = Y(() => _.value.leftColumns.length > 0), f = Y(() => _.value.rightColumns.length > 0);
|
|
1627
|
+
function a(y, w) {
|
|
1628
1628
|
return w.sortable && w.sort && w.sort !== "none" && y.push(w), y;
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function k(y, w) {
|
|
1631
1631
|
return y.sortOrder = y.sortOrder || 0, w.sortOrder = w.sortOrder || 0, y.sortOrder === w.sortOrder ? 0 : y.sortOrder < w.sortOrder ? -1 : 1;
|
|
1632
1632
|
}
|
|
1633
1633
|
function s(y, w) {
|
|
@@ -1642,12 +1642,12 @@ function Lr(e, n) {
|
|
|
1642
1642
|
}
|
|
1643
1643
|
function T() {
|
|
1644
1644
|
const y = [];
|
|
1645
|
-
_.value.leftColumns.reduce(
|
|
1645
|
+
_.value.leftColumns.reduce(a, y), _.value.primaryColumns.reduce(a, y), _.value.rightColumns.reduce(a, y);
|
|
1646
1646
|
const w = Math.max(...y.map((t) => t.sortOrder || 0));
|
|
1647
1647
|
return y.sort(s).map((t) => {
|
|
1648
1648
|
const i = t.sortOrder || w + 1;
|
|
1649
1649
|
return t.sortOrder = i, t;
|
|
1650
|
-
}).sort(
|
|
1650
|
+
}).sort(k).map((t, i) => {
|
|
1651
1651
|
const S = i + 1;
|
|
1652
1652
|
return t.sortOrder = S, t;
|
|
1653
1653
|
});
|
|
@@ -1679,8 +1679,8 @@ function Lr(e, n) {
|
|
|
1679
1679
|
applySortableColumns: O,
|
|
1680
1680
|
collectionSortableColumns: T,
|
|
1681
1681
|
columnContext: _,
|
|
1682
|
-
hasLeftFixedColumn:
|
|
1683
|
-
hasRightFixedColumn:
|
|
1682
|
+
hasLeftFixedColumn: v,
|
|
1683
|
+
hasRightFixedColumn: f,
|
|
1684
1684
|
updateColumnRenderContext: b,
|
|
1685
1685
|
updateColumnSettingIcon: u,
|
|
1686
1686
|
sortFromServer: g,
|
|
@@ -1697,19 +1697,19 @@ const Fn = [{
|
|
|
1697
1697
|
function En(e) {
|
|
1698
1698
|
var r, d;
|
|
1699
1699
|
G(((r = e.column) == null ? void 0 : r.filter) || !1), e.filter = e.filter || function(u) {
|
|
1700
|
-
var
|
|
1701
|
-
return String(((
|
|
1700
|
+
var v;
|
|
1701
|
+
return String(((v = e.column) == null ? void 0 : v.filter) || "").split(",").includes(String(u[e.field]));
|
|
1702
1702
|
};
|
|
1703
1703
|
const n = ",", l = {
|
|
1704
1704
|
multiSelect: !0,
|
|
1705
1705
|
multiSelectMode: "OnCheckAndClick",
|
|
1706
1706
|
showCheckbox: !0
|
|
1707
1707
|
};
|
|
1708
|
-
function
|
|
1708
|
+
function o(u) {
|
|
1709
1709
|
return (u == null ? void 0 : u.split(n).filter((b) => b !== "").map((b) => b.toLowerCase() === "true")) || [];
|
|
1710
1710
|
}
|
|
1711
1711
|
function _(u) {
|
|
1712
|
-
return u.map((
|
|
1712
|
+
return u.map((v) => v.value).join(n);
|
|
1713
1713
|
}
|
|
1714
1714
|
function h(u) {
|
|
1715
1715
|
e.column && (e.column.filter = _(u));
|
|
@@ -1722,7 +1722,7 @@ function En(e) {
|
|
|
1722
1722
|
view: "SingleView",
|
|
1723
1723
|
size: "Small",
|
|
1724
1724
|
selection: l,
|
|
1725
|
-
"selection-values":
|
|
1725
|
+
"selection-values": o(((d = e.column) == null ? void 0 : d.filter) || ""),
|
|
1726
1726
|
onSelectionUpdate: (u) => h(u)
|
|
1727
1727
|
}, {
|
|
1728
1728
|
default: () => [qe(" ")]
|
|
@@ -1733,22 +1733,22 @@ function Rn(e) {
|
|
|
1733
1733
|
const n = G(((d = e.column) == null ? void 0 : d.filter) || ""), l = Y(() => {
|
|
1734
1734
|
var u;
|
|
1735
1735
|
return ((u = e.column) == null ? void 0 : u.dataType) === "datetime";
|
|
1736
|
-
}),
|
|
1736
|
+
}), o = Y(() => {
|
|
1737
1737
|
var u;
|
|
1738
1738
|
return ((u = e.column) == null ? void 0 : u.dataType) === "date";
|
|
1739
1739
|
}), _ = Y(() => {
|
|
1740
1740
|
var u, b;
|
|
1741
1741
|
return l.value || ((b = (u = e.column) == null ? void 0 : u.editor) == null ? void 0 : b.showTime);
|
|
1742
1742
|
}), h = Y(() => {
|
|
1743
|
-
var u, b,
|
|
1743
|
+
var u, b, v, f;
|
|
1744
1744
|
if (l.value)
|
|
1745
1745
|
return ((b = (u = e.column) == null ? void 0 : u.editor) == null ? void 0 : b.displayFormat) || "yyyy-MM-dd HH:mm:ss";
|
|
1746
|
-
if (
|
|
1747
|
-
return ((
|
|
1746
|
+
if (o.value)
|
|
1747
|
+
return ((f = (v = e.column) == null ? void 0 : v.editor) == null ? void 0 : f.displayFormat) || "yyyy-MM-dd";
|
|
1748
1748
|
});
|
|
1749
1749
|
e.filter = e.filter || function(u) {
|
|
1750
|
-
var
|
|
1751
|
-
const b = new Date(new Date((
|
|
1750
|
+
var v;
|
|
1751
|
+
const b = new Date(new Date((v = e.column) == null ? void 0 : v.filter).toLocaleDateString()).valueOf();
|
|
1752
1752
|
return new Date(new Date(u[e.field]).toLocaleDateString()).valueOf() === b;
|
|
1753
1753
|
};
|
|
1754
1754
|
function r(u) {
|
|
@@ -1765,25 +1765,25 @@ function Rn(e) {
|
|
|
1765
1765
|
showTime: _.value
|
|
1766
1766
|
}, null)]);
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function Vn(e) {
|
|
1769
1769
|
var r, d, u;
|
|
1770
1770
|
const {
|
|
1771
1771
|
isUndefined: n,
|
|
1772
1772
|
isNull: l
|
|
1773
|
-
} = ut(),
|
|
1774
|
-
var b,
|
|
1775
|
-
return n((
|
|
1773
|
+
} = ut(), o = G(n((r = e.column) == null ? void 0 : r.filter) || l((d = e.column) == null ? void 0 : d.filter) ? null : (u = e.column) == null ? void 0 : u.filter), _ = Y(() => {
|
|
1774
|
+
var b, v, f, a;
|
|
1775
|
+
return n((v = (b = e.column) == null ? void 0 : b.editor) == null ? void 0 : v.precision) ? 2 : (a = (f = e.column) == null ? void 0 : f.editor) == null ? void 0 : a.precision;
|
|
1776
1776
|
});
|
|
1777
1777
|
e.filter = e.filter || function(b) {
|
|
1778
|
-
const
|
|
1779
|
-
return isNaN(
|
|
1778
|
+
const v = Number.parseFloat(String(o.value)), f = Number.parseFloat(b[e.field]);
|
|
1779
|
+
return isNaN(v) ? isNaN(f) : v === f;
|
|
1780
1780
|
};
|
|
1781
1781
|
function h(b) {
|
|
1782
|
-
e.column && (e.column.filter = b),
|
|
1782
|
+
e.column && (e.column.filter = b), o.value = b;
|
|
1783
1783
|
}
|
|
1784
1784
|
return W("div", null, [W(qt, {
|
|
1785
|
-
modelValue:
|
|
1786
|
-
"onUpdate:modelValue": (b) =>
|
|
1785
|
+
modelValue: o.value,
|
|
1786
|
+
"onUpdate:modelValue": (b) => o.value = b,
|
|
1787
1787
|
nullable: !0,
|
|
1788
1788
|
showZero: !0,
|
|
1789
1789
|
bigNumber: !0,
|
|
@@ -1791,34 +1791,35 @@ function Mn(e) {
|
|
|
1791
1791
|
onValueChange: h
|
|
1792
1792
|
}, null)]);
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1795
|
-
var
|
|
1796
|
-
const r = G(((
|
|
1797
|
-
e.filterHistory = e.filterHistory || _.getFilterHistory(e), e.filter = e.filter || function(
|
|
1798
|
-
return (
|
|
1794
|
+
function Mn(e, n, l, o, _, h) {
|
|
1795
|
+
var f;
|
|
1796
|
+
const r = G(((f = e.column) == null ? void 0 : f.filter) || "");
|
|
1797
|
+
e.filterHistory = e.filterHistory || _.getFilterHistory(e), e.filter = e.filter || function(a) {
|
|
1798
|
+
return (a[e.field] || "").startsWith(r.value);
|
|
1799
1799
|
};
|
|
1800
|
-
function d(
|
|
1801
|
-
e.column && (e.column.filter =
|
|
1800
|
+
function d(a, k) {
|
|
1801
|
+
e.column && (e.column.filter = a);
|
|
1802
1802
|
}
|
|
1803
|
-
const u =
|
|
1804
|
-
id:
|
|
1805
|
-
name:
|
|
1803
|
+
const u = o.rawView.value.reduce((a, k, s) => (a.push(k[e.field]), a), []), v = [...new Set(u)].map((a, k) => ({
|
|
1804
|
+
id: k,
|
|
1805
|
+
name: a
|
|
1806
1806
|
}));
|
|
1807
1807
|
return W("div", {
|
|
1808
1808
|
style: "display:flex;flex-direction:column;"
|
|
1809
1809
|
}, [W(Yt, {
|
|
1810
1810
|
modelValue: r.value,
|
|
1811
|
-
"onUpdate:modelValue": (
|
|
1811
|
+
"onUpdate:modelValue": (a) => r.value = a,
|
|
1812
|
+
placeholder: Ve.getLocaleValue("datagrid.filter.searchBoxPlaceholder"),
|
|
1812
1813
|
showDropdown: !1,
|
|
1813
1814
|
"popup-right-boundary": l.value,
|
|
1814
1815
|
"popup-offset-x": h.offsetX,
|
|
1815
|
-
"recommended-data":
|
|
1816
|
+
"recommended-data": v,
|
|
1816
1817
|
buttonContent: "",
|
|
1817
1818
|
updateOn: "change",
|
|
1818
|
-
onChange: (
|
|
1819
|
+
onChange: (a, k) => d(a)
|
|
1819
1820
|
}, null)]);
|
|
1820
1821
|
}
|
|
1821
|
-
function In(e, n, l,
|
|
1822
|
+
function In(e, n, l, o, _, h) {
|
|
1822
1823
|
var s;
|
|
1823
1824
|
e.filter = e.filter || function(p) {
|
|
1824
1825
|
var T;
|
|
@@ -1828,22 +1829,22 @@ function In(e, n, l, a, _, h) {
|
|
|
1828
1829
|
multiSelect: !0,
|
|
1829
1830
|
multiSelectMode: "OnCheckAndClick",
|
|
1830
1831
|
showCheckbox: !0
|
|
1831
|
-
}, u =
|
|
1832
|
+
}, u = o.rawView.value.reduce((p, x, T) => (p.push(x[e.field]), p), []), v = [...new Set(u)].map((p, x) => ({
|
|
1832
1833
|
id: x,
|
|
1833
1834
|
name: p,
|
|
1834
1835
|
value: p
|
|
1835
1836
|
}));
|
|
1836
|
-
function
|
|
1837
|
+
function f(p) {
|
|
1837
1838
|
return (p == null ? void 0 : p.split(r)) || [];
|
|
1838
1839
|
}
|
|
1839
|
-
function
|
|
1840
|
+
function a(p) {
|
|
1840
1841
|
return p.map((T) => T.value).join(r);
|
|
1841
1842
|
}
|
|
1842
|
-
function
|
|
1843
|
-
e.column && (e.column.filter =
|
|
1843
|
+
function k(p) {
|
|
1844
|
+
e.column && (e.column.filter = a(p));
|
|
1844
1845
|
}
|
|
1845
1846
|
return W(yt, {
|
|
1846
|
-
data:
|
|
1847
|
+
data: v,
|
|
1847
1848
|
"multi-select": !0,
|
|
1848
1849
|
"id-field": "value",
|
|
1849
1850
|
"value-field": "value",
|
|
@@ -1851,8 +1852,8 @@ function In(e, n, l, a, _, h) {
|
|
|
1851
1852
|
header: "Search",
|
|
1852
1853
|
size: "Small",
|
|
1853
1854
|
selection: d,
|
|
1854
|
-
"selection-values":
|
|
1855
|
-
onSelectionUpdate: (p) =>
|
|
1855
|
+
"selection-values": f(((s = e.column) == null ? void 0 : s.filter) || ""),
|
|
1856
|
+
onSelectionUpdate: (p) => k(p)
|
|
1856
1857
|
}, {
|
|
1857
1858
|
default: () => [qe(" ")]
|
|
1858
1859
|
});
|
|
@@ -1897,7 +1898,7 @@ function Dn(e) {
|
|
|
1897
1898
|
default: () => [qe(" ")]
|
|
1898
1899
|
});
|
|
1899
1900
|
}
|
|
1900
|
-
function Ar(e, n, l,
|
|
1901
|
+
function Ar(e, n, l, o, _) {
|
|
1901
1902
|
const h = /* @__PURE__ */ new Map([
|
|
1902
1903
|
["boolean", "boolean-filter"],
|
|
1903
1904
|
["date", "date-filter"],
|
|
@@ -1913,19 +1914,19 @@ function Ar(e, n, l, a, _) {
|
|
|
1913
1914
|
["date-filter", Rn],
|
|
1914
1915
|
["enum-filter", In],
|
|
1915
1916
|
["list-filter", Dn],
|
|
1916
|
-
["numeric-filter",
|
|
1917
|
-
["text-filter",
|
|
1917
|
+
["numeric-filter", Vn],
|
|
1918
|
+
["text-filter", Mn]
|
|
1918
1919
|
]);
|
|
1919
1920
|
function d(u) {
|
|
1920
|
-
var
|
|
1921
|
-
const b = ((
|
|
1922
|
-
if (
|
|
1923
|
-
return
|
|
1921
|
+
var a;
|
|
1922
|
+
const b = ((a = u.column) == null ? void 0 : a.dataType) || "string", v = h.get(b) || "text-editor", f = r.get(v);
|
|
1923
|
+
if (f)
|
|
1924
|
+
return f(
|
|
1924
1925
|
u,
|
|
1925
1926
|
e,
|
|
1926
1927
|
n,
|
|
1927
1928
|
l,
|
|
1928
|
-
|
|
1929
|
+
o,
|
|
1929
1930
|
_
|
|
1930
1931
|
);
|
|
1931
1932
|
}
|
|
@@ -1933,57 +1934,55 @@ function Ar(e, n, l, a, _) {
|
|
|
1933
1934
|
}
|
|
1934
1935
|
function jr(e) {
|
|
1935
1936
|
var h, r;
|
|
1936
|
-
const n = G(((h = e.commandOption) == null ? void 0 : h.enable) || !1), l = G(((r = e.commandOption) == null ? void 0 : r.commands) || []),
|
|
1937
|
+
const n = G(((h = e.commandOption) == null ? void 0 : h.enable) || !1), l = G(((r = e.commandOption) == null ? void 0 : r.commands) || []), o = Y(() => Ve.getLocaleValue("datagrid.commandColumn.title"));
|
|
1937
1938
|
function _(d) {
|
|
1938
1939
|
var u;
|
|
1939
|
-
if (n.value && !(d.value.findIndex((
|
|
1940
|
-
const
|
|
1940
|
+
if (n.value && !(d.value.findIndex((v) => v.dataType === lt) > -1)) {
|
|
1941
|
+
const v = {
|
|
1941
1942
|
field: Tt,
|
|
1942
|
-
title:
|
|
1943
|
+
title: o.value,
|
|
1943
1944
|
width: _n,
|
|
1944
1945
|
fixed: pn,
|
|
1945
1946
|
dataType: lt,
|
|
1946
1947
|
commands: l.value,
|
|
1947
1948
|
resizable: !1,
|
|
1948
1949
|
halign: ((u = e.commandOption) == null ? void 0 : u.halign) || "left",
|
|
1949
|
-
visible: !0
|
|
1950
|
-
|
|
1951
|
-
// (cell: VisualDataCell, row: VisualData) =>
|
|
1952
|
-
// props.commandOption.formatter(cell, row) : null
|
|
1950
|
+
visible: !0,
|
|
1951
|
+
formatter: e.commandOption.formatter && typeof e.commandOption.formatter ? (f, a) => e.commandOption.formatter(f, a) : null
|
|
1953
1952
|
};
|
|
1954
|
-
e.commandOption.formatter && typeof e.commandOption.formatter != "function" && (
|
|
1953
|
+
e.commandOption.formatter && typeof e.commandOption.formatter != "function" && (v.formatter = (f, a) => e.commandOption.formatter(f, a)), d.value.push(v);
|
|
1955
1954
|
}
|
|
1956
1955
|
}
|
|
1957
1956
|
return { applyCommands: _ };
|
|
1958
1957
|
}
|
|
1959
|
-
function Br(e, n, l,
|
|
1960
|
-
const { columnContext: d } = l, { getGridHeaderCells: u } = _, { groupFields: b } = h,
|
|
1958
|
+
function Br(e, n, l, o, _, h, r) {
|
|
1959
|
+
const { columnContext: d } = l, { getGridHeaderCells: u } = _, { groupFields: b } = h, v = G(-1), f = G(!1), a = Y(() => b.value && b.value.map((c) => {
|
|
1961
1960
|
var g;
|
|
1962
1961
|
return {
|
|
1963
1962
|
name: ((g = d.value.primaryColumnsMap.get(c)) == null ? void 0 : g.title) || c,
|
|
1964
1963
|
value: c
|
|
1965
1964
|
};
|
|
1966
1965
|
}));
|
|
1967
|
-
function
|
|
1966
|
+
function k(c, g, O) {
|
|
1968
1967
|
var m, y, w;
|
|
1969
1968
|
if (c.stopPropagation(), g && g.draggable) {
|
|
1970
1969
|
const t = `${(m = g.column) == null ? void 0 : m.title}:${(y = g.column) == null ? void 0 : y.field}`;
|
|
1971
1970
|
(w = c.dataTransfer) == null || w.setData("Text", t), setTimeout(() => {
|
|
1972
|
-
|
|
1971
|
+
v.value = O, f.value = !0;
|
|
1973
1972
|
});
|
|
1974
1973
|
}
|
|
1975
1974
|
}
|
|
1976
1975
|
function s(c, g) {
|
|
1977
|
-
if (c.preventDefault(),
|
|
1978
|
-
const { primaryColumns: O } = d.value, m = O[
|
|
1979
|
-
y[g].dataType !== lt && y[g].dataType !== Xe && (y.splice(
|
|
1976
|
+
if (c.preventDefault(), v.value !== g && f.value) {
|
|
1977
|
+
const { primaryColumns: O } = d.value, m = O[v.value], y = O;
|
|
1978
|
+
y[g].dataType !== lt && y[g].dataType !== Xe && (y.splice(v.value, 1), y.splice(g, 0, m), d.value.primaryHeaderColumns = Array.from(u(y).values()), v.value = g);
|
|
1980
1979
|
}
|
|
1981
1980
|
}
|
|
1982
1981
|
function p(c, g) {
|
|
1983
1982
|
c.preventDefault(), c.dataTransfer && (c.dataTransfer.dropEffect = "move");
|
|
1984
1983
|
}
|
|
1985
1984
|
function x(c, g) {
|
|
1986
|
-
|
|
1985
|
+
f.value && (f.value = !1, o.updateDataView(), r.reCalculateVisualDataRows());
|
|
1987
1986
|
}
|
|
1988
1987
|
function T(c) {
|
|
1989
1988
|
var O;
|
|
@@ -1995,43 +1994,43 @@ function Br(e, n, l, a, _, h, r) {
|
|
|
1995
1994
|
const y = m[1];
|
|
1996
1995
|
h.groupFields.value.push(y);
|
|
1997
1996
|
}
|
|
1998
|
-
|
|
1997
|
+
o.updateDataView(), r.reCalculateVisualDataRows();
|
|
1999
1998
|
}
|
|
2000
1999
|
return {
|
|
2001
|
-
dragstart:
|
|
2000
|
+
dragstart: k,
|
|
2002
2001
|
dragenter: s,
|
|
2003
2002
|
dragover: p,
|
|
2004
2003
|
dragend: x,
|
|
2005
2004
|
dropOnGroupPanel: T,
|
|
2006
|
-
isDragging:
|
|
2007
|
-
groupColumnItems:
|
|
2005
|
+
isDragging: f,
|
|
2006
|
+
groupColumnItems: a
|
|
2008
2007
|
};
|
|
2009
2008
|
}
|
|
2010
|
-
function zr(e, n, l,
|
|
2009
|
+
function zr(e, n, l, o, _) {
|
|
2011
2010
|
const { getGridHeaderCells: h } = _, r = 120, d = 50, u = Y(() => {
|
|
2012
2011
|
var t;
|
|
2013
2012
|
return ((t = e.rowNumber) == null ? void 0 : t.enable) || !1;
|
|
2014
2013
|
}), b = Y(() => {
|
|
2015
2014
|
var t, i;
|
|
2016
2015
|
return !e.hierarchy && (((t = e.selection) == null ? void 0 : t.multiSelect) || ((i = e.selection) == null ? void 0 : i.showCheckbox) || !1);
|
|
2017
|
-
}),
|
|
2016
|
+
}), v = Y(
|
|
2018
2017
|
() => {
|
|
2019
2018
|
var t;
|
|
2020
2019
|
return 0 + (u.value ? ((t = e.rowNumber) == null ? void 0 : t.width) || 36 : 0) + (b.value ? d : 0);
|
|
2021
2020
|
}
|
|
2022
|
-
),
|
|
2021
|
+
), f = Y(() => {
|
|
2023
2022
|
var t;
|
|
2024
2023
|
return ((t = e.columnOption) == null ? void 0 : t.fitColumns) || !1;
|
|
2025
|
-
}),
|
|
2024
|
+
}), a = Y(() => {
|
|
2026
2025
|
var t;
|
|
2027
|
-
return
|
|
2026
|
+
return f.value ? ((t = e.columnOption) == null ? void 0 : t.fitMode) || "average" : "none";
|
|
2028
2027
|
});
|
|
2029
|
-
function
|
|
2028
|
+
function k(t, i, S) {
|
|
2030
2029
|
const L = parseInt(t.width, 10) / 100;
|
|
2031
2030
|
return S * L;
|
|
2032
2031
|
}
|
|
2033
2032
|
function s(t, i, S) {
|
|
2034
|
-
return typeof t.width == "string" ?
|
|
2033
|
+
return typeof t.width == "string" ? k(t, i, S) : t.actualWidth || t.width || r;
|
|
2035
2034
|
}
|
|
2036
2035
|
function p(t, i) {
|
|
2037
2036
|
t.value.primaryColumns.filter((S) => S.visible).forEach((S) => {
|
|
@@ -2046,36 +2045,36 @@ function zr(e, n, l, a, _) {
|
|
|
2046
2045
|
});
|
|
2047
2046
|
const B = i * (S.length / t.value.primaryColumns.filter((X) => X.visible).length);
|
|
2048
2047
|
S.forEach((X) => {
|
|
2049
|
-
const
|
|
2050
|
-
X.actualWidth =
|
|
2048
|
+
const V = B * (X.actualWidth / A);
|
|
2049
|
+
X.actualWidth = V, t.value.primaryColumnsWidth += X.actualWidth;
|
|
2051
2050
|
});
|
|
2052
2051
|
const q = i - B;
|
|
2053
2052
|
L.forEach((X) => {
|
|
2054
|
-
const
|
|
2055
|
-
X.actualWidth =
|
|
2053
|
+
const V = k(X, t.value, q);
|
|
2054
|
+
X.actualWidth = V, t.value.primaryColumnsWidth += X.actualWidth;
|
|
2056
2055
|
});
|
|
2057
2056
|
}
|
|
2058
2057
|
function T(t, i) {
|
|
2059
|
-
const S = t.value.primaryColumns.find((
|
|
2060
|
-
B.forEach((
|
|
2061
|
-
|
|
2058
|
+
const S = t.value.primaryColumns.find((V) => V.dataType === lt), L = t.value.primaryColumns.find((V) => V.dataType === Xe), B = t.value.primaryColumns.filter((V) => V.dataType !== lt && V.dataType !== Xe).filter((V) => V.visible), q = ((S == null ? void 0 : S.actualWidth) || 0) + ((L == null ? void 0 : L.actualWidth) || 0), X = (i - q) / (B.length || 1);
|
|
2059
|
+
B.forEach((V) => {
|
|
2060
|
+
V.actualWidth = X, t.value.primaryColumnsWidth += V.actualWidth;
|
|
2062
2061
|
}), (S || L) && (t.value.primaryColumnsWidth += q);
|
|
2063
2062
|
}
|
|
2064
2063
|
function c(t, i) {
|
|
2065
2064
|
const S = [], L = [], A = /* @__PURE__ */ new WeakMap();
|
|
2066
2065
|
let B = 0, q = 0;
|
|
2067
|
-
if (t.value.primaryColumns.filter((
|
|
2068
|
-
if (typeof
|
|
2069
|
-
const j =
|
|
2070
|
-
A.set(
|
|
2066
|
+
if (t.value.primaryColumns.filter((V) => V.visible).forEach((V) => {
|
|
2067
|
+
if (typeof V.width == "string") {
|
|
2068
|
+
const j = k(V, t.value, i);
|
|
2069
|
+
A.set(V, j), B += j, L.push(V);
|
|
2071
2070
|
} else
|
|
2072
|
-
|
|
2071
|
+
V.actualWidth = V.actualWidth || V.width || r, q += V.actualWidth, S.push(V);
|
|
2073
2072
|
}), i - B > q) {
|
|
2074
|
-
const
|
|
2073
|
+
const V = i - B;
|
|
2075
2074
|
L.forEach((j) => {
|
|
2076
2075
|
j.actualWidth = A.get(j) || r, t.value.primaryColumnsWidth += j.actualWidth;
|
|
2077
2076
|
}), S.forEach((j) => {
|
|
2078
|
-
j.actualWidth =
|
|
2077
|
+
j.actualWidth = V * (j.actualWidth / q), t.value.primaryColumnsWidth += j.actualWidth;
|
|
2079
2078
|
});
|
|
2080
2079
|
} else
|
|
2081
2080
|
p(t, i);
|
|
@@ -2105,31 +2104,31 @@ function zr(e, n, l, a, _) {
|
|
|
2105
2104
|
t.value.rightColumns.filter((Q) => Q.visible).forEach((Q) => {
|
|
2106
2105
|
Q.actualWidth = s(Q, t.value, i), L += Q.actualWidth;
|
|
2107
2106
|
});
|
|
2108
|
-
const q = S - L, X = g[
|
|
2107
|
+
const q = S - L, X = g[a.value];
|
|
2109
2108
|
if (X && X(t, q), t.value.primaryColumnsWidth + L <= S)
|
|
2110
2109
|
return t.value.primaryColumns = [...A, ...B], t.value.primaryColumnsWidth += L, t.value.rightColumns = [], t.value.rightColumnsWidth = 0, !0;
|
|
2111
|
-
const
|
|
2112
|
-
return
|
|
2110
|
+
const V = /* @__PURE__ */ new Map();
|
|
2111
|
+
return V.set("primary", []), V.set("right", []), t.value.primaryColumns.reduce((Q, M) => {
|
|
2113
2112
|
var U, C;
|
|
2114
|
-
return
|
|
2115
|
-
},
|
|
2113
|
+
return M.fixed === "right" ? (U = Q.get("right")) == null || U.push(M) : (C = Q.get("primary")) == null || C.push(M), Q;
|
|
2114
|
+
}, V), (j = V.get("right")) != null && j.length && (t.value.primaryColumns = [...V.get("primary") || []], t.value.rightColumns = [...V.get("right") || []]), t.value.primaryColumnsWidth = 0, t.value.rightColumnsWidth = 0, !1;
|
|
2116
2115
|
}
|
|
2117
2116
|
function w() {
|
|
2118
2117
|
if (l.value) {
|
|
2119
2118
|
n.value.leftColumnsWidth = 0, n.value.primaryColumnsWidth = 0, n.value.rightColumnsWidth = 0;
|
|
2120
|
-
const t = l.value.clientWidth -
|
|
2119
|
+
const t = l.value.clientWidth - v.value;
|
|
2121
2120
|
n.value.leftColumns.filter((S) => S.visible).forEach((S) => {
|
|
2122
2121
|
S.actualWidth = s(S, n.value, t), n.value.leftColumnsWidth += S.actualWidth;
|
|
2123
2122
|
});
|
|
2124
2123
|
const i = t - n.value.leftColumnsWidth;
|
|
2125
2124
|
if (y(n, t, i))
|
|
2126
|
-
|
|
2125
|
+
o.value = i;
|
|
2127
2126
|
else {
|
|
2128
2127
|
n.value.rightColumns.filter((A) => A.visible).forEach((A) => {
|
|
2129
2128
|
A.actualWidth = s(A, n.value, t), n.value.rightColumnsWidth += A.actualWidth;
|
|
2130
2129
|
});
|
|
2131
|
-
const S = t - n.value.leftColumnsWidth - n.value.rightColumnsWidth, L = g[
|
|
2132
|
-
L && L(n, S),
|
|
2130
|
+
const S = t - n.value.leftColumnsWidth - n.value.rightColumnsWidth, L = g[a.value];
|
|
2131
|
+
L && L(n, S), o.value = S;
|
|
2133
2132
|
}
|
|
2134
2133
|
O(n), n.value = Object.assign({}, n.value);
|
|
2135
2134
|
}
|
|
@@ -2139,38 +2138,38 @@ function zr(e, n, l, a, _) {
|
|
|
2139
2138
|
return (t = e.columnOption) == null ? void 0 : t.fitColumns;
|
|
2140
2139
|
}, (t, i) => {
|
|
2141
2140
|
t !== i && t && w();
|
|
2142
|
-
}), pe(
|
|
2143
|
-
t !== i &&
|
|
2141
|
+
}), pe(a, (t, i) => {
|
|
2142
|
+
t !== i && f.value && w();
|
|
2144
2143
|
}), { calculateColumnHeaders: O, calculateColumnsSize: w, calculateColumnsWidth: m };
|
|
2145
2144
|
}
|
|
2146
2145
|
function $r(e, n) {
|
|
2147
2146
|
var b;
|
|
2148
2147
|
const l = G((b = e.columnOption) == null ? void 0 : b.groups);
|
|
2149
|
-
function
|
|
2148
|
+
function o(v, f, a, k, s) {
|
|
2150
2149
|
const p = {
|
|
2151
2150
|
actualWidth: 0,
|
|
2152
2151
|
children: [],
|
|
2153
2152
|
depth: 1,
|
|
2154
|
-
field:
|
|
2153
|
+
field: v.field,
|
|
2155
2154
|
layer: 1,
|
|
2156
2155
|
left: 0,
|
|
2157
|
-
parent:
|
|
2156
|
+
parent: a,
|
|
2158
2157
|
resizable: !0,
|
|
2159
|
-
title:
|
|
2158
|
+
title: v.title || "",
|
|
2160
2159
|
status: D.none,
|
|
2161
2160
|
popoverRef: G(),
|
|
2162
2161
|
showPopover: !1,
|
|
2163
2162
|
column: null,
|
|
2164
2163
|
sortType: "none"
|
|
2165
|
-
}, x =
|
|
2166
|
-
if (
|
|
2164
|
+
}, x = k || p;
|
|
2165
|
+
if (v.group) {
|
|
2167
2166
|
let T = 1;
|
|
2168
|
-
|
|
2167
|
+
v.group.reduce((c, g) => {
|
|
2169
2168
|
if (typeof g == "string") {
|
|
2170
|
-
const O =
|
|
2169
|
+
const O = f.get(g);
|
|
2171
2170
|
O && (s.fieldToRootMap.set(g, x), c.actualWidth += O.actualWidth, c.children.push(O));
|
|
2172
2171
|
} else {
|
|
2173
|
-
const O =
|
|
2172
|
+
const O = o(g, f, c, x, s);
|
|
2174
2173
|
T = Math.max(T, O.depth), c.actualWidth += O.actualWidth, c.children.push(O);
|
|
2175
2174
|
}
|
|
2176
2175
|
return c;
|
|
@@ -2178,49 +2177,49 @@ function $r(e, n) {
|
|
|
2178
2177
|
}
|
|
2179
2178
|
return n.value.headerDepth = Math.max(n.value.headerDepth, p.depth), p;
|
|
2180
2179
|
}
|
|
2181
|
-
function _(
|
|
2182
|
-
const
|
|
2180
|
+
function _(v) {
|
|
2181
|
+
const f = {
|
|
2183
2182
|
groupedCells: /* @__PURE__ */ new Map(),
|
|
2184
2183
|
fieldToRootMap: /* @__PURE__ */ new Map()
|
|
2185
2184
|
};
|
|
2186
|
-
return l.value && l.value.reduce((
|
|
2187
|
-
const s =
|
|
2188
|
-
return
|
|
2189
|
-
},
|
|
2185
|
+
return l.value && l.value.reduce((a, k) => {
|
|
2186
|
+
const s = o(k, v, null, null, f);
|
|
2187
|
+
return a.groupedCells.set(k.field, s), a;
|
|
2188
|
+
}, f), f;
|
|
2190
2189
|
}
|
|
2191
|
-
function h(
|
|
2192
|
-
if (!
|
|
2190
|
+
function h(v) {
|
|
2191
|
+
if (!v || v.length === 0)
|
|
2193
2192
|
return 0;
|
|
2194
|
-
const
|
|
2195
|
-
return
|
|
2196
|
-
}
|
|
2197
|
-
function r(
|
|
2198
|
-
const
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
const s =
|
|
2202
|
-
|
|
2193
|
+
const f = v[0];
|
|
2194
|
+
return f.children && f.children.length > 0 && (f.left = h(f.children)), f.left;
|
|
2195
|
+
}
|
|
2196
|
+
function r(v, f) {
|
|
2197
|
+
const a = n.value.headerDepth;
|
|
2198
|
+
v.forEach((k) => {
|
|
2199
|
+
k.layer = f ? f.layer + 1 : 1;
|
|
2200
|
+
const s = k.children && k.children.length === 0;
|
|
2201
|
+
k.depth = s ? a - (k.layer - 1) : 1, k.left = s ? k.left : h(k.children), k.children && r(k.children, k);
|
|
2203
2202
|
});
|
|
2204
2203
|
}
|
|
2205
|
-
function d(
|
|
2206
|
-
const
|
|
2207
|
-
return
|
|
2208
|
-
const s =
|
|
2209
|
-
p && !
|
|
2210
|
-
}), r(Array.from(
|
|
2204
|
+
function d(v, f) {
|
|
2205
|
+
const a = /* @__PURE__ */ new Map();
|
|
2206
|
+
return v.forEach((k) => {
|
|
2207
|
+
const s = f.fieldToRootMap.get(k.field), p = s != null;
|
|
2208
|
+
p && !a.has(s.field) && a.set(s.field, s), p || a.set(k.field, k);
|
|
2209
|
+
}), r(Array.from(a.values())), a;
|
|
2211
2210
|
}
|
|
2212
|
-
function u(
|
|
2213
|
-
let
|
|
2214
|
-
if (
|
|
2211
|
+
function u(v) {
|
|
2212
|
+
let f = /* @__PURE__ */ new Map(), a = 0;
|
|
2213
|
+
if (v.reduce((k, s) => {
|
|
2215
2214
|
let p = D.none;
|
|
2216
2215
|
p = s.sortable ? p | D.sortable : p, p = s.filterable ? p | D.filterable : p, p = s.sort && s.sort !== "none" ? p | D.sorted | (s.sort === "asc" ? D.ascending : D.descending) : p;
|
|
2217
2216
|
const x = s.field;
|
|
2218
|
-
return
|
|
2217
|
+
return k.set(x, {
|
|
2219
2218
|
actualWidth: s.actualWidth || 0,
|
|
2220
2219
|
children: [],
|
|
2221
2220
|
depth: 1,
|
|
2222
2221
|
layer: 1,
|
|
2223
|
-
left:
|
|
2222
|
+
left: a,
|
|
2224
2223
|
field: x,
|
|
2225
2224
|
parent: null,
|
|
2226
2225
|
resizable: s.resizable === void 0 ? !0 : s.resizable,
|
|
@@ -2233,62 +2232,62 @@ function $r(e, n) {
|
|
|
2233
2232
|
sortType: s.sort || "none",
|
|
2234
2233
|
showSetting: s.showSetting,
|
|
2235
2234
|
draggable: s.draggable
|
|
2236
|
-
}),
|
|
2237
|
-
},
|
|
2238
|
-
const
|
|
2239
|
-
|
|
2235
|
+
}), a += s.actualWidth || 0, k;
|
|
2236
|
+
}, f), l.value) {
|
|
2237
|
+
const k = _(f);
|
|
2238
|
+
f = d(f, k);
|
|
2240
2239
|
}
|
|
2241
|
-
return
|
|
2240
|
+
return f;
|
|
2242
2241
|
}
|
|
2243
2242
|
return { getGridHeaderCells: u };
|
|
2244
2243
|
}
|
|
2245
2244
|
function Pn(e, n) {
|
|
2246
2245
|
var m;
|
|
2247
|
-
const { sum: l, toFixed:
|
|
2246
|
+
const { sum: l, toFixed: o } = pt(), { uuid: _ } = Pt(), { idField: h } = n, r = G(e.summary), d = G(e.group), u = G(((m = e.group) == null ? void 0 : m.groupFields) || []), b = Y(() => {
|
|
2248
2247
|
var y;
|
|
2249
2248
|
return (y = e.group) == null ? void 0 : y.enable;
|
|
2250
|
-
}),
|
|
2249
|
+
}), v = Y(() => {
|
|
2251
2250
|
var y;
|
|
2252
2251
|
return (y = e.group) == null ? void 0 : y.showGroupPanel;
|
|
2253
|
-
}),
|
|
2252
|
+
}), f = Y(() => {
|
|
2254
2253
|
const y = r.value;
|
|
2255
2254
|
return (y == null ? void 0 : y.groupFields) || [];
|
|
2256
|
-
}),
|
|
2255
|
+
}), a = Y(() => {
|
|
2257
2256
|
const y = d.value;
|
|
2258
2257
|
return y && y.showSummary;
|
|
2259
|
-
}),
|
|
2258
|
+
}), k = G(0), s = /* @__PURE__ */ new Map();
|
|
2260
2259
|
let p = [];
|
|
2261
2260
|
function x(y, w, t, i, S) {
|
|
2262
2261
|
const L = i[t];
|
|
2263
2262
|
L && (w.reduce((A, B, q) => {
|
|
2264
2263
|
var j;
|
|
2265
2264
|
const X = B[L];
|
|
2266
|
-
let
|
|
2267
|
-
if (!
|
|
2268
|
-
const Q =
|
|
2269
|
-
|
|
2265
|
+
let V = A.get(X);
|
|
2266
|
+
if (!V) {
|
|
2267
|
+
const Q = f.value.reduce((M, U) => (M.set(U, 0), M), /* @__PURE__ */ new Map());
|
|
2268
|
+
V = {
|
|
2270
2269
|
field: L,
|
|
2271
2270
|
title: ((j = S.get(L)) == null ? void 0 : j.title) || L,
|
|
2272
2271
|
value: X,
|
|
2273
2272
|
layer: t,
|
|
2274
2273
|
details: [],
|
|
2275
2274
|
groupSummaries: Q
|
|
2276
|
-
}, A.set(X,
|
|
2275
|
+
}, A.set(X, V);
|
|
2277
2276
|
}
|
|
2278
|
-
return
|
|
2279
|
-
if (
|
|
2280
|
-
const
|
|
2281
|
-
|
|
2277
|
+
return f.value && f.value.forEach((Q) => {
|
|
2278
|
+
if (V) {
|
|
2279
|
+
const M = V.groupSummaries.get(Q) || 0;
|
|
2280
|
+
V.groupSummaries.set(
|
|
2282
2281
|
Q,
|
|
2283
|
-
l([
|
|
2282
|
+
l([M, _e(B, Q)])
|
|
2284
2283
|
);
|
|
2285
2284
|
}
|
|
2286
|
-
}),
|
|
2287
|
-
if (
|
|
2288
|
-
const
|
|
2289
|
-
|
|
2285
|
+
}), f.value && f.value.forEach((Q) => {
|
|
2286
|
+
if (V) {
|
|
2287
|
+
const M = V.groupSummaries.get(Q) || 0;
|
|
2288
|
+
V.groupSummaries.set(Q, o(M, 2));
|
|
2290
2289
|
}
|
|
2291
|
-
}),
|
|
2290
|
+
}), V.details.push(B), A;
|
|
2292
2291
|
}, y), t < i.length - 1 && y.forEach((A, B) => {
|
|
2293
2292
|
A.nestGroup = /* @__PURE__ */ new Map(), x(A.nestGroup, A.details, t + 1, i, S), A.details = [];
|
|
2294
2293
|
}));
|
|
@@ -2315,7 +2314,7 @@ function Pn(e, n) {
|
|
|
2315
2314
|
const A = c(i.nestGroup, S);
|
|
2316
2315
|
t.push(...A), L += A.length;
|
|
2317
2316
|
}
|
|
2318
|
-
if (i.details && i.details.length && (t.push(...i.details), L += i.details.length),
|
|
2317
|
+
if (i.details && i.details.length && (t.push(...i.details), L += i.details.length), a.value) {
|
|
2319
2318
|
const A = {
|
|
2320
2319
|
__fv_data_grid_group_field__: i.field,
|
|
2321
2320
|
__fv_data_grid_group_layer__: i.layer,
|
|
@@ -2343,18 +2342,18 @@ function Pn(e, n) {
|
|
|
2343
2342
|
"fv-grid-group-row-icon-collapse": y.collapse
|
|
2344
2343
|
};
|
|
2345
2344
|
}
|
|
2346
|
-
return { collpaseGroupIconClass: O, generateGroupData: g, groupFields: u, shouldGroupingData: b, showGroupPanel:
|
|
2345
|
+
return { collpaseGroupIconClass: O, generateGroupData: g, groupFields: u, shouldGroupingData: b, showGroupPanel: v, groupRowSize: k };
|
|
2347
2346
|
}
|
|
2348
2347
|
function Ft(e) {
|
|
2349
|
-
const n = "parent", l = "layer",
|
|
2350
|
-
Object.keys(
|
|
2351
|
-
}), u.push(
|
|
2348
|
+
const n = "parent", l = "layer", o = "hasChildren", _ = (r, d = 1, u = [], b = null) => (r = r || [], r.reduce((v, f) => (f.id = f.id || f.data[e.idField], f[n] = b, f[l] = d, f[o] = f[o] === void 0 ? !1 : f[o], f.data && Object.keys(f.data).forEach((a) => {
|
|
2349
|
+
Object.keys(f).includes(a) || (f[a] = f.data[a]);
|
|
2350
|
+
}), u.push(f), f.children && f.children.length && (f[o] = !0, _(f.children, d + 1, u, f.id)), v), u), u);
|
|
2352
2351
|
return { flatTreeData: _, isNestedTree: (r) => r.some((d) => Array.isArray(d.children)) };
|
|
2353
2352
|
}
|
|
2354
|
-
function Hn(e, n, l,
|
|
2355
|
-
const _ = G(0), h = G(!!e.hierarchy), { idField: r } =
|
|
2353
|
+
function Hn(e, n, l, o) {
|
|
2354
|
+
const _ = G(0), h = G(!!e.hierarchy), { idField: r } = o, { collapseField: d, hasChildrenField: u, parentIdField: b } = l, v = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), { flatTreeData: k, isNestedTree: s } = Ft(e);
|
|
2356
2355
|
function p(F, R) {
|
|
2357
|
-
|
|
2356
|
+
f.clear(), F.reduce((H, z) => {
|
|
2358
2357
|
const ie = z[b.value] !== void 0 ? z[b.value] : "";
|
|
2359
2358
|
if (ie && R.has(ie)) {
|
|
2360
2359
|
const fe = R.get(ie), ve = isNaN(Number(fe.__fv_layer__)) ? 1 : Number(fe.__fv_layer__);
|
|
@@ -2363,13 +2362,13 @@ function Hn(e, n, l, a) {
|
|
|
2363
2362
|
z.__fv_layer__ = 1;
|
|
2364
2363
|
const ue = H.has(ie) ? H.get(ie) : [];
|
|
2365
2364
|
return ue.push(z), H.set(ie, ue), H;
|
|
2366
|
-
},
|
|
2365
|
+
}, f);
|
|
2367
2366
|
}
|
|
2368
2367
|
function x(F) {
|
|
2369
|
-
|
|
2368
|
+
a.clear(), F.reduce((R, H) => {
|
|
2370
2369
|
const z = H[r.value];
|
|
2371
2370
|
return R.set(z, H), R;
|
|
2372
|
-
},
|
|
2371
|
+
}, a);
|
|
2373
2372
|
}
|
|
2374
2373
|
function T(F) {
|
|
2375
2374
|
F.forEach((R) => {
|
|
@@ -2391,7 +2390,7 @@ function Hn(e, n, l, a) {
|
|
|
2391
2390
|
function g(F) {
|
|
2392
2391
|
F.forEach((R) => {
|
|
2393
2392
|
const H = R.__fv_parents__;
|
|
2394
|
-
Array.from(H.keys()).map((z) =>
|
|
2393
|
+
Array.from(H.keys()).map((z) => a.get(z)).forEach((z) => {
|
|
2395
2394
|
z.__fv_children_index__.push(R.__fv_index__);
|
|
2396
2395
|
});
|
|
2397
2396
|
}), c(F);
|
|
@@ -2407,8 +2406,8 @@ function Hn(e, n, l, a) {
|
|
|
2407
2406
|
function y(F, R, H) {
|
|
2408
2407
|
Array.from(R.keys()).forEach((z) => {
|
|
2409
2408
|
R.get(z).reduce((ue, fe) => {
|
|
2410
|
-
const ve = fe[r.value], oe = F.get(fe[r.value]), he = F.get(z),
|
|
2411
|
-
return he &&
|
|
2409
|
+
const ve = fe[r.value], oe = F.get(fe[r.value]), he = F.get(z), Me = H.get(z);
|
|
2410
|
+
return he && Me && (he.children.set(ve, oe), he.children.set(ve, oe), oe.parentId = z, oe.parentIndex = he.index, oe.parents.set(z, he)), ue;
|
|
2412
2411
|
}, F);
|
|
2413
2412
|
});
|
|
2414
2413
|
}
|
|
@@ -2434,20 +2433,20 @@ function Hn(e, n, l, a) {
|
|
|
2434
2433
|
});
|
|
2435
2434
|
}
|
|
2436
2435
|
function S(F) {
|
|
2437
|
-
|
|
2436
|
+
v.clear(), F.forEach((R, H) => {
|
|
2438
2437
|
const z = R[r.value];
|
|
2439
|
-
|
|
2440
|
-
}), x(F), p(F,
|
|
2438
|
+
v.set(z, m(z, H));
|
|
2439
|
+
}), x(F), p(F, a), y(v, f, a), t(F, v), i(v);
|
|
2441
2440
|
}
|
|
2442
2441
|
function L(F) {
|
|
2443
|
-
const R = F[r.value], H =
|
|
2442
|
+
const R = F[r.value], H = v.get(R);
|
|
2444
2443
|
return H && H.children.size > 0;
|
|
2445
2444
|
}
|
|
2446
2445
|
function A(F) {
|
|
2447
2446
|
return F[u.value] && !L(F);
|
|
2448
2447
|
}
|
|
2449
2448
|
function B(F) {
|
|
2450
|
-
const R = F[r.value], H =
|
|
2449
|
+
const R = F[r.value], H = v.get(R);
|
|
2451
2450
|
return H && H.visibleInHierarchy;
|
|
2452
2451
|
}
|
|
2453
2452
|
function q() {
|
|
@@ -2455,30 +2454,30 @@ function Hn(e, n, l, a) {
|
|
|
2455
2454
|
}
|
|
2456
2455
|
function X(F, R) {
|
|
2457
2456
|
R.forEach((H) => {
|
|
2458
|
-
const z =
|
|
2457
|
+
const z = v.get(H[r.value]), ie = v.get(F), ue = a.get(F);
|
|
2459
2458
|
ie && ue && (z.visibleInHierarchy = !ue[d.value] && ie.visibleInHierarchy);
|
|
2460
2459
|
}), q();
|
|
2461
2460
|
}
|
|
2462
|
-
function
|
|
2463
|
-
if (
|
|
2464
|
-
const H =
|
|
2465
|
-
X(F, H), H.map((z) => z[r.value]).forEach((z) =>
|
|
2461
|
+
function V(F) {
|
|
2462
|
+
if (f.has(F)) {
|
|
2463
|
+
const H = f.get(F);
|
|
2464
|
+
X(F, H), H.map((z) => z[r.value]).forEach((z) => V(z));
|
|
2466
2465
|
}
|
|
2467
2466
|
}
|
|
2468
2467
|
function j(F) {
|
|
2469
2468
|
const R = F[r.value];
|
|
2470
|
-
|
|
2469
|
+
V(R);
|
|
2471
2470
|
}
|
|
2472
2471
|
function Q(F, R, H = 0) {
|
|
2473
2472
|
F.forEach((z) => {
|
|
2474
2473
|
const ie = A(z), ue = z.__fv_layer__ <= H, fe = R === "ToCollapse" ? z.__fv_layer__ <= H : !(z.__fv_layer__ <= H), ve = ue ? fe : z[d.value];
|
|
2475
2474
|
z[d.value] = ie || ve;
|
|
2476
2475
|
});
|
|
2477
|
-
for (const [z, ie] of
|
|
2476
|
+
for (const [z, ie] of f.entries())
|
|
2478
2477
|
X(z, ie);
|
|
2479
2478
|
return F;
|
|
2480
2479
|
}
|
|
2481
|
-
function
|
|
2480
|
+
function M(F, R) {
|
|
2482
2481
|
Q(F, "ToCollapse", R);
|
|
2483
2482
|
}
|
|
2484
2483
|
function U(F, R) {
|
|
@@ -2487,29 +2486,29 @@ function Hn(e, n, l, a) {
|
|
|
2487
2486
|
function C(F) {
|
|
2488
2487
|
F.forEach((R, H) => {
|
|
2489
2488
|
var fe;
|
|
2490
|
-
const z = R[r.value], ie =
|
|
2489
|
+
const z = R[r.value], ie = f.has(z) ? (fe = f.get(z)) == null ? void 0 : fe.map((ve) => ve.__fv_index__) : [], ue = m(z, H);
|
|
2491
2490
|
R.__fv_graph_node__ = ue, R.__fv_children_index__ = ie, R.__fv_descendant_index__ = [...ie], R.__fv_parents__ = /* @__PURE__ */ new Map(), A(R) && (R[d.value] = !0);
|
|
2492
2491
|
});
|
|
2493
2492
|
}
|
|
2494
|
-
function
|
|
2493
|
+
function N(F) {
|
|
2495
2494
|
var z, ie;
|
|
2496
2495
|
S(n.value), C(F), T(F), g(F), e.showLines && O(F);
|
|
2497
2496
|
const H = ((z = e.hierarchy) == null ? void 0 : z.collapseTo) !== void 0 ? Number((ie = e.hierarchy) == null ? void 0 : ie.collapseTo) : 0;
|
|
2498
2497
|
return Q(F, "ToCollapse", H), F;
|
|
2499
2498
|
}
|
|
2500
2499
|
function K(F, R, H) {
|
|
2501
|
-
const ie = H.value[F][r.value], ue =
|
|
2500
|
+
const ie = H.value[F][r.value], ue = v.get(ie);
|
|
2502
2501
|
if (ue) {
|
|
2503
|
-
const fe =
|
|
2502
|
+
const fe = v.get(ue.parentId);
|
|
2504
2503
|
let ve = H.value.length - 1;
|
|
2505
2504
|
if (fe) {
|
|
2506
2505
|
const oe = Array.from(fe.children.keys()).indexOf(ue.id);
|
|
2507
2506
|
if (oe === fe.children.size - 1) {
|
|
2508
|
-
const
|
|
2509
|
-
ve = H.value.findIndex((I) => I[r.value] ===
|
|
2507
|
+
const Me = Array.from(fe.descendant.values())[fe.descendant.size - 1];
|
|
2508
|
+
ve = H.value.findIndex((I) => I[r.value] === Me.id) + 1;
|
|
2510
2509
|
} else {
|
|
2511
|
-
const
|
|
2512
|
-
ve = H.value.findIndex((I) => I[r.value] ===
|
|
2510
|
+
const Me = Array.from(fe.children.values())[oe + 1];
|
|
2511
|
+
ve = H.value.findIndex((I) => I[r.value] === Me.id);
|
|
2513
2512
|
}
|
|
2514
2513
|
R[u.value] = !1, R[b.value] = fe.id, H.value.splice(ve, 0, R);
|
|
2515
2514
|
}
|
|
@@ -2517,25 +2516,25 @@ function Hn(e, n, l, a) {
|
|
|
2517
2516
|
}
|
|
2518
2517
|
function Z(F, R, H) {
|
|
2519
2518
|
const z = H.value[F], ie = z[r.value];
|
|
2520
|
-
if (
|
|
2519
|
+
if (v.get(ie)) {
|
|
2521
2520
|
const ve = H.value.findIndex((oe) => oe[r.value] === ie) + 1;
|
|
2522
2521
|
z[u.value] = !0, z[d.value] = !1, R[u.value] = !1, R[b.value] = ie, H.value.splice(ve, 0, R);
|
|
2523
2522
|
}
|
|
2524
2523
|
}
|
|
2525
2524
|
function ae(F, R, H) {
|
|
2526
2525
|
const ie = H.value[F][r.value];
|
|
2527
|
-
if (
|
|
2526
|
+
if (v.get(ie)) {
|
|
2528
2527
|
const ve = H.value.findIndex((he) => he[r.value] === ie) + 1;
|
|
2529
2528
|
let oe = R;
|
|
2530
|
-
s(R) && (oe =
|
|
2529
|
+
s(R) && (oe = k(R)), oe.forEach((he) => {
|
|
2531
2530
|
he[b.value] = ie;
|
|
2532
2531
|
}), H.value.splice(ve, 0, ...oe);
|
|
2533
2532
|
}
|
|
2534
2533
|
}
|
|
2535
2534
|
function E(F, R) {
|
|
2536
|
-
const H = F[r.value], z =
|
|
2535
|
+
const H = F[r.value], z = v.get(H), ie = Array.from(z.descendant.keys());
|
|
2537
2536
|
ie.unshift(H);
|
|
2538
|
-
const ue =
|
|
2537
|
+
const ue = v.get(z.parentId);
|
|
2539
2538
|
if (ue && (ue.children.delete(H), ue.children.size === 0)) {
|
|
2540
2539
|
const ve = R.find((oe) => oe[r.value] === z.parentId);
|
|
2541
2540
|
ve[u.value] = !1, ve[d.value] = !1;
|
|
@@ -2544,9 +2543,9 @@ function Hn(e, n, l, a) {
|
|
|
2544
2543
|
}
|
|
2545
2544
|
return {
|
|
2546
2545
|
checkVisibleInHierarchy: _,
|
|
2547
|
-
collapseTo:
|
|
2546
|
+
collapseTo: M,
|
|
2548
2547
|
expandTo: U,
|
|
2549
|
-
generateHierarchyData:
|
|
2548
|
+
generateHierarchyData: N,
|
|
2550
2549
|
hasRealChildren: L,
|
|
2551
2550
|
insertSibling: K,
|
|
2552
2551
|
insertChild: Z,
|
|
@@ -2557,8 +2556,8 @@ function Hn(e, n, l, a) {
|
|
|
2557
2556
|
trimmedOriginalData: E
|
|
2558
2557
|
};
|
|
2559
2558
|
}
|
|
2560
|
-
function Gr(e, n, l,
|
|
2561
|
-
const { toNumber: h, sum: r, toFixed: d } = pt(), u = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(),
|
|
2559
|
+
function Gr(e, n, l, o, _) {
|
|
2560
|
+
const { toNumber: h, sum: r, toFixed: d } = pt(), u = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), k = G([]), s = G([]), p = Pn(e, _), { generateGroupData: x, groupFields: T, shouldGroupingData: c } = p, g = G(e.data || []), O = Hn(e, g, o, _), {
|
|
2562
2561
|
collapseTo: m,
|
|
2563
2562
|
expandTo: y,
|
|
2564
2563
|
generateHierarchyData: w,
|
|
@@ -2570,10 +2569,10 @@ function Gr(e, n, l, a, _) {
|
|
|
2570
2569
|
shouldStratifyData: B,
|
|
2571
2570
|
toggleChildrenVisibiltyByCollapseStatus: q,
|
|
2572
2571
|
trimmedOriginalData: X,
|
|
2573
|
-
checkVisibleInHierarchy:
|
|
2574
|
-
} = O, { idField: j, reviseIdentifyField: Q } = _,
|
|
2572
|
+
checkVisibleInHierarchy: V
|
|
2573
|
+
} = O, { idField: j, reviseIdentifyField: Q } = _, M = G(e.newDataItem), U = G(e.data || []), C = G(e.data), { flatTreeData: N, isNestedTree: K } = Ft(e);
|
|
2575
2574
|
if (e.hierarchy && K(e.data)) {
|
|
2576
|
-
const $ =
|
|
2575
|
+
const $ = N(e.data);
|
|
2577
2576
|
g.value = $, U.value = $, C.value = $;
|
|
2578
2577
|
}
|
|
2579
2578
|
const Z = G(e.summary), ae = Y(() => {
|
|
@@ -2629,9 +2628,9 @@ function Gr(e, n, l, a, _) {
|
|
|
2629
2628
|
E.set(Ce, d(Te, 2));
|
|
2630
2629
|
}), C.value = [...De], De;
|
|
2631
2630
|
}
|
|
2632
|
-
const he = G(oe()),
|
|
2631
|
+
const he = G(oe()), Me = Y(() => (V.value, he.value.filter(($) => B.value ? $.__fv_visible__ !== !1 && A($) : $.__fv_visible__ !== !1)));
|
|
2633
2632
|
function Le() {
|
|
2634
|
-
|
|
2633
|
+
Me.value.forEach(($, te) => ($.__fv_visible_index__ = te, $));
|
|
2635
2634
|
}
|
|
2636
2635
|
function I($, te, ce = !1) {
|
|
2637
2636
|
var De;
|
|
@@ -2647,8 +2646,8 @@ function Gr(e, n, l, a, _) {
|
|
|
2647
2646
|
for (; dt === 0 && Te.length !== 0; ) {
|
|
2648
2647
|
const Ye = Te.shift();
|
|
2649
2648
|
if (Ye) {
|
|
2650
|
-
const Rt = _e(we, Ye.field) === void 0 || _e(we, Ye.field) === null ? "" : _e(we, Ye.field),
|
|
2651
|
-
dt = Ye.compare(Rt,
|
|
2649
|
+
const Rt = _e(we, Ye.field) === void 0 || _e(we, Ye.field) === null ? "" : _e(we, Ye.field), Vt = _e(Ce, Ye.field) === void 0 || _e(Ce, Ye.field) === null ? "" : _e(Ce, Ye.field);
|
|
2650
|
+
dt = Ye.compare(Rt, Vt);
|
|
2652
2651
|
}
|
|
2653
2652
|
}
|
|
2654
2653
|
return dt;
|
|
@@ -2662,34 +2661,34 @@ function Gr(e, n, l, a, _) {
|
|
|
2662
2661
|
}), he.value;
|
|
2663
2662
|
}
|
|
2664
2663
|
function ne($) {
|
|
2665
|
-
return
|
|
2664
|
+
return a.clear(), s.value = $, s.value.reduce((te, ce) => (te.set(ce.field, ce), te), a), I([], s.value);
|
|
2666
2665
|
}
|
|
2667
2666
|
function re($, te) {
|
|
2668
|
-
return
|
|
2667
|
+
return a.set($, te), s.value = Array.from(a.values()), I([], s.value);
|
|
2669
2668
|
}
|
|
2670
2669
|
function Se($) {
|
|
2671
|
-
return
|
|
2670
|
+
return a.delete($), s.value = Array.from(a.values()), I([], s.value);
|
|
2672
2671
|
}
|
|
2673
2672
|
function P($, te) {
|
|
2674
|
-
return b.set($, te),
|
|
2673
|
+
return b.set($, te), k.value = Array.from(b.values()), I([], Array.from(a.values()));
|
|
2675
2674
|
}
|
|
2676
2675
|
function ee($) {
|
|
2677
|
-
return b.delete($),
|
|
2676
|
+
return b.delete($), k.value = Array.from(b.values()), I([], Array.from(a.values()), !0);
|
|
2678
2677
|
}
|
|
2679
2678
|
function ye() {
|
|
2680
|
-
return b.clear(),
|
|
2679
|
+
return b.clear(), k.value = [], I([], Array.from(a.values()), !0);
|
|
2681
2680
|
}
|
|
2682
2681
|
function ke($, te, ce) {
|
|
2683
2682
|
const me = `group_of_${$}_${te}`;
|
|
2684
2683
|
u.set(me, !0);
|
|
2685
2684
|
const Ee = (We) => We[$] !== te;
|
|
2686
|
-
return
|
|
2685
|
+
return v.set(`collapse_${$}_${te}`, {
|
|
2687
2686
|
field: $,
|
|
2688
2687
|
fieldName: $,
|
|
2689
2688
|
fieldType: "string",
|
|
2690
2689
|
filterValue: te,
|
|
2691
2690
|
filter: Ee
|
|
2692
|
-
}), I(Array.from(
|
|
2691
|
+
}), I(Array.from(v.values()), Array.from(a.values()));
|
|
2693
2692
|
}
|
|
2694
2693
|
function be($) {
|
|
2695
2694
|
m(he.value, $);
|
|
@@ -2699,31 +2698,31 @@ function Gr(e, n, l, a, _) {
|
|
|
2699
2698
|
}
|
|
2700
2699
|
function Ue($, te, ce) {
|
|
2701
2700
|
const me = `group_of_${$}_${te}`;
|
|
2702
|
-
return u.set(me, !1),
|
|
2701
|
+
return u.set(me, !1), v.delete(`collapse_${$}_${te}`), I(Array.from(v.values()), Array.from(a.values()), !0);
|
|
2703
2702
|
}
|
|
2704
2703
|
function Je($) {
|
|
2705
2704
|
const te = $.raw[j.value], ce = (me) => !me.__fv_parents__.has(te);
|
|
2706
|
-
|
|
2705
|
+
f.set(`fold_${te}`, {
|
|
2707
2706
|
field: "id",
|
|
2708
2707
|
fieldName: "id",
|
|
2709
2708
|
fieldType: "string",
|
|
2710
2709
|
filterValue: String(te),
|
|
2711
2710
|
filter: ce
|
|
2712
|
-
}), I(Array.from(
|
|
2711
|
+
}), I(Array.from(f.values()), Array.from(a.values())), w(he.value);
|
|
2713
2712
|
}
|
|
2714
2713
|
function Ze($) {
|
|
2715
2714
|
const te = $[j.value];
|
|
2716
|
-
|
|
2715
|
+
f.delete(`fold_${te}`);
|
|
2717
2716
|
}
|
|
2718
2717
|
function se($) {
|
|
2719
|
-
Ze($.raw), I(Array.from(
|
|
2718
|
+
Ze($.raw), I(Array.from(f.values()), Array.from(a.values()), !0), w(he.value);
|
|
2720
2719
|
}
|
|
2721
2720
|
function ge() {
|
|
2722
2721
|
const $ = oe();
|
|
2723
|
-
he.value = $, I(Array.from(
|
|
2722
|
+
he.value = $, I(Array.from(f.values()), Array.from(a.values())), e.hierarchy && w(he.value);
|
|
2724
2723
|
}
|
|
2725
2724
|
function Ne($) {
|
|
2726
|
-
const ce = e.hierarchy && K($) ?
|
|
2725
|
+
const ce = e.hierarchy && K($) ? N($) : $;
|
|
2727
2726
|
g.value = ce, ge();
|
|
2728
2727
|
}
|
|
2729
2728
|
function Fe($, te, ce) {
|
|
@@ -2739,13 +2738,13 @@ function Gr(e, n, l, a, _) {
|
|
|
2739
2738
|
function Qe($ = 0) {
|
|
2740
2739
|
if (!($ > -1))
|
|
2741
2740
|
return !1;
|
|
2742
|
-
const ce =
|
|
2741
|
+
const ce = M.value();
|
|
2743
2742
|
e.hierarchy ? i($, ce, g) : g.value.splice($, 0, ce), ge();
|
|
2744
2743
|
}
|
|
2745
2744
|
function J($ = 0) {
|
|
2746
2745
|
if (!($ > -1 && e.hierarchy))
|
|
2747
2746
|
return !1;
|
|
2748
|
-
const ce =
|
|
2747
|
+
const ce = M.value(), me = g.value[$];
|
|
2749
2748
|
Ze(me), S($, ce, g), ge();
|
|
2750
2749
|
}
|
|
2751
2750
|
function le($, te = 0) {
|
|
@@ -2769,8 +2768,8 @@ function Gr(e, n, l, a, _) {
|
|
|
2769
2768
|
g.value = X(te, g.value), ge();
|
|
2770
2769
|
}
|
|
2771
2770
|
function Ae() {
|
|
2772
|
-
const $ =
|
|
2773
|
-
return I($, Array.from(
|
|
2771
|
+
const $ = v.size > 0 ? Array.from(v.values()) : [];
|
|
2772
|
+
return I($, Array.from(a.values()));
|
|
2774
2773
|
}
|
|
2775
2774
|
function je($) {
|
|
2776
2775
|
R.value.size = $;
|
|
@@ -2831,7 +2830,7 @@ function Gr(e, n, l, a, _) {
|
|
|
2831
2830
|
editDataItem: it,
|
|
2832
2831
|
expand: Ue,
|
|
2833
2832
|
expandTo: Ge,
|
|
2834
|
-
filters:
|
|
2833
|
+
filters: k,
|
|
2835
2834
|
fold: Je,
|
|
2836
2835
|
getRange: Fe,
|
|
2837
2836
|
getSelectionItems: et,
|
|
@@ -2860,7 +2859,7 @@ function Gr(e, n, l, a, _) {
|
|
|
2860
2859
|
totalItems: F,
|
|
2861
2860
|
unFold: se,
|
|
2862
2861
|
updateDataView: ge,
|
|
2863
|
-
visibleDataItems:
|
|
2862
|
+
visibleDataItems: Me,
|
|
2864
2863
|
shouldGroupingData: c,
|
|
2865
2864
|
pagination: R,
|
|
2866
2865
|
updateVisibleDataSummary: Et
|
|
@@ -2888,8 +2887,8 @@ const Wn = [
|
|
|
2888
2887
|
equal: (e, n, l) => e && e[n] === l,
|
|
2889
2888
|
in: (e, n, l) => {
|
|
2890
2889
|
if (e) {
|
|
2891
|
-
const
|
|
2892
|
-
return l.indexOf(
|
|
2890
|
+
const o = e[n];
|
|
2891
|
+
return l.indexOf(o) > -1;
|
|
2893
2892
|
}
|
|
2894
2893
|
return !1;
|
|
2895
2894
|
},
|
|
@@ -2897,43 +2896,43 @@ const Wn = [
|
|
|
2897
2896
|
}, jn = {
|
|
2898
2897
|
equal: (e, n, l) => {
|
|
2899
2898
|
if (e) {
|
|
2900
|
-
const
|
|
2901
|
-
return new Date(e[n]).getTime() ===
|
|
2899
|
+
const o = new Date(l).getTime();
|
|
2900
|
+
return new Date(e[n]).getTime() === o;
|
|
2902
2901
|
}
|
|
2903
2902
|
return !1;
|
|
2904
2903
|
},
|
|
2905
2904
|
notEqual: (e, n, l) => {
|
|
2906
2905
|
if (e) {
|
|
2907
|
-
const
|
|
2908
|
-
return new Date(e[n]).getTime() !==
|
|
2906
|
+
const o = new Date(l).getTime();
|
|
2907
|
+
return new Date(e[n]).getTime() !== o;
|
|
2909
2908
|
}
|
|
2910
2909
|
return !1;
|
|
2911
2910
|
},
|
|
2912
2911
|
greaterThan: (e, n, l) => {
|
|
2913
2912
|
if (e) {
|
|
2914
|
-
const
|
|
2915
|
-
return new Date(new Date(e[n]).toLocaleDateString()).valueOf() >
|
|
2913
|
+
const o = new Date(new Date(l).toLocaleDateString()).valueOf();
|
|
2914
|
+
return new Date(new Date(e[n]).toLocaleDateString()).valueOf() > o;
|
|
2916
2915
|
}
|
|
2917
2916
|
return !1;
|
|
2918
2917
|
},
|
|
2919
2918
|
greaterThanOrEqual: (e, n, l) => {
|
|
2920
2919
|
if (e) {
|
|
2921
|
-
const
|
|
2922
|
-
return new Date(new Date(e[n]).toLocaleDateString()).valueOf() >=
|
|
2920
|
+
const o = new Date(new Date(l).toLocaleDateString()).valueOf();
|
|
2921
|
+
return new Date(new Date(e[n]).toLocaleDateString()).valueOf() >= o;
|
|
2923
2922
|
}
|
|
2924
2923
|
return !1;
|
|
2925
2924
|
},
|
|
2926
2925
|
lessThan: (e, n, l) => {
|
|
2927
2926
|
if (e) {
|
|
2928
|
-
const
|
|
2929
|
-
return new Date(new Date(e[n]).toLocaleDateString()).valueOf() <
|
|
2927
|
+
const o = new Date(new Date(l).toLocaleDateString()).valueOf();
|
|
2928
|
+
return new Date(new Date(e[n]).toLocaleDateString()).valueOf() < o;
|
|
2930
2929
|
}
|
|
2931
2930
|
return !1;
|
|
2932
2931
|
},
|
|
2933
2932
|
lessThanOrEqual: (e, n, l) => {
|
|
2934
2933
|
if (e) {
|
|
2935
|
-
const
|
|
2936
|
-
return new Date(new Date(e[n]).toLocaleDateString()).valueOf() <=
|
|
2934
|
+
const o = new Date(new Date(l).toLocaleDateString()).valueOf();
|
|
2935
|
+
return new Date(new Date(e[n]).toLocaleDateString()).valueOf() <= o;
|
|
2937
2936
|
}
|
|
2938
2937
|
return !1;
|
|
2939
2938
|
}
|
|
@@ -2941,8 +2940,8 @@ const Wn = [
|
|
|
2941
2940
|
equal: (e, n, l) => e ? String(l).split(",").includes(String(e[n])) : !1,
|
|
2942
2941
|
in: (e, n, l) => {
|
|
2943
2942
|
if (e) {
|
|
2944
|
-
const
|
|
2945
|
-
return l.indexOf(
|
|
2943
|
+
const o = e[n];
|
|
2944
|
+
return l.indexOf(o) > -1;
|
|
2946
2945
|
}
|
|
2947
2946
|
return !1;
|
|
2948
2947
|
},
|
|
@@ -2950,43 +2949,43 @@ const Wn = [
|
|
|
2950
2949
|
}, zn = {
|
|
2951
2950
|
equal: (e, n, l) => {
|
|
2952
2951
|
if (e) {
|
|
2953
|
-
const
|
|
2954
|
-
return isNaN(
|
|
2952
|
+
const o = Number.parseFloat(String(l)), _ = Number.parseFloat(String(e[n]));
|
|
2953
|
+
return isNaN(o) ? isNaN(_) : o === _;
|
|
2955
2954
|
}
|
|
2956
2955
|
return !1;
|
|
2957
2956
|
},
|
|
2958
2957
|
notEqual: (e, n, l) => {
|
|
2959
2958
|
if (e) {
|
|
2960
|
-
const
|
|
2961
|
-
return isNaN(
|
|
2959
|
+
const o = Number.parseFloat(String(l)), _ = Number.parseFloat(String(e[n]));
|
|
2960
|
+
return isNaN(o) ? !0 : o !== _;
|
|
2962
2961
|
}
|
|
2963
2962
|
return !1;
|
|
2964
2963
|
},
|
|
2965
2964
|
greaterThan: (e, n, l) => {
|
|
2966
2965
|
if (e) {
|
|
2967
|
-
const
|
|
2968
|
-
return isNaN(
|
|
2966
|
+
const o = Number.parseFloat(String(l)), _ = Number.parseFloat(String(e[n]));
|
|
2967
|
+
return isNaN(o) ? isNaN(_) : _ > o;
|
|
2969
2968
|
}
|
|
2970
2969
|
return !1;
|
|
2971
2970
|
},
|
|
2972
2971
|
greaterThanOrEqual: (e, n, l) => {
|
|
2973
2972
|
if (e) {
|
|
2974
|
-
const
|
|
2975
|
-
return isNaN(
|
|
2973
|
+
const o = Number.parseFloat(String(l)), _ = Number.parseFloat(String(e[n]));
|
|
2974
|
+
return isNaN(o) ? isNaN(_) : _ >= o;
|
|
2976
2975
|
}
|
|
2977
2976
|
return !1;
|
|
2978
2977
|
},
|
|
2979
2978
|
lessThan: (e, n, l) => {
|
|
2980
2979
|
if (e) {
|
|
2981
|
-
const
|
|
2982
|
-
return isNaN(
|
|
2980
|
+
const o = Number.parseFloat(String(l)), _ = Number.parseFloat(String(e[n]));
|
|
2981
|
+
return isNaN(o) ? isNaN(_) : _ < o;
|
|
2983
2982
|
}
|
|
2984
2983
|
return !1;
|
|
2985
2984
|
},
|
|
2986
2985
|
lessThanOrEqual: (e, n, l) => {
|
|
2987
2986
|
if (e) {
|
|
2988
|
-
const
|
|
2989
|
-
return isNaN(
|
|
2987
|
+
const o = Number.parseFloat(String(l)), _ = Number.parseFloat(String(e[n]));
|
|
2988
|
+
return isNaN(o) ? isNaN(_) : _ <= o;
|
|
2990
2989
|
}
|
|
2991
2990
|
return !1;
|
|
2992
2991
|
}
|
|
@@ -2998,7 +2997,7 @@ const Wn = [
|
|
|
2998
2997
|
["text", Ln]
|
|
2999
2998
|
]);
|
|
3000
2999
|
function Ur(e, n) {
|
|
3001
|
-
const l = G([]),
|
|
3000
|
+
const l = G([]), o = /* @__PURE__ */ new Map(), { loadConditionGroup: _ } = Jt();
|
|
3002
3001
|
function h(O, m) {
|
|
3003
3002
|
switch (O) {
|
|
3004
3003
|
case "check-box":
|
|
@@ -3104,20 +3103,20 @@ function Ur(e, n) {
|
|
|
3104
3103
|
const m = O.dataType || "string";
|
|
3105
3104
|
return ((y = O.editor) == null ? void 0 : y.type) || r.get(m) || "text";
|
|
3106
3105
|
}
|
|
3107
|
-
function f(O) {
|
|
3108
|
-
var q, X, M, j, Q;
|
|
3109
|
-
const m = `field_filter_${O.field}`, y = Date.now(), w = O.field, t = ((q = O.column) == null ? void 0 : q.title) || "", i = ((X = O.column) == null ? void 0 : X.dataType) || "string", S = d.get(i) || He.Equal, L = ((j = (M = O.column) == null ? void 0 : M.editor) == null ? void 0 : j.type) || r.get(i) || "text", A = h(L, (Q = O.column) == null ? void 0 : Q.filter), B = L === "lookup" || L === "combo-lookup" ? nt.SmartHelp : L === "combo-list" ? nt.Enum : nt.Value;
|
|
3110
|
-
a.set(m, { id: m, fieldCode: w, fieldName: t, compareType: S, valueType: B, value: A, conditionId: y, relation: 1 }), l.value = Array.from(a.values());
|
|
3111
|
-
}
|
|
3112
3106
|
function v(O) {
|
|
3107
|
+
var q, X, V, j, Q;
|
|
3108
|
+
const m = `field_filter_${O.field}`, y = Date.now(), w = O.field, t = ((q = O.column) == null ? void 0 : q.title) || "", i = ((X = O.column) == null ? void 0 : X.dataType) || "string", S = d.get(i) || He.Equal, L = ((j = (V = O.column) == null ? void 0 : V.editor) == null ? void 0 : j.type) || r.get(i) || "text", A = h(L, (Q = O.column) == null ? void 0 : Q.filter), B = L === "lookup" || L === "combo-lookup" ? nt.SmartHelp : L === "combo-list" ? nt.Enum : nt.Value;
|
|
3109
|
+
o.set(m, { id: m, fieldCode: w, fieldName: t, compareType: S, valueType: B, value: A, conditionId: y, relation: 1 }), l.value = Array.from(o.values());
|
|
3110
|
+
}
|
|
3111
|
+
function f(O) {
|
|
3113
3112
|
const m = `field_filter_${O.field}`;
|
|
3114
|
-
|
|
3113
|
+
o.delete(m), l.value = Array.from(o.values());
|
|
3115
3114
|
}
|
|
3116
|
-
function
|
|
3117
|
-
|
|
3115
|
+
function a(O) {
|
|
3116
|
+
o.delete(O), l.value = Array.from(o.values());
|
|
3118
3117
|
}
|
|
3119
|
-
function
|
|
3120
|
-
|
|
3118
|
+
function k() {
|
|
3119
|
+
o.clear(), l.value = [];
|
|
3121
3120
|
}
|
|
3122
3121
|
function s(O) {
|
|
3123
3122
|
const { valueType: m } = O.value, y = O.compareType || "0", w = Wn[Number(y)];
|
|
@@ -3146,13 +3145,13 @@ function Ur(e, n) {
|
|
|
3146
3145
|
n.emit("filterChanged", O);
|
|
3147
3146
|
}
|
|
3148
3147
|
return {
|
|
3149
|
-
addColumnFilter:
|
|
3148
|
+
addColumnFilter: v,
|
|
3150
3149
|
apply: c,
|
|
3151
|
-
clearCondition:
|
|
3150
|
+
clearCondition: k,
|
|
3152
3151
|
conditions: l,
|
|
3153
3152
|
getFilterEditorType: b,
|
|
3154
|
-
removeColumnFilter:
|
|
3155
|
-
removeCondition:
|
|
3153
|
+
removeColumnFilter: f,
|
|
3154
|
+
removeCondition: a,
|
|
3156
3155
|
filterFromServer: g,
|
|
3157
3156
|
createFilterConditions: u
|
|
3158
3157
|
};
|
|
@@ -3165,21 +3164,21 @@ function Kr() {
|
|
|
3165
3164
|
const d = n(r), u = localStorage.getItem(d);
|
|
3166
3165
|
return u ? JSON.parse(u) : [];
|
|
3167
3166
|
}
|
|
3168
|
-
function
|
|
3167
|
+
function o(r, d) {
|
|
3169
3168
|
const u = n(r);
|
|
3170
3169
|
localStorage.setItem(u, JSON.stringify(d));
|
|
3171
3170
|
}
|
|
3172
3171
|
function _(r, d) {
|
|
3173
3172
|
if (!d)
|
|
3174
3173
|
return;
|
|
3175
|
-
const u = l(r),
|
|
3176
|
-
|
|
3174
|
+
const u = l(r), v = [u.find((f) => f.name === d) || { id: Date.now(), name: d, selectable: !0 }, ...u.filter((f) => f.name !== d)];
|
|
3175
|
+
v.length > 5 && (v.length = 5), o(r, v);
|
|
3177
3176
|
}
|
|
3178
3177
|
function h(r, d) {
|
|
3179
|
-
const b = [...l(r).filter((
|
|
3180
|
-
localStorage.setItem(
|
|
3178
|
+
const b = [...l(r).filter((f) => f.name !== d)], v = n(r);
|
|
3179
|
+
localStorage.setItem(v, JSON.stringify(b));
|
|
3181
3180
|
}
|
|
3182
|
-
return { getFilterHistory: l, removeFilterHistory: h, setFilterHistory:
|
|
3181
|
+
return { getFilterHistory: l, removeFilterHistory: h, setFilterHistory: o, updateFilterHistory: _ };
|
|
3183
3182
|
}
|
|
3184
3183
|
function qr(e) {
|
|
3185
3184
|
G(e.selection.showCheckbox || !1);
|
|
@@ -3189,26 +3188,26 @@ function qr(e) {
|
|
|
3189
3188
|
}), l = Y(() => {
|
|
3190
3189
|
var r;
|
|
3191
3190
|
return ((r = e.hierarchy) == null ? void 0 : r.hasChildrenField) || "__fv_hasChildren__";
|
|
3192
|
-
}),
|
|
3191
|
+
}), o = Y(() => {
|
|
3193
3192
|
var r;
|
|
3194
3193
|
return ((r = e.hierarchy) == null ? void 0 : r.parentIdField) || "parent";
|
|
3195
3194
|
}), _ = Y(() => e.hierarchy && e.selection.showCheckbox), h = Y(() => (e.treeNodeIconsData.fold || e.iconField) && e.showTreeNodeIcons);
|
|
3196
|
-
return { collapseField: n, hasChildrenField: l, parentIdField:
|
|
3195
|
+
return { collapseField: n, hasChildrenField: l, parentIdField: o, shouldShowCheckBox: _, shouldShowIcon: h };
|
|
3197
3196
|
}
|
|
3198
|
-
function Gn(e, n, l,
|
|
3197
|
+
function Gn(e, n, l, o, _) {
|
|
3199
3198
|
var c, g, O, m, y, w;
|
|
3200
|
-
const { getDifference: h, isBInA: r } = _t(), { dataView: d, visibleDataItems: u } = l, { idField: b } =
|
|
3199
|
+
const { getDifference: h, isBInA: r } = _t(), { dataView: d, visibleDataItems: u } = l, { idField: b } = o, v = G(((g = (c = e.hierarchy) == null ? void 0 : c.cascadeOption) == null ? void 0 : g.autoCheckChildren) || !1), f = G(((m = (O = e.hierarchy) == null ? void 0 : O.cascadeOption) == null ? void 0 : m.autoCheckParent) || !1), a = G(((w = (y = e.hierarchy) == null ? void 0 : y.cascadeOption) == null ? void 0 : w.selectionRange) || "All");
|
|
3201
3200
|
pe(() => {
|
|
3202
3201
|
var t;
|
|
3203
3202
|
return (t = e.hierarchy) == null ? void 0 : t.cascadeOption;
|
|
3204
3203
|
}, (t) => {
|
|
3205
|
-
|
|
3204
|
+
v.value = t ? !!t.autoCheckChildren : !1, f.value = t ? !!t.autoCheckParent : !1, a.value = t ? t.selectionRange : "All";
|
|
3206
3205
|
});
|
|
3207
|
-
const
|
|
3206
|
+
const k = Y(() => a.value === "OnlyParent"), s = Y(() => a.value === "OnlyChildren");
|
|
3208
3207
|
function p(t, i) {
|
|
3209
3208
|
let S = t;
|
|
3210
|
-
const L = d.value[i], A = L[b.value], q = Array.from(L.__fv_descendant_index__).map((C) => d.value[C]), X = q.filter((C) => C.__fv_visible__ !== !1).map((C) => C.__fv_visible_index__).filter((C) => n.value[C]).map((C) => n.value[C]),
|
|
3211
|
-
return Q && j &&
|
|
3209
|
+
const L = d.value[i], A = L[b.value], q = Array.from(L.__fv_descendant_index__).map((C) => d.value[C]), X = q.filter((C) => C.__fv_visible__ !== !1).map((C) => C.__fv_visible_index__).filter((C) => n.value[C]).map((C) => n.value[C]), V = X.map((C) => C.raw[b.value]), j = r(t, V), Q = r(t, [A]);
|
|
3210
|
+
return Q && j && k.value && (S = h(t, V), X.forEach((C) => {
|
|
3212
3211
|
C.disabled = !0;
|
|
3213
3212
|
}), q.forEach((C) => {
|
|
3214
3213
|
C.__fv_disabled__ = !0;
|
|
@@ -3220,12 +3219,12 @@ function Gn(e, n, l, a, _) {
|
|
|
3220
3219
|
}
|
|
3221
3220
|
function x(t, i) {
|
|
3222
3221
|
let S = t;
|
|
3223
|
-
const L = i[b.value], B = Array.from(i.__fv_children_index__).map((U) => d.value[U]), q = B.filter((U) => U.__fv_visible__ !== !1).map((U) => U.__fv_visible_index__).filter((U) => n.value[U]).map((U) => n.value[U]), X = q.map((U) => U.raw[b.value]),
|
|
3224
|
-
return j &&
|
|
3222
|
+
const L = i[b.value], B = Array.from(i.__fv_children_index__).map((U) => d.value[U]), q = B.filter((U) => U.__fv_visible__ !== !1).map((U) => U.__fv_visible_index__).filter((U) => n.value[U]).map((U) => n.value[U]), X = q.map((U) => U.raw[b.value]), V = r(t, X), j = r(t, [i[b.value]]);
|
|
3223
|
+
return j && V && k.value && (S = h(t, X), q.forEach((U) => {
|
|
3225
3224
|
U.disabled = !0;
|
|
3226
3225
|
}), B.forEach((U) => {
|
|
3227
3226
|
U.__fv_disabled__ = !0;
|
|
3228
|
-
})), j &&
|
|
3227
|
+
})), j && V && s.value && (S = h(t, [L]), q.forEach((U) => {
|
|
3229
3228
|
U.disabled = !0;
|
|
3230
3229
|
}), B.forEach((U) => {
|
|
3231
3230
|
U.__fv_disabled__ = !0;
|
|
@@ -3235,11 +3234,11 @@ function Gn(e, n, l, a, _) {
|
|
|
3235
3234
|
let S = t.map((q) => q[b.value]);
|
|
3236
3235
|
return i.__fv_parent_index__ > 0 && (S = p(S, i.__fv_parent_index__)), i.__fv_children_index__.length > 0 && (S = x(S, i)), t.filter((q) => S.includes(q[b.value]));
|
|
3237
3236
|
}
|
|
3238
|
-
return { autoCheckChildren:
|
|
3237
|
+
return { autoCheckChildren: v, autoCheckParent: f, interactAfterCheckHierarchyItem: T };
|
|
3239
3238
|
}
|
|
3240
|
-
function Yr(e, n, l,
|
|
3241
|
-
const { getDifference: r, isBInA: d } = _t(), { dataView: u, fold: b, hasRealChildren:
|
|
3242
|
-
clearSelection:
|
|
3239
|
+
function Yr(e, n, l, o, _, h) {
|
|
3240
|
+
const { getDifference: r, isBInA: d } = _t(), { dataView: u, fold: b, hasRealChildren: v, unFold: f, reOrderVisibleIndex: a } = l, {
|
|
3241
|
+
clearSelection: k,
|
|
3243
3242
|
selectDataItem: s,
|
|
3244
3243
|
unSelectDataItem: p,
|
|
3245
3244
|
indeterminate: x,
|
|
@@ -3249,7 +3248,7 @@ function Yr(e, n, l, a, _, h) {
|
|
|
3249
3248
|
currentSelectedDataId: O,
|
|
3250
3249
|
isSingleSelect: m,
|
|
3251
3250
|
emitSelectionChanged: y
|
|
3252
|
-
} = _, { autoCheckChildren: w, autoCheckParent: t, interactAfterCheckHierarchyItem: i } = Gn(e, n, l,
|
|
3251
|
+
} = _, { autoCheckChildren: w, autoCheckParent: t, interactAfterCheckHierarchyItem: i } = Gn(e, n, l, o), { idField: S } = o;
|
|
3253
3252
|
function L() {
|
|
3254
3253
|
return u.value.filter((E) => !!E.__fv_checked__).map((E) => E.__fv_index__);
|
|
3255
3254
|
}
|
|
@@ -3262,7 +3261,7 @@ function Yr(e, n, l, a, _, h) {
|
|
|
3262
3261
|
R.add(F[S.value]), g.value = Array.from(R.values()), E.checked = !0, E.indeterminate = !1, O.value = E.raw[S.value];
|
|
3263
3262
|
}
|
|
3264
3263
|
function B(E) {
|
|
3265
|
-
E.raw[S.value] !== O.value && (
|
|
3264
|
+
E.raw[S.value] !== O.value && (k(), A(E));
|
|
3266
3265
|
}
|
|
3267
3266
|
function q(E) {
|
|
3268
3267
|
if (E.disabled)
|
|
@@ -3279,7 +3278,7 @@ function Yr(e, n, l, a, _, h) {
|
|
|
3279
3278
|
R && s(R);
|
|
3280
3279
|
}
|
|
3281
3280
|
}
|
|
3282
|
-
function
|
|
3281
|
+
function V(E) {
|
|
3283
3282
|
const F = n.value.filter((z) => E.includes(z.raw[S.value])), R = F.map((z) => z.raw[S.value]), H = u.value.filter((z) => {
|
|
3284
3283
|
const ie = z[S.value];
|
|
3285
3284
|
return !R.includes(ie) && E.includes(ie);
|
|
@@ -3312,7 +3311,7 @@ function Yr(e, n, l, a, _, h) {
|
|
|
3312
3311
|
const F = L();
|
|
3313
3312
|
E.raw.__fv_children_index__.some((H) => F.includes(H)) && !!E.checked !== !0 && x(E);
|
|
3314
3313
|
}
|
|
3315
|
-
function
|
|
3314
|
+
function M(E, F, R) {
|
|
3316
3315
|
const { check: H, uncheck: z, uncertain: ie } = R, ue = E.raw ? E.raw : E;
|
|
3317
3316
|
F.length === ue.__fv_children_index__.length && F.length !== 0 ? z(E) : F.length === 0 ? H(E) : F.length < ue.__fv_children_index__.length && ie(E);
|
|
3318
3317
|
}
|
|
@@ -3330,7 +3329,7 @@ function Yr(e, n, l, a, _, h) {
|
|
|
3330
3329
|
uncheck: p,
|
|
3331
3330
|
uncertain: T
|
|
3332
3331
|
};
|
|
3333
|
-
|
|
3332
|
+
M(ue, z, fe), F = H.__fv_parent_index__;
|
|
3334
3333
|
}
|
|
3335
3334
|
}
|
|
3336
3335
|
function C(E) {
|
|
@@ -3350,7 +3349,7 @@ function Yr(e, n, l, a, _, h) {
|
|
|
3350
3349
|
});
|
|
3351
3350
|
}
|
|
3352
3351
|
}
|
|
3353
|
-
function
|
|
3352
|
+
function N(E) {
|
|
3354
3353
|
C(E), U(E);
|
|
3355
3354
|
const F = E.raw;
|
|
3356
3355
|
let R = c();
|
|
@@ -3378,37 +3377,37 @@ function Yr(e, n, l, a, _, h) {
|
|
|
3378
3377
|
}
|
|
3379
3378
|
return {
|
|
3380
3379
|
getNextSelectableHierarchyItemId: ae,
|
|
3381
|
-
toggleSelectHierarchyItem:
|
|
3380
|
+
toggleSelectHierarchyItem: N,
|
|
3382
3381
|
unSelectTreeNode: q,
|
|
3383
3382
|
selectTreeNode: A,
|
|
3384
3383
|
selectItemById: X,
|
|
3385
|
-
selectItemByIds:
|
|
3384
|
+
selectItemByIds: V,
|
|
3386
3385
|
unSelectItemByIds: j
|
|
3387
3386
|
};
|
|
3388
3387
|
}
|
|
3389
|
-
function Xr(e, n, l,
|
|
3388
|
+
function Xr(e, n, l, o, _, h, r, d, u) {
|
|
3390
3389
|
var Qe;
|
|
3391
|
-
const { dataView: b, visibleDataItems:
|
|
3390
|
+
const { dataView: b, visibleDataItems: v } = n, { getVisualData: f, maxVisibleRowIndex: a, minVisibleRowIndex: k } = _, s = Y(() => o.value.primaryColumnsWidth), p = Y(() => o.value.leftColumnsWidth), x = Y(() => o.value.rightColumnsWidth), T = ((Qe = e.rowOption) == null ? void 0 : Qe.height) || 28, c = G(0), g = G(0);
|
|
3392
3391
|
let O = 0, m = h.value - 1;
|
|
3393
3392
|
const y = G(0), w = G(0), t = G(0), i = G(e.virtualized), S = 24, L = 1.5;
|
|
3394
3393
|
let A = null;
|
|
3395
3394
|
function B() {
|
|
3396
|
-
const J =
|
|
3395
|
+
const J = v.value;
|
|
3397
3396
|
if (J.length <= 0)
|
|
3398
3397
|
return 0;
|
|
3399
|
-
const le =
|
|
3400
|
-
return le.__fv_data_position__ > J.length * T ? J.length * T : (le.__fv_data_position__ || 0) + (le.__fv_data_height__ || 0) + Math.max(J.length - 1 -
|
|
3398
|
+
const le = a.value < J.length ? J[a.value] : J[J.length - 1];
|
|
3399
|
+
return le.__fv_data_position__ > J.length * T ? J.length * T : (le.__fv_data_position__ || 0) + (le.__fv_data_height__ || 0) + Math.max(J.length - 1 - a.value, 0) * T;
|
|
3401
3400
|
}
|
|
3402
3401
|
const q = Y(() => {
|
|
3403
3402
|
const J = B();
|
|
3404
|
-
|
|
3403
|
+
v.value;
|
|
3405
3404
|
let le = w.value / Math.max(J, w.value), de = Math.floor(le * w.value);
|
|
3406
3405
|
for (; w.value > 0 && de < S; )
|
|
3407
3406
|
le *= L, de = Math.floor(le * w.value);
|
|
3408
3407
|
return de;
|
|
3409
|
-
}), X = Y(() => Math.floor(t.value / Math.max(s.value, t.value) * y.value)),
|
|
3410
|
-
function
|
|
3411
|
-
const de = Math.floor(J / T) + 1, xe =
|
|
3408
|
+
}), X = Y(() => Math.floor(t.value / Math.max(s.value, t.value) * y.value)), V = 0, j = 0, Q = Y(() => y.value - (p.value + s.value + x.value + d.value));
|
|
3409
|
+
function M(J) {
|
|
3410
|
+
const de = Math.floor(J / T) + 1, xe = v.value;
|
|
3412
3411
|
return xe.length > de ? xe[de].__fv_visible_index__ - 1 : 0;
|
|
3413
3412
|
}
|
|
3414
3413
|
function U(J, le, de) {
|
|
@@ -3429,26 +3428,26 @@ function Xr(e, n, l, a, _, h, r, d, u) {
|
|
|
3429
3428
|
}
|
|
3430
3429
|
function C(J) {
|
|
3431
3430
|
var et, at;
|
|
3432
|
-
const le =
|
|
3431
|
+
const le = v.value;
|
|
3433
3432
|
if (!le.length) {
|
|
3434
3433
|
l.value = [];
|
|
3435
3434
|
return;
|
|
3436
3435
|
}
|
|
3437
|
-
const de = (et = e.pagination) != null && et.enable ? 0 : Math.max(O - r, 0), xe = le[le.length - 1].__fv_visible_index__, Ie = (at = e.pagination) != null && at.enable ? le.length - 1 : Math.min(m + r, xe), { actualStart: Ae, actualEnd: je } = U(de, Ie, xe), ot = le[Ae - 1], it =
|
|
3436
|
+
const de = (et = e.pagination) != null && et.enable ? 0 : Math.max(O - r, 0), xe = le[le.length - 1].__fv_visible_index__, Ie = (at = e.pagination) != null && at.enable ? le.length - 1 : Math.min(m + r, xe), { actualStart: Ae, actualEnd: je } = U(de, Ie, xe), ot = le[Ae - 1], it = f(Ae, je, ot, J);
|
|
3438
3437
|
it.length && (l.value = [...it]);
|
|
3439
3438
|
}
|
|
3440
|
-
const
|
|
3439
|
+
const N = Y(() => B() > w.value), K = Y(() => Math.floor(s.value) > t.value);
|
|
3441
3440
|
function Z(J, le) {
|
|
3442
3441
|
let de = J;
|
|
3443
|
-
const xe = de >
|
|
3444
|
-
Ie && de < w.value - le && (de = w.value - le), (!Ie || xe) && (de =
|
|
3442
|
+
const xe = de > V, Ie = N.value;
|
|
3443
|
+
Ie && de < w.value - le && (de = w.value - le), (!Ie || xe) && (de = V), c.value !== de && (c.value = de);
|
|
3445
3444
|
}
|
|
3446
3445
|
function ae() {
|
|
3447
|
-
i.value && (O =
|
|
3446
|
+
i.value && (O = M(Math.abs(c.value)), m = O + h.value - 1, (O < k.value || m > a.value - r / 2) && C());
|
|
3448
3447
|
}
|
|
3449
3448
|
function E(J) {
|
|
3450
3449
|
let le = c.value + J;
|
|
3451
|
-
le >
|
|
3450
|
+
le > V && (le = V);
|
|
3452
3451
|
const de = B();
|
|
3453
3452
|
Z(le, de), ae();
|
|
3454
3453
|
}
|
|
@@ -3480,7 +3479,7 @@ function Xr(e, n, l, a, _, h, r, d, u) {
|
|
|
3480
3479
|
return typeof le > "u" && (le = -1 * J.wheelDeltaX / 6), typeof de > "u" && (de = J.wheelDeltaY / 6), J.deltaMode && J.deltaMode === 1 && (le *= 10, de *= 10), J.shiftKey ? { deltaY: -de, deltaX: -le } : { deltaX: le, deltaY: de };
|
|
3481
3480
|
}
|
|
3482
3481
|
function ue(J) {
|
|
3483
|
-
if (e.disabled || !
|
|
3482
|
+
if (e.disabled || !N.value || J.target.tagName === "TEXTAREA")
|
|
3484
3483
|
return;
|
|
3485
3484
|
J.preventDefault(), J.stopPropagation();
|
|
3486
3485
|
const { deltaX: le, deltaY: de } = ie(J);
|
|
@@ -3493,12 +3492,12 @@ function Xr(e, n, l, a, _, h, r, d, u) {
|
|
|
3493
3492
|
})), ve = Y(() => ({
|
|
3494
3493
|
transform: `translateY(${c.value}px)`
|
|
3495
3494
|
})), oe = Y(() => ({
|
|
3496
|
-
height: `${(e.autoHeight ?
|
|
3495
|
+
height: `${(e.autoHeight ? v.value : b.value).length * T}px`,
|
|
3497
3496
|
width: `${s.value}px`,
|
|
3498
3497
|
transform: `translate(${g.value}px, ${c.value}px)`
|
|
3499
3498
|
})), he = Y(() => ({
|
|
3500
3499
|
transform: `translate(${g.value}px, ${c.value}px)`
|
|
3501
|
-
})),
|
|
3500
|
+
})), Me = Y(() => ({
|
|
3502
3501
|
height: `${b.value.length * T}px`,
|
|
3503
3502
|
width: `${x.value}px`,
|
|
3504
3503
|
transform: `translateY(${c.value}px)`
|
|
@@ -3585,11 +3584,11 @@ function Xr(e, n, l, a, _, h, r, d, u) {
|
|
|
3585
3584
|
onWheel: ue,
|
|
3586
3585
|
reCalculateVisualDataRows: C,
|
|
3587
3586
|
resetScroll: H,
|
|
3588
|
-
rightFixedGridDataStyle:
|
|
3587
|
+
rightFixedGridDataStyle: Me,
|
|
3589
3588
|
rightFixedGridHeaderColumnsStyle: Se,
|
|
3590
3589
|
rightFixedGridMergedDataStyle: Le,
|
|
3591
3590
|
shouldShowHorizontalScrollbar: K,
|
|
3592
|
-
shouldShowVirticalScrollbar:
|
|
3591
|
+
shouldShowVirticalScrollbar: N,
|
|
3593
3592
|
updateVirticalScroll: z,
|
|
3594
3593
|
updateVisibleRowsOnLatestVisibleScope: ae,
|
|
3595
3594
|
verticalScrollThumbStyle: ee,
|
|
@@ -3600,11 +3599,11 @@ function Xr(e, n, l, a, _, h, r, d, u) {
|
|
|
3600
3599
|
scrollTo: Ke
|
|
3601
3600
|
};
|
|
3602
3601
|
}
|
|
3603
|
-
function Jr(e, n, l,
|
|
3604
|
-
const u = G(
|
|
3605
|
-
function
|
|
3606
|
-
let T =
|
|
3607
|
-
return x.__fv_data_grid_group_row__ && (T =
|
|
3602
|
+
function Jr(e, n, l, o, _, h, r, d) {
|
|
3603
|
+
const u = G(o.value - 1 + _), b = G(0), { renderDataRow: v } = h, f = r ? r.renderGroupRow : v, a = d ? d.renderSummaryRow : v;
|
|
3604
|
+
function k(x) {
|
|
3605
|
+
let T = v;
|
|
3606
|
+
return x.__fv_data_grid_group_row__ && (T = f), x.__fv_data_grid_group_summary__ && (T = a), T;
|
|
3608
3607
|
}
|
|
3609
3608
|
function s(x, T, c, g) {
|
|
3610
3609
|
const { dataView: O, visibleDataItems: m } = l, y = [], w = e.virtualized ? m.value : O.value;
|
|
@@ -3613,7 +3612,7 @@ function Jr(e, n, l, a, _, h, r, d) {
|
|
|
3613
3612
|
let i = x, S = 0;
|
|
3614
3613
|
const L = T - x + 1;
|
|
3615
3614
|
for (; y.length < L && i < w.length; ) {
|
|
3616
|
-
const A = w[i], B = w[i - 1] || c, q = y[S - 1], X = B ? (B.__fv_data_position__ || 0) + (B.__fv_data_height__ || 0) : 0, j =
|
|
3615
|
+
const A = w[i], B = w[i - 1] || c, q = y[S - 1], X = B ? (B.__fv_data_position__ || 0) + (B.__fv_data_height__ || 0) : 0, j = k(A)(A, B, q, i, X, n.value);
|
|
3617
3616
|
j.refreshKey = t, j.visible && (y.push(j), S++), i++;
|
|
3618
3617
|
}
|
|
3619
3618
|
}
|
|
@@ -3622,7 +3621,7 @@ function Jr(e, n, l, a, _, h, r, d) {
|
|
|
3622
3621
|
function p(x, T, c) {
|
|
3623
3622
|
const g = T.groupField || "", { groupValue: O, raw: m } = T;
|
|
3624
3623
|
l[x](g, O, m.groupParents || []);
|
|
3625
|
-
const { dataView: y } = l, w = c[0].index, t = Math.min(w +
|
|
3624
|
+
const { dataView: y } = l, w = c[0].index, t = Math.min(w + o.value + _ + 1, y.value.length - 1);
|
|
3626
3625
|
return s(w, t);
|
|
3627
3626
|
}
|
|
3628
3627
|
return { getVisualData: s, maxVisibleRowIndex: u, minVisibleRowIndex: b, toggleGroupRow: p };
|
|
@@ -3630,14 +3629,14 @@ function Jr(e, n, l, a, _, h, r, d) {
|
|
|
3630
3629
|
function Zr(e) {
|
|
3631
3630
|
var h;
|
|
3632
3631
|
const { isUndefined: n } = ut(), l = ((h = e.rowOption) == null ? void 0 : h.height) || 28;
|
|
3633
|
-
function
|
|
3632
|
+
function o(r, d) {
|
|
3634
3633
|
const u = r.pre;
|
|
3635
3634
|
if (u) {
|
|
3636
|
-
let b = u.__fv_data_position__,
|
|
3635
|
+
let b = u.__fv_data_position__, v = u.__fv_data_height__;
|
|
3637
3636
|
(n(b) || // when virtual loading, position of tree node should recalculate after collapse tree node.
|
|
3638
|
-
e.virtualized && e.hierarchy && u.__fv_visible_index__ * l !== b) && (b = u.__fv_visible_index__ * l), n(
|
|
3639
|
-
const
|
|
3640
|
-
r.top =
|
|
3637
|
+
e.virtualized && e.hierarchy && u.__fv_visible_index__ * l !== b) && (b = u.__fv_visible_index__ * l), n(v) && (v = l);
|
|
3638
|
+
const f = r.visible ? b + v : u.__fv_data_position__;
|
|
3639
|
+
r.top = f, d.__fv_data_position__ = f;
|
|
3641
3640
|
} else
|
|
3642
3641
|
r.top = 0, d.__fv_data_position__ = 0;
|
|
3643
3642
|
}
|
|
@@ -3645,29 +3644,29 @@ function Zr(e) {
|
|
|
3645
3644
|
if (r && !d.ref) {
|
|
3646
3645
|
d.ref = r;
|
|
3647
3646
|
const b = d.parent;
|
|
3648
|
-
d.cellHeight !== r.offsetHeight && (d.cellHeight = r.offsetHeight), d.cellHeight && d.cellHeight > (b.height || 0) && (b.height = d.cellHeight, u.__fv_data_height__ = b.height),
|
|
3647
|
+
d.cellHeight !== r.offsetHeight && (d.cellHeight = r.offsetHeight), d.cellHeight && d.cellHeight > (b.height || 0) && (b.height = d.cellHeight, u.__fv_data_height__ = b.height), o(b, u);
|
|
3649
3648
|
}
|
|
3650
3649
|
!r && d.ref && (d.ref = r);
|
|
3651
3650
|
}
|
|
3652
|
-
return { updateRowPosition:
|
|
3651
|
+
return { updateRowPosition: o, updateVisualInfomation: _ };
|
|
3653
3652
|
}
|
|
3654
3653
|
function Un() {
|
|
3655
3654
|
function e(n, l) {
|
|
3656
3655
|
var r, d;
|
|
3657
3656
|
if (!l.data || !l.data.length)
|
|
3658
3657
|
return "";
|
|
3659
|
-
const
|
|
3658
|
+
const o = Object.prototype.hasOwnProperty.call(l, "valueField") && l.valueField || "value", _ = Object.prototype.hasOwnProperty.call(l, "textField") && l.textField || "name";
|
|
3660
3659
|
if (n != null && n.includes(",")) {
|
|
3661
3660
|
const u = n.split(",");
|
|
3662
|
-
if (!l.data.filter((
|
|
3661
|
+
if (!l.data.filter((a) => u.includes(a[o])).length)
|
|
3663
3662
|
return "";
|
|
3664
|
-
const
|
|
3665
|
-
return u.map((
|
|
3666
|
-
var
|
|
3667
|
-
return (
|
|
3663
|
+
const v = (r = l.data) == null ? void 0 : r.reduce((a, k) => (a[k[o]] = k, a), {});
|
|
3664
|
+
return u.map((a) => {
|
|
3665
|
+
var k;
|
|
3666
|
+
return (k = v[a]) == null ? void 0 : k[_];
|
|
3668
3667
|
}).join(",") || n;
|
|
3669
3668
|
}
|
|
3670
|
-
const h = (d = l.data) == null ? void 0 : d.find((u) => u[
|
|
3669
|
+
const h = (d = l.data) == null ? void 0 : d.find((u) => u[o] === n);
|
|
3671
3670
|
return (h == null ? void 0 : h[_]) || n || "";
|
|
3672
3671
|
}
|
|
3673
3672
|
return {
|
|
@@ -3686,21 +3685,21 @@ function qn() {
|
|
|
3686
3685
|
const {
|
|
3687
3686
|
formatTo: e
|
|
3688
3687
|
} = Ht();
|
|
3689
|
-
function n(
|
|
3690
|
-
if (
|
|
3688
|
+
function n(o, _) {
|
|
3689
|
+
if (o) {
|
|
3691
3690
|
let h = "yyyy-MM-dd";
|
|
3692
3691
|
if (typeof _ == "string" ? h = _ : typeof _ == "object" && (h = _.format || "yyyy-MM-dd"), h = h.replace("YYYY", "yyyy").replace("-DD", "-dd"), typeof _ == "object" && _.dateRange) {
|
|
3693
3692
|
const r = _.dateRangeDatesDelimiter || "~";
|
|
3694
|
-
let [d, u] =
|
|
3693
|
+
let [d, u] = o.split(r);
|
|
3695
3694
|
return d = e(d, h), u = e(u, h), d + r + u;
|
|
3696
3695
|
}
|
|
3697
|
-
return e(
|
|
3696
|
+
return e(o, h);
|
|
3698
3697
|
}
|
|
3699
|
-
return
|
|
3698
|
+
return o;
|
|
3700
3699
|
}
|
|
3701
|
-
function l(
|
|
3700
|
+
function l(o, _) {
|
|
3702
3701
|
const h = _.dateFormat || "yyyy-MM-dd";
|
|
3703
|
-
return e(
|
|
3702
|
+
return e(o, h);
|
|
3704
3703
|
}
|
|
3705
3704
|
return {
|
|
3706
3705
|
renderDateColumn: l,
|
|
@@ -3711,13 +3710,13 @@ function Yn() {
|
|
|
3711
3710
|
const {
|
|
3712
3711
|
formatTo: e
|
|
3713
3712
|
} = pt();
|
|
3714
|
-
function n(l,
|
|
3713
|
+
function n(l, o) {
|
|
3715
3714
|
const _ = {
|
|
3716
|
-
precision:
|
|
3717
|
-
prefix:
|
|
3718
|
-
suffix:
|
|
3719
|
-
decimalSeparator:
|
|
3720
|
-
groupSeparator:
|
|
3715
|
+
precision: o.precision,
|
|
3716
|
+
prefix: o.prefix || "",
|
|
3717
|
+
suffix: o.suffix || "",
|
|
3718
|
+
decimalSeparator: o.decimal || ".",
|
|
3719
|
+
groupSeparator: o.thousand || ""
|
|
3721
3720
|
};
|
|
3722
3721
|
return e(l, _) || l;
|
|
3723
3722
|
}
|
|
@@ -3728,10 +3727,10 @@ function Yn() {
|
|
|
3728
3727
|
function Xn() {
|
|
3729
3728
|
function e(n, l) {
|
|
3730
3729
|
if (n) {
|
|
3731
|
-
const
|
|
3732
|
-
return l != null && l.width && (
|
|
3730
|
+
const o = {};
|
|
3731
|
+
return l != null && l.width && (o.width = `${l.width}px`), l != null && l.height && (o.height = `${l.height}px`), W("img", {
|
|
3733
3732
|
src: n,
|
|
3734
|
-
style:
|
|
3733
|
+
style: o
|
|
3735
3734
|
}, null);
|
|
3736
3735
|
}
|
|
3737
3736
|
return n;
|
|
@@ -3742,8 +3741,8 @@ function Xn() {
|
|
|
3742
3741
|
}
|
|
3743
3742
|
function Jn() {
|
|
3744
3743
|
function e(n, l) {
|
|
3745
|
-
const
|
|
3746
|
-
return (n == null ? void 0 : n[
|
|
3744
|
+
const o = Ve.getLocale();
|
|
3745
|
+
return (n == null ? void 0 : n[o || "zh-CHS"]) || "";
|
|
3747
3746
|
}
|
|
3748
3747
|
return {
|
|
3749
3748
|
renderMultilingualColumn: e
|
|
@@ -3757,27 +3756,27 @@ function Zn() {
|
|
|
3757
3756
|
} = Un(), {
|
|
3758
3757
|
renderNumberColumn: l
|
|
3759
3758
|
} = Yn(), {
|
|
3760
|
-
renderDateColumn:
|
|
3759
|
+
renderDateColumn: o,
|
|
3761
3760
|
renderDateTimeColumn: _
|
|
3762
3761
|
} = qn(), {
|
|
3763
3762
|
renderImageColumn: h
|
|
3764
3763
|
} = Xn(), {
|
|
3765
3764
|
renderMultilingualColumn: r
|
|
3766
3765
|
} = Jn();
|
|
3767
|
-
function d(
|
|
3768
|
-
return typeof
|
|
3766
|
+
function d(v) {
|
|
3767
|
+
return typeof v == "boolean" ? v.toString() : v;
|
|
3769
3768
|
}
|
|
3770
|
-
function u(
|
|
3771
|
-
return
|
|
3769
|
+
function u(v, f, a) {
|
|
3770
|
+
return f.customFormat ? (
|
|
3772
3771
|
// new Function(`return ${options.customFormat}`)() :
|
|
3773
|
-
|
|
3774
|
-
) : d(
|
|
3772
|
+
f.customFormat(v, a.raw)
|
|
3773
|
+
) : d(v);
|
|
3775
3774
|
}
|
|
3776
|
-
function b(
|
|
3775
|
+
function b(v, f, a) {
|
|
3777
3776
|
const {
|
|
3778
|
-
column:
|
|
3779
|
-
} =
|
|
3780
|
-
return
|
|
3777
|
+
column: k
|
|
3778
|
+
} = v, s = _e(f.raw, k.field), p = a.options || a;
|
|
3779
|
+
return a.type === ze.NONE ? d(s) : a.type === ze.CUSTOM ? u(s, a, f) : a.type === ze.ENUM ? n(s, p) : a.type === ze.NUMBER ? l(s, p) : a.type === ze.BOOLEAN ? e(s, p) : a.type === ze.DATE ? o(s, p) : a.type === ze.DATE_TIME ? _(s, a) : a.type === ze.IMAGE ? h(s, p) : a.type === ze.MULTI_LINGUAL ? r(s, p) : d(s);
|
|
3781
3780
|
}
|
|
3782
3781
|
return {
|
|
3783
3782
|
renderFormatColumn: b
|
|
@@ -3785,7 +3784,7 @@ function Zn() {
|
|
|
3785
3784
|
}
|
|
3786
3785
|
function Qr(e, n, l) {
|
|
3787
3786
|
var T;
|
|
3788
|
-
const { isUndefined:
|
|
3787
|
+
const { isUndefined: o } = ut(), _ = G(e.mergeCell);
|
|
3789
3788
|
(T = G(e.rowOption).value) != null && T.wrapContent;
|
|
3790
3789
|
const { updateVisualInfomation: r } = l, { renderCommandColumn: d } = Nn(e), { renderFormatColumn: u } = Zn();
|
|
3791
3790
|
function b(c, g, O, m, y, w = 1) {
|
|
@@ -3814,7 +3813,7 @@ function Qr(e, n, l) {
|
|
|
3814
3813
|
};
|
|
3815
3814
|
return t;
|
|
3816
3815
|
}
|
|
3817
|
-
function
|
|
3816
|
+
function v(c, g, O) {
|
|
3818
3817
|
return c.getEditor = (m) => n.getEditor(m, g, m.parent), c.setRef = (m) => r(m, c, O), c.update = (m) => {
|
|
3819
3818
|
m !== void 0 && (c.editingData = m);
|
|
3820
3819
|
}, c.accept = () => {
|
|
@@ -3825,24 +3824,24 @@ function Qr(e, n, l) {
|
|
|
3825
3824
|
ht(_e(m, g.field), O, g.field), c.data = _e(O, g.field), c.editingData = _e(O, g.field);
|
|
3826
3825
|
}, c;
|
|
3827
3826
|
}
|
|
3828
|
-
function
|
|
3827
|
+
function f(c, g) {
|
|
3829
3828
|
g.dataType === "commands" ? c.formatter = (O, m) => g.formatter ? g.formatter(c, m) : d(c, m) : g.formatter && (c.formatter = (O, m) => typeof g.formatter == "function" ? g.formatter(O, m) : u(c, m, g.formatter));
|
|
3830
3829
|
}
|
|
3831
|
-
function
|
|
3830
|
+
function a(c, g, O) {
|
|
3832
3831
|
const m = g && g.data[O];
|
|
3833
3832
|
if (m && m.data === c.data) {
|
|
3834
3833
|
const w = m && m.spannedBy || m;
|
|
3835
3834
|
w.rowSpan++, w.spanned = w.spanned || [], w.spanned.push(c), c.colSpan = 0, c.rowSpan = 0, c.spannedBy = w;
|
|
3836
3835
|
}
|
|
3837
3836
|
}
|
|
3838
|
-
function
|
|
3839
|
-
_.value &&
|
|
3837
|
+
function k(c, g, O) {
|
|
3838
|
+
_.value && a(c, g, O.field);
|
|
3840
3839
|
}
|
|
3841
3840
|
function s(c, g) {
|
|
3842
|
-
g.showEllipsis !== void 0 && (c.showEllipsis = g.showEllipsis), c.showTips =
|
|
3841
|
+
g.showEllipsis !== void 0 && (c.showEllipsis = g.showEllipsis), c.showTips = o(g.showTips) ? !0 : g.showTips, c.column = g, c.align = g.align || "left", c.valign = g.valign || "middle", c.mode = e.editable ? Re.editable : Re.readonly;
|
|
3843
3842
|
}
|
|
3844
3843
|
function p(c, g, O, m) {
|
|
3845
|
-
s(c, g),
|
|
3844
|
+
s(c, g), v(c, g, m), f(c, g), k(c, O, g);
|
|
3846
3845
|
}
|
|
3847
3846
|
function x(c, g, O, m, y) {
|
|
3848
3847
|
const w = e.editable ? Re.editable : Re.readonly, t = b(c.field, w, g, O, m);
|
|
@@ -3850,9 +3849,9 @@ function Qr(e, n, l) {
|
|
|
3850
3849
|
}
|
|
3851
3850
|
return { createCellByColumn: x, createCellByField: b, updateCellByColumn: p };
|
|
3852
3851
|
}
|
|
3853
|
-
function el(e, n, l,
|
|
3852
|
+
function el(e, n, l, o, _, h, r) {
|
|
3854
3853
|
var g, O;
|
|
3855
|
-
const d = G(e.rowOption), u = ((g = d.value) == null ? void 0 : g.height) || 28, b = ((O = d.value) == null ? void 0 : O.wrapContent) || !1, { idField:
|
|
3854
|
+
const d = G(e.rowOption), u = ((g = d.value) == null ? void 0 : g.height) || 28, b = ((O = d.value) == null ? void 0 : O.wrapContent) || !1, { idField: v } = _, { collapseField: f } = o, { updateRowPosition: a } = h, { createCellByColumn: k } = r, s = (m, y, w, t) => {
|
|
3856
3855
|
ht(_e(m, t), y, t), w.data[t].data = _e(y, t), w.data[t].editingData = _e(y, t);
|
|
3857
3856
|
};
|
|
3858
3857
|
function p(m, y, w, t, i, S) {
|
|
@@ -3861,8 +3860,8 @@ function el(e, n, l, a, _, h, r) {
|
|
|
3861
3860
|
__fv_data_grid_group_field__: L,
|
|
3862
3861
|
__fv_data_grid_group_value__: A,
|
|
3863
3862
|
__fv_data_index__: B
|
|
3864
|
-
} = w, q = w.__fv_data_grid_group_layer__ || (w.__fv_parents__ ? (K = w.__fv_parents__) == null ? void 0 : K.size : 0) || 0, X = typeof w.parent == "number" ? Number(w.parent) : -1,
|
|
3865
|
-
collapse:
|
|
3863
|
+
} = w, q = w.__fv_data_grid_group_layer__ || (w.__fv_parents__ ? (K = w.__fv_parents__) == null ? void 0 : K.size : 0) || 0, X = typeof w.parent == "number" ? Number(w.parent) : -1, V = w.__fv_data_grid_group_collapse__ || w[f.value], j = w.__fv_visible__ === void 0 ? !0 : w.__fv_visible__, Q = w.__fv_checked__, M = w.__fv_indeterminate__, U = w.__fv_disabled__ || w[((Z = e.rowOption) == null ? void 0 : Z.disabledField) || "disabled"], C = e.hierarchy && n.isVisibleInTree(w), N = {
|
|
3864
|
+
collapse: V,
|
|
3866
3865
|
data: {},
|
|
3867
3866
|
dataIndex: B,
|
|
3868
3867
|
groupField: L,
|
|
@@ -3876,34 +3875,34 @@ function el(e, n, l, a, _, h, r) {
|
|
|
3876
3875
|
raw: w,
|
|
3877
3876
|
checked: Q,
|
|
3878
3877
|
disabled: U,
|
|
3879
|
-
indeterminate:
|
|
3878
|
+
indeterminate: M,
|
|
3880
3879
|
setRef: (E) => {
|
|
3881
|
-
|
|
3880
|
+
N.ref = E;
|
|
3882
3881
|
},
|
|
3883
3882
|
visible: j && C || j && !e.hierarchy,
|
|
3884
3883
|
status: $e.initial,
|
|
3885
3884
|
updateCell: (E, F) => {
|
|
3886
|
-
s(E, w,
|
|
3885
|
+
s(E, w, N, F), n.updateSummary();
|
|
3887
3886
|
},
|
|
3888
3887
|
updateCells: (E, F) => {
|
|
3889
3888
|
F.forEach((R) => {
|
|
3890
|
-
s(E, w,
|
|
3889
|
+
s(E, w, N, R);
|
|
3891
3890
|
});
|
|
3892
3891
|
}
|
|
3893
3892
|
};
|
|
3894
|
-
return t || (w.__fv_data_position__ = 0), b || (
|
|
3893
|
+
return t || (w.__fv_data_position__ = 0), b || (N.height = u, w.__fv_data_height__ = N.height, a(N, w)), (ae = d.value) != null && ae.customRowStatus && (d.value.customRowStatus(N), w.__fv_disabled__ = N.disabled), N;
|
|
3895
3894
|
}
|
|
3896
3895
|
function x(m, y, w, t, i, S) {
|
|
3897
3896
|
const L = p(rt.data, i, y, w, t, S);
|
|
3898
3897
|
return m.forEach((A, B) => {
|
|
3899
|
-
L.data[A.field] =
|
|
3898
|
+
L.data[A.field] = k(A, B, y, L, t);
|
|
3900
3899
|
}), L;
|
|
3901
3900
|
}
|
|
3902
3901
|
function T(m, y, w, t, i) {
|
|
3903
3902
|
return Object.assign(m, { index: y, dataIndex: w, top: t, pre: i });
|
|
3904
3903
|
}
|
|
3905
3904
|
function c(m, y, w, t, i, S) {
|
|
3906
|
-
const L = m.__fv_data_index__, A = m[
|
|
3905
|
+
const L = m.__fv_data_index__, A = m[v.value], B = l.getEditingSnapshot(A);
|
|
3907
3906
|
return B === null ? x(
|
|
3908
3907
|
S,
|
|
3909
3908
|
m,
|
|
@@ -3915,187 +3914,187 @@ function el(e, n, l, a, _, h, r) {
|
|
|
3915
3914
|
}
|
|
3916
3915
|
return { createEmptyRow: p, createNewRowFromDataItem: x, renderDataRow: c };
|
|
3917
3916
|
}
|
|
3918
|
-
function tl(e, n, l,
|
|
3919
|
-
const _ = G(e.summary), { idField: h } = n, { createCellByField: r } = l, { createEmptyRow: d } =
|
|
3920
|
-
const
|
|
3921
|
-
return (
|
|
3917
|
+
function tl(e, n, l, o) {
|
|
3918
|
+
const _ = G(e.summary), { idField: h } = n, { createCellByField: r } = l, { createEmptyRow: d } = o, u = Y(() => {
|
|
3919
|
+
const a = _.value;
|
|
3920
|
+
return (a == null ? void 0 : a.groupFields) || [];
|
|
3922
3921
|
}), b = Y(() => {
|
|
3923
|
-
const
|
|
3924
|
-
return
|
|
3922
|
+
const a = _.value;
|
|
3923
|
+
return a && a.enable && a.groupFields && a.groupFields.length > 0;
|
|
3925
3924
|
});
|
|
3926
|
-
function
|
|
3925
|
+
function v(a, k, s, p) {
|
|
3927
3926
|
if (b.value) {
|
|
3928
|
-
const x =
|
|
3927
|
+
const x = a.data[k];
|
|
3929
3928
|
let T = x.colSpan;
|
|
3930
3929
|
const c = u.value.reduce((g, O) => (g.set(O, !0), g), /* @__PURE__ */ new Map());
|
|
3931
3930
|
p.reduce((g, O, m) => {
|
|
3932
3931
|
if (c.has(O.field)) {
|
|
3933
|
-
const y = r(O.field, Re.readonly, m, s,
|
|
3934
|
-
|
|
3932
|
+
const y = r(O.field, Re.readonly, m, s, a);
|
|
3933
|
+
a.data[O.field] = y, T - 1 > m && (T = m);
|
|
3935
3934
|
}
|
|
3936
3935
|
return g;
|
|
3937
|
-
},
|
|
3936
|
+
}, a), x.colSpan = T;
|
|
3938
3937
|
}
|
|
3939
3938
|
}
|
|
3940
|
-
function
|
|
3941
|
-
const g =
|
|
3942
|
-
return O.data[h.value] = r(h.value, Re.readonly, -1,
|
|
3939
|
+
function f(a, k, s, p, x, T, c) {
|
|
3940
|
+
const g = a.__fv_data_grid_group_field__, O = d(rt.group, p, a, k, s, x);
|
|
3941
|
+
return O.data[h.value] = r(h.value, Re.readonly, -1, a, O, 0), O.data[g] = r(g, Re.readonly, 1, a, O, T.length), v(O, g, a, T), O;
|
|
3943
3942
|
}
|
|
3944
|
-
return { renderGroupRow:
|
|
3943
|
+
return { renderGroupRow: f };
|
|
3945
3944
|
}
|
|
3946
|
-
function nl(e, n, l,
|
|
3947
|
-
const { idField: _ } = n, { createCellByField: h } = l, { createEmptyRow: r } =
|
|
3948
|
-
function d(u, b,
|
|
3949
|
-
const p = u.__fv_data_grid_group_field__, x = r(rt.summary,
|
|
3950
|
-
return x.data[_.value] = h(_.value, Re.readonly, -1, u, x), x.data[p] = h(p, Re.readonly, 1, u, x,
|
|
3945
|
+
function nl(e, n, l, o) {
|
|
3946
|
+
const { idField: _ } = n, { createCellByField: h } = l, { createEmptyRow: r } = o;
|
|
3947
|
+
function d(u, b, v, f, a, k, s) {
|
|
3948
|
+
const p = u.__fv_data_grid_group_field__, x = r(rt.summary, f, u, b, v, a);
|
|
3949
|
+
return x.data[_.value] = h(_.value, Re.readonly, -1, u, x), x.data[p] = h(p, Re.readonly, 1, u, x, k.length), x;
|
|
3951
3950
|
}
|
|
3952
3951
|
return { renderSummaryRow: d };
|
|
3953
3952
|
}
|
|
3954
|
-
function rl(e, n, l,
|
|
3953
|
+
function rl(e, n, l, o, _) {
|
|
3955
3954
|
var C;
|
|
3956
3955
|
const {
|
|
3957
3956
|
idField: h
|
|
3958
3957
|
} = l, r = G(e.editable), d = G(e.editOption), u = G(((C = e.rowOption) == null ? void 0 : C.wrapContent) || !1), {
|
|
3959
3958
|
onClickRow: b,
|
|
3960
|
-
onClickRowExcludeDblclick:
|
|
3961
|
-
} =
|
|
3962
|
-
let
|
|
3963
|
-
function T(
|
|
3964
|
-
return
|
|
3959
|
+
onClickRowExcludeDblclick: v
|
|
3960
|
+
} = o, f = /* @__PURE__ */ new Map([["boolean", "check-box"], ["datetime", "date-picker"], ["enum", "combo-list"], ["number", "number-spinner"], ["string", "input-group"], ["text", "text"], ["commands", "commands-editor"]]);
|
|
3961
|
+
let a, k, s, p, x;
|
|
3962
|
+
function T(N) {
|
|
3963
|
+
return k && k.raw[h.value] === N ? k : null;
|
|
3965
3964
|
}
|
|
3966
3965
|
const c = Dt({});
|
|
3967
|
-
function g(
|
|
3968
|
-
return (
|
|
3966
|
+
function g(N) {
|
|
3967
|
+
return (N == null ? void 0 : N.field) !== Tt && (N == null ? void 0 : N.field) !== Nt;
|
|
3969
3968
|
}
|
|
3970
|
-
function O(
|
|
3971
|
-
|
|
3969
|
+
function O(N, K, Z = {}) {
|
|
3970
|
+
N.mode = Re.editing, a = N, k = K, s = _e(K == null ? void 0 : K.raw, N.field), p = Z;
|
|
3972
3971
|
for (const ae in c)
|
|
3973
3972
|
delete c[ae];
|
|
3974
3973
|
}
|
|
3975
|
-
function m(
|
|
3976
|
-
|
|
3974
|
+
function m(N) {
|
|
3975
|
+
N.accept(), N.mode = Re.editable, a = null;
|
|
3977
3976
|
const K = {};
|
|
3978
|
-
|
|
3979
|
-
K[Z] =
|
|
3980
|
-
}),
|
|
3981
|
-
cell:
|
|
3977
|
+
k && (Object.keys(k).forEach((Z) => {
|
|
3978
|
+
K[Z] = k == null ? void 0 : k[Z];
|
|
3979
|
+
}), k = null), n.emit("endEditCell", {
|
|
3980
|
+
cell: N,
|
|
3982
3981
|
row: K,
|
|
3983
|
-
newValue: _e(K == null ? void 0 : K.raw,
|
|
3982
|
+
newValue: _e(K == null ? void 0 : K.raw, N.field),
|
|
3984
3983
|
oldValue: s,
|
|
3985
3984
|
column: p,
|
|
3986
3985
|
editor: c
|
|
3987
3986
|
});
|
|
3988
3987
|
}
|
|
3989
|
-
function y(
|
|
3988
|
+
function y(N) {
|
|
3990
3989
|
const K = Promise.resolve(!0);
|
|
3991
|
-
return
|
|
3992
|
-
cell:
|
|
3993
|
-
row:
|
|
3994
|
-
newValue:
|
|
3990
|
+
return N ? K.then(() => mt(e.beforeEndEditCell) ? !0 : typeof e.beforeEndEditCell == "function" ? e.beforeEndEditCell({
|
|
3991
|
+
cell: N,
|
|
3992
|
+
row: k,
|
|
3993
|
+
newValue: N.editingData,
|
|
3995
3994
|
oldValue: s
|
|
3996
|
-
}) : () => !0).then((Z) => (Z && (m(
|
|
3995
|
+
}) : () => !0).then((Z) => (Z && (m(N), k && (k = null)), Z)) : K;
|
|
3997
3996
|
}
|
|
3998
|
-
function w(
|
|
3999
|
-
if (x && x !==
|
|
3997
|
+
function w(N) {
|
|
3998
|
+
if (x && x !== N.target) {
|
|
4000
3999
|
x = null;
|
|
4001
4000
|
return;
|
|
4002
4001
|
}
|
|
4003
4002
|
if (document.body.classList.contains("lookup-modal-open"))
|
|
4004
4003
|
return;
|
|
4005
|
-
const Z =
|
|
4004
|
+
const Z = N.target;
|
|
4006
4005
|
if (!(Z != null && Z.closest(".popover"))) {
|
|
4007
|
-
if (
|
|
4006
|
+
if (N instanceof MouseEvent || N.key !== "Enter") {
|
|
4008
4007
|
const ae = Z.closest(".fv-grid-cell");
|
|
4009
|
-
if (
|
|
4008
|
+
if (a && a.ref && a.ref === ae)
|
|
4010
4009
|
return;
|
|
4011
4010
|
}
|
|
4012
|
-
y(
|
|
4011
|
+
y(a).then((ae) => {
|
|
4013
4012
|
ae && document.body.removeEventListener("click", w, !0);
|
|
4014
4013
|
});
|
|
4015
4014
|
}
|
|
4016
4015
|
}
|
|
4017
|
-
function t(
|
|
4016
|
+
function t(N, K, Z) {
|
|
4018
4017
|
return Promise.resolve().then(() => {
|
|
4019
4018
|
var E;
|
|
4020
4019
|
const ae = (E = Z.editor) == null ? void 0 : E.readonly;
|
|
4021
4020
|
return !mt(e.beforeEditCell) && typeof e.beforeEditCell == "function" ? e.beforeEditCell({
|
|
4022
|
-
row:
|
|
4021
|
+
row: N,
|
|
4023
4022
|
cell: K,
|
|
4024
|
-
rawData:
|
|
4023
|
+
rawData: N.raw,
|
|
4025
4024
|
column: Z
|
|
4026
4025
|
}) : !ae;
|
|
4027
4026
|
}).then((ae) => {
|
|
4028
|
-
ae && (O(K,
|
|
4027
|
+
ae && (O(K, N, Z), document.body.removeEventListener("click", w, !0), document.body.addEventListener("click", w, !0));
|
|
4029
4028
|
});
|
|
4030
4029
|
}
|
|
4031
|
-
function i(
|
|
4032
|
-
|
|
4033
|
-
|
|
4030
|
+
function i(N, K, Z, ae = {}) {
|
|
4031
|
+
N.stopPropagation(), v(N, Z), g(K.column) && r.value && d.value.editMode === "cell" && K.mode === Re.editable && y(a).then(() => {
|
|
4032
|
+
a || t(Z, K, ae);
|
|
4034
4033
|
});
|
|
4035
4034
|
}
|
|
4036
|
-
function S(
|
|
4037
|
-
|
|
4038
|
-
|
|
4035
|
+
function S(N, K, Z, ae = {}) {
|
|
4036
|
+
N.stopPropagation(), b(N, Z), g(K.column) && r.value && d.value.editMode === "cell" && K.mode === Re.editable && y(a).then(() => {
|
|
4037
|
+
a || t(Z, K, ae);
|
|
4039
4038
|
});
|
|
4040
4039
|
}
|
|
4041
|
-
function L(
|
|
4042
|
-
|
|
4040
|
+
function L(N) {
|
|
4041
|
+
N.stopPropagation(), x = N.target;
|
|
4043
4042
|
}
|
|
4044
|
-
function A(
|
|
4045
|
-
|
|
4043
|
+
function A(N) {
|
|
4044
|
+
N.stopPropagation(), x && (x = null);
|
|
4046
4045
|
}
|
|
4047
|
-
function B(
|
|
4048
|
-
Object.values(
|
|
4046
|
+
function B(N) {
|
|
4047
|
+
Object.values(N.data).filter((K) => K.mode === Re.editable && g(K.column)).forEach((K) => {
|
|
4049
4048
|
K.mode = Re.editing;
|
|
4050
|
-
}),
|
|
4049
|
+
}), N.status = $e.editing, k = N;
|
|
4051
4050
|
}
|
|
4052
|
-
function q(
|
|
4053
|
-
Object.values(
|
|
4051
|
+
function q(N, K) {
|
|
4052
|
+
Object.values(N.data).filter((Z) => Z.mode === Re.editing).forEach((Z) => {
|
|
4054
4053
|
K ? Z.accept() : Z.cancel(), Z.mode = Re.editable;
|
|
4055
|
-
}),
|
|
4054
|
+
}), N.status = $e.initial, k === N && (k = null);
|
|
4056
4055
|
}
|
|
4057
|
-
function X(
|
|
4058
|
-
r.value && d.value.editMode === "row" &&
|
|
4056
|
+
function X(N) {
|
|
4057
|
+
r.value && d.value.editMode === "row" && k !== N && (k && q(k, !1), B(N));
|
|
4059
4058
|
}
|
|
4060
|
-
function
|
|
4061
|
-
q(
|
|
4059
|
+
function V(N) {
|
|
4060
|
+
q(N, !0), N.status = $e.initial;
|
|
4062
4061
|
}
|
|
4063
|
-
function j(
|
|
4064
|
-
q(
|
|
4062
|
+
function j(N) {
|
|
4063
|
+
q(N, !1), N.status = $e.initial;
|
|
4065
4064
|
}
|
|
4066
|
-
function Q(
|
|
4065
|
+
function Q(N, K, Z) {
|
|
4067
4066
|
const ae = K.dataType, E = K.editor || {
|
|
4068
|
-
type:
|
|
4067
|
+
type: f.get(ae) || "input-group"
|
|
4069
4068
|
};
|
|
4070
|
-
return !u.value && E.type === "text" && (E.type = "input-group"), E && g(
|
|
4069
|
+
return !u.value && E.type === "text" && (E.type = "input-group"), E && g(N.column) ? (E.type === "input-group" && (E.textAlign = K.align !== "center" && K.align !== "right" ? "left" : K.align, E.updateOn = "change"), E.type === "number-spinner" && (E.updateOn = "change"), E.type === "textarea" && (E.lineBreak = "alt enter"), E.context = {
|
|
4071
4070
|
rowData: Z.raw,
|
|
4072
4071
|
column: K,
|
|
4073
|
-
cell:
|
|
4072
|
+
cell: N,
|
|
4074
4073
|
editor: c
|
|
4075
4074
|
}, E.readonly = !1, W(un, {
|
|
4076
4075
|
focusOnCreated: e.focusOnEditingCell,
|
|
4077
4076
|
selectOnCreated: e.selectOnEditingCell,
|
|
4078
4077
|
editor: E,
|
|
4079
|
-
modelValue:
|
|
4080
|
-
"onUpdate:modelValue": (F) =>
|
|
4078
|
+
modelValue: N.editingData,
|
|
4079
|
+
"onUpdate:modelValue": (F) => N.editingData = F,
|
|
4081
4080
|
id: K.id,
|
|
4082
4081
|
onMousedown: (F) => L(F),
|
|
4083
4082
|
onMouseup: (F) => A(F)
|
|
4084
|
-
}, null)) :
|
|
4083
|
+
}, null)) : N.data;
|
|
4085
4084
|
}
|
|
4086
|
-
function
|
|
4087
|
-
y(
|
|
4085
|
+
function M() {
|
|
4086
|
+
y(a);
|
|
4088
4087
|
}
|
|
4089
4088
|
pe(() => e.editable, () => {
|
|
4090
4089
|
r.value = e.editable;
|
|
4091
4090
|
}), pe(() => {
|
|
4092
|
-
var
|
|
4093
|
-
return (
|
|
4094
|
-
}, (
|
|
4095
|
-
d.value.editMode =
|
|
4091
|
+
var N;
|
|
4092
|
+
return (N = e.editOption) == null ? void 0 : N.editMode;
|
|
4093
|
+
}, (N) => {
|
|
4094
|
+
d.value.editMode = N;
|
|
4096
4095
|
});
|
|
4097
4096
|
function U() {
|
|
4098
|
-
|
|
4097
|
+
a = null, k = null, p = null, x = null, document.body.removeEventListener("click", w, !0);
|
|
4099
4098
|
}
|
|
4100
4099
|
return {
|
|
4101
4100
|
clear: U,
|
|
@@ -4103,28 +4102,28 @@ function rl(e, n, l, a, _) {
|
|
|
4103
4102
|
onClickCell: S,
|
|
4104
4103
|
onClickCellByKeyboard: i,
|
|
4105
4104
|
onEditingRow: X,
|
|
4106
|
-
acceptEditingRow:
|
|
4105
|
+
acceptEditingRow: V,
|
|
4107
4106
|
cancelEditingRow: j,
|
|
4108
4107
|
getEditingSnapshot: T,
|
|
4109
4108
|
getEditor: Q,
|
|
4110
|
-
endEditCell:
|
|
4109
|
+
endEditCell: M,
|
|
4111
4110
|
onMousedownCell: L,
|
|
4112
4111
|
onMouseupCell: A
|
|
4113
4112
|
};
|
|
4114
4113
|
}
|
|
4115
4114
|
function ll(e) {
|
|
4116
4115
|
const n = G(e.idField);
|
|
4117
|
-
function l(
|
|
4118
|
-
if (
|
|
4119
|
-
const _ =
|
|
4116
|
+
function l(o) {
|
|
4117
|
+
if (o && o.length) {
|
|
4118
|
+
const _ = o[0];
|
|
4120
4119
|
Object.keys(_).includes(n.value) || (n.value = "__fv_indetify__");
|
|
4121
4120
|
}
|
|
4122
4121
|
}
|
|
4123
4122
|
return { idField: n, reviseIdentifyField: l };
|
|
4124
4123
|
}
|
|
4125
|
-
function il(e, n, l,
|
|
4126
|
-
const { addNewDataItemAtLast: r } = l, { columnContext: d } =
|
|
4127
|
-
function
|
|
4124
|
+
function il(e, n, l, o, _, h) {
|
|
4125
|
+
const { addNewDataItemAtLast: r } = l, { columnContext: d } = o, { onClickCell: u, onClickOutOfCell: b, onClickCellByKeyboard: v } = _;
|
|
4126
|
+
function f(p, x) {
|
|
4128
4127
|
const T = d.value.primaryColumns.findIndex((t) => t.field === p.field), c = p.parent, g = c.index, O = d.value.primaryColumns.length - 1, m = h.value.length - 1, y = T === O, w = g === m;
|
|
4129
4128
|
if (T > -1 && !y) {
|
|
4130
4129
|
const t = d.value.primaryColumns[T + 1], i = c.data[t.field];
|
|
@@ -4143,14 +4142,14 @@ function il(e, n, l, a, _, h) {
|
|
|
4143
4142
|
n.emit("enterUpInLastCell");
|
|
4144
4143
|
}
|
|
4145
4144
|
}
|
|
4146
|
-
function
|
|
4145
|
+
function a(p, x) {
|
|
4147
4146
|
const T = d.value.primaryColumns.findIndex((m) => m.field === p.field), c = p.parent, g = d.value.primaryColumns.length - 1;
|
|
4148
4147
|
if (T > 0 && T <= g) {
|
|
4149
4148
|
const m = d.value.primaryColumns[T - 1], y = c.data[m.field];
|
|
4150
4149
|
u(x, y, c, m);
|
|
4151
4150
|
}
|
|
4152
4151
|
}
|
|
4153
|
-
function
|
|
4152
|
+
function k(p) {
|
|
4154
4153
|
const { key: x, shiftKey: T, altKey: c } = p;
|
|
4155
4154
|
(x === "ArrowDown" || x === "ArrowUp") && (T || p.preventDefault());
|
|
4156
4155
|
}
|
|
@@ -4161,125 +4160,125 @@ function il(e, n, l, a, _, h) {
|
|
|
4161
4160
|
return;
|
|
4162
4161
|
}
|
|
4163
4162
|
if (T === "Tab" && !c && !g) {
|
|
4164
|
-
p.preventDefault(),
|
|
4163
|
+
p.preventDefault(), f(x, p);
|
|
4165
4164
|
return;
|
|
4166
4165
|
}
|
|
4167
4166
|
if (c && T === "Tab") {
|
|
4168
|
-
p.preventDefault(),
|
|
4167
|
+
p.preventDefault(), a(x, p);
|
|
4169
4168
|
return;
|
|
4170
4169
|
}
|
|
4171
4170
|
}
|
|
4172
|
-
return { navigateOnKeyUp: s, navigateOnKeyDown:
|
|
4171
|
+
return { navigateOnKeyUp: s, navigateOnKeyDown: k };
|
|
4173
4172
|
}
|
|
4174
|
-
function al(e, n, l,
|
|
4175
|
-
const { idField: _ } =
|
|
4173
|
+
function al(e, n, l, o) {
|
|
4174
|
+
const { idField: _ } = o, {
|
|
4176
4175
|
currentSelectedDataId: h,
|
|
4177
4176
|
multiSelectOnClickRow: r,
|
|
4178
4177
|
multiSelectOnClickRowWithShift: d,
|
|
4179
4178
|
selectItem: u,
|
|
4180
4179
|
selectedValues: b,
|
|
4181
|
-
toggleSelectItem:
|
|
4182
|
-
updateSelectAllStatus:
|
|
4183
|
-
enableSelectRow:
|
|
4184
|
-
multiSelectMode:
|
|
4180
|
+
toggleSelectItem: v,
|
|
4181
|
+
updateSelectAllStatus: f,
|
|
4182
|
+
enableSelectRow: a,
|
|
4183
|
+
multiSelectMode: k,
|
|
4185
4184
|
isSingleSelect: s,
|
|
4186
4185
|
getSelectedItems: p
|
|
4187
4186
|
} = l, x = G(0), T = G(-1);
|
|
4188
|
-
function c(
|
|
4189
|
-
h.value =
|
|
4187
|
+
function c(V) {
|
|
4188
|
+
h.value = V;
|
|
4190
4189
|
}
|
|
4191
|
-
function g(
|
|
4192
|
-
return
|
|
4190
|
+
function g(V) {
|
|
4191
|
+
return V.raw[_.value] === h.value;
|
|
4193
4192
|
}
|
|
4194
|
-
function O(
|
|
4193
|
+
function O(V, j) {
|
|
4195
4194
|
var U;
|
|
4196
|
-
const Q = j ??
|
|
4197
|
-
"fv-grid-row":
|
|
4198
|
-
"fv-grid-group-row":
|
|
4199
|
-
"fv-grid-summary-row":
|
|
4195
|
+
const Q = j ?? V.dataIndex, M = {
|
|
4196
|
+
"fv-grid-row": V.type === rt.data,
|
|
4197
|
+
"fv-grid-group-row": V.type === rt.group,
|
|
4198
|
+
"fv-grid-summary-row": V.type === rt.summary,
|
|
4200
4199
|
"fv-grid-row-hover": Q === T.value,
|
|
4201
|
-
"fv-grid-row-selected": g(
|
|
4200
|
+
"fv-grid-row-selected": g(V),
|
|
4202
4201
|
"fv-grid-row-odd": Q % 2 > 0,
|
|
4203
4202
|
"fv-grid-row-even": Q % 2 === 0,
|
|
4204
|
-
"fv-grid-disabled":
|
|
4203
|
+
"fv-grid-disabled": V.disabled
|
|
4205
4204
|
};
|
|
4206
4205
|
if ((U = e.rowOption) != null && U.customRowStyle) {
|
|
4207
|
-
const C = e.rowOption.customRowStyle(
|
|
4208
|
-
return Object.assign({},
|
|
4206
|
+
const C = e.rowOption.customRowStyle(V.raw) || {};
|
|
4207
|
+
return Object.assign({}, M, C.class || {});
|
|
4209
4208
|
}
|
|
4210
|
-
return
|
|
4209
|
+
return M;
|
|
4211
4210
|
}
|
|
4212
|
-
function m(
|
|
4213
|
-
var
|
|
4211
|
+
function m(V, j) {
|
|
4212
|
+
var M;
|
|
4214
4213
|
const Q = {
|
|
4215
4214
|
"fv-grid-cell": !0
|
|
4216
4215
|
};
|
|
4217
|
-
if ((
|
|
4218
|
-
const U = e.rowOption.customCellStyle(
|
|
4216
|
+
if ((M = e.rowOption) != null && M.customCellStyle) {
|
|
4217
|
+
const U = e.rowOption.customCellStyle(V, j) || {};
|
|
4219
4218
|
return Object.assign({}, Q, U.class || {});
|
|
4220
4219
|
}
|
|
4221
4220
|
return Q;
|
|
4222
4221
|
}
|
|
4223
|
-
function y(
|
|
4224
|
-
var
|
|
4222
|
+
function y(V, j) {
|
|
4223
|
+
var M;
|
|
4225
4224
|
const Q = {
|
|
4226
4225
|
"fv-grid-hierarchy-cell": !0
|
|
4227
4226
|
};
|
|
4228
|
-
if ((
|
|
4229
|
-
const U = e.rowOption.customCellStyle(
|
|
4227
|
+
if ((M = e.rowOption) != null && M.customCellStyle) {
|
|
4228
|
+
const U = e.rowOption.customCellStyle(V, j) || {};
|
|
4230
4229
|
return Object.assign({}, Q, U.class || {});
|
|
4231
4230
|
}
|
|
4232
4231
|
return Q;
|
|
4233
4232
|
}
|
|
4234
|
-
function w(
|
|
4235
|
-
const j = h.value, Q =
|
|
4236
|
-
c(Q), j !== Q && n.emit("selectionChange", [
|
|
4233
|
+
function w(V) {
|
|
4234
|
+
const j = h.value, Q = V.raw[_.value];
|
|
4235
|
+
c(Q), j !== Q && n.emit("selectionChange", [V.raw], { id: Q, data: V.raw });
|
|
4237
4236
|
}
|
|
4238
|
-
function t(
|
|
4237
|
+
function t(V, j) {
|
|
4239
4238
|
var U, C;
|
|
4240
4239
|
if (d.value && !(j != null && j.shiftKey) || s.value) {
|
|
4241
|
-
(U = e.selection) != null && U.keepSelectingOnClick ? u(
|
|
4240
|
+
(U = e.selection) != null && U.keepSelectingOnClick ? u(V) : v(V, (C = e.selection) == null ? void 0 : C.keepSelectingOnClick), f();
|
|
4242
4241
|
return;
|
|
4243
4242
|
}
|
|
4244
4243
|
if (d.value && (j == null ? void 0 : j.shiftKey) || r.value) {
|
|
4245
|
-
|
|
4244
|
+
v(V), f();
|
|
4246
4245
|
return;
|
|
4247
4246
|
}
|
|
4248
4247
|
}
|
|
4249
|
-
function i(
|
|
4250
|
-
j.disabled || (n.emit("clickRow", j.index, j.raw), w(j), t(j,
|
|
4248
|
+
function i(V, j) {
|
|
4249
|
+
j.disabled || (n.emit("clickRow", j.index, j.raw), w(j), t(j, V));
|
|
4251
4250
|
}
|
|
4252
|
-
function S(
|
|
4251
|
+
function S(V) {
|
|
4253
4252
|
x.value += 1, setTimeout(() => {
|
|
4254
|
-
x.value === 1 && n.emit("clickRow",
|
|
4255
|
-
}, 250), x.value > 1 && (n.emit("doubleClickRow",
|
|
4253
|
+
x.value === 1 && n.emit("clickRow", V.index, V.raw), x.value = 0;
|
|
4254
|
+
}, 250), x.value > 1 && (n.emit("doubleClickRow", V.index, V.raw), x.value = 0);
|
|
4256
4255
|
}
|
|
4257
|
-
function L(
|
|
4258
|
-
j.disabled || (S(j), w(j), t(j,
|
|
4256
|
+
function L(V, j) {
|
|
4257
|
+
j.disabled || (S(j), w(j), t(j, V));
|
|
4259
4258
|
}
|
|
4260
|
-
function A(
|
|
4261
|
-
|
|
4259
|
+
function A(V) {
|
|
4260
|
+
V.disabled || S(V);
|
|
4262
4261
|
}
|
|
4263
|
-
function B(
|
|
4262
|
+
function B(V, j) {
|
|
4264
4263
|
}
|
|
4265
|
-
function q(
|
|
4264
|
+
function q(V, j) {
|
|
4266
4265
|
}
|
|
4267
|
-
function X(
|
|
4266
|
+
function X(V, j) {
|
|
4268
4267
|
var U;
|
|
4269
|
-
const Q = j ??
|
|
4268
|
+
const Q = j ?? V.dataIndex, M = {
|
|
4270
4269
|
"fv-grid-sidebar-row": !0,
|
|
4271
4270
|
"fv-grid-sidebar-row-hover": Q === T.value,
|
|
4272
|
-
"fv-grid-sidebar-row-selected": g(
|
|
4271
|
+
"fv-grid-sidebar-row-selected": g(V),
|
|
4273
4272
|
"fv-grid-sidebar-row-odd": Q % 2 > 0,
|
|
4274
4273
|
"fv-grid-sidebar-row-even": Q % 2 === 0,
|
|
4275
4274
|
"d-flex": !0,
|
|
4276
4275
|
"align-items-center": !0
|
|
4277
4276
|
};
|
|
4278
4277
|
if ((U = e.rowOption) != null && U.customRowStyle) {
|
|
4279
|
-
const C = e.rowOption.customRowStyle(
|
|
4280
|
-
return Object.assign({},
|
|
4278
|
+
const C = e.rowOption.customRowStyle(V.raw) || {};
|
|
4279
|
+
return Object.assign({}, M, C.class || {});
|
|
4281
4280
|
}
|
|
4282
|
-
return
|
|
4281
|
+
return M;
|
|
4283
4282
|
}
|
|
4284
4283
|
return {
|
|
4285
4284
|
activeRowById: c,
|
|
@@ -4296,13 +4295,13 @@ function al(e, n, l, a) {
|
|
|
4296
4295
|
onMouseoutRow: q
|
|
4297
4296
|
};
|
|
4298
4297
|
}
|
|
4299
|
-
function ol(e, n, l,
|
|
4300
|
-
const { idField: h } = l, { dataView: r, getSelectionItems: d } = n, u = G(""), b = Y(() => e.selection.enableSelectRow),
|
|
4298
|
+
function ol(e, n, l, o, _) {
|
|
4299
|
+
const { idField: h } = l, { dataView: r, getSelectionItems: d } = n, u = G(""), b = Y(() => e.selection.enableSelectRow), v = G(e.selection.multiSelect ?? !1), f = G(e.selection.multiSelectMode || "DependOnCheck"), a = G(e.selection.showCheckbox), k = G(e.selection.showSelectAll), s = G(e.selectionValues || []), p = Y(() => e.selection.showSelection), x = Y(() => {
|
|
4301
4300
|
var I;
|
|
4302
4301
|
return ((I = e.selection) == null ? void 0 : I.keepSelectingOnPaging) === void 0 ? !0 : e.selection.keepSelectingOnPaging;
|
|
4303
|
-
}), T = G(!!s.value.length &&
|
|
4302
|
+
}), T = G(!!s.value.length && o.value.length === s.value.length), c = G(!!s.value.length && o.value.length !== s.value.length);
|
|
4304
4303
|
pe(() => e.selection.showSelectAll, (I, ne) => {
|
|
4305
|
-
I !== ne && (
|
|
4304
|
+
I !== ne && (k.value = I);
|
|
4306
4305
|
});
|
|
4307
4306
|
function g() {
|
|
4308
4307
|
if (!x.value) {
|
|
@@ -4318,7 +4317,7 @@ function ol(e, n, l, a, _) {
|
|
|
4318
4317
|
return d(s.value);
|
|
4319
4318
|
}
|
|
4320
4319
|
function y() {
|
|
4321
|
-
const I =
|
|
4320
|
+
const I = o.value.reduce((re, Se) => (re.set(Se.raw[h.value], Se), re), /* @__PURE__ */ new Map());
|
|
4322
4321
|
return s.value.map((re) => I.get(re)).filter((re) => !!re);
|
|
4323
4322
|
}
|
|
4324
4323
|
function w(I) {
|
|
@@ -4329,12 +4328,12 @@ function ol(e, n, l, a, _) {
|
|
|
4329
4328
|
(re = s.value) != null && re.length && Se.some((ee) => !s.value.includes(ee[h.value])) && (I.indeterminate = !0, I.raw.__fv_indeterminate__ = !0);
|
|
4330
4329
|
}
|
|
4331
4330
|
}
|
|
4332
|
-
const t = Y(() => b.value &&
|
|
4333
|
-
() => b.value && !
|
|
4331
|
+
const t = Y(() => b.value && v.value), i = Y(
|
|
4332
|
+
() => b.value && !v.value && !a.value
|
|
4334
4333
|
), S = Y(() => !!e.hierarchy), L = Y(() => {
|
|
4335
|
-
const I =
|
|
4334
|
+
const I = a.value && f.value === "DependOnCheck";
|
|
4336
4335
|
return t.value && I;
|
|
4337
|
-
}), A = Y(() => t.value && !
|
|
4336
|
+
}), A = Y(() => t.value && !a.value), B = Y(() => t.value && a.value && f.value === "OnCheckAndClick");
|
|
4338
4337
|
Y(() => B.value);
|
|
4339
4338
|
function q() {
|
|
4340
4339
|
const I = d(s.value);
|
|
@@ -4343,33 +4342,33 @@ function ol(e, n, l, a, _) {
|
|
|
4343
4342
|
function X(I) {
|
|
4344
4343
|
_.emit("unSelectItem", I);
|
|
4345
4344
|
}
|
|
4346
|
-
function
|
|
4345
|
+
function V(I) {
|
|
4347
4346
|
_.emit("selectItem", I);
|
|
4348
4347
|
}
|
|
4349
4348
|
function j() {
|
|
4350
|
-
const I =
|
|
4351
|
-
|
|
4349
|
+
const I = o.value.filter((re) => re.indeterminate).map((re) => re.raw[h.value]);
|
|
4350
|
+
o.value.forEach((re) => {
|
|
4352
4351
|
re.checked = !1, re.indeterminate = !1, re.raw.__fv_checked__ = !1, re.raw.__fv_indeterminate__ = !1;
|
|
4353
4352
|
}), y().forEach((re) => {
|
|
4354
4353
|
re.checked = !0, re.raw.__fv_checked__ = !0;
|
|
4355
4354
|
}), I.forEach((re) => {
|
|
4356
|
-
const Se =
|
|
4355
|
+
const Se = o.value.find((P) => P.raw[h.value] === re);
|
|
4357
4356
|
w(Se);
|
|
4358
4357
|
});
|
|
4359
4358
|
}
|
|
4360
|
-
pe(() =>
|
|
4359
|
+
pe(() => o.value, () => {
|
|
4361
4360
|
j();
|
|
4362
4361
|
}), pe(() => e.selectionValues, (I) => {
|
|
4363
4362
|
s.value = I, j();
|
|
4364
4363
|
}, { immediate: !0 }), pe(() => e.selection, (I) => {
|
|
4365
|
-
|
|
4364
|
+
v.value = !!I.multiSelect, f.value = I.multiSelectMode || "DependOnCheck", a.value = !!I.showCheckbox;
|
|
4366
4365
|
});
|
|
4367
|
-
const Q = Y(() => !
|
|
4368
|
-
function
|
|
4366
|
+
const Q = Y(() => !v.value);
|
|
4367
|
+
function M(I) {
|
|
4369
4368
|
return I.raw[h.value];
|
|
4370
4369
|
}
|
|
4371
4370
|
function U(I) {
|
|
4372
|
-
return s.value.findIndex((re) => re ===
|
|
4371
|
+
return s.value.findIndex((re) => re === M(I));
|
|
4373
4372
|
}
|
|
4374
4373
|
function C() {
|
|
4375
4374
|
y().forEach((re) => {
|
|
@@ -4378,7 +4377,7 @@ function ol(e, n, l, a, _) {
|
|
|
4378
4377
|
re.__fv_checked__ = !1;
|
|
4379
4378
|
}), s.value = [], u.value = "", O();
|
|
4380
4379
|
}
|
|
4381
|
-
function
|
|
4380
|
+
function N(I) {
|
|
4382
4381
|
const ne = I;
|
|
4383
4382
|
ne.__fv_checked__ = !0, ne.__fv_indeterminate__ = !1;
|
|
4384
4383
|
const re = new Set(s.value);
|
|
@@ -4392,7 +4391,7 @@ function ol(e, n, l, a, _) {
|
|
|
4392
4391
|
const ne = I.raw;
|
|
4393
4392
|
ne.__fv_checked__ = !0, ne.__fv_indeterminate__ = !1;
|
|
4394
4393
|
const re = new Set(s.value);
|
|
4395
|
-
re.add(ne[h.value]), s.value = Array.from(re.values()), g(), I.checked = !0, I.indeterminate = !1, q(),
|
|
4394
|
+
re.add(ne[h.value]), s.value = Array.from(re.values()), g(), I.checked = !0, I.indeterminate = !1, q(), V(I);
|
|
4396
4395
|
}
|
|
4397
4396
|
function ae(I) {
|
|
4398
4397
|
const ne = I.raw;
|
|
@@ -4422,30 +4421,30 @@ function ol(e, n, l, a, _) {
|
|
|
4422
4421
|
I.raw[h.value] !== u.value && (C(), E(I));
|
|
4423
4422
|
}
|
|
4424
4423
|
function fe(I) {
|
|
4425
|
-
const ne =
|
|
4424
|
+
const ne = o.value.find((re) => re.raw[h.value] === I);
|
|
4426
4425
|
if (ne)
|
|
4427
4426
|
ue(ne);
|
|
4428
4427
|
else {
|
|
4429
4428
|
const re = r.value.find((Se) => Se[h.value] === I);
|
|
4430
|
-
re &&
|
|
4429
|
+
re && N(re);
|
|
4431
4430
|
}
|
|
4432
4431
|
}
|
|
4433
4432
|
function ve(I) {
|
|
4434
|
-
const ne =
|
|
4433
|
+
const ne = o.value.filter((P) => I.includes(P.raw[h.value])), re = ne.map((P) => P.raw[h.value]), Se = r.value.filter((P) => {
|
|
4435
4434
|
const ee = P[h.value];
|
|
4436
4435
|
return !re.includes(ee) && I.includes(ee);
|
|
4437
4436
|
});
|
|
4438
4437
|
(ne.length || Se.length) && i.value && (u.value = I[0]), ne.forEach((P) => {
|
|
4439
4438
|
E(P);
|
|
4440
4439
|
}), Se.forEach((P) => {
|
|
4441
|
-
|
|
4440
|
+
N(P);
|
|
4442
4441
|
});
|
|
4443
4442
|
}
|
|
4444
4443
|
function oe(I) {
|
|
4445
4444
|
for (const ne of I) {
|
|
4446
4445
|
if (!s.value.includes(ne))
|
|
4447
4446
|
continue;
|
|
4448
|
-
const re =
|
|
4447
|
+
const re = o.value.find((Se) => Se.raw[h.value] === ne);
|
|
4449
4448
|
if (re)
|
|
4450
4449
|
F(re);
|
|
4451
4450
|
else {
|
|
@@ -4458,26 +4457,26 @@ function ol(e, n, l, a, _) {
|
|
|
4458
4457
|
), g();
|
|
4459
4458
|
}
|
|
4460
4459
|
function he() {
|
|
4461
|
-
|
|
4460
|
+
o.value.forEach((I) => {
|
|
4462
4461
|
const ne = I.raw;
|
|
4463
4462
|
ne.__fv_checked__ = !0, ne.__fv_indeterminate__ = !1;
|
|
4464
4463
|
const re = new Set(s.value);
|
|
4465
4464
|
re.add(ne[h.value]), s.value = Array.from(re.values()), g(), I.checked = !0, I.indeterminate = !1;
|
|
4466
4465
|
}), q();
|
|
4467
4466
|
}
|
|
4468
|
-
function
|
|
4469
|
-
|
|
4467
|
+
function Me() {
|
|
4468
|
+
o.value.forEach((I) => {
|
|
4470
4469
|
const ne = I.raw;
|
|
4471
4470
|
ne.__fv_checked__ = !1, ne.__fv_indeterminate__ = !1, s.value = s.value.filter((re) => re !== ne[h.value]), g(), I.checked = !1, I.indeterminate = !1;
|
|
4472
4471
|
}), q();
|
|
4473
4472
|
}
|
|
4474
4473
|
function Le() {
|
|
4475
|
-
return
|
|
4474
|
+
return o.value.find((I) => I.raw[h.value] === u.value);
|
|
4476
4475
|
}
|
|
4477
4476
|
return {
|
|
4478
4477
|
clearSelection: C,
|
|
4479
4478
|
currentSelectedDataId: u,
|
|
4480
|
-
enableMultiSelect:
|
|
4479
|
+
enableMultiSelect: v,
|
|
4481
4480
|
enableSelectRow: b,
|
|
4482
4481
|
findIndexInSelectedItems: U,
|
|
4483
4482
|
getSelectedItems: m,
|
|
@@ -4485,23 +4484,23 @@ function ol(e, n, l, a, _) {
|
|
|
4485
4484
|
indeterminate: H,
|
|
4486
4485
|
indeterminateDataItem: R,
|
|
4487
4486
|
isSelectingHirarchyItem: S,
|
|
4488
|
-
multiSelectMode:
|
|
4487
|
+
multiSelectMode: f,
|
|
4489
4488
|
multiSelectOnClickRow: B,
|
|
4490
4489
|
multiSelectOnClickRowWithShift: A,
|
|
4491
4490
|
multiSelectOnlyOnCheck: L,
|
|
4492
4491
|
select: E,
|
|
4493
4492
|
selectAll: he,
|
|
4494
4493
|
selectedValues: s,
|
|
4495
|
-
selectDataItem:
|
|
4494
|
+
selectDataItem: N,
|
|
4496
4495
|
selectItem: ue,
|
|
4497
4496
|
selectItemById: fe,
|
|
4498
4497
|
selectItemByIds: ve,
|
|
4499
|
-
showCheckBox:
|
|
4500
|
-
showSelectAll:
|
|
4498
|
+
showCheckBox: a,
|
|
4499
|
+
showSelectAll: k,
|
|
4501
4500
|
toggleSelectItem: ie,
|
|
4502
4501
|
toggleSelectItemWithoutRow: z,
|
|
4503
4502
|
unSelect: F,
|
|
4504
|
-
unSelectAll:
|
|
4503
|
+
unSelectAll: Me,
|
|
4505
4504
|
unSelectDataItem: K,
|
|
4506
4505
|
unSelectItemByIds: oe,
|
|
4507
4506
|
updateSelectAllStatus: O,
|
|
@@ -4515,18 +4514,18 @@ function ol(e, n, l, a, _) {
|
|
|
4515
4514
|
}
|
|
4516
4515
|
function sl(e, n) {
|
|
4517
4516
|
var x, T;
|
|
4518
|
-
const l = String(Date.now()),
|
|
4517
|
+
const l = String(Date.now()), o = 50, { showCheckBox: _, showSelectAll: h } = n, r = G(((x = e.rowNumber) == null ? void 0 : x.enable) ?? !1), d = Y(() => e.hierarchy && _.value && e.selection.enableSelectRow && e.selection.multiSelect ? !1 : _.value), u = G(r.value ? ((T = e.rowNumber) == null ? void 0 : T.width) ?? 36 : 0), b = G(d.value ? o : 0), v = Y(() => {
|
|
4519
4518
|
var c, g;
|
|
4520
|
-
return r.value ? ((c = e.rowNumber) == null ? void 0 : c.heading) === "序号" ?
|
|
4521
|
-
}),
|
|
4519
|
+
return r.value ? ((c = e.rowNumber) == null ? void 0 : c.heading) === "序号" ? Ve.getLocaleValue("datagrid.lineNumberTitle") : (g = e.rowNumber) == null ? void 0 : g.heading : "";
|
|
4520
|
+
}), f = Y(() => (d.value && !e.hierarchy ? Number(b.value) : 0) + (r.value ? Number(u.value) : 0));
|
|
4522
4521
|
pe(() => e.rowNumber, (c) => {
|
|
4523
4522
|
c && c.enable !== void 0 && (r.value = c.enable), c && c.width !== void 0 && (u.value = c.width);
|
|
4524
4523
|
});
|
|
4525
|
-
function
|
|
4524
|
+
function a(c) {
|
|
4526
4525
|
var O;
|
|
4527
4526
|
const g = {
|
|
4528
4527
|
top: `${c.top}px`,
|
|
4529
|
-
width: `${
|
|
4528
|
+
width: `${f.value}px`,
|
|
4530
4529
|
height: `${c.height || ""}px`
|
|
4531
4530
|
};
|
|
4532
4531
|
if ((O = e.rowOption) != null && O.customRowStyle) {
|
|
@@ -4535,8 +4534,8 @@ function sl(e, n) {
|
|
|
4535
4534
|
}
|
|
4536
4535
|
return g;
|
|
4537
4536
|
}
|
|
4538
|
-
const
|
|
4539
|
-
width: `${
|
|
4537
|
+
const k = Y(() => ({
|
|
4538
|
+
width: `${f.value}px`
|
|
4540
4539
|
}));
|
|
4541
4540
|
function s(c) {
|
|
4542
4541
|
return `${l}_${c.type}_r_${c.index}_${c.refreshKey || ""}`;
|
|
@@ -4544,19 +4543,19 @@ function sl(e, n) {
|
|
|
4544
4543
|
function p(c) {
|
|
4545
4544
|
return `${l}_${c.type}_r_${c.index}_${c.refreshKey || ""}`;
|
|
4546
4545
|
}
|
|
4547
|
-
return { showRowNumer: r, showSidebarCheckBox: d, sidebarCellPosition:
|
|
4546
|
+
return { showRowNumer: r, showSidebarCheckBox: d, sidebarCellPosition: a, sidebarCornerCellStyle: k, sidebarTitle: v, sidebarWidth: f, rowKey: p, cellKey: s };
|
|
4548
4547
|
}
|
|
4549
4548
|
const Qn = {
|
|
4550
4549
|
ascend: (e, n) => e === n ? 0 : e === !1 ? -1 : 1,
|
|
4551
4550
|
decend: (e, n) => e === n ? 0 : e === !0 ? -1 : 1
|
|
4552
4551
|
}, er = {
|
|
4553
4552
|
ascend: (e, n) => {
|
|
4554
|
-
const l = new Date(new Date(e).toLocaleDateString()).valueOf(),
|
|
4555
|
-
return l ===
|
|
4553
|
+
const l = new Date(new Date(e).toLocaleDateString()).valueOf(), o = new Date(new Date(n).toLocaleDateString()).valueOf();
|
|
4554
|
+
return l === o ? 0 : l < o ? -1 : 1;
|
|
4556
4555
|
},
|
|
4557
4556
|
decend: (e, n) => {
|
|
4558
|
-
const l = new Date(new Date(e).toLocaleDateString()).valueOf(),
|
|
4559
|
-
return l ===
|
|
4557
|
+
const l = new Date(new Date(e).toLocaleDateString()).valueOf(), o = new Date(new Date(n).toLocaleDateString()).valueOf();
|
|
4558
|
+
return l === o ? 0 : l < o ? 1 : -1;
|
|
4560
4559
|
}
|
|
4561
4560
|
}, tr = {
|
|
4562
4561
|
ascend: (e, n) => e === n ? 0 : e < n ? -1 : 1,
|
|
@@ -4581,25 +4580,25 @@ function ul(e) {
|
|
|
4581
4580
|
["numeric-sorter", tr],
|
|
4582
4581
|
["text-sorter", nr]
|
|
4583
4582
|
]);
|
|
4584
|
-
function
|
|
4583
|
+
function o(r) {
|
|
4585
4584
|
const d = (r == null ? void 0 : r.dataType) || "string", u = n.get(d) || "text-sorter";
|
|
4586
4585
|
return l.get(u) || (r == null ? void 0 : r.sorter);
|
|
4587
4586
|
}
|
|
4588
4587
|
function _(r) {
|
|
4589
|
-
return
|
|
4588
|
+
return o(r.column);
|
|
4590
4589
|
}
|
|
4591
4590
|
function h(r, d) {
|
|
4592
|
-
const u = _(r), b = (r.status & D.sortable) === D.sortable && (r.status & D.sorted) === D.sorted,
|
|
4591
|
+
const u = _(r), b = (r.status & D.sortable) === D.sortable && (r.status & D.sorted) === D.sorted, v = (r.status & D.ascending) === D.ascending, f = (r.status & D.descending) === D.descending;
|
|
4593
4592
|
if (b && u) {
|
|
4594
|
-
const
|
|
4595
|
-
|
|
4593
|
+
const a = v ? u.ascend : f ? u.decend : void 0;
|
|
4594
|
+
a ? d.addSorter(r.field, { field: r.field, compare: a }) : d.removeSorter(r.field);
|
|
4596
4595
|
} else
|
|
4597
4596
|
d.removeSorter(r.field);
|
|
4598
4597
|
}
|
|
4599
|
-
return { getSorterByColumn:
|
|
4598
|
+
return { getSorterByColumn: o, updateSorter: h };
|
|
4600
4599
|
}
|
|
4601
4600
|
function cl(e, n) {
|
|
4602
|
-
const l = xt("FLoadingService"),
|
|
4601
|
+
const l = xt("FLoadingService"), o = Y(() => typeof e.loading == "object" ? e.loading.show : e.loading), _ = Y(() => typeof e.loading == "object" ? e.loading.message : `${Ve.getLocaleValue("datagrid.loadingMessage")}...`);
|
|
4603
4602
|
let h;
|
|
4604
4603
|
function r() {
|
|
4605
4604
|
const d = {
|
|
@@ -4611,14 +4610,14 @@ function cl(e, n) {
|
|
|
4611
4610
|
};
|
|
4612
4611
|
return h = l.show(d), h;
|
|
4613
4612
|
}
|
|
4614
|
-
return pe(
|
|
4613
|
+
return pe(o, (d, u) => {
|
|
4615
4614
|
var b;
|
|
4616
4615
|
d !== u && (d ? r() : (b = h == null ? void 0 : h.value) == null || b.close());
|
|
4617
|
-
}), { showLoading:
|
|
4616
|
+
}), { showLoading: o, loadingMessage: _, renderLoading: r };
|
|
4618
4617
|
}
|
|
4619
4618
|
function dl(e) {
|
|
4620
|
-
function n(
|
|
4621
|
-
if (!(
|
|
4619
|
+
function n(o) {
|
|
4620
|
+
if (!(o.value.findIndex((h) => h.dataType === Xe) > -1)) {
|
|
4622
4621
|
const h = {
|
|
4623
4622
|
field: Nt,
|
|
4624
4623
|
width: mn,
|
|
@@ -4630,13 +4629,13 @@ function dl(e) {
|
|
|
4630
4629
|
resizable: !1,
|
|
4631
4630
|
visible: !0
|
|
4632
4631
|
};
|
|
4633
|
-
|
|
4632
|
+
o.value.push(h);
|
|
4634
4633
|
}
|
|
4635
4634
|
}
|
|
4636
|
-
function l(
|
|
4635
|
+
function l(o) {
|
|
4637
4636
|
if (!e.showSetting) {
|
|
4638
|
-
const _ =
|
|
4639
|
-
_ > -1 &&
|
|
4637
|
+
const _ = o.value.findIndex((h) => h.dataType === Xe);
|
|
4638
|
+
_ > -1 && o.value.splice(_, 1);
|
|
4640
4639
|
}
|
|
4641
4640
|
}
|
|
4642
4641
|
return { applyColumnSetting: n, removeColumnSetting: l };
|
|
@@ -4666,8 +4665,8 @@ export {
|
|
|
4666
4665
|
bn as getGridSettingsIconRender,
|
|
4667
4666
|
Er as getGroupPanel,
|
|
4668
4667
|
Rr as getHierarchyRow,
|
|
4669
|
-
|
|
4670
|
-
|
|
4668
|
+
Vr as getHorizontalScrollbar,
|
|
4669
|
+
Mr as getPagination,
|
|
4671
4670
|
yn as getSettingRender,
|
|
4672
4671
|
Ir as getSidebar,
|
|
4673
4672
|
Dr as getSummary,
|