@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useCommonUtils as
|
|
2
|
-
import { reactive as
|
|
3
|
-
import { useResizeObserver as
|
|
4
|
-
import { CellMode as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { useCommonUtils as At, getCustomClass as Ht, withInstall as zt } from "../common/index.esm.js";
|
|
2
|
+
import { reactive as Je, watch as oe, createVNode as i, isVNode as et, Comment as Lt, Fragment as ze, createTextVNode as he, defineComponent as Ut, ref as B, computed as I, onMounted as Wt, nextTick as _t, onUnmounted as Kt, provide as Yt } from "vue";
|
|
3
|
+
import { useResizeObserver as qt } from "@vueuse/core";
|
|
4
|
+
import { CellMode as $t, useMobile as Jt, useIdentify as Qt, useGroupData as Xt, useFilter as Zt, useHierarchy as en, useLoading as tn, useDataView as nn, usePagination as ln, useSelection as an, useDataViewContainerStyle as on, useCommandColumn as un, useSettingColumn as sn, useColumn as rn, useSort as dn, useGroupColumn as cn, useRow as fn, useEdit as mn, useVisualDataBound as yn, useVisualDataCell as pn, useVisualDataRow as gn, useVisualGroupRow as vn, useVisualSummaryRow as Cn, useVisualData as hn, useCellContentStyle as Sn, useCellPosition as wn, useSidebar as bn, useVirtualScroll as Bn, useFitColumn as Fn, useFilterHistory as On, useColumnFilter as In, useDragColumn as Dn, getColumnHeader as Vn, getPagination as Gn, getSidebar as xn, getDisableMask as En, getSummary as Pn, getHorizontalScrollbar as Tn, getVerticalScrollbar as kn, getFilterPanel as Rn, getGroupPanel as Mn, useNavigation as jn, getEmpty as Nn, COMMAND_COLUMN_DATA_TYPE as Qe, SETTING_COLUMN_DATA_TYPE as Xe } from "../data-view/index.esm.js";
|
|
5
|
+
import Ze from "../button/index.esm.js";
|
|
6
|
+
import An from "../drawer/index.esm.js";
|
|
7
|
+
import Hn, { FDynamicFormLabel as zn } from "../dynamic-form/index.esm.js";
|
|
8
|
+
const Zn = {
|
|
9
9
|
/** 启用分页 */
|
|
10
10
|
enable: { type: Boolean, default: !1 },
|
|
11
11
|
/** 当前页码 */
|
|
@@ -28,7 +28,7 @@ const nl = {
|
|
|
28
28
|
total: { type: Number, default: 0 },
|
|
29
29
|
/** 禁用分页 */
|
|
30
30
|
disabled: { type: Boolean, default: !1 }
|
|
31
|
-
},
|
|
31
|
+
}, el = {
|
|
32
32
|
/** 启用排序 */
|
|
33
33
|
enable: { type: Boolean, default: !1 },
|
|
34
34
|
/** 排序字段集合 */
|
|
@@ -37,7 +37,7 @@ const nl = {
|
|
|
37
37
|
mode: { type: String, default: "client" },
|
|
38
38
|
/** 多列排序 */
|
|
39
39
|
multiSort: { type: Boolean, default: !1 }
|
|
40
|
-
},
|
|
40
|
+
}, tl = {
|
|
41
41
|
/** 自定义分组合计内容 */
|
|
42
42
|
customGroupRow: { type: Function, default: () => {
|
|
43
43
|
} },
|
|
@@ -61,7 +61,7 @@ const nl = {
|
|
|
61
61
|
showSummary: { type: Boolean, default: !1 },
|
|
62
62
|
/** 显示合计行位置; */
|
|
63
63
|
summaryPosition: { type: String, default: "separate" }
|
|
64
|
-
},
|
|
64
|
+
}, nl = {
|
|
65
65
|
/** 启用筛选 */
|
|
66
66
|
enable: { type: Boolean, default: !1 },
|
|
67
67
|
/** DataGrid筛选风格 */
|
|
@@ -70,10 +70,10 @@ const nl = {
|
|
|
70
70
|
mode: { type: String, default: "server" },
|
|
71
71
|
/** 显示过滤条件工具条 */
|
|
72
72
|
showSummary: { type: Boolean, default: !0 }
|
|
73
|
-
},
|
|
73
|
+
}, ll = {
|
|
74
74
|
/** 允许折行显示列标题 */
|
|
75
75
|
wrapHeadings: { type: Boolean, default: !1 }
|
|
76
|
-
},
|
|
76
|
+
}, al = {
|
|
77
77
|
/** 显示行号 */
|
|
78
78
|
enable: { type: Boolean, default: !1 },
|
|
79
79
|
/** 行号列表头标题 */
|
|
@@ -82,7 +82,7 @@ const nl = {
|
|
|
82
82
|
width: { type: Number, default: 36 },
|
|
83
83
|
/** 是否展示省略号 */
|
|
84
84
|
showEllipsis: { type: Boolean, default: !0 }
|
|
85
|
-
},
|
|
85
|
+
}, ol = {
|
|
86
86
|
/** 自定义行样式 */
|
|
87
87
|
customRowStyle: { type: Function, default: () => {
|
|
88
88
|
} },
|
|
@@ -101,7 +101,7 @@ const nl = {
|
|
|
101
101
|
showHovering: { type: Boolean, default: !0 },
|
|
102
102
|
/** 禁止数据折行 */
|
|
103
103
|
wrapContent: { type: Boolean, default: !1 }
|
|
104
|
-
},
|
|
104
|
+
}, il = {
|
|
105
105
|
/** 显示合计信息 */
|
|
106
106
|
enable: { type: Boolean, default: !1 },
|
|
107
107
|
/** 合计行自定义样式,对启用合计行模板无效 */
|
|
@@ -113,7 +113,7 @@ const nl = {
|
|
|
113
113
|
mode: { type: String, default: "client" },
|
|
114
114
|
/** 合计行显示位置, top: 顶部 bottom: 底部, both: 顶部与底部同时显示 */
|
|
115
115
|
position: { type: String, default: "bottom" }
|
|
116
|
-
},
|
|
116
|
+
}, ul = {
|
|
117
117
|
/** 自动列宽。设为true后,所有列将填满表格并不会出现横向滚动条。 */
|
|
118
118
|
fitColumns: { type: Boolean, default: !1 },
|
|
119
119
|
/** 自动适配列宽度模式 */
|
|
@@ -125,7 +125,7 @@ const nl = {
|
|
|
125
125
|
resizeColumn: { type: Boolean, default: !0 },
|
|
126
126
|
/** 双击表头列自适应内容宽度 */
|
|
127
127
|
resizeColumnOnDoubleClick: { type: Boolean, default: !0 }
|
|
128
|
-
},
|
|
128
|
+
}, sl = {
|
|
129
129
|
/** 启用多选且显示checkbox, 选中行后勾选前面的checkbox */
|
|
130
130
|
checkOnSelect: { type: Boolean, default: !1 },
|
|
131
131
|
/** 当数据源为空时,清空已选记录 */
|
|
@@ -151,17 +151,17 @@ const nl = {
|
|
|
151
151
|
showSelectAll: { type: Boolean, default: !1 },
|
|
152
152
|
/** 显示已选数据 */
|
|
153
153
|
showSelection: { type: Boolean, default: !1 }
|
|
154
|
-
},
|
|
154
|
+
}, rl = {
|
|
155
155
|
/** 编辑时选中文本 */
|
|
156
156
|
selectOnEditing: { type: Boolean, default: !1 },
|
|
157
157
|
/** 编辑模式; row:整行编辑,cell: 单元格编辑 */
|
|
158
158
|
editMode: { type: String, default: "cell" }
|
|
159
|
-
},
|
|
159
|
+
}, dl = {
|
|
160
160
|
/** show loading */
|
|
161
161
|
show: { type: Boolean, default: !1 },
|
|
162
162
|
/** message on display when loading */
|
|
163
163
|
message: { type: String, default: "加载中..." }
|
|
164
|
-
},
|
|
164
|
+
}, Ln = {
|
|
165
165
|
/** 自定义样式 */
|
|
166
166
|
customClass: { type: String, default: "" },
|
|
167
167
|
/** 允许在最后一个单元回车新增一行 */
|
|
@@ -290,554 +290,531 @@ const nl = {
|
|
|
290
290
|
width: { type: Number, default: -1 },
|
|
291
291
|
/** 空数据模板 */
|
|
292
292
|
emptyTemplate: { type: Object },
|
|
293
|
-
beforeUpdate: { type: Function }
|
|
294
|
-
/** 绑定动态字段的解析器 */
|
|
295
|
-
fieldsResolver: { type: Function, default: (n, p) => n },
|
|
296
|
-
/** 绑定动态字段的值*/
|
|
297
|
-
displayType: { type: String, default: "List" },
|
|
298
|
-
fieldsCallback: { type: Function, default: () => {
|
|
299
|
-
} }
|
|
293
|
+
beforeUpdate: { type: Function }
|
|
300
294
|
};
|
|
301
|
-
function
|
|
295
|
+
function Un(n, p, Se, j, ie, P, w, h, ue, r, T, se, Y, c, F, we) {
|
|
302
296
|
const {
|
|
303
|
-
isNull:
|
|
304
|
-
isUndefined:
|
|
305
|
-
} =
|
|
306
|
-
totalItems:
|
|
307
|
-
rawView:
|
|
308
|
-
} =
|
|
309
|
-
calculateCellPositionInRow:
|
|
310
|
-
cellKey:
|
|
311
|
-
cellPosition:
|
|
312
|
-
rowKey:
|
|
313
|
-
rowPosition:
|
|
314
|
-
rowSpanCellPosition:
|
|
315
|
-
groupCellPosition:
|
|
316
|
-
summaryCellPosition:
|
|
317
|
-
} =
|
|
318
|
-
cellContentClass:
|
|
319
|
-
cellContentPosition:
|
|
320
|
-
cellContentClassWithEllipsis:
|
|
321
|
-
} = de, {
|
|
322
|
-
collpaseGroupIconClass: U
|
|
323
|
-
} = ce, {
|
|
324
|
-
gridCellClass: Ve,
|
|
325
|
-
gridRowClass: Z,
|
|
326
|
-
onClickRow: W,
|
|
327
|
-
onMouseoverRow: K,
|
|
328
|
-
onMouseoutRow: Le
|
|
297
|
+
isNull: q,
|
|
298
|
+
isUndefined: N
|
|
299
|
+
} = At(), {
|
|
300
|
+
totalItems: re,
|
|
301
|
+
rawView: be
|
|
302
|
+
} = we, {
|
|
303
|
+
calculateCellPositionInRow: de,
|
|
304
|
+
cellKey: u,
|
|
305
|
+
cellPosition: A,
|
|
306
|
+
rowKey: G,
|
|
307
|
+
rowPosition: y,
|
|
308
|
+
rowSpanCellPosition: Be,
|
|
309
|
+
groupCellPosition: H,
|
|
310
|
+
summaryCellPosition: ce
|
|
311
|
+
} = w, {
|
|
312
|
+
cellContentClass: Fe,
|
|
313
|
+
cellContentPosition: Oe,
|
|
314
|
+
cellContentClassWithEllipsis: D
|
|
329
315
|
} = P, {
|
|
330
|
-
|
|
316
|
+
collpaseGroupIconClass: Ie
|
|
317
|
+
} = r, {
|
|
318
|
+
gridCellClass: De,
|
|
319
|
+
gridRowClass: z,
|
|
320
|
+
onClickRow: L,
|
|
321
|
+
onMouseoverRow: fe,
|
|
322
|
+
onMouseoutRow: O
|
|
323
|
+
} = se, {
|
|
324
|
+
onClickCell: U
|
|
325
|
+
} = ue, {
|
|
326
|
+
toggleGroupRow: me
|
|
327
|
+
} = Y, {
|
|
328
|
+
columnContext: S,
|
|
329
|
+
hasLeftFixedColumn: Ve,
|
|
330
|
+
hasRightFixedColumn: $
|
|
331
331
|
} = h, {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
} = w, {
|
|
338
|
-
navigateOnKeyUp: ee,
|
|
339
|
-
navigateOnKeyDown: j
|
|
340
|
-
} = c, g = (e) => (e || []).some((o) => tt(o) ? !(o.type === Wt || o.type === be && !g(o.children)) : !0) ? e : null, te = (e) => {
|
|
341
|
-
var o, r, l;
|
|
342
|
-
return ((r = (o = e.column) == null ? void 0 : o.editor) == null ? void 0 : r.type) === "switch" || ((l = e.column) == null ? void 0 : l.dataType) === "boolean" ? {
|
|
332
|
+
navigateOnKeyUp: x,
|
|
333
|
+
navigateOnKeyDown: g
|
|
334
|
+
} = T, J = (e) => (e || []).some((o) => et(o) ? !(o.type === Lt || o.type === ze && !J(o.children)) : !0) ? e : null, k = (e) => {
|
|
335
|
+
var o, s, l;
|
|
336
|
+
return ((s = (o = e.column) == null ? void 0 : o.editor) == null ? void 0 : s.type) === "switch" || ((l = e.column) == null ? void 0 : l.dataType) === "boolean" ? {
|
|
343
337
|
display: "flex",
|
|
344
338
|
flexGrow: "1",
|
|
345
339
|
overflow: "hidden"
|
|
346
340
|
} : {
|
|
347
341
|
flexGrow: "1"
|
|
348
342
|
};
|
|
349
|
-
},
|
|
343
|
+
}, R = Je({
|
|
350
344
|
"fv-grid-content-left-fixed": !0
|
|
351
|
-
}),
|
|
345
|
+
}), Q = Je({
|
|
352
346
|
"fv-grid-content-right-fixed": !0
|
|
353
347
|
});
|
|
354
|
-
|
|
355
|
-
!e[0] && !e[1].length ? (
|
|
348
|
+
oe([re, be], (e) => {
|
|
349
|
+
!e[0] && !e[1].length ? (R["fv-grid-content-left-fixed"] = !1, Q["fv-grid-content-right-fixed"] = !1) : (R["fv-grid-content-left-fixed"] = !0, Q["fv-grid-content-right-fixed"] = !0);
|
|
356
350
|
});
|
|
357
351
|
const {
|
|
358
|
-
gridDataStyle:
|
|
359
|
-
gridMergedDataStyle:
|
|
360
|
-
leftFixedGridDataStyle:
|
|
361
|
-
leftFixedGridMergedDataStyle:
|
|
362
|
-
rightFixedGridDataStyle:
|
|
363
|
-
rightFixedGridMergedDataStyle:
|
|
364
|
-
} =
|
|
365
|
-
function
|
|
366
|
-
o.collapse = !o.collapse,
|
|
352
|
+
gridDataStyle: Ge,
|
|
353
|
+
gridMergedDataStyle: X,
|
|
354
|
+
leftFixedGridDataStyle: ye,
|
|
355
|
+
leftFixedGridMergedDataStyle: xe,
|
|
356
|
+
rightFixedGridDataStyle: Ee,
|
|
357
|
+
rightFixedGridMergedDataStyle: Z
|
|
358
|
+
} = c;
|
|
359
|
+
function Pe(e, o) {
|
|
360
|
+
o.collapse = !o.collapse, F.value = me(o.collapse ? "collapse" : "expand", o, F.value);
|
|
367
361
|
}
|
|
368
362
|
function Te(e, o) {
|
|
369
|
-
const
|
|
363
|
+
const s = [];
|
|
370
364
|
if (e.groupField && o[e.groupField]) {
|
|
371
365
|
for (let f = 0; f <= e.layer; f++)
|
|
372
|
-
|
|
366
|
+
s.push(i("div", {
|
|
373
367
|
class: "fv-grid-group-row-icon",
|
|
374
|
-
onClick: (
|
|
368
|
+
onClick: (K) => Pe(K, e)
|
|
375
369
|
}, [i("span", {
|
|
376
|
-
class:
|
|
370
|
+
class: Ie(e)
|
|
377
371
|
}, null)]));
|
|
378
372
|
const l = e.data[e.groupField];
|
|
379
|
-
|
|
373
|
+
s.push(i("div", {
|
|
380
374
|
ref: l.setRef,
|
|
381
|
-
key:
|
|
375
|
+
key: u(e, e.layer + 1),
|
|
382
376
|
class: "fv-grid-cell",
|
|
383
|
-
style:
|
|
377
|
+
style: H(l, o, e.layer)
|
|
384
378
|
}, [l.data])), Object.values(e.data).filter((f) => f.field !== e.groupField && f.colSpan !== 0).forEach((f) => {
|
|
385
|
-
|
|
379
|
+
s.push(i("div", {
|
|
386
380
|
ref: f.setRef,
|
|
387
|
-
key:
|
|
381
|
+
key: u(e, f.index),
|
|
388
382
|
class: "fv-grid-cell",
|
|
389
|
-
style:
|
|
383
|
+
style: A(e, f, o)
|
|
390
384
|
}, [f.data]));
|
|
391
385
|
});
|
|
392
386
|
}
|
|
393
|
-
return
|
|
387
|
+
return s;
|
|
394
388
|
}
|
|
395
|
-
function
|
|
389
|
+
function m(e, o, s) {
|
|
396
390
|
return e.layer > -1 && i("div", {
|
|
397
391
|
ref: e.setRef,
|
|
398
|
-
key:
|
|
399
|
-
class:
|
|
400
|
-
style:
|
|
401
|
-
onClick: (l) =>
|
|
402
|
-
onMouseover: (l) =>
|
|
392
|
+
key: G(e),
|
|
393
|
+
class: z(e, s),
|
|
394
|
+
style: y(e),
|
|
395
|
+
onClick: (l) => L(l, e),
|
|
396
|
+
onMouseover: (l) => fe(l, e)
|
|
403
397
|
}, [Te(e, o)]);
|
|
404
398
|
}
|
|
405
|
-
function
|
|
406
|
-
const
|
|
399
|
+
function ke(e, o) {
|
|
400
|
+
const s = [];
|
|
407
401
|
if (e.groupField && o[e.groupField]) {
|
|
408
402
|
const l = e.data[e.groupField];
|
|
409
|
-
|
|
403
|
+
s.push(i("div", {
|
|
410
404
|
ref: l.setRef,
|
|
411
|
-
key:
|
|
405
|
+
key: u(e, e.layer + 1),
|
|
412
406
|
class: "fv-grid-cell",
|
|
413
|
-
style:
|
|
407
|
+
style: ce(l, o, e.layer)
|
|
414
408
|
}, [l.data]));
|
|
415
409
|
}
|
|
416
|
-
return
|
|
410
|
+
return s;
|
|
417
411
|
}
|
|
418
|
-
function
|
|
412
|
+
function pe(e, o, s) {
|
|
419
413
|
return e.layer > -1 && i("div", {
|
|
420
414
|
ref: e.setRef,
|
|
421
|
-
key:
|
|
422
|
-
class:
|
|
423
|
-
style:
|
|
424
|
-
onClick: (l) =>
|
|
425
|
-
onMouseover: (l) =>
|
|
426
|
-
}, [
|
|
415
|
+
key: G(e),
|
|
416
|
+
class: z(e, s),
|
|
417
|
+
style: y(e),
|
|
418
|
+
onClick: (l) => L(l, e),
|
|
419
|
+
onMouseover: (l) => fe(l, e)
|
|
420
|
+
}, [ke(e, o)]);
|
|
427
421
|
}
|
|
428
|
-
function
|
|
429
|
-
var
|
|
430
|
-
return e.showTips && typeof ((
|
|
431
|
-
class:
|
|
422
|
+
function ge(e, o) {
|
|
423
|
+
var s, l, f;
|
|
424
|
+
return e.showTips && typeof ((s = e.column) == null ? void 0 : s.formatter) != "function" && ((l = e.column) == null ? void 0 : l.dataType) !== "commands" && ((f = e.column) == null ? void 0 : f.dataType) !== "setting" ? i("div", {
|
|
425
|
+
class: D(e),
|
|
432
426
|
title: e.formatter(e, o)
|
|
433
427
|
}, [e.formatter(e, o)]) : i("div", {
|
|
434
|
-
class:
|
|
428
|
+
class: D(e)
|
|
435
429
|
}, [e.formatter(e, o)]);
|
|
436
430
|
}
|
|
437
|
-
function
|
|
438
|
-
return i("div", null, [
|
|
431
|
+
function W() {
|
|
432
|
+
return i("div", null, [he("******")]);
|
|
439
433
|
}
|
|
440
|
-
function
|
|
434
|
+
function E(e) {
|
|
441
435
|
var l, f;
|
|
442
|
-
const o = !
|
|
443
|
-
return ((f = (l = e.column) == null ? void 0 : l.editor) == null ? void 0 : f.showType) === "password" ?
|
|
444
|
-
class:
|
|
436
|
+
const o = !q(e.data) && !N(e.data) ? e.data.toString() : e.data;
|
|
437
|
+
return ((f = (l = e.column) == null ? void 0 : l.editor) == null ? void 0 : f.showType) === "password" ? W() : e.showTips ? i("div", {
|
|
438
|
+
class: D(e),
|
|
445
439
|
title: o
|
|
446
440
|
}, [o]) : i("div", {
|
|
447
|
-
class:
|
|
441
|
+
class: D(e)
|
|
448
442
|
}, [o]);
|
|
449
443
|
}
|
|
450
|
-
function
|
|
451
|
-
return e.mode ===
|
|
452
|
-
style:
|
|
453
|
-
}, [e.getEditor(e)]) : e.column.columnTemplate ? e.column.columnTemplate(e, o) : e.formatter ?
|
|
454
|
-
}
|
|
455
|
-
function Me(e) {
|
|
456
|
-
return i(be, null, null);
|
|
444
|
+
function Re(e, o) {
|
|
445
|
+
return e.mode === $t.editing ? i("div", {
|
|
446
|
+
style: k(e)
|
|
447
|
+
}, [e.getEditor(e)]) : e.column.columnTemplate ? e.column.columnTemplate(e, o) : e.formatter ? ge(e, o) : E(e);
|
|
457
448
|
}
|
|
458
|
-
function
|
|
449
|
+
function ee(e, o, s) {
|
|
459
450
|
return i("div", {
|
|
460
451
|
ref: e.setRef,
|
|
461
|
-
key:
|
|
462
|
-
class:
|
|
463
|
-
style:
|
|
464
|
-
onClick: (l) =>
|
|
465
|
-
onMouseover: (l) =>
|
|
466
|
-
onMouseout: (l) =>
|
|
467
|
-
}, [
|
|
468
|
-
var
|
|
469
|
-
const f = p.slots.cellTemplate &&
|
|
452
|
+
key: G(e),
|
|
453
|
+
class: z(e, s),
|
|
454
|
+
style: y(e),
|
|
455
|
+
onClick: (l) => L(l, e),
|
|
456
|
+
onMouseover: (l) => fe(l, e),
|
|
457
|
+
onMouseout: (l) => O(l, e)
|
|
458
|
+
}, [Object.values(e.data).filter((l) => o[l.field] && l.rowSpan === 1).map((l) => {
|
|
459
|
+
var K, Ce;
|
|
460
|
+
const f = p.slots.cellTemplate && J(p.slots.cellTemplate({
|
|
470
461
|
cell: l,
|
|
471
462
|
row: e
|
|
472
463
|
}));
|
|
473
464
|
return i("div", {
|
|
474
465
|
ref: l.setRef,
|
|
475
|
-
key:
|
|
476
|
-
class:
|
|
477
|
-
style:
|
|
478
|
-
onClick: (
|
|
479
|
-
|
|
480
|
-
},
|
|
481
|
-
onKeydown: (ue) => ee(ue, l)
|
|
466
|
+
key: u(e, l.index),
|
|
467
|
+
class: De(l, e),
|
|
468
|
+
style: A(e, l, o),
|
|
469
|
+
onClick: (le) => U(le, l, e, l.column),
|
|
470
|
+
onKeydown: (le) => x(le, l)
|
|
482
471
|
}, [i("div", {
|
|
483
|
-
class:
|
|
484
|
-
style:
|
|
485
|
-
}, [f ? (
|
|
472
|
+
class: Fe(l),
|
|
473
|
+
style: Oe(l)
|
|
474
|
+
}, [f ? (Ce = (K = p.slots).cellTemplate) == null ? void 0 : Ce.call(K, {
|
|
486
475
|
cell: l,
|
|
487
476
|
row: e
|
|
488
|
-
}) :
|
|
477
|
+
}) : Re(l, e)])]);
|
|
489
478
|
})]);
|
|
490
479
|
}
|
|
491
|
-
const
|
|
492
|
-
function
|
|
493
|
-
const
|
|
494
|
-
return
|
|
480
|
+
const te = [ee, m, pe];
|
|
481
|
+
function _(e, o) {
|
|
482
|
+
const s = de(e);
|
|
483
|
+
return F.value.map((l, f) => te[l.type](l, s, f));
|
|
495
484
|
}
|
|
496
|
-
function
|
|
497
|
-
const o =
|
|
498
|
-
return
|
|
499
|
-
key:
|
|
485
|
+
function ne(e) {
|
|
486
|
+
const o = de(e);
|
|
487
|
+
return F.value.map((s) => Object.values(s.data).filter((l) => o[l.field] && l.rowSpan > 1).map((l) => i("div", {
|
|
488
|
+
key: u(s, l.index),
|
|
500
489
|
class: "fv-grid-cell fv-grid-merged-cell",
|
|
501
|
-
style:
|
|
490
|
+
style: Be(s, l, o)
|
|
502
491
|
}, [l.data])));
|
|
503
492
|
}
|
|
504
|
-
function
|
|
493
|
+
function ve() {
|
|
505
494
|
return i("div", {
|
|
506
|
-
ref:
|
|
507
|
-
class:
|
|
495
|
+
ref: j,
|
|
496
|
+
class: R
|
|
508
497
|
}, [i("div", {
|
|
509
498
|
class: "fv-grid-data",
|
|
510
|
-
style:
|
|
511
|
-
}, [
|
|
499
|
+
style: ye.value
|
|
500
|
+
}, [_(S.value.leftColumns.filter((e) => e.visible))]), i("div", {
|
|
512
501
|
class: "fv-grid-merge-date",
|
|
513
|
-
style:
|
|
514
|
-
}, [
|
|
502
|
+
style: xe.value
|
|
503
|
+
}, [ne(S.value.leftColumns.filter((e) => e.visible))])]);
|
|
515
504
|
}
|
|
516
|
-
function
|
|
505
|
+
function Me() {
|
|
517
506
|
return i("div", {
|
|
518
|
-
ref:
|
|
507
|
+
ref: Se,
|
|
519
508
|
class: "fv-grid-content-primary"
|
|
520
509
|
}, [i("div", {
|
|
521
510
|
class: "fv-grid-data",
|
|
522
|
-
style:
|
|
523
|
-
}, [
|
|
511
|
+
style: Ge.value
|
|
512
|
+
}, [_(S.value.primaryColumns.filter((e) => e.visible))]), i("div", {
|
|
524
513
|
class: "fv-grid-merge-date",
|
|
525
|
-
style:
|
|
526
|
-
}, [
|
|
514
|
+
style: X.value
|
|
515
|
+
}, [ne(S.value.primaryColumns.filter((e) => e.visible))])]);
|
|
527
516
|
}
|
|
528
|
-
function
|
|
517
|
+
function je() {
|
|
529
518
|
return i("div", {
|
|
530
|
-
ref:
|
|
531
|
-
class:
|
|
519
|
+
ref: ie,
|
|
520
|
+
class: Q
|
|
532
521
|
}, [i("div", {
|
|
533
522
|
class: "fv-grid-data",
|
|
534
|
-
style:
|
|
535
|
-
}, [
|
|
523
|
+
style: Ee.value
|
|
524
|
+
}, [_(S.value.rightColumns.filter((e) => e.visible))]), i("div", {
|
|
536
525
|
class: "fv-grid-merge-date",
|
|
537
|
-
style:
|
|
538
|
-
}, [
|
|
526
|
+
style: Z.value
|
|
527
|
+
}, [ne(S.value.rightColumns.filter((e) => e.visible))])]);
|
|
539
528
|
}
|
|
540
|
-
function
|
|
529
|
+
function Ne() {
|
|
541
530
|
const e = [];
|
|
542
|
-
return
|
|
531
|
+
return Ve.value && e.push(ve()), e.push(Me()), $.value && e.push(je()), e;
|
|
543
532
|
}
|
|
544
533
|
return {
|
|
545
|
-
renderDataArea:
|
|
534
|
+
renderDataArea: Ne
|
|
546
535
|
};
|
|
547
536
|
}
|
|
548
|
-
function
|
|
549
|
-
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !
|
|
537
|
+
function Wn(n) {
|
|
538
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !et(n);
|
|
550
539
|
}
|
|
551
|
-
const
|
|
540
|
+
const _n = /* @__PURE__ */ Ut({
|
|
552
541
|
name: "FDataGrid",
|
|
553
|
-
props:
|
|
554
|
-
emits: ["changed", "clickRow", "doubleClickRow", "selectionChange", "unSelectItem", "selectItem", "enterUpInLastCell", "selectAll", "unSelectAll", "pageIndexChanged", "pageSizeChanged", "beginEditCell", "endEditCell", "filterChanged", "sortChanged", "selectionUpdate", "endEditRow"
|
|
542
|
+
props: Ln,
|
|
543
|
+
emits: ["changed", "clickRow", "doubleClickRow", "selectionChange", "unSelectItem", "selectItem", "enterUpInLastCell", "selectAll", "unSelectAll", "pageIndexChanged", "pageSizeChanged", "beginEditCell", "endEditCell", "filterChanged", "sortChanged", "selectionUpdate", "endEditRow"],
|
|
555
544
|
setup(n, p) {
|
|
556
|
-
var
|
|
545
|
+
var _e, Ke;
|
|
557
546
|
const {
|
|
558
|
-
isMobilePhone:
|
|
559
|
-
} =
|
|
560
|
-
|
|
561
|
-
const
|
|
562
|
-
showLoading:
|
|
563
|
-
renderLoading:
|
|
564
|
-
} =
|
|
565
|
-
shouldRenderPagination:
|
|
566
|
-
} =
|
|
567
|
-
showSelectAll:
|
|
568
|
-
showSelection:
|
|
569
|
-
selectedValues:
|
|
570
|
-
updateSelectAllStatus:
|
|
571
|
-
} = y,
|
|
572
|
-
|
|
547
|
+
isMobilePhone: Se
|
|
548
|
+
} = Jt();
|
|
549
|
+
B();
|
|
550
|
+
const j = 0, ie = ((_e = n.rowOption) == null ? void 0 : _e.height) || 28, P = B(20), w = B(n.columns), h = Qt(n), ue = B(), r = B(), T = B(), se = B(), Y = B(), c = B([]), F = B(!1), we = B(((Ke = n.rowOption) == null ? void 0 : Ke.wrapContent) || !1), q = Xt(n, h), N = Zt(n, p), re = en(n), {
|
|
551
|
+
showLoading: be,
|
|
552
|
+
renderLoading: de
|
|
553
|
+
} = tn(n, ue), u = nn(n, /* @__PURE__ */ new Map(), N, re, h), A = ln(n, u), {
|
|
554
|
+
shouldRenderPagination: G
|
|
555
|
+
} = A, y = an(n, u, h, c, p), {
|
|
556
|
+
showSelectAll: Be,
|
|
557
|
+
showSelection: H,
|
|
558
|
+
selectedValues: ce,
|
|
559
|
+
updateSelectAllStatus: Fe
|
|
560
|
+
} = y, Oe = I(() => n.disabled), D = I(() => n.virtualized ? Math.min(u.dataView.value.length, P.value) : u.dataView.value.length);
|
|
561
|
+
I(() => n.loadingConfig.message);
|
|
573
562
|
const {
|
|
574
|
-
containerStyleObject:
|
|
575
|
-
} =
|
|
576
|
-
applyCommands:
|
|
577
|
-
} =
|
|
578
|
-
|
|
563
|
+
containerStyleObject: Ie
|
|
564
|
+
} = on(n), De = un(n), {
|
|
565
|
+
applyCommands: z
|
|
566
|
+
} = De;
|
|
567
|
+
z(w);
|
|
579
568
|
const {
|
|
580
|
-
applyColumnSetting:
|
|
581
|
-
removeColumnSetting:
|
|
582
|
-
} =
|
|
583
|
-
n.showSetting &&
|
|
584
|
-
const
|
|
585
|
-
applyColumnSorter:
|
|
586
|
-
columnContext:
|
|
587
|
-
updateColumnRenderContext:
|
|
588
|
-
} =
|
|
589
|
-
|
|
590
|
-
const
|
|
591
|
-
getVisualData:
|
|
592
|
-
} =
|
|
593
|
-
sidebarWidth:
|
|
594
|
-
showSidebarCheckBox:
|
|
595
|
-
} =
|
|
569
|
+
applyColumnSetting: L,
|
|
570
|
+
removeColumnSetting: fe
|
|
571
|
+
} = sn(n);
|
|
572
|
+
n.showSetting && L(w);
|
|
573
|
+
const O = rn(n, p), U = dn(n), {
|
|
574
|
+
applyColumnSorter: me,
|
|
575
|
+
columnContext: S,
|
|
576
|
+
updateColumnRenderContext: Ve
|
|
577
|
+
} = O;
|
|
578
|
+
me(u, U);
|
|
579
|
+
const $ = cn(n, S), x = fn(n, p, y, h), g = mn(n, p, h, x, c), J = yn(n), k = pn(n, g, J), R = gn(n, u, g, re, h, J, k), Q = vn(n, h, k, R), Ge = Cn(n, h, k, R), X = hn(n, w, u, D, j, R, Q, Ge), {
|
|
580
|
+
getVisualData: ye
|
|
581
|
+
} = X, xe = Sn(S), Ee = wn(n, S), Z = bn(n, y), {
|
|
582
|
+
sidebarWidth: Pe,
|
|
583
|
+
showSidebarCheckBox: Te
|
|
584
|
+
} = Z, m = Bn(n, u, c, S, X, D, j, Pe, g), {
|
|
596
585
|
onWheel: ke,
|
|
597
|
-
dataGridWidth:
|
|
598
|
-
viewPortHeight:
|
|
599
|
-
viewPortWidth:
|
|
600
|
-
resetScroll:
|
|
601
|
-
updateVisibleRowsOnLatestVisibleScope:
|
|
602
|
-
} = m,
|
|
603
|
-
calculateColumnsSize:
|
|
604
|
-
} =
|
|
586
|
+
dataGridWidth: pe,
|
|
587
|
+
viewPortHeight: ge,
|
|
588
|
+
viewPortWidth: W,
|
|
589
|
+
resetScroll: E,
|
|
590
|
+
updateVisibleRowsOnLatestVisibleScope: Re
|
|
591
|
+
} = m, ee = Fn(n, S, r, W, $), {
|
|
592
|
+
calculateColumnsSize: te
|
|
593
|
+
} = ee, _ = On(), ne = In(r, Y, u, _, m), ve = Dn(n, p, O, u, $, q, m), Me = I(() => {
|
|
605
594
|
const t = {
|
|
606
595
|
"fv-grid": !0,
|
|
607
596
|
"fv-grid-bordered": n.showBorder,
|
|
608
597
|
"fv-grid-horizontal-bordered": n.showHorizontalLines,
|
|
609
598
|
"fv-datagrid-strip": n.showStripe
|
|
610
599
|
};
|
|
611
|
-
return
|
|
612
|
-
}),
|
|
600
|
+
return Ht(t, n.customClass);
|
|
601
|
+
}), je = I(() => ({
|
|
613
602
|
"fv-grid-content": !0,
|
|
614
|
-
"fv-grid-content-hover":
|
|
615
|
-
"fv-grid-wrap-content":
|
|
616
|
-
})),
|
|
603
|
+
"fv-grid-content-hover": F.value,
|
|
604
|
+
"fv-grid-wrap-content": we.value
|
|
605
|
+
})), Ne = I(() => {
|
|
617
606
|
const t = {};
|
|
618
607
|
return m.shouldShowHorizontalScrollbar.value && (t.paddingBottom = "10px"), m.shouldShowVirticalScrollbar.value && (t.paddingRight = "10px"), t;
|
|
619
608
|
}), {
|
|
620
609
|
renderGridHeader: e,
|
|
621
610
|
renderGridColumnResizeOverlay: o,
|
|
622
|
-
shouldShowHeader:
|
|
623
|
-
} =
|
|
611
|
+
shouldShowHeader: s
|
|
612
|
+
} = Vn(n, p, r, se, Y, O, u, ve, ne, N, _, ee, $, y, Z, U, m, W, c), {
|
|
624
613
|
renderDataGridPagination: l
|
|
625
|
-
} =
|
|
614
|
+
} = Gn(n, p, u, m, A, y), {
|
|
626
615
|
renderDataGridSidebar: f
|
|
627
|
-
} =
|
|
628
|
-
renderDisableMask:
|
|
629
|
-
} =
|
|
630
|
-
renderDataGridSummary:
|
|
631
|
-
} =
|
|
632
|
-
renderHorizontalScrollbar:
|
|
633
|
-
} =
|
|
634
|
-
renderVerticalScrollbar:
|
|
635
|
-
} =
|
|
636
|
-
renderFilterPanel:
|
|
637
|
-
} =
|
|
638
|
-
renderGroupPanel:
|
|
639
|
-
} =
|
|
640
|
-
function
|
|
641
|
-
var a,
|
|
642
|
-
const t = Math.ceil(
|
|
643
|
-
t >
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
});
|
|
652
|
-
})), ye.value && R();
|
|
653
|
-
}), $t(() => {
|
|
654
|
-
}), se(q, () => {
|
|
616
|
+
} = xn(n, x, y, Z, m), {
|
|
617
|
+
renderDisableMask: K
|
|
618
|
+
} = En(), {
|
|
619
|
+
renderDataGridSummary: Ce
|
|
620
|
+
} = Pn(n, u, O), {
|
|
621
|
+
renderHorizontalScrollbar: le
|
|
622
|
+
} = Tn(n, r, m), {
|
|
623
|
+
renderVerticalScrollbar: tt
|
|
624
|
+
} = kn(n, r, m), {
|
|
625
|
+
renderFilterPanel: nt
|
|
626
|
+
} = Rn(n, O, u, N, m), {
|
|
627
|
+
renderGroupPanel: lt
|
|
628
|
+
} = Mn(n, u, ve, q, m);
|
|
629
|
+
function at() {
|
|
630
|
+
var a, d;
|
|
631
|
+
const t = Math.ceil(r.value.clientHeight / ie);
|
|
632
|
+
t > P.value && (P.value = t, Re()), ge.value = ((a = T.value) == null ? void 0 : a.clientHeight) || 0, pe.value = ((d = r.value) == null ? void 0 : d.clientWidth) || 0, te();
|
|
633
|
+
}
|
|
634
|
+
Wt(() => {
|
|
635
|
+
r.value && (P.value = Math.max(Math.ceil(r.value.clientHeight / ie), P.value), c.value = ye(0, D.value + j - 1), qt(r.value, at), te(), _t(() => {
|
|
636
|
+
r.value && (pe.value = r.value.clientWidth), T.value && (W.value = T.value.clientWidth, ge.value = T.value.clientHeight);
|
|
637
|
+
})), be.value && de();
|
|
638
|
+
}), Kt(() => {
|
|
639
|
+
}), oe(W, () => {
|
|
655
640
|
});
|
|
656
|
-
function
|
|
641
|
+
function ot() {
|
|
657
642
|
const t = u.insertNewDataItem();
|
|
658
|
-
return
|
|
643
|
+
return E(), t;
|
|
659
644
|
}
|
|
660
|
-
function
|
|
661
|
-
const t = u.insertNewDataItem(
|
|
662
|
-
return
|
|
645
|
+
function it() {
|
|
646
|
+
const t = u.insertNewDataItem(c.value.length);
|
|
647
|
+
return E(), t;
|
|
663
648
|
}
|
|
664
|
-
function
|
|
649
|
+
function ut(t) {
|
|
665
650
|
g.onEditingRow(t);
|
|
666
651
|
}
|
|
667
652
|
function st(t) {
|
|
668
|
-
u.removeDataItem(t),
|
|
653
|
+
u.removeDataItem(t), E();
|
|
669
654
|
}
|
|
670
|
-
function
|
|
671
|
-
u.removeDataItemById(t),
|
|
655
|
+
function rt(t) {
|
|
656
|
+
u.removeDataItemById(t), E();
|
|
672
657
|
}
|
|
673
|
-
function
|
|
658
|
+
function dt(t) {
|
|
674
659
|
g.acceptEditingRow(t);
|
|
675
660
|
}
|
|
676
|
-
function
|
|
661
|
+
function ct(t) {
|
|
677
662
|
g.cancelEditingRow(t);
|
|
678
663
|
}
|
|
679
|
-
function
|
|
680
|
-
|
|
681
|
-
const v = u.visibleDataItems.value.findIndex((C) => C === a.raw), b =
|
|
664
|
+
function ft(t) {
|
|
665
|
+
c.value.forEach((a, d) => {
|
|
666
|
+
const v = u.visibleDataItems.value.findIndex((C) => C === a.raw), b = c.value[d - 1];
|
|
682
667
|
t.forEach((C) => {
|
|
683
|
-
a.data[C.field] ?
|
|
668
|
+
a.data[C.field] ? k.updateCellByColumn(a.data[C.field], C, b, a.raw) : a.data[C.field] = k.createCellByColumn(C, v, a.raw, a, b);
|
|
684
669
|
});
|
|
685
670
|
});
|
|
686
671
|
}
|
|
687
|
-
function
|
|
688
|
-
t && (w.value = t,
|
|
672
|
+
function Ae(t) {
|
|
673
|
+
t && (w.value = t, ft(w.value), z(w), n.showSetting && L(w), Ve(w.value), me(u, U), te());
|
|
689
674
|
}
|
|
690
|
-
function
|
|
675
|
+
function mt() {
|
|
691
676
|
y.emptyCurrentRowId();
|
|
692
677
|
}
|
|
693
|
-
|
|
694
|
-
t !== a &&
|
|
678
|
+
oe(() => n.showSetting, (t, a) => {
|
|
679
|
+
t !== a && Ae(w.value);
|
|
695
680
|
});
|
|
696
|
-
function
|
|
697
|
-
|
|
681
|
+
function Le(t) {
|
|
682
|
+
A.updatePagination(t);
|
|
698
683
|
}
|
|
699
|
-
function
|
|
700
|
-
t && (u.load(t),
|
|
684
|
+
function yt(t, a) {
|
|
685
|
+
t && (u.load(t), c.value = ye(0, D.value + j - 1), a != null && a.keepScrollTop ? m.scrollTo(m.offsetY.value) : E(), c.value.length || (ce.value = []), Te.value && Be.value && Fe()), g.clear();
|
|
701
686
|
}
|
|
702
|
-
|
|
703
|
-
t !== a && (u.updateDataView(),
|
|
704
|
-
}),
|
|
705
|
-
|
|
687
|
+
oe(u.shouldGroupingData, (t, a) => {
|
|
688
|
+
t !== a && (u.updateDataView(), E());
|
|
689
|
+
}), oe(() => n.columns, (t) => {
|
|
690
|
+
Ae(t);
|
|
706
691
|
});
|
|
707
|
-
function
|
|
708
|
-
|
|
692
|
+
function He(t) {
|
|
693
|
+
x.activeRowById(t);
|
|
709
694
|
}
|
|
710
|
-
function
|
|
695
|
+
function pt(t, a = {
|
|
711
696
|
isCurrent: !0
|
|
712
697
|
}) {
|
|
713
|
-
a != null && a.isCurrent &&
|
|
698
|
+
a != null && a.isCurrent && He(t), y.selectItemById(t);
|
|
699
|
+
}
|
|
700
|
+
function gt(t) {
|
|
701
|
+
const a = h.idField.value, d = c.value.find((v) => v.raw[a] === t);
|
|
702
|
+
d && x.clickRowItem(d);
|
|
714
703
|
}
|
|
715
704
|
function vt(t) {
|
|
716
|
-
const a = h.idField.value,
|
|
717
|
-
|
|
705
|
+
const a = h.idField.value, d = c.value.find((v) => v.raw[a] === t);
|
|
706
|
+
d && x.changeRow(d);
|
|
718
707
|
}
|
|
719
708
|
function Ct(t) {
|
|
720
|
-
const a = h.idField.value, s = d.value.find((v) => v.raw[a] === t);
|
|
721
|
-
s && j.changeRow(s);
|
|
722
|
-
}
|
|
723
|
-
function ht(t) {
|
|
724
709
|
y.selectItemByIds(t);
|
|
725
710
|
}
|
|
726
|
-
function
|
|
727
|
-
return
|
|
711
|
+
function ht() {
|
|
712
|
+
return c.value;
|
|
728
713
|
}
|
|
729
|
-
function
|
|
730
|
-
return
|
|
714
|
+
function St(t) {
|
|
715
|
+
return c.value.filter((a) => t.includes(a.raw[n.idField]));
|
|
731
716
|
}
|
|
732
|
-
function
|
|
717
|
+
function wt() {
|
|
733
718
|
return y.getSelectedItems();
|
|
734
719
|
}
|
|
735
|
-
function
|
|
720
|
+
function bt() {
|
|
736
721
|
return y.getSelectionRow();
|
|
737
722
|
}
|
|
738
|
-
function
|
|
723
|
+
function Bt() {
|
|
739
724
|
g.endEditCell();
|
|
740
725
|
}
|
|
741
|
-
function
|
|
726
|
+
function Ft(t, a = {
|
|
742
727
|
clearCurrent: !0
|
|
743
728
|
}) {
|
|
744
|
-
a != null && a.clearCurrent &&
|
|
729
|
+
a != null && a.clearCurrent && He(""), y.unSelectItemByIds(t);
|
|
745
730
|
}
|
|
746
731
|
function Ue() {
|
|
747
732
|
y.clearSelection();
|
|
748
733
|
}
|
|
749
|
-
function
|
|
734
|
+
function Ot() {
|
|
750
735
|
return y.currentSelectedDataId.value;
|
|
751
736
|
}
|
|
752
|
-
function
|
|
737
|
+
function It() {
|
|
753
738
|
m.scrollToBottom();
|
|
754
739
|
}
|
|
755
|
-
function
|
|
740
|
+
function Dt(t) {
|
|
756
741
|
m.scrollToRowByIndex(t);
|
|
757
742
|
}
|
|
758
|
-
function
|
|
759
|
-
y.keepSelectingOnPaging.value || Ue(), u.updateVisibleDataSummary(
|
|
743
|
+
function Vt() {
|
|
744
|
+
y.keepSelectingOnPaging.value || Ue(), u.updateVisibleDataSummary(c.value), Le({
|
|
760
745
|
total: u.dataView.value.length,
|
|
761
746
|
index: 1
|
|
762
747
|
});
|
|
763
748
|
}
|
|
764
|
-
function xt(t) {
|
|
765
|
-
y.updateSelectedValues(t);
|
|
766
|
-
}
|
|
767
|
-
function Dt(t) {
|
|
768
|
-
y.removeSelectedValues(t);
|
|
769
|
-
}
|
|
770
749
|
const We = {
|
|
771
|
-
activeRowById:
|
|
772
|
-
selectRowById:
|
|
773
|
-
addNewDataItem:
|
|
774
|
-
addNewDataItemAtLast:
|
|
750
|
+
activeRowById: He,
|
|
751
|
+
selectRowById: vt,
|
|
752
|
+
addNewDataItem: ot,
|
|
753
|
+
addNewDataItemAtLast: it,
|
|
775
754
|
removeDataItem: st,
|
|
776
|
-
removeDataItemById:
|
|
777
|
-
editDataItem:
|
|
778
|
-
acceptDataItem:
|
|
779
|
-
cancelDataItem:
|
|
780
|
-
selectItemById:
|
|
781
|
-
selectItemByIds:
|
|
782
|
-
updateColumns:
|
|
783
|
-
updateDataSource:
|
|
784
|
-
updatePagination:
|
|
785
|
-
getVisibleData:
|
|
786
|
-
getVisibleDataByIds:
|
|
787
|
-
getSelectedItems:
|
|
788
|
-
getSelectionRow:
|
|
789
|
-
getCurrentRowId:
|
|
790
|
-
endEditCell:
|
|
791
|
-
clickRowItemById:
|
|
755
|
+
removeDataItemById: rt,
|
|
756
|
+
editDataItem: ut,
|
|
757
|
+
acceptDataItem: dt,
|
|
758
|
+
cancelDataItem: ct,
|
|
759
|
+
selectItemById: pt,
|
|
760
|
+
selectItemByIds: Ct,
|
|
761
|
+
updateColumns: Ae,
|
|
762
|
+
updateDataSource: yt,
|
|
763
|
+
updatePagination: Le,
|
|
764
|
+
getVisibleData: ht,
|
|
765
|
+
getVisibleDataByIds: St,
|
|
766
|
+
getSelectedItems: wt,
|
|
767
|
+
getSelectionRow: bt,
|
|
768
|
+
getCurrentRowId: Ot,
|
|
769
|
+
endEditCell: Bt,
|
|
770
|
+
clickRowItemById: gt,
|
|
792
771
|
clearSelection: Ue,
|
|
793
|
-
unSelectItemByIds:
|
|
794
|
-
scrollToBottom:
|
|
795
|
-
scrollToRowByIndex:
|
|
796
|
-
updateDerivedData:
|
|
797
|
-
emptyCurrentRowId:
|
|
798
|
-
updateSelectedValues: xt,
|
|
799
|
-
removeSelectedValues: Dt
|
|
772
|
+
unSelectItemByIds: Ft,
|
|
773
|
+
scrollToBottom: It,
|
|
774
|
+
scrollToRowByIndex: Dt,
|
|
775
|
+
updateDerivedData: Vt,
|
|
776
|
+
emptyCurrentRowId: mt
|
|
800
777
|
};
|
|
801
778
|
p.expose(We);
|
|
802
|
-
const
|
|
803
|
-
renderDataArea:
|
|
804
|
-
} =
|
|
805
|
-
renderEmpty:
|
|
806
|
-
} =
|
|
779
|
+
const Gt = jn(n, p, We, O, g, c), {
|
|
780
|
+
renderDataArea: xt
|
|
781
|
+
} = Un(n, p, T, se, Y, xe, Ee, O, g, q, Gt, x, X, m, c, u), Et = I(() => !c.value || !c.value.length), {
|
|
782
|
+
renderEmpty: Pt
|
|
783
|
+
} = Nn(n, p), Tt = I(() => ({
|
|
807
784
|
"d-flex": !0,
|
|
808
|
-
"justify-content-between":
|
|
809
|
-
"justify-content-end":
|
|
785
|
+
"justify-content-between": G.value && H.value,
|
|
786
|
+
"justify-content-end": G.value && !H.value,
|
|
810
787
|
"position-relative": !0,
|
|
811
788
|
"fv-datagrid-pagination": !0
|
|
812
|
-
})),
|
|
789
|
+
})), kt = I(() => ({
|
|
813
790
|
"flex-direction": "row"
|
|
814
|
-
})),
|
|
791
|
+
})), Rt = I(() => ({
|
|
815
792
|
"d-flex": !0,
|
|
816
793
|
"align-items-center": !0
|
|
817
794
|
}));
|
|
818
|
-
|
|
819
|
-
useColumnComposition:
|
|
795
|
+
Yt("dataGridContext", {
|
|
796
|
+
useColumnComposition: O,
|
|
820
797
|
dataView: u,
|
|
821
|
-
useFilterComposition:
|
|
822
|
-
useFitColumnComposition:
|
|
823
|
-
useSortComposition:
|
|
798
|
+
useFilterComposition: N,
|
|
799
|
+
useFitColumnComposition: ee,
|
|
800
|
+
useSortComposition: U,
|
|
824
801
|
useVirtualScrollComposition: m
|
|
825
802
|
});
|
|
826
|
-
function
|
|
803
|
+
function Mt(t) {
|
|
827
804
|
let a;
|
|
828
|
-
return i(
|
|
805
|
+
return i(Hn, {
|
|
829
806
|
class: "f-form-layout farris-form farris-form-controls-inline col-12 col-md-6 col-xl-3 col-el-2"
|
|
830
|
-
},
|
|
807
|
+
}, Wn(a = Object.keys(t.data).filter((d) => {
|
|
831
808
|
var v, b;
|
|
832
|
-
return ((v = t.data[
|
|
833
|
-
}).map((
|
|
809
|
+
return ((v = t.data[d].column) == null ? void 0 : v.dataType) !== Qe && ((b = t.data[d].column) == null ? void 0 : b.dataType) !== Xe;
|
|
810
|
+
}).map((d) => {
|
|
834
811
|
var b, C;
|
|
835
|
-
const v = t.data[
|
|
812
|
+
const v = t.data[d];
|
|
836
813
|
return i("div", {
|
|
837
814
|
class: "farris-group-wrap w-100"
|
|
838
815
|
}, [i("div", {
|
|
839
816
|
class: "form-group farris-form-group common-group"
|
|
840
|
-
}, [i(
|
|
817
|
+
}, [i(zn, {
|
|
841
818
|
text: (b = v.column) == null ? void 0 : b.title,
|
|
842
819
|
title: (C = v.column) == null ? void 0 : C.title
|
|
843
820
|
}, null), i("div", {
|
|
@@ -847,93 +824,93 @@ const qn = /* @__PURE__ */ Kt({
|
|
|
847
824
|
default: () => [a]
|
|
848
825
|
});
|
|
849
826
|
}
|
|
850
|
-
function
|
|
851
|
-
const
|
|
852
|
-
Object.keys(a.data).filter((
|
|
853
|
-
var V,
|
|
854
|
-
return ((V = a.data[
|
|
855
|
-
}).forEach((
|
|
856
|
-
var
|
|
857
|
-
const V = a.data[
|
|
858
|
-
|
|
827
|
+
function jt(t, a) {
|
|
828
|
+
const d = {}, v = {}, b = [], C = [], Ye = {};
|
|
829
|
+
Object.keys(a.data).filter((M) => {
|
|
830
|
+
var V, ae;
|
|
831
|
+
return ((V = a.data[M].column) == null ? void 0 : V.dataType) !== Qe && ((ae = a.data[M].column) == null ? void 0 : ae.dataType) !== Xe;
|
|
832
|
+
}).forEach((M) => {
|
|
833
|
+
var ae, qe, $e;
|
|
834
|
+
const V = a.data[M];
|
|
835
|
+
d[M] = V.data, g.endEditByCell(V), v[M] = V.data, b.push(V.column), C.push(V), Ye[M] = ($e = (qe = (ae = V.column) == null ? void 0 : ae.editor) == null ? void 0 : qe.context) == null ? void 0 : $e.editor;
|
|
859
836
|
}), p.emit("endEditRow", {
|
|
860
837
|
row: a,
|
|
861
838
|
cells: C,
|
|
862
839
|
columns: b,
|
|
863
|
-
oldValues:
|
|
840
|
+
oldValues: d,
|
|
864
841
|
newValues: v,
|
|
865
|
-
editors:
|
|
842
|
+
editors: Ye
|
|
866
843
|
}), g.showRowEditPanel.value = !1;
|
|
867
844
|
}
|
|
868
|
-
function
|
|
869
|
-
const t = y.currentSelectedDataId.value, a =
|
|
870
|
-
return a ? i(
|
|
845
|
+
function Nt() {
|
|
846
|
+
const t = y.currentSelectedDataId.value, a = c.value.find((d) => d.raw[n.idField] === t);
|
|
847
|
+
return a ? i(An, {
|
|
871
848
|
showHeader: !1,
|
|
872
849
|
modelValue: g.showRowEditPanel.value,
|
|
873
|
-
"onUpdate:modelValue": (
|
|
850
|
+
"onUpdate:modelValue": (d) => g.showRowEditPanel.value = d,
|
|
874
851
|
width: 600
|
|
875
852
|
}, {
|
|
876
|
-
default: () =>
|
|
877
|
-
footerTemplate: () => i(
|
|
853
|
+
default: () => Mt(a),
|
|
854
|
+
footerTemplate: () => i(ze, null, [i(Ze, {
|
|
878
855
|
class: "mr-3",
|
|
879
856
|
type: "secondary",
|
|
880
|
-
onClick: (
|
|
857
|
+
onClick: (d) => {
|
|
881
858
|
g.showRowEditPanel.value = !1;
|
|
882
859
|
}
|
|
883
860
|
}, {
|
|
884
|
-
default: () => [
|
|
885
|
-
}), i(
|
|
886
|
-
onClick: (
|
|
887
|
-
|
|
861
|
+
default: () => [he("取消")]
|
|
862
|
+
}), i(Ze, {
|
|
863
|
+
onClick: (d) => {
|
|
864
|
+
jt(d, a);
|
|
888
865
|
}
|
|
889
866
|
}, {
|
|
890
|
-
default: () => [
|
|
867
|
+
default: () => [he("确定")]
|
|
891
868
|
})])
|
|
892
869
|
}) : null;
|
|
893
870
|
}
|
|
894
|
-
return () => i(
|
|
895
|
-
ref:
|
|
896
|
-
class:
|
|
897
|
-
style:
|
|
871
|
+
return () => i(ze, null, [i("div", {
|
|
872
|
+
ref: ue,
|
|
873
|
+
class: Me.value,
|
|
874
|
+
style: Ie.value,
|
|
898
875
|
onWheel: ke
|
|
899
|
-
}, [
|
|
900
|
-
ref:
|
|
901
|
-
class:
|
|
902
|
-
style:
|
|
876
|
+
}, [r.value && n.enableFilter && nt(), r.value && lt(), r.value && s.value && e(), i("div", {
|
|
877
|
+
ref: r,
|
|
878
|
+
class: je.value,
|
|
879
|
+
style: Ne.value,
|
|
903
880
|
onTouchstart: (t) => {
|
|
904
|
-
t.stopPropagation(),
|
|
881
|
+
t.stopPropagation(), F.value = !0, m.onTouchstartScrollThumb(t, r);
|
|
905
882
|
},
|
|
906
883
|
onTouchend: (t) => {
|
|
907
|
-
|
|
884
|
+
F.value = !1;
|
|
908
885
|
},
|
|
909
886
|
onMouseover: (t) => {
|
|
910
|
-
t.stopPropagation(),
|
|
887
|
+
t.stopPropagation(), F.value = !0;
|
|
911
888
|
},
|
|
912
889
|
onMouseleave: (t) => {
|
|
913
|
-
t.stopPropagation(),
|
|
890
|
+
t.stopPropagation(), F.value = !1;
|
|
914
891
|
}
|
|
915
|
-
}, [
|
|
916
|
-
class:
|
|
917
|
-
style:
|
|
918
|
-
}, [
|
|
919
|
-
class:
|
|
920
|
-
}, [i("div", null, ["已选:" +
|
|
892
|
+
}, [r.value && f(c), r.value && xt(), r.value && Et.value && Pt(), r.value && le(), r.value && tt()]), r.value && Ce(), (G.value || H.value) && i("div", {
|
|
893
|
+
class: Tt.value,
|
|
894
|
+
style: kt.value
|
|
895
|
+
}, [H.value && i("div", {
|
|
896
|
+
class: Rt.value
|
|
897
|
+
}, [i("div", null, ["已选:" + ce.value.length, he(" 条")])]), G.value && l()]), o(), Oe.value && K()]), Se() && Nt()]);
|
|
921
898
|
}
|
|
922
|
-
}),
|
|
899
|
+
}), cl = zt(_n);
|
|
923
900
|
export {
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
901
|
+
_n as FDataGrid,
|
|
902
|
+
ul as columnOptions,
|
|
903
|
+
Ln as dataGridProps,
|
|
904
|
+
cl as default,
|
|
905
|
+
rl as editOptions,
|
|
906
|
+
nl as filterOptions,
|
|
907
|
+
tl as groupOptions,
|
|
908
|
+
ll as headerOptions,
|
|
909
|
+
dl as loadingOptions,
|
|
910
|
+
Zn as paginationOptions,
|
|
911
|
+
al as rowNumberOptions,
|
|
912
|
+
ol as rowOptions,
|
|
913
|
+
sl as selectionOptions,
|
|
914
|
+
el as sortOptions,
|
|
915
|
+
il as summaryOptions
|
|
939
916
|
};
|