@farris/ui-vue 1.8.5-beta.18 → 1.8.5-beta.19
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/batch-editor/index.esm.js +7183 -7160
- package/components/batch-editor/index.umd.cjs +19 -19
- package/components/button/index.esm.js +7187 -7164
- package/components/button/index.umd.cjs +19 -19
- package/components/data-grid/index.esm.js +415 -408
- package/components/data-grid/index.umd.cjs +2 -2
- package/components/data-view/index.esm.js +13150 -13108
- package/components/data-view/index.umd.cjs +21 -21
- package/components/mapping-editor/index.esm.js +897 -890
- package/components/mapping-editor/index.umd.cjs +2 -2
- package/components/tooltip/index.esm.js +241 -225
- package/components/tooltip/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +14440 -14398
- package/designer/data-grid/index.umd.cjs +27 -27
- package/designer/data-view/index.esm.js +4 -4
- package/designer/data-view/index.umd.cjs +4 -4
- package/designer/farris-designer.all.esm.js +5870 -5863
- package/designer/farris-designer.all.umd.cjs +14 -14
- package/farris.all.esm.js +13342 -13300
- package/farris.all.umd.cjs +40 -40
- package/package.json +1 -1
- package/themes/default/farris-variables.css +1 -1
- package/themes/mano/farris-variables.css +1 -1
- package/types/common/utils/measure-host.d.ts +18 -3
- package/types/data-view/composition/types.d.ts +7 -3
- package/types/data-view/composition/visualization/merge-cell-rule.d.ts +2 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useCommonUtils as
|
|
2
|
-
import { ref as de, computed as le, reactive as
|
|
3
|
-
import { useResizeObserver as
|
|
4
|
-
import { isPlainObject as
|
|
5
|
-
import { locatorGridGroup as
|
|
6
|
-
import
|
|
7
|
-
import { FButton as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
1
|
+
import { useCommonUtils as Et, resolveField as _n, useLocatorProps as Gn, getCustomClass as Mn, locatorAttrs as Nn, locatorChild as lt, withInstall as jn } from "../common/index.esm.js";
|
|
2
|
+
import { ref as de, computed as le, reactive as st, watch as Ne, createVNode as f, mergeProps as we, isVNode as gt, Comment as It, Fragment as dt, createTextVNode as it, defineComponent as Dt, onMounted as An, nextTick as Hn, onUnmounted as Rn, provide as zn, getCurrentInstance as Ln } from "vue";
|
|
3
|
+
import { useResizeObserver as Wn } from "@vueuse/core";
|
|
4
|
+
import { isPlainObject as kt, cloneDeep as Bt } from "lodash-es";
|
|
5
|
+
import { locatorGridGroup as Vt, locatorGridRowId as _t, locatorGridRow as Gt, locatorGridCell as Mt, locatorChild as Nt, SETTING_COLUMN_FIELD as $n, COMMAND_COLUMN_FIELD as Un, resolveEnumDisplayText as jt, CellMode as At, SETTING_COLUMN_DATA_TYPE as Ye, COMMAND_COLUMN_DATA_TYPE as qe, useScreen as Yn, useIdentify as qn, useGroupData as Xn, useFilter as Jn, useHierarchy as Qn, useLoading as Zn, useDataView as Kn, usePagination as eo, useSelection as to, useDataViewContainerStyle as no, useCommandColumn as oo, useSettingColumn as ro, useColumn as io, useSort as ao, useGroupColumn as lo, useRow as uo, useEdit as so, useVisualDataBound as co, useVisualDataCell as fo, useVisualDataRow as mo, useVisualGroupRow as po, useVisualSummaryRow as vo, useVisualData as go, useCellContentStyle as yo, useCellPosition as bo, useSidebar as Co, useVirtualScroll as ho, useFitColumn as So, useFilterHistory as wo, useColumnFilter as Fo, useDragColumn as To, resolvePreviewFixedColumns as xo, getColumnHeader as Oo, getPagination as ko, getSidebar as Bo, getDisableMask as Po, getSummary as Eo, getHorizontalScrollbar as Io, getVerticalScrollbar as Do, getFilterPanel as Vo, getGroupPanel as _o, useAdapt as Go, useNavigation as Mo, getEmpty as No, ColumnSettingSolution as jo, refreshScrollAfterDataSourceLoad as Ao, applyReassignRowData as Ho } from "../data-view/index.esm.js";
|
|
6
|
+
import Ro, { FDynamicForm as zo, FDynamicFormLabel as Lo } from "../dynamic-form/index.esm.js";
|
|
7
|
+
import { FButton as Pt } from "../button/index.esm.js";
|
|
8
|
+
import Wo from "../drawer/index.esm.js";
|
|
9
|
+
function Ht(e, n) {
|
|
10
10
|
let o;
|
|
11
11
|
function u(d) {
|
|
12
|
-
const { properties: S, title: C, ignore: v } = d, g = v && Array.isArray(v), c = Object.keys(S).reduce((h, G) => ((!g || !v.find((L) => L === G)) && (h[G] = S[G].type === "object" && S[G].properties ? u(S[G]) :
|
|
12
|
+
const { properties: S, title: C, ignore: v } = d, g = v && Array.isArray(v), c = Object.keys(S).reduce((h, G) => ((!g || !v.find((L) => L === G)) && (h[G] = S[G].type === "object" && S[G].properties ? u(S[G]) : Bt(S[G].default)), h), {});
|
|
13
13
|
if (C && (!g || !v.find((h) => h === "id"))) {
|
|
14
14
|
const h = C.toLowerCase().replace(/-/g, "_");
|
|
15
15
|
c.id = `${h}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -19,7 +19,7 @@ function jt(e, n) {
|
|
|
19
19
|
function b(d) {
|
|
20
20
|
const { properties: S, title: C, required: v } = d;
|
|
21
21
|
if (v && Array.isArray(v)) {
|
|
22
|
-
const g = v.reduce((c, h) => (c[h] = S[h].type === "object" && S[h].properties ? u(S[h]) :
|
|
22
|
+
const g = v.reduce((c, h) => (c[h] = S[h].type === "object" && S[h].properties ? u(S[h]) : Bt(S[h].default), c), {});
|
|
23
23
|
if (C && v.find((c) => c === "id")) {
|
|
24
24
|
const c = C.toLowerCase().replace(/-/g, "_");
|
|
25
25
|
g.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -41,7 +41,7 @@ function jt(e, n) {
|
|
|
41
41
|
}
|
|
42
42
|
function z(d, S) {
|
|
43
43
|
const C = u(S);
|
|
44
|
-
return Object.keys(C).reduce((v, g) => (Object.prototype.hasOwnProperty.call(d, g) && (v[g] &&
|
|
44
|
+
return Object.keys(C).reduce((v, g) => (Object.prototype.hasOwnProperty.call(d, g) && (v[g] && kt(v[g]) && kt(d[g] || !d[g]) ? Object.assign(v[g], d[g] || {}) : v[g] = d[g]), v), C), C;
|
|
45
45
|
}
|
|
46
46
|
function Q(d, S) {
|
|
47
47
|
return Object.keys(d).filter((v) => d[v] != null).reduce((v, g) => {
|
|
@@ -83,8 +83,8 @@ function jt(e, n) {
|
|
|
83
83
|
}
|
|
84
84
|
return { getSchemaByType: y, resolveSchemaWithDefaultValue: F, resolveSchemaToProps: N, mappingSchemaToProps: Q, setDesignerContext: B };
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
function
|
|
86
|
+
const $o = {}, Uo = {}, { resolveSchemaWithDefaultValue: Yo } = Ht($o, Uo);
|
|
87
|
+
function qo(e = {}) {
|
|
88
88
|
function n(F, B, d, S) {
|
|
89
89
|
if (typeof d == "number")
|
|
90
90
|
return S[F].length === d;
|
|
@@ -138,19 +138,19 @@ function Uo(e = {}) {
|
|
|
138
138
|
}
|
|
139
139
|
return { parseValueSchema: N };
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const Xo = {
|
|
142
142
|
convertTo: (e, n, o, u) => {
|
|
143
143
|
e.appearance || (e.appearance = {}), e.appearance[n] = o;
|
|
144
144
|
},
|
|
145
145
|
convertFrom: (e, n, o) => e.appearance ? e.appearance[n] : e[n]
|
|
146
|
-
},
|
|
146
|
+
}, Jo = {
|
|
147
147
|
convertFrom: (e, n, o) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
148
|
-
},
|
|
148
|
+
}, Qo = {
|
|
149
149
|
convertTo: (e, n, o, u) => {
|
|
150
150
|
e.editor && (e.editor[n] = o);
|
|
151
151
|
},
|
|
152
152
|
convertFrom: (e, n, o) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, n) ? e.editor[n] : e[n]
|
|
153
|
-
},
|
|
153
|
+
}, Zo = {
|
|
154
154
|
button: { type: "button", name: "按钮" },
|
|
155
155
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
156
156
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -216,18 +216,18 @@ const Yo = {
|
|
|
216
216
|
step: { type: "step", name: "步骤条", icon: "step" },
|
|
217
217
|
"dynamic-form": { type: "dynamic-form", name: "动态表单" },
|
|
218
218
|
"field-search-box": { type: "field-search-box", name: "智能搜索框", icon: "input-group" }
|
|
219
|
-
},
|
|
219
|
+
}, Ko = {
|
|
220
220
|
convertFrom: (e, n, o) => {
|
|
221
221
|
var b;
|
|
222
222
|
const u = e.editor && e.editor[n] ? e.editor[n] : e[n];
|
|
223
|
-
return ((b =
|
|
223
|
+
return ((b = Zo[u]) == null ? void 0 : b.name) || u;
|
|
224
224
|
}
|
|
225
|
-
},
|
|
225
|
+
}, er = {
|
|
226
226
|
convertTo: (e, n, o, u) => {
|
|
227
227
|
e[n] = e[n];
|
|
228
228
|
},
|
|
229
229
|
convertFrom: (e, n, o) => e.editor ? o.getRealEditorType(e.editor.type) : ""
|
|
230
|
-
},
|
|
230
|
+
}, tr = {
|
|
231
231
|
convertTo: (e, n, o, u) => {
|
|
232
232
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[n] = o : e.formatter = {
|
|
233
233
|
[n]: o
|
|
@@ -258,7 +258,7 @@ const Yo = {
|
|
|
258
258
|
}
|
|
259
259
|
return "none";
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, nr = {
|
|
262
262
|
convertTo: (e, n, o, u) => {
|
|
263
263
|
e.command ? e.command[n] = o : e.command = {
|
|
264
264
|
[n]: o
|
|
@@ -311,7 +311,7 @@ const Yo = {
|
|
|
311
311
|
}
|
|
312
312
|
return "";
|
|
313
313
|
}
|
|
314
|
-
},
|
|
314
|
+
}, or = {
|
|
315
315
|
convertTo: (e, n, o, u) => {
|
|
316
316
|
if (e.column || (e.column = {}), n === "fitMode") {
|
|
317
317
|
o && o !== "none" ? (e.column.fitColumns = !0, e.column.fitMode = o) : (e.column.fitColumns = !1, e.column.fitMode = "average");
|
|
@@ -334,7 +334,7 @@ const Yo = {
|
|
|
334
334
|
}
|
|
335
335
|
return n === "fitMode" ? "none" : "";
|
|
336
336
|
}
|
|
337
|
-
},
|
|
337
|
+
}, rr = {
|
|
338
338
|
convertTo: (e, n, o, u) => {
|
|
339
339
|
e.summary ? e.summary[n] = o : e.summary = {
|
|
340
340
|
[n]: o
|
|
@@ -347,7 +347,7 @@ const Yo = {
|
|
|
347
347
|
var u, b;
|
|
348
348
|
return n === "customSummaryStyle" ? e.summary.customSummaryStyle : n === "position" ? ((u = e.summary) == null ? void 0 : u[n]) || "bottom" : n === "customRender" ? ((b = e.summary) == null ? void 0 : b[n]) || "" : e.summary && n === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : "";
|
|
349
349
|
}
|
|
350
|
-
},
|
|
350
|
+
}, ir = {
|
|
351
351
|
convertTo: (e, n, o, u) => {
|
|
352
352
|
e.group ? e.group[n] = o : e.group = {
|
|
353
353
|
[n]: o
|
|
@@ -370,7 +370,7 @@ const Yo = {
|
|
|
370
370
|
return e.group.groupFields;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
},
|
|
373
|
+
}, ar = {
|
|
374
374
|
convertTo: (e, n, o, u) => {
|
|
375
375
|
e.column || (e.column = {}), e.column.groups = o || [];
|
|
376
376
|
},
|
|
@@ -379,7 +379,7 @@ const Yo = {
|
|
|
379
379
|
const u = ((b = e.column) == null ? void 0 : b.groups) || [];
|
|
380
380
|
return u.length ? `共 ${u.length} 个分组` : "未配置";
|
|
381
381
|
}
|
|
382
|
-
},
|
|
382
|
+
}, lr = {
|
|
383
383
|
convertFrom: (e, n) => e.binding ? e.binding.path : "",
|
|
384
384
|
convertTo: (e, n, o) => {
|
|
385
385
|
if (o && o.length > 0) {
|
|
@@ -387,7 +387,7 @@ const Yo = {
|
|
|
387
387
|
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = u.bindingField, e.binding.field = u.id, e.binding.fullPath = u.path, e.path = u.bindingPath;
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
},
|
|
390
|
+
}, ur = {
|
|
391
391
|
convertTo: (e, n, o, u) => {
|
|
392
392
|
if (e.pagination || (e.pagination = {}), n === "sizeLimits")
|
|
393
393
|
if (o == null)
|
|
@@ -405,12 +405,12 @@ const Yo = {
|
|
|
405
405
|
var u;
|
|
406
406
|
return e.pagination ? n === "sizeLimits" ? ((u = e.pagination.sizeLimits) == null ? void 0 : u.join(",")) ?? "" : e.pagination[n] : e[n];
|
|
407
407
|
}
|
|
408
|
-
},
|
|
408
|
+
}, sr = {
|
|
409
409
|
convertTo: (e, n, o, u) => {
|
|
410
410
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[n] = o;
|
|
411
411
|
},
|
|
412
412
|
convertFrom: (e, n, o) => e.rowNumber ? e.rowNumber[n] : e[n]
|
|
413
|
-
},
|
|
413
|
+
}, dr = {
|
|
414
414
|
convertTo: (e, n, o, u) => {
|
|
415
415
|
e.selection || (e.selection = {}), e.selection[n] = o;
|
|
416
416
|
},
|
|
@@ -421,7 +421,7 @@ const Yo = {
|
|
|
421
421
|
return n === "showCheckbox" && u == null && e.selection.multiSelect === !0 ? !0 : u;
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
|
-
function
|
|
424
|
+
function cr(e) {
|
|
425
425
|
const { formSchemaUtils: n, formStateMachineUtils: o } = e;
|
|
426
426
|
function u(N, F = "") {
|
|
427
427
|
return {
|
|
@@ -449,8 +449,8 @@ function sr(e) {
|
|
|
449
449
|
}
|
|
450
450
|
return { getVariables: y, getControlName: z, getStateMachines: Q };
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
const { getVariables: b, getControlName: y, getStateMachines: z } =
|
|
452
|
+
function fr(e, n, o, u) {
|
|
453
|
+
const { getVariables: b, getControlName: y, getStateMachines: z } = cr(e);
|
|
454
454
|
return (Q, N = [], F = {}, B = {}, d) => {
|
|
455
455
|
const S = N && N.length > 0 ? N : ["Const", "Variable", "StateMachine", "Expression"], C = {
|
|
456
456
|
type: "property-editor",
|
|
@@ -485,24 +485,24 @@ function dr(e, n, o, u) {
|
|
|
485
485
|
}), C;
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
const
|
|
488
|
+
const mr = {
|
|
489
489
|
convertFrom: (e, n, o) => e[n] && e[n].length ? `共 ${e[n].length} 项` : ""
|
|
490
|
-
},
|
|
490
|
+
}, pr = {
|
|
491
491
|
convertFrom: (e, n) => e[n] || "",
|
|
492
492
|
convertTo: (e, n, o) => {
|
|
493
493
|
e[n] = o;
|
|
494
494
|
}
|
|
495
|
-
},
|
|
495
|
+
}, vr = {
|
|
496
496
|
convertTo: (e, n, o, u) => {
|
|
497
497
|
e.size || (e.size = {}), e.size[n] = o;
|
|
498
498
|
},
|
|
499
499
|
convertFrom: (e, n, o) => e.size ? e.size[n] : e[n]
|
|
500
|
-
},
|
|
500
|
+
}, gr = {
|
|
501
501
|
convertFrom: (e, n, o) => {
|
|
502
502
|
var u, b;
|
|
503
503
|
return (u = e.formatter) != null && u.data && n === "formatterEnumData" && !e.formatterEnumData ? (b = e.formatter) == null ? void 0 : b.data : e.formatterEnumData;
|
|
504
504
|
}
|
|
505
|
-
},
|
|
505
|
+
}, yr = {
|
|
506
506
|
convertTo: (e, n, o, u) => {
|
|
507
507
|
e.sort || (e.sort = {}), e.sort[n] = o;
|
|
508
508
|
},
|
|
@@ -513,7 +513,7 @@ const cr = {
|
|
|
513
513
|
if (n === "multiSort")
|
|
514
514
|
return !!((b = e.sort) != null && b.multiSort);
|
|
515
515
|
}
|
|
516
|
-
},
|
|
516
|
+
}, br = {
|
|
517
517
|
convertTo: (e, n, o, u) => {
|
|
518
518
|
e.filter || (e.filter = {}), e.filter[n] = o, n === "enable" && (e.enableFilter = !1);
|
|
519
519
|
},
|
|
@@ -521,7 +521,7 @@ const cr = {
|
|
|
521
521
|
var u, b, y, z;
|
|
522
522
|
return n === "mode" ? ((u = e.filter) == null ? void 0 : u.mode) || "server" : n === "filterStyle" ? ((b = e.filter) == null ? void 0 : b.filterStyle) || "filter-column" : n === "enable" ? ((y = e.filter) == null ? void 0 : y.enable) !== void 0 ? !!e.filter.enable : !!e.enableFilter : ((z = e.filter) == null ? void 0 : z[n]) || void 0;
|
|
523
523
|
}
|
|
524
|
-
},
|
|
524
|
+
}, Cr = {
|
|
525
525
|
convertTo: (e, n, o, u) => {
|
|
526
526
|
e.rowOption ? e.rowOption[n] = o : e.rowOption = {
|
|
527
527
|
[n]: o
|
|
@@ -538,7 +538,7 @@ const cr = {
|
|
|
538
538
|
}
|
|
539
539
|
return "";
|
|
540
540
|
}
|
|
541
|
-
},
|
|
541
|
+
}, hr = {
|
|
542
542
|
convertTo: (e, n, o, u) => {
|
|
543
543
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[n] = o, n === "columnTemplateType" && o === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
544
544
|
<span class="f-pretend-link f-cursor-pointer"
|
|
@@ -552,7 +552,7 @@ const cr = {
|
|
|
552
552
|
</span>`), n === "columnTemplateType" && o === "default" && (e.columnTemplate = ""), n === "columnTemplateType" && o === "custom" && (e.columnTemplate = ""));
|
|
553
553
|
},
|
|
554
554
|
convertFrom: (e, n, o) => n === "columnTemplate" ? e.columnTemplate : n === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
555
|
-
},
|
|
555
|
+
}, Sr = {
|
|
556
556
|
convertTo: (e, n, o, u) => {
|
|
557
557
|
e.hierarchy || (e.hierarchy = {
|
|
558
558
|
cascadeOption: {}
|
|
@@ -562,7 +562,7 @@ const cr = {
|
|
|
562
562
|
var u, b;
|
|
563
563
|
return !!((b = (u = e.hierarchy) == null ? void 0 : u.cascadeOption) != null && b[n]);
|
|
564
564
|
}
|
|
565
|
-
},
|
|
565
|
+
}, wr = {
|
|
566
566
|
/**
|
|
567
567
|
* 从 schema.uploadOptions 读取子属性值,供属性面板展示
|
|
568
568
|
*/
|
|
@@ -574,33 +574,33 @@ const cr = {
|
|
|
574
574
|
e.uploadOptions || (e.uploadOptions = {}), e.uploadOptions[n] = o;
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
|
-
function
|
|
577
|
+
function Rt(e, n, o, u) {
|
|
578
578
|
const b = /* @__PURE__ */ new Map([
|
|
579
|
-
["/converter/appearance.converter",
|
|
580
|
-
["/converter/buttons.converter",
|
|
581
|
-
["/converter/property-editor.converter",
|
|
582
|
-
["/converter/items-count.converter",
|
|
583
|
-
["/converter/type.converter",
|
|
584
|
-
["/converter/change-editor.converter",
|
|
585
|
-
["/converter/change-formatter.converter",
|
|
586
|
-
["/converter/column-command.converter",
|
|
587
|
-
["/converter/column-option.converter",
|
|
588
|
-
["/converter/summary.converter",
|
|
589
|
-
["/converter/group.converter",
|
|
590
|
-
["/converter/header-group.converter",
|
|
591
|
-
["/converter/form-group-label.converter",
|
|
592
|
-
["/converter/field-selector.converter",
|
|
593
|
-
["/converter/pagination.converter",
|
|
594
|
-
["/converter/row-number.converter",
|
|
595
|
-
["/converter/grid-selection.converter",
|
|
596
|
-
["/converter/size.converter",
|
|
597
|
-
["/converter/change-formatter-enum.converter",
|
|
598
|
-
["/converter/grid-sort.converter",
|
|
599
|
-
["/converter/grid-filter.converter",
|
|
600
|
-
["/converter/row-option.converter",
|
|
601
|
-
["/converter/change-formatter-type.converter",
|
|
602
|
-
["/converter/upload-options.converter",
|
|
603
|
-
["/converter/tree-auto-check.converter",
|
|
579
|
+
["/converter/appearance.converter", Xo],
|
|
580
|
+
["/converter/buttons.converter", Jo],
|
|
581
|
+
["/converter/property-editor.converter", Qo],
|
|
582
|
+
["/converter/items-count.converter", mr],
|
|
583
|
+
["/converter/type.converter", Ko],
|
|
584
|
+
["/converter/change-editor.converter", er],
|
|
585
|
+
["/converter/change-formatter.converter", tr],
|
|
586
|
+
["/converter/column-command.converter", nr],
|
|
587
|
+
["/converter/column-option.converter", or],
|
|
588
|
+
["/converter/summary.converter", rr],
|
|
589
|
+
["/converter/group.converter", ir],
|
|
590
|
+
["/converter/header-group.converter", ar],
|
|
591
|
+
["/converter/form-group-label.converter", pr],
|
|
592
|
+
["/converter/field-selector.converter", lr],
|
|
593
|
+
["/converter/pagination.converter", ur],
|
|
594
|
+
["/converter/row-number.converter", sr],
|
|
595
|
+
["/converter/grid-selection.converter", dr],
|
|
596
|
+
["/converter/size.converter", vr],
|
|
597
|
+
["/converter/change-formatter-enum.converter", gr],
|
|
598
|
+
["/converter/grid-sort.converter", yr],
|
|
599
|
+
["/converter/grid-filter.converter", br],
|
|
600
|
+
["/converter/row-option.converter", Cr],
|
|
601
|
+
["/converter/change-formatter-type.converter", hr],
|
|
602
|
+
["/converter/upload-options.converter", wr],
|
|
603
|
+
["/converter/tree-auto-check.converter", Sr]
|
|
604
604
|
]), y = /* @__PURE__ */ new Map([
|
|
605
605
|
["string", { type: "input-group", enableClear: !1 }],
|
|
606
606
|
["boolean", {
|
|
@@ -626,7 +626,7 @@ function At(e, n, o, u) {
|
|
|
626
626
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
627
627
|
["events-editor", { type: "events-editor", hide: !0 }],
|
|
628
628
|
["multiLanguage", { type: "language-textbox" }]
|
|
629
|
-
]), z =
|
|
629
|
+
]), z = qo();
|
|
630
630
|
function Q(g, c) {
|
|
631
631
|
return () => z.parseValueSchema(g, c);
|
|
632
632
|
}
|
|
@@ -695,7 +695,7 @@ function At(e, n, o, u) {
|
|
|
695
695
|
if (Z && (h != null && h.getDesignerHostService)) {
|
|
696
696
|
const T = h.getDesignerHostService();
|
|
697
697
|
if (T != null && T.formSchemaUtils) {
|
|
698
|
-
const k = T.formSchemaUtils.getViewModelIdByComponentId(G) || "", s =
|
|
698
|
+
const k = T.formSchemaUtils.getViewModelIdByComponentId(G) || "", s = fr(
|
|
699
699
|
T,
|
|
700
700
|
k,
|
|
701
701
|
G,
|
|
@@ -743,11 +743,11 @@ function At(e, n, o, u) {
|
|
|
743
743
|
propertyConverterMap: b
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
const
|
|
749
|
-
|
|
750
|
-
function
|
|
746
|
+
const Fr = {}, Tr = {};
|
|
747
|
+
Rt(Fr, Tr, Yo);
|
|
748
|
+
const xr = {}, Or = {}, { resolveSchemaWithDefaultValue: kr } = Ht(xr, Or), Br = {}, Pr = {}, Er = {};
|
|
749
|
+
Rt(Br, Pr, kr, Er);
|
|
750
|
+
function Ir(e, n) {
|
|
751
751
|
if (!e || e.length < 1)
|
|
752
752
|
return null;
|
|
753
753
|
for (const o of e) {
|
|
@@ -761,7 +761,7 @@ function Pr(e, n) {
|
|
|
761
761
|
}
|
|
762
762
|
return null;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function Dr() {
|
|
765
765
|
function e(n, o) {
|
|
766
766
|
const { name: u } = o;
|
|
767
767
|
if (u !== "fieldsClick")
|
|
@@ -769,18 +769,18 @@ function Er() {
|
|
|
769
769
|
const b = n.cardToolbar;
|
|
770
770
|
if (!b || b.length < 1)
|
|
771
771
|
return null;
|
|
772
|
-
const [y, z] = o.payloads, Q =
|
|
772
|
+
const [y, z] = o.payloads, Q = Ir(b, z);
|
|
773
773
|
return Q ? Q.onClick || Q.click : null;
|
|
774
774
|
}
|
|
775
775
|
return {
|
|
776
776
|
resolve: e
|
|
777
777
|
};
|
|
778
778
|
}
|
|
779
|
-
var
|
|
780
|
-
function
|
|
779
|
+
var Vr = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.ALWAYS = "always", e.NEVER = "never", e))(Vr || {});
|
|
780
|
+
function _r(e, n) {
|
|
781
781
|
return null;
|
|
782
782
|
}
|
|
783
|
-
const
|
|
783
|
+
const Gr = {
|
|
784
784
|
/** 是否启用分页。 */
|
|
785
785
|
enable: { type: Boolean, default: !1 },
|
|
786
786
|
/** 当前页码。 */
|
|
@@ -803,7 +803,7 @@ const Vr = {
|
|
|
803
803
|
total: { type: Number, default: 0 },
|
|
804
804
|
/** 是否禁用分页。 */
|
|
805
805
|
disabled: { type: Boolean, default: !1 }
|
|
806
|
-
},
|
|
806
|
+
}, oi = {
|
|
807
807
|
/** 是否启用排序。 */
|
|
808
808
|
enable: { type: Boolean, default: !1 },
|
|
809
809
|
/** 排序字段集合。 */
|
|
@@ -812,7 +812,7 @@ const Vr = {
|
|
|
812
812
|
mode: { type: String, default: "client" },
|
|
813
813
|
/** 是否支持多列排序。 */
|
|
814
814
|
multiSort: { type: Boolean, default: !1 }
|
|
815
|
-
},
|
|
815
|
+
}, ri = {
|
|
816
816
|
/** 自定义分组行内容。 */
|
|
817
817
|
customGroupRow: { type: Function, default: () => {
|
|
818
818
|
} },
|
|
@@ -842,7 +842,7 @@ const Vr = {
|
|
|
842
842
|
default: () => {
|
|
843
843
|
}
|
|
844
844
|
}
|
|
845
|
-
},
|
|
845
|
+
}, ii = {
|
|
846
846
|
/** 是否启用筛选总开关。 */
|
|
847
847
|
enable: { type: Boolean, default: !1 },
|
|
848
848
|
/** 筛选风格,可选 `filter-column` 或 `filter-row`。 */
|
|
@@ -851,10 +851,10 @@ const Vr = {
|
|
|
851
851
|
mode: { type: String, default: "server" },
|
|
852
852
|
/** 是否显示过滤条件工具条。 */
|
|
853
853
|
showSummary: { type: Boolean, default: !0 }
|
|
854
|
-
},
|
|
854
|
+
}, ai = {
|
|
855
855
|
/** 是否允许折行显示列标题。 */
|
|
856
856
|
wrapHeadings: { type: Boolean, default: !1 }
|
|
857
|
-
},
|
|
857
|
+
}, li = {
|
|
858
858
|
/** 是否显示行号。 */
|
|
859
859
|
enable: { type: Boolean, default: !1 },
|
|
860
860
|
/** 行号列表头标题。 */
|
|
@@ -863,7 +863,7 @@ const Vr = {
|
|
|
863
863
|
width: { type: Number, default: 36 },
|
|
864
864
|
/** 是否展示省略号。 */
|
|
865
865
|
showEllipsis: { type: Boolean, default: !0 }
|
|
866
|
-
},
|
|
866
|
+
}, ui = {
|
|
867
867
|
/** 自定义行样式函数。 */
|
|
868
868
|
customRowStyle: { type: Function, default: () => {
|
|
869
869
|
} },
|
|
@@ -882,7 +882,7 @@ const Vr = {
|
|
|
882
882
|
showHovering: { type: Boolean, default: !0 },
|
|
883
883
|
/** 是否允许数据折行。 */
|
|
884
884
|
wrapContent: { type: Boolean, default: !1 }
|
|
885
|
-
},
|
|
885
|
+
}, si = {
|
|
886
886
|
/** 是否启用合计行。 */
|
|
887
887
|
enable: { type: Boolean, default: !1 },
|
|
888
888
|
/** 合计行自定义样式函数。 */
|
|
@@ -897,7 +897,7 @@ const Vr = {
|
|
|
897
897
|
/** 自定义合计行内容渲染函数。 */
|
|
898
898
|
customRender: { type: Function, default: () => {
|
|
899
899
|
} }
|
|
900
|
-
},
|
|
900
|
+
}, di = {
|
|
901
901
|
/** 是否自动列宽,设为 true 后所有列将填满表格,不出现横向滚动条。 */
|
|
902
902
|
fitColumns: { type: Boolean, default: !1 },
|
|
903
903
|
/** 自动适配列宽度模式。 */
|
|
@@ -918,11 +918,11 @@ const Vr = {
|
|
|
918
918
|
/** 双击表头列是否自适应内容宽度。 */
|
|
919
919
|
resizeColumnOnDoubleClick: { type: Boolean, default: !0 }
|
|
920
920
|
};
|
|
921
|
-
function
|
|
921
|
+
function ut(e) {
|
|
922
922
|
const n = e == null ? void 0 : e.fitColumns;
|
|
923
923
|
return n === !0 || typeof n == "object" && n !== null && "enable" in n && n.enable === !0;
|
|
924
924
|
}
|
|
925
|
-
const
|
|
925
|
+
const Mr = {
|
|
926
926
|
/** 启用多选且显示 checkbox,选中行后勾选前面的 checkbox。 */
|
|
927
927
|
checkOnSelect: { type: Boolean, default: !1 },
|
|
928
928
|
/** 数据源为空时是否清空已选记录。 */
|
|
@@ -950,17 +950,17 @@ const _r = {
|
|
|
950
950
|
showSelectAll: { type: Boolean, default: !1 },
|
|
951
951
|
/** 是否显示已选数据。 */
|
|
952
952
|
showSelection: { type: Boolean, default: !1 }
|
|
953
|
-
},
|
|
953
|
+
}, ci = {
|
|
954
954
|
/** 编辑时是否选中文本。 */
|
|
955
955
|
selectOnEditing: { type: Boolean, default: !1 },
|
|
956
956
|
/** 编辑模式,`row` 为整行编辑,`cell` 为单元格编辑。 */
|
|
957
957
|
editMode: { type: String, default: "cell" }
|
|
958
|
-
},
|
|
958
|
+
}, fi = {
|
|
959
959
|
/** 是否显示 loading。 */
|
|
960
960
|
show: { type: Boolean, default: !1 },
|
|
961
961
|
/** loading 提示文本。 */
|
|
962
962
|
message: { type: String, default: "加载中..." }
|
|
963
|
-
},
|
|
963
|
+
}, Nr = {
|
|
964
964
|
/** 自定义表格 CSS 类名。 */
|
|
965
965
|
customClass: { type: String, default: "" },
|
|
966
966
|
/** 是否在最后一个单元格回车时新增一行。 */
|
|
@@ -1131,7 +1131,7 @@ const _r = {
|
|
|
1131
1131
|
/** 绑定动态字段的解析器(历史调用多为单参数:当前行 raw)。 */
|
|
1132
1132
|
fieldsResolver: {
|
|
1133
1133
|
type: Function,
|
|
1134
|
-
default:
|
|
1134
|
+
default: _r
|
|
1135
1135
|
},
|
|
1136
1136
|
/** 绑定动态字段的值回调函数。 */
|
|
1137
1137
|
fieldsCallback: {
|
|
@@ -1182,7 +1182,7 @@ const _r = {
|
|
|
1182
1182
|
},
|
|
1183
1183
|
/** 是否启用列设置方案。 */
|
|
1184
1184
|
enableColumnSettingSolution: { type: Boolean, default: !1 }
|
|
1185
|
-
},
|
|
1185
|
+
}, jr = {
|
|
1186
1186
|
changed: (e) => !0,
|
|
1187
1187
|
clickRow: (e, n) => !0,
|
|
1188
1188
|
doubleClickRow: (e, n) => !0,
|
|
@@ -1203,18 +1203,18 @@ const _r = {
|
|
|
1203
1203
|
fieldsEvent: (...e) => !0,
|
|
1204
1204
|
fieldsValueChange: (...e) => !0,
|
|
1205
1205
|
fieldsClick: (...e) => !0
|
|
1206
|
-
},
|
|
1207
|
-
function
|
|
1206
|
+
}, mi = Dr();
|
|
1207
|
+
function zt(e) {
|
|
1208
1208
|
return Object.fromEntries(
|
|
1209
1209
|
Object.entries(e).map(([n, o]) => [n, o.default])
|
|
1210
1210
|
);
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
function
|
|
1212
|
+
const Ar = zt(Gr), Hr = zt(Mr);
|
|
1213
|
+
function Rr(e) {
|
|
1214
1214
|
const n = {
|
|
1215
1215
|
...e,
|
|
1216
|
-
pagination: { ...
|
|
1217
|
-
selection: { ...
|
|
1216
|
+
pagination: { ...Ar, ...e.pagination ?? {} },
|
|
1217
|
+
selection: { ...Hr, ...e.selection ?? {} }
|
|
1218
1218
|
};
|
|
1219
1219
|
return Object.defineProperty(n, "editable", {
|
|
1220
1220
|
enumerable: !0,
|
|
@@ -1222,7 +1222,7 @@ function Ar(e) {
|
|
|
1222
1222
|
get: () => e.editable
|
|
1223
1223
|
}), n;
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function zr() {
|
|
1226
1226
|
const e = /* @__PURE__ */ new Map([
|
|
1227
1227
|
["boolean", "check-box"],
|
|
1228
1228
|
["datetime", "date-picker"],
|
|
@@ -1249,11 +1249,11 @@ function Hr() {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
return { transformColumnToField: n };
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
1253
1253
|
const {
|
|
1254
1254
|
isNull: h,
|
|
1255
1255
|
isUndefined: G
|
|
1256
|
-
} =
|
|
1256
|
+
} = Et(), {
|
|
1257
1257
|
totalItems: L,
|
|
1258
1258
|
rawView: O
|
|
1259
1259
|
} = g, {
|
|
@@ -1289,7 +1289,7 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1289
1289
|
} = Q, {
|
|
1290
1290
|
navigateOnKeyUp: fe,
|
|
1291
1291
|
navigateOnKeyDown: je
|
|
1292
|
-
} = B,
|
|
1292
|
+
} = B, Xe = (r) => (r || []).some((t) => gt(t) ? !(t.type === It || t.type === dt && !Xe(t.children)) : !0) ? r : null, ue = (r) => {
|
|
1293
1293
|
var t, a, l;
|
|
1294
1294
|
return ((a = (t = r.column) == null ? void 0 : t.editor) == null ? void 0 : a.type) === "switch" || ((l = r.column) == null ? void 0 : l.dataType) === "boolean" ? {
|
|
1295
1295
|
display: "flex",
|
|
@@ -1300,9 +1300,9 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1300
1300
|
flexGrow: "1",
|
|
1301
1301
|
minWidth: 0
|
|
1302
1302
|
};
|
|
1303
|
-
}, me =
|
|
1303
|
+
}, me = st({
|
|
1304
1304
|
"fv-grid-content-left-fixed": !0
|
|
1305
|
-
}), Se =
|
|
1305
|
+
}), Se = st({
|
|
1306
1306
|
"fv-grid-content-right-fixed": !0
|
|
1307
1307
|
});
|
|
1308
1308
|
Ne([L, O], (r) => {
|
|
@@ -1310,11 +1310,11 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1310
1310
|
});
|
|
1311
1311
|
const {
|
|
1312
1312
|
gridDataStyle: ye,
|
|
1313
|
-
gridMergedDataStyle:
|
|
1313
|
+
gridMergedDataStyle: Je,
|
|
1314
1314
|
leftFixedGridDataStyle: Oe,
|
|
1315
1315
|
leftFixedGridMergedDataStyle: be,
|
|
1316
1316
|
rightFixedGridDataStyle: re,
|
|
1317
|
-
rightFixedGridMergedDataStyle:
|
|
1317
|
+
rightFixedGridMergedDataStyle: Ae
|
|
1318
1318
|
} = C;
|
|
1319
1319
|
function ke(r, t) {
|
|
1320
1320
|
r.stopPropagation(), t.collapse = !t.collapse, v.value = xe(t.collapse ? "collapse" : "expand", t, v.value);
|
|
@@ -1333,7 +1333,7 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1333
1333
|
position: "relative",
|
|
1334
1334
|
zIndex: 10
|
|
1335
1335
|
}
|
|
1336
|
-
}, ee ?
|
|
1336
|
+
}, ee ? Nt(e.id, "group", r.groupField, r.groupValue, "expand") : {}, {
|
|
1337
1337
|
onClick: (E) => ke(E, r)
|
|
1338
1338
|
}), [f("span", {
|
|
1339
1339
|
class: U(r)
|
|
@@ -1362,7 +1362,7 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1362
1362
|
padding: "0 0.75rem"
|
|
1363
1363
|
},
|
|
1364
1364
|
title: P.data
|
|
1365
|
-
}, [P.data])), Object.values(r.data).filter((H) => H.field !== r.groupField && t[H.field] && H.colSpan !== 0 && H.field !==
|
|
1365
|
+
}, [P.data])), Object.values(r.data).filter((H) => H.field !== r.groupField && t[H.field] && H.colSpan !== 0 && H.field !== $n && H.field !== Un).forEach((H) => {
|
|
1366
1366
|
var E;
|
|
1367
1367
|
const ee = D(r, H, t);
|
|
1368
1368
|
if (!w) {
|
|
@@ -1379,11 +1379,11 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
return l;
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function Qe(r, t, a, l) {
|
|
1383
1383
|
return r.layer > -1 && f("div", we({
|
|
1384
1384
|
ref: r.setRef,
|
|
1385
1385
|
key: ne(r)
|
|
1386
|
-
},
|
|
1386
|
+
}, Vt(e.id, r.groupField, r.groupValue), {
|
|
1387
1387
|
class: {
|
|
1388
1388
|
...ce(r, a),
|
|
1389
1389
|
"d-flex": !0,
|
|
@@ -1394,7 +1394,7 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1394
1394
|
onMouseover: (p) => J(p, r)
|
|
1395
1395
|
}), [Ie(r, t, l)]);
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function Ze(r, t) {
|
|
1398
1398
|
const a = [];
|
|
1399
1399
|
if (r.groupField && t[r.groupField]) {
|
|
1400
1400
|
const l = r.data[r.groupField];
|
|
@@ -1415,9 +1415,9 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1415
1415
|
style: $(r),
|
|
1416
1416
|
onClick: (p) => oe(p, r),
|
|
1417
1417
|
onMouseover: (p) => J(p, r)
|
|
1418
|
-
}, [
|
|
1418
|
+
}, [Ze(r, t)]);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function He(r, t) {
|
|
1421
1421
|
var a, l, p;
|
|
1422
1422
|
return r.showTips && typeof ((a = r.column) == null ? void 0 : a.formatter) != "function" && ((l = r.column) == null ? void 0 : l.dataType) !== "commands" && ((p = r.column) == null ? void 0 : p.dataType) !== "setting" ? f("div", {
|
|
1423
1423
|
class: X(r),
|
|
@@ -1426,13 +1426,13 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1426
1426
|
class: X(r)
|
|
1427
1427
|
}, [r.formatter(r, t)]);
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1430
|
-
return f("div", null, [
|
|
1429
|
+
function Re() {
|
|
1430
|
+
return f("div", null, [it("******")]);
|
|
1431
1431
|
}
|
|
1432
1432
|
function De(r) {
|
|
1433
1433
|
var l, p;
|
|
1434
1434
|
const t = !h(r.data) && !G(r.data) ? r.data.toString() : r.data;
|
|
1435
|
-
return ((p = (l = r.column) == null ? void 0 : l.editor) == null ? void 0 : p.showType) === "password" ?
|
|
1435
|
+
return ((p = (l = r.column) == null ? void 0 : l.editor) == null ? void 0 : p.showType) === "password" ? Re() : r.showTips ? f("div", {
|
|
1436
1436
|
class: X(r),
|
|
1437
1437
|
title: t
|
|
1438
1438
|
}, [t]) : f("div", {
|
|
@@ -1440,7 +1440,7 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1440
1440
|
}, [t]);
|
|
1441
1441
|
}
|
|
1442
1442
|
function Pe(r, t) {
|
|
1443
|
-
const a = r.column.columnTemplate(r, t), l =
|
|
1443
|
+
const a = r.column.columnTemplate(r, t), l = jt(r.data, r.column || {}), p = r.showTips && !h(l) && !G(l) ? l.toString() : void 0;
|
|
1444
1444
|
return p !== void 0 ? f("div", {
|
|
1445
1445
|
class: X(r),
|
|
1446
1446
|
title: p
|
|
@@ -1448,17 +1448,17 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1448
1448
|
class: X(r)
|
|
1449
1449
|
}, [a]);
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1452
|
-
return r.mode ===
|
|
1451
|
+
function Ke(r, t) {
|
|
1452
|
+
return r.mode === At.editing ? f("div", {
|
|
1453
1453
|
style: ue(r)
|
|
1454
|
-
}, [r.getEditor(r)]) : r.column.columnTemplate ? Pe(r, t) : r.formatter ?
|
|
1454
|
+
}, [r.getEditor(r)]) : r.column.columnTemplate ? Pe(r, t) : r.formatter ? He(r, t) : De(r);
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1457
|
-
const V =
|
|
1456
|
+
function et(r, t, a, l, p) {
|
|
1457
|
+
const V = _t(r, e.idField);
|
|
1458
1458
|
return f("div", we({
|
|
1459
1459
|
ref: r.setRef,
|
|
1460
1460
|
key: ne(r)
|
|
1461
|
-
},
|
|
1461
|
+
}, Gt(e.id, V), {
|
|
1462
1462
|
class: ce(r, a),
|
|
1463
1463
|
style: l,
|
|
1464
1464
|
onClick: (w) => oe(w, r),
|
|
@@ -1466,14 +1466,14 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1466
1466
|
onMouseout: (w) => ge(w, r)
|
|
1467
1467
|
}), [Object.values(r.data).filter((w) => t[w.field] && w.rowSpan === 1).map((w) => {
|
|
1468
1468
|
var H, ee;
|
|
1469
|
-
const P = n.slots.cellTemplate &&
|
|
1469
|
+
const P = n.slots.cellTemplate && Xe(n.slots.cellTemplate({
|
|
1470
1470
|
cell: w,
|
|
1471
1471
|
row: r
|
|
1472
1472
|
}));
|
|
1473
1473
|
return f("div", we({
|
|
1474
1474
|
ref: w.setRef,
|
|
1475
1475
|
key: j(r, w.index)
|
|
1476
|
-
},
|
|
1476
|
+
}, Mt(e.id, V, w.field), {
|
|
1477
1477
|
class: A(w, r),
|
|
1478
1478
|
style: D(r, w, t),
|
|
1479
1479
|
onClick: (E) => {
|
|
@@ -1486,20 +1486,20 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1486
1486
|
}, [P ? (ee = (H = n.slots).cellTemplate) == null ? void 0 : ee.call(H, {
|
|
1487
1487
|
cell: w,
|
|
1488
1488
|
row: r
|
|
1489
|
-
}) :
|
|
1489
|
+
}) : Ke(w, r)])]);
|
|
1490
1490
|
})]);
|
|
1491
1491
|
}
|
|
1492
1492
|
function Y(r, t, a, l) {
|
|
1493
|
-
return
|
|
1493
|
+
return et(r, t, a, $(r));
|
|
1494
1494
|
}
|
|
1495
|
-
const
|
|
1495
|
+
const tt = [Y, Qe, Be];
|
|
1496
1496
|
function Ee(r, t) {
|
|
1497
1497
|
const a = te(r);
|
|
1498
|
-
return v.value.map((l, p) =>
|
|
1498
|
+
return v.value.map((l, p) => tt[l.type](l, a, p, t));
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function ze(r, t) {
|
|
1501
1501
|
var l;
|
|
1502
|
-
const a = (l = r.column) != null && l.columnTemplate ? Pe(r, t) : r.formatter ?
|
|
1502
|
+
const a = (l = r.column) != null && l.columnTemplate ? Pe(r, t) : r.formatter ? He(r, t) : De(r);
|
|
1503
1503
|
return f("div", {
|
|
1504
1504
|
class: k(r),
|
|
1505
1505
|
style: s(r)
|
|
@@ -1514,7 +1514,7 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1514
1514
|
"fv-grid-merged-cell": !0
|
|
1515
1515
|
},
|
|
1516
1516
|
style: I(a, l, t)
|
|
1517
|
-
}, [
|
|
1517
|
+
}, [ze(l, a)])));
|
|
1518
1518
|
}
|
|
1519
1519
|
function ve() {
|
|
1520
1520
|
return f("div", {
|
|
@@ -1528,7 +1528,7 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1528
1528
|
style: be.value
|
|
1529
1529
|
}, [Ce(ae.value.leftColumns.filter((r) => r.visible))])]);
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function nt() {
|
|
1532
1532
|
return f("div", {
|
|
1533
1533
|
ref: o,
|
|
1534
1534
|
class: "fv-grid-content-primary"
|
|
@@ -1537,7 +1537,7 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1537
1537
|
style: ye.value
|
|
1538
1538
|
}, [Ee(ae.value.primaryColumns.filter((r) => r.visible), "primary")]), f("div", {
|
|
1539
1539
|
class: "fv-grid-merge-date",
|
|
1540
|
-
style:
|
|
1540
|
+
style: Je.value
|
|
1541
1541
|
}, [Ce(ae.value.primaryColumns.filter((r) => r.visible))])]);
|
|
1542
1542
|
}
|
|
1543
1543
|
function Ve() {
|
|
@@ -1549,18 +1549,18 @@ function Rr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1549
1549
|
style: re.value
|
|
1550
1550
|
}, [Ee(ae.value.rightColumns.filter((r) => r.visible), "right")]), f("div", {
|
|
1551
1551
|
class: "fv-grid-merge-date",
|
|
1552
|
-
style:
|
|
1552
|
+
style: Ae.value
|
|
1553
1553
|
}, [Ce(ae.value.rightColumns.filter((r) => r.visible))])]);
|
|
1554
1554
|
}
|
|
1555
1555
|
function _e() {
|
|
1556
1556
|
const r = [];
|
|
1557
|
-
return he.value && r.push(ve()), r.push(
|
|
1557
|
+
return he.value && r.push(ve()), r.push(nt()), se.value && r.push(Ve()), r;
|
|
1558
1558
|
}
|
|
1559
1559
|
return {
|
|
1560
1560
|
renderDataArea: _e
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
|
-
const
|
|
1563
|
+
const Wr = /* @__PURE__ */ Dt({
|
|
1564
1564
|
name: "FDataGridRowForm",
|
|
1565
1565
|
props: {
|
|
1566
1566
|
columns: {
|
|
@@ -1624,7 +1624,7 @@ const zr = /* @__PURE__ */ Et({
|
|
|
1624
1624
|
setup(e, {
|
|
1625
1625
|
emit: n
|
|
1626
1626
|
}) {
|
|
1627
|
-
return () => f(
|
|
1627
|
+
return () => f(zo, {
|
|
1628
1628
|
fields: e.fields,
|
|
1629
1629
|
formData: e.formData,
|
|
1630
1630
|
showHeader: e.showHeader,
|
|
@@ -1648,13 +1648,13 @@ const zr = /* @__PURE__ */ Et({
|
|
|
1648
1648
|
}, null);
|
|
1649
1649
|
}
|
|
1650
1650
|
});
|
|
1651
|
-
function
|
|
1651
|
+
function $r(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
1652
1652
|
const {
|
|
1653
1653
|
transformColumnToField: h
|
|
1654
|
-
} =
|
|
1654
|
+
} = zr(), {
|
|
1655
1655
|
isNull: G,
|
|
1656
1656
|
isUndefined: L
|
|
1657
|
-
} =
|
|
1657
|
+
} = Et(), {
|
|
1658
1658
|
totalItems: O,
|
|
1659
1659
|
rawView: te
|
|
1660
1660
|
} = g, {
|
|
@@ -1688,14 +1688,14 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1688
1688
|
hasRightFixedColumn: se
|
|
1689
1689
|
} = Q, fe = le(() => {
|
|
1690
1690
|
var a;
|
|
1691
|
-
if (e.displayType !== "Card" || (((a = e.columns) == null ? void 0 : a.length) ?? 0) === 0 || e.fit &&
|
|
1691
|
+
if (e.displayType !== "Card" || (((a = e.columns) == null ? void 0 : a.length) ?? 0) === 0 || e.fit && ut(e.columnOption))
|
|
1692
1692
|
return;
|
|
1693
1693
|
const t = ae.value.primaryColumnsWidth || 0;
|
|
1694
1694
|
return t > 0 ? `${t}px` : void 0;
|
|
1695
1695
|
}), {
|
|
1696
1696
|
navigateOnKeyUp: je,
|
|
1697
|
-
navigateOnKeyDown:
|
|
1698
|
-
} = B, ue = (t) => (t || []).some((a) =>
|
|
1697
|
+
navigateOnKeyDown: Xe
|
|
1698
|
+
} = B, ue = (t) => (t || []).some((a) => gt(a) ? !(a.type === It || a.type === dt && !ue(a.children)) : !0) ? t : null, me = (t) => {
|
|
1699
1699
|
var a, l, p;
|
|
1700
1700
|
return ((l = (a = t.column) == null ? void 0 : a.editor) == null ? void 0 : l.type) === "switch" || ((p = t.column) == null ? void 0 : p.dataType) === "boolean" ? {
|
|
1701
1701
|
display: "flex",
|
|
@@ -1706,26 +1706,26 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1706
1706
|
flexGrow: "1",
|
|
1707
1707
|
minWidth: 0
|
|
1708
1708
|
};
|
|
1709
|
-
}, Se =
|
|
1709
|
+
}, Se = st({
|
|
1710
1710
|
"fv-grid-content-left-fixed": !0
|
|
1711
|
-
}), ye =
|
|
1711
|
+
}), ye = st({
|
|
1712
1712
|
"fv-grid-content-right-fixed": !0
|
|
1713
1713
|
});
|
|
1714
1714
|
Ne([O, te], (t) => {
|
|
1715
1715
|
!t[0] && !t[1].length ? (Se["fv-grid-content-left-fixed"] = !1, ye["fv-grid-content-right-fixed"] = !1) : (Se["fv-grid-content-left-fixed"] = !0, ye["fv-grid-content-right-fixed"] = !0);
|
|
1716
1716
|
});
|
|
1717
1717
|
const {
|
|
1718
|
-
gridDataStyle:
|
|
1718
|
+
gridDataStyle: Je,
|
|
1719
1719
|
gridMergedDataStyle: Oe,
|
|
1720
1720
|
leftFixedGridDataStyle: be,
|
|
1721
1721
|
leftFixedGridMergedDataStyle: re,
|
|
1722
|
-
rightFixedGridDataStyle:
|
|
1722
|
+
rightFixedGridDataStyle: Ae,
|
|
1723
1723
|
rightFixedGridMergedDataStyle: ke
|
|
1724
1724
|
} = C;
|
|
1725
1725
|
function Ie(t, a) {
|
|
1726
1726
|
t.stopPropagation(), a.collapse = !a.collapse, v.value = xe(a.collapse ? "collapse" : "expand", a, v.value);
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1728
|
+
function Qe(t, a) {
|
|
1729
1729
|
var V;
|
|
1730
1730
|
const l = [];
|
|
1731
1731
|
if (!t.groupField)
|
|
@@ -1739,7 +1739,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1739
1739
|
position: "relative",
|
|
1740
1740
|
zIndex: 10
|
|
1741
1741
|
}
|
|
1742
|
-
}, P ?
|
|
1742
|
+
}, P ? Nt(e.id, "group", t.groupField, t.groupValue, "expand") : {}, {
|
|
1743
1743
|
onClick: (H) => Ie(H, t)
|
|
1744
1744
|
}), [f("span", {
|
|
1745
1745
|
class: A(t)
|
|
@@ -1778,14 +1778,14 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1778
1778
|
}
|
|
1779
1779
|
return l;
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function Ze(t, a, l) {
|
|
1782
1782
|
var V;
|
|
1783
1783
|
t.height = ((V = e.rowOption) == null ? void 0 : V.height) || 28, t.raw.__fv_data_height__ = t.height;
|
|
1784
1784
|
const p = (t.layer + 1) * 18;
|
|
1785
1785
|
return t.layer > -1 && f("div", we({
|
|
1786
1786
|
ref: t.setRef,
|
|
1787
1787
|
key: $(t)
|
|
1788
|
-
},
|
|
1788
|
+
}, Vt(e.id, t.groupField, t.groupValue), {
|
|
1789
1789
|
class: {
|
|
1790
1790
|
...oe(t, l),
|
|
1791
1791
|
"d-flex": !0,
|
|
@@ -1799,7 +1799,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1799
1799
|
},
|
|
1800
1800
|
onClick: (w) => J(w, t),
|
|
1801
1801
|
onMouseover: (w) => ge(w, t)
|
|
1802
|
-
}), [
|
|
1802
|
+
}), [Qe(t, a)]);
|
|
1803
1803
|
}
|
|
1804
1804
|
function Be(t, a) {
|
|
1805
1805
|
const l = [];
|
|
@@ -1826,7 +1826,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1826
1826
|
style: w
|
|
1827
1827
|
}, [p.data])), l;
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1829
|
+
function He(t, a, l) {
|
|
1830
1830
|
var p;
|
|
1831
1831
|
return t.height = ((p = e.rowOption) == null ? void 0 : p.height) || 28, t.raw.__fv_data_height__ = t.height, t.layer > -1 && f("div", {
|
|
1832
1832
|
ref: t.setRef,
|
|
@@ -1845,7 +1845,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1845
1845
|
onMouseover: (V) => ge(V, t)
|
|
1846
1846
|
}, [Be(t, a)]);
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function Re(t, a) {
|
|
1849
1849
|
var l, p, V;
|
|
1850
1850
|
return t.showTips && typeof ((l = t.column) == null ? void 0 : l.formatter) != "function" && ((p = t.column) == null ? void 0 : p.dataType) !== "commands" && ((V = t.column) == null ? void 0 : V.dataType) !== "setting" ? f("div", {
|
|
1851
1851
|
class: U(t),
|
|
@@ -1855,7 +1855,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1855
1855
|
}, [t.formatter(t, a)]);
|
|
1856
1856
|
}
|
|
1857
1857
|
function De() {
|
|
1858
|
-
return f("div", null, [
|
|
1858
|
+
return f("div", null, [it("******")]);
|
|
1859
1859
|
}
|
|
1860
1860
|
function Pe(t) {
|
|
1861
1861
|
var p, V;
|
|
@@ -1867,8 +1867,8 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1867
1867
|
class: U(t)
|
|
1868
1868
|
}, [a]);
|
|
1869
1869
|
}
|
|
1870
|
-
function
|
|
1871
|
-
const l = t.column.columnTemplate(t, a), p =
|
|
1870
|
+
function Ke(t, a) {
|
|
1871
|
+
const l = t.column.columnTemplate(t, a), p = jt(t.data, t.column || {}), V = t.showTips && !G(p) && !L(p) ? p.toString() : void 0;
|
|
1872
1872
|
return V !== void 0 ? f("div", {
|
|
1873
1873
|
class: U(t),
|
|
1874
1874
|
title: V
|
|
@@ -1876,18 +1876,18 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1876
1876
|
class: U(t)
|
|
1877
1877
|
}, [l]);
|
|
1878
1878
|
}
|
|
1879
|
-
function
|
|
1880
|
-
return t.mode ===
|
|
1879
|
+
function et(t, a) {
|
|
1880
|
+
return t.mode === At.editing ? f("div", {
|
|
1881
1881
|
style: me(t)
|
|
1882
|
-
}, [t.getEditor(t)]) : t.column.columnTemplate ?
|
|
1882
|
+
}, [t.getEditor(t)]) : t.column.columnTemplate ? Ke(t, a) : t.formatter ? Re(t, a) : Pe(t);
|
|
1883
1883
|
}
|
|
1884
1884
|
function Y(t, a, l, p, V, w) {
|
|
1885
1885
|
var E;
|
|
1886
|
-
const P = I(t), H = t.height || ((E = e.rowOption) == null ? void 0 : E.height) || 28, ee =
|
|
1886
|
+
const P = I(t), H = t.height || ((E = e.rowOption) == null ? void 0 : E.height) || 28, ee = _t(t, e.idField);
|
|
1887
1887
|
return f("div", we({
|
|
1888
1888
|
ref: t.setRef,
|
|
1889
1889
|
key: $(t)
|
|
1890
|
-
},
|
|
1890
|
+
}, Gt(e.id, ee), {
|
|
1891
1891
|
class: oe(t, l),
|
|
1892
1892
|
style: {
|
|
1893
1893
|
...P,
|
|
@@ -1901,51 +1901,51 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1901
1901
|
onMouseover: (R) => ge(R, t),
|
|
1902
1902
|
onMouseout: (R) => Fe(R, t)
|
|
1903
1903
|
}), [Object.values(t.data).filter((R) => a[R.field] && R.rowSpan === 1).map((R) => {
|
|
1904
|
-
var
|
|
1905
|
-
const
|
|
1904
|
+
var at, ot, Ge;
|
|
1905
|
+
const ct = n.slots.cellTemplate && ue(n.slots.cellTemplate({
|
|
1906
1906
|
cell: R,
|
|
1907
1907
|
row: t
|
|
1908
1908
|
})), pe = ne(t, R, a);
|
|
1909
|
-
return p === "static" && (delete pe.height, delete pe.left, (
|
|
1909
|
+
return p === "static" && (delete pe.height, delete pe.left, (at = e.columnOption) != null && at.fitColumns && e.fit ? (pe.flex = "1", pe.overflow = "hidden", pe.textOverflow = "ellipsis", pe.whiteSpace = "nowrap", delete pe.width) : pe.flexShrink = "0", pe.borderTop = "1px solid #e6e9f0"), f("div", we({
|
|
1910
1910
|
ref: R.setRef,
|
|
1911
1911
|
key: D(t, R.index)
|
|
1912
|
-
},
|
|
1912
|
+
}, Mt(e.id, ee, R.field), {
|
|
1913
1913
|
class: ce(R, t),
|
|
1914
1914
|
style: {
|
|
1915
1915
|
...pe,
|
|
1916
1916
|
position: p
|
|
1917
1917
|
},
|
|
1918
|
-
onClick: (
|
|
1919
|
-
Te(
|
|
1918
|
+
onClick: (rt) => {
|
|
1919
|
+
Te(rt, R, t, R.column);
|
|
1920
1920
|
},
|
|
1921
|
-
onKeydown: (
|
|
1921
|
+
onKeydown: (rt) => je(rt, R)
|
|
1922
1922
|
}), [f("div", {
|
|
1923
1923
|
class: s(R),
|
|
1924
1924
|
style: X(R)
|
|
1925
|
-
}, [
|
|
1925
|
+
}, [ct ? (Ge = (ot = n.slots).cellTemplate) == null ? void 0 : Ge.call(ot, {
|
|
1926
1926
|
cell: R,
|
|
1927
1927
|
row: t
|
|
1928
|
-
}) :
|
|
1928
|
+
}) : et(R, t)])]);
|
|
1929
1929
|
})]);
|
|
1930
1930
|
}
|
|
1931
|
-
function
|
|
1931
|
+
function tt(t, a) {
|
|
1932
1932
|
if (!a)
|
|
1933
1933
|
return {};
|
|
1934
1934
|
const l = {};
|
|
1935
1935
|
return a.forEach((p) => {
|
|
1936
|
-
l[p.id] =
|
|
1936
|
+
l[p.id] = _n(t.raw, p.field);
|
|
1937
1937
|
}), l;
|
|
1938
1938
|
}
|
|
1939
1939
|
function Ee(t, a, l) {
|
|
1940
1940
|
var H, ee;
|
|
1941
|
-
const p = t.height || ((H = e.rowOption) == null ? void 0 : H.height) || 28, w = e.displayType === "Card" && (((ee = e.columns) == null ? void 0 : ee.length) ?? 0) > 0 && !(e.fit &&
|
|
1941
|
+
const p = t.height || ((H = e.rowOption) == null ? void 0 : H.height) || 28, w = e.displayType === "Card" && (((ee = e.columns) == null ? void 0 : ee.length) ?? 0) > 0 && !(e.fit && ut(e.columnOption)), P = f(Wr, {
|
|
1942
1942
|
columns: c.value,
|
|
1943
1943
|
fields: l,
|
|
1944
1944
|
mainTitle: e.cardMainTitle,
|
|
1945
1945
|
showHeader: e.showCardHeader,
|
|
1946
1946
|
showFooter: e.showCardFooter,
|
|
1947
1947
|
data: t.raw,
|
|
1948
|
-
formData:
|
|
1948
|
+
formData: tt(t, l),
|
|
1949
1949
|
headerTitleRenderFunction: e.cardTitleTemplate ? () => {
|
|
1950
1950
|
var E;
|
|
1951
1951
|
return ((E = e.cardTitleTemplate) == null ? void 0 : E.call(e, t.raw)) ?? null;
|
|
@@ -1990,7 +1990,7 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
1990
1990
|
...fe.value ? {
|
|
1991
1991
|
minWidth: fe.value
|
|
1992
1992
|
} : {},
|
|
1993
|
-
...
|
|
1993
|
+
...ut(e.columnOption) && e.fit ? {
|
|
1994
1994
|
maxWidth: "100%"
|
|
1995
1995
|
} : {}
|
|
1996
1996
|
} : {}
|
|
@@ -2007,21 +2007,21 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
2007
2007
|
}
|
|
2008
2008
|
}, [P]) : P]);
|
|
2009
2009
|
}
|
|
2010
|
-
function
|
|
2010
|
+
function ze(t, a, l, p, V, w) {
|
|
2011
2011
|
const P = [];
|
|
2012
2012
|
return p && w.length > 0 && P.push(Y(t, a, l, "static", "flex", "100%")), V && p.length > 0 && P.push(Ee(t, l, p)), P;
|
|
2013
2013
|
}
|
|
2014
2014
|
function Ce(t, a, l, p, V, w) {
|
|
2015
|
-
return e.displayType === "Card" ?
|
|
2015
|
+
return e.displayType === "Card" ? ze(t, a, l, p, V, w) : Y(t, a, l);
|
|
2016
2016
|
}
|
|
2017
|
-
const ve = [Ce,
|
|
2018
|
-
function
|
|
2017
|
+
const ve = [Ce, Ze, He];
|
|
2018
|
+
function nt(t, a) {
|
|
2019
2019
|
let l = j(t);
|
|
2020
2020
|
return v.value.map((p, V) => {
|
|
2021
2021
|
var ee;
|
|
2022
2022
|
const w = ((ee = e.fieldsResolver) == null ? void 0 : ee.call(e, p.raw)) ?? null;
|
|
2023
2023
|
let P = w || [];
|
|
2024
|
-
const H = c.value.filter((E) => E.visible && E.dataType !==
|
|
2024
|
+
const H = c.value.filter((E) => E.visible && E.dataType !== Ye && E.dataType !== qe);
|
|
2025
2025
|
return w || H.length > 0 && (P = H.map((E) => h(E))), (!l || Object.keys(l).length === 0) && (l = j(P)), ve[p.type](p, l, V, P, w, H);
|
|
2026
2026
|
});
|
|
2027
2027
|
}
|
|
@@ -2052,8 +2052,8 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
2052
2052
|
style: Ve()
|
|
2053
2053
|
}, [f("div", {
|
|
2054
2054
|
class: "fv-grid-data",
|
|
2055
|
-
style:
|
|
2056
|
-
}, [
|
|
2055
|
+
style: Je.value
|
|
2056
|
+
}, [nt(ae.value.primaryColumns.filter((t) => t.visible))])]);
|
|
2057
2057
|
}
|
|
2058
2058
|
function r() {
|
|
2059
2059
|
const t = [];
|
|
@@ -2063,37 +2063,37 @@ function Lr(e, n, o, u, b, y, z, Q, N, F, B, d, S, C, v, g, c) {
|
|
|
2063
2063
|
renderDataArea: r
|
|
2064
2064
|
};
|
|
2065
2065
|
}
|
|
2066
|
-
function
|
|
2067
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2066
|
+
function Ur(e) {
|
|
2067
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !gt(e);
|
|
2068
2068
|
}
|
|
2069
|
-
const
|
|
2069
|
+
const Yr = /* @__PURE__ */ Dt({
|
|
2070
2070
|
name: "FDataGrid",
|
|
2071
|
-
props:
|
|
2072
|
-
emits:
|
|
2071
|
+
props: Nr,
|
|
2072
|
+
emits: jr,
|
|
2073
2073
|
setup(e, n) {
|
|
2074
|
-
var
|
|
2075
|
-
const o =
|
|
2074
|
+
var Tt, xt;
|
|
2075
|
+
const o = Gn(e), {
|
|
2076
2076
|
isSmall: u
|
|
2077
|
-
} =
|
|
2077
|
+
} = Yn(), b = n, y = Rr(o);
|
|
2078
2078
|
let z = [], Q = [];
|
|
2079
|
-
const N = de(!1), F = 0, B = de(((
|
|
2079
|
+
const N = de(!1), F = 0, B = de(((Tt = o.rowOption) == null ? void 0 : Tt.height) || 28), d = le(() => o.displayType === "Card"), S = de(20), C = de(o.columns), v = qn(y), g = de(), c = de(), h = de(), G = de(), L = de(), O = de([]), te = le(() => o.scrollbarMode || o.showScrollBar || "auto"), j = de(te.value === "always"), D = de(((xt = o.rowOption) == null ? void 0 : xt.wrapContent) || !1), ne = Xn(y, v), $ = Jn(y, b), I = Qn(y), {
|
|
2080
2080
|
showLoading: Z,
|
|
2081
2081
|
renderLoading: T
|
|
2082
|
-
} =
|
|
2082
|
+
} = Zn(o, g), k = new Map((C.value || []).map((i) => [i.field, i])), s = Kn(y, k, $, I, v), X = eo(y, s), {
|
|
2083
2083
|
shouldRenderPagination: U
|
|
2084
|
-
} = X, A =
|
|
2084
|
+
} = X, A = to(y, s, v, O, b), {
|
|
2085
2085
|
showSelectAll: ce,
|
|
2086
2086
|
showSelection: oe,
|
|
2087
2087
|
selectedValues: J,
|
|
2088
2088
|
updateSelectAllStatus: ge
|
|
2089
2089
|
} = A, Fe = le(() => o.disabled), Te = le(() => o.virtualized && o.displayType !== "Card" ? Math.min(s.dataView.value.length, S.value) : s.dataView.value.length), {
|
|
2090
2090
|
containerStyleObject: xe
|
|
2091
|
-
} =
|
|
2091
|
+
} = no(y, O), ae = le(() => {
|
|
2092
2092
|
var i;
|
|
2093
2093
|
return o.displayType === "Card" && (((i = o.columns) == null ? void 0 : i.length) ?? 0) === 0;
|
|
2094
2094
|
}), he = le(() => {
|
|
2095
2095
|
var i;
|
|
2096
|
-
return o.displayType === "Card" && (((i = o.columns) == null ? void 0 : i.length) ?? 0) > 0 && !!o.fit &&
|
|
2096
|
+
return o.displayType === "Card" && (((i = o.columns) == null ? void 0 : i.length) ?? 0) > 0 && !!o.fit && ut(o.columnOption);
|
|
2097
2097
|
});
|
|
2098
2098
|
le(() => {
|
|
2099
2099
|
const i = xe.value;
|
|
@@ -2128,41 +2128,41 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2128
2128
|
} : {}
|
|
2129
2129
|
};
|
|
2130
2130
|
});
|
|
2131
|
-
const se =
|
|
2131
|
+
const se = oo(y), {
|
|
2132
2132
|
applyCommands: fe
|
|
2133
2133
|
} = se, {
|
|
2134
2134
|
applyColumnSetting: je,
|
|
2135
|
-
removeColumnSetting:
|
|
2136
|
-
} =
|
|
2135
|
+
removeColumnSetting: Xe
|
|
2136
|
+
} = ro(y);
|
|
2137
2137
|
fe(C), o.showSetting && je(C);
|
|
2138
|
-
const ue =
|
|
2138
|
+
const ue = io(y, b), me = ao(y), {
|
|
2139
2139
|
applyColumnSorter: Se,
|
|
2140
2140
|
columnContext: ye,
|
|
2141
|
-
updateColumnRenderContext:
|
|
2141
|
+
updateColumnRenderContext: Je
|
|
2142
2142
|
} = ue;
|
|
2143
2143
|
Se(s, me);
|
|
2144
|
-
const Oe =
|
|
2145
|
-
getVisualData:
|
|
2146
|
-
} = Be,
|
|
2147
|
-
sidebarWidth:
|
|
2148
|
-
showSidebarCheckBox:
|
|
2149
|
-
} = Pe, Y =
|
|
2150
|
-
onWheel:
|
|
2144
|
+
const Oe = lo(y, ye), be = uo(y, b, A, v), re = so(y, b, v, be, O), Ae = co(y, s, B), ke = fo(y, re, Ae), Ie = mo(y, s, re, I, v, Ae, ke, B), Qe = po(y, v, ke, Ie), Ze = vo(y, v, ke, Ie), Be = go(y, C, s, Te, F, Ie, Qe, Ze), {
|
|
2145
|
+
getVisualData: He
|
|
2146
|
+
} = Be, Re = yo(ye), De = bo(y, ye, B, d), Pe = Co(y, A), {
|
|
2147
|
+
sidebarWidth: Ke,
|
|
2148
|
+
showSidebarCheckBox: et
|
|
2149
|
+
} = Pe, Y = ho(y, s, O, ye, Be, Te, F, Ke, B, d, re, j), {
|
|
2150
|
+
onWheel: tt,
|
|
2151
2151
|
dataGridWidth: Ee,
|
|
2152
|
-
viewPortHeight:
|
|
2152
|
+
viewPortHeight: ze,
|
|
2153
2153
|
viewPortWidth: Ce,
|
|
2154
2154
|
resetScroll: ve,
|
|
2155
|
-
updateVisibleRowsOnLatestVisibleScope:
|
|
2156
|
-
} = Y, Ve =
|
|
2155
|
+
updateVisibleRowsOnLatestVisibleScope: nt
|
|
2156
|
+
} = Y, Ve = So(y, ye, c, Ce, Oe), {
|
|
2157
2157
|
calculateColumnsSize: _e
|
|
2158
|
-
} = Ve, r =
|
|
2158
|
+
} = Ve, r = wo(), t = Fo(c, L, s, r, Y), a = To(y, b, ue, s, Oe, ne, Y), l = le(() => {
|
|
2159
2159
|
const i = {
|
|
2160
2160
|
"fv-grid": !0,
|
|
2161
2161
|
"fv-grid-bordered": o.showBorder,
|
|
2162
2162
|
"fv-grid-horizontal-bordered": o.showHorizontalLines,
|
|
2163
2163
|
"fv-datagrid-strip": o.showStripe
|
|
2164
2164
|
};
|
|
2165
|
-
return
|
|
2165
|
+
return Mn(i, o.customClass);
|
|
2166
2166
|
}), p = le(() => ({
|
|
2167
2167
|
"fv-grid-content": !0,
|
|
2168
2168
|
"fv-grid-content-hover": j.value,
|
|
@@ -2172,7 +2172,7 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2172
2172
|
var x, _;
|
|
2173
2173
|
const i = {}, m = d.value && ae.value;
|
|
2174
2174
|
return !m && Y.shouldShowHorizontalScrollbar.value && j.value && (i.paddingBottom = "10px"), !m && Y.shouldShowVirticalScrollbar.value && j.value, d.value && (i.display = "block", ae.value || he.value ? (i.overflowX = "hidden", i.overflowY = "hidden", i.display = "flex", i.flexDirection = "column", i.flex = "1 1 auto", i.minHeight = "0", i.width = "100%", i.maxWidth = "100%", i.minWidth = "0", i.boxSizing = "border-box") : (((x = o.columns) == null ? void 0 : x.length) ?? 0) > 0 ? i.overflow = !O.value || O.value.length === 0 ? "hidden" : "auto" : (_ = o.columnOption) != null && _.fitColumns && o.fit ? i.overflow = "visible" : i.overflow = !O.value || O.value.length === 0 ? "hidden" : "auto"), i;
|
|
2175
|
-
}), w = de(null), P = le(() =>
|
|
2175
|
+
}), w = de(null), P = le(() => xo({
|
|
2176
2176
|
rowNumber: o.rowNumber,
|
|
2177
2177
|
selection: o.selection,
|
|
2178
2178
|
commandOption: o.commandOption,
|
|
@@ -2186,68 +2186,75 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2186
2186
|
renderGridHeader: ee,
|
|
2187
2187
|
renderGridColumnResizeOverlay: E,
|
|
2188
2188
|
shouldShowHeader: R
|
|
2189
|
-
} =
|
|
2190
|
-
renderDataGridPagination:
|
|
2191
|
-
} =
|
|
2189
|
+
} = Oo(y, b, c, G, L, ue, s, a, t, $, r, Ve, Oe, A, Pe, me, Y, Ce, O, N, H), {
|
|
2190
|
+
renderDataGridPagination: ct
|
|
2191
|
+
} = ko(y, b, s, Y, X, A), {
|
|
2192
2192
|
renderDataGridSidebar: pe
|
|
2193
|
-
} =
|
|
2194
|
-
renderDisableMask:
|
|
2195
|
-
} =
|
|
2196
|
-
renderDataGridSummary:
|
|
2193
|
+
} = Bo(y, be, A, Pe, Y), {
|
|
2194
|
+
renderDisableMask: at
|
|
2195
|
+
} = Po(), {
|
|
2196
|
+
renderDataGridSummary: ot,
|
|
2197
2197
|
summaryPosition: Ge
|
|
2198
|
-
} =
|
|
2199
|
-
renderHorizontalScrollbar:
|
|
2200
|
-
} =
|
|
2201
|
-
renderVerticalScrollbar:
|
|
2202
|
-
} =
|
|
2203
|
-
renderFilterPanel:
|
|
2204
|
-
} =
|
|
2205
|
-
renderGroupPanel:
|
|
2206
|
-
} =
|
|
2207
|
-
let
|
|
2208
|
-
function
|
|
2198
|
+
} = Eo(y, s, ue), {
|
|
2199
|
+
renderHorizontalScrollbar: rt
|
|
2200
|
+
} = Io(y, c, Y), {
|
|
2201
|
+
renderVerticalScrollbar: Lt
|
|
2202
|
+
} = Do(y, c, Y), {
|
|
2203
|
+
renderFilterPanel: qr
|
|
2204
|
+
} = Vo(y, ue, s, $, me, Y), {
|
|
2205
|
+
renderGroupPanel: Wt
|
|
2206
|
+
} = _o(y, s, a, ne, Y);
|
|
2207
|
+
let Le = null, We = null;
|
|
2208
|
+
function yt() {
|
|
2209
|
+
D.value && (We !== null && cancelAnimationFrame(We), We = requestAnimationFrame(() => {
|
|
2210
|
+
We = null;
|
|
2211
|
+
const i = O.value;
|
|
2212
|
+
i.length && (Ae.recalculateRowHeights(i), O.value = [...i]);
|
|
2213
|
+
}));
|
|
2214
|
+
}
|
|
2215
|
+
function $t() {
|
|
2209
2216
|
var m;
|
|
2210
2217
|
if (!c.value)
|
|
2211
2218
|
return;
|
|
2212
2219
|
const i = Math.ceil(c.value.clientHeight / B.value);
|
|
2213
|
-
i > S.value && (S.value = i,
|
|
2220
|
+
i > S.value && (S.value = i, nt()), ze.value = ((m = h.value) == null ? void 0 : m.clientHeight) || 0, Ee.value = c.value.clientWidth || 0, h.value && (Ce.value = h.value.clientWidth), _e(), yt();
|
|
2214
2221
|
}
|
|
2215
|
-
function
|
|
2216
|
-
|
|
2217
|
-
|
|
2222
|
+
function Ut() {
|
|
2223
|
+
Le !== null && cancelAnimationFrame(Le), Le = requestAnimationFrame(() => {
|
|
2224
|
+
Le = null, $t();
|
|
2218
2225
|
});
|
|
2219
2226
|
}
|
|
2220
|
-
|
|
2221
|
-
c.value && (S.value = Math.max(Math.ceil(c.value.clientHeight / B.value), S.value), O.value =
|
|
2222
|
-
c.value && (Ee.value = c.value.clientWidth), h.value && (Ce.value = h.value.clientWidth,
|
|
2227
|
+
An(() => {
|
|
2228
|
+
c.value && (S.value = Math.max(Math.ceil(c.value.clientHeight / B.value), S.value), O.value = He(0, Te.value + F - 1), Wn(c.value, Ut), _e(), yt(), Hn(() => {
|
|
2229
|
+
c.value && (Ee.value = c.value.clientWidth), h.value && (Ce.value = h.value.clientWidth, ze.value = h.value.clientHeight);
|
|
2223
2230
|
})), Z.value && T();
|
|
2224
|
-
}),
|
|
2225
|
-
|
|
2231
|
+
}), Rn(() => {
|
|
2232
|
+
Le !== null && cancelAnimationFrame(Le), We !== null && cancelAnimationFrame(We);
|
|
2226
2233
|
});
|
|
2227
|
-
function
|
|
2234
|
+
function Yt() {
|
|
2228
2235
|
const i = s.insertNewDataItem();
|
|
2229
2236
|
return ve(), i;
|
|
2230
2237
|
}
|
|
2231
|
-
function
|
|
2238
|
+
function qt() {
|
|
2232
2239
|
const i = s.insertNewDataItem(O.value.length);
|
|
2233
2240
|
return ve(), i;
|
|
2234
2241
|
}
|
|
2235
|
-
function
|
|
2242
|
+
function Xt(i) {
|
|
2236
2243
|
re.onEditingRow(i);
|
|
2237
2244
|
}
|
|
2238
|
-
function
|
|
2245
|
+
function Jt(i) {
|
|
2239
2246
|
s.removeDataItem(i), ve();
|
|
2240
2247
|
}
|
|
2241
|
-
function
|
|
2248
|
+
function Qt(i) {
|
|
2242
2249
|
s.removeDataItemById(i), ve();
|
|
2243
2250
|
}
|
|
2244
|
-
function
|
|
2251
|
+
function Zt(i) {
|
|
2245
2252
|
re.acceptEditingRow(i);
|
|
2246
2253
|
}
|
|
2247
|
-
function
|
|
2254
|
+
function Kt(i) {
|
|
2248
2255
|
re.cancelEditingRow(i);
|
|
2249
2256
|
}
|
|
2250
|
-
function
|
|
2257
|
+
function bt(i) {
|
|
2251
2258
|
O.value.forEach((m, x) => {
|
|
2252
2259
|
const _ = s.getVisibleDataItems().findIndex((W) => W === m.raw), q = O.value[x - 1];
|
|
2253
2260
|
i.forEach((W) => {
|
|
@@ -2260,75 +2267,75 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2260
2267
|
});
|
|
2261
2268
|
}
|
|
2262
2269
|
Ne(() => o.editable, () => {
|
|
2263
|
-
|
|
2270
|
+
bt(C.value);
|
|
2264
2271
|
}), Ne([() => o.mergeCell, () => o.mergeFields, () => o.mergeCellRule], () => {
|
|
2265
2272
|
ve();
|
|
2266
2273
|
}, {
|
|
2267
2274
|
deep: !0
|
|
2268
2275
|
});
|
|
2269
|
-
function
|
|
2270
|
-
i && (C.value = i, fe(C),
|
|
2276
|
+
function $e(i) {
|
|
2277
|
+
i && (C.value = i, fe(C), bt(C.value), o.showSetting && je(C), Je(C.value), Se(s, me), _e());
|
|
2271
2278
|
}
|
|
2272
|
-
function
|
|
2279
|
+
function en() {
|
|
2273
2280
|
A.emptyCurrentRowId();
|
|
2274
2281
|
}
|
|
2275
2282
|
Ne(() => o.showSetting, (i, m) => {
|
|
2276
|
-
i !== m && (i ? je(C) :
|
|
2283
|
+
i !== m && (i ? je(C) : Xe(C), $e(C.value));
|
|
2277
2284
|
});
|
|
2278
|
-
function
|
|
2285
|
+
function ft(i) {
|
|
2279
2286
|
X.updatePagination(i);
|
|
2280
2287
|
}
|
|
2281
|
-
function
|
|
2288
|
+
function Ct(i, m) {
|
|
2282
2289
|
if (i) {
|
|
2283
2290
|
const x = !!(m != null && m.keepScrollTop || m != null && m.keepScrollPosition), _ = x ? Y.offsetY.value : 0;
|
|
2284
|
-
s.load(i),
|
|
2291
|
+
s.load(i), Ao({
|
|
2285
2292
|
keepScroll: x,
|
|
2286
2293
|
savedOffsetY: _,
|
|
2287
2294
|
resetScroll: ve,
|
|
2288
2295
|
scrollTo: Y.scrollTo
|
|
2289
|
-
}), O.value.length || (J.value = []),
|
|
2296
|
+
}), O.value.length || (J.value = []), et.value && ce.value && ge();
|
|
2290
2297
|
}
|
|
2291
2298
|
}
|
|
2292
2299
|
Ne(s.shouldGroupingData, (i, m) => {
|
|
2293
2300
|
i !== m && (s.updateDataView(), ve());
|
|
2294
2301
|
}), Ne(() => o.columns, (i) => {
|
|
2295
2302
|
if (o.showSetting && o.enableColumnSettingSolution) {
|
|
2296
|
-
|
|
2303
|
+
$e(C.value);
|
|
2297
2304
|
return;
|
|
2298
2305
|
}
|
|
2299
|
-
|
|
2306
|
+
$e(i);
|
|
2300
2307
|
});
|
|
2301
|
-
function
|
|
2308
|
+
function mt(i) {
|
|
2302
2309
|
be.activeRowById(i);
|
|
2303
2310
|
}
|
|
2304
|
-
const
|
|
2305
|
-
function
|
|
2311
|
+
const tn = Go(A, s, $, C, X, v, ue, me, $e, Ct, ft);
|
|
2312
|
+
function nn(i, m = {
|
|
2306
2313
|
isCurrent: !0
|
|
2307
2314
|
}) {
|
|
2308
|
-
m != null && m.isCurrent &&
|
|
2315
|
+
m != null && m.isCurrent && mt(i), A.selectItemById(i);
|
|
2309
2316
|
}
|
|
2310
|
-
function
|
|
2317
|
+
function on(i) {
|
|
2311
2318
|
const m = v.idField.value, x = O.value.find((_) => _.raw[m] === i);
|
|
2312
2319
|
x && be.clickRowItem(x);
|
|
2313
2320
|
}
|
|
2314
|
-
function
|
|
2321
|
+
function rn(i) {
|
|
2315
2322
|
const m = v.idField.value, x = O.value.find((_) => _.raw[m] === i);
|
|
2316
2323
|
x && be.changeRow(x);
|
|
2317
2324
|
}
|
|
2318
|
-
function
|
|
2325
|
+
function an(i) {
|
|
2319
2326
|
A.selectItemByIds(i);
|
|
2320
2327
|
}
|
|
2321
|
-
function
|
|
2328
|
+
function ln() {
|
|
2322
2329
|
return O.value;
|
|
2323
2330
|
}
|
|
2324
|
-
function
|
|
2331
|
+
function un(i) {
|
|
2325
2332
|
return O.value.filter((m) => i.includes(m.raw[o.idField]));
|
|
2326
2333
|
}
|
|
2327
|
-
function
|
|
2334
|
+
function sn(i, m) {
|
|
2328
2335
|
var K;
|
|
2329
2336
|
const x = v.idField.value, _ = (K = s.originalData.value) != null && K.length ? s.originalData.value : s.dataView.value, {
|
|
2330
2337
|
visualIndex: q
|
|
2331
|
-
} =
|
|
2338
|
+
} = Ho({
|
|
2332
2339
|
id: i,
|
|
2333
2340
|
idField: x,
|
|
2334
2341
|
updatedValues: m,
|
|
@@ -2337,55 +2344,55 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2337
2344
|
});
|
|
2338
2345
|
q >= 0 && (O.value = [...O.value.slice(0, q), O.value[q], ...O.value.slice(q + 1)], s.updateSummary());
|
|
2339
2346
|
}
|
|
2340
|
-
function
|
|
2347
|
+
function dn() {
|
|
2341
2348
|
return A.getSelectedItems();
|
|
2342
2349
|
}
|
|
2343
|
-
function
|
|
2350
|
+
function cn() {
|
|
2344
2351
|
return A.getSelectionRow();
|
|
2345
2352
|
}
|
|
2346
|
-
function
|
|
2353
|
+
function fn() {
|
|
2347
2354
|
re.endEditCell();
|
|
2348
2355
|
}
|
|
2349
|
-
function
|
|
2356
|
+
function mn(i, m = {
|
|
2350
2357
|
clearCurrent: !0
|
|
2351
2358
|
}) {
|
|
2352
|
-
m != null && m.clearCurrent &&
|
|
2359
|
+
m != null && m.clearCurrent && mt(""), A.unSelectItemByIds(i);
|
|
2353
2360
|
}
|
|
2354
|
-
function
|
|
2361
|
+
function ht() {
|
|
2355
2362
|
A.clearSelection();
|
|
2356
2363
|
}
|
|
2357
|
-
function
|
|
2364
|
+
function pn() {
|
|
2358
2365
|
return A.currentSelectedDataId.value;
|
|
2359
2366
|
}
|
|
2360
|
-
function
|
|
2367
|
+
function vn() {
|
|
2361
2368
|
Y.scrollToBottom();
|
|
2362
2369
|
}
|
|
2363
|
-
function
|
|
2370
|
+
function gn(i) {
|
|
2364
2371
|
Y.scrollToRowByIndex(i);
|
|
2365
2372
|
}
|
|
2366
|
-
function
|
|
2373
|
+
function yn(i) {
|
|
2367
2374
|
Y.scrollRowIntoView(i);
|
|
2368
2375
|
}
|
|
2369
|
-
function
|
|
2370
|
-
A.keepSelectingOnPaging.value ||
|
|
2376
|
+
function bn() {
|
|
2377
|
+
A.keepSelectingOnPaging.value || ht(), s.updateVisibleDataSummary(O.value), ft({
|
|
2371
2378
|
total: s.dataView.value.length,
|
|
2372
2379
|
index: 1
|
|
2373
2380
|
});
|
|
2374
2381
|
}
|
|
2375
|
-
function
|
|
2382
|
+
function Cn(i) {
|
|
2376
2383
|
A.updateSelectedValues(i);
|
|
2377
2384
|
}
|
|
2378
|
-
function
|
|
2385
|
+
function hn(i) {
|
|
2379
2386
|
A.removeSelectedValues(i);
|
|
2380
2387
|
}
|
|
2381
|
-
function
|
|
2388
|
+
function Sn() {
|
|
2382
2389
|
return o.displayType;
|
|
2383
2390
|
}
|
|
2384
|
-
function
|
|
2391
|
+
function wn() {
|
|
2385
2392
|
var i;
|
|
2386
|
-
(i =
|
|
2393
|
+
(i = Ln()) == null || i.update();
|
|
2387
2394
|
}
|
|
2388
|
-
function
|
|
2395
|
+
function Fn(i) {
|
|
2389
2396
|
const m = v.idField.value;
|
|
2390
2397
|
let x = 0;
|
|
2391
2398
|
const _ = s.dataView.value;
|
|
@@ -2399,78 +2406,78 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2399
2406
|
}
|
|
2400
2407
|
return -1;
|
|
2401
2408
|
}
|
|
2402
|
-
const
|
|
2403
|
-
activeRowById:
|
|
2404
|
-
selectRowById:
|
|
2405
|
-
addNewDataItem:
|
|
2406
|
-
addNewDataItemAtLast:
|
|
2407
|
-
removeDataItem:
|
|
2408
|
-
removeDataItemById:
|
|
2409
|
-
editDataItem:
|
|
2410
|
-
acceptDataItem:
|
|
2411
|
-
cancelDataItem:
|
|
2412
|
-
selectItemById:
|
|
2413
|
-
selectItemByIds:
|
|
2414
|
-
updateColumns:
|
|
2415
|
-
updateDataSource:
|
|
2416
|
-
updatePagination:
|
|
2417
|
-
getVisibleData:
|
|
2418
|
-
getVisibleDataByIds:
|
|
2419
|
-
getSelectedItems:
|
|
2420
|
-
getSelectionRow:
|
|
2421
|
-
getCurrentRowId:
|
|
2422
|
-
endEditCell:
|
|
2423
|
-
clickRowItemById:
|
|
2424
|
-
clearSelection:
|
|
2425
|
-
unSelectItemByIds:
|
|
2426
|
-
scrollToBottom:
|
|
2427
|
-
scrollToRowByIndex:
|
|
2428
|
-
scrollRowIntoView:
|
|
2429
|
-
updateDerivedData:
|
|
2430
|
-
emptyCurrentRowId:
|
|
2431
|
-
updateSelectedValues:
|
|
2432
|
-
removeSelectedValues:
|
|
2433
|
-
getDisplayType:
|
|
2434
|
-
reassignRowData:
|
|
2435
|
-
...
|
|
2436
|
-
forceUpdate:
|
|
2437
|
-
getDataIndexById:
|
|
2409
|
+
const pt = {
|
|
2410
|
+
activeRowById: mt,
|
|
2411
|
+
selectRowById: rn,
|
|
2412
|
+
addNewDataItem: Yt,
|
|
2413
|
+
addNewDataItemAtLast: qt,
|
|
2414
|
+
removeDataItem: Jt,
|
|
2415
|
+
removeDataItemById: Qt,
|
|
2416
|
+
editDataItem: Xt,
|
|
2417
|
+
acceptDataItem: Zt,
|
|
2418
|
+
cancelDataItem: Kt,
|
|
2419
|
+
selectItemById: nn,
|
|
2420
|
+
selectItemByIds: an,
|
|
2421
|
+
updateColumns: $e,
|
|
2422
|
+
updateDataSource: Ct,
|
|
2423
|
+
updatePagination: ft,
|
|
2424
|
+
getVisibleData: ln,
|
|
2425
|
+
getVisibleDataByIds: un,
|
|
2426
|
+
getSelectedItems: dn,
|
|
2427
|
+
getSelectionRow: cn,
|
|
2428
|
+
getCurrentRowId: pn,
|
|
2429
|
+
endEditCell: fn,
|
|
2430
|
+
clickRowItemById: on,
|
|
2431
|
+
clearSelection: ht,
|
|
2432
|
+
unSelectItemByIds: mn,
|
|
2433
|
+
scrollToBottom: vn,
|
|
2434
|
+
scrollToRowByIndex: gn,
|
|
2435
|
+
scrollRowIntoView: yn,
|
|
2436
|
+
updateDerivedData: bn,
|
|
2437
|
+
emptyCurrentRowId: en,
|
|
2438
|
+
updateSelectedValues: Cn,
|
|
2439
|
+
removeSelectedValues: hn,
|
|
2440
|
+
getDisplayType: Sn,
|
|
2441
|
+
reassignRowData: sn,
|
|
2442
|
+
...tn,
|
|
2443
|
+
forceUpdate: wn,
|
|
2444
|
+
getDataIndexById: Fn
|
|
2438
2445
|
};
|
|
2439
|
-
n.expose(
|
|
2440
|
-
const
|
|
2441
|
-
renderDataArea:
|
|
2442
|
-
} =
|
|
2443
|
-
renderDataArea:
|
|
2444
|
-
} =
|
|
2445
|
-
renderEmpty:
|
|
2446
|
-
} =
|
|
2446
|
+
n.expose(pt);
|
|
2447
|
+
const St = Mo(y, b, pt, ue, re, O), {
|
|
2448
|
+
renderDataArea: Tn
|
|
2449
|
+
} = Lr(o, b, h, G, L, Re, De, ue, re, ne, St, be, Be, Y, O, s), {
|
|
2450
|
+
renderDataArea: xn
|
|
2451
|
+
} = $r(o, b, h, G, L, Re, De, ue, re, ne, St, be, Be, Y, O, s, C), vt = le(() => !O.value || !O.value.length), {
|
|
2452
|
+
renderEmpty: wt
|
|
2453
|
+
} = No(y, b), On = le(() => ({
|
|
2447
2454
|
"d-flex": !0,
|
|
2448
2455
|
"justify-content-between": U.value && oe.value,
|
|
2449
2456
|
"justify-content-end": U.value && !oe.value,
|
|
2450
2457
|
"position-relative": !0,
|
|
2451
2458
|
"fv-datagrid-pagination": !0
|
|
2452
|
-
})),
|
|
2459
|
+
})), kn = le(() => ({
|
|
2453
2460
|
"flex-direction": "row"
|
|
2454
|
-
})),
|
|
2461
|
+
})), Bn = le(() => ({
|
|
2455
2462
|
"d-flex": !0,
|
|
2456
2463
|
"align-items-center": !0
|
|
2457
2464
|
}));
|
|
2458
|
-
|
|
2465
|
+
zn("dataGridContext", {
|
|
2459
2466
|
useColumnComposition: ue,
|
|
2460
2467
|
dataView: s,
|
|
2461
2468
|
useFilterComposition: $,
|
|
2462
2469
|
useFitColumnComposition: Ve,
|
|
2463
2470
|
useSortComposition: me,
|
|
2464
2471
|
useVirtualScrollComposition: Y,
|
|
2465
|
-
dataGridComponentInstance:
|
|
2472
|
+
dataGridComponentInstance: pt
|
|
2466
2473
|
});
|
|
2467
|
-
function
|
|
2474
|
+
function Pn(i) {
|
|
2468
2475
|
let m;
|
|
2469
|
-
return f(
|
|
2476
|
+
return f(Ro, {
|
|
2470
2477
|
class: "f-form-layout farris-form farris-form-controls-inline col-12 col-md-6 col-xl-3 col-el-2"
|
|
2471
|
-
},
|
|
2478
|
+
}, Ur(m = Object.keys(i.data).filter((x) => {
|
|
2472
2479
|
var _, q;
|
|
2473
|
-
return ((_ = i.data[x].column) == null ? void 0 : _.dataType) !==
|
|
2480
|
+
return ((_ = i.data[x].column) == null ? void 0 : _.dataType) !== qe && ((q = i.data[x].column) == null ? void 0 : q.dataType) !== Ye;
|
|
2474
2481
|
}).map((x) => {
|
|
2475
2482
|
var q, K;
|
|
2476
2483
|
const _ = i.data[x];
|
|
@@ -2478,7 +2485,7 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2478
2485
|
class: "farris-group-wrap w-100"
|
|
2479
2486
|
}, [f("div", {
|
|
2480
2487
|
class: "form-group farris-form-group common-group"
|
|
2481
|
-
}, [f(
|
|
2488
|
+
}, [f(Lo, {
|
|
2482
2489
|
text: (q = _.column) == null ? void 0 : q.title,
|
|
2483
2490
|
title: (K = _.column) == null ? void 0 : K.title
|
|
2484
2491
|
}, null), f("div", {
|
|
@@ -2488,15 +2495,15 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2488
2495
|
default: () => [m]
|
|
2489
2496
|
});
|
|
2490
2497
|
}
|
|
2491
|
-
function
|
|
2498
|
+
function En(i, m) {
|
|
2492
2499
|
const x = {}, _ = {}, q = [], K = [], M = {};
|
|
2493
2500
|
Object.keys(m.data).filter((ie) => {
|
|
2494
2501
|
var W, Me;
|
|
2495
|
-
return ((W = m.data[ie].column) == null ? void 0 : W.dataType) !==
|
|
2502
|
+
return ((W = m.data[ie].column) == null ? void 0 : W.dataType) !== qe && ((Me = m.data[ie].column) == null ? void 0 : Me.dataType) !== Ye;
|
|
2496
2503
|
}).forEach((ie) => {
|
|
2497
|
-
var Me,
|
|
2504
|
+
var Me, Ue, Ot;
|
|
2498
2505
|
const W = m.data[ie];
|
|
2499
|
-
x[ie] = W.data, re.endEditByCell(W), _[ie] = W.data, q.push(W.column), K.push(W), M[ie] = (
|
|
2506
|
+
x[ie] = W.data, re.endEditByCell(W), _[ie] = W.data, q.push(W.column), K.push(W), M[ie] = (Ot = (Ue = (Me = W.column) == null ? void 0 : Me.editor) == null ? void 0 : Ue.context) == null ? void 0 : Ot.editor;
|
|
2500
2507
|
}), n.emit("endEditRow", {
|
|
2501
2508
|
row: m,
|
|
2502
2509
|
cells: K,
|
|
@@ -2506,39 +2513,39 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2506
2513
|
editors: M
|
|
2507
2514
|
}), re.showRowEditPanel.value = !1;
|
|
2508
2515
|
}
|
|
2509
|
-
function
|
|
2516
|
+
function In() {
|
|
2510
2517
|
const i = A.currentSelectedDataId.value, m = O.value.find((x) => x.raw[o.idField] === i);
|
|
2511
|
-
return m ? f(
|
|
2512
|
-
id:
|
|
2518
|
+
return m ? f(Wo, {
|
|
2519
|
+
id: lt(o.id, "row-edit").id,
|
|
2513
2520
|
showHeader: !1,
|
|
2514
2521
|
modelValue: re.showRowEditPanel.value,
|
|
2515
2522
|
"onUpdate:modelValue": (x) => re.showRowEditPanel.value = x,
|
|
2516
2523
|
width: 600
|
|
2517
2524
|
}, {
|
|
2518
|
-
default: () =>
|
|
2519
|
-
footerTemplate: () => f(
|
|
2520
|
-
id:
|
|
2525
|
+
default: () => Pn(m),
|
|
2526
|
+
footerTemplate: () => f(dt, null, [f(Pt, {
|
|
2527
|
+
id: lt(o.id, "row-edit-cancel").id,
|
|
2521
2528
|
class: "mr-3",
|
|
2522
2529
|
type: "secondary",
|
|
2523
2530
|
onClick: (x) => {
|
|
2524
2531
|
re.showRowEditPanel.value = !1;
|
|
2525
2532
|
}
|
|
2526
2533
|
}, {
|
|
2527
|
-
default: () => [
|
|
2528
|
-
}), f(
|
|
2529
|
-
id:
|
|
2534
|
+
default: () => [it("取消")]
|
|
2535
|
+
}), f(Pt, {
|
|
2536
|
+
id: lt(o.id, "row-edit-ok").id,
|
|
2530
2537
|
onClick: (x) => {
|
|
2531
|
-
|
|
2538
|
+
En(x, m);
|
|
2532
2539
|
}
|
|
2533
2540
|
}, {
|
|
2534
|
-
default: () => [
|
|
2541
|
+
default: () => [it("确定")]
|
|
2535
2542
|
})])
|
|
2536
2543
|
}) : null;
|
|
2537
2544
|
}
|
|
2538
|
-
function
|
|
2539
|
-
return d.value ?
|
|
2545
|
+
function Ft() {
|
|
2546
|
+
return d.value ? xn() : Tn();
|
|
2540
2547
|
}
|
|
2541
|
-
function
|
|
2548
|
+
function Dn() {
|
|
2542
2549
|
var M;
|
|
2543
2550
|
const i = ae.value || he.value ? {
|
|
2544
2551
|
width: "100%",
|
|
@@ -2549,7 +2556,7 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2549
2556
|
} : {
|
|
2550
2557
|
width: "max-content",
|
|
2551
2558
|
minWidth: "100%"
|
|
2552
|
-
}, m = R.value && C.value.length > 0 ? ee() : null, x =
|
|
2559
|
+
}, m = R.value && C.value.length > 0 ? ee() : null, x = Ft(), _ = vt.value ? wt() : null, q = ae.value || he.value, K = (((M = O.value) == null ? void 0 : M.length) ?? 0) > 0 ? "auto" : "visible";
|
|
2553
2560
|
return q ? f("div", {
|
|
2554
2561
|
style: {
|
|
2555
2562
|
...i,
|
|
@@ -2571,27 +2578,27 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2571
2578
|
style: i
|
|
2572
2579
|
}, [m, x, _]);
|
|
2573
2580
|
}
|
|
2574
|
-
function
|
|
2581
|
+
function Vn(i, m) {
|
|
2575
2582
|
const x = i.map((M) => M.id), _ = [...C.value, ...z, ...Q];
|
|
2576
|
-
_.filter((M) => M.dataType !==
|
|
2583
|
+
_.filter((M) => M.dataType !== qe && M.dataType !== Ye).forEach((M) => {
|
|
2577
2584
|
const ie = i.find((W) => W.id === M.id);
|
|
2578
2585
|
ie && (M.width = ie.actualWidth || M.width || 120, ie.actualWidth !== void 0 && (M.actualWidth = ie.actualWidth), M.title = ie.title, M.halign = ie.halign, M.align = ie.align);
|
|
2579
|
-
}), Q = _.filter((M) => M.dataType ===
|
|
2580
|
-
const q = _.filter((M) => M.dataType !==
|
|
2586
|
+
}), Q = _.filter((M) => M.dataType === qe || M.dataType === Ye);
|
|
2587
|
+
const q = _.filter((M) => M.dataType !== qe && M.dataType !== Ye), K = q.filter((M) => x.includes(M.id));
|
|
2581
2588
|
z = q.filter((M) => !x.includes(M.id)), K.sort((M, ie) => {
|
|
2582
|
-
const W = i.findIndex((
|
|
2589
|
+
const W = i.findIndex((Ue) => Ue.id === M.id), Me = i.findIndex((Ue) => Ue.id === ie.id);
|
|
2583
2590
|
return W - Me;
|
|
2584
|
-
}), m === void 0 ? Oe.applyHeaderGroups(void 0) : Oe.applyHeaderGroups(m),
|
|
2591
|
+
}), m === void 0 ? Oe.applyHeaderGroups(void 0) : Oe.applyHeaderGroups(m), $e(K);
|
|
2585
2592
|
}
|
|
2586
2593
|
return () => {
|
|
2587
2594
|
var i, m;
|
|
2588
|
-
return o.visible && f(
|
|
2595
|
+
return o.visible && f(dt, null, [f("div", we({
|
|
2589
2596
|
ref: g
|
|
2590
|
-
},
|
|
2597
|
+
}, Nn(o.id), {
|
|
2591
2598
|
class: l.value,
|
|
2592
2599
|
style: xe.value,
|
|
2593
|
-
onWheel:
|
|
2594
|
-
}), [c.value &&
|
|
2600
|
+
onWheel: tt
|
|
2601
|
+
}), [c.value && Wt(), c.value && !d.value && R.value && C.value.length > 0 && ee(), c.value && (Ge.value === "top" || Ge.value === "both") && ot(), f("div", {
|
|
2595
2602
|
ref: c,
|
|
2596
2603
|
class: p.value,
|
|
2597
2604
|
style: V.value,
|
|
@@ -2601,12 +2608,12 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2601
2608
|
onMouseleave: (x) => {
|
|
2602
2609
|
x.stopPropagation(), te.value !== "always" && j.value && !d.value && (j.value = !1);
|
|
2603
2610
|
}
|
|
2604
|
-
}, [c.value && d.value ?
|
|
2605
|
-
class:
|
|
2606
|
-
style:
|
|
2611
|
+
}, [c.value && d.value ? Dn() : [c.value && !d.value && pe(O), c.value && Ft(), c.value && vt.value && !d.value && wt()], c.value && rt(), c.value && !vt.value && Lt()]), c.value && (Ge.value === "bottom" || Ge.value === "both") && !d.value && ot(), (U.value || oe.value) && !d.value && f("div", {
|
|
2612
|
+
class: On.value,
|
|
2613
|
+
style: kn.value
|
|
2607
2614
|
}, [oe.value && f("div", {
|
|
2608
|
-
class:
|
|
2609
|
-
}, [f("div",
|
|
2615
|
+
class: Bn.value
|
|
2616
|
+
}, [f("div", lt(o.id, "selection-info"), ["已选:" + J.value.length, it(" 条")])]), U.value && ct()]), E(), Fe.value && at()]), u() && In(), o.enableColumnSettingSolution && f(jo, {
|
|
2610
2617
|
ref: w,
|
|
2611
2618
|
columns: [...C.value, ...z],
|
|
2612
2619
|
componentId: o.id,
|
|
@@ -2615,34 +2622,34 @@ const $r = /* @__PURE__ */ Et({
|
|
|
2615
2622
|
enableHeaderGroup: ((m = o.columnOption) == null ? void 0 : m.enableHeaderGroup) === !0,
|
|
2616
2623
|
modelValue: N.value,
|
|
2617
2624
|
"onUpdate:modelValue": (x) => N.value = x,
|
|
2618
|
-
onChangeColumnSetting:
|
|
2625
|
+
onChangeColumnSetting: Vn
|
|
2619
2626
|
}, null)]);
|
|
2620
2627
|
};
|
|
2621
2628
|
}
|
|
2622
|
-
}),
|
|
2629
|
+
}), pi = jn(Yr);
|
|
2623
2630
|
export {
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2631
|
+
Ar as DEFAULT_PAGINATION_OPTIONS,
|
|
2632
|
+
Hr as DEFAULT_SELECTION_OPTIONS,
|
|
2633
|
+
Yr as FDataGrid,
|
|
2634
|
+
Vr as ScrollbarMode,
|
|
2635
|
+
di as columnOptions,
|
|
2636
|
+
jr as dataGridEmits,
|
|
2637
|
+
Nr as dataGridProps,
|
|
2638
|
+
pi as default,
|
|
2639
|
+
_r as defaultDataGridFieldsResolver,
|
|
2640
|
+
zt as defaultsOf,
|
|
2641
|
+
ci as editOptions,
|
|
2642
|
+
mi as eventHandlerResolver,
|
|
2643
|
+
ii as filterOptions,
|
|
2644
|
+
ri as groupOptions,
|
|
2645
|
+
ai as headerOptions,
|
|
2646
|
+
ut as isFitColumnsEnabled,
|
|
2647
|
+
fi as loadingOptions,
|
|
2648
|
+
Gr as paginationOptions,
|
|
2649
|
+
li as rowNumberOptions,
|
|
2650
|
+
ui as rowOptions,
|
|
2651
|
+
Mr as selectionOptions,
|
|
2652
|
+
oi as sortOptions,
|
|
2653
|
+
si as summaryOptions,
|
|
2654
|
+
Rr as toDataViewOptions
|
|
2648
2655
|
};
|