@aplus-frontend/ui 0.5.28 → 0.5.30

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 (69) hide show
  1. package/es/index.mjs +86 -82
  2. package/es/src/ap-field/interface.d.ts +3 -0
  3. package/es/src/ap-grid/editable/form-item.vue.mjs +20 -19
  4. package/es/src/ap-grid/editable/index.vue.mjs +23 -22
  5. package/es/src/ap-grid/index.vue.mjs +149 -138
  6. package/es/src/ap-grid/interface.d.ts +9 -0
  7. package/es/src/ap-grid/utils/col.mjs +92 -81
  8. package/es/src/ap-grid/utils/table.mjs +2 -2
  9. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +52 -52
  10. package/es/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
  11. package/es/src/business/ap-product-info/ApProductInfo.mjs +59 -0
  12. package/es/src/business/ap-product-info/constans.d.ts +11 -14
  13. package/es/src/business/ap-product-info/constans.mjs +21 -0
  14. package/es/src/business/ap-product-info/index.d.ts +86 -0
  15. package/es/src/business/ap-product-info/index.mjs +7 -0
  16. package/es/src/business/ap-product-info/interface.d.ts +9 -7
  17. package/es/src/business/ap-product-info/interface.mjs +1 -0
  18. package/es/src/business/ap-product-info/style/css.d.ts +0 -0
  19. package/es/src/business/ap-product-info/style/css.js +1 -0
  20. package/es/src/business/ap-product-info/style/index.d.ts +0 -0
  21. package/es/src/business/ap-product-info/style/index.js +1 -0
  22. package/es/src/business/hooks/index.d.ts +1 -0
  23. package/es/src/business/hooks/index.mjs +6 -4
  24. package/es/src/business/hooks/useGridRefresh.d.ts +17 -0
  25. package/es/src/business/hooks/useGridRefresh.mjs +17 -0
  26. package/es/src/business/index.d.ts +1 -0
  27. package/es/src/business/index.mjs +21 -19
  28. package/es/src/components.d.ts +1 -0
  29. package/es/src/full-screen/index.vue.mjs +17 -16
  30. package/es/src/full-screen/interface.d.ts +2 -1
  31. package/es/src/index.mjs +75 -71
  32. package/es/src/path-map.mjs +1 -0
  33. package/lib/index.js +1 -1
  34. package/lib/src/ap-field/interface.d.ts +3 -0
  35. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  36. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  37. package/lib/src/ap-grid/index.vue.js +1 -1
  38. package/lib/src/ap-grid/interface.d.ts +9 -0
  39. package/lib/src/ap-grid/utils/col.js +1 -1
  40. package/lib/src/ap-grid/utils/table.js +1 -1
  41. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  42. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
  43. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -0
  44. package/lib/src/business/ap-product-info/constans.d.ts +11 -14
  45. package/lib/src/business/ap-product-info/constans.js +1 -0
  46. package/lib/src/business/ap-product-info/index.d.ts +86 -0
  47. package/lib/src/business/ap-product-info/index.js +1 -0
  48. package/lib/src/business/ap-product-info/interface.d.ts +9 -7
  49. package/lib/src/business/ap-product-info/interface.js +1 -0
  50. package/lib/src/business/ap-product-info/style/css.cjs +1 -0
  51. package/lib/src/business/ap-product-info/style/css.d.ts +0 -0
  52. package/lib/src/business/ap-product-info/style/index.cjs +1 -0
  53. package/lib/src/business/ap-product-info/style/index.d.ts +0 -0
  54. package/lib/src/business/hooks/index.d.ts +1 -0
  55. package/lib/src/business/hooks/index.js +1 -1
  56. package/lib/src/business/hooks/useGridRefresh.d.ts +17 -0
  57. package/lib/src/business/hooks/useGridRefresh.js +1 -0
  58. package/lib/src/business/index.d.ts +1 -0
  59. package/lib/src/business/index.js +1 -1
  60. package/lib/src/components.d.ts +1 -0
  61. package/lib/src/full-screen/index.vue.js +1 -1
  62. package/lib/src/full-screen/interface.d.ts +2 -1
  63. package/lib/src/index.js +1 -1
  64. package/lib/src/path-map.js +1 -1
  65. package/package.json +1 -1
  66. package/theme/ap-product-info/ap-product-info.css +87 -0
  67. package/theme/ap-product-info/ap-product-info.less +100 -0
  68. package/theme/index.css +87 -0
  69. package/theme/index.less +1 -0
package/es/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { configProviderProps as d } from "./src/config-provider/config-provider-
5
5
  import { DEFAULT_NAMESPACE as s, DEFAULT_UIMODE as A, configProviderContextKey as i } from "./src/config-provider/constants.mjs";
6
6
  import { keysOf as c, provideGlobalConfig as F, useGlobalConfig as I } from "./src/config-provider/hooks/use-global-config.mjs";
7
7
  import { buildLocaleContext as b, buildTranslator as S, localeContextKey as C, translate as g, useLocale as D } from "./src/config-provider/hooks/use-locale.mjs";
8
- import { defaultNamespace as h, namespaceContextKey as P, useGetDerivedNamespace as E, useNamespace as M } from "./src/config-provider/hooks/use-namespace.mjs";
8
+ import { defaultNamespace as h, namespaceContextKey as P, useGetDerivedNamespace as R, useNamespace as E } from "./src/config-provider/hooks/use-namespace.mjs";
9
9
  import { ConfigProvider as L, globalConfigCached as N } from "./src/config-provider/config-provider.mjs";
10
10
  import { APConfigProvider as w } from "./src/config-provider/index.mjs";
11
11
  import { ApFormItemText as v } from "./src/ap-form/items/text/index.mjs";
@@ -31,8 +31,8 @@ import { default as be } from "./src/ap-form/drawer-form/index.vue.mjs";
31
31
  import { default as Ce } from "./src/ap-form/render/control.vue.mjs";
32
32
  import { default as De } from "./src/ap-form/render/item.vue.mjs";
33
33
  import { default as he } from "./src/ap-form/provider/index.vue.mjs";
34
- import { ApField as Ee } from "./src/ap-field/index.mjs";
35
- import { ApFieldText as Re } from "./src/ap-field/text/index.mjs";
34
+ import { ApField as Re } from "./src/ap-field/index.mjs";
35
+ import { ApFieldText as Me } from "./src/ap-field/text/index.mjs";
36
36
  import { default as Ne } from "./src/ap-field/checkbox/index.vue.mjs";
37
37
  import { default as we } from "./src/ap-field/date/index.vue.mjs";
38
38
  import { default as ve } from "./src/ap-field/number/index.vue.mjs";
@@ -57,7 +57,7 @@ import { createWorkOrderModal as So } from "./src/work-order-modal/createWorkOrd
57
57
  import { default as go } from "./src/work-order-modal/work-order-modal.vue.mjs";
58
58
  import { default as Go } from "./src/ap-tag/ap-tag.vue.mjs";
59
59
  import { default as Po } from "./src/ap-tag/ap-tag-group.vue.mjs";
60
- import { default as Mo } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
60
+ import { default as Eo } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
61
61
  import { NeedNameKeyDefault as Lo } from "./src/ap-upload/apUploadTypes.mjs";
62
62
  import { default as yo } from "./src/ap-upload/apUpload.vue.mjs";
63
63
  import { ApDownLoadNeedNameKeyDefault as ko } from "./src/ap-download/interface.mjs";
@@ -84,7 +84,7 @@ import { ApExportGroupActionType as Sr } from "./src/business/ap-export-group/in
84
84
  import { ApExportGroup as gr } from "./src/business/ap-export-group/index.mjs";
85
85
  import { handleExportDownload as Gr } from "./src/business/ap-export-group/handleExportDownload.mjs";
86
86
  import { convertExportField as Pr } from "./src/business/ap-export-group/convertExportField.mjs";
87
- import { ApImage as Mr } from "./src/business/ap-image/index.mjs";
87
+ import { ApImage as Er } from "./src/business/ap-image/index.mjs";
88
88
  import { ApInputRadio as Lr } from "./src/business/ap-input-radio/index.mjs";
89
89
  import { ApLabel as yr, ApLabelGroup as wr } from "./src/business/ap-label/index.mjs";
90
90
  import { locales as vr } from "./src/business/ap-ladder/interface.mjs";
@@ -95,39 +95,41 @@ import { ApTitle as Hr } from "./src/business/ap-title/index.mjs";
95
95
  import { usePageListApTable as jr } from "./src/business/hooks/usePageListApTable.mjs";
96
96
  import { useTableRefresh as Jr } from "./src/business/hooks/useTableRefresh.mjs";
97
97
  import { usePageListApGrid as Xr } from "./src/business/hooks/usePageListApGrid.mjs";
98
- import { computedRecords as Zr, flattenColumns as et, formatDataIndex as ot, formatNumber as rt } from "./src/business/ap-summary/utils.mjs";
99
- import { ApSummary as pt } from "./src/business/ap-summary/index.mjs";
100
- import { ApNeedNameKeyDefault as ft } from "./src/business/ap-appendix/interface.mjs";
101
- import { ApAppendix as lt } from "./src/business/ap-appendix/index.mjs";
102
- import { ApExtensionSelect as dt, ApGroupSearch as ut, ApPopoverSelect as st } from "./src/business/ap-group-search/index.mjs";
103
- import { default as it } from "./src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
104
- import { default as ct } from "./src/business/batch-input-group/index.vue.mjs";
105
- import { default as It } from "./src/business/batch-input-group/form-item.vue.mjs";
106
- import { ApSizeInput as bt } from "./src/business/ap-size-input/index.mjs";
107
- import { useTablePaging as Ct } from "./src/ap-table/hooks/use-table-paging.mjs";
108
- import { ApTable as Dt } from "./src/ap-table/index.mjs";
109
- import { default as ht } from "./src/editable-table/index.vue.mjs";
110
- import { default as Et } from "./src/editable-table/form-item.vue.mjs";
111
- import { default as Rt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
112
- import { ensureRangeValue as Nt } from "./src/scroll-bar/utils/index.mjs";
113
- import { default as wt } from "./src/scroll-bar/index.vue.mjs";
114
- import { default as vt } from "./src/scroll-bar/internal.vue.mjs";
115
- import { default as Kt } from "./src/scroll-view/index.vue.mjs";
116
- import { default as Ut } from "./src/portal/index.vue.mjs";
117
- import { default as Vt } from "./src/full-screen/index.vue.mjs";
118
- import { default as _t } from "./src/resize-observer/index.vue.mjs";
119
- import { default as $t } from "./src/ap-grid/index.vue.mjs";
120
- import { default as qt } from "./src/ap-grid/editable/index.vue.mjs";
121
- import { default as Qt } from "./src/ap-grid/editable/form-item.vue.mjs";
122
- import { default as Yt } from "./src/text/index.vue.mjs";
123
- import { default as ep } from "./src/text/group.vue.mjs";
124
- import { default as rp } from "./src/mask/index.vue.mjs";
125
- import { useMessage as pp } from "./src/hooks/useMessage.mjs";
126
- import { useControllableValue as fp } from "./src/hooks/useControllableValue.mjs";
127
- import { useManualRef as lp } from "./src/hooks/useManualRef.mjs";
128
- import { useThrottleRef as dp } from "./src/hooks/useThrottleRef.mjs";
129
- import { useFullScreen as sp } from "./src/hooks/useFullScreen.mjs";
130
- import { useResize as ip } from "./src/hooks/useResize.mjs";
98
+ import { useGridRefresh as Zr } from "./src/business/hooks/useGridRefresh.mjs";
99
+ import { computedRecords as ot, flattenColumns as rt, formatDataIndex as tt, formatNumber as pt } from "./src/business/ap-summary/utils.mjs";
100
+ import { ApSummary as ft } from "./src/business/ap-summary/index.mjs";
101
+ import { ApNeedNameKeyDefault as lt } from "./src/business/ap-appendix/interface.mjs";
102
+ import { ApAppendix as dt } from "./src/business/ap-appendix/index.mjs";
103
+ import { ApExtensionSelect as st, ApGroupSearch as At, ApPopoverSelect as it } from "./src/business/ap-group-search/index.mjs";
104
+ import { default as ct } from "./src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
105
+ import { default as It } from "./src/business/batch-input-group/index.vue.mjs";
106
+ import { default as bt } from "./src/business/batch-input-group/form-item.vue.mjs";
107
+ import { ApSizeInput as Ct } from "./src/business/ap-size-input/index.mjs";
108
+ import { ApProductInfo as Dt } from "./src/business/ap-product-info/index.mjs";
109
+ import { useTablePaging as ht } from "./src/ap-table/hooks/use-table-paging.mjs";
110
+ import { ApTable as Rt } from "./src/ap-table/index.mjs";
111
+ import { default as Mt } from "./src/editable-table/index.vue.mjs";
112
+ import { default as Nt } from "./src/editable-table/form-item.vue.mjs";
113
+ import { default as wt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
114
+ import { ensureRangeValue as vt } from "./src/scroll-bar/utils/index.mjs";
115
+ import { default as Kt } from "./src/scroll-bar/index.vue.mjs";
116
+ import { default as Ut } from "./src/scroll-bar/internal.vue.mjs";
117
+ import { default as Vt } from "./src/scroll-view/index.vue.mjs";
118
+ import { default as _t } from "./src/portal/index.vue.mjs";
119
+ import { default as $t } from "./src/full-screen/index.vue.mjs";
120
+ import { default as qt } from "./src/resize-observer/index.vue.mjs";
121
+ import { default as Qt } from "./src/ap-grid/index.vue.mjs";
122
+ import { default as Yt } from "./src/ap-grid/editable/index.vue.mjs";
123
+ import { default as ep } from "./src/ap-grid/editable/form-item.vue.mjs";
124
+ import { default as rp } from "./src/text/index.vue.mjs";
125
+ import { default as pp } from "./src/text/group.vue.mjs";
126
+ import { default as fp } from "./src/mask/index.vue.mjs";
127
+ import { useMessage as lp } from "./src/hooks/useMessage.mjs";
128
+ import { useControllableValue as dp } from "./src/hooks/useControllableValue.mjs";
129
+ import { useManualRef as sp } from "./src/hooks/useManualRef.mjs";
130
+ import { useThrottleRef as ip } from "./src/hooks/useThrottleRef.mjs";
131
+ import { useFullScreen as cp } from "./src/hooks/useFullScreen.mjs";
132
+ import { useResize as Ip } from "./src/hooks/useResize.mjs";
131
133
  const a = {
132
134
  install: (r) => {
133
135
  for (const t in o) {
@@ -144,7 +146,7 @@ export {
144
146
  io as ApActionItemDropdown,
145
147
  xo as ApActionItemModal,
146
148
  so as ApActionItemPopconfirm,
147
- lt as ApAppendix,
149
+ dt as ApAppendix,
148
150
  xr as ApAttachment,
149
151
  ur as ApBatchAction,
150
152
  Ar as ApBatchActionGroup,
@@ -152,15 +154,15 @@ export {
152
154
  nr as ApButtonGroup,
153
155
  Fr as ApCard,
154
156
  Xo as ApConfirmButton,
155
- Rt as ApDescriptions,
157
+ wt as ApDescriptions,
156
158
  ko as ApDownLoadNeedNameKeyDefault,
157
159
  Bo as ApDownload,
158
160
  Zo as ApDrawer,
159
161
  Tr as ApExpandAlert,
160
162
  gr as ApExportGroup,
161
163
  Sr as ApExportGroupActionType,
162
- dt as ApExtensionSelect,
163
- Ee as ApField,
164
+ st as ApExtensionSelect,
165
+ Re as ApField,
164
166
  Ne as ApFieldCheckbox,
165
167
  we as ApFieldDate,
166
168
  _e as ApFieldDateRange,
@@ -172,7 +174,7 @@ export {
172
174
  $e as ApFieldSelect,
173
175
  Qe as ApFieldSlider,
174
176
  Ue as ApFieldSwitch,
175
- Re as ApFieldText,
177
+ Me as ApFieldText,
176
178
  Ve as ApFieldTextArea,
177
179
  ro as ApFieldTreeSelect,
178
180
  pe as ApForm,
@@ -180,7 +182,7 @@ export {
180
182
  ce as ApFormDependency,
181
183
  be as ApFormDrawerForm,
182
184
  fe as ApFormItem,
183
- It as ApFormItemBatchInput,
185
+ bt as ApFormItemBatchInput,
184
186
  Y as ApFormItemCheckbox,
185
187
  V as ApFormItemDate,
186
188
  _ as ApFormItemDateRange,
@@ -199,68 +201,69 @@ export {
199
201
  he as ApFormProvider,
200
202
  se as ApFormSearchForm,
201
203
  Ie as ApFormSet,
202
- $t as ApGrid,
203
- ut as ApGroupSearch,
204
- Mr as ApImage,
205
- Mo as ApInfoLayout,
204
+ Qt as ApGrid,
205
+ At as ApGroupSearch,
206
+ Er as ApImage,
207
+ Eo as ApInfoLayout,
206
208
  Lr as ApInputRadio,
207
209
  yr as ApLabel,
208
210
  wr as ApLabelGroup,
209
211
  Kr as ApLadder,
210
212
  Ho as ApList,
211
213
  Wo as ApModal,
212
- ft as ApNeedNameKeyDefault,
213
- st as ApPopoverSelect,
214
+ lt as ApNeedNameKeyDefault,
215
+ it as ApPopoverSelect,
216
+ Dt as ApProductInfo,
214
217
  Ur as ApSelectLayout,
215
- bt as ApSizeInput,
218
+ Ct as ApSizeInput,
216
219
  Vr as ApStatus,
217
220
  Wr as ApStatusGroup,
218
- pt as ApSummary,
219
- Dt as ApTable,
221
+ ft as ApSummary,
222
+ Rt as ApTable,
220
223
  tr as ApTableModal,
221
224
  Go as ApTag,
222
225
  Po as ApTagGroup,
223
- Yt as ApText,
224
- ep as ApTextGroup,
226
+ rp as ApText,
227
+ pp as ApTextGroup,
225
228
  Hr as ApTitle,
226
229
  or as ApTransformDataHelper,
227
230
  yo as ApUpload,
228
- it as ApUploadSingle,
229
- ct as BatchInputGroup,
231
+ ct as ApUploadSingle,
232
+ It as BatchInputGroup,
230
233
  Oo as CheckCard,
231
234
  zo as CheckCardGroup,
232
235
  L as ConfigProvider,
233
236
  s as DEFAULT_NAMESPACE,
234
237
  A as DEFAULT_UIMODE,
235
238
  Io as DictCode,
236
- qt as EditableGrid,
237
- Qt as EditableGridFormItem,
238
- ht as EditableTable,
239
- Et as EditableTableFormItem,
240
- Vt as FullScreen,
241
- vt as InternalScrollBar,
242
- rp as Mask,
239
+ Yt as EditableGrid,
240
+ ep as EditableGridFormItem,
241
+ Mt as EditableTable,
242
+ Nt as EditableTableFormItem,
243
+ $t as FullScreen,
244
+ Ut as InternalScrollBar,
245
+ fp as Mask,
243
246
  Lo as NeedNameKeyDefault,
244
- Ut as Portal,
245
- _t as ResizeObserver,
246
- wt as ScrollBar,
247
- Kt as ScrollView,
247
+ _t as Portal,
248
+ qt as ResizeObserver,
249
+ Kt as ScrollBar,
250
+ Vt as ScrollView,
248
251
  go as WorkOrderModal,
249
252
  po as adminToken,
250
253
  ao as aplusToken,
251
254
  b as buildLocaleContext,
252
255
  S as buildTranslator,
253
- Zr as computedRecords,
256
+ ot as computedRecords,
254
257
  i as configProviderContextKey,
255
258
  d as configProviderProps,
256
259
  Pr as convertExportField,
257
260
  So as createWorkOrderModal,
258
261
  a as default,
259
262
  h as defaultNamespace,
260
- Nt as ensureRangeValue,
261
- et as flattenColumns,
262
- ot as formatDataIndex,
263
- rt as formatNumber,
263
+ vt as ensureRangeValue,
264
+ rt as flattenColumns,
265
+ tt as formatDataIndex,
266
+ pt as formatNumber,
264
267
  N as globalConfigCached,
265
268
  Gr as handleExportDownload,
266
269
  c as keysOf,
@@ -271,20 +274,21 @@ export {
271
274
  l as pathMap,
272
275
  F as provideGlobalConfig,
273
276
  g as translate,
274
- fp as useControllableValue,
275
- sp as useFullScreen,
276
- E as useGetDerivedNamespace,
277
+ dp as useControllableValue,
278
+ cp as useFullScreen,
279
+ R as useGetDerivedNamespace,
277
280
  I as useGlobalConfig,
281
+ Zr as useGridRefresh,
278
282
  D as useLocale,
279
- lp as useManualRef,
280
- pp as useMessage,
281
- M as useNamespace,
283
+ sp as useManualRef,
284
+ lp as useMessage,
285
+ E as useNamespace,
282
286
  Xr as usePageListApGrid,
283
287
  jr as usePageListApTable,
284
- ip as useResize,
288
+ Ip as useResize,
285
289
  ar as useTableModal,
286
- Ct as useTablePaging,
290
+ ht as useTablePaging,
287
291
  Jr as useTableRefresh,
288
292
  mr as useTableSelectModal,
289
- dp as useThrottleRef
293
+ ip as useThrottleRef
290
294
  };
@@ -7,6 +7,8 @@ import { LiteralUnion, Recordable } from '../type';
7
7
  import { InputPasswordProps } from './text/input-password-props';
8
8
  import { ZoneAlias } from '@aplus-frontend/utils';
9
9
  import { LegacyDataNode } from '@aplus-frontend/antdv/es/vc-tree-select/interface';
10
+ import { SharedTimeProps } from '@aplus-frontend/antdv/es/vc-picker/panels/TimePanel';
11
+ import { Dayjs } from 'dayjs';
10
12
  export type FieldMode = 'read' | 'edit';
11
13
  export type BasicApFieldProps<FieldPropsType = any> = {
12
14
  mode?: FieldMode;
@@ -64,6 +66,7 @@ export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' |
64
66
  label?: string;
65
67
  value: ZoneAlias;
66
68
  }[];
69
+ disabledTime?: SharedTimeProps<Dayjs>['disabledTime'];
67
70
  };
68
71
  export type ApFieldNumberProps = BasicApFieldProps<InputNumberProps> & {
69
72
  emptyText?: string;
@@ -1,4 +1,4 @@
1
- import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as s, watch as W, nextTick as G, createBlock as K, openBlock as U, mergeProps as g, withCtx as C, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
1
+ import { defineComponent as P, useSlots as A, toRef as H, ref as h, unref as r, watch as W, nextTick as G, createBlock as K, openBlock as U, mergeProps as C, withCtx as g, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
2
  import { ApForm as y } from "../../ap-form/index.mjs";
3
3
  import { isArray as Z, isUndefined as I, isNumber as m, cloneDeep as M, omit as ee } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
@@ -9,7 +9,7 @@ import { useInjectForm as ae } from "../../ap-form/context.mjs";
9
9
  import { useNamespace as te } from "../../config-provider/hooks/use-namespace.mjs";
10
10
  import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
11
11
  import ne from "../index.vue.mjs";
12
- const Ce = /* @__PURE__ */ P({
12
+ const ge = /* @__PURE__ */ P({
13
13
  name: "EditableGrid",
14
14
  __name: "form-item",
15
15
  props: {
@@ -113,6 +113,7 @@ const Ce = /* @__PURE__ */ P({
113
113
  default: void 0
114
114
  },
115
115
  onLoadingChange: {},
116
+ onShownColumnsChange: {},
116
117
  pagination: {
117
118
  type: [Boolean, Object],
118
119
  default: !1
@@ -165,7 +166,7 @@ const Ce = /* @__PURE__ */ P({
165
166
  const {
166
167
  internalInstance: a,
167
168
  model: F
168
- } = ae(), p = H(l.name), d = h(S(s(F), p.value) || []), N = y.useWatch(p);
169
+ } = ae(), p = H(l.name), d = h(S(r(F), p.value) || []), N = y.useWatch(p);
169
170
  W(() => N.value, async (e) => {
170
171
  var o;
171
172
  await G(), d.value = e, (o = l.onChange) == null || o.call(l, e);
@@ -175,38 +176,38 @@ const Ce = /* @__PURE__ */ P({
175
176
  const c = h(), v = le("valueTypeMap"), D = oe(l, v);
176
177
  function L(e, o) {
177
178
  var u;
178
- const n = ((u = s(d)) == null ? void 0 : u.length) || 0;
179
+ const n = ((u = r(d)) == null ? void 0 : u.length) || 0;
179
180
  if (w(l.maxLength) && n >= l.maxLength)
180
181
  return;
181
182
  const t = {
182
183
  ...e || {}
183
184
  };
184
- a == null || a.setFieldValue(l.name, t, !0, (f, r) => {
185
- f[r] || (f[r] = [t]), I(o) ? f[r].push(t) : f[r].splice(o, 0, t);
185
+ a == null || a.setFieldValue(l.name, t, !0, (s, f) => {
186
+ s[f] || (s[f] = [t]), I(o) ? s[f].push(t) : s[f].splice(o, 0, t);
186
187
  });
187
188
  }
188
189
  function V(e, o = "suffix") {
189
- var f;
190
- const n = ((f = s(d)) == null ? void 0 : f.length) || 0, t = m(e) ? e : e.length;
190
+ var s;
191
+ const n = ((s = r(d)) == null ? void 0 : s.length) || 0, t = m(e) ? e : e.length;
191
192
  if (w(l.maxLength) && n + t > l.maxLength)
192
193
  return;
193
194
  const u = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
194
- a == null || a.setFieldValue(l.name, u, !0, (r, i) => {
195
- r[i] || (r[i] = [...u]), o === "suffix" ? r[i].push(...u) : r[i].unshift(...u);
195
+ a == null || a.setFieldValue(l.name, u, !0, (f, i) => {
196
+ f[i] || (f[i] = [...u]), o === "suffix" ? f[i].push(...u) : f[i].unshift(...u);
196
197
  });
197
198
  }
198
199
  function T(e) {
199
200
  const o = new Set(m(e) ? [e] : e);
200
201
  a == null || a.setFieldValue(l.name, void 0, !0, (n, t) => {
201
- n[t] = n[t].filter((u, f) => !o.has(f));
202
+ n[t] = n[t].filter((u, s) => !o.has(s));
202
203
  });
203
204
  }
204
205
  function _() {
205
- return s(d);
206
+ return r(d);
206
207
  }
207
208
  function E(e) {
208
209
  var o;
209
- return (o = s(d)) == null ? void 0 : o[e];
210
+ return (o = r(d)) == null ? void 0 : o[e];
210
211
  }
211
212
  function k(e, o, n = !0) {
212
213
  a == null || a.setFieldValue(l.name, void 0, !0, (t, u) => {
@@ -238,27 +239,27 @@ const Ce = /* @__PURE__ */ P({
238
239
  scrollTo: z,
239
240
  setTableData: j,
240
241
  clear: O
241
- }), (e, o) => (U(), K(s(y).FormItem, g(e.formItem, {
242
+ }), (e, o) => (U(), K(r(y).FormItem, C(e.formItem, {
242
243
  name: e.name,
243
244
  label: e.label
244
245
  }), {
245
- default: C(() => [$(ne, g(s(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
246
+ default: g(() => [$(ne, C(r(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
246
247
  ref_key: "tableRef",
247
248
  ref: c,
248
- class: s(B)(),
249
- columns: s(D),
249
+ class: r(B)(),
250
+ columns: r(D),
250
251
  "data-source": d.value,
251
252
  "search-form": !1
252
253
  }), q({
253
254
  _: 2
254
255
  }, [J(R, (n, t) => ({
255
256
  name: t,
256
- fn: C((u) => [Q(e.$slots, t, X(Y(u || {})))])
257
+ fn: g((u) => [Q(e.$slots, t, X(Y(u || {})))])
257
258
  }))]), 1040, ["class", "columns", "data-source"])]),
258
259
  _: 3
259
260
  }, 16, ["name", "label"]));
260
261
  }
261
262
  });
262
263
  export {
263
- Ce as default
264
+ ge as default
264
265
  };
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as U, useSlots as $, ref as w, watch as x, unref as u, createBlock as q, openBlock as J, withCtx as h, createVNode as v, mergeProps as Q, createSlots as X, renderList as Y, renderSlot as Z, normalizeProps as M, guardReactiveProps as ee } from "vue";
2
2
  import { ApForm as g } from "../../ap-form/index.mjs";
3
- import { isEqual as ae, isArray as R, isUndefined as te, isNumber as y, cloneDeep as le, omit as oe } from "lodash-unified";
3
+ import { isEqual as ae, isArray as R, isUndefined as te, isNumber as C, cloneDeep as le, omit as oe } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
6
  import { isDef as b } from "../../utils/index.mjs";
7
7
  import { useGetEditableColumns as ne } from "../hooks/use-editable-columns.mjs";
8
8
  import "../index.vue2.mjs";
9
- import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useControllableValue as se } from "../../hooks/useControllableValue.mjs";
9
+ import { useNamespace as se } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useControllableValue as re } from "../../hooks/useControllableValue.mjs";
11
11
  import { useGlobalConfig as ue } from "../../config-provider/hooks/use-global-config.mjs";
12
12
  import ie from "../index.vue.mjs";
13
13
  const Re = /* @__PURE__ */ U({
@@ -114,6 +114,7 @@ const Re = /* @__PURE__ */ U({
114
114
  default: void 0
115
115
  },
116
116
  onLoadingChange: {},
117
+ onShownColumnsChange: {},
117
118
  pagination: {
118
119
  type: [Boolean, Object],
119
120
  default: !1
@@ -154,15 +155,15 @@ const Re = /* @__PURE__ */ U({
154
155
  },
155
156
  emits: ["update:value"],
156
157
  setup(B, {
157
- expose: F,
158
- emit: S
158
+ expose: S,
159
+ emit: F
159
160
  }) {
160
161
  const N = $(), t = B, {
161
162
  b: V
162
- } = re("editable-grid"), _ = S, C = w(), {
163
+ } = se("editable-grid"), _ = F, y = w(), {
163
164
  value: m,
164
165
  updateValue: L
165
- } = se(t, _), i = w(), E = ue("valueTypeMap"), c = g.useWatch(t.name, i);
166
+ } = re(t, _), i = w(), E = ue("valueTypeMap"), c = g.useWatch(t.name, i);
166
167
  x(() => c.value, (e) => {
167
168
  var a;
168
169
  L(e), (a = t.onChange) == null || a.call(t, e);
@@ -189,32 +190,32 @@ const Re = /* @__PURE__ */ U({
189
190
  return l == null ? void 0 : l[t.name];
190
191
  }
191
192
  function j(e, a) {
192
- var n, r, s;
193
+ var n, s, r;
193
194
  const l = ((n = u(m)) == null ? void 0 : n.length) || 0;
194
195
  if (b(t.maxLength) && l >= t.maxLength)
195
196
  return;
196
197
  const o = {
197
198
  ...e || {}
198
199
  };
199
- (s = (r = i.value) == null ? void 0 : r.setFieldValue) == null || s.call(r, t.name, o, !0, (d, f) => {
200
+ (r = (s = i.value) == null ? void 0 : s.setFieldValue) == null || r.call(s, t.name, o, !0, (d, f) => {
200
201
  d[f] || (d[f] = [o]), te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
201
202
  });
202
203
  }
203
204
  function z(e, a = "suffix") {
204
- var r, s, d;
205
- const l = ((r = u(m)) == null ? void 0 : r.length) || 0, o = y(e) ? e : e.length;
205
+ var s, r, d;
206
+ const l = ((s = u(m)) == null ? void 0 : s.length) || 0, o = C(e) ? e : e.length;
206
207
  if (b(t.maxLength) && l + o > t.maxLength)
207
208
  return;
208
- const n = y(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
209
- (d = (s = i.value) == null ? void 0 : s.setFieldValue) == null || d.call(s, t.name, n, !0, (f, p) => {
209
+ const n = C(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
210
+ (d = (r = i.value) == null ? void 0 : r.setFieldValue) == null || d.call(r, t.name, n, !0, (f, p) => {
210
211
  f[p] || (f[p] = [...n]), a === "suffix" ? f[p].push(...n) : f[p].unshift(...n);
211
212
  });
212
213
  }
213
214
  function I(e) {
214
215
  var l, o;
215
- const a = new Set(y(e) ? [e] : e);
216
- (o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n, r) => {
217
- n[r] = n[r].filter((s, d) => !a.has(d));
216
+ const a = new Set(C(e) ? [e] : e);
217
+ (o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n, s) => {
218
+ n[s] = n[s].filter((r, d) => !a.has(d));
218
219
  });
219
220
  }
220
221
  function O() {
@@ -230,9 +231,9 @@ const Re = /* @__PURE__ */ U({
230
231
  }
231
232
  function W(e, a, l = !0) {
232
233
  var o, n;
233
- (n = (o = i.value) == null ? void 0 : o.setFieldValue) == null || n.call(o, t.name, void 0, !0, (r, s) => {
234
- !r[s] || !r[s][e] || (r[s][e] = {
235
- ...l ? r[s][e] : {},
234
+ (n = (o = i.value) == null ? void 0 : o.setFieldValue) == null || n.call(o, t.name, void 0, !0, (s, r) => {
235
+ !s[r] || !s[r][e] || (s[r][e] = {
236
+ ...l ? s[r][e] : {},
236
237
  ...a
237
238
  });
238
239
  });
@@ -240,13 +241,13 @@ const Re = /* @__PURE__ */ U({
240
241
  function G(e) {
241
242
  var l;
242
243
  const a = e === "end" ? m.value.length - 1 : e;
243
- (l = C.value) == null || l.scrollToRow(a);
244
+ (l = y.value) == null || l.scrollToRow(a);
244
245
  }
245
246
  function K() {
246
247
  var e, a;
247
248
  (a = (e = i.value) == null ? void 0 : e.setFieldValue) == null || a.call(e, t.name, []);
248
249
  }
249
- return F({
250
+ return S({
250
251
  resetFields: T,
251
252
  validateFields: A,
252
253
  add: j,
@@ -274,7 +275,7 @@ const Re = /* @__PURE__ */ U({
274
275
  }, {
275
276
  default: h(() => [v(ie, Q(u(oe)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
276
277
  ref_key: "tableRef",
277
- ref: C,
278
+ ref: y,
278
279
  class: u(V)(),
279
280
  columns: u(D),
280
281
  "data-source": u(m),