@aplus-frontend/ui 7.14.5 → 7.15.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 (107) hide show
  1. package/es/src/ag-grid/editable/form-item.vue.mjs +8 -7
  2. package/es/src/ag-grid/editable/index.vue.mjs +19 -18
  3. package/es/src/ag-grid/index.vue.mjs +110 -105
  4. package/es/src/ag-grid/interface.d.ts +7 -0
  5. package/es/src/ap-field/checkbox/index.vue.d.ts +1 -1
  6. package/es/src/ap-field/date/index.vue.d.ts +1086 -6
  7. package/es/src/ap-field/date/index.vue.mjs +63 -57
  8. package/es/src/ap-field/date-range/index.vue.d.ts +1155 -4
  9. package/es/src/ap-field/date-range/index.vue.mjs +70 -63
  10. package/es/src/ap-field/interface.d.ts +25 -29
  11. package/es/src/ap-field/number/index.vue.d.ts +1 -1
  12. package/es/src/ap-field/radio/index.vue.d.ts +1 -1
  13. package/es/src/ap-field/rate/index.vue.d.ts +1 -1
  14. package/es/src/ap-field/second/index.vue.d.ts +1 -1
  15. package/es/src/ap-field/select/index.vue.d.ts +3 -2
  16. package/es/src/ap-field/select/index.vue.mjs +116 -104
  17. package/es/src/ap-field/select/read.vue2.mjs +4 -3
  18. package/es/src/ap-field/slider/index.vue.d.ts +1 -1
  19. package/es/src/ap-field/switch/index.vue.d.ts +232 -4
  20. package/es/src/ap-field/switch/index.vue.mjs +48 -42
  21. package/es/src/ap-field/text/password.vue.d.ts +1 -1
  22. package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
  23. package/es/src/ap-form/drawer-form/index.vue.d.ts +1 -0
  24. package/es/src/ap-form/drawer-form/index.vue.mjs +107 -116
  25. package/es/src/ap-form/interface.d.ts +1 -1
  26. package/es/src/ap-form/item-group/index.vue.d.ts +2 -4
  27. package/es/src/ap-form/item-group/index.vue.mjs +37 -42
  28. package/es/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
  29. package/es/src/ap-form/items/checkbox/index.vue.mjs +20 -14
  30. package/es/src/ap-form/items/date/index.vue.d.ts +1497 -5
  31. package/es/src/ap-form/items/date/index.vue.mjs +25 -19
  32. package/es/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
  33. package/es/src/ap-form/items/date-range/index.vue.mjs +25 -19
  34. package/es/src/ap-form/items/number/index.vue.d.ts +4 -4
  35. package/es/src/ap-form/items/radio/index.vue.d.ts +5 -5
  36. package/es/src/ap-form/items/radio/index.vue.mjs +2 -3
  37. package/es/src/ap-form/items/select/index.vue.d.ts +18 -12
  38. package/es/src/ap-form/items/switch/index.vue.d.ts +436 -5
  39. package/es/src/ap-form/items/switch/index.vue.mjs +24 -17
  40. package/es/src/ap-form/items/text/password.vue.d.ts +5 -5
  41. package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  42. package/es/src/ap-table/components/setting/template/item.vue2.mjs +27 -26
  43. package/es/src/ap-table/constants.d.ts +1923 -107
  44. package/es/src/time-ago/index.vue.mjs +21 -17
  45. package/es/src/time-ago/interface.d.ts +8 -0
  46. package/es/src/time-ago/useTimeAgo.d.ts +21 -0
  47. package/es/src/time-ago/useTimeAgo.mjs +36 -34
  48. package/es/src/time-ago/utils.d.ts +11 -0
  49. package/es/src/time-ago/utils.mjs +41 -9
  50. package/es/src/utils/index.d.ts +1 -0
  51. package/es/src/utils/index.mjs +18 -14
  52. package/es/src/version.d.ts +1 -1
  53. package/es/src/version.mjs +1 -1
  54. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  55. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  56. package/lib/src/ag-grid/index.vue.js +1 -1
  57. package/lib/src/ag-grid/interface.d.ts +7 -0
  58. package/lib/src/ap-field/checkbox/index.vue.d.ts +1 -1
  59. package/lib/src/ap-field/date/index.vue.d.ts +1086 -6
  60. package/lib/src/ap-field/date/index.vue.js +1 -1
  61. package/lib/src/ap-field/date-range/index.vue.d.ts +1155 -4
  62. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  63. package/lib/src/ap-field/interface.d.ts +25 -29
  64. package/lib/src/ap-field/number/index.vue.d.ts +1 -1
  65. package/lib/src/ap-field/radio/index.vue.d.ts +1 -1
  66. package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
  67. package/lib/src/ap-field/second/index.vue.d.ts +1 -1
  68. package/lib/src/ap-field/select/index.vue.d.ts +3 -2
  69. package/lib/src/ap-field/select/index.vue.js +1 -1
  70. package/lib/src/ap-field/select/read.vue2.js +1 -1
  71. package/lib/src/ap-field/slider/index.vue.d.ts +1 -1
  72. package/lib/src/ap-field/switch/index.vue.d.ts +232 -4
  73. package/lib/src/ap-field/switch/index.vue.js +1 -1
  74. package/lib/src/ap-field/text/password.vue.d.ts +1 -1
  75. package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
  76. package/lib/src/ap-form/drawer-form/index.vue.d.ts +1 -0
  77. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  78. package/lib/src/ap-form/interface.d.ts +1 -1
  79. package/lib/src/ap-form/item-group/index.vue.d.ts +2 -4
  80. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  81. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
  82. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  83. package/lib/src/ap-form/items/date/index.vue.d.ts +1497 -5
  84. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  85. package/lib/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
  86. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  87. package/lib/src/ap-form/items/number/index.vue.d.ts +4 -4
  88. package/lib/src/ap-form/items/radio/index.vue.d.ts +5 -5
  89. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  90. package/lib/src/ap-form/items/select/index.vue.d.ts +18 -12
  91. package/lib/src/ap-form/items/switch/index.vue.d.ts +436 -5
  92. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  93. package/lib/src/ap-form/items/text/password.vue.d.ts +5 -5
  94. package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  95. package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
  96. package/lib/src/ap-table/constants.d.ts +1923 -107
  97. package/lib/src/time-ago/index.vue.js +1 -1
  98. package/lib/src/time-ago/interface.d.ts +8 -0
  99. package/lib/src/time-ago/useTimeAgo.d.ts +21 -0
  100. package/lib/src/time-ago/useTimeAgo.js +1 -1
  101. package/lib/src/time-ago/utils.d.ts +11 -0
  102. package/lib/src/time-ago/utils.js +1 -1
  103. package/lib/src/utils/index.d.ts +1 -0
  104. package/lib/src/utils/index.js +1 -1
  105. package/lib/src/version.d.ts +1 -1
  106. package/lib/src/version.js +1 -1
  107. package/package.json +5 -5
@@ -124,6 +124,7 @@ const _e = /* @__PURE__ */ A({
124
124
  theme: {},
125
125
  emptyComponent: {},
126
126
  emptyText: {},
127
+ onColumnResized: {},
127
128
  columns: {},
128
129
  defaultValue: {},
129
130
  onChange: {},
@@ -173,10 +174,10 @@ const _e = /* @__PURE__ */ A({
173
174
  getRowData: k,
174
175
  getRowsData: D,
175
176
  setRowData: O,
176
- clear: H,
177
+ clear: z,
177
178
  refreshRowIds: d
178
179
  } = se(o, s, n, i);
179
- function K() {
180
+ function H() {
180
181
  const e = r.value?._internalGridApi;
181
182
  if (!d.value?.length || !e)
182
183
  return;
@@ -195,7 +196,7 @@ const _e = /* @__PURE__ */ A({
195
196
  const a = e === "end" ? n.value.length - 1 : e;
196
197
  r.value?.scrollToRow(a, t);
197
198
  }
198
- function M(e, t) {
199
+ function K(e, t) {
199
200
  r.value?.scrollToColumn(e, t);
200
201
  }
201
202
  return R({
@@ -206,11 +207,11 @@ const _e = /* @__PURE__ */ A({
206
207
  getRowData: k,
207
208
  getRowsData: D,
208
209
  setRowData: O,
209
- clear: H,
210
+ clear: z,
210
211
  setTableData: c,
211
212
  scrollTo: w,
212
213
  scrollToRow: w,
213
- scrollToColumn: M,
214
+ scrollToColumn: K,
214
215
  table: r
215
216
  }), (e, t) => (U(), W($, null, [p(l(h).FormItem, {
216
217
  hidden: "",
@@ -228,12 +229,12 @@ const _e = /* @__PURE__ */ A({
228
229
  columns: l(E),
229
230
  "data-source": n.value,
230
231
  "search-form": !1,
231
- onUpdate: K
232
+ onUpdate: H
232
233
  }), J({
233
234
  _: 2
234
235
  }, [Q(B, (a, m) => ({
235
236
  name: m,
236
- fn: g((z) => [X(e.$slots, m, Y(Z(z || {})))])
237
+ fn: g((M) => [X(e.$slots, m, Y(Z(M || {})))])
237
238
  }))]), 1040, ["class", "columns", "data-source"])]),
238
239
  _: 3
239
240
  }, 8, ["label"])], 64));
@@ -1,5 +1,5 @@
1
- import { defineComponent as M, useSlots as $, ref as b, watch as q, unref as l, createBlock as J, openBlock as Q, withCtx as m, createVNode as v, mergeProps as X, createSlots as Y, renderList as Z, renderSlot as ee, normalizeProps as oe, guardReactiveProps as ae } from "vue";
2
- import { isEqual as te, isArray as R, omit as ne } from "lodash-unified";
1
+ import { defineComponent as M, useSlots as $, ref as R, watch as q, unref as l, createBlock as J, openBlock as Q, withCtx as p, createVNode as b, mergeProps as X, createSlots as Y, renderList as Z, renderSlot as ee, normalizeProps as oe, guardReactiveProps as ae } from "vue";
2
+ import { isEqual as te, isArray as v, omit as ne } from "lodash-unified";
3
3
  import { ApForm as c } from "../../ap-form/index.mjs";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
@@ -10,8 +10,8 @@ import se from "../style/editable.mjs";
10
10
  import { arrayToObject as f, getRowKey as ie } from "./utils.mjs";
11
11
  import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
12
12
  import { useControllableValue as ue } from "../../hooks/useControllableValue.mjs";
13
- import { useGlobalConfig as pe } from "../../config-provider/hooks/use-global-config.mjs";
14
- import me from "../index.vue.mjs";
13
+ import { useGlobalConfig as me } from "../../config-provider/hooks/use-global-config.mjs";
14
+ import pe from "../index.vue.mjs";
15
15
  const Fe = /* @__PURE__ */ M({
16
16
  name: "EditableGrid",
17
17
  __name: "index",
@@ -121,6 +121,7 @@ const Fe = /* @__PURE__ */ M({
121
121
  theme: {},
122
122
  emptyComponent: {},
123
123
  emptyText: {},
124
+ onColumnResized: {},
124
125
  columns: {},
125
126
  value: {},
126
127
  defaultValue: {},
@@ -139,28 +140,28 @@ const Fe = /* @__PURE__ */ M({
139
140
  }) {
140
141
  const S = $(), a = C, {
141
142
  b: T
142
- } = de("editable-aggrid"), F = se("editable-aggrid"), _ = B, i = b(), {
143
+ } = de("editable-aggrid"), F = se("editable-aggrid"), _ = B, i = R(), {
143
144
  value: s,
144
145
  updateValue: y
145
- } = ue(a, _), r = b(), E = c.useWatch(a.name, r);
146
+ } = ue(a, _), r = R(), E = c.useWatch(a.name, r);
146
147
  q(s, (e) => {
147
148
  const o = f(e, a.rowKey);
148
149
  te(o, l(E)) || r.value?.setFieldValue(a.name, o);
149
150
  }, {
150
151
  deep: !0
151
152
  });
152
- const K = pe("valueTypeMap"), k = re(a, K), {
153
+ const K = me("valueTypeMap"), k = re(a, K), {
153
154
  add: A,
154
155
  addMultiple: N,
155
156
  remove: j,
156
157
  removeByKey: I,
157
158
  getRowData: V,
158
159
  getRowsData: D,
159
- setRowData: H,
160
- clear: O,
160
+ setRowData: z,
161
+ clear: H,
161
162
  refreshRowIds: d
162
163
  } = le(a, r, s, y);
163
- function z() {
164
+ function O() {
164
165
  const e = i.value?._internalGridApi;
165
166
  if (!d.value?.length || !e)
166
167
  return;
@@ -174,12 +175,12 @@ const Fe = /* @__PURE__ */ M({
174
175
  r.value?.resetFields();
175
176
  }
176
177
  function w(e) {
177
- return e ? (R(e) ? e : [e]).map((t) => R(t) ? [a.name, ...t] : [a.name, t]) : void 0;
178
+ return e ? (v(e) ? e : [e]).map((t) => v(t) ? [a.name, ...t] : [a.name, t]) : void 0;
178
179
  }
179
180
  function g(e) {
180
181
  try {
181
182
  const o = Object.keys(e), t = s.value.map((n) => ie(n, void 0, a.rowKey));
182
- return o.sort((n, u) => t.findIndex((p) => String(p) === n) - t.findIndex((p) => String(p) === u)), o.map((n) => e[n]);
183
+ return o.sort((n, u) => t.findIndex((m) => String(m) === n) - t.findIndex((m) => String(m) === u)), o.map((n) => e[n]);
183
184
  } catch {
184
185
  return e;
185
186
  }
@@ -214,8 +215,8 @@ const Fe = /* @__PURE__ */ M({
214
215
  removeByKey: I,
215
216
  getRowData: V,
216
217
  getRowsData: D,
217
- setRowData: H,
218
- clear: O,
218
+ setRowData: z,
219
+ clear: H,
219
220
  setTableData: U,
220
221
  scrollTo: h,
221
222
  scrollToRow: h,
@@ -231,11 +232,11 @@ const Fe = /* @__PURE__ */ M({
231
232
  height: "100%"
232
233
  }
233
234
  }, {
234
- default: m(() => [v(l(c).FormItem, {
235
+ default: p(() => [b(l(c).FormItem, {
235
236
  name: e.name,
236
237
  "no-style": ""
237
238
  }, {
238
- default: m(() => [v(me, X(l(ne)(a, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
239
+ default: p(() => [b(pe, X(l(ne)(a, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
239
240
  ref_key: "tableRef",
240
241
  ref: i,
241
242
  class: [l(T)(), l(F)],
@@ -243,12 +244,12 @@ const Fe = /* @__PURE__ */ M({
243
244
  columns: l(k),
244
245
  "data-source": l(s),
245
246
  "search-form": !1,
246
- onUpdate: z
247
+ onUpdate: O
247
248
  }), Y({
248
249
  _: 2
249
250
  }, [Z(S, (t, n) => ({
250
251
  name: n,
251
- fn: m((u) => [ee(e.$slots, n, oe(ae(u || {})))])
252
+ fn: p((u) => [ee(e.$slots, n, oe(ae(u || {})))])
252
253
  }))]), 1040, ["class", "columns", "data-source"])]),
253
254
  _: 3
254
255
  }, 8, ["name"])]),
@@ -1,41 +1,41 @@
1
- import { defineComponent as wo, useSlots as yo, ref as M, toRef as B, computed as n, unref as r, nextTick as A, watch as G, createElementBlock as L, openBlock as C, normalizeStyle as W, normalizeClass as h, createCommentVNode as de, createElementVNode as T, createVNode as Co, mergeProps as H, createSlots as ho, withCtx as ce, Fragment as vo, renderList as Ro, createBlock as U, resolveDynamicComponent as bo, renderSlot as me } from "vue";
2
- import { AG_GRID_LOCALE_EN as Mo, AG_GRID_LOCALE_CN as Bo } from "@ag-grid-community/locale";
3
- import { Pagination as Fo } from "@aplus-frontend/antdv";
4
- import { useToken as ko } from "@aplus-frontend/antdv/es/theme/internal";
5
- import { ModuleRegistry as xo, ValidationModule as Io, ColumnAutoSizeModule as Ao, PinnedRowModule as To, RowAutoHeightModule as No, RowStyleModule as Do, CellSpanModule as Eo, CellStyleModule as Ko, TooltipModule as Oo, RowSelectionModule as Po, LocaleModule as Vo, ValueCacheModule as zo, GridStateModule as Go, ColumnApiModule as Lo, RowApiModule as Wo, CellApiModule as Ho, RenderApiModule as Uo, EventApiModule as _o, ScrollApiModule as jo, ClientSideRowModelApiModule as $o, ClientSideRowModelModule as qo } from "ag-grid-community";
6
- import { AgGridVue as Jo } from "ag-grid-vue3";
1
+ import { defineComponent as Co, useSlots as yo, ref as M, toRef as B, computed as n, unref as r, nextTick as A, watch as G, createElementBlock as L, openBlock as y, normalizeStyle as W, normalizeClass as h, createCommentVNode as de, createElementVNode as T, createVNode as ho, mergeProps as H, createSlots as vo, withCtx as ce, Fragment as Ro, renderList as bo, createBlock as U, resolveDynamicComponent as Mo, renderSlot as me } from "vue";
2
+ import { AG_GRID_LOCALE_EN as Bo, AG_GRID_LOCALE_CN as Fo } from "@ag-grid-community/locale";
3
+ import { Pagination as ko } from "@aplus-frontend/antdv";
4
+ import { useToken as xo } from "@aplus-frontend/antdv/es/theme/internal";
5
+ import { ModuleRegistry as Io, ValidationModule as Ao, ColumnAutoSizeModule as To, PinnedRowModule as No, RowAutoHeightModule as Do, RowStyleModule as Eo, CellSpanModule as zo, CellStyleModule as Ko, TooltipModule as Oo, RowSelectionModule as Po, LocaleModule as Vo, ValueCacheModule as Go, GridStateModule as Lo, ColumnApiModule as Wo, RowApiModule as Ho, CellApiModule as Uo, RenderApiModule as _o, EventApiModule as jo, ScrollApiModule as $o, ClientSideRowModelApiModule as qo, ClientSideRowModelModule as Jo } from "ag-grid-community";
6
+ import { AgGridVue as Qo } from "ag-grid-vue3";
7
7
  import { isUndefined as F, isFunction as N } from "lodash-unified";
8
- import { DEFAULT_ROW_SELECTION_CONFIG as pe, sizeReverseMap as Qo, sizeMap as Xo } from "../ap-grid/constants.mjs";
9
- import { useProvideApTable as Yo } from "../ap-table/context.mjs";
10
- import { useTablePaging as Zo } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
- import { recursionApColumns as et } from "../ap-table/utils.mjs";
8
+ import { DEFAULT_ROW_SELECTION_CONFIG as pe, sizeReverseMap as Xo, sizeMap as Yo } from "../ap-grid/constants.mjs";
9
+ import { useProvideApTable as Zo } from "../ap-table/context.mjs";
10
+ import { useTablePaging as et } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
+ import { recursionApColumns as ot } from "../ap-table/utils.mjs";
12
12
  import "../config-provider/index.mjs";
13
13
  import "../utils/index.mjs";
14
- import { retryUntil as ot } from "../utils/retry.mjs";
15
- import { getValidVNodeList as tt } from "../utils/slot.mjs";
16
- import { ApForm as rt } from "../ap-form/index.mjs";
14
+ import { retryUntil as tt } from "../utils/retry.mjs";
15
+ import { getValidVNodeList as rt } from "../utils/slot.mjs";
16
+ import { ApForm as lt } from "../ap-form/index.mjs";
17
17
  import "./components/empty/index.vue.mjs";
18
18
  import "./components/loading/index.vue.mjs";
19
19
  import "./components/row/index.vue.mjs";
20
- import { useProvideSorter as lt } from "./context.mjs";
21
- import { useColumns as at } from "./hooks/use-columns.mjs";
22
- import { useColumnsDef as nt } from "./hooks/use-columns-def.mjs";
23
- import { usePinnedRow as st } from "./hooks/use-pinned-row.mjs";
24
- import it from "./hooks/use-row-selection.mjs";
25
- import { useSearchForm as ut } from "./hooks/use-search-form.mjs";
26
- import dt from "./hooks/use-selection-col-def.mjs";
27
- import ct from "./hooks/use-virtual-config.mjs";
28
- import mt from "./style/index.mjs";
29
- import { useTheme as pt } from "./theme.mjs";
30
- import { mergeProps as ft } from "./utils.mjs";
31
- import { useNamespace as gt } from "../config-provider/hooks/use-namespace.mjs";
32
- import { useLocale as St } from "../config-provider/hooks/use-locale.mjs";
33
- import { useGlobalConfig as wt } from "../config-provider/hooks/use-global-config.mjs";
20
+ import { useProvideSorter as at } from "./context.mjs";
21
+ import { useColumns as nt } from "./hooks/use-columns.mjs";
22
+ import { useColumnsDef as st } from "./hooks/use-columns-def.mjs";
23
+ import { usePinnedRow as it } from "./hooks/use-pinned-row.mjs";
24
+ import ut from "./hooks/use-row-selection.mjs";
25
+ import { useSearchForm as dt } from "./hooks/use-search-form.mjs";
26
+ import ct from "./hooks/use-selection-col-def.mjs";
27
+ import mt from "./hooks/use-virtual-config.mjs";
28
+ import pt from "./style/index.mjs";
29
+ import { useTheme as ft } from "./theme.mjs";
30
+ import { mergeProps as gt } from "./utils.mjs";
31
+ import { useNamespace as St } from "../config-provider/hooks/use-namespace.mjs";
32
+ import { useLocale as wt } from "../config-provider/hooks/use-locale.mjs";
33
+ import { useGlobalConfig as Ct } from "../config-provider/hooks/use-global-config.mjs";
34
34
  import { isDef as yt } from "../utils/is.mjs";
35
- import Ct from "./components/row/index.vue2.mjs";
36
- import ht from "./components/loading/index.vue2.mjs";
37
- import vt from "./components/empty/index.vue2.mjs";
38
- const ar = /* @__PURE__ */ wo({
35
+ import ht from "./components/row/index.vue2.mjs";
36
+ import vt from "./components/loading/index.vue2.mjs";
37
+ import Rt from "./components/empty/index.vue2.mjs";
38
+ const nr = /* @__PURE__ */ Co({
39
39
  name: "AgGrid",
40
40
  __name: "index",
41
41
  props: {
@@ -111,25 +111,25 @@ const ar = /* @__PURE__ */ wo({
111
111
  customRow: {},
112
112
  theme: {},
113
113
  emptyComponent: {},
114
- emptyText: {}
114
+ emptyText: {},
115
+ onColumnResized: {}
115
116
  },
116
117
  setup(fe, { expose: ge }) {
117
118
  const Se = {
118
- "zh-cn": Bo,
119
- en: Mo
119
+ "zh-cn": Fo,
120
+ en: Bo
120
121
  };
121
- xo.registerModules([
122
- Io,
122
+ Io.registerModules([
123
123
  Ao,
124
124
  To,
125
125
  No,
126
126
  Do,
127
127
  Eo,
128
+ zo,
128
129
  Ko,
129
130
  Oo,
130
131
  Po,
131
132
  Vo,
132
- zo,
133
133
  Go,
134
134
  Lo,
135
135
  Wo,
@@ -138,23 +138,24 @@ const ar = /* @__PURE__ */ wo({
138
138
  _o,
139
139
  jo,
140
140
  $o,
141
- qo
141
+ qo,
142
+ Jo
142
143
  ]);
143
- const o = fe, _ = yo(), { e: D, b: d, be: we } = gt("ag-grid"), { lang: j } = St(), ye = mt("ag-grid"), v = M(o.size), Ce = pt(
144
+ const o = fe, _ = yo(), { e: D, b: d, be: we } = St("ag-grid"), { lang: j } = wt(), Ce = pt("ag-grid"), v = M(o.size), ye = ft(
144
145
  v,
145
146
  B(o, "rowHeight"),
146
147
  B(o, "theme")
147
- ), he = ct(B(o, "virtual")), { rowPinnedGridConfig: $, getRowPinnedCellClass: ve } = st(
148
+ ), he = mt(B(o, "virtual")), { rowPinnedGridConfig: $, getRowPinnedCellClass: ve } = it(
148
149
  B(o, "summary")
149
- ), Re = wt("apGrid"), s = M(), [, be] = ko();
150
+ ), Re = Ct("apGrid"), s = M(), [, be] = xo();
150
151
  let R = !!o.dataSource;
151
- const q = ut(o), {
152
+ const q = dt(o), {
152
153
  shownColumns: S,
153
154
  columns: J,
154
155
  columnKeys: Me,
155
156
  getTargetColumnByKey: Be,
156
157
  defaultSortOrder: k
157
- } = at(o), { defaultColDef: Fe, columnDefs: ke, gridWrapperRef: xe } = nt(J, o, ve), Ie = {
158
+ } = nt(o), { defaultColDef: Fe, columnDefs: ke, gridWrapperRef: xe } = st(J, o, ve), Ie = {
158
159
  asc: "ascend",
159
160
  desc: "descend"
160
161
  }, Q = {
@@ -173,7 +174,7 @@ const ar = /* @__PURE__ */ wo({
173
174
  return t;
174
175
  }
175
176
  const x = M(Ae());
176
- lt({
177
+ at({
177
178
  sorter: x,
178
179
  setSorter(e) {
179
180
  x.value = e;
@@ -196,7 +197,7 @@ const ar = /* @__PURE__ */ wo({
196
197
  order: f ? Ie[f] : null
197
198
  });
198
199
  }
199
- const X = n(() => et(r(S), (e) => {
200
+ const X = n(() => ot(r(S), (e) => {
200
201
  if (e.sorter === !0)
201
202
  return e.field ?? e.dataIndex ?? e.key;
202
203
  }).filter(Boolean)), De = () => {
@@ -206,22 +207,22 @@ const ar = /* @__PURE__ */ wo({
206
207
  return;
207
208
  const t = e.getColumnState()?.map((l) => ({ ...l, sort: null }));
208
209
  e.applyColumnState({ state: t });
209
- }, E = M(!0), Ee = n(() => yt(o.manual) ? o.manual : tt(_.searchFormExtra?.() || []).some((t) => t.type?.name === "ApView")), {
210
+ }, E = M(!0), Ee = n(() => yt(o.manual) ? o.manual : rt(_.searchFormExtra?.() || []).some((t) => t.type?.name === "ApView")), {
210
211
  formRef: w,
211
- submit: K,
212
- reset: O,
212
+ submit: z,
213
+ reset: K,
213
214
  data: m,
214
215
  tableProps: Y,
215
216
  handleTableChangeOptional: Z,
216
217
  submitWith: ee,
217
218
  refresh: oe,
218
- getPaging: Ke,
219
- setPaging: Oe,
220
- setDataSource: Pe,
221
- getLastParams: Ve
222
- } = Zo({
219
+ getPaging: ze,
220
+ setPaging: Ke,
221
+ setDataSource: Oe,
222
+ getLastParams: Pe
223
+ } = et({
223
224
  async request(e) {
224
- if (R = !1, y.value && !y.value.preserveSelectedRowKeys && F(o.dataSource) && !E.value && z(), E.value && (E.value = !1), !F(o.dataSource)) {
225
+ if (R = !1, C.value && !C.value.preserveSelectedRowKeys && F(o.dataSource) && !E.value && V(), E.value && (E.value = !1), !F(o.dataSource)) {
225
226
  const l = e.pageSize * (e.current - 1);
226
227
  return {
227
228
  data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(l, l + e.pageSize)) || [],
@@ -244,33 +245,33 @@ const ar = /* @__PURE__ */ wo({
244
245
  sortFields: X,
245
246
  onClickReset: De,
246
247
  defaultSortOrder: Te()
247
- }), y = n(() => {
248
+ }), C = n(() => {
248
249
  const e = o.rowSelection || Re.value?.rowSelection;
249
250
  if (e)
250
251
  return e === !0 ? pe : {
251
252
  ...pe,
252
253
  ...e
253
254
  };
254
- }), ze = dt(o, S), Ge = n(
255
+ }), Ve = ct(o, S), Ge = n(
255
256
  () => F(o.dataSource) ? m.records : o.dataSource
256
257
  ), {
257
258
  select: Le,
258
259
  unSelect: We,
259
- selectedRows: P,
260
+ selectedRows: O,
260
261
  selectedRowKeys: He,
261
262
  clearAll: Ue,
262
263
  selectMultiByKeys: _e,
263
264
  selectMulti: je,
264
265
  unSelectMulti: $e
265
- } = it({
266
- ...y.value,
266
+ } = ut({
267
+ ...C.value,
267
268
  dataSource: Ge,
268
269
  rowKey: o.rowKey
269
270
  }), qe = {
270
271
  checkbox: "multiRow",
271
272
  radio: "singleRow"
272
273
  }, Je = n(() => {
273
- const e = y.value;
274
+ const e = C.value;
274
275
  if (!e)
275
276
  return;
276
277
  const { type: t = "checkbox", disabled: l } = e;
@@ -280,25 +281,25 @@ const ar = /* @__PURE__ */ wo({
280
281
  hideDisabledCheckboxes: e.hideDisabled ?? !1
281
282
  };
282
283
  });
283
- function V(e) {
284
+ function P(e) {
284
285
  return N(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
285
286
  }
286
287
  const I = ({
287
288
  api: e = s.value
288
289
  }) => {
289
- if (o.onUpdate?.(), !y.value)
290
+ if (o.onUpdate?.(), !C.value)
290
291
  return;
291
- const t = P.value || [];
292
+ const t = O.value || [];
292
293
  R = !1;
293
294
  const l = [];
294
295
  e.forEachNode((u) => {
295
- const p = u.data, i = V(p), f = u.isSelected();
296
- t.find((g) => V(g) === i) ? !f && l.push(u) : f && u.setSelected(!1);
296
+ const p = u.data, i = P(p), f = u.isSelected();
297
+ t.find((g) => P(g) === i) ? !f && l.push(u) : f && u.setSelected(!1);
297
298
  }), e.setNodesSelected({ nodes: l, newValue: !0 }), setTimeout(() => {
298
299
  R = !0;
299
300
  }, 0);
300
301
  }, Qe = (e) => {
301
- R && (e.node.isSelected() ? Le(e.data) : We(e.data), N(y.value?.tooltip) && e.api.refreshCells({
302
+ R && (e.node.isSelected() ? Le(e.data) : We(e.data), N(C.value?.tooltip) && e.api.refreshCells({
302
303
  rowNodes: [e.node],
303
304
  // todo: 取消硬编码
304
305
  columns: ["ag-Grid-SelectionColumn"],
@@ -316,7 +317,7 @@ const ar = /* @__PURE__ */ wo({
316
317
  e.applyColumnState({
317
318
  state: p
318
319
  });
319
- }, z = () => {
320
+ }, V = () => {
320
321
  Ue(), s.value?.deselectAll();
321
322
  };
322
323
  function Ye(e) {
@@ -328,7 +329,7 @@ const ar = /* @__PURE__ */ wo({
328
329
  const e = o.customRow;
329
330
  return e ? {
330
331
  isFullWidthRow: e.isCustomRow,
331
- fullWidthCellRenderer: Ct,
332
+ fullWidthCellRenderer: ht,
332
333
  fullWidthCellRendererParams: {
333
334
  render: e.render
334
335
  }
@@ -374,7 +375,7 @@ const ar = /* @__PURE__ */ wo({
374
375
  ...a,
375
376
  hide: b
376
377
  }, ue = e.find(
377
- (So) => se(So.key) === a.colId
378
+ (wo) => se(wo.key) === a.colId
378
379
  );
379
380
  return ue && (ie.pinned = ue.fixed || null), ie;
380
381
  }), i = new Map(
@@ -390,12 +391,12 @@ const ar = /* @__PURE__ */ wo({
390
391
  applyOrder: !0
391
392
  });
392
393
  }
393
- Yo({
394
+ Zo({
394
395
  columns: n(() => S.value),
395
396
  columnsBackup: n(() => J.value),
396
- size: n(() => Xo[v.value]),
397
+ size: n(() => Yo[v.value]),
397
398
  updateColumns(e) {
398
- S.value = e, o.onShownColumnsChange?.(e), ot(
399
+ S.value = e, o.onShownColumnsChange?.(e), tt(
399
400
  () => s.value,
400
401
  () => {
401
402
  to(e);
@@ -406,7 +407,7 @@ const ar = /* @__PURE__ */ wo({
406
407
  );
407
408
  },
408
409
  updateSize(e) {
409
- v.value = Qo[e];
410
+ v.value = Xo[e];
410
411
  },
411
412
  renderConfig: n(() => ({
412
413
  className: we("table-header", "title"),
@@ -415,14 +416,14 @@ const ar = /* @__PURE__ */ wo({
415
416
  dataSource: n(() => r(m).records),
416
417
  getSearchFormValues: te,
417
418
  setSearchFormValues: re,
418
- submit: K,
419
+ submit: z,
419
420
  submitWith: ee,
420
- reset: O,
421
+ reset: K,
421
422
  refresh: oe,
422
423
  getSearchFormSorterItems: le,
423
424
  setSearchFormSorterItems: ae,
424
425
  resetSearchFormSorterItems: ne,
425
- getLastParams: Ve
426
+ getLastParams: Pe
426
427
  });
427
428
  const ro = n(
428
429
  () => F(o.loading) ? m.loading : o.loading
@@ -432,7 +433,7 @@ const ar = /* @__PURE__ */ wo({
432
433
  d("adaptive"),
433
434
  d(`size-${v.value}`),
434
435
  o.autoHeight && m.records.length ? d("auto-height") : null,
435
- ye.value
436
+ Ce.value
436
437
  ].filter(Boolean)), ao = n(() => ({
437
438
  height: "100%",
438
439
  ...o.tableStyle || {}
@@ -441,7 +442,7 @@ const ar = /* @__PURE__ */ wo({
441
442
  };
442
443
  function so(e) {
443
444
  const t = e.data;
444
- return V(t);
445
+ return P(t);
445
446
  }
446
447
  function io(e, t) {
447
448
  (N(e) ? s.value?.ensureNodeVisible : s.value?.ensureIndexVisible)?.(e, t);
@@ -461,7 +462,10 @@ const ar = /* @__PURE__ */ wo({
461
462
  function fo(e) {
462
463
  return s.value?.redrawRows(e);
463
464
  }
464
- const go = (e) => {
465
+ function go({ finished: e, column: t }) {
466
+ !e || !t || o.onColumnResized?.(t.getColId(), t.getActualWidth());
467
+ }
468
+ const So = (e) => {
465
469
  const t = [
466
470
  $.value.getRowClass?.(e)
467
471
  ];
@@ -475,7 +479,7 @@ const ar = /* @__PURE__ */ wo({
475
479
  () => o.dataSource,
476
480
  (e) => {
477
481
  A(() => {
478
- Pe(e);
482
+ Oe(e);
479
483
  });
480
484
  },
481
485
  { immediate: !0, deep: !0 }
@@ -490,50 +494,50 @@ const ar = /* @__PURE__ */ wo({
490
494
  o.onLoadingChange?.(e);
491
495
  }
492
496
  ), ge({
493
- submit: K,
494
- reset: O,
497
+ submit: z,
498
+ reset: K,
495
499
  refresh: oe,
496
500
  submitWith: ee,
497
501
  setSearchFormValues: re,
498
502
  getSearchFormValues: te,
499
503
  getShowColumns: () => r(S),
500
504
  rowSelection: {
501
- selectedRows: n(() => P.value),
505
+ selectedRows: n(() => O.value),
502
506
  setSelectedRowKeys: Ye,
503
507
  setSelectedRows: eo,
504
- clearAll: z,
508
+ clearAll: V,
505
509
  unSelectRows: oo
506
510
  },
507
511
  scrollToRow: io,
508
512
  scrollToColumn: uo,
509
513
  getDataSource: () => r(m.records),
510
- getPaging: Ke,
511
- setPaging: Oe,
514
+ getPaging: ze,
515
+ setPaging: Ke,
512
516
  getSearchFormSorterItems: le,
513
517
  setSearchFormSorterItems: ae,
514
518
  resetSearchFormSorterItems: ne,
515
519
  refreshCells: po,
516
520
  redrawRows: fo,
517
521
  _internalGridApi: n(() => s.value)
518
- }), (e, t) => (C(), L("div", {
522
+ }), (e, t) => (y(), L("div", {
519
523
  class: h(lo.value),
520
524
  style: W(e.wrapperStyle)
521
525
  }, [
522
- r(F)(e.dataSource) && e.searchForm !== !1 && r(q).length > 0 ? (C(), L("div", {
526
+ r(F)(e.dataSource) && e.searchForm !== !1 && r(q).length > 0 ? (y(), L("div", {
523
527
  key: 0,
524
528
  class: h(e.card ? r(D)("search-wrapper") : null),
525
529
  style: W(e.searchFormWrapperStyle)
526
530
  }, [
527
- Co(r(rt).SearchForm, H(e.searchForm || {}, {
531
+ ho(r(lt).SearchForm, H(e.searchForm || {}, {
528
532
  ref_key: "formRef",
529
533
  ref: w,
530
534
  "custom-reset": "",
531
535
  "submit-loading": r(Y).loading,
532
- onSubmit: r(K),
533
- onReset: r(O)
534
- }), ho({
536
+ onSubmit: r(z),
537
+ onReset: r(K)
538
+ }), vo({
535
539
  default: ce(() => [
536
- (C(!0), L(vo, null, Ro(r(q), (l) => (C(), U(bo(l.renderNode), {
540
+ (y(!0), L(Ro, null, bo(r(q), (l) => (y(), U(Mo(l.renderNode), {
537
541
  key: l.dataIndex
538
542
  }))), 128))
539
543
  ]),
@@ -556,10 +560,10 @@ const ar = /* @__PURE__ */ wo({
556
560
  class: h(r(d)("header-wrapper"))
557
561
  }, [
558
562
  me(e.$slots, "title", {
559
- selectedRows: r(P),
563
+ selectedRows: r(O),
560
564
  selectedRowKeys: r(He),
561
565
  shownColumns: r(S),
562
- clearAll: z
566
+ clearAll: V
563
567
  })
564
568
  ], 2),
565
569
  T("div", {
@@ -567,28 +571,28 @@ const ar = /* @__PURE__ */ wo({
567
571
  ref: xe,
568
572
  class: h(r(d)("grid-wrapper"))
569
573
  }, [
570
- (C(), U(r(Jo), H(
571
- r(ft)(r(he), r($), Ze.value),
574
+ (y(), U(r(Qo), H(
575
+ r(gt)(r(he), r($), Ze.value),
572
576
  {
573
577
  key: r(j),
574
- "get-row-class": go,
578
+ "get-row-class": So,
575
579
  style: ao.value,
576
580
  "row-data": r(m).records,
577
581
  "column-defs": r(ke),
578
582
  "default-col-def": r(Fe),
579
583
  "suppress-loading-overlay": "",
580
584
  "row-selection": Je.value,
581
- "selection-column-def": r(ze),
585
+ "selection-column-def": r(Ve),
582
586
  "get-row-id": so,
583
587
  "get-row-height": o.getRowHeight,
584
- theme: r(Ce),
588
+ theme: r(ye),
585
589
  "tooltip-show-delay": 500,
586
590
  "enable-browser-tooltips": e.browserTooltips,
587
591
  "tooltip-interaction": "",
588
592
  "row-class-rules": e.rowClassRules,
589
- "no-rows-overlay-component": vt,
593
+ "no-rows-overlay-component": Rt,
590
594
  "no-rows-overlay-component-params": { emptyComponent: e.emptyComponent, emptyText: e.emptyText },
591
- "loading-overlay-component": ht,
595
+ "loading-overlay-component": vt,
592
596
  loading: ro.value,
593
597
  "suppress-cell-focus": "",
594
598
  "tab-to-next-cell": () => !1,
@@ -601,14 +605,15 @@ const ar = /* @__PURE__ */ wo({
601
605
  onRowSelected: Qe,
602
606
  onFirstDataRendered: Xe,
603
607
  onRowClicked: co,
604
- onBodyScrollEnd: mo
608
+ onBodyScrollEnd: mo,
609
+ onColumnResized: go
605
610
  }
606
611
  ), 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-params", "loading", "dom-layout", "locale-text"]))
607
612
  ], 2),
608
613
  T("div", {
609
614
  class: h(r(d)("pagination-wrapper"))
610
615
  }, [
611
- e.pagination !== !1 ? (C(), U(r(Fo), H({
616
+ e.pagination !== !1 ? (y(), U(r(ko), H({
612
617
  key: 0,
613
618
  class: r(d)("pagination")
614
619
  }, r(Y).pagination, { onChange: no }), null, 16, ["class"])) : de("", !0)
@@ -618,5 +623,5 @@ const ar = /* @__PURE__ */ wo({
618
623
  }
619
624
  });
620
625
  export {
621
- ar as default
626
+ nr as default
622
627
  };