@aplus-frontend/ui 7.12.6 → 7.13.1

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 (168) hide show
  1. package/es/src/ag-grid/components/loading/index.vue.d.ts +3 -0
  2. package/es/src/ag-grid/components/loading/index.vue.mjs +4 -0
  3. package/es/src/ag-grid/components/loading/index.vue2.mjs +18 -0
  4. package/es/src/ag-grid/context.mjs +1 -1
  5. package/es/src/ag-grid/editable/form-item.vue.mjs +33 -31
  6. package/es/src/ag-grid/editable/index.vue.mjs +1 -0
  7. package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
  8. package/es/src/ag-grid/index.vue.mjs +209 -202
  9. package/es/src/ag-grid/interface.d.ts +4 -0
  10. package/es/src/ag-grid/style/index.mjs +8 -5
  11. package/es/src/ap-drawer/interface.d.ts +13 -2
  12. package/es/src/ap-drawer/utils/createDrawer.mjs +37 -32
  13. package/es/src/ap-field/select/index.vue.d.ts +1 -2
  14. package/es/src/ap-field/select/index.vue.mjs +126 -88
  15. package/es/src/ap-field/style/index.mjs +8 -6
  16. package/es/src/ap-field/style/select.d.ts +2 -0
  17. package/es/src/ap-field/style/select.mjs +43 -0
  18. package/es/src/ap-form/context.mjs +1 -1
  19. package/es/src/ap-form/item-group/helper.mjs +2 -2
  20. package/es/src/ap-form/items/select/index.vue.d.ts +4 -8
  21. package/es/src/ap-form/provider/context.mjs +1 -1
  22. package/es/src/ap-grid/utils/table.mjs +2 -2
  23. package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
  24. package/es/src/ap-table/ap-table.vue2.mjs +15 -16
  25. package/es/src/ap-table/components/setting/context.d.ts +17 -0
  26. package/es/src/ap-table/components/setting/context.mjs +18 -0
  27. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  28. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +220 -88
  29. package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
  30. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +49 -51
  31. package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
  32. package/es/src/ap-table/components/setting/template/edit-form.vue.mjs +4 -0
  33. package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +74 -0
  34. package/es/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
  35. package/es/src/ap-table/components/setting/template/index.vue.mjs +4 -0
  36. package/es/src/ap-table/components/setting/template/index.vue2.mjs +51 -0
  37. package/es/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
  38. package/es/src/ap-table/components/setting/template/item.vue.mjs +4 -0
  39. package/es/src/ap-table/components/setting/template/item.vue2.mjs +78 -0
  40. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  41. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +26 -29
  42. package/es/src/ap-table/components/setting/utils.d.ts +1 -0
  43. package/es/src/ap-table/components/setting/utils.mjs +22 -15
  44. package/es/src/ap-table/constants.d.ts +2 -4
  45. package/es/src/ap-table/context.mjs +1 -1
  46. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
  47. package/es/src/ap-table/hooks/use-table-column-state.mjs +32 -120
  48. package/es/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
  49. package/es/src/ap-table/hooks/use-table-template-storage.mjs +150 -0
  50. package/es/src/ap-table/interface.d.ts +26 -3
  51. package/es/src/ap-table/style/index.d.ts +1 -0
  52. package/es/src/ap-table/style/index.mjs +2 -1
  53. package/es/src/ap-table/style/setting.d.ts +2 -0
  54. package/es/src/ap-table/style/setting.mjs +114 -19
  55. package/es/src/ap-table/utils.mjs +1 -1
  56. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
  57. package/es/src/business/ag-grid-modal/style/index.mjs +7 -7
  58. package/es/src/business/ap-attachment/ApAttachment.mjs +96 -89
  59. package/es/src/business/ap-attachment/style/index.mjs +33 -16
  60. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +24 -22
  61. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
  62. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +35 -31
  63. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  64. package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
  65. package/es/src/business/ap-download/hooks/index.mjs +1 -1
  66. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +1 -3
  67. package/es/src/business/ap-keep-alive/hook.mjs +1 -1
  68. package/es/src/business/ap-keep-alive/utils.mjs +1 -1
  69. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +19 -19
  70. package/es/src/business/ap-upload/components/Picture.vue2.mjs +34 -34
  71. package/es/src/business/ap-value-select-card/style/index.mjs +3 -2
  72. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
  73. package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
  74. package/es/src/business/ap-view/style/index.mjs +2 -2
  75. package/es/src/check-card/context.mjs +1 -1
  76. package/es/src/config-provider/constants.mjs +1 -1
  77. package/es/src/config-provider/hooks/use-locale.mjs +1 -1
  78. package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
  79. package/es/src/config-provider/hooks/use-token.mjs +1 -1
  80. package/es/src/design-token/index.mjs +5 -5
  81. package/es/src/editable-table/utils.mjs +1 -1
  82. package/es/src/locale/lang/en.mjs +15 -4
  83. package/es/src/locale/lang/zh-cn.mjs +18 -7
  84. package/es/src/text/context.mjs +1 -1
  85. package/es/src/time-ago/useTimeAgo.mjs +26 -27
  86. package/es/src/utils/data-range-persets.d.ts +13 -1
  87. package/es/src/utils/data-range-persets.mjs +80 -60
  88. package/es/src/utils/index.d.ts +1 -0
  89. package/es/src/utils/index.mjs +56 -48
  90. package/es/src/utils/retry.d.ts +12 -0
  91. package/es/src/utils/retry.mjs +27 -0
  92. package/es/src/utils/slot.mjs +1 -1
  93. package/es/src/version.d.ts +1 -1
  94. package/es/src/version.mjs +1 -1
  95. package/lib/src/ag-grid/components/loading/index.vue.d.ts +3 -0
  96. package/lib/src/ag-grid/components/loading/index.vue.js +1 -0
  97. package/lib/src/ag-grid/components/loading/index.vue2.js +1 -0
  98. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  99. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  100. package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
  101. package/lib/src/ag-grid/index.vue.js +1 -1
  102. package/lib/src/ag-grid/interface.d.ts +4 -0
  103. package/lib/src/ag-grid/style/index.js +1 -1
  104. package/lib/src/ap-drawer/interface.d.ts +13 -2
  105. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  106. package/lib/src/ap-field/select/index.vue.d.ts +1 -2
  107. package/lib/src/ap-field/select/index.vue.js +1 -1
  108. package/lib/src/ap-field/style/index.js +1 -1
  109. package/lib/src/ap-field/style/select.d.ts +2 -0
  110. package/lib/src/ap-field/style/select.js +1 -0
  111. package/lib/src/ap-form/items/select/index.vue.d.ts +4 -8
  112. package/lib/src/ap-grid/utils/table.js +1 -1
  113. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  114. package/lib/src/ap-table/components/setting/context.d.ts +17 -0
  115. package/lib/src/ap-table/components/setting/context.js +1 -0
  116. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  117. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  118. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  119. package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
  120. package/lib/src/ap-table/components/setting/template/edit-form.vue.js +1 -0
  121. package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -0
  122. package/lib/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
  123. package/lib/src/ap-table/components/setting/template/index.vue.js +1 -0
  124. package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -0
  125. package/lib/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
  126. package/lib/src/ap-table/components/setting/template/item.vue.js +1 -0
  127. package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -0
  128. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  129. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  130. package/lib/src/ap-table/components/setting/utils.d.ts +1 -0
  131. package/lib/src/ap-table/components/setting/utils.js +1 -1
  132. package/lib/src/ap-table/constants.d.ts +2 -4
  133. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
  134. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  135. package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
  136. package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -0
  137. package/lib/src/ap-table/interface.d.ts +26 -3
  138. package/lib/src/ap-table/style/index.d.ts +1 -0
  139. package/lib/src/ap-table/style/index.js +1 -1
  140. package/lib/src/ap-table/style/setting.d.ts +2 -0
  141. package/lib/src/ap-table/style/setting.js +1 -1
  142. package/lib/src/business/ag-grid-modal/style/index.js +1 -1
  143. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  144. package/lib/src/business/ap-attachment/style/index.js +1 -1
  145. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  146. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
  147. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  148. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  149. package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
  150. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  151. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  152. package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
  153. package/lib/src/business/ap-value-select-card/style/index.js +1 -1
  154. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  155. package/lib/src/business/ap-view/style/index.js +1 -1
  156. package/lib/src/design-token/index.js +1 -1
  157. package/lib/src/locale/lang/en.js +1 -1
  158. package/lib/src/locale/lang/zh-cn.js +1 -1
  159. package/lib/src/time-ago/useTimeAgo.js +1 -1
  160. package/lib/src/utils/data-range-persets.d.ts +13 -1
  161. package/lib/src/utils/data-range-persets.js +1 -1
  162. package/lib/src/utils/index.d.ts +1 -0
  163. package/lib/src/utils/index.js +1 -1
  164. package/lib/src/utils/retry.d.ts +12 -0
  165. package/lib/src/utils/retry.js +1 -0
  166. package/lib/src/version.d.ts +1 -1
  167. package/lib/src/version.js +1 -1
  168. package/package.json +2 -2
@@ -1,38 +1,41 @@
1
- import { defineComponent as fo, useSlots as go, ref as M, toRef as F, unref as t, computed as n, nextTick as N, watch as G, createElementBlock as L, openBlock as C, normalizeStyle as O, normalizeClass as g, createCommentVNode as se, createElementVNode as B, createVNode as ie, mergeProps as W, createSlots as wo, withCtx as ue, Fragment as So, renderList as ho, createBlock as H, resolveDynamicComponent as Co, renderSlot as de, withDirectives as yo, vShow as Ro } from "vue";
2
- import { AG_GRID_LOCALE_EN as vo, AG_GRID_LOCALE_CN as bo } from "@ag-grid-community/locale";
3
- import { Spin as Mo, Pagination as Fo } from "@aplus-frontend/antdv";
4
- import { useToken as Bo } from "@aplus-frontend/antdv/es/theme/internal";
5
- import { ModuleRegistry as ko, ValidationModule as xo, ColumnAutoSizeModule as Io, PinnedRowModule as Ao, RowAutoHeightModule as No, RowStyleModule as To, CellSpanModule as Do, CellStyleModule as Eo, TooltipModule as Po, RowSelectionModule as Ko, LocaleModule as Vo, ValueCacheModule as zo, GridStateModule as Go, ColumnApiModule as Lo, RowApiModule as Oo, CellApiModule as Wo, RenderApiModule as Ho, EventApiModule as Uo, ScrollApiModule as _o, ClientSideRowModelApiModule as jo, ClientSideRowModelModule as $o } from "ag-grid-community";
6
- import { AgGridVue as qo } from "ag-grid-vue3";
7
- import { isUndefined as k, isFunction as T } from "lodash-unified";
8
- import { DEFAULT_ROW_SELECTION_CONFIG as ce, sizeReverseMap as Jo, sizeMap as Qo } from "../ap-grid/constants.mjs";
9
- import { useProvideApTable as Xo } from "../ap-table/context.mjs";
10
- import { useTablePaging as Yo } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
- import { recursionApColumns as Zo } from "../ap-table/utils.mjs";
1
+ import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as x, watch as G, createElementBlock as L, openBlock as C, normalizeStyle as O, normalizeClass as y, createCommentVNode as se, createElementVNode as A, createVNode as go, mergeProps as W, createSlots as wo, withCtx as ie, Fragment as So, renderList as Co, createBlock as H, resolveDynamicComponent as yo, renderSlot as ue } from "vue";
2
+ import { AG_GRID_LOCALE_EN as ho, AG_GRID_LOCALE_CN as Ro } from "@ag-grid-community/locale";
3
+ import { Pagination as vo } from "@aplus-frontend/antdv";
4
+ import { useToken as bo } from "@aplus-frontend/antdv/es/theme/internal";
5
+ import { ModuleRegistry as Mo, ValidationModule as Fo, ColumnAutoSizeModule as Bo, PinnedRowModule as ko, RowAutoHeightModule as Io, RowStyleModule as xo, CellSpanModule as Ao, CellStyleModule as No, TooltipModule as To, RowSelectionModule as Do, LocaleModule as Eo, ValueCacheModule as Po, GridStateModule as Ko, ColumnApiModule as Vo, RowApiModule as zo, CellApiModule as Go, RenderApiModule as Lo, EventApiModule as Oo, ScrollApiModule as Wo, ClientSideRowModelApiModule as Ho, ClientSideRowModelModule as Uo } from "ag-grid-community";
6
+ import { AgGridVue as _o } from "ag-grid-vue3";
7
+ import { isUndefined as B, isFunction as N } from "lodash-unified";
8
+ import { DEFAULT_ROW_SELECTION_CONFIG as de, sizeReverseMap as jo, sizeMap as $o } from "../ap-grid/constants.mjs";
9
+ import { useProvideApTable as qo } from "../ap-table/context.mjs";
10
+ import { useTablePaging as Jo } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
+ import { recursionApColumns as Qo } from "../ap-table/utils.mjs";
12
12
  import "../config-provider/index.mjs";
13
13
  import "../utils/index.mjs";
14
- import { getValidVNodeList as et } from "../utils/slot.mjs";
15
- import { ApForm as ot } from "../ap-form/index.mjs";
14
+ import { retryUntil as Xo } from "../utils/retry.mjs";
15
+ import { getValidVNodeList as Yo } from "../utils/slot.mjs";
16
+ import { ApForm as Zo } from "../ap-form/index.mjs";
16
17
  import "./components/empty/index.vue.mjs";
18
+ import "./components/loading/index.vue.mjs";
17
19
  import "./components/row/index.vue.mjs";
18
- import { useProvideSorter as tt } from "./context.mjs";
19
- import { useColumns as rt } from "./hooks/use-columns.mjs";
20
- import { useColumnsDef as lt } from "./hooks/use-columns-def.mjs";
21
- import { usePinnedRow as at } from "./hooks/use-pinned-row.mjs";
22
- import nt from "./hooks/use-row-selection.mjs";
23
- import { useSearchForm as st } from "./hooks/use-search-form.mjs";
24
- import it from "./hooks/use-selection-col-def.mjs";
25
- import ut from "./hooks/use-virtual-config.mjs";
26
- import dt from "./style/index.mjs";
27
- import { useTheme as ct } from "./theme.mjs";
28
- import { mergeProps as mt } from "./utils.mjs";
29
- import { useNamespace as pt } from "../config-provider/hooks/use-namespace.mjs";
30
- import { useLocale as ft } from "../config-provider/hooks/use-locale.mjs";
31
- import { useGlobalConfig as gt } from "../config-provider/hooks/use-global-config.mjs";
32
- import { isDef as wt } from "../utils/is.mjs";
33
- import St from "./components/row/index.vue2.mjs";
34
- import ht from "./components/empty/index.vue2.mjs";
35
- const Zt = /* @__PURE__ */ fo({
20
+ import { useProvideSorter as et } from "./context.mjs";
21
+ import { useColumns as ot } from "./hooks/use-columns.mjs";
22
+ import { useColumnsDef as tt } from "./hooks/use-columns-def.mjs";
23
+ import { usePinnedRow as rt } from "./hooks/use-pinned-row.mjs";
24
+ import lt from "./hooks/use-row-selection.mjs";
25
+ import { useSearchForm as at } from "./hooks/use-search-form.mjs";
26
+ import nt from "./hooks/use-selection-col-def.mjs";
27
+ import st from "./hooks/use-virtual-config.mjs";
28
+ import it from "./style/index.mjs";
29
+ import { useTheme as ut } from "./theme.mjs";
30
+ import { mergeProps as dt } from "./utils.mjs";
31
+ import { useNamespace as ct } from "../config-provider/hooks/use-namespace.mjs";
32
+ import { useLocale as mt } from "../config-provider/hooks/use-locale.mjs";
33
+ import { useGlobalConfig as pt } from "../config-provider/hooks/use-global-config.mjs";
34
+ import { isDef as ft } from "../utils/is.mjs";
35
+ import gt from "./components/row/index.vue2.mjs";
36
+ import wt from "./components/loading/index.vue2.mjs";
37
+ import St from "./components/empty/index.vue2.mjs";
38
+ const or = /* @__PURE__ */ po({
36
39
  name: "AgGrid",
37
40
  __name: "index",
38
41
  props: {
@@ -106,16 +109,20 @@ const Zt = /* @__PURE__ */ fo({
106
109
  autoHeight: { type: Boolean },
107
110
  onUpdate: {},
108
111
  customRow: {},
109
- theme: {}
112
+ theme: {},
113
+ emptyComponent: {}
110
114
  },
111
- setup(me, { expose: pe }) {
112
- const fe = {
113
- "zh-cn": bo,
114
- en: vo
115
+ setup(ce, { expose: me }) {
116
+ const pe = {
117
+ "zh-cn": Ro,
118
+ en: ho
115
119
  };
116
- ko.registerModules([
117
- xo,
120
+ Mo.registerModules([
121
+ Fo,
122
+ Bo,
123
+ ko,
118
124
  Io,
125
+ xo,
119
126
  Ao,
120
127
  No,
121
128
  To,
@@ -130,32 +137,29 @@ const Zt = /* @__PURE__ */ fo({
130
137
  Oo,
131
138
  Wo,
132
139
  Ho,
133
- Uo,
134
- _o,
135
- jo,
136
- $o
140
+ Uo
137
141
  ]);
138
- const o = me, U = go(), { e: x, b: d, be: ge } = pt("ag-grid"), { lang: _ } = ft(), we = dt("ag-grid"), y = M(o.size), Se = ct(
139
- y,
142
+ const o = ce, U = fo(), { e: T, b: d, be: fe } = ct("ag-grid"), { lang: _ } = mt(), ge = it("ag-grid"), h = M(o.size), we = ut(
143
+ h,
140
144
  F(o, "rowHeight"),
141
145
  F(o, "theme")
142
- ), he = ut(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: Ce } = at(
146
+ ), Se = st(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: Ce } = rt(
143
147
  F(o, "summary")
144
- ), ye = gt("apGrid"), s = M(), [, Re] = Bo();
148
+ ), ye = pt("apGrid"), s = M(), [, he] = bo();
145
149
  let R = !!o.dataSource;
146
- const $ = st(o), { shownColumns: w, columns: q, columnKeys: ve, getTargetColumnByKey: be } = rt(o), { defaultColDef: Me, columnDefs: Fe, gridWrapperRef: Be } = lt(q, o, Ce), I = M({});
147
- tt({
148
- sorter: I,
150
+ const $ = at(o), { shownColumns: g, columns: q, columnKeys: Re, getTargetColumnByKey: ve } = ot(o), { defaultColDef: be, columnDefs: Me, gridWrapperRef: Fe } = tt(q, o, Ce), k = M({});
151
+ et({
152
+ sorter: k,
149
153
  setSorter(e) {
150
- I.value = e;
154
+ k.value = e;
151
155
  }
152
156
  });
153
- const ke = {
157
+ const Be = {
154
158
  asc: "ascend",
155
159
  desc: "descend"
156
160
  };
157
- function xe() {
158
- const e = s.value.getColumns()?.filter((c) => c.getSort() !== void 0), r = t(I) || {};
161
+ function ke() {
162
+ const e = s.value.getColumns()?.filter((c) => c.getSort() !== void 0), r = t(k) || {};
159
163
  let l = e?.[0];
160
164
  const i = Object.keys(r);
161
165
  if (i.length && i.every((c) => r[c] === null)) {
@@ -164,25 +168,25 @@ const Zt = /* @__PURE__ */ fo({
164
168
  }
165
169
  if (!l)
166
170
  return;
167
- const u = l.getColDef(), p = l.getSort(), f = be(u.colId);
171
+ const u = l.getColDef(), p = l.getSort(), f = ve(u.colId);
168
172
  Q(void 0, void 0, {
169
173
  column: u,
170
174
  field: f?.field ?? u.field ?? u.colId,
171
- order: p ? ke[p] : null
175
+ order: p ? Be[p] : null
172
176
  });
173
177
  }
174
- const Ie = n(() => Zo(t(w), (e) => {
178
+ const Ie = n(() => Qo(t(g), (e) => {
175
179
  if (e.sorter === !0)
176
180
  return e.field ?? e.dataIndex ?? e.key;
177
- }).filter(Boolean)), Ae = () => {
178
- I.value = {};
181
+ }).filter(Boolean)), xe = () => {
182
+ k.value = {};
179
183
  const e = s.value;
180
184
  if (!e)
181
185
  return;
182
186
  const r = e.getColumnState()?.map((l) => ({ ...l, sort: null }));
183
187
  e.applyColumnState({ state: r });
184
- }, D = M(!0), Ne = n(() => wt(o.manual) ? o.manual : et(U.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
185
- formRef: S,
188
+ }, D = M(!0), Ae = n(() => ft(o.manual) ? o.manual : Yo(U.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
189
+ formRef: w,
186
190
  submit: E,
187
191
  reset: P,
188
192
  data: m,
@@ -190,13 +194,13 @@ const Zt = /* @__PURE__ */ fo({
190
194
  handleTableChangeOptional: Q,
191
195
  submitWith: X,
192
196
  refresh: Y,
193
- getPaging: Te,
194
- setPaging: De,
195
- setDataSource: Ee,
196
- getLastParams: Pe
197
- } = Yo({
197
+ getPaging: Ne,
198
+ setPaging: Te,
199
+ setDataSource: De,
200
+ getLastParams: Ee
201
+ } = Jo({
198
202
  async request(e) {
199
- if (R = !1, h.value && !h.value.preserveSelectedRowKeys && k(o.dataSource) && !D.value && z(), D.value && (D.value = !1), !k(o.dataSource)) {
203
+ if (R = !1, S.value && !S.value.preserveSelectedRowKeys && B(o.dataSource) && !D.value && z(), D.value && (D.value = !1), !B(o.dataSource)) {
200
204
  const l = e.pageSize * (e.current - 1);
201
205
  return {
202
206
  data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(l, l + e.pageSize)) || [],
@@ -213,54 +217,54 @@ const Zt = /* @__PURE__ */ fo({
213
217
  filterFields: M([]),
214
218
  params: F(o, "params"),
215
219
  defaultData: o.defaultData,
216
- manual: t(Ne),
220
+ manual: t(Ae),
217
221
  formatParams: o.beforeSearchSubmit,
218
222
  pagination: o.pagination,
219
223
  sortFields: Ie,
220
- onClickReset: Ae
221
- }), h = n(() => {
224
+ onClickReset: xe
225
+ }), S = n(() => {
222
226
  const e = o.rowSelection || ye.value?.rowSelection;
223
227
  if (e)
224
- return e === !0 ? ce : {
225
- ...ce,
228
+ return e === !0 ? de : {
229
+ ...de,
226
230
  ...e
227
231
  };
228
- }), Ke = it(o, w), Ve = n(
229
- () => k(o.dataSource) ? m.records : o.dataSource
232
+ }), Pe = nt(o, g), Ke = n(
233
+ () => B(o.dataSource) ? m.records : o.dataSource
230
234
  ), {
231
- select: ze,
232
- unSelect: Ge,
235
+ select: Ve,
236
+ unSelect: ze,
233
237
  selectedRows: K,
234
- selectedRowKeys: Le,
235
- clearAll: Oe,
236
- selectMultiByKeys: We,
237
- selectMulti: He,
238
- unSelectMulti: Ue
239
- } = nt({
240
- ...h.value,
241
- dataSource: Ve,
238
+ selectedRowKeys: Ge,
239
+ clearAll: Le,
240
+ selectMultiByKeys: Oe,
241
+ selectMulti: We,
242
+ unSelectMulti: He
243
+ } = lt({
244
+ ...S.value,
245
+ dataSource: Ke,
242
246
  rowKey: o.rowKey
243
- }), _e = {
247
+ }), Ue = {
244
248
  checkbox: "multiRow",
245
249
  radio: "singleRow"
246
- }, je = n(() => {
247
- const e = h.value;
250
+ }, _e = n(() => {
251
+ const e = S.value;
248
252
  if (!e)
249
253
  return;
250
254
  const { type: r = "checkbox", disabled: l } = e;
251
255
  return {
252
- mode: _e[r],
256
+ mode: Ue[r],
253
257
  isRowSelectable: (i) => l ? !l(i.data) : !0,
254
258
  hideDisabledCheckboxes: e.hideDisabled ?? !1
255
259
  };
256
260
  });
257
261
  function V(e) {
258
- return T(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
262
+ return N(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
259
263
  }
260
- const A = ({
264
+ const I = ({
261
265
  api: e = s.value
262
266
  }) => {
263
- if (o.onUpdate?.(), !h.value)
267
+ if (o.onUpdate?.(), !S.value)
264
268
  return;
265
269
  const r = K.value || [];
266
270
  R = !1;
@@ -271,74 +275,74 @@ const Zt = /* @__PURE__ */ fo({
271
275
  }), e.setNodesSelected({ nodes: l, newValue: !0 }), setTimeout(() => {
272
276
  R = !0;
273
277
  }, 0);
274
- }, $e = (e) => {
275
- R && (e.node.isSelected() ? ze(e.data) : Ge(e.data), T(h.value?.tooltip) && e.api.refreshCells({
278
+ }, je = (e) => {
279
+ R && (e.node.isSelected() ? Ve(e.data) : ze(e.data), N(S.value?.tooltip) && e.api.refreshCells({
276
280
  rowNodes: [e.node],
277
281
  // todo: 取消硬编码
278
282
  columns: ["ag-Grid-SelectionColumn"],
279
283
  force: !0
280
284
  }));
281
- }, qe = () => {
285
+ }, $e = () => {
282
286
  R = !0;
283
287
  }, z = () => {
284
- Oe(), s.value?.deselectAll();
288
+ Le(), s.value?.deselectAll();
285
289
  };
286
- function Je(e) {
287
- We(e), N(() => {
288
- A({});
290
+ function qe(e) {
291
+ Oe(e), x(() => {
292
+ I({});
289
293
  });
290
294
  }
291
- const Qe = n(() => {
295
+ const Je = n(() => {
292
296
  const e = o.customRow;
293
297
  return e ? {
294
298
  isFullWidthRow: e.isCustomRow,
295
- fullWidthCellRenderer: St,
299
+ fullWidthCellRenderer: gt,
296
300
  fullWidthCellRendererParams: {
297
301
  render: e.render
298
302
  }
299
303
  } : {};
300
304
  });
301
- function Xe(e) {
302
- He(e), N(() => {
303
- A({});
305
+ function Qe(e) {
306
+ We(e), x(() => {
307
+ I({});
304
308
  });
305
309
  }
306
- function Ye(e) {
307
- Ue(e), N(() => {
308
- A({});
310
+ function Xe(e) {
311
+ He(e), x(() => {
312
+ I({});
309
313
  });
310
314
  }
311
315
  function Z(e = !1) {
312
316
  const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
313
- return S.value?.apForm?.[r]?.(!0);
317
+ return w.value?.apForm?.[r]?.(!0);
314
318
  }
315
319
  function ee(e) {
316
- S.value?.apForm?.setFieldsValue?.(e);
320
+ w.value?.apForm?.setFieldsValue?.(e);
317
321
  }
318
322
  function oe() {
319
- return S.value?.getSorterItems() || [];
323
+ return w.value?.getSorterItems() || [];
320
324
  }
321
325
  function te(e) {
322
- S.value?.setSorterItems(e);
326
+ w.value?.setSorterItems(e);
323
327
  }
324
328
  function re() {
325
- S.value?.resetSorterItems();
329
+ w.value?.resetSorterItems();
326
330
  }
327
331
  function le(e) {
328
332
  return e && String(e);
329
333
  }
330
- function Ze(e) {
334
+ function Ye(e) {
331
335
  const r = s.value;
332
336
  if (!r)
333
337
  return;
334
338
  const l = r.getColumnState() || [], i = e.map((a) => a.key ? String(a.key) : a.key).filter(Boolean), v = l.map((a) => {
335
- if (!ve.value.includes(a.colId))
339
+ if (!Re.value.includes(a.colId))
336
340
  return a;
337
341
  const b = !i.includes(a.colId), ae = {
338
342
  ...a,
339
343
  hide: b
340
344
  }, ne = e.find(
341
- (po) => le(po.key) === a.colId
345
+ (mo) => le(mo.key) === a.colId
342
346
  );
343
347
  return ne && (ae.pinned = ne.fixed || null), ae;
344
348
  }), u = new Map(
@@ -354,19 +358,27 @@ const Zt = /* @__PURE__ */ fo({
354
358
  applyOrder: !0
355
359
  });
356
360
  }
357
- Xo({
358
- columns: n(() => w.value),
361
+ qo({
362
+ columns: n(() => g.value),
359
363
  columnsBackup: n(() => q.value),
360
- size: n(() => Qo[y.value]),
364
+ size: n(() => $o[h.value]),
361
365
  updateColumns(e) {
362
- w.value = e, o.onShownColumnsChange?.(e), Ze(e);
366
+ g.value = e, o.onShownColumnsChange?.(e), Xo(
367
+ () => s.value,
368
+ () => {
369
+ Ye(e);
370
+ },
371
+ {
372
+ interval: 17
373
+ }
374
+ );
363
375
  },
364
376
  updateSize(e) {
365
- y.value = Jo[e];
377
+ h.value = jo[e];
366
378
  },
367
379
  renderConfig: n(() => ({
368
- className: ge("table-header", "title"),
369
- color: Re.value.colorTextTertiary
380
+ className: fe("table-header", "title"),
381
+ color: he.value.colorTextTertiary
370
382
  })),
371
383
  dataSource: n(() => t(m).records),
372
384
  getSearchFormValues: Z,
@@ -378,51 +390,51 @@ const Zt = /* @__PURE__ */ fo({
378
390
  getSearchFormSorterItems: oe,
379
391
  setSearchFormSorterItems: te,
380
392
  resetSearchFormSorterItems: re,
381
- getLastParams: Pe
393
+ getLastParams: Ee
382
394
  });
383
- const eo = n(
384
- () => k(o.loading) ? m.loading : o.loading
385
- ), oo = n(() => [
395
+ const Ze = n(
396
+ () => B(o.loading) ? m.loading : o.loading
397
+ ), eo = n(() => [
386
398
  d(),
387
399
  o.card ? null : d("wrapper"),
388
400
  d("adaptive"),
389
- d(`size-${y.value}`),
401
+ d(`size-${h.value}`),
390
402
  o.autoHeight && m.records.length ? d("auto-height") : null,
391
- we.value
392
- ].filter(Boolean)), to = n(() => ({
403
+ ge.value
404
+ ].filter(Boolean)), oo = n(() => ({
393
405
  height: "100%",
394
406
  ...o.tableStyle || {}
395
- })), ro = (e, r) => {
407
+ })), to = (e, r) => {
396
408
  Q({ current: e, pageSize: r });
397
409
  };
398
- function lo(e) {
410
+ function ro(e) {
399
411
  const r = e.data;
400
412
  return V(r);
401
413
  }
402
- function ao(e, r) {
403
- (T(e) ? s.value?.ensureNodeVisible : s.value?.ensureIndexVisible)?.(e, r);
414
+ function lo(e, r) {
415
+ (N(e) ? s.value?.ensureNodeVisible : s.value?.ensureIndexVisible)?.(e, r);
404
416
  }
405
- function no(e, r) {
417
+ function ao(e, r) {
406
418
  s.value?.ensureColumnVisible(e, r);
407
419
  }
408
- function so(e) {
420
+ function no(e) {
409
421
  o.onRowClicked?.(e.data, e.event);
410
422
  }
411
- function io(e) {
423
+ function so(e) {
412
424
  o.onScrollEnd?.(e.direction);
413
425
  }
414
- function uo(e) {
426
+ function io(e) {
415
427
  return s.value?.refreshCells(e);
416
428
  }
417
- function co(e) {
429
+ function uo(e) {
418
430
  return s.value?.redrawRows(e);
419
431
  }
420
- const mo = (e) => {
432
+ const co = (e) => {
421
433
  const r = [
422
434
  j.value.getRowClass?.(e)
423
435
  ];
424
436
  if (!e.node.rowPinned) {
425
- const l = T(o.rowClassName) ? o.rowClassName(e.data, e.rowIndex) : o.rowClassName;
437
+ const l = N(o.rowClassName) ? o.rowClassName(e.data, e.rowIndex) : o.rowClassName;
426
438
  r.push(l);
427
439
  }
428
440
  return r.flat().filter(Boolean);
@@ -430,66 +442,66 @@ const Zt = /* @__PURE__ */ fo({
430
442
  return G(
431
443
  () => o.dataSource,
432
444
  (e) => {
433
- N(() => {
434
- Ee(e);
445
+ x(() => {
446
+ De(e);
435
447
  });
436
448
  },
437
449
  { immediate: !0, deep: !0 }
438
450
  ), G(
439
451
  () => o.size,
440
452
  (e) => {
441
- y.value = e;
453
+ h.value = e;
442
454
  }
443
455
  ), G(
444
456
  () => t(m).loading,
445
457
  (e) => {
446
458
  o.onLoadingChange?.(e);
447
459
  }
448
- ), pe({
460
+ ), me({
449
461
  submit: E,
450
462
  reset: P,
451
463
  refresh: Y,
452
464
  submitWith: X,
453
465
  setSearchFormValues: ee,
454
466
  getSearchFormValues: Z,
455
- getShowColumns: () => t(w),
467
+ getShowColumns: () => t(g),
456
468
  rowSelection: {
457
469
  selectedRows: n(() => K.value),
458
- setSelectedRowKeys: Je,
459
- setSelectedRows: Xe,
470
+ setSelectedRowKeys: qe,
471
+ setSelectedRows: Qe,
460
472
  clearAll: z,
461
- unSelectRows: Ye
473
+ unSelectRows: Xe
462
474
  },
463
- scrollToRow: ao,
464
- scrollToColumn: no,
475
+ scrollToRow: lo,
476
+ scrollToColumn: ao,
465
477
  getDataSource: () => t(m.records),
466
- getPaging: Te,
467
- setPaging: De,
478
+ getPaging: Ne,
479
+ setPaging: Te,
468
480
  getSearchFormSorterItems: oe,
469
481
  setSearchFormSorterItems: te,
470
482
  resetSearchFormSorterItems: re,
471
- refreshCells: uo,
472
- redrawRows: co,
483
+ refreshCells: io,
484
+ redrawRows: uo,
473
485
  _internalGridApi: n(() => s.value)
474
486
  }), (e, r) => (C(), L("div", {
475
- class: g(oo.value),
487
+ class: y(eo.value),
476
488
  style: O(e.wrapperStyle)
477
489
  }, [
478
- t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (C(), L("div", {
490
+ t(B)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (C(), L("div", {
479
491
  key: 0,
480
- class: g(e.card ? t(x)("search-wrapper") : null),
492
+ class: y(e.card ? t(T)("search-wrapper") : null),
481
493
  style: O(e.searchFormWrapperStyle)
482
494
  }, [
483
- ie(t(ot).SearchForm, W(e.searchForm || {}, {
495
+ go(t(Zo).SearchForm, W(e.searchForm || {}, {
484
496
  ref_key: "formRef",
485
- ref: S,
497
+ ref: w,
486
498
  "custom-reset": "",
487
499
  "submit-loading": t(J).loading,
488
500
  onSubmit: t(E),
489
501
  onReset: t(P)
490
502
  }), wo({
491
- default: ue(() => [
492
- (C(!0), L(So, null, ho(t($), (l) => (C(), H(Co(l.renderNode), {
503
+ default: ie(() => [
504
+ (C(!0), L(So, null, Co(t($), (l) => (C(), H(yo(l.renderNode), {
493
505
  key: l.dataIndex
494
506
  }))), 128))
495
507
  ]),
@@ -497,85 +509,80 @@ const Zt = /* @__PURE__ */ fo({
497
509
  }, [
498
510
  U.searchFormExtra ? {
499
511
  name: "extra",
500
- fn: ue(() => [
501
- de(e.$slots, "searchFormExtra")
512
+ fn: ie(() => [
513
+ ue(e.$slots, "searchFormExtra")
502
514
  ]),
503
515
  key: "0"
504
516
  } : void 0
505
517
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
506
518
  ], 6)) : se("", !0),
507
- B("div", {
508
- class: g([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
519
+ A("div", {
520
+ class: y([t(T)("table-wrapper"), e.card ? t(T)("table-wrapper-card") : null]),
509
521
  style: O(e.tableWrapperStyle)
510
522
  }, [
511
- B("div", {
512
- class: g(t(d)("header-wrapper"))
523
+ A("div", {
524
+ class: y(t(d)("header-wrapper"))
513
525
  }, [
514
- de(e.$slots, "title", {
526
+ ue(e.$slots, "title", {
515
527
  selectedRows: t(K),
516
- selectedRowKeys: t(Le),
517
- shownColumns: t(w),
528
+ selectedRowKeys: t(Ge),
529
+ shownColumns: t(g),
518
530
  clearAll: z
519
531
  })
520
532
  ], 2),
521
- B("div", {
533
+ A("div", {
522
534
  ref_key: "gridWrapperRef",
523
- ref: Be,
524
- class: g(t(d)("grid-wrapper"))
535
+ ref: Fe,
536
+ class: y(t(d)("grid-wrapper"))
525
537
  }, [
526
- (C(), H(t(qo), W(
527
- t(mt)(t(he), t(j), Qe.value),
538
+ (C(), H(t(_o), W(
539
+ t(dt)(t(Se), t(j), Je.value),
528
540
  {
529
541
  key: t(_),
530
- "get-row-class": mo,
531
- style: to.value,
542
+ "get-row-class": co,
543
+ style: oo.value,
532
544
  "row-data": t(m).records,
533
- "column-defs": t(Fe),
534
- "default-col-def": t(Me),
545
+ "column-defs": t(Me),
546
+ "default-col-def": t(be),
535
547
  "suppress-loading-overlay": "",
536
- "row-selection": je.value,
537
- "selection-column-def": t(Ke),
538
- "get-row-id": lo,
548
+ "row-selection": _e.value,
549
+ "selection-column-def": t(Pe),
550
+ "get-row-id": ro,
539
551
  "get-row-height": o.getRowHeight,
540
- theme: t(Se),
552
+ theme: t(we),
541
553
  "tooltip-show-delay": 500,
542
554
  "enable-browser-tooltips": e.browserTooltips,
543
555
  "tooltip-interaction": "",
544
556
  "row-class-rules": e.rowClassRules,
545
- "no-rows-overlay-component": ht,
557
+ "no-rows-overlay-component": e.emptyComponent ?? St,
558
+ "loading-overlay-component": wt,
559
+ loading: Ze.value,
546
560
  "suppress-cell-focus": "",
547
561
  "enable-cell-span": "",
548
562
  "dom-layout": e.autoHeight ? "autoHeight" : "normal",
549
- "locale-text": fe[t(_)],
550
- onSortChanged: xe,
563
+ "locale-text": pe[t(_)],
564
+ onSortChanged: ke,
551
565
  onGridReady: r[0] || (r[0] = (l) => s.value = l.api),
552
- onRowDataUpdated: A,
553
- onRowSelected: $e,
554
- onFirstDataRendered: qe,
555
- onRowClicked: so,
556
- onBodyScrollEnd: io
566
+ onRowDataUpdated: I,
567
+ onRowSelected: je,
568
+ onFirstDataRendered: $e,
569
+ onRowClicked: no,
570
+ onBodyScrollEnd: so
557
571
  }
558
- ), null, 16, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "get-row-height", "theme", "enable-browser-tooltips", "row-class-rules", "dom-layout", "locale-text"])),
559
- yo(B("div", {
560
- class: g(t(x)("table-loading-wrapper"))
561
- }, [
562
- ie(t(Mo), { delay: 300 })
563
- ], 2), [
564
- [Ro, eo.value]
565
- ])
572
+ ), null, 16, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "get-row-height", "theme", "enable-browser-tooltips", "row-class-rules", "no-rows-overlay-component", "loading", "dom-layout", "locale-text"]))
566
573
  ], 2),
567
- B("div", {
568
- class: g(t(d)("pagination-wrapper"))
574
+ A("div", {
575
+ class: y(t(d)("pagination-wrapper"))
569
576
  }, [
570
- e.pagination !== !1 ? (C(), H(t(Fo), W({
577
+ e.pagination !== !1 ? (C(), H(t(vo), W({
571
578
  key: 0,
572
579
  class: t(d)("pagination")
573
- }, t(J).pagination, { onChange: ro }), null, 16, ["class"])) : se("", !0)
580
+ }, t(J).pagination, { onChange: to }), null, 16, ["class"])) : se("", !0)
574
581
  ], 2)
575
582
  ], 6)
576
583
  ], 6));
577
584
  }
578
585
  });
579
586
  export {
580
- Zt as default
587
+ or as default
581
588
  };