@farris/ui-vue 1.8.1 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/components/batch-editor/index.esm.js +7332 -7299
  2. package/components/batch-editor/index.umd.cjs +22 -22
  3. package/components/button/index.esm.js +7334 -7301
  4. package/components/button/index.umd.cjs +22 -22
  5. package/components/collection-property-editor/index.esm.js +2 -2
  6. package/components/collection-property-editor/index.umd.cjs +1 -1
  7. package/components/component/index.esm.js +880 -874
  8. package/components/component/index.umd.cjs +2 -2
  9. package/components/data-grid/index.esm.js +841 -835
  10. package/components/data-grid/index.umd.cjs +2 -2
  11. package/components/data-view/index.esm.js +14551 -14472
  12. package/components/data-view/index.umd.cjs +27 -27
  13. package/components/designer-canvas/index.esm.js +820 -814
  14. package/components/designer-canvas/index.umd.cjs +1 -1
  15. package/components/mapping-editor/index.esm.js +848 -842
  16. package/components/mapping-editor/index.umd.cjs +2 -2
  17. package/components/popover/index.esm.js +264 -243
  18. package/components/popover/index.umd.cjs +1 -1
  19. package/components/tree-grid/index.esm.js +315 -309
  20. package/components/tree-grid/index.umd.cjs +1 -1
  21. package/designer/data-grid/index.esm.js +8304 -8257
  22. package/designer/data-grid/index.umd.cjs +26 -26
  23. package/designer/farris-designer.all.esm.js +3235 -3223
  24. package/designer/farris-designer.all.umd.cjs +14 -14
  25. package/designer/radio-group/index.esm.js +80 -62
  26. package/designer/radio-group/index.umd.cjs +2 -2
  27. package/designer/tabs/index.esm.js +830 -824
  28. package/designer/tabs/index.umd.cjs +2 -2
  29. package/designer/tree-grid/index.esm.js +348 -342
  30. package/designer/tree-grid/index.umd.cjs +1 -1
  31. package/farris.all.esm.js +18919 -18822
  32. package/farris.all.umd.cjs +39 -39
  33. package/package.json +1 -1
  34. package/types/data-view/components/column-header/column-header.component.d.ts +2 -2
  35. package/types/data-view/composition/column/persist-column-widths.d.ts +15 -0
  36. package/types/data-view/composition/column/use-resize.d.ts +3 -2
  37. package/types/data-view/index.d.ts +1 -0
  38. package/types/popover/src/composition/measure-host.d.ts +10 -5
  39. package/types/popover/src/composition/types.d.ts +2 -2
  40. package/types/popover/src/composition/use-host.d.ts +1 -2
  41. package/types/radio-group/src/property-config/radio-group.property-config.d.ts +21 -0
@@ -1,19 +1,19 @@
1
- import { getCustomClass as En, excludeProperties as Mn, EVENT_PROPERTY_TAB_IDS as An, withInstall as Hn } from "../../components/common/index.esm.js";
2
- import { createVNode as R, defineComponent as et, ref as I, computed as T, onMounted as tt, nextTick as Fe, onUnmounted as Qe, watch as Be, Fragment as Nn, createTextVNode as Ln, inject as Ze } from "vue";
3
- import { useResizeObserver as nt } from "@vueuse/core";
4
- import { debounce as Wn, isUndefined as W } from "lodash-es";
1
+ import { getCustomClass as An, excludeProperties as Hn, EVENT_PROPERTY_TAB_IDS as Nn, withInstall as Ln } from "../../components/common/index.esm.js";
2
+ import { createVNode as R, defineComponent as tt, ref as I, computed as T, onMounted as nt, nextTick as Fe, onUnmounted as Ze, watch as Be, Fragment as Wn, createTextVNode as zn, inject as et } from "vue";
3
+ import { useResizeObserver as ot } from "@vueuse/core";
4
+ import { debounce as Un, isUndefined as W } from "lodash-es";
5
5
  import { LocaleService as re } from "../../components/locale/index.esm.js";
6
- import { getHierarchyRow as zn, useIdentify as ot, useGroupData as Un, useFilter as it, useHierarchy as lt, useLoading as $n, useDataView as at, useSelection as rt, useSelectHierarchyItem as Yn, usePagination as qn, useDataViewContainerStyle as st, useCommandColumn as dt, useSettingColumn as Kn, useColumn as Xn, useSort as ct, useGroupColumn as ut, useRow as pt, useEdit as ft, useVisualDataBound as mt, useVisualDataCell as yt, useVisualDataRow as gt, useVisualData as Jn, useCellPosition as Qn, useSidebar as ht, useVirtualScroll as vt, useFitColumn as Zn, useFilterHistory as eo, useColumnFilter as to, useDragColumn as no, getColumnHeader as oo, getSidebar as io, getDisableMask as lo, getHorizontalScrollbar as Ct, getVerticalScrollbar as ao, getEmpty as ro, getPagination as so, getSummary as co, ColumnSettingSolution as uo, refreshScrollAfterDataSourceLoad as po, COMMAND_COLUMN_DATA_TYPE as Ae, SETTING_COLUMN_DATA_TYPE as He } from "../../components/data-view/index.esm.js";
7
- import { resolveField as fo } from "../../components/common/index.esm.js/utils/resolve-field";
8
- import mo from "../../components/input-group/index.esm.js";
6
+ import { getHierarchyRow as $n, useIdentify as it, useGroupData as Yn, useFilter as lt, useHierarchy as at, useLoading as qn, useDataView as rt, useSelection as st, useSelectHierarchyItem as Kn, usePagination as Xn, useDataViewContainerStyle as dt, useCommandColumn as ut, useSettingColumn as Jn, useColumn as Qn, useSort as ct, useGroupColumn as pt, useRow as ft, useEdit as mt, useVisualDataBound as yt, useVisualDataCell as gt, useVisualDataRow as ht, useVisualData as Zn, useCellPosition as eo, useSidebar as vt, useVirtualScroll as Ct, useFitColumn as to, useFilterHistory as no, useColumnFilter as oo, useDragColumn as io, getColumnHeader as lo, getSidebar as ao, getDisableMask as ro, getHorizontalScrollbar as bt, getVerticalScrollbar as so, getEmpty as uo, getPagination as co, getSummary as po, ColumnSettingSolution as fo, refreshScrollAfterDataSourceLoad as mo, COMMAND_COLUMN_DATA_TYPE as Ae, SETTING_COLUMN_DATA_TYPE as He } from "../../components/data-view/index.esm.js";
7
+ import { resolveField as yo } from "../../components/common/index.esm.js/utils/resolve-field";
8
+ import go from "../../components/input-group/index.esm.js";
9
9
  import Re from "../../components/button/index.esm.js";
10
- import { resolveAppearance as yo, createPropsResolver as bt, createTreeGridSelectionItemResolver as go, createTreeGridBindingResolver as ho, createDataViewUpdateColumnsResolver as vo } from "../../components/dynamic-resolver/index.esm.js";
11
- import { treeGridProps as wt } from "../../components/tree-grid/index.esm.js";
12
- import { getColumnHeader as Co } from "../data-grid/index.esm.js";
13
- import { DgControl as Ne, useDesignerComponent as bo } from "../../components/designer-canvas/index.esm.js";
14
- import { BaseControlProperty as wo } from "../../components/property-panel/index.esm.js";
15
- import { useCommandOption as So, useColumnOption as Io, useRowOption as Ro, useSummary as Fo, useAppearance as Bo, useSelection as To, useRowNumber as Oo, useDataGridEvent as Do, useDesignerColumn as Po, useDesignerVisualData as xo, useDesignerFitColumn as _o } from "../data-view/index.esm.js";
16
- const Si = {
10
+ import { resolveAppearance as ho, createPropsResolver as wt, createTreeGridSelectionItemResolver as vo, createTreeGridBindingResolver as Co, createDataViewUpdateColumnsResolver as bo } from "../../components/dynamic-resolver/index.esm.js";
11
+ import { treeGridProps as St } from "../../components/tree-grid/index.esm.js";
12
+ import { getColumnHeader as wo } from "../data-grid/index.esm.js";
13
+ import { DgControl as Ne, useDesignerComponent as So } from "../../components/designer-canvas/index.esm.js";
14
+ import { BaseControlProperty as Io } from "../../components/property-panel/index.esm.js";
15
+ import { useCommandOption as Ro, useColumnOption as Fo, useRowOption as Bo, useSummary as To, useAppearance as Oo, useSelection as Do, useRowNumber as Po, useDataGridEvent as xo, useDesignerColumn as _o, useDesignerVisualData as ko, useDesignerFitColumn as Go } from "../data-view/index.esm.js";
16
+ const Ri = {
17
17
  /** 启用分页 */
18
18
  enable: { type: Boolean, default: !1 },
19
19
  /** 当前页码 */
@@ -36,7 +36,7 @@ const Si = {
36
36
  total: { type: Number, default: 0 },
37
37
  /** 禁用分页 */
38
38
  disabled: { type: Boolean, default: !1 }
39
- }, Ii = {
39
+ }, Fi = {
40
40
  /** 启用排序 */
41
41
  enable: { type: Boolean, default: !1 },
42
42
  /** 排序字段集合 */
@@ -45,7 +45,7 @@ const Si = {
45
45
  mode: { type: String, default: "client" },
46
46
  /** 多列排序 */
47
47
  multiSort: { type: Boolean, default: !1 }
48
- }, Ri = {
48
+ }, Bi = {
49
49
  /** 自定义分组合计内容 */
50
50
  customGroupRow: { type: Function, default: () => {
51
51
  } },
@@ -69,7 +69,7 @@ const Si = {
69
69
  showSummary: { type: Boolean, default: !1 },
70
70
  /** 显示合计行位置; */
71
71
  summaryPosition: { type: String, default: "separate" }
72
- }, Fi = {
72
+ }, Ti = {
73
73
  /** 启用筛选 */
74
74
  enable: { type: Boolean, default: !1 },
75
75
  /** DataGrid筛选风格 */
@@ -78,10 +78,10 @@ const Si = {
78
78
  mode: { type: String, default: "server" },
79
79
  /** 显示过滤条件工具条 */
80
80
  showSummary: { type: Boolean, default: !0 }
81
- }, Bi = {
81
+ }, Oi = {
82
82
  /** 允许折行显示列标题 */
83
83
  wrapHeadings: { type: Boolean, default: !1 }
84
- }, Ti = {
84
+ }, Di = {
85
85
  /** 自定义行样式 */
86
86
  customRowStyle: { type: Function, default: () => {
87
87
  } },
@@ -96,7 +96,7 @@ const Si = {
96
96
  showHovering: { type: Boolean, default: !0 },
97
97
  /** 禁止数据折行 */
98
98
  wrapContent: { type: Boolean, default: !1 }
99
- }, Oi = {
99
+ }, Pi = {
100
100
  /** 显示合计信息 */
101
101
  enable: { type: Boolean, default: !1 },
102
102
  /** 合计行自定义样式,对启用合计行模板无效 */
@@ -108,7 +108,7 @@ const Si = {
108
108
  mode: { type: String, default: "client" },
109
109
  /** 合计行显示位置, top: 顶部 bottom: 底部, both: 顶部与底部同时显示 */
110
110
  position: { type: String, default: "bottom" }
111
- }, Di = {
111
+ }, xi = {
112
112
  /** 自动列宽。设为true后,所有列将填满表格并不会出现横向滚动条。 */
113
113
  fitColumns: { type: Boolean, default: !1 },
114
114
  /** 自动适配列宽度模式 */
@@ -120,17 +120,17 @@ const Si = {
120
120
  resizeColumn: { type: Boolean, default: !0 },
121
121
  /** 双击表头列自适应内容宽度 */
122
122
  resizeColumnOnDoubleClick: { type: Boolean, default: !0 }
123
- }, Pi = {
123
+ }, _i = {
124
124
  /** 编辑时选中文本 */
125
125
  selectOnEditing: { type: Boolean, default: !1 },
126
126
  /** 编辑模式; row:整行编辑,cell: 单元格编辑 */
127
127
  editMode: { type: String, default: "cell" }
128
- }, xi = {
128
+ }, ki = {
129
129
  /** show loading */
130
130
  show: { type: Boolean, default: !1 },
131
131
  /** message on display when loading */
132
132
  message: { type: String, default: `${re.getLocaleValue("datagrid.loadingMessage")}...` }
133
- }, ko = {
133
+ }, Vo = {
134
134
  /**
135
135
  * 自定义样式
136
136
  */
@@ -403,37 +403,37 @@ const Si = {
403
403
  * 编辑单元格时默认获得焦点
404
404
  */
405
405
  focusOnEditingCell: { type: Boolean, default: !0 }
406
- }, Go = "enum", Vo = "boolean";
407
- function jo(e) {
406
+ }, jo = "enum", Eo = "boolean";
407
+ function Mo(e) {
408
408
  const { formatter: n } = e;
409
409
  return !n || typeof n == "function" ? null : n;
410
410
  }
411
- function Eo(e, n) {
411
+ function Ao(e, n) {
412
412
  const i = n.options || n, { data: l } = i;
413
413
  if (!l || !l.length)
414
414
  return "";
415
415
  const c = Object.prototype.hasOwnProperty.call(i, "valueField") && i.valueField || "value", b = Object.prototype.hasOwnProperty.call(i, "textField") && i.textField || "name";
416
416
  if (typeof e == "string" && e.includes(",")) {
417
- const w = e.split(","), h = l.reduce((p, y) => (p[y[c]] = y, p), {}), s = w.map((p) => {
417
+ const w = e.split(","), h = l.reduce((f, y) => (f[y[c]] = y, f), {}), s = w.map((f) => {
418
418
  var y;
419
- return (y = h[p]) == null ? void 0 : y[b];
420
- }).filter((p) => p != null);
419
+ return (y = h[f]) == null ? void 0 : y[b];
420
+ }).filter((f) => f != null);
421
421
  return s.length ? s.join(",") : "";
422
422
  }
423
423
  const S = l.find((w) => w[c] === e);
424
424
  return (S == null ? void 0 : S[b]) ?? (e == null ? "" : String(e));
425
425
  }
426
- function Mo(e, n) {
426
+ function Ho(e, n) {
427
427
  if (e == null)
428
428
  return "";
429
429
  const i = n.options || n, l = e ? i == null ? void 0 : i.trueText : i == null ? void 0 : i.falseText;
430
430
  return l == null ? "" : String(l);
431
431
  }
432
- function Ao(e, n) {
433
- const i = fo(n, e.field), l = jo(e), c = l == null ? void 0 : l.type;
434
- return c === Go ? Eo(i, l) : c === Vo || e.dataType === "boolean" ? Mo(i, l || {}) : i == null ? "" : String(i);
432
+ function No(e, n) {
433
+ const i = yo(n, e.field), l = Mo(e), c = l == null ? void 0 : l.type;
434
+ return c === jo ? Ao(i, l) : c === Eo || e.dataType === "boolean" ? Ho(i, l || {}) : i == null ? "" : String(i);
435
435
  }
436
- function Ho(e, n, i, l, c, b, S, w, h, s, p, y, V, m, j, M, P, v, x) {
436
+ function Lo(e, n, i, l, c, b, S, w, h, s, f, y, V, m, j, M, P, v, x) {
437
437
  const {
438
438
  calculateCellPositionInRow: z
439
439
  } = b, {
@@ -445,8 +445,8 @@ function Ho(e, n, i, l, c, b, S, w, h, s, p, y, V, m, j, M, P, v, x) {
445
445
  leftFixedGridDataStyle: X,
446
446
  rightFixedGridDataStyle: Z
447
447
  } = m, {
448
- renderDataRow: a
449
- } = zn(e, n, _, P, w, h, s, p, y, V, m, j, M, v, x), se = [a];
448
+ renderDataRow: r
449
+ } = $n(e, n, _, P, w, h, s, f, y, V, m, j, M, v, x), se = [r];
450
450
  function F(B, J) {
451
451
  const ee = z(B);
452
452
  return P.value.filter((K) => K.visible !== !1).map((K, D) => se[K.type](K, ee, J, D));
@@ -478,152 +478,157 @@ function Ho(e, n, i, l, c, b, S, w, h, s, p, y, V, m, j, M, P, v, x) {
478
478
  style: Z.value
479
479
  }, [F(_.value.rightColumns.filter((B) => B.visible), "right")])]);
480
480
  }
481
- function ce() {
481
+ function ue() {
482
482
  const B = [];
483
483
  return U.value && B.push(q()), B.push(de()), C.value && B.push(N()), B;
484
484
  }
485
485
  return {
486
- renderDataArea: ce
486
+ renderDataArea: ue
487
487
  };
488
488
  }
489
- const No = /* @__PURE__ */ et({
489
+ const Wo = /* @__PURE__ */ tt({
490
490
  name: "FTreeGrid",
491
- props: ko,
491
+ props: Vo,
492
492
  emits: ["selectionChange", "clickRow", "expandNode", "unSelectItem", "dblclickNode", "doubleClickRow", "selectItem", "filterChanged", "unSelectAll", "selectAll", "sortChanged", "selectionUpdate", "beginEditCell", "endEditCell"],
493
493
  setup(e, n) {
494
- var Xe, Je;
495
- const i = I(!1), l = I(!1), c = 0, b = I(((Xe = e.rowOption) == null ? void 0 : Xe.height) || 28);
494
+ var Je, Qe;
495
+ const i = I(!1), l = I(!1), c = 0, b = I(((Je = e.rowOption) == null ? void 0 : Je.height) || 28);
496
496
  let S = [], w = [];
497
- const h = I(20), s = I(e.columns), p = ot(e), {
497
+ const h = I(20), s = I(e.columns), f = it(e), {
498
498
  idField: y
499
- } = p, V = I(), m = I(), j = I(), M = I(), P = I(), v = I([]), x = I(!1), z = I(((Je = e.rowOption) == null ? void 0 : Je.wrapContent) || !1), _ = Un(e, p), U = it(e, n), C = lt(e), {
499
+ } = f, V = I(), m = I(), j = I(), M = I(), P = I(), v = I([]), x = I(!1), z = I(((Qe = e.rowOption) == null ? void 0 : Qe.wrapContent) || !1), _ = Yn(e, f), U = lt(e, n), C = at(e), {
500
500
  collapseField: $
501
501
  } = C, {
502
502
  showLoading: X,
503
503
  renderLoading: Z
504
- } = $n(e, V), a = at(e, /* @__PURE__ */ new Map(), U, C, p), {
504
+ } = qn(e, V), r = rt(e, /* @__PURE__ */ new Map(), U, C, f), {
505
505
  dataView: se
506
- } = a, F = rt(e, a, p, v, n), {
506
+ } = r, F = st(e, r, f, v, n), {
507
507
  showSelection: q,
508
508
  selectedValues: de
509
- } = F, N = Yn(e, v, a, p, F, n), ce = T(() => e.disabled), B = T(() => e.virtualized ? Math.min(a.dataView.value.length, h.value) : a.dataView.value.length), J = qn(e, a), {
509
+ } = F, N = Kn(e, v, r, f, F, n), ue = T(() => e.disabled), B = T(() => e.virtualized ? Math.min(r.dataView.value.length, h.value) : r.dataView.value.length), J = Xn(e, r), {
510
510
  shouldRenderPagination: ee
511
511
  } = J, {
512
512
  containerStyleObject: K
513
- } = st(e, v), D = I(""), O = I([]), Oe = T(() => e.searchable || !1), E = I(0), te = T(() => O.value.length ? `${E.value + 1}/${O.value.length}` : ""), De = T(() => re.getRealPropertyValue(e.searchPlaceholder, "", "datagrid.search.placeholder")), he = T(() => re.getLocaleValue("datagrid.search.search")), ve = T(() => re.getLocaleValue("datagrid.search.prev")), ue = T(() => re.getLocaleValue("datagrid.search.next")), Pe = T(() => re.getLocaleValue("datagrid.search.clear")), xe = dt(e), {
513
+ } = dt(e, v), D = I(""), O = I([]), Oe = T(() => e.searchable || !1), E = I(0), te = T(() => O.value.length ? `${E.value + 1}/${O.value.length}` : ""), De = T(() => re.getRealPropertyValue(e.searchPlaceholder, "", "datagrid.search.placeholder")), he = T(() => re.getLocaleValue("datagrid.search.search")), ve = T(() => re.getLocaleValue("datagrid.search.prev")), ce = T(() => re.getLocaleValue("datagrid.search.next")), Pe = T(() => re.getLocaleValue("datagrid.search.clear")), xe = ut(e), {
514
514
  applyCommands: ne
515
515
  } = xe;
516
516
  ne(s);
517
517
  const {
518
518
  applyColumnSetting: pe,
519
519
  removeColumnSetting: _e
520
- } = Kn(e);
520
+ } = Jn(e);
521
521
  e.showSetting && pe(s);
522
- const Q = Xn(e, n), fe = ct(e), {
522
+ const Q = Qn(e, n), fe = ct(e), {
523
523
  applyColumnSorter: Ce,
524
524
  columnContext: oe,
525
525
  updateColumnRenderContext: be
526
526
  } = Q;
527
- Ce(a, fe);
528
- const ie = ut(e, oe), k = pt(e, n, F, p), L = ft(e, n, p, k, v), le = mt(e, a, b), Bt = yt(e, L, le), Tt = gt(e, a, L, C, p, le, Bt, b), ke = Jn(e, s, a, B, c, Tt), {
527
+ Ce(r, fe);
528
+ const ie = pt(e, oe), k = ft(e, n, F, f), L = mt(e, n, f, k, v), le = yt(e, r, b), Tt = gt(e, L, le), Ot = ht(e, r, L, C, f, le, Tt, b), ke = Zn(e, s, r, B, c, Ot), {
529
529
  getVisualData: we
530
- } = ke, Ot = Qn(e, oe, b, i), Ge = ht(e, F), {
531
- sidebarWidth: Dt
532
- } = Ge, G = vt(e, a, v, oe, ke, B, c, Dt, b, i), {
533
- onWheel: Pt,
530
+ } = ke, Dt = eo(e, oe, b, i), Ge = vt(e, F), {
531
+ sidebarWidth: Pt
532
+ } = Ge, G = Ct(e, r, v, oe, ke, B, c, Pt, b, i), {
533
+ onWheel: xt,
534
534
  dataGridWidth: Le,
535
535
  viewPortHeight: We,
536
536
  viewPortWidth: Se,
537
537
  resetScroll: Ve,
538
- updateVisibleRowsOnLatestVisibleScope: xt
539
- } = G, ze = Zn(e, oe, m, Se, ie), {
538
+ updateVisibleRowsOnLatestVisibleScope: _t
539
+ } = G, ze = to(e, oe, m, Se, ie), {
540
540
  calculateColumnsSize: Ie
541
- } = ze, Ue = eo(), _t = to(m, P, a, Ue, G), kt = no(e, n, Q, a, ie, _, G), Gt = T(() => {
541
+ } = ze, Ue = no(), kt = oo(m, P, r, Ue, G), Gt = io(e, n, Q, r, ie, _, G), Vt = T(() => {
542
542
  const t = {
543
543
  "fv-grid": !0,
544
544
  "fv-grid-bordered": e.showBorder,
545
545
  "fv-grid-horizontal-bordered": e.showHorizontalLines,
546
546
  "fv-datagrid-strip": e.showStripe
547
547
  };
548
- return En(t, e.customClass);
549
- }), Vt = T(() => ({
548
+ return An(t, e.customClass);
549
+ }), jt = T(() => ({
550
550
  "fv-grid-content": !0,
551
551
  "fv-grid-content-hover": x.value,
552
552
  "fv-grid-wrap-content": z.value,
553
553
  "fv-grid-scrollbar-visible": G.shouldShowVirticalScrollbar.value && x.value
554
554
  })), {
555
- renderDataArea: jt
556
- } = Ho(e, n, j, M, P, Ot, Q, a, L, C, k, F, N, G, ke, le, v, b, i), {
557
- renderGridHeader: Et,
558
- renderGridColumnResizeOverlay: Mt,
559
- shouldShowHeader: At
560
- } = oo(e, n, m, M, P, Q, a, kt, _t, U, Ue, ze, ie, F, Ge, fe, G, Se, v, l), {
561
- renderDataGridSidebar: Ht
562
- } = io(e, k, F, Ge, G), {
563
- renderDisableMask: Nt
564
- } = lo(), {
565
- renderHorizontalScrollbar: Lt
566
- } = Ct(e, m, G), {
567
- renderVerticalScrollbar: Wt
568
- } = ao(e, m, G);
555
+ renderDataArea: Et
556
+ } = Lo(e, n, j, M, P, Dt, Q, r, L, C, k, F, N, G, ke, le, v, b, i), $e = I(null);
557
+ function Mt(t, o) {
558
+ var a, d;
559
+ e.enableColumnSettingSolution && ((d = (a = $e.value) == null ? void 0 : a.persistColumnWidths) == null || d.call(a, o));
560
+ }
561
+ const {
562
+ renderGridHeader: At,
563
+ renderGridColumnResizeOverlay: Ht,
564
+ shouldShowHeader: Nt
565
+ } = lo(e, n, m, M, P, Q, r, Gt, kt, U, Ue, ze, ie, F, Ge, fe, G, Se, v, l, Mt), {
566
+ renderDataGridSidebar: Lt
567
+ } = ao(e, k, F, Ge, G), {
568
+ renderDisableMask: Wt
569
+ } = ro(), {
570
+ renderHorizontalScrollbar: zt
571
+ } = bt(e, m, G), {
572
+ renderVerticalScrollbar: Ut
573
+ } = so(e, m, G);
569
574
  let ae = null;
570
- function zt() {
571
- var t, o, r;
575
+ function $t() {
576
+ var t, o, a;
572
577
  if (m.value && m.value.clientHeight > 0 && ((t = m.value) == null ? void 0 : t.clientWidth) > 0) {
573
- const f = Math.ceil(m.value.clientHeight / b.value);
574
- f > h.value && (h.value = f, xt()), We.value = ((o = j.value) == null ? void 0 : o.clientHeight) || 0, Le.value = ((r = m.value) == null ? void 0 : r.clientWidth) || 0, j.value && (Se.value = j.value.clientWidth);
578
+ const d = Math.ceil(m.value.clientHeight / b.value);
579
+ d > h.value && (h.value = d, _t()), We.value = ((o = j.value) == null ? void 0 : o.clientHeight) || 0, Le.value = ((a = m.value) == null ? void 0 : a.clientWidth) || 0, j.value && (Se.value = j.value.clientWidth);
575
580
  }
576
581
  m.value && (m.value.clientHeight > 0 || m.value.clientWidth > 0) && Ie();
577
582
  }
578
- function Ut() {
583
+ function Yt() {
579
584
  ae !== null && cancelAnimationFrame(ae), ae = requestAnimationFrame(() => {
580
- ae = null, zt();
585
+ ae = null, $t();
581
586
  });
582
587
  }
583
- tt(() => {
584
- m.value && (h.value = Math.max(Math.ceil(m.value.clientHeight / b.value), h.value), v.value = we(0, B.value + c - 1), nt(m.value, Ut), Ie(), Fe(() => {
588
+ nt(() => {
589
+ m.value && (h.value = Math.max(Math.ceil(m.value.clientHeight / b.value), h.value), v.value = we(0, B.value + c - 1), ot(m.value, Yt), Ie(), Fe(() => {
585
590
  m.value && (Le.value = m.value.clientWidth), j.value && (Se.value = j.value.clientWidth, We.value = j.value.clientHeight);
586
591
  })), X.value && Z();
587
- }), Qe(() => {
592
+ }), Ze(() => {
588
593
  ae !== null && cancelAnimationFrame(ae);
589
594
  });
590
- function $t(t) {
591
- a.collapseTo(t), a.reOrderVisibleIndex(), Ve();
595
+ function qt(t) {
596
+ r.collapseTo(t), r.reOrderVisibleIndex(), Ve();
592
597
  }
593
- function Yt(t) {
594
- a.expandTo(t), a.reOrderVisibleIndex(), Ve();
598
+ function Kt(t) {
599
+ r.expandTo(t), r.reOrderVisibleIndex(), Ve();
595
600
  }
596
601
  function je() {
597
602
  const t = F.getSelectionRow();
598
603
  return t ? t.dataIndex - 1 : -1;
599
604
  }
600
- function qt(t) {
601
- const o = t !== void 0 ? t : je(), r = a.insertNewDataItem(o === -1 ? 0 : o);
602
- return v.value = we(0, B.value + c - 1), r;
605
+ function Xt(t) {
606
+ const o = t !== void 0 ? t : je(), a = r.insertNewDataItem(o === -1 ? 0 : o);
607
+ return v.value = we(0, B.value + c - 1), a;
603
608
  }
604
- function Kt() {
609
+ function Jt() {
605
610
  const t = je();
606
- a.insertNewChildDataItem(t), v.value = we(0, B.value + c - 1);
611
+ r.insertNewChildDataItem(t), v.value = we(0, B.value + c - 1);
607
612
  }
608
- function Xt(t, o) {
609
- const r = v.value.find((u) => u.raw[y.value] === o), f = r ? r.dataIndex - 1 : -1;
610
- a.insertNewChildDataItems(t, f);
613
+ function Qt(t, o) {
614
+ const a = v.value.find((p) => p.raw[y.value] === o), d = a ? a.dataIndex - 1 : -1;
615
+ r.insertNewChildDataItems(t, d);
611
616
  }
612
- function Jt() {
617
+ function Zt() {
613
618
  const t = je(), o = N.getNextSelectableHierarchyItemId(t);
614
- a.removeHierarchyDataItem(t), v.value = we(0, B.value + c - 1), o && N.selectItemById(o);
619
+ r.removeHierarchyDataItem(t), v.value = we(0, B.value + c - 1), o && N.selectItemById(o);
615
620
  }
616
- function Qt(t) {
621
+ function en(t) {
617
622
  L.onEditingRow(t);
618
623
  }
619
- function Zt(t) {
624
+ function tn(t) {
620
625
  L.acceptEditingRow(t);
621
626
  }
622
- function en(t) {
627
+ function nn(t) {
623
628
  L.cancelEditingRow(t);
624
629
  }
625
630
  function me(t) {
626
- t && (s.value = t, ne(s), e.showSetting && pe(s), be(s.value), Ce(a, fe), Ie());
631
+ t && (s.value = t, ne(s), e.showSetting && pe(s), be(s.value), Ce(r, fe), Ie());
627
632
  }
628
633
  Be(() => e.columns, (t) => {
629
634
  if (e.showSetting && e.enableColumnSettingSolution) {
@@ -632,12 +637,12 @@ const No = /* @__PURE__ */ et({
632
637
  }
633
638
  me(t);
634
639
  });
635
- function tn(t, o) {
640
+ function on(t, o) {
636
641
  if (t) {
637
- const r = !!(o != null && o.keepScrollTop || o != null && o.keepScrollPosition), f = r ? G.offsetY.value : 0;
638
- a.load(t), a.reOrderVisibleIndex(), po({
639
- keepScroll: r,
640
- savedOffsetY: f,
642
+ const a = !!(o != null && o.keepScrollTop || o != null && o.keepScrollPosition), d = a ? G.offsetY.value : 0;
643
+ r.load(t), r.reOrderVisibleIndex(), mo({
644
+ keepScroll: a,
645
+ savedOffsetY: d,
641
646
  resetScroll: Ve,
642
647
  scrollTo: G.scrollTo
643
648
  });
@@ -646,275 +651,275 @@ const No = /* @__PURE__ */ et({
646
651
  function Ee(t) {
647
652
  k.activeRowById(t);
648
653
  }
649
- function nn(t, o = {
654
+ function ln(t, o = {
650
655
  isCurrent: !0
651
656
  }) {
652
657
  o != null && o.isCurrent && Ee(t), N.selectItemById(t);
653
658
  }
654
- function on(t) {
655
- const o = v.value.find((r) => r.raw[p.idField.value] === t);
659
+ function an(t) {
660
+ const o = v.value.find((a) => a.raw[f.idField.value] === t);
656
661
  o && k.clickRowItem(o);
657
662
  }
658
- function ln(t) {
663
+ function rn(t) {
659
664
  N.selectItemByIds(t);
660
665
  }
661
- function an() {
666
+ function sn() {
662
667
  return F.getSelectedItems();
663
668
  }
664
- function $e() {
669
+ function Ye() {
665
670
  F.clearSelection();
666
671
  }
667
- function rn() {
672
+ function dn() {
668
673
  F.emptyCurrentRowId();
669
674
  }
670
- const sn = T(() => !v.value || !v.value.length), {
671
- renderEmpty: dn
672
- } = ro(e, n);
673
- function cn() {
675
+ const un = T(() => !v.value || !v.value.length), {
676
+ renderEmpty: cn
677
+ } = uo(e, n);
678
+ function pn() {
674
679
  return F.getSelectionRow();
675
680
  }
676
- function un(t, o = {
681
+ function fn(t, o = {
677
682
  clearCurrent: !0
678
683
  }) {
679
684
  o != null && o.clearCurrent && Ee(""), N.unSelectItemByIds(t);
680
685
  }
681
- function pn() {
686
+ function mn() {
682
687
  return F.currentSelectedDataId.value;
683
688
  }
684
- function fn(t, o, r) {
685
- const f = se.value.find((u) => u[y.value] === t);
686
- if (f) {
687
- if (Object.keys(f).forEach((g) => {
688
- Object.prototype.hasOwnProperty.call(o, g) && (f[g] = o[g]);
689
- }), r) {
689
+ function yn(t, o, a) {
690
+ const d = se.value.find((p) => p[y.value] === t);
691
+ if (d) {
692
+ if (Object.keys(d).forEach((g) => {
693
+ Object.prototype.hasOwnProperty.call(o, g) && (d[g] = o[g]);
694
+ }), a) {
690
695
  const {
691
696
  collapseField: g,
692
697
  disabledField: A,
693
698
  checkedField: Y,
694
699
  visibleField: H,
695
700
  hasChildren: ge
696
- } = r;
697
- g && !W(o[g]) && (f.__fv_collapse__ = o[g]), Y && !W(o[Y]) && (f.__fv_checked__ = o[Y]), A && !W(o[A]) && (f.__fv_disabled__ = o[A]), H && !W(o[H]) && (f.__fv_visible__ = o[H]), W(ge) || (f.__fv_hasChildren__ = ge);
701
+ } = a;
702
+ g && !W(o[g]) && (d.__fv_collapse__ = o[g]), Y && !W(o[Y]) && (d.__fv_checked__ = o[Y]), A && !W(o[A]) && (d.__fv_disabled__ = o[A]), H && !W(o[H]) && (d.__fv_visible__ = o[H]), W(ge) || (d.__fv_hasChildren__ = ge);
698
703
  }
699
- const u = v.value.find((g) => g.raw[y.value] === t), d = v.value.findIndex((g) => g.raw[y.value] === t);
700
- if (u) {
701
- if (u.raw = f, Object.keys(u.data).forEach((g) => {
702
- u.data[g].updateData(f);
703
- }), r) {
704
+ const p = v.value.find((g) => g.raw[y.value] === t), u = v.value.findIndex((g) => g.raw[y.value] === t);
705
+ if (p) {
706
+ if (p.raw = d, Object.keys(p.data).forEach((g) => {
707
+ p.data[g].updateData(d);
708
+ }), a) {
704
709
  const {
705
710
  collapseField: g,
706
711
  disabledField: A,
707
712
  checkedField: Y,
708
713
  visibleField: H,
709
714
  hasChildren: ge
710
- } = r;
711
- g && !W(o[g]) && (u.collapse = o[g]), Y && !W(o[Y]) && (u.checked = o[Y]), A && !W(o[A]) && (u.disabled = o[A]), H && !W(o[H]) && (u.visible = o[H]), W(ge) || (u.raw.__fv_hasChildren__ = ge);
715
+ } = a;
716
+ g && !W(o[g]) && (p.collapse = o[g]), Y && !W(o[Y]) && (p.checked = o[Y]), A && !W(o[A]) && (p.disabled = o[A]), H && !W(o[H]) && (p.visible = o[H]), W(ge) || (p.raw.__fv_hasChildren__ = ge);
712
717
  }
713
- v.value = [...v.value.slice(0, d), u, ...v.value.slice(d + 1)], a.updateSummary();
718
+ v.value = [...v.value.slice(0, u), p, ...v.value.slice(u + 1)], r.updateSummary();
714
719
  }
715
720
  }
716
721
  }
717
- function mn(t) {
718
- return Object.prototype.hasOwnProperty.call(t, "raw") ? a.hasRealChildren(t.raw) : a.hasRealChildren(t);
722
+ function gn(t) {
723
+ return Object.prototype.hasOwnProperty.call(t, "raw") ? r.hasRealChildren(t.raw) : r.hasRealChildren(t);
719
724
  }
720
- function yn(t) {
721
- const o = a.dataView.value.find((r) => r[y.value] === t);
725
+ function hn(t) {
726
+ const o = r.dataView.value.find((a) => a[y.value] === t);
722
727
  return o ? o[$.value] : "";
723
728
  }
724
- function gn() {
729
+ function vn() {
725
730
  return $.value;
726
731
  }
727
732
  Be(() => e.showSetting, (t, o) => {
728
733
  t !== o && (t ? pe(s) : _e(s), me(s.value));
729
734
  });
730
- function hn(t) {
735
+ function Cn(t) {
731
736
  return v.value.filter((o) => t.includes(o.raw[e.idField]));
732
737
  }
733
- function Ye(t) {
734
- const o = p.idField.value, r = v.value.find((f) => f.raw[o] === t);
735
- r && k.changeRow(r);
738
+ function qe(t) {
739
+ const o = f.idField.value, a = v.value.find((d) => d.raw[o] === t);
740
+ a && k.changeRow(a);
736
741
  }
737
- function vn() {
738
- F.keepSelectingOnPaging.value || $e(), a.updateVisibleDataSummary(v.value);
742
+ function bn() {
743
+ F.keepSelectingOnPaging.value || Ye(), r.updateVisibleDataSummary(v.value);
739
744
  }
740
- function Cn() {
745
+ function wn() {
741
746
  L.endEditCell();
742
747
  }
743
- function bn(t) {
748
+ function Sn(t) {
744
749
  F.updateSelectedValues(t);
745
750
  }
746
- function wn(t) {
751
+ function In(t) {
747
752
  F.removeSelectedValues(t);
748
753
  }
749
- const Sn = 100;
750
- function In(t, o) {
751
- const r = o[t].__fv_layer__ || 0;
752
- let f = t + 1;
753
- for (; f < o.length && (o[f].__fv_layer__ || 0) > r; )
754
- f++;
755
- return f - 1;
756
- }
757
- function Rn(t) {
758
- const o = a.dataView.value, r = C.collapseField.value, f = t.__fv_index__, u = t.__fv_layer__ || 0;
759
- if (typeof f != "number" || t.__fv_visible__ === !1 || t[r])
754
+ const Rn = 100;
755
+ function Fn(t, o) {
756
+ const a = o[t].__fv_layer__ || 0;
757
+ let d = t + 1;
758
+ for (; d < o.length && (o[d].__fv_layer__ || 0) > a; )
759
+ d++;
760
+ return d - 1;
761
+ }
762
+ function Bn(t) {
763
+ const o = r.dataView.value, a = C.collapseField.value, d = t.__fv_index__, p = t.__fv_layer__ || 0;
764
+ if (typeof d != "number" || t.__fv_visible__ === !1 || t[a])
760
765
  return;
761
- let d = f + 1;
762
- for (; d < o.length; ) {
763
- const g = o[d];
764
- if ((g.__fv_layer__ || 0) <= u)
766
+ let u = d + 1;
767
+ for (; u < o.length; ) {
768
+ const g = o[u];
769
+ if ((g.__fv_layer__ || 0) <= p)
765
770
  break;
766
- if (g.__fv_visible__ = !0, g[r]) {
767
- d = In(d, o) + 1;
771
+ if (g.__fv_visible__ = !0, g[a]) {
772
+ u = Fn(u, o) + 1;
768
773
  continue;
769
774
  }
770
- d++;
775
+ u++;
771
776
  }
772
777
  }
773
- function Fn(t) {
778
+ function Tn(t) {
774
779
  let o = t;
775
- const r = [];
776
- let f = 0;
777
- for (; o && o[C.parentIdField.value] && f < Sn; ) {
778
- f++;
779
- const u = a.rawView.value.find((d) => d[p.idField.value] === o[C.parentIdField.value]);
780
- if (u)
781
- u[C.collapseField.value] && r.push(u), o = u;
780
+ const a = [];
781
+ let d = 0;
782
+ for (; o && o[C.parentIdField.value] && d < Rn; ) {
783
+ d++;
784
+ const p = r.rawView.value.find((u) => u[f.idField.value] === o[C.parentIdField.value]);
785
+ if (p)
786
+ p[C.collapseField.value] && a.push(p), o = p;
782
787
  else
783
788
  break;
784
789
  }
785
- r.reverse().forEach((u) => {
786
- u[C.collapseField.value] = !1, a.toggleChildrenVisibiltyByCollapseStatus(u), Rn(u);
790
+ a.reverse().forEach((p) => {
791
+ p[C.collapseField.value] = !1, r.toggleChildrenVisibiltyByCollapseStatus(p), Bn(p);
787
792
  });
788
793
  }
789
- function Bn(t, o) {
794
+ function On(t, o) {
790
795
  if (t.length !== o.length)
791
796
  return !1;
792
- const r = t.map((u) => u[p.idField.value]).sort(), f = o.map((u) => u[p.idField.value]).sort();
793
- return r.every((u, d) => u === f[d]);
797
+ const a = t.map((p) => p[f.idField.value]).sort(), d = o.map((p) => p[f.idField.value]).sort();
798
+ return a.every((p, u) => p === d[u]);
794
799
  }
795
800
  function Me() {
796
801
  const t = O.value[E.value];
797
- t && (Fn(t), Fe(() => {
798
- a.reOrderVisibleIndex();
799
- const o = t[p.idField.value], r = t.__fv_visible_index__;
800
- r !== void 0 && r !== "" && r >= 0 ? (G.scrollToRowByIndex(r), Fe(() => {
801
- Ye(o);
802
+ t && (Tn(t), Fe(() => {
803
+ r.reOrderVisibleIndex();
804
+ const o = t[f.idField.value], a = t.__fv_visible_index__;
805
+ a !== void 0 && a !== "" && a >= 0 ? (G.scrollToRowByIndex(a), Fe(() => {
806
+ qe(o);
802
807
  })) : console.warn("搜索结果的节点不在当前可见范围内,无法定位", o);
803
808
  }));
804
809
  }
805
- function qe() {
810
+ function Ke() {
806
811
  !D.value.trim() || !O.value.length || (E.value = (E.value + 1) % O.value.length, Me());
807
812
  }
808
- function Tn() {
813
+ function Dn() {
809
814
  if (!D.value.trim()) {
810
815
  O.value = [], E.value = 0;
811
816
  return;
812
817
  }
813
818
  const t = [], o = D.value.toLowerCase().trim();
814
- a.rawView.value.forEach((f) => {
815
- let u = !1;
816
- e.customSearch ? u = e.customSearch(o, f, e.columns) : e.columns.forEach((d) => {
817
- if (!u && d.field) {
818
- const g = Ao(d, f);
819
- g && g.toLowerCase().includes(o) && (u = !0);
819
+ r.rawView.value.forEach((d) => {
820
+ let p = !1;
821
+ e.customSearch ? p = e.customSearch(o, d, e.columns) : e.columns.forEach((u) => {
822
+ if (!p && u.field) {
823
+ const g = No(u, d);
824
+ g && g.toLowerCase().includes(o) && (p = !0);
820
825
  }
821
- }), u && t.push(f);
826
+ }), p && t.push(d);
822
827
  });
823
- const r = !Bn(t, O.value);
824
- t.length > 0 ? r ? (O.value = t, E.value = 0, Me()) : qe() : (O.value = [], E.value = 0);
828
+ const a = !On(t, O.value);
829
+ t.length > 0 ? a ? (O.value = t, E.value = 0, Me()) : Ke() : (O.value = [], E.value = 0);
825
830
  }
826
- function On() {
831
+ function Pn() {
827
832
  if (!D.value.trim() || !O.value.length)
828
833
  return;
829
834
  const t = O.value.length;
830
835
  E.value = (E.value - 1 + t) % t, Me();
831
836
  }
832
- const ye = Wn(Tn, 300);
833
- function Ke() {
837
+ const ye = Un(Dn, 300);
838
+ function Xe() {
834
839
  ye.cancel(), D.value = "", O.value = [], E.value = 0;
835
840
  }
836
841
  Be(D, (t) => {
837
842
  t.trim() || (ye.cancel(), O.value = [], E.value = 0);
838
- }), Qe(() => {
843
+ }), Ze(() => {
839
844
  ye.cancel();
840
845
  });
841
- function Dn(t) {
846
+ function xn(t) {
842
847
  if (t.key === "Enter") {
843
848
  if (!D.value.trim())
844
849
  return;
845
850
  ye();
846
851
  }
847
852
  }
848
- function Pn() {
853
+ function _n() {
849
854
  D.value.trim() && ye();
850
855
  }
851
856
  n.expose({
852
857
  activeRowById: Ee,
853
- addNewDataItem: qt,
854
- addNewChildDataItem: Kt,
855
- addChildrenToNode: Xt,
856
- collapseTo: $t,
857
- expandTo: Yt,
858
- removeDataItem: Jt,
859
- editDataItem: Qt,
860
- acceptDataItem: Zt,
861
- cancelDataItem: en,
858
+ addNewDataItem: Xt,
859
+ addNewChildDataItem: Jt,
860
+ addChildrenToNode: Qt,
861
+ collapseTo: qt,
862
+ expandTo: Kt,
863
+ removeDataItem: Zt,
864
+ editDataItem: en,
865
+ acceptDataItem: tn,
866
+ cancelDataItem: nn,
862
867
  updateColumns: me,
863
- updateDataSource: tn,
864
- selectItemById: nn,
865
- selectItemByIds: ln,
866
- getSelectedItems: an,
867
- clearSelection: $e,
868
- getSelectionRow: cn,
869
- clickRowItemById: on,
870
- unSelectItemByIds: un,
871
- getCurrentRowId: pn,
872
- reassignRowData: fn,
873
- hasChildren: mn,
874
- getCollapseField: gn,
875
- getCollapseStatusById: yn,
876
- getVisibleDataByIds: hn,
877
- selectRowById: Ye,
878
- updateDerivedData: vn,
879
- emptyCurrentRowId: rn,
868
+ updateDataSource: on,
869
+ selectItemById: ln,
870
+ selectItemByIds: rn,
871
+ getSelectedItems: sn,
872
+ clearSelection: Ye,
873
+ getSelectionRow: pn,
874
+ clickRowItemById: an,
875
+ unSelectItemByIds: fn,
876
+ getCurrentRowId: mn,
877
+ reassignRowData: yn,
878
+ hasChildren: gn,
879
+ getCollapseField: vn,
880
+ getCollapseStatusById: hn,
881
+ getVisibleDataByIds: Cn,
882
+ selectRowById: qe,
883
+ updateDerivedData: bn,
884
+ emptyCurrentRowId: dn,
880
885
  calculateColumnsSize: Ie,
881
- endEditCell: Cn,
882
- updateSelectedValues: bn,
883
- removeSelectedValues: wn
886
+ endEditCell: wn,
887
+ updateSelectedValues: Sn,
888
+ removeSelectedValues: In
884
889
  });
885
- const xn = T(() => {
890
+ const kn = T(() => {
886
891
  const t = {};
887
892
  return G.shouldShowHorizontalScrollbar.value && x.value && (t.paddingBottom = "10px"), G.shouldShowVirticalScrollbar.value && x.value, t;
888
- }), _n = T(() => ({
893
+ }), Gn = T(() => ({
889
894
  ...K.value,
890
895
  borderRadius: "5px"
891
896
  })), {
892
- renderDataGridPagination: ai
893
- } = so(e, n, a, G, J, F), kn = T(() => ({
897
+ renderDataGridPagination: si
898
+ } = co(e, n, r, G, J, F), Vn = T(() => ({
894
899
  "d-flex": !0,
895
900
  "justify-content-between": ee.value && q.value,
896
901
  "justify-content-end": ee.value && !q.value,
897
902
  "position-relative": !0
898
- })), Gn = T(() => ({
903
+ })), jn = T(() => ({
899
904
  "d-flex": !0,
900
905
  "align-items-center": !0
901
906
  }));
902
- function Vn(t) {
903
- const o = t.map((d) => d.id), r = [...s.value, ...S, ...w];
904
- r.filter((d) => d.dataType !== Ae && d.dataType !== He).forEach((d) => {
905
- const g = t.find((A) => A.id === d.id);
906
- g && (d.width = g.actualWidth || d.width || 120, g.actualWidth !== void 0 && (d.actualWidth = g.actualWidth), d.title = g.title, d.halign = g.halign, d.align = g.align, d.fixed = g.fixed);
907
- }), w = r.filter((d) => d.dataType === Ae || d.dataType === He);
908
- const f = r.filter((d) => d.dataType !== Ae && d.dataType !== He), u = f.filter((d) => o.includes(d.id));
909
- S = f.filter((d) => !o.includes(d.id)), u.sort((d, g) => {
910
- const A = t.findIndex((H) => H.id === d.id), Y = t.findIndex((H) => H.id === g.id);
907
+ function En(t) {
908
+ const o = t.map((u) => u.id), a = [...s.value, ...S, ...w];
909
+ a.filter((u) => u.dataType !== Ae && u.dataType !== He).forEach((u) => {
910
+ const g = t.find((A) => A.id === u.id);
911
+ g && (u.width = g.actualWidth || u.width || 120, g.actualWidth !== void 0 && (u.actualWidth = g.actualWidth), u.title = g.title, u.halign = g.halign, u.align = g.align, u.fixed = g.fixed);
912
+ }), w = a.filter((u) => u.dataType === Ae || u.dataType === He);
913
+ const d = a.filter((u) => u.dataType !== Ae && u.dataType !== He), p = d.filter((u) => o.includes(u.id));
914
+ S = d.filter((u) => !o.includes(u.id)), p.sort((u, g) => {
915
+ const A = t.findIndex((H) => H.id === u.id), Y = t.findIndex((H) => H.id === g.id);
911
916
  return A - Y;
912
- }), me(u);
917
+ }), me(p);
913
918
  }
914
919
  const {
915
- renderDataGridSummary: jn
916
- } = co(e, a, Q);
917
- return () => e.visible && R(Nn, null, [Oe.value && R("div", {
920
+ renderDataGridSummary: Mn
921
+ } = po(e, r, Q);
922
+ return () => e.visible && R(Wn, null, [Oe.value && R("div", {
918
923
  class: "fv-grid-search",
919
924
  style: {
920
925
  padding: "8px 12px",
@@ -927,12 +932,12 @@ const No = /* @__PURE__ */ et({
927
932
  display: "flex",
928
933
  alignItems: "center"
929
934
  }
930
- }, [R(mo, {
935
+ }, [R(go, {
931
936
  value: D.value,
932
937
  onInput: (t) => D.value = t,
933
938
  "onUpdate:value": (t) => D.value = t || "",
934
- onClear: Ke,
935
- onKeydown: Dn,
939
+ onClear: Xe,
940
+ onKeydown: xn,
936
941
  placeholder: De.value,
937
942
  style: {
938
943
  flex: 1
@@ -949,7 +954,7 @@ const No = /* @__PURE__ */ et({
949
954
  type: "link",
950
955
  title: ve.value,
951
956
  disabled: !O.value.length,
952
- onClick: On,
957
+ onClick: Pn,
953
958
  style: {
954
959
  cursor: "pointer",
955
960
  marginLeft: "4px"
@@ -960,9 +965,9 @@ const No = /* @__PURE__ */ et({
960
965
  }, null)]
961
966
  }), R(Re, {
962
967
  type: "link",
963
- title: ue.value,
968
+ title: ce.value,
964
969
  disabled: !O.value.length,
965
- onClick: qe,
970
+ onClick: Ke,
966
971
  style: {
967
972
  cursor: "pointer",
968
973
  marginLeft: "4px"
@@ -974,7 +979,7 @@ const No = /* @__PURE__ */ et({
974
979
  }), R(Re, {
975
980
  type: "link",
976
981
  title: he.value,
977
- onClick: Pn,
982
+ onClick: _n,
978
983
  style: {
979
984
  cursor: "pointer",
980
985
  marginLeft: "4px"
@@ -986,7 +991,7 @@ const No = /* @__PURE__ */ et({
986
991
  }), D.value && R(Re, {
987
992
  type: "link",
988
993
  title: Pe.value,
989
- onClick: Ke,
994
+ onClick: Xe,
990
995
  style: {
991
996
  cursor: "pointer",
992
997
  marginLeft: "4px"
@@ -997,12 +1002,12 @@ const No = /* @__PURE__ */ et({
997
1002
  }, null)]
998
1003
  })])]), R("div", {
999
1004
  ref: V,
1000
- class: Gt.value,
1001
- style: _n.value,
1002
- onWheel: Pt
1003
- }, [m.value && At.value && Et(), R("div", {
1004
- ref: m,
1005
1005
  class: Vt.value,
1006
+ style: Gn.value,
1007
+ onWheel: xt
1008
+ }, [m.value && Nt.value && At(), R("div", {
1009
+ ref: m,
1010
+ class: jt.value,
1006
1011
  onMouseover: () => x.value = !0,
1007
1012
  onMouseleave: () => x.value = !1,
1008
1013
  onTouchstart: (t) => {
@@ -1011,20 +1016,21 @@ const No = /* @__PURE__ */ et({
1011
1016
  onTouchend: (t) => {
1012
1017
  x.value = !1;
1013
1018
  },
1014
- style: xn.value
1015
- }, [m.value && Ht(v), m.value && jt(), m.value && sn.value && dn(), m.value && Lt(), m.value && Wt()]), m.value && jn(), q.value && R("div", {
1016
- class: kn.value
1019
+ style: kn.value
1020
+ }, [m.value && Lt(v), m.value && Et(), m.value && un.value && cn(), m.value && zt(), m.value && Ut()]), m.value && Mn(), q.value && R("div", {
1021
+ class: Vn.value
1017
1022
  }, [q.value && R("div", {
1018
- class: Gn.value
1019
- }, [R("div", null, ["已选:" + de.value.length, Ln(" 条")])])]), Mt(), ce.value && Nt()]), e.enableColumnSettingSolution && R(uo, {
1023
+ class: jn.value
1024
+ }, [R("div", null, ["已选:" + de.value.length, zn(" 条")])])]), Ht(), ue.value && Wt()]), e.enableColumnSettingSolution && R(fo, {
1025
+ ref: $e,
1020
1026
  columns: [...s.value, ...S],
1021
1027
  componentId: e.id,
1022
1028
  modelValue: l.value,
1023
1029
  "onUpdate:modelValue": (t) => l.value = t,
1024
- onChangeColumnSetting: Vn
1030
+ onChangeColumnSetting: En
1025
1031
  }, null)]);
1026
1032
  }
1027
- }), Lo = "https://json-schema.org/draft/2020-12/schema", Wo = "https://farris-design.gitee.io/tree-grid.schema.json", zo = "tree-grid", Uo = "A Farris Data Grid Component", $o = "object", Yo = {
1033
+ }), zo = "https://json-schema.org/draft/2020-12/schema", Uo = "https://farris-design.gitee.io/tree-grid.schema.json", $o = "tree-grid", Yo = "A Farris Data Grid Component", qo = "object", Ko = {
1028
1034
  id: {
1029
1035
  description: "The unique identifier for a Input Group",
1030
1036
  type: "string"
@@ -1902,11 +1908,11 @@ const No = /* @__PURE__ */ et({
1902
1908
  type: "boolean",
1903
1909
  default: !1
1904
1910
  }
1905
- }, qo = [
1911
+ }, Xo = [
1906
1912
  "id",
1907
1913
  "type",
1908
1914
  "columns"
1909
- ], Ko = {
1915
+ ], Jo = {
1910
1916
  onSelectionChange: "行切换事件",
1911
1917
  onClickRow: "行点击事件",
1912
1918
  onDoubleClickRow: "行双击事件",
@@ -1918,52 +1924,52 @@ const No = /* @__PURE__ */ et({
1918
1924
  onUnSelectItem: "取消选中行事件",
1919
1925
  onSelectAll: "全选事件",
1920
1926
  onUnSelectAll: "取消全选事件"
1921
- }, St = {
1922
- $schema: Lo,
1923
- $id: Wo,
1924
- title: zo,
1925
- description: Uo,
1926
- type: $o,
1927
- properties: Yo,
1928
- required: qo,
1929
- events: Ko
1930
- }, It = /* @__PURE__ */ new Map([
1931
- ["appearance", yo],
1927
+ }, It = {
1928
+ $schema: zo,
1929
+ $id: Uo,
1930
+ title: $o,
1931
+ description: Yo,
1932
+ type: qo,
1933
+ properties: Ko,
1934
+ required: Xo,
1935
+ events: Jo
1936
+ }, Rt = /* @__PURE__ */ new Map([
1937
+ ["appearance", ho],
1932
1938
  ["column", "columnOption"],
1933
1939
  ["command", "commandOption"]
1934
1940
  ]);
1935
- function Xo(e, n, i) {
1941
+ function Qo(e, n, i) {
1936
1942
  var y;
1937
1943
  const l = i.parentComponentInstance, c = l.schema.type, b = String(((y = l.schema.appearance) == null ? void 0 : y.class) || "").split(" "), S = c === "section" || c === "tab-page", w = b.includes("f-page-content-nav"), h = b.includes("f-page-main"), s = e.getSchemaByType("component");
1938
1944
  s.id = `${n.id}-component`, s.componentType = "data-grid";
1939
- let p = "";
1940
- return p += S ? "f-struct-data-grid-in-card f-struct-is-subgrid" : "", p += w ? "f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column" : "", p += h ? "f-struct-data-grid f-struct-wrapper" : "", s.appearance = {
1941
- class: p
1945
+ let f = "";
1946
+ return f += S ? "f-struct-data-grid-in-card f-struct-is-subgrid" : "", f += w ? "f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column" : "", f += h ? "f-struct-data-grid f-struct-wrapper" : "", s.appearance = {
1947
+ class: f
1942
1948
  }, s.contents = [n], s;
1943
1949
  }
1944
- function Jo(e, n, i) {
1950
+ function Zo(e, n, i) {
1945
1951
  const l = i.parentComponentInstance, c = String(l.schema.appearance.class || "").split(" "), b = c.includes("f-page-content-nav"), S = c.includes("f-page-main"), w = e.getSchemaByType("section");
1946
1952
  w.id = `${n.id}-section`;
1947
1953
  let h = "";
1948
1954
  return h += b ? "f-section-in-nav " : "", h += S ? "f-section-in-managelist " : "", h += "f-section-grid", w.appearance = { class: h }, w.contents = [n], w;
1949
1955
  }
1950
- function Qo(e, n, i) {
1956
+ function ei(e, n, i) {
1951
1957
  const l = e.getSchemaByType("content-container");
1952
1958
  return l.id = `${n.id}-layout`, l.appearance = { class: "f-grid-is-sub f-utils-flex-column" }, l.contents = [n], l;
1953
1959
  }
1954
- function Rt(e, n, i) {
1960
+ function Ft(e, n, i) {
1955
1961
  const c = i.parentComponentInstance.schema.type, b = c === "section" || c === "tab-page";
1956
1962
  n.appearance = { class: "f-component-grid" };
1957
- const w = (b ? Qo : Jo)(e, n, i);
1958
- return Xo(e, w, i);
1963
+ const w = (b ? ei : Zo)(e, n, i);
1964
+ return Qo(e, w, i);
1959
1965
  }
1960
- const Zo = bt(wt, St, It, Rt), ei = go(), ti = ho(), Ft = Mn(Object.assign({}, wt, { componentId: { type: String, default: "" } }), "columnOption", "commandOption"), ni = bt(Ft, St, It, Rt), oi = vo();
1961
- class ii extends wo {
1966
+ const ti = wt(St, It, Rt, Ft), ni = vo(), oi = Co(), Bt = Hn(Object.assign({}, St, { componentId: { type: String, default: "" } }), "columnOption", "commandOption"), ii = wt(Bt, It, Rt, Ft), li = bo();
1967
+ class ai extends Io {
1962
1968
  constructor(n, i) {
1963
1969
  super(n, i);
1964
1970
  }
1965
1971
  getPropertyConfig(n) {
1966
- return this.getBasicPropConfig(n), this.getAppearanceProperties(n), this.propertyConfig.categories.command = So(this).getCommandColumnProperties(n), this.propertyConfig.categories.column = Io().getColumnOptionProperties(n), this.propertyConfig.categories.rowOption = Ro().getRowOptionProperties(n), this.propertyConfig.categories.summary = Fo().getSummaryProperties(n), this.propertyConfig.categories.filter = {
1972
+ return this.getBasicPropConfig(n), this.getAppearanceProperties(n), this.propertyConfig.categories.command = Ro(this).getCommandColumnProperties(n), this.propertyConfig.categories.column = Fo().getColumnOptionProperties(n), this.propertyConfig.categories.rowOption = Bo().getRowOptionProperties(n), this.propertyConfig.categories.summary = To().getSummaryProperties(n), this.propertyConfig.categories.filter = {
1967
1973
  title: "过滤",
1968
1974
  description: "",
1969
1975
  properties: {
@@ -2002,7 +2008,7 @@ class ii extends wo {
2002
2008
  readonly: !0
2003
2009
  }
2004
2010
  },
2005
- setPropertyRelates(s, p) {
2011
+ setPropertyRelates(s, f) {
2006
2012
  switch (s && s.propertyID) {
2007
2013
  case "dataSource": {
2008
2014
  const y = c.formSchemaUtils.getViewModelById(c.viewModelId);
@@ -2019,21 +2025,21 @@ class ii extends wo {
2019
2025
  }
2020
2026
  getAppearanceProperties(n) {
2021
2027
  const i = this;
2022
- this.propertyConfig.categories.appearance = Bo(this).getTreeGrid(n, this.viewModelId, i), this.propertyConfig.categories.selection = To().getSelection(n, i, "treeGrid"), this.propertyConfig.categories.rowNumber = Oo().getRowNumber(n);
2028
+ this.propertyConfig.categories.appearance = Oo(this).getTreeGrid(n, this.viewModelId, i), this.propertyConfig.categories.selection = Do().getSelection(n, i, "treeGrid"), this.propertyConfig.categories.rowNumber = Po().getRowNumber(n);
2023
2029
  }
2024
2030
  isSubGrid() {
2025
2031
  const n = this.formSchemaUtils.getViewModelById(this.viewModelId);
2026
2032
  return n && n.bindTo ? n.bindTo.trim() !== "/" : !1;
2027
2033
  }
2028
2034
  getEventPropConfig(n) {
2029
- const i = Do().initEvent(n), l = this, c = l.eventsEditorUtils.formProperties(n, l.viewModelId, i), b = l.createBaseEventProperty(c);
2035
+ const i = xo().initEvent(n), l = this, c = l.eventsEditorUtils.formProperties(n, l.viewModelId, i), b = l.createBaseEventProperty(c);
2030
2036
  this.propertyConfig.categories.eventsEditor = {
2031
2037
  title: "事件",
2032
2038
  hideTitle: !0,
2033
2039
  properties: b,
2034
2040
  // 这个属性,标记当属性变更得时候触发重新更新属性
2035
2041
  refreshPanelAfterChanged: !0,
2036
- tabId: An,
2042
+ tabId: Nn,
2037
2043
  tabName: "交互",
2038
2044
  setPropertyRelates(S, w) {
2039
2045
  const h = S.propertyValue;
@@ -2056,7 +2062,7 @@ class ii extends wo {
2056
2062
  }), n.type.entities && n.type.entities.length && n.type.entities.map((w) => this.assembleSchemaEntityToTree(w, i + 1, n, S, b)), b;
2057
2063
  }
2058
2064
  }
2059
- function li(e, n) {
2065
+ function ri(e, n) {
2060
2066
  const i = e.schema, l = I(!0), c = I(!0);
2061
2067
  function b(y) {
2062
2068
  return y && y.sourceType === "control" ? y.componentCategory === "input" : !1;
@@ -2071,9 +2077,9 @@ function li(e, n) {
2071
2077
  return !0;
2072
2078
  }
2073
2079
  function s(y) {
2074
- return new ii(y, n).getPropertyConfig(i);
2080
+ return new ai(y, n).getPropertyConfig(i);
2075
2081
  }
2076
- function p() {
2082
+ function f() {
2077
2083
  var y, V, m, j;
2078
2084
  if (e && n) {
2079
2085
  const M = (y = e == null ? void 0 : e.componentInstance) == null ? void 0 : y.value.belongedComponentId;
@@ -2099,40 +2105,40 @@ function li(e, n) {
2099
2105
  triggerBelongedComponentToMoveWhenMoved: l,
2100
2106
  triggerBelongedComponentToDeleteWhenDeleted: c,
2101
2107
  getPropsConfig: s,
2102
- setComponentBasicInfoMap: p
2108
+ setComponentBasicInfoMap: f
2103
2109
  };
2104
2110
  }
2105
- const Te = /* @__PURE__ */ et({
2111
+ const Te = /* @__PURE__ */ tt({
2106
2112
  name: "FTreeGridDesign",
2107
- props: Ft,
2113
+ props: Bt,
2108
2114
  emits: [],
2109
2115
  setup(e, n) {
2110
2116
  var be, ie;
2111
- const i = I(), l = 0, c = I(((be = e.rowOption) == null ? void 0 : be.height) || 28), b = I(!1), S = I(20), w = I(e.columns), h = ot(e), s = I(), p = I(), y = I([]), V = I(!1), m = I(((ie = e.rowOption) == null ? void 0 : ie.wrapContent) || !1), j = Ze("designer-host-service"), M = Ze("design-item-context"), P = li(M, j), v = bo(i, M, P);
2117
+ const i = I(), l = 0, c = I(((be = e.rowOption) == null ? void 0 : be.height) || 28), b = I(!1), S = I(20), w = I(e.columns), h = it(e), s = I(), f = I(), y = I([]), V = I(!1), m = I(((ie = e.rowOption) == null ? void 0 : ie.wrapContent) || !1), j = et("designer-host-service"), M = et("design-item-context"), P = ri(M, j), v = So(i, M, P);
2112
2118
  v.value.designerClass = "f-utils-fill-flex-column";
2113
- const x = it(e, n), z = lt(e), _ = at(e, /* @__PURE__ */ new Map(), x, z, h), U = rt(e, _, h, y, n), C = T(() => _.dataView.value.length), {
2119
+ const x = lt(e, n), z = at(e), _ = rt(e, /* @__PURE__ */ new Map(), x, z, h), U = st(e, _, h, y, n), C = T(() => _.dataView.value.length), {
2114
2120
  containerStyleObject: $
2115
- } = st(e, y), X = dt(e), {
2121
+ } = dt(e, y), X = ut(e), {
2116
2122
  applyCommands: Z
2117
2123
  } = X;
2118
2124
  Z(w);
2119
- const a = Po(e), {
2125
+ const r = _o(e), {
2120
2126
  applyColumnSorter: se,
2121
2127
  columnContext: F,
2122
2128
  updateColumnRenderContext: q
2123
- } = a, de = ct(e), N = ut(e, F), ce = pt(e, n, U, h), B = ft(e, n, h, ce, y), J = mt(e, _, c), ee = yt(e, B, J), K = gt(e, _, B, z, h, J, ee, c), D = xo(e, w, _, C, l, K), {
2129
+ } = r, de = ct(e), N = pt(e, F), ue = ft(e, n, U, h), B = mt(e, n, h, ue, y), J = yt(e, _, c), ee = gt(e, B, J), K = ht(e, _, B, z, h, J, ee, c), D = ko(e, w, _, C, l, K), {
2124
2130
  getVisualData: O
2125
- } = D, Oe = ht(e, U), {
2131
+ } = D, Oe = vt(e, U), {
2126
2132
  sidebarWidth: E
2127
2133
  } = Oe;
2128
2134
  y.value = O(0, C.value + l - 1);
2129
- const te = vt(e, _, y, F, D, C, l, E, c, b), {
2135
+ const te = Ct(e, _, y, F, D, C, l, E, c, b), {
2130
2136
  onWheel: De,
2131
2137
  dataGridWidth: he,
2132
2138
  viewPortHeight: ve,
2133
- viewPortWidth: ue,
2139
+ viewPortWidth: ce,
2134
2140
  updateVisibleRowsOnLatestVisibleScope: Pe
2135
- } = te, xe = _o(e, F, s, ue, N), {
2141
+ } = te, xe = Go(e, F, s, ce, N), {
2136
2142
  calculateColumnsSize: ne
2137
2143
  } = xe, pe = T(() => ({
2138
2144
  "drag-container": !0,
@@ -2145,17 +2151,17 @@ const Te = /* @__PURE__ */ et({
2145
2151
  "fv-grid-wrap-content": m.value
2146
2152
  })), {
2147
2153
  renderGridHeader: Q
2148
- } = Co(M, e, a, te, "tree-grid-column"), {
2154
+ } = wo(M, e, r, te, "tree-grid-column"), {
2149
2155
  renderHorizontalScrollbar: fe
2150
- } = Ct(e, s, te);
2156
+ } = bt(e, s, te);
2151
2157
  function Ce() {
2152
2158
  var L, le;
2153
2159
  const k = Math.ceil(s.value.clientHeight / c.value);
2154
- k > S.value && (S.value = k, Pe()), ve.value = ((L = p.value) == null ? void 0 : L.clientHeight) || 0, he.value = ((le = s.value) == null ? void 0 : le.clientWidth) || 0, p.value && (ue.value = p.value.clientWidth), ne();
2160
+ k > S.value && (S.value = k, Pe()), ve.value = ((L = f.value) == null ? void 0 : L.clientHeight) || 0, he.value = ((le = s.value) == null ? void 0 : le.clientWidth) || 0, f.value && (ce.value = f.value.clientWidth), ne();
2155
2161
  }
2156
- tt(() => {
2157
- i.value.componentInstance = v, s.value && (S.value = Math.max(Math.ceil(s.value.clientHeight / c.value), S.value), y.value = O(0, C.value + l - 1), nt(s.value, Ce), ne(), Fe(() => {
2158
- s.value && (he.value = s.value.clientWidth), p.value && (ue.value = p.value.clientWidth, ve.value = p.value.clientHeight);
2162
+ nt(() => {
2163
+ i.value.componentInstance = v, s.value && (S.value = Math.max(Math.ceil(s.value.clientHeight / c.value), S.value), y.value = O(0, C.value + l - 1), ot(s.value, Ce), ne(), Fe(() => {
2164
+ s.value && (he.value = s.value.clientWidth), f.value && (ce.value = f.value.clientWidth, ve.value = f.value.clientHeight);
2159
2165
  }));
2160
2166
  });
2161
2167
  function oe(k) {
@@ -2182,30 +2188,30 @@ const Te = /* @__PURE__ */ et({
2182
2188
  }
2183
2189
  });
2184
2190
  Te.register = (e, n, i, l) => {
2185
- e["tree-grid"] = No, n["tree-grid"] = Zo, l["tree-grid"] = { bindingResolver: ti, selectionItemResolver: ei, updateColumnsResolver: oi };
2191
+ e["tree-grid"] = Wo, n["tree-grid"] = ti, l["tree-grid"] = { bindingResolver: oi, selectionItemResolver: ni, updateColumnsResolver: li };
2186
2192
  };
2187
2193
  Te.registerDesigner = (e, n, i) => {
2188
- e["tree-grid"] = Te, n["tree-grid"] = ni;
2194
+ e["tree-grid"] = Te, n["tree-grid"] = ii;
2189
2195
  };
2190
- const _i = Hn(Te);
2196
+ const Gi = Ln(Te);
2191
2197
  export {
2192
2198
  Te as FTreeGridDesign,
2193
- ti as bindingResolver,
2194
- Di as columnOptions,
2195
- _i as default,
2196
- ni as designPropsResolver,
2197
- Pi as editOptions,
2198
- Fi as filterOptions,
2199
- Ri as groupOptions,
2200
- Bi as headerOptions,
2201
- xi as loadingOptions,
2202
- Si as paginationOptions,
2203
- Zo as propsResolver,
2204
- Ti as rowOptions,
2205
- ei as selectionItemResolver,
2206
- Ii as sortOptions,
2207
- Oi as summaryOptions,
2208
- Ft as treeGridDesignProps,
2209
- ko as treeGridProps,
2210
- oi as updateColumnsResolver
2199
+ oi as bindingResolver,
2200
+ xi as columnOptions,
2201
+ Gi as default,
2202
+ ii as designPropsResolver,
2203
+ _i as editOptions,
2204
+ Ti as filterOptions,
2205
+ Bi as groupOptions,
2206
+ Oi as headerOptions,
2207
+ ki as loadingOptions,
2208
+ Ri as paginationOptions,
2209
+ ti as propsResolver,
2210
+ Di as rowOptions,
2211
+ ni as selectionItemResolver,
2212
+ Fi as sortOptions,
2213
+ Pi as summaryOptions,
2214
+ Bt as treeGridDesignProps,
2215
+ Vo as treeGridProps,
2216
+ li as updateColumnsResolver
2211
2217
  };