@aplus-frontend/ui 7.8.0 → 7.9.0

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 (105) hide show
  1. package/es/index.mjs +26 -24
  2. package/es/src/ag-grid/index.vue.mjs +53 -52
  3. package/es/src/ag-grid/style/index.mjs +9 -4
  4. package/es/src/ap-table/style/index.d.ts +2 -2
  5. package/es/src/ap-table/style/index.mjs +3 -3
  6. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +20 -19
  7. package/es/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +9 -0
  8. package/es/src/business/ag-grid-modal/hooks/use-modal-title.mjs +14 -10
  9. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +73 -71
  10. package/es/src/index.d.ts +1 -0
  11. package/es/src/index.mjs +288 -286
  12. package/es/src/skeleton/components/desc/index.vue.d.ts +6 -0
  13. package/es/src/skeleton/components/desc/index.vue.mjs +4 -0
  14. package/es/src/skeleton/components/desc/index.vue2.mjs +37 -0
  15. package/es/src/skeleton/components/desc/item-large.vue.d.ts +6 -0
  16. package/es/src/skeleton/components/desc/item-large.vue.mjs +4 -0
  17. package/es/src/skeleton/components/desc/item-large.vue2.mjs +72 -0
  18. package/es/src/skeleton/components/desc/item.vue.d.ts +7 -0
  19. package/es/src/skeleton/components/desc/item.vue.mjs +4 -0
  20. package/es/src/skeleton/components/desc/item.vue2.mjs +69 -0
  21. package/es/src/skeleton/components/line/index.d.ts +14 -0
  22. package/es/src/skeleton/components/line/index.mjs +26 -0
  23. package/es/src/skeleton/components/list/index.vue.d.ts +10 -0
  24. package/es/src/skeleton/components/list/index.vue.mjs +4 -0
  25. package/es/src/skeleton/components/list/index.vue2.mjs +49 -0
  26. package/es/src/skeleton/components/list/item.vue.d.ts +6 -0
  27. package/es/src/skeleton/components/list/item.vue.mjs +4 -0
  28. package/es/src/skeleton/components/list/item.vue2.mjs +57 -0
  29. package/es/src/skeleton/components/page-header/index.vue.d.ts +6 -0
  30. package/es/src/skeleton/components/page-header/index.vue.mjs +4 -0
  31. package/es/src/skeleton/components/page-header/index.vue2.mjs +24 -0
  32. package/es/src/skeleton/components/search-form/index.vue.d.ts +6 -0
  33. package/es/src/skeleton/components/search-form/index.vue.mjs +4 -0
  34. package/es/src/skeleton/components/search-form/index.vue2.mjs +99 -0
  35. package/es/src/skeleton/components/table/index.vue.d.ts +11 -0
  36. package/es/src/skeleton/components/table/index.vue.mjs +4 -0
  37. package/es/src/skeleton/components/table/index.vue2.mjs +78 -0
  38. package/es/src/skeleton/components/table/item.vue.d.ts +9 -0
  39. package/es/src/skeleton/components/table/item.vue.mjs +4 -0
  40. package/es/src/skeleton/components/table/item.vue2.mjs +80 -0
  41. package/es/src/skeleton/descriptions.vue.d.ts +8 -0
  42. package/es/src/skeleton/descriptions.vue.mjs +4 -0
  43. package/es/src/skeleton/descriptions.vue2.mjs +37 -0
  44. package/es/src/skeleton/index.d.ts +9 -0
  45. package/es/src/skeleton/index.mjs +12 -0
  46. package/es/src/skeleton/interface.d.ts +12 -0
  47. package/es/src/skeleton/interface.mjs +1 -0
  48. package/es/src/skeleton/list-page.vue.d.ts +10 -0
  49. package/es/src/skeleton/list-page.vue.mjs +4 -0
  50. package/es/src/skeleton/list-page.vue2.mjs +50 -0
  51. package/es/src/version.d.ts +1 -1
  52. package/es/src/version.mjs +1 -1
  53. package/lib/index.js +1 -1
  54. package/lib/src/ag-grid/index.vue.js +1 -1
  55. package/lib/src/ag-grid/style/index.js +1 -1
  56. package/lib/src/ap-table/style/index.d.ts +2 -2
  57. package/lib/src/ap-table/style/index.js +1 -1
  58. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
  59. package/lib/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +9 -0
  60. package/lib/src/business/ag-grid-modal/hooks/use-modal-title.js +1 -1
  61. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  62. package/lib/src/index.d.ts +1 -0
  63. package/lib/src/index.js +1 -1
  64. package/lib/src/skeleton/components/desc/index.vue.d.ts +6 -0
  65. package/lib/src/skeleton/components/desc/index.vue.js +1 -0
  66. package/lib/src/skeleton/components/desc/index.vue2.js +1 -0
  67. package/lib/src/skeleton/components/desc/item-large.vue.d.ts +6 -0
  68. package/lib/src/skeleton/components/desc/item-large.vue.js +1 -0
  69. package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -0
  70. package/lib/src/skeleton/components/desc/item.vue.d.ts +7 -0
  71. package/lib/src/skeleton/components/desc/item.vue.js +1 -0
  72. package/lib/src/skeleton/components/desc/item.vue2.js +1 -0
  73. package/lib/src/skeleton/components/line/index.d.ts +14 -0
  74. package/lib/src/skeleton/components/line/index.js +1 -0
  75. package/lib/src/skeleton/components/list/index.vue.d.ts +10 -0
  76. package/lib/src/skeleton/components/list/index.vue.js +1 -0
  77. package/lib/src/skeleton/components/list/index.vue2.js +1 -0
  78. package/lib/src/skeleton/components/list/item.vue.d.ts +6 -0
  79. package/lib/src/skeleton/components/list/item.vue.js +1 -0
  80. package/lib/src/skeleton/components/list/item.vue2.js +1 -0
  81. package/lib/src/skeleton/components/page-header/index.vue.d.ts +6 -0
  82. package/lib/src/skeleton/components/page-header/index.vue.js +1 -0
  83. package/lib/src/skeleton/components/page-header/index.vue2.js +1 -0
  84. package/lib/src/skeleton/components/search-form/index.vue.d.ts +6 -0
  85. package/lib/src/skeleton/components/search-form/index.vue.js +1 -0
  86. package/lib/src/skeleton/components/search-form/index.vue2.js +1 -0
  87. package/lib/src/skeleton/components/table/index.vue.d.ts +11 -0
  88. package/lib/src/skeleton/components/table/index.vue.js +1 -0
  89. package/lib/src/skeleton/components/table/index.vue2.js +1 -0
  90. package/lib/src/skeleton/components/table/item.vue.d.ts +9 -0
  91. package/lib/src/skeleton/components/table/item.vue.js +1 -0
  92. package/lib/src/skeleton/components/table/item.vue2.js +1 -0
  93. package/lib/src/skeleton/descriptions.vue.d.ts +8 -0
  94. package/lib/src/skeleton/descriptions.vue.js +1 -0
  95. package/lib/src/skeleton/descriptions.vue2.js +1 -0
  96. package/lib/src/skeleton/index.d.ts +9 -0
  97. package/lib/src/skeleton/index.js +1 -0
  98. package/lib/src/skeleton/interface.d.ts +12 -0
  99. package/lib/src/skeleton/interface.js +1 -0
  100. package/lib/src/skeleton/list-page.vue.d.ts +10 -0
  101. package/lib/src/skeleton/list-page.vue.js +1 -0
  102. package/lib/src/skeleton/list-page.vue2.js +1 -0
  103. package/lib/src/version.d.ts +1 -1
  104. package/lib/src/version.js +1 -1
  105. package/package.json +3 -3
package/es/index.mjs CHANGED
@@ -8,7 +8,7 @@ import { buildLocaleContext as T, buildTranslator as b, localeContextKey as C, t
8
8
  import { defaultNamespace as E, namespaceContextKey as P, useGetDerivedNamespace as L, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
9
9
  import { ConfigProvider as v, globalConfigCached as M } from "./src/config-provider/config-provider.mjs";
10
10
  import { APConfigProvider as w } from "./src/config-provider/index.mjs";
11
- import { ApFormItemText as K } from "./src/ap-form/items/text/index.mjs";
11
+ import { ApFormItemText as k } from "./src/ap-form/items/text/index.mjs";
12
12
  import { default as U } from "./src/ap-form/items/text-area/index.vue.mjs";
13
13
  import { default as V } from "./src/ap-form/items/number/index.vue.mjs";
14
14
  import { default as _ } from "./src/ap-form/items/date/index.vue.mjs";
@@ -35,7 +35,7 @@ import { ApField as Le, ApFieldRead as Re } from "./src/ap-field/index.mjs";
35
35
  import { ApFieldText as ve } from "./src/ap-field/text/index.mjs";
36
36
  import { default as ye } from "./src/ap-field/checkbox/index.vue.mjs";
37
37
  import { default as Be } from "./src/ap-field/date/index.vue.mjs";
38
- import { default as ke } from "./src/ap-field/number/index.vue.mjs";
38
+ import { default as Ke } from "./src/ap-field/number/index.vue.mjs";
39
39
  import { default as Oe } from "./src/ap-field/radio/index.vue.mjs";
40
40
  import { default as ze } from "./src/ap-field/switch/index.vue.mjs";
41
41
  import { default as He } from "./src/ap-field/text-area/index.vue.mjs";
@@ -61,7 +61,7 @@ import { default as Ro } from "./src/ap-button/ap-button.vue.mjs";
61
61
  import { default as vo } from "./src/ap-button/ap-action-button.vue.mjs";
62
62
  import { default as yo } from "./src/ap-button/ap-confirm-button.vue.mjs";
63
63
  import { ApDrawer as Bo } from "./src/ap-drawer/index.mjs";
64
- import { ApProCard as ko, ApStatisticCard as Uo } from "./src/ap-pro-card/index.mjs";
64
+ import { ApProCard as Ko, ApStatisticCard as Uo } from "./src/ap-pro-card/index.mjs";
65
65
  import { LoadingBar as Vo } from "./src/loading-bar/index.mjs";
66
66
  import { default as _o } from "./src/render/render.mjs";
67
67
  import { default as $o } from "./src/time-ago/index.vue.mjs";
@@ -87,7 +87,7 @@ import { ApLabel as Lr, ApLabelGroup as Rr } from "./src/business/ap-label/index
87
87
  import { locales as vr } from "./src/business/ap-ladder/interface.mjs";
88
88
  import { ApLadder as yr } from "./src/business/ap-ladder/index.mjs";
89
89
  import { ApSelectLayout as Br } from "./src/business/ap-select-layout/index.mjs";
90
- import { ApStatus as kr, ApStatusGroup as Ur } from "./src/business/ap-status/index.mjs";
90
+ import { ApStatus as Kr, ApStatusGroup as Ur } from "./src/business/ap-status/index.mjs";
91
91
  import { ApTitle as Vr } from "./src/business/ap-title/index.mjs";
92
92
  import { usePageListApTable as _r } from "./src/business/hooks/usePageListApTable.mjs";
93
93
  import { usePageListApGrid as $r } from "./src/business/hooks/usePageListApGrid.mjs";
@@ -111,7 +111,7 @@ import { LruCacher as Lt } from "./src/business/ap-keep-alive/cacher/lru-cacher.
111
111
  import { useApKeepAliveInject as Nt } from "./src/business/ap-keep-alive/hook.mjs";
112
112
  import { matches as Mt } from "./src/business/ap-keep-alive/utils.mjs";
113
113
  import { ApDraggableGrid as wt } from "./src/business/ap-draggable-grid/index.mjs";
114
- import { ApValueSelectCard as Kt } from "./src/business/ap-value-select-card/index.mjs";
114
+ import { ApValueSelectCard as kt } from "./src/business/ap-value-select-card/index.mjs";
115
115
  import { useAgGridModal as Ut } from "./src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs";
116
116
  import { useAgGridSelectModal as Vt } from "./src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs";
117
117
  import { ApSelectedItems as _t } from "./src/business/ag-grid-modal/selected-items/index.mjs";
@@ -138,7 +138,7 @@ import { ROW_SELECTION_FIELD as Lp } from "./src/ap-grid/constants.mjs";
138
138
  import { toTreeArray as Np } from "./src/ap-grid/utils/to-tree-array.mjs";
139
139
  import { default as Mp } from "./src/ap-grid/index.vue.mjs";
140
140
  import { default as wp } from "./src/ap-grid/editable/index.vue.mjs";
141
- import { default as Kp } from "./src/ap-grid/editable/form-item.vue.mjs";
141
+ import { default as kp } from "./src/ap-grid/editable/form-item.vue.mjs";
142
142
  import { default as Up } from "./src/text/index.vue.mjs";
143
143
  import { default as Vp } from "./src/text/group.vue.mjs";
144
144
  import { default as _p } from "./src/mask/index.vue.mjs";
@@ -146,12 +146,13 @@ import { Splitter as $p } from "./src/splitter/index.mjs";
146
146
  import { default as Wp } from "./src/ag-grid/index.vue.mjs";
147
147
  import { default as Jp } from "./src/ag-grid/editable/index.vue.mjs";
148
148
  import { default as Xp } from "./src/ag-grid/editable/form-item.vue.mjs";
149
- import { useMessage as Zp } from "./src/hooks/useMessage.mjs";
150
- import { useControllableValue as oa } from "./src/hooks/useControllableValue.mjs";
151
- import { useManualRef as ta } from "./src/hooks/useManualRef.mjs";
152
- import { useThrottleRef as aa } from "./src/hooks/useThrottleRef.mjs";
153
- import { useFullScreen as ma } from "./src/hooks/useFullScreen.mjs";
154
- import { useResize as xa } from "./src/hooks/useResize.mjs";
149
+ import { ApSkeleton as Zp } from "./src/skeleton/index.mjs";
150
+ import { useMessage as oa } from "./src/hooks/useMessage.mjs";
151
+ import { useControllableValue as ta } from "./src/hooks/useControllableValue.mjs";
152
+ import { useManualRef as aa } from "./src/hooks/useManualRef.mjs";
153
+ import { useThrottleRef as ma } from "./src/hooks/useThrottleRef.mjs";
154
+ import { useFullScreen as xa } from "./src/hooks/useFullScreen.mjs";
155
+ import { useResize as sa } from "./src/hooks/useResize.mjs";
155
156
  const a = console.log;
156
157
  a(`UI version: ${p}`);
157
158
  const l = {
@@ -192,7 +193,7 @@ export {
192
193
  ye as ApFieldCheckbox,
193
194
  Be as ApFieldDate,
194
195
  je as ApFieldDateRange,
195
- ke as ApFieldNumber,
196
+ Ke as ApFieldNumber,
196
197
  Qe as ApFieldPassword,
197
198
  Oe as ApFieldRadio,
198
199
  ro as ApFieldRate,
@@ -221,7 +222,7 @@ export {
221
222
  J as ApFormItemSelect,
222
223
  it as ApFormItemSizeInput,
223
224
  X as ApFormItemSwitch,
224
- K as ApFormItemText,
225
+ k as ApFormItemText,
225
226
  U as ApFormItemTextArea,
226
227
  oe as ApFormItemTextPassword,
227
228
  te as ApFormItemTreeSelect,
@@ -241,14 +242,15 @@ export {
241
242
  Po as ApList,
242
243
  ho as ApModal,
243
244
  rt as ApNeedNameKeyDefault,
244
- ko as ApProCard,
245
+ Ko as ApProCard,
245
246
  ct as ApProductInfo,
246
247
  bt as ApRadioGroup,
247
248
  Br as ApSelectLayout,
248
249
  _t as ApSelectedItems,
249
250
  ut as ApSizeInput,
251
+ Zp as ApSkeleton,
250
252
  Uo as ApStatisticCard,
251
- kr as ApStatus,
253
+ Kr as ApStatus,
252
254
  Ur as ApStatusGroup,
253
255
  et as ApSummary,
254
256
  xp as ApTable,
@@ -261,7 +263,7 @@ export {
261
263
  Xo as ApTransformDataHelper,
262
264
  Xt as ApUpload,
263
265
  ft as ApUploadSingle,
264
- Kt as ApValueSelectCard,
266
+ kt as ApValueSelectCard,
265
267
  St as ApView,
266
268
  lt as BatchInputGroup,
267
269
  bo as CheckCard,
@@ -272,7 +274,7 @@ export {
272
274
  Jp as EditableAgGrid,
273
275
  Xp as EditableAgGridFormItem,
274
276
  wp as EditableGrid,
275
- Kp as EditableGridFormItem,
277
+ kp as EditableGridFormItem,
276
278
  sp as EditableTable,
277
279
  Ap as EditableTableFormItem,
278
280
  Dp as FullScreen,
@@ -319,21 +321,21 @@ export {
319
321
  Ut as useAgGridModal,
320
322
  Vt as useAgGridSelectModal,
321
323
  Nt as useApKeepAliveInject,
322
- oa as useControllableValue,
323
- ma as useFullScreen,
324
+ ta as useControllableValue,
325
+ xa as useFullScreen,
324
326
  L as useGetDerivedNamespace,
325
327
  I as useGlobalConfig,
326
328
  D as useLocale,
327
- ta as useManualRef,
328
- Zp as useMessage,
329
+ aa as useManualRef,
330
+ oa as useMessage,
329
331
  R as useNamespace,
330
332
  Wr as usePageListAgGrid,
331
333
  $r as usePageListApGrid,
332
334
  _r as usePageListApTable,
333
- xa as useResize,
335
+ sa as useResize,
334
336
  or as useTableModal,
335
337
  mp as useTablePaging,
336
338
  tr as useTableSelectModal,
337
- aa as useThrottleRef,
339
+ ma as useThrottleRef,
338
340
  Wo as useTimeAgo
339
341
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as z, watch as G, createElementBlock as O, openBlock as h, normalizeStyle as L, normalizeClass as f, createCommentVNode as se, createElementVNode as B, createVNode as ie, mergeProps as W, createSlots as go, withCtx as ue, Fragment as wo, renderList as So, createBlock as H, resolveDynamicComponent as Co, renderSlot as de, withDirectives as ho, vShow as yo } from "vue";
1
+ import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as z, watch as G, createElementBlock as O, openBlock as C, normalizeStyle as L, normalizeClass as g, createCommentVNode as se, createElementVNode as B, createVNode as ie, mergeProps as W, createSlots as go, withCtx as ue, Fragment as wo, renderList as So, createBlock as H, resolveDynamicComponent as ho, renderSlot as de, withDirectives as Co, vShow as yo } from "vue";
2
2
  import { AgGridVue as Ro } from "ag-grid-vue3";
3
3
  import { ModuleRegistry as vo, ValidationModule as bo, ColumnAutoSizeModule as Mo, PinnedRowModule as Fo, RowAutoHeightModule as Bo, RowStyleModule as ko, CellSpanModule as xo, CellStyleModule as Io, TooltipModule as Ao, RowSelectionModule as No, LocaleModule as To, ValueCacheModule as Do, GridStateModule as Eo, ColumnApiModule as Po, RowApiModule as Ko, CellApiModule as Vo, RenderApiModule as zo, EventApiModule as Go, ScrollApiModule as Oo, ClientSideRowModelApiModule as Lo, ClientSideRowModelModule as Wo } from "ag-grid-community";
4
4
  import { mergeProps as Ho } from "./utils.mjs";
@@ -139,11 +139,11 @@ const Yt = /* @__PURE__ */ po({
139
139
  y,
140
140
  F(o, "rowHeight"),
141
141
  F(o, "theme")
142
- ), Ce = nt(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: he } = st(
142
+ ), he = nt(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: Ce } = st(
143
143
  F(o, "summary")
144
144
  ), ye = ft("apGrid"), s = M(), [, Re] = et();
145
145
  let R = !!o.dataSource;
146
- const $ = at(o), { shownColumns: g, columns: q, columnKeys: ve, getTargetColumnByKey: be } = tt(o), { defaultColDef: Me, columnDefs: Fe, gridWrapperRef: Be } = rt(q, o, he), I = M({});
146
+ const $ = at(o), { shownColumns: w, columns: q, columnKeys: ve, getTargetColumnByKey: be } = tt(o), { defaultColDef: Me, columnDefs: Fe, gridWrapperRef: Be } = rt(q, o, Ce), I = M({});
147
147
  Qo({
148
148
  sorter: I,
149
149
  setSorter(e) {
@@ -164,14 +164,14 @@ const Yt = /* @__PURE__ */ po({
164
164
  }
165
165
  if (!l)
166
166
  return;
167
- const u = l.getColDef(), m = l.getSort(), p = be(u.colId);
167
+ const u = l.getColDef(), p = l.getSort(), f = be(u.colId);
168
168
  Q(void 0, void 0, {
169
169
  column: u,
170
- field: p?.field ?? u.field ?? u.colId,
171
- order: m ? ke[m] : null
170
+ field: f?.field ?? u.field ?? u.colId,
171
+ order: p ? ke[p] : null
172
172
  });
173
173
  }
174
- const Ie = n(() => $o(t(g), (e) => {
174
+ const Ie = n(() => $o(t(w), (e) => {
175
175
  if (e.sorter === !0)
176
176
  return e.field ?? e.dataIndex ?? e.key;
177
177
  }).filter(Boolean)), Ae = () => {
@@ -182,10 +182,10 @@ const Yt = /* @__PURE__ */ po({
182
182
  const r = e.getColumnState()?.map((l) => ({ ...l, sort: null }));
183
183
  e.applyColumnState({ state: r });
184
184
  }, T = M(!0), Ne = n(() => gt(o.manual) ? o.manual : lt(U.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
185
- formRef: w,
185
+ formRef: S,
186
186
  submit: D,
187
187
  reset: E,
188
- data: S,
188
+ data: m,
189
189
  tableProps: J,
190
190
  handleTableChangeOptional: Q,
191
191
  submitWith: X,
@@ -195,7 +195,7 @@ const Yt = /* @__PURE__ */ po({
195
195
  setDataSource: Ee
196
196
  } = qo({
197
197
  async request(e) {
198
- if (R = !1, C.value && !C.value.preserveSelectedRowKeys && k(o.dataSource) && !T.value && V(), T.value && (T.value = !1), !k(o.dataSource)) {
198
+ if (R = !1, h.value && !h.value.preserveSelectedRowKeys && k(o.dataSource) && !T.value && V(), T.value && (T.value = !1), !k(o.dataSource)) {
199
199
  const l = e.pageSize * (e.current - 1);
200
200
  return {
201
201
  data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(l, l + e.pageSize)) || [],
@@ -217,15 +217,15 @@ const Yt = /* @__PURE__ */ po({
217
217
  pagination: o.pagination,
218
218
  sortFields: Ie,
219
219
  onClickReset: Ae
220
- }), C = n(() => {
220
+ }), h = n(() => {
221
221
  const e = o.rowSelection || ye.value?.rowSelection;
222
222
  if (e)
223
223
  return e === !0 ? ce : {
224
224
  ...ce,
225
225
  ...e
226
226
  };
227
- }), Pe = it(o, g), Ke = n(
228
- () => k(o.dataSource) ? S.records : o.dataSource
227
+ }), Pe = it(o, w), Ke = n(
228
+ () => k(o.dataSource) ? m.records : o.dataSource
229
229
  ), {
230
230
  select: Ve,
231
231
  unSelect: ze,
@@ -236,14 +236,14 @@ const Yt = /* @__PURE__ */ po({
236
236
  selectMulti: We,
237
237
  unSelectMulti: He
238
238
  } = Jo({
239
- ...C.value,
239
+ ...h.value,
240
240
  dataSource: Ke,
241
241
  rowKey: o.rowKey
242
242
  }), Ue = {
243
243
  checkbox: "multiRow",
244
244
  radio: "singleRow"
245
245
  }, _e = n(() => {
246
- const e = C.value;
246
+ const e = h.value;
247
247
  if (!e)
248
248
  return;
249
249
  const { type: r = "checkbox", disabled: l } = e;
@@ -259,19 +259,19 @@ const Yt = /* @__PURE__ */ po({
259
259
  const A = ({
260
260
  api: e = s.value
261
261
  }) => {
262
- if (o.onUpdate?.(), !C.value)
262
+ if (o.onUpdate?.(), !h.value)
263
263
  return;
264
264
  const r = P.value || [];
265
265
  R = !1;
266
266
  const l = [];
267
267
  e.forEachNode((i) => {
268
- const v = i.data, u = K(v), m = i.isSelected();
269
- r.find((p) => K(p) === u) ? !m && l.push(i) : m && i.setSelected(!1);
268
+ const v = i.data, u = K(v), p = i.isSelected();
269
+ r.find((f) => K(f) === u) ? !p && l.push(i) : p && i.setSelected(!1);
270
270
  }), e.setNodesSelected({ nodes: l, newValue: !0 }), setTimeout(() => {
271
271
  R = !0;
272
272
  }, 0);
273
273
  }, je = (e) => {
274
- R && (e.node.isSelected() ? Ve(e.data) : ze(e.data), N(C.value?.tooltip) && e.api.refreshCells({
274
+ R && (e.node.isSelected() ? Ve(e.data) : ze(e.data), N(h.value?.tooltip) && e.api.refreshCells({
275
275
  rowNodes: [e.node],
276
276
  // todo: 取消硬编码
277
277
  columns: ["ag-Grid-SelectionColumn"],
@@ -309,19 +309,19 @@ const Yt = /* @__PURE__ */ po({
309
309
  }
310
310
  function Z(e = !1) {
311
311
  const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
312
- return w.value?.apForm?.[r]?.(!0);
312
+ return S.value?.apForm?.[r]?.(!0);
313
313
  }
314
314
  function ee(e) {
315
- w.value?.apForm?.setFieldsValue?.(e);
315
+ S.value?.apForm?.setFieldsValue?.(e);
316
316
  }
317
317
  function oe() {
318
- return w.value?.getSorterItems() || [];
318
+ return S.value?.getSorterItems() || [];
319
319
  }
320
320
  function te(e) {
321
- w.value?.setSorterItems(e);
321
+ S.value?.setSorterItems(e);
322
322
  }
323
323
  function re() {
324
- w.value?.resetSorterItems();
324
+ S.value?.resetSorterItems();
325
325
  }
326
326
  function le(e) {
327
327
  return e && String(e);
@@ -342,23 +342,23 @@ const Yt = /* @__PURE__ */ po({
342
342
  return ne && (ae.pinned = ne.fixed || null), ae;
343
343
  }), u = new Map(
344
344
  e.map((a, b) => [le(a.key), b])
345
- ), m = v.filter((a) => u.has(a.colId)).sort(
345
+ ), p = v.filter((a) => u.has(a.colId)).sort(
346
346
  (a, b) => u.get(a.colId) - u.get(b.colId)
347
- ), p = [];
347
+ ), f = [];
348
348
  let c = 0;
349
349
  for (const a of v)
350
- u.has(a.colId) ? p.push(m[c++]) : p.push(a);
350
+ u.has(a.colId) ? f.push(p[c++]) : f.push(a);
351
351
  r.applyColumnState({
352
- state: p,
352
+ state: f,
353
353
  applyOrder: !0
354
354
  });
355
355
  }
356
356
  Xo({
357
- columns: n(() => g.value),
357
+ columns: n(() => w.value),
358
358
  columnsBackup: n(() => q.value),
359
359
  size: n(() => Zo[y.value]),
360
360
  updateColumns(e) {
361
- g.value = e, o.onShownColumnsChange?.(e), Ye(e);
361
+ w.value = e, o.onShownColumnsChange?.(e), Ye(e);
362
362
  },
363
363
  updateSize(e) {
364
364
  y.value = Yo[e];
@@ -367,7 +367,7 @@ const Yt = /* @__PURE__ */ po({
367
367
  className: ge("table-header", "title"),
368
368
  color: Re.value.colorTextTertiary
369
369
  })),
370
- dataSource: n(() => t(S).records),
370
+ dataSource: n(() => t(m).records),
371
371
  getSearchFormValues: Z,
372
372
  setSearchFormValues: ee,
373
373
  submit: D,
@@ -379,12 +379,13 @@ const Yt = /* @__PURE__ */ po({
379
379
  resetSearchFormSorterItems: re
380
380
  });
381
381
  const Ze = n(
382
- () => k(o.loading) ? S.loading : o.loading
382
+ () => k(o.loading) ? m.loading : o.loading
383
383
  ), eo = n(() => [
384
384
  d(),
385
385
  o.card ? null : d("wrapper"),
386
386
  d("adaptive"),
387
387
  d(`size-${y.value}`),
388
+ o.autoHeight && m.records.length ? d("auto-height") : null,
388
389
  we.value
389
390
  ].filter(Boolean)), oo = n(() => ({
390
391
  height: "100%",
@@ -436,7 +437,7 @@ const Yt = /* @__PURE__ */ po({
436
437
  y.value = e;
437
438
  }
438
439
  ), G(
439
- () => t(S).loading,
440
+ () => t(m).loading,
440
441
  (e) => {
441
442
  o.onLoadingChange?.(e);
442
443
  }
@@ -447,7 +448,7 @@ const Yt = /* @__PURE__ */ po({
447
448
  submitWith: X,
448
449
  setSearchFormValues: ee,
449
450
  getSearchFormValues: Z,
450
- getShowColumns: () => t(g),
451
+ getShowColumns: () => t(w),
451
452
  rowSelection: {
452
453
  selectedRows: n(() => P.value),
453
454
  setSelectedRowKeys: qe,
@@ -457,7 +458,7 @@ const Yt = /* @__PURE__ */ po({
457
458
  },
458
459
  scrollToRow: lo,
459
460
  scrollToColumn: ao,
460
- getDataSource: () => t(S.records),
461
+ getDataSource: () => t(m.records),
461
462
  getPaging: Te,
462
463
  setPaging: De,
463
464
  getSearchFormSorterItems: oe,
@@ -466,25 +467,25 @@ const Yt = /* @__PURE__ */ po({
466
467
  refreshCells: io,
467
468
  redrawRows: uo,
468
469
  _internalGridApi: n(() => s.value)
469
- }), (e, r) => (h(), O("div", {
470
- class: f(eo.value),
470
+ }), (e, r) => (C(), O("div", {
471
+ class: g(eo.value),
471
472
  style: L(e.wrapperStyle)
472
473
  }, [
473
- t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (h(), O("div", {
474
+ t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (C(), O("div", {
474
475
  key: 0,
475
- class: f(e.card ? t(x)("search-wrapper") : null),
476
+ class: g(e.card ? t(x)("search-wrapper") : null),
476
477
  style: L(e.searchFormWrapperStyle)
477
478
  }, [
478
479
  ie(t(jo).SearchForm, W(e.searchForm || {}, {
479
480
  ref_key: "formRef",
480
- ref: w,
481
+ ref: S,
481
482
  "custom-reset": "",
482
483
  "submit-loading": t(J).loading,
483
484
  onSubmit: t(D),
484
485
  onReset: t(E)
485
486
  }), go({
486
487
  default: ue(() => [
487
- (h(!0), O(wo, null, So(t($), (l) => (h(), H(Co(l.renderNode), {
488
+ (C(!0), O(wo, null, So(t($), (l) => (C(), H(ho(l.renderNode), {
488
489
  key: l.dataIndex
489
490
  }))), 128))
490
491
  ]),
@@ -500,31 +501,31 @@ const Yt = /* @__PURE__ */ po({
500
501
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
501
502
  ], 6)) : se("", !0),
502
503
  B("div", {
503
- class: f([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
504
+ class: g([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
504
505
  style: L(e.tableWrapperStyle)
505
506
  }, [
506
507
  B("div", {
507
- class: f(t(d)("header-wrapper"))
508
+ class: g(t(d)("header-wrapper"))
508
509
  }, [
509
510
  de(e.$slots, "title", {
510
511
  selectedRows: t(P),
511
512
  selectedRowKeys: t(Ge),
512
- shownColumns: t(g),
513
+ shownColumns: t(w),
513
514
  clearAll: V
514
515
  })
515
516
  ], 2),
516
517
  B("div", {
517
518
  ref_key: "gridWrapperRef",
518
519
  ref: Be,
519
- class: f(t(d)("grid-wrapper"))
520
+ class: g(t(d)("grid-wrapper"))
520
521
  }, [
521
- (h(), H(t(Ro), W(
522
- t(Ho)(t(Ce), t(j), Je.value),
522
+ (C(), H(t(Ro), W(
523
+ t(Ho)(t(he), t(j), Je.value),
523
524
  {
524
525
  key: t(_),
525
526
  "get-row-class": co,
526
527
  style: oo.value,
527
- "row-data": t(S).records,
528
+ "row-data": t(m).records,
528
529
  "column-defs": t(Fe),
529
530
  "default-col-def": t(Me),
530
531
  "suppress-loading-overlay": "",
@@ -551,8 +552,8 @@ const Yt = /* @__PURE__ */ po({
551
552
  onBodyScrollEnd: so
552
553
  }
553
554
  ), 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"])),
554
- ho(B("div", {
555
- class: f(t(x)("table-loading-wrapper"))
555
+ Co(B("div", {
556
+ class: g(t(x)("table-loading-wrapper"))
556
557
  }, [
557
558
  ie(t(Uo), { delay: 300 })
558
559
  ], 2), [
@@ -560,9 +561,9 @@ const Yt = /* @__PURE__ */ po({
560
561
  ])
561
562
  ], 2),
562
563
  B("div", {
563
- class: f(t(d)("pagination-wrapper"))
564
+ class: g(t(d)("pagination-wrapper"))
564
565
  }, [
565
- e.pagination !== !1 ? (h(), H(t(_o), W({
566
+ e.pagination !== !1 ? (C(), H(t(_o), W({
566
567
  key: 0,
567
568
  class: t(d)("pagination")
568
569
  }, t(J).pagination, { onChange: to }), null, 16, ["class"])) : se("", !0)
@@ -1,6 +1,6 @@
1
1
  import { genSettingTriggerBtnStyle as a } from "../../ap-table/style/index.mjs";
2
- import { multiRows as l, resetScrollbar as d } from "../../style/index.mjs";
3
- import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
2
+ import { multiRows as l, resetScrollbar as r } from "../../style/index.mjs";
3
+ import { genComponentStyleHook as d } from "../../utils/cssinjs/index.mjs";
4
4
  const t = {
5
5
  agGridSearchFormWrapperMarginBlockEnd: 10,
6
6
  agGridCellPaddingBlockMedium: 9,
@@ -12,7 +12,7 @@ const t = {
12
12
  const { componentCls: e } = i;
13
13
  return {
14
14
  [e]: {
15
- ...d(i),
15
+ ...r(i),
16
16
  "&-adaptive": {
17
17
  height: "100%",
18
18
  display: "flex",
@@ -23,6 +23,11 @@ const t = {
23
23
  position: "relative"
24
24
  }
25
25
  },
26
+ "&-auto-height": {
27
+ ".ag-center-cols-viewport": {
28
+ minHeight: "unset !important"
29
+ }
30
+ },
26
31
  "&-wrapper": {
27
32
  padding: i.space,
28
33
  paddingBlockEnd: i.spaceLG,
@@ -150,7 +155,7 @@ const t = {
150
155
  }
151
156
  }
152
157
  };
153
- }, s = r(
158
+ }, s = d(
154
159
  "AgGrid",
155
160
  (i) => [n(i)],
156
161
  t,
@@ -1,11 +1,11 @@
1
- import { GenStyleFunc, StyleMixin } from '../../design-token/interface';
1
+ import { BaseToken, GenStyleFunc, StyleMixin } from '../../design-token/interface';
2
2
  import { ComputedRef } from 'vue';
3
3
  export type ApTableToken = {
4
4
  apTableHeaderBg: string;
5
5
  apTableIndexSize: number;
6
6
  apTableSettingRightWidth: number;
7
7
  };
8
- export declare const defaultValue: ApTableToken;
8
+ export declare const defaultValue: (token: BaseToken) => ApTableToken;
9
9
  export declare const genSettingTriggerBtnStyle: StyleMixin;
10
10
  export declare const genApTableStyle: GenStyleFunc<ApTableToken>;
11
11
  declare const _default: (prefixCls: string) => ComputedRef<string>;
@@ -1,10 +1,10 @@
1
1
  import { multiRows as l, resetScrollbar as i } from "../../style/index.mjs";
2
2
  import { genComponentStyleHook as o } from "../../utils/cssinjs/index.mjs";
3
- const r = {
4
- apTableHeaderBg: "#F2F6F9",
3
+ const r = (t) => ({
4
+ apTableHeaderBg: t.tableHeaderBg,
5
5
  apTableIndexSize: 14,
6
6
  apTableSettingRightWidth: 240
7
- }, p = (t) => ({
7
+ }), p = (t) => ({
8
8
  [`.${t.namespace}-ap-table-setting-trigger-button`]: {
9
9
  color: t.textColor2,
10
10
  "&:hover": {
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as _, ref as H, createVNode as i, mergeProps as L, onUnmounted as j } from "vue";
2
2
  import { ApModal as q } from "../../../ap-modal/index.mjs";
3
3
  import "../../../ag-grid/index.mjs";
4
- import { AsyncCallback as G, genRequest as T, delRowKeyField as D, addRowKeyField as F, getModalLayoutConfig as E } from "../utils.mjs";
4
+ import { AsyncCallback as D, genRequest as G, delRowKeyField as T, addRowKeyField as F, getModalLayoutConfig as E } from "../utils.mjs";
5
5
  import { useAgGridInstance as U } from "./use-ag-grid-instance.mjs";
6
- import { isFunction as u, cloneDeep as W, isEmpty as b, omitBy as $, isUndefined as z, omit as p } from "lodash-unified";
6
+ import { isFunction as u, cloneDeep as W, isEmpty as b, omitBy as $, isUndefined as z, omit as S } from "lodash-unified";
7
7
  import { ROW_KEY as B } from "../constants.mjs";
8
8
  import { useModalTitle as N } from "./use-modal-title.mjs";
9
9
  import { message as V } from "@aplus-frontend/antdv";
@@ -15,14 +15,14 @@ import J from "../wrapper/index.vue2.mjs";
15
15
  import Q from "../modal-layout/index.vue2.mjs";
16
16
  import X from "../../../ag-grid/index.vue.mjs";
17
17
  function we(t) {
18
- let c, f = null, g = null;
19
- const d = new G(), [K, S] = N(), {
18
+ let d, f = null, g = null;
19
+ const c = new D(), [x, K] = N(), {
20
20
  t: k
21
- } = Y(), [s, x] = U({
21
+ } = Y(), [s, p] = U({
22
22
  onSelectedRows(e) {
23
- S.setCount(e?.length || 0);
23
+ K.setCount(e?.length || 0);
24
24
  }
25
- }), w = T(t.api, t.getRowKey, s.setDataSourceLength), y = (e) => {
25
+ }), w = G(t.api, t.getRowKey, s.setDataSourceLength), y = (e) => {
26
26
  const {
27
27
  title: o,
28
28
  width: l,
@@ -42,16 +42,16 @@ function we(t) {
42
42
  keys: A(o),
43
43
  rows: o.map((a) => {
44
44
  const r = m(a);
45
- return e === "old" && c?.[r] ? c[r] : D(a);
45
+ return e === "old" && d?.[r] ? d[r] : T(a);
46
46
  })
47
47
  };
48
48
  }, h = async () => {
49
49
  const e = P(), o = t.maxCount || 1 / 0;
50
50
  return e.keys.length > o ? (V.warning(k("ap.apTableModal.messageMaxCount", {
51
51
  maxCount: o
52
- })), Promise.reject()) : (await t.beforeOk?.(e), t.finishCallback?.(e), d.resolve(e), e);
52
+ })), Promise.reject()) : (await t.beforeOk?.(e), t.finishCallback?.(e), c.resolve(e), e);
53
53
  }, M = () => {
54
- d.reject("modal is closed!");
54
+ c.reject("modal is closed!");
55
55
  }, I = /* @__PURE__ */ _({
56
56
  name: "AgGridModalSelectContent",
57
57
  props: {
@@ -73,12 +73,12 @@ function we(t) {
73
73
  };
74
74
  }, () => {
75
75
  const l = e.selectedRows?.map((r) => F(r, o.value.getRowKey)), n = o.value, a = E(n.modalLayout);
76
- return i(x, null, {
76
+ return i(p, null, {
77
77
  default: () => [i(J, {
78
78
  height: n.height,
79
79
  rowHeight: n.rowHeight
80
80
  }, {
81
- default: () => [t.renderHeader?.(p(s, "setInstance"), {
81
+ default: () => [t.renderHeader?.(S(s, "setInstance"), {
82
82
  updateProps: y
83
83
  }), i(Q, a.props, {
84
84
  default: () => [i(X, L({
@@ -103,7 +103,7 @@ function we(t) {
103
103
  fixed: "left",
104
104
  columnWidth: 38,
105
105
  disabled(r) {
106
- return u(n.disabledCheckbox) ? n.disabledCheckbox(r, p(s, "setInstance")) : n.disabledCheckbox ?? !1;
106
+ return u(n.disabledCheckbox) ? n.disabledCheckbox(r, S(s, "setInstance")) : n.disabledCheckbox ?? !1;
107
107
  },
108
108
  ...t.rowSelection
109
109
  },
@@ -123,11 +123,12 @@ function we(t) {
123
123
  }, null);
124
124
  }
125
125
  function v() {
126
- const e = Object.values(c || {}), o = C(e);
126
+ const e = Object.values(d || {}), o = C(e);
127
127
  f = q.createModal({
128
- title: i(K, {
128
+ title: i(x, {
129
129
  title: t.title,
130
- maxCount: t.maxCount || 1 / 0
130
+ maxCount: t.maxCount || 1 / 0,
131
+ isShowDefaultSuffix: t.mode !== "radio"
131
132
  }, t.modalTitleSlots),
132
133
  width: t.width,
133
134
  destroyOnClose: !0,
@@ -145,17 +146,17 @@ function we(t) {
145
146
  return e?.map(m) || [];
146
147
  }
147
148
  function R(e, o, l = !1) {
148
- if (c = e?.reduce((n, a) => {
149
+ if (d = e?.reduce((n, a) => {
149
150
  const r = m(a);
150
151
  return n[r] = a, n;
151
152
  }, {}), w.setExtraParams(o?.extraParams), v(), l)
152
- return d.buildPromise();
153
+ return c.buildPromise();
153
154
  }
154
155
  function O(e, o) {
155
156
  return R(e, o, !0);
156
157
  }
157
158
  return j(() => {
158
- d.reject("component is Unmounted!");
159
+ c.reject("component is Unmounted!");
159
160
  }), {
160
161
  open: R,
161
162
  asyncOpen: O,