@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.
Files changed (128) hide show
  1. package/components/avatar/index.esm.js +155 -148
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/button-edit/index.esm.js +1 -1
  4. package/components/button-edit/index.umd.cjs +1 -1
  5. package/components/calendar/index.esm.js +226 -224
  6. package/components/calendar/index.umd.cjs +3 -3
  7. package/components/collection-property-editor/index.esm.js +225 -223
  8. package/components/collection-property-editor/index.umd.cjs +2 -2
  9. package/components/combo-list/index.esm.js +76 -71
  10. package/components/combo-list/index.umd.cjs +1 -1
  11. package/components/comment/index.esm.js +169 -167
  12. package/components/comment/index.umd.cjs +6 -6
  13. package/components/component/index.esm.js +3691 -3043
  14. package/components/component/index.umd.cjs +2 -2
  15. package/components/condition/index.esm.js +2015 -1352
  16. package/components/condition/index.umd.cjs +2 -2
  17. package/components/data-grid/index.esm.js +407 -430
  18. package/components/data-grid/index.umd.cjs +1 -1
  19. package/components/data-view/index.esm.js +3082 -3196
  20. package/components/data-view/index.umd.cjs +1 -1
  21. package/components/designer-canvas/index.esm.js +3364 -2713
  22. package/components/designer-canvas/index.umd.cjs +1 -1
  23. package/components/drawer/index.esm.js +66 -64
  24. package/components/drawer/index.umd.cjs +2 -2
  25. package/components/dynamic-form/index.esm.js +1176 -524
  26. package/components/dynamic-form/index.umd.cjs +1 -1
  27. package/components/dynamic-resolver/index.esm.js +182 -180
  28. package/components/dynamic-resolver/index.umd.cjs +2 -2
  29. package/components/dynamic-view/index.esm.js +531 -455
  30. package/components/dynamic-view/index.umd.cjs +1 -1
  31. package/components/events-editor/index.esm.js +2352 -1700
  32. package/components/events-editor/index.umd.cjs +3 -3
  33. package/components/expression-editor/index.esm.js +8 -3
  34. package/components/expression-editor/index.umd.cjs +2 -2
  35. package/components/filter-bar/index.esm.js +422 -413
  36. package/components/filter-bar/index.umd.cjs +2 -2
  37. package/components/filter-condition-editor/index.esm.js +8 -3
  38. package/components/filter-condition-editor/index.umd.cjs +1 -1
  39. package/components/image/index.esm.js +363 -354
  40. package/components/image/index.umd.cjs +2 -2
  41. package/components/language-textbox/index.esm.js +189 -187
  42. package/components/language-textbox/index.umd.cjs +2 -2
  43. package/components/list-view/index.esm.js +388 -389
  44. package/components/list-view/index.umd.cjs +5 -5
  45. package/components/mapping-editor/index.esm.js +1465 -1488
  46. package/components/mapping-editor/index.umd.cjs +1 -1
  47. package/components/number-range/index.esm.js +180 -173
  48. package/components/number-range/index.umd.cjs +1 -1
  49. package/components/order/index.esm.js +815 -811
  50. package/components/order/index.umd.cjs +5 -5
  51. package/components/property-panel/index.esm.js +429 -420
  52. package/components/property-panel/index.umd.cjs +3 -3
  53. package/components/query-solution/index.esm.js +4746 -4085
  54. package/components/query-solution/index.umd.cjs +7 -7
  55. package/components/schema-selector/index.esm.js +1401 -1402
  56. package/components/schema-selector/index.umd.cjs +5 -5
  57. package/components/section/index.esm.js +102 -100
  58. package/components/section/index.umd.cjs +2 -2
  59. package/components/sort-condition-editor/index.esm.js +8 -3
  60. package/components/sort-condition-editor/index.umd.cjs +1 -1
  61. package/components/transfer/index.esm.js +537 -538
  62. package/components/transfer/index.umd.cjs +5 -5
  63. package/components/tree-grid/index.esm.js +280 -283
  64. package/components/tree-grid/index.umd.cjs +1 -1
  65. package/components/tree-view/index.esm.js +200 -202
  66. package/components/tree-view/index.umd.cjs +1 -1
  67. package/components/uploader/index.esm.js +533 -519
  68. package/components/uploader/index.umd.cjs +2 -2
  69. package/designer/data-grid/index.esm.js +3806 -3905
  70. package/designer/data-grid/index.umd.cjs +9 -9
  71. package/designer/drawer/index.esm.js +188 -186
  72. package/designer/drawer/index.umd.cjs +2 -2
  73. package/designer/dynamic-form/index.esm.js +1562 -1073
  74. package/designer/dynamic-form/index.umd.cjs +2 -2
  75. package/designer/farris-designer.all.esm.js +9793 -8613
  76. package/designer/farris-designer.all.umd.cjs +8 -8
  77. package/designer/list-view/index.esm.js +564 -564
  78. package/designer/list-view/index.umd.cjs +6 -6
  79. package/designer/radio-group/index.esm.js +236 -229
  80. package/designer/radio-group/index.umd.cjs +1 -1
  81. package/designer/response-layout-editor/index.esm.js +178 -171
  82. package/designer/response-layout-editor/index.umd.cjs +1 -1
  83. package/designer/tabs/index.esm.js +3154 -2508
  84. package/designer/tabs/index.umd.cjs +2 -2
  85. package/designer/time-picker/index.esm.js +193 -186
  86. package/designer/time-picker/index.umd.cjs +1 -1
  87. package/designer/tree-grid/index.esm.js +444 -447
  88. package/designer/tree-grid/index.umd.cjs +1 -1
  89. package/farris.all.esm.js +60126 -59649
  90. package/farris.all.umd.cjs +30 -30
  91. package/index.css +1 -1
  92. package/package.json +1 -1
  93. package/types/components.d.ts +1 -1
  94. package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
  95. package/types/data-grid/index.d.ts +2 -5
  96. package/types/data-grid/src/data-grid.component.d.ts +1 -2
  97. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  98. package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
  99. package/types/data-view/composition/types.d.ts +0 -4
  100. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
  101. package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
  102. package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
  103. package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
  104. package/types/dynamic-form/designer.d.ts +0 -1
  105. package/types/dynamic-form/index.d.ts +4 -3
  106. package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
  107. package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
  108. package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
  109. package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
  110. package/types/dynamic-form/src/response-form.props.d.ts +13 -1
  111. package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
  112. package/types/dynamic-form/src/types.d.ts +1 -0
  113. package/types/dynamic-resolver/src/types.d.ts +1 -0
  114. package/types/dynamic-view/index.d.ts +43 -3
  115. package/types/dynamic-view/src/components/maps.d.ts +6 -6
  116. package/types/dynamic-view/src/composition/index.d.ts +5 -0
  117. package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
  118. package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
  119. package/types/language-textbox/index.d.ts +3 -3
  120. package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
  121. package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
  122. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
  123. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  124. package/types/property-panel/src/property-panel.component.d.ts +3 -3
  125. package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
  126. package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
  127. package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
  128. package/types/tree-view/src/tree-view.props.d.ts +0 -1
@@ -1,11 +1,11 @@
1
- import { useCommonUtils as Lt, getCustomClass as _t, withInstall as Ut } from "../common/index.esm.js";
2
- import { reactive as Qe, watch as se, createVNode as i, Fragment as be, isVNode as tt, Comment as Wt, createTextVNode as we, defineComponent as Kt, ref as S, computed as B, onMounted as Yt, nextTick as qt, onUnmounted as $t, provide as Jt } from "vue";
3
- import { useResizeObserver as Qt } from "@vueuse/core";
4
- import { CellMode as Xt, useMobile as Zt, useIdentify as en, useGroupData as tn, useFilter as nn, useHierarchy as ln, useLoading as an, useDataView as on, usePagination as un, useSelection as rn, useDataViewContainerStyle as sn, useCommandColumn as dn, useSettingColumn as cn, useColumn as fn, useSort as mn, useGroupColumn as yn, useRow as pn, useEdit as gn, useVisualDataBound as vn, useVisualDataCell as Cn, useVisualDataRow as hn, useVisualGroupRow as Sn, useVisualSummaryRow as wn, useVisualData as bn, useCellContentStyle as Bn, useCellPosition as Fn, useSidebar as On, useVirtualScroll as In, useFitColumn as Vn, useFilterHistory as Gn, useColumnFilter as En, useDragColumn as xn, getColumnHeader as Dn, getPagination as Pn, getSidebar as Tn, getDisableMask as Rn, getSummary as kn, getHorizontalScrollbar as Mn, getVerticalScrollbar as jn, getFilterPanel as Nn, getGroupPanel as An, useNavigation as Hn, getEmpty as zn, COMMAND_COLUMN_DATA_TYPE as Xe, SETTING_COLUMN_DATA_TYPE as Ze } from "../data-view/index.esm.js";
5
- import et from "../button/index.esm.js";
6
- import Ln from "../drawer/index.esm.js";
7
- import _n, { FDynamicFormLabel as Un } from "../dynamic-form/index.esm.js";
8
- const nl = {
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
- }, ll = {
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
- }, al = {
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
- }, ol = {
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
- }, il = {
73
+ }, ll = {
74
74
  /** 允许折行显示列标题 */
75
75
  wrapHeadings: { type: Boolean, default: !1 }
76
- }, ul = {
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
- }, rl = {
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
- }, sl = {
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
- }, dl = {
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
- }, cl = {
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
- }, fl = {
154
+ }, rl = {
155
155
  /** 编辑时选中文本 */
156
156
  selectOnEditing: { type: Boolean, default: !1 },
157
157
  /** 编辑模式; row:整行编辑,cell: 单元格编辑 */
158
158
  editMode: { type: String, default: "cell" }
159
- }, ml = {
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
- }, Wn = {
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 Kn(n, p, Be, H, G, de, D, w, h, ce, c, P, fe, Q, d, T) {
295
+ function Un(n, p, Se, j, ie, P, w, h, ue, r, T, se, Y, c, F, we) {
302
296
  const {
303
- isNull: Fe,
304
- isUndefined: X
305
- } = Lt(), {
306
- totalItems: z,
307
- rawView: me
308
- } = T, {
309
- calculateCellPositionInRow: ye,
310
- cellKey: R,
311
- cellPosition: u,
312
- rowKey: k,
313
- rowPosition: E,
314
- rowSpanCellPosition: y,
315
- groupCellPosition: Oe,
316
- summaryCellPosition: L
317
- } = D, {
318
- cellContentClass: pe,
319
- cellContentPosition: Ie,
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
- onClickCell: F
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
- toggleGroupRow: Y
333
- } = fe, {
334
- columnContext: O,
335
- hasLeftFixedColumn: M,
336
- hasRightFixedColumn: Ge
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
- }, I = Qe({
343
+ }, R = Je({
350
344
  "fv-grid-content-left-fixed": !0
351
- }), N = Qe({
345
+ }), Q = Je({
352
346
  "fv-grid-content-right-fixed": !0
353
347
  });
354
- se([z, me], (e) => {
355
- !e[0] && !e[1].length ? (I["fv-grid-content-left-fixed"] = !1, N["fv-grid-content-right-fixed"] = !1) : (I["fv-grid-content-left-fixed"] = !0, N["fv-grid-content-right-fixed"] = !0);
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: Ee,
359
- gridMergedDataStyle: xe,
360
- leftFixedGridDataStyle: ne,
361
- leftFixedGridMergedDataStyle: ge,
362
- rightFixedGridDataStyle: De,
363
- rightFixedGridMergedDataStyle: Pe
364
- } = Q;
365
- function le(e, o) {
366
- o.collapse = !o.collapse, d.value = Y(o.collapse ? "collapse" : "expand", o, d.value);
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 r = [];
363
+ const s = [];
370
364
  if (e.groupField && o[e.groupField]) {
371
365
  for (let f = 0; f <= e.layer; f++)
372
- r.push(i("div", {
366
+ s.push(i("div", {
373
367
  class: "fv-grid-group-row-icon",
374
- onClick: (J) => le(J, e)
368
+ onClick: (K) => Pe(K, e)
375
369
  }, [i("span", {
376
- class: U(e)
370
+ class: Ie(e)
377
371
  }, null)]));
378
372
  const l = e.data[e.groupField];
379
- r.push(i("div", {
373
+ s.push(i("div", {
380
374
  ref: l.setRef,
381
- key: R(e, e.layer + 1),
375
+ key: u(e, e.layer + 1),
382
376
  class: "fv-grid-cell",
383
- style: Oe(l, o, e.layer)
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
- r.push(i("div", {
379
+ s.push(i("div", {
386
380
  ref: f.setRef,
387
- key: R(e, f.index),
381
+ key: u(e, f.index),
388
382
  class: "fv-grid-cell",
389
- style: u(e, f, o)
383
+ style: A(e, f, o)
390
384
  }, [f.data]));
391
385
  });
392
386
  }
393
- return r;
387
+ return s;
394
388
  }
395
- function Re(e, o, r) {
389
+ function m(e, o, s) {
396
390
  return e.layer > -1 && i("div", {
397
391
  ref: e.setRef,
398
- key: k(e),
399
- class: Z(e, r),
400
- style: E(e),
401
- onClick: (l) => W(l, e),
402
- onMouseover: (l) => K(l, e)
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 m(e, o) {
406
- const r = [];
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
- r.push(i("div", {
403
+ s.push(i("div", {
410
404
  ref: l.setRef,
411
- key: R(e, e.layer + 1),
405
+ key: u(e, e.layer + 1),
412
406
  class: "fv-grid-cell",
413
- style: L(l, o, e.layer)
407
+ style: ce(l, o, e.layer)
414
408
  }, [l.data]));
415
409
  }
416
- return r;
410
+ return s;
417
411
  }
418
- function ke(e, o, r) {
412
+ function pe(e, o, s) {
419
413
  return e.layer > -1 && i("div", {
420
414
  ref: e.setRef,
421
- key: k(e),
422
- class: Z(e, r),
423
- style: E(e),
424
- onClick: (l) => W(l, e),
425
- onMouseover: (l) => K(l, e)
426
- }, [m(e, o)]);
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 ve(e, o) {
429
- var r, l, f;
430
- return e.showTips && typeof ((r = e.column) == null ? void 0 : r.formatter) != "function" && ((l = e.column) == null ? void 0 : l.dataType) !== "commands" && ((f = e.column) == null ? void 0 : f.dataType) !== "setting" ? i("div", {
431
- class: _(e),
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: _(e)
428
+ class: D(e)
435
429
  }, [e.formatter(e, o)]);
436
430
  }
437
- function Ce() {
438
- return i("div", null, [we("******")]);
431
+ function W() {
432
+ return i("div", null, [he("******")]);
439
433
  }
440
- function q(e) {
434
+ function E(e) {
441
435
  var l, f;
442
- const o = !Fe(e.data) && !X(e.data) ? e.data.toString() : e.data;
443
- return ((f = (l = e.column) == null ? void 0 : l.editor) == null ? void 0 : f.showType) === "password" ? Ce() : e.showTips ? i("div", {
444
- class: _(e),
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: _(e)
441
+ class: D(e)
448
442
  }, [o]);
449
443
  }
450
- function x(e, o) {
451
- return e.mode === Xt.editing ? i("div", {
452
- style: te(e)
453
- }, [e.getEditor(e)]) : e.column.columnTemplate ? e.column.columnTemplate(e, o) : e.formatter ? ve(e, o) : q(e);
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 ae(e, o, r) {
449
+ function ee(e, o, s) {
459
450
  return i("div", {
460
451
  ref: e.setRef,
461
- key: k(e),
462
- class: Z(e, r),
463
- style: E(e),
464
- onClick: (l) => W(l, e),
465
- onMouseover: (l) => K(l, e),
466
- onMouseout: (l) => Le(l, e)
467
- }, [n.displayType === "Card" ? Me() : Object.values(e.data).filter((l) => o[l.field] && l.rowSpan === 1).map((l) => {
468
- var J, Se;
469
- const f = p.slots.cellTemplate && g(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: R(e, l.index),
476
- class: Ve(l, e),
477
- style: u(e, l, o),
478
- onClick: (ue) => {
479
- F(ue, l, e, l.column);
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: pe(l),
484
- style: Ie(l)
485
- }, [f ? (Se = (J = p.slots).cellTemplate) == null ? void 0 : Se.call(J, {
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
- }) : x(l, e)])]);
477
+ }) : Re(l, e)])]);
489
478
  })]);
490
479
  }
491
- const oe = [ae, Re, ke];
492
- function $(e, o) {
493
- const r = ye(e);
494
- return d.value.map((l, f) => oe[l.type](l, r, f));
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 ie(e) {
497
- const o = ye(e);
498
- return d.value.map((r) => Object.values(r.data).filter((l) => o[l.field] && l.rowSpan > 1).map((l) => i("div", {
499
- key: R(r, l.index),
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: y(r, l, o)
490
+ style: Be(s, l, o)
502
491
  }, [l.data])));
503
492
  }
504
- function he() {
493
+ function ve() {
505
494
  return i("div", {
506
- ref: H,
507
- class: I
495
+ ref: j,
496
+ class: R
508
497
  }, [i("div", {
509
498
  class: "fv-grid-data",
510
- style: ne.value
511
- }, [$(O.value.leftColumns.filter((e) => e.visible))]), i("div", {
499
+ style: ye.value
500
+ }, [_(S.value.leftColumns.filter((e) => e.visible))]), i("div", {
512
501
  class: "fv-grid-merge-date",
513
- style: ge.value
514
- }, [ie(O.value.leftColumns.filter((e) => e.visible))])]);
502
+ style: xe.value
503
+ }, [ne(S.value.leftColumns.filter((e) => e.visible))])]);
515
504
  }
516
- function je() {
505
+ function Me() {
517
506
  return i("div", {
518
- ref: Be,
507
+ ref: Se,
519
508
  class: "fv-grid-content-primary"
520
509
  }, [i("div", {
521
510
  class: "fv-grid-data",
522
- style: Ee.value
523
- }, [$(O.value.primaryColumns.filter((e) => e.visible))]), i("div", {
511
+ style: Ge.value
512
+ }, [_(S.value.primaryColumns.filter((e) => e.visible))]), i("div", {
524
513
  class: "fv-grid-merge-date",
525
- style: xe.value
526
- }, [ie(O.value.primaryColumns.filter((e) => e.visible))])]);
514
+ style: X.value
515
+ }, [ne(S.value.primaryColumns.filter((e) => e.visible))])]);
527
516
  }
528
- function Ne() {
517
+ function je() {
529
518
  return i("div", {
530
- ref: G,
531
- class: N
519
+ ref: ie,
520
+ class: Q
532
521
  }, [i("div", {
533
522
  class: "fv-grid-data",
534
- style: De.value
535
- }, [$(O.value.rightColumns.filter((e) => e.visible))]), i("div", {
523
+ style: Ee.value
524
+ }, [_(S.value.rightColumns.filter((e) => e.visible))]), i("div", {
536
525
  class: "fv-grid-merge-date",
537
- style: Pe.value
538
- }, [ie(O.value.rightColumns.filter((e) => e.visible))])]);
526
+ style: Z.value
527
+ }, [ne(S.value.rightColumns.filter((e) => e.visible))])]);
539
528
  }
540
- function Ae() {
529
+ function Ne() {
541
530
  const e = [];
542
- return M.value && e.push(he()), e.push(je()), Ge.value && e.push(Ne()), e;
531
+ return Ve.value && e.push(ve()), e.push(Me()), $.value && e.push(je()), e;
543
532
  }
544
533
  return {
545
- renderDataArea: Ae
534
+ renderDataArea: Ne
546
535
  };
547
536
  }
548
- function Yn(n) {
549
- return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !tt(n);
537
+ function Wn(n) {
538
+ return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !et(n);
550
539
  }
551
- const qn = /* @__PURE__ */ Kt({
540
+ const _n = /* @__PURE__ */ Ut({
552
541
  name: "FDataGrid",
553
- props: Wn,
554
- emits: ["changed", "clickRow", "doubleClickRow", "selectionChange", "unSelectItem", "selectItem", "enterUpInLastCell", "selectAll", "unSelectAll", "pageIndexChanged", "pageSizeChanged", "beginEditCell", "endEditCell", "filterChanged", "sortChanged", "selectionUpdate", "endEditRow", "fieldsEvent"],
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 Ke, Ye;
545
+ var _e, Ke;
557
546
  const {
558
- isMobilePhone: Be
559
- } = Zt();
560
- S();
561
- const H = 0, G = S(((Ke = n.rowOption) == null ? void 0 : Ke.height) || 28), de = B(() => n.displayType === "Card"), D = S(20), w = S(n.columns), h = en(n), ce = S(), c = S(), P = S(), fe = S(), Q = S(), d = S([]), T = S(!1), Fe = S(((Ye = n.rowOption) == null ? void 0 : Ye.wrapContent) || !1), X = tn(n, h), z = nn(n, p), me = ln(n), {
562
- showLoading: ye,
563
- renderLoading: R
564
- } = an(n, ce), u = on(n, /* @__PURE__ */ new Map(), z, me, h), k = un(n, u), {
565
- shouldRenderPagination: E
566
- } = k, y = rn(n, u, h, d, p), {
567
- showSelectAll: Oe,
568
- showSelection: L,
569
- selectedValues: pe,
570
- updateSelectAllStatus: Ie
571
- } = y, _ = B(() => n.disabled), U = B(() => n.virtualized ? Math.min(u.dataView.value.length, D.value) : u.dataView.value.length);
572
- B(() => n.loadingConfig.message);
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: Ve
575
- } = sn(n), Z = dn(n), {
576
- applyCommands: W
577
- } = Z;
578
- W(w);
563
+ containerStyleObject: Ie
564
+ } = on(n), De = un(n), {
565
+ applyCommands: z
566
+ } = De;
567
+ z(w);
579
568
  const {
580
- applyColumnSetting: K,
581
- removeColumnSetting: Le
582
- } = cn(n);
583
- n.showSetting && K(w);
584
- const F = fn(n, p), Y = mn(n), {
585
- applyColumnSorter: O,
586
- columnContext: M,
587
- updateColumnRenderContext: Ge
588
- } = F;
589
- O(u, Y);
590
- const ee = yn(n, M), j = pn(n, p, y, h), g = gn(n, p, h, j, d), te = vn(n, u, G), I = Cn(n, g, te), N = hn(n, u, g, me, h, te, I, G), Ee = Sn(n, h, I, N), xe = wn(n, h, I, N), ne = bn(n, w, u, U, H, N, Ee, xe), {
591
- getVisualData: ge
592
- } = ne, De = Bn(M), Pe = Fn(n, M, G, de), le = On(n, y), {
593
- sidebarWidth: Te,
594
- showSidebarCheckBox: Re
595
- } = le, m = In(n, u, d, M, ne, U, H, Te, G, de, g), {
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: ve,
598
- viewPortHeight: Ce,
599
- viewPortWidth: q,
600
- resetScroll: x,
601
- updateVisibleRowsOnLatestVisibleScope: Me
602
- } = m, ae = Vn(n, M, c, q, ee), {
603
- calculateColumnsSize: oe
604
- } = ae, $ = Gn(), ie = En(c, Q, u, $, m), he = xn(n, p, F, u, ee, X, m), je = B(() => {
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 _t(t, n.customClass);
612
- }), Ne = B(() => ({
600
+ return Ht(t, n.customClass);
601
+ }), je = I(() => ({
613
602
  "fv-grid-content": !0,
614
- "fv-grid-content-hover": T.value,
615
- "fv-grid-wrap-content": Fe.value
616
- })), Ae = B(() => {
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: r
623
- } = Dn(n, p, c, fe, Q, F, u, he, ie, z, $, ae, ee, y, le, Y, m, q, d), {
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
- } = Pn(n, p, u, m, k, y), {
614
+ } = Gn(n, p, u, m, A, y), {
626
615
  renderDataGridSidebar: f
627
- } = Tn(n, j, y, le, m), {
628
- renderDisableMask: J
629
- } = Rn(), {
630
- renderDataGridSummary: Se
631
- } = kn(n, u, F), {
632
- renderHorizontalScrollbar: ue
633
- } = Mn(n, c, m), {
634
- renderVerticalScrollbar: nt
635
- } = jn(n, c, m), {
636
- renderFilterPanel: lt
637
- } = Nn(n, F, u, z, m), {
638
- renderGroupPanel: at
639
- } = An(n, u, he, X, m);
640
- function ot() {
641
- var a, s;
642
- const t = Math.ceil(c.value.clientHeight / G.value);
643
- t > D.value && (D.value = t, Me()), Ce.value = ((a = P.value) == null ? void 0 : a.clientHeight) || 0, ve.value = ((s = c.value) == null ? void 0 : s.clientWidth) || 0, oe();
644
- }
645
- Yt(() => {
646
- c.value && (D.value = Math.max(Math.ceil(c.value.clientHeight / G.value), D.value), d.value = ge(0, U.value + H - 1), Qt(c.value, ot), oe(), qt(() => {
647
- var t;
648
- c.value && (ve.value = c.value.clientWidth), P.value && (q.value = P.value.clientWidth, Ce.value = P.value.clientHeight), (t = n.rowOption) != null && t.wrapContent && d.value.forEach((a) => {
649
- var s;
650
- a.height = ((s = a.ref) == null ? void 0 : s.getBoundingClientRect().height) || 0, a.raw.__fv_data_height__ = a.height, te.updateRowPosition(a, a.raw);
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 it() {
641
+ function ot() {
657
642
  const t = u.insertNewDataItem();
658
- return x(), t;
643
+ return E(), t;
659
644
  }
660
- function ut() {
661
- const t = u.insertNewDataItem(d.value.length);
662
- return x(), t;
645
+ function it() {
646
+ const t = u.insertNewDataItem(c.value.length);
647
+ return E(), t;
663
648
  }
664
- function rt(t) {
649
+ function ut(t) {
665
650
  g.onEditingRow(t);
666
651
  }
667
652
  function st(t) {
668
- u.removeDataItem(t), x();
653
+ u.removeDataItem(t), E();
669
654
  }
670
- function dt(t) {
671
- u.removeDataItemById(t), x();
655
+ function rt(t) {
656
+ u.removeDataItemById(t), E();
672
657
  }
673
- function ct(t) {
658
+ function dt(t) {
674
659
  g.acceptEditingRow(t);
675
660
  }
676
- function ft(t) {
661
+ function ct(t) {
677
662
  g.cancelEditingRow(t);
678
663
  }
679
- function mt(t) {
680
- d.value.forEach((a, s) => {
681
- const v = u.visibleDataItems.value.findIndex((C) => C === a.raw), b = d.value[s - 1];
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] ? I.updateCellByColumn(a.data[C.field], C, b, a.raw) : a.data[C.field] = I.createCellByColumn(C, v, a.raw, a, b);
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 He(t) {
688
- t && (w.value = t, mt(w.value), W(w), n.showSetting && K(w), Ge(w.value), O(u, Y), oe());
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 yt() {
675
+ function mt() {
691
676
  y.emptyCurrentRowId();
692
677
  }
693
- se(() => n.showSetting, (t, a) => {
694
- t !== a && He(w.value);
678
+ oe(() => n.showSetting, (t, a) => {
679
+ t !== a && Ae(w.value);
695
680
  });
696
- function _e(t) {
697
- k.updatePagination(t);
681
+ function Le(t) {
682
+ A.updatePagination(t);
698
683
  }
699
- function pt(t, a) {
700
- t && (u.load(t), d.value = ge(0, U.value + H - 1), a != null && a.keepScrollTop ? m.scrollTo(m.offsetY.value) : x(), d.value.length || (pe.value = []), Re.value && Oe.value && Ie()), g.clear();
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
- se(u.shouldGroupingData, (t, a) => {
703
- t !== a && (u.updateDataView(), x());
704
- }), se(() => n.columns, (t) => {
705
- He(t);
687
+ oe(u.shouldGroupingData, (t, a) => {
688
+ t !== a && (u.updateDataView(), E());
689
+ }), oe(() => n.columns, (t) => {
690
+ Ae(t);
706
691
  });
707
- function ze(t) {
708
- j.activeRowById(t);
692
+ function He(t) {
693
+ x.activeRowById(t);
709
694
  }
710
- function gt(t, a = {
695
+ function pt(t, a = {
711
696
  isCurrent: !0
712
697
  }) {
713
- a != null && a.isCurrent && ze(t), y.selectItemById(t);
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, s = d.value.find((v) => v.raw[a] === t);
717
- s && j.clickRowItem(s);
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 St() {
727
- return d.value;
711
+ function ht() {
712
+ return c.value;
728
713
  }
729
- function wt(t) {
730
- return d.value.filter((a) => t.includes(a.raw[n.idField]));
714
+ function St(t) {
715
+ return c.value.filter((a) => t.includes(a.raw[n.idField]));
731
716
  }
732
- function bt() {
717
+ function wt() {
733
718
  return y.getSelectedItems();
734
719
  }
735
- function Bt() {
720
+ function bt() {
736
721
  return y.getSelectionRow();
737
722
  }
738
- function Ft() {
723
+ function Bt() {
739
724
  g.endEditCell();
740
725
  }
741
- function Ot(t, a = {
726
+ function Ft(t, a = {
742
727
  clearCurrent: !0
743
728
  }) {
744
- a != null && a.clearCurrent && ze(""), y.unSelectItemByIds(t);
729
+ a != null && a.clearCurrent && He(""), y.unSelectItemByIds(t);
745
730
  }
746
731
  function Ue() {
747
732
  y.clearSelection();
748
733
  }
749
- function It() {
734
+ function Ot() {
750
735
  return y.currentSelectedDataId.value;
751
736
  }
752
- function Vt() {
737
+ function It() {
753
738
  m.scrollToBottom();
754
739
  }
755
- function Gt(t) {
740
+ function Dt(t) {
756
741
  m.scrollToRowByIndex(t);
757
742
  }
758
- function Et() {
759
- y.keepSelectingOnPaging.value || Ue(), u.updateVisibleDataSummary(d.value), _e({
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: ze,
772
- selectRowById: Ct,
773
- addNewDataItem: it,
774
- addNewDataItemAtLast: ut,
750
+ activeRowById: He,
751
+ selectRowById: vt,
752
+ addNewDataItem: ot,
753
+ addNewDataItemAtLast: it,
775
754
  removeDataItem: st,
776
- removeDataItemById: dt,
777
- editDataItem: rt,
778
- acceptDataItem: ct,
779
- cancelDataItem: ft,
780
- selectItemById: gt,
781
- selectItemByIds: ht,
782
- updateColumns: He,
783
- updateDataSource: pt,
784
- updatePagination: _e,
785
- getVisibleData: St,
786
- getVisibleDataByIds: wt,
787
- getSelectedItems: bt,
788
- getSelectionRow: Bt,
789
- getCurrentRowId: It,
790
- endEditCell: Ft,
791
- clickRowItemById: vt,
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: Ot,
794
- scrollToBottom: Vt,
795
- scrollToRowByIndex: Gt,
796
- updateDerivedData: Et,
797
- emptyCurrentRowId: yt,
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 Pt = Hn(n, p, We, F, g, d), {
803
- renderDataArea: Tt
804
- } = Kn(n, p, P, fe, Q, De, Pe, F, g, X, Pt, j, ne, m, d, u), Rt = B(() => !d.value || !d.value.length), {
805
- renderEmpty: kt
806
- } = zn(n, p), Mt = B(() => ({
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": E.value && L.value,
809
- "justify-content-end": E.value && !L.value,
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
- })), jt = B(() => ({
789
+ })), kt = I(() => ({
813
790
  "flex-direction": "row"
814
- })), Nt = B(() => ({
791
+ })), Rt = I(() => ({
815
792
  "d-flex": !0,
816
793
  "align-items-center": !0
817
794
  }));
818
- Jt("dataGridContext", {
819
- useColumnComposition: F,
795
+ Yt("dataGridContext", {
796
+ useColumnComposition: O,
820
797
  dataView: u,
821
- useFilterComposition: z,
822
- useFitColumnComposition: ae,
823
- useSortComposition: Y,
798
+ useFilterComposition: N,
799
+ useFitColumnComposition: ee,
800
+ useSortComposition: U,
824
801
  useVirtualScrollComposition: m
825
802
  });
826
- function At(t) {
803
+ function Mt(t) {
827
804
  let a;
828
- return i(_n, {
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
- }, Yn(a = Object.keys(t.data).filter((s) => {
807
+ }, Wn(a = Object.keys(t.data).filter((d) => {
831
808
  var v, b;
832
- return ((v = t.data[s].column) == null ? void 0 : v.dataType) !== Xe && ((b = t.data[s].column) == null ? void 0 : b.dataType) !== Ze;
833
- }).map((s) => {
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[s];
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(Un, {
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 Ht(t, a) {
851
- const s = {}, v = {}, b = [], C = [], qe = {};
852
- Object.keys(a.data).filter((A) => {
853
- var V, re;
854
- return ((V = a.data[A].column) == null ? void 0 : V.dataType) !== Xe && ((re = a.data[A].column) == null ? void 0 : re.dataType) !== Ze;
855
- }).forEach((A) => {
856
- var re, $e, Je;
857
- const V = a.data[A];
858
- s[A] = V.data, g.endEditByCell(V), v[A] = V.data, b.push(V.column), C.push(V), qe[A] = (Je = ($e = (re = V.column) == null ? void 0 : re.editor) == null ? void 0 : $e.context) == null ? void 0 : Je.editor;
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: s,
840
+ oldValues: d,
864
841
  newValues: v,
865
- editors: qe
842
+ editors: Ye
866
843
  }), g.showRowEditPanel.value = !1;
867
844
  }
868
- function zt() {
869
- const t = y.currentSelectedDataId.value, a = d.value.find((s) => s.raw[n.idField] === t);
870
- return a ? i(Ln, {
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": (s) => g.showRowEditPanel.value = s,
850
+ "onUpdate:modelValue": (d) => g.showRowEditPanel.value = d,
874
851
  width: 600
875
852
  }, {
876
- default: () => At(a),
877
- footerTemplate: () => i(be, null, [i(et, {
853
+ default: () => Mt(a),
854
+ footerTemplate: () => i(ze, null, [i(Ze, {
878
855
  class: "mr-3",
879
856
  type: "secondary",
880
- onClick: (s) => {
857
+ onClick: (d) => {
881
858
  g.showRowEditPanel.value = !1;
882
859
  }
883
860
  }, {
884
- default: () => [we("取消")]
885
- }), i(et, {
886
- onClick: (s) => {
887
- Ht(s, a);
861
+ default: () => [he("取消")]
862
+ }), i(Ze, {
863
+ onClick: (d) => {
864
+ jt(d, a);
888
865
  }
889
866
  }, {
890
- default: () => [we("确定")]
867
+ default: () => [he("确定")]
891
868
  })])
892
869
  }) : null;
893
870
  }
894
- return () => i(be, null, [i("div", {
895
- ref: ce,
896
- class: je.value,
897
- style: Ve.value,
871
+ return () => i(ze, null, [i("div", {
872
+ ref: ue,
873
+ class: Me.value,
874
+ style: Ie.value,
898
875
  onWheel: ke
899
- }, [c.value && n.enableFilter && lt(), c.value && at(), c.value && r.value && e(), i("div", {
900
- ref: c,
901
- class: Ne.value,
902
- style: Ae.value,
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(), T.value = !0, m.onTouchstartScrollThumb(t, c);
881
+ t.stopPropagation(), F.value = !0, m.onTouchstartScrollThumb(t, r);
905
882
  },
906
883
  onTouchend: (t) => {
907
- T.value = !1;
884
+ F.value = !1;
908
885
  },
909
886
  onMouseover: (t) => {
910
- t.stopPropagation(), T.value = !0;
887
+ t.stopPropagation(), F.value = !0;
911
888
  },
912
889
  onMouseleave: (t) => {
913
- t.stopPropagation(), T.value = !1;
890
+ t.stopPropagation(), F.value = !1;
914
891
  }
915
- }, [c.value && f(d), c.value && Tt(), c.value && Rt.value && kt(), c.value && ue(), c.value && nt()]), c.value && Se(), (E.value || L.value) && i("div", {
916
- class: Mt.value,
917
- style: jt.value
918
- }, [L.value && i("div", {
919
- class: Nt.value
920
- }, [i("div", null, ["已选:" + pe.value.length, we(" 条")])]), E.value && l()]), o(), _.value && J()]), Be() && zt()]);
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
- }), yl = Ut(qn);
899
+ }), cl = zt(_n);
923
900
  export {
924
- qn as FDataGrid,
925
- dl as columnOptions,
926
- Wn as dataGridProps,
927
- yl as default,
928
- fl as editOptions,
929
- ol as filterOptions,
930
- al as groupOptions,
931
- il as headerOptions,
932
- ml as loadingOptions,
933
- nl as paginationOptions,
934
- ul as rowNumberOptions,
935
- rl as rowOptions,
936
- cl as selectionOptions,
937
- ll as sortOptions,
938
- sl as summaryOptions
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
  };