@aplus-frontend/ui 7.20.2 → 7.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +73 -71
- package/es/src/ag-grid/editable/form-item.vue.mjs +72 -70
- package/es/src/ag-grid/editable/index.vue.mjs +59 -57
- package/es/src/ag-grid/editable/interface.d.ts +7 -0
- package/es/src/ag-grid/hooks/use-columns.mjs +18 -18
- package/es/src/ag-grid/hooks/use-editable-api.d.ts +1 -0
- package/es/src/ag-grid/hooks/use-editable-api.mjs +107 -88
- package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
- package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +105 -86
- package/es/src/ag-grid/index.vue.mjs +230 -227
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +14 -14
- package/es/src/ap-list/hooks/use-offline-list.mjs +31 -18
- package/es/src/business/ag-grid-container/index.d.ts +3 -0
- package/es/src/business/ag-grid-container/index.mjs +2 -0
- package/es/src/business/ag-grid-container/index.vue.d.ts +33 -0
- package/es/src/business/ag-grid-container/index.vue.mjs +64 -0
- package/es/src/business/ag-grid-container/index.vue2.mjs +4 -0
- package/es/src/business/ag-grid-container/interface.d.ts +4 -0
- package/es/src/business/ag-grid-container/interface.mjs +1 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +55 -54
- package/es/src/check-card/index.vue.d.ts +0 -1
- package/es/src/check-card/index.vue2.mjs +3 -5
- package/es/src/config-provider/config-provider-props.d.ts +1 -1
- package/es/src/config-provider/config-provider.d.ts +3 -0
- package/es/src/config-provider/config-provider.mjs +1 -1
- package/es/src/config-provider/hooks/use-global-config.d.ts +2 -0
- package/es/src/config-provider/index.d.ts +4 -0
- package/es/src/highlight/index.vue.mjs +9 -9
- package/es/src/index.mjs +82 -80
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/editable/interface.d.ts +7 -0
- package/lib/src/ag-grid/hooks/use-columns.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-api.d.ts +1 -0
- package/lib/src/ag-grid/hooks/use-editable-api.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
- package/lib/src/ap-list/hooks/use-offline-list.js +1 -1
- package/lib/src/business/ag-grid-container/index.d.ts +3 -0
- package/lib/src/business/ag-grid-container/index.js +1 -0
- package/lib/src/business/ag-grid-container/index.vue.d.ts +33 -0
- package/lib/src/business/ag-grid-container/index.vue.js +1 -0
- package/lib/src/business/ag-grid-container/index.vue2.js +1 -0
- package/lib/src/business/ag-grid-container/interface.d.ts +4 -0
- package/lib/src/business/ag-grid-container/interface.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/check-card/index.vue.d.ts +0 -1
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +1 -1
- package/lib/src/config-provider/config-provider.d.ts +3 -0
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +2 -0
- package/lib/src/config-provider/index.d.ts +4 -0
- package/lib/src/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +4 -4
package/es/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import "./src/hooks/index.mjs";
|
|
|
4
4
|
import { configProviderProps as s } from "./src/config-provider/config-provider-props.mjs";
|
|
5
5
|
import { DEFAULT_NAMESPACE as A, DEFAULT_UIMODE as i, configProviderContextKey as n } from "./src/config-provider/constants.mjs";
|
|
6
6
|
import { keysOf as F, provideGlobalConfig as g, useGlobalConfig as I } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
7
|
-
import { buildLocaleContext as T, buildTranslator as
|
|
7
|
+
import { buildLocaleContext as T, buildTranslator as C, localeContextKey as b, translate as G, useLocale as D } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
8
|
import { defaultNamespace as P, namespaceContextKey as E, useGetDerivedNamespace as L, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
9
|
import { ConfigProvider as N, globalConfigCached as w } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as M } from "./src/config-provider/index.mjs";
|
|
@@ -28,7 +28,7 @@ import { default as ne } from "./src/ap-form/search-form/index.vue.mjs";
|
|
|
28
28
|
import { default as Fe } from "./src/ap-form/modal-form/index.vue.mjs";
|
|
29
29
|
import { default as Ie } from "./src/ap-form/dependency/index.vue.mjs";
|
|
30
30
|
import { default as Te } from "./src/ap-form/set/index.vue.mjs";
|
|
31
|
-
import { default as
|
|
31
|
+
import { default as be } from "./src/ap-form/drawer-form/index.vue.mjs";
|
|
32
32
|
import { default as De } from "./src/ap-form/render/control.vue.mjs";
|
|
33
33
|
import { default as Pe } from "./src/ap-form/render/item.vue.mjs";
|
|
34
34
|
import { default as Le } from "./src/ap-form/provider/index.vue.mjs";
|
|
@@ -53,7 +53,7 @@ import { adminToken as Ao, aplusToken as io } from "./src/design-token/index.mjs
|
|
|
53
53
|
import { ApActionItem as co } from "./src/ap-action/index.mjs";
|
|
54
54
|
import { default as go } from "./src/ap-action/item-modal/index.vue.mjs";
|
|
55
55
|
import { default as So } from "./src/ap-action/item-popconfirm/index.vue.mjs";
|
|
56
|
-
import { default as
|
|
56
|
+
import { default as Co } from "./src/ap-action/item-dropdown/index.vue.mjs";
|
|
57
57
|
import { default as Go } from "./src/ap-action/group/index.vue.mjs";
|
|
58
58
|
import { CheckCard as ho } from "./src/check-card/index.mjs";
|
|
59
59
|
import { default as Eo } from "./src/check-card/group.vue.mjs";
|
|
@@ -80,7 +80,7 @@ import { ApButtonGroup as nr } from "./src/business/ap-button-group/index.mjs";
|
|
|
80
80
|
import { ApCard as Fr } from "./src/business/ap-card/index.mjs";
|
|
81
81
|
import { default as Ir } from "./src/business/ap-expand-alert/ApExpandAlert.vue.mjs";
|
|
82
82
|
import { ApExportGroupActionType as Tr } from "./src/business/ap-export-group/interface.mjs";
|
|
83
|
-
import { ApExportGroup as
|
|
83
|
+
import { ApExportGroup as br } from "./src/business/ap-export-group/index.mjs";
|
|
84
84
|
import { handleExportDownload as Dr } from "./src/business/ap-export-group/handleExportDownload.mjs";
|
|
85
85
|
import { convertExportField as Pr } from "./src/business/ap-export-group/convertExportField.mjs";
|
|
86
86
|
import { ApImage as Lr } from "./src/business/ap-image/index.mjs";
|
|
@@ -104,7 +104,7 @@ import { default as it } from "./src/business/batch-input-group/form-item.vue.mj
|
|
|
104
104
|
import { ApSizeInput as ct } from "./src/business/ap-size-input/index.mjs";
|
|
105
105
|
import { default as gt } from "./src/business/ap-size-input/form-item.vue.mjs";
|
|
106
106
|
import { ApProductInfo as St } from "./src/business/ap-product-info/index.mjs";
|
|
107
|
-
import { ApCopy as
|
|
107
|
+
import { ApCopy as Ct } from "./src/business/ap-copy/index.mjs";
|
|
108
108
|
import { ApView as Gt } from "./src/business/ap-view/index.mjs";
|
|
109
109
|
import { ApRadioGroup as ht } from "./src/business/ap-radio-group/index.mjs";
|
|
110
110
|
import { ApKeepAliveProps as Et, forceStopTags as Lt } from "./src/business/ap-keep-alive/interface.mjs";
|
|
@@ -126,36 +126,37 @@ import { default as ap } from "./src/business/ap-download/ap-download.vue.mjs";
|
|
|
126
126
|
import { formatString as mp } from "./src/business/ap-descriptions/formatter/utils.mjs";
|
|
127
127
|
import { default as dp } from "./src/business/ap-descriptions/ap-descriptions.vue.mjs";
|
|
128
128
|
import { ApFilePreview as sp } from "./src/business/ap-file-preview/index.mjs";
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import { default as Ip } from "./src/
|
|
133
|
-
import { default as Tp } from "./src/editable-table/
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
import { default as Pp } from "./src/scroll-bar/
|
|
137
|
-
import { default as Lp } from "./src/scroll-
|
|
138
|
-
import { default as vp } from "./src/
|
|
139
|
-
import { default as wp } from "./src/
|
|
140
|
-
import { default as Mp } from "./src/
|
|
141
|
-
import {
|
|
142
|
-
import {
|
|
143
|
-
import {
|
|
144
|
-
import { default as _p } from "./src/ap-grid/
|
|
145
|
-
import { default as $p } from "./src/ap-grid/editable/
|
|
146
|
-
import { default as Wp } from "./src/
|
|
147
|
-
import { default as Jp } from "./src/text/
|
|
148
|
-
import { default as Xp } from "./src/
|
|
149
|
-
import {
|
|
150
|
-
import {
|
|
151
|
-
import { default as ta } from "./src/ag-grid/
|
|
152
|
-
import { default as aa } from "./src/ag-grid/editable/
|
|
153
|
-
import {
|
|
154
|
-
import {
|
|
155
|
-
import {
|
|
156
|
-
import {
|
|
157
|
-
import {
|
|
158
|
-
import {
|
|
129
|
+
import { default as Ap } from "./src/business/ag-grid-container/index.vue.mjs";
|
|
130
|
+
import { useTablePaging as np } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
131
|
+
import { ApTable as Fp } from "./src/ap-table/index.mjs";
|
|
132
|
+
import { default as Ip } from "./src/ap-table/components/setting/modal/index.vue.mjs";
|
|
133
|
+
import { default as Tp } from "./src/editable-table/index.vue.mjs";
|
|
134
|
+
import { default as bp } from "./src/editable-table/form-item.vue.mjs";
|
|
135
|
+
import { ensureRangeValue as Dp } from "./src/scroll-bar/utils/index.mjs";
|
|
136
|
+
import { default as Pp } from "./src/scroll-bar/index.vue.mjs";
|
|
137
|
+
import { default as Lp } from "./src/scroll-bar/internal.vue.mjs";
|
|
138
|
+
import { default as vp } from "./src/scroll-view/index.vue.mjs";
|
|
139
|
+
import { default as wp } from "./src/portal/index.vue.mjs";
|
|
140
|
+
import { default as Mp } from "./src/full-screen/index.vue.mjs";
|
|
141
|
+
import { default as kp } from "./src/resize-observer/index.vue.mjs";
|
|
142
|
+
import { ROW_SELECTION_FIELD as Up } from "./src/ap-grid/constants.mjs";
|
|
143
|
+
import { toTreeArray as Vp } from "./src/ap-grid/utils/to-tree-array.mjs";
|
|
144
|
+
import { default as _p } from "./src/ap-grid/index.vue.mjs";
|
|
145
|
+
import { default as $p } from "./src/ap-grid/editable/index.vue.mjs";
|
|
146
|
+
import { default as Wp } from "./src/ap-grid/editable/form-item.vue.mjs";
|
|
147
|
+
import { default as Jp } from "./src/text/index.vue.mjs";
|
|
148
|
+
import { default as Xp } from "./src/text/group.vue.mjs";
|
|
149
|
+
import { default as Zp } from "./src/mask/index.vue.mjs";
|
|
150
|
+
import { Splitter as oa } from "./src/splitter/index.mjs";
|
|
151
|
+
import { default as ta } from "./src/ag-grid/index.vue.mjs";
|
|
152
|
+
import { default as aa } from "./src/ag-grid/editable/index.vue.mjs";
|
|
153
|
+
import { default as ma } from "./src/ag-grid/editable/form-item.vue.mjs";
|
|
154
|
+
import { ApSkeleton as da } from "./src/skeleton/index.mjs";
|
|
155
|
+
import { useControllableValue as sa } from "./src/hooks/useControllableValue.mjs";
|
|
156
|
+
import { useManualRef as Aa } from "./src/hooks/useManualRef.mjs";
|
|
157
|
+
import { useThrottleRef as na } from "./src/hooks/useThrottleRef.mjs";
|
|
158
|
+
import { useFullScreen as Fa } from "./src/hooks/useFullScreen.mjs";
|
|
159
|
+
import { useResize as Ia } from "./src/hooks/useResize.mjs";
|
|
159
160
|
const a = console.log;
|
|
160
161
|
a(`UI version: ${p}`);
|
|
161
162
|
const l = {
|
|
@@ -168,11 +169,12 @@ const l = {
|
|
|
168
169
|
};
|
|
169
170
|
export {
|
|
170
171
|
M as APConfigProvider,
|
|
171
|
-
|
|
172
|
+
ta as AgGrid,
|
|
173
|
+
Ap as AgGridContainer,
|
|
172
174
|
Bo as ApActionButton,
|
|
173
175
|
Go as ApActionGroup,
|
|
174
176
|
co as ApActionItem,
|
|
175
|
-
|
|
177
|
+
Co as ApActionItemDropdown,
|
|
176
178
|
go as ApActionItemModal,
|
|
177
179
|
So as ApActionItemPopconfirm,
|
|
178
180
|
lt as ApAppendix,
|
|
@@ -183,14 +185,14 @@ export {
|
|
|
183
185
|
nr as ApButtonGroup,
|
|
184
186
|
Fr as ApCard,
|
|
185
187
|
Ko as ApConfirmButton,
|
|
186
|
-
|
|
188
|
+
Ct as ApCopy,
|
|
187
189
|
dp as ApDescriptions,
|
|
188
190
|
tp as ApDownLoadNeedNameKeyDefault,
|
|
189
191
|
ap as ApDownload,
|
|
190
192
|
Ut as ApDraggableGrid,
|
|
191
193
|
Oo as ApDrawer,
|
|
192
194
|
Ir as ApExpandAlert,
|
|
193
|
-
|
|
195
|
+
br as ApExportGroup,
|
|
194
196
|
Tr as ApExportGroupActionType,
|
|
195
197
|
ve as ApField,
|
|
196
198
|
so as ApFieldCascader,
|
|
@@ -214,7 +216,7 @@ export {
|
|
|
214
216
|
me as ApForm,
|
|
215
217
|
De as ApFormControlRender,
|
|
216
218
|
Ie as ApFormDependency,
|
|
217
|
-
|
|
219
|
+
be as ApFormDrawerForm,
|
|
218
220
|
de as ApFormItem,
|
|
219
221
|
it as ApFormItemBatchInput,
|
|
220
222
|
ae as ApFormItemCascader,
|
|
@@ -237,7 +239,7 @@ export {
|
|
|
237
239
|
Le as ApFormProvider,
|
|
238
240
|
ne as ApFormSearchForm,
|
|
239
241
|
Te as ApFormSet,
|
|
240
|
-
|
|
242
|
+
_p as ApGrid,
|
|
241
243
|
Lr as ApImage,
|
|
242
244
|
vr as ApInputRadio,
|
|
243
245
|
vt as ApKeepAlive,
|
|
@@ -254,18 +256,18 @@ export {
|
|
|
254
256
|
Or as ApSelectLayout,
|
|
255
257
|
Wt as ApSelectedItems,
|
|
256
258
|
ct as ApSizeInput,
|
|
257
|
-
|
|
259
|
+
da as ApSkeleton,
|
|
258
260
|
_o as ApStatisticCard,
|
|
259
261
|
zr as ApStatus,
|
|
260
262
|
_r as ApStatusGroup,
|
|
261
263
|
pt as ApSummary,
|
|
262
|
-
|
|
264
|
+
Fp as ApTable,
|
|
263
265
|
tr as ApTableModal,
|
|
264
|
-
|
|
266
|
+
Ip as ApTableSetting,
|
|
265
267
|
Jt as ApTag,
|
|
266
268
|
Xt as ApTagGroup,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
+
Jp as ApText,
|
|
270
|
+
Xp as ApTextGroup,
|
|
269
271
|
$r as ApTitle,
|
|
270
272
|
or as ApTransformDataHelper,
|
|
271
273
|
op as ApUpload,
|
|
@@ -278,38 +280,38 @@ export {
|
|
|
278
280
|
N as ConfigProvider,
|
|
279
281
|
A as DEFAULT_NAMESPACE,
|
|
280
282
|
i as DEFAULT_UIMODE,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
283
|
+
aa as EditableAgGrid,
|
|
284
|
+
ma as EditableAgGridFormItem,
|
|
285
|
+
$p as EditableGrid,
|
|
286
|
+
Wp as EditableGridFormItem,
|
|
287
|
+
Tp as EditableTable,
|
|
288
|
+
bp as EditableTableFormItem,
|
|
289
|
+
Mp as FullScreen,
|
|
288
290
|
Zo as Highlight,
|
|
289
|
-
|
|
291
|
+
Lp as InternalScrollBar,
|
|
290
292
|
$o as LoadingBar,
|
|
291
293
|
wt as LruCacher,
|
|
292
|
-
|
|
294
|
+
Zp as Mask,
|
|
293
295
|
Zt as NeedNameKeyDefault,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
+
wp as Portal,
|
|
297
|
+
Up as ROW_SELECTION_FIELD,
|
|
296
298
|
Wo as Render,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
299
|
+
kp as ResizeObserver,
|
|
300
|
+
Pp as ScrollBar,
|
|
301
|
+
vp as ScrollView,
|
|
302
|
+
oa as Splitter,
|
|
301
303
|
Jo as TimeAgo,
|
|
302
304
|
Ao as adminToken,
|
|
303
305
|
io as aplusToken,
|
|
304
306
|
T as buildLocaleContext,
|
|
305
|
-
|
|
307
|
+
C as buildTranslator,
|
|
306
308
|
Zr as computedRecords,
|
|
307
309
|
n as configProviderContextKey,
|
|
308
310
|
s as configProviderProps,
|
|
309
311
|
Pr as convertExportField,
|
|
310
312
|
l as default,
|
|
311
313
|
P as defaultNamespace,
|
|
312
|
-
|
|
314
|
+
Dp as ensureRangeValue,
|
|
313
315
|
et as flattenColumns,
|
|
314
316
|
Lt as forceStopTags,
|
|
315
317
|
ot as formatDataIndex,
|
|
@@ -319,29 +321,29 @@ export {
|
|
|
319
321
|
Dr as handleExportDownload,
|
|
320
322
|
kt as isNameMatches,
|
|
321
323
|
F as keysOf,
|
|
322
|
-
|
|
324
|
+
b as localeContextKey,
|
|
323
325
|
Br as locales,
|
|
324
326
|
E as namespaceContextKey,
|
|
325
327
|
g as provideGlobalConfig,
|
|
326
|
-
|
|
328
|
+
Vp as toTreeArray,
|
|
327
329
|
G as translate,
|
|
328
330
|
_t as useAgGridModal,
|
|
329
331
|
$t as useAgGridSelectModal,
|
|
330
332
|
Mt as useApKeepAliveInject,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
+
sa as useControllableValue,
|
|
334
|
+
Fa as useFullScreen,
|
|
333
335
|
L as useGetDerivedNamespace,
|
|
334
336
|
I as useGlobalConfig,
|
|
335
337
|
D as useLocale,
|
|
336
|
-
|
|
338
|
+
Aa as useManualRef,
|
|
337
339
|
R as useNamespace,
|
|
338
340
|
Xr as usePageListAgGrid,
|
|
339
341
|
Jr as usePageListApGrid,
|
|
340
342
|
Wr as usePageListApTable,
|
|
341
|
-
|
|
343
|
+
Ia as useResize,
|
|
342
344
|
ar as useTableModal,
|
|
343
|
-
|
|
345
|
+
np as useTablePaging,
|
|
344
346
|
mr as useTableSelectModal,
|
|
345
|
-
|
|
347
|
+
na as useThrottleRef,
|
|
346
348
|
Xo as useTimeAgo
|
|
347
349
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isEqual as C, cloneDeep as
|
|
1
|
+
import { defineComponent as X, useSlots as Y, ref as y, watch as w, unref as l, createElementBlock as Z, openBlock as ee, Fragment as oe, createVNode as c, mergeProps as g, withCtx as h, createSlots as te, renderList as ae, renderSlot as ne, normalizeProps as le, guardReactiveProps as re } from "vue";
|
|
2
|
+
import { isEqual as C, cloneDeep as se, omit as ie } from "lodash-unified";
|
|
3
3
|
import { ApForm as b } from "../../ap-form/index.mjs";
|
|
4
|
-
import { useInjectForm as
|
|
4
|
+
import { useInjectForm as me } from "../../ap-form/context.mjs";
|
|
5
5
|
import { useWatch as R } from "../../ap-form/hooks/use-watch.mjs";
|
|
6
|
-
import { getModelValue as
|
|
7
|
-
import { transformValues as
|
|
6
|
+
import { getModelValue as ue } from "../../ap-form/utils/get.mjs";
|
|
7
|
+
import { transformValues as de } from "../../ap-form/utils/transform.mjs";
|
|
8
8
|
import "../../config-provider/index.mjs";
|
|
9
|
-
import { useGetEditableColumns as
|
|
10
|
-
import { useEditableFormItemApi as
|
|
9
|
+
import { useGetEditableColumns as pe } from "../hooks/use-editable-columns.mjs";
|
|
10
|
+
import { useEditableFormItemApi as ce } from "../hooks/use-editable-form-item-api.mjs";
|
|
11
11
|
import "../index.vue2.mjs";
|
|
12
|
-
import
|
|
13
|
-
import { getShadowName as
|
|
14
|
-
import { getColumnTransformOptions as we, arrayToObject as
|
|
15
|
-
import { useNamespace as
|
|
16
|
-
import { useGlobalConfig as
|
|
17
|
-
import
|
|
18
|
-
const
|
|
12
|
+
import fe from "../style/editable.mjs";
|
|
13
|
+
import { getShadowName as ye } from "../utils.mjs";
|
|
14
|
+
import { getColumnTransformOptions as we, arrayToObject as ge, getRowKey as he } from "./utils.mjs";
|
|
15
|
+
import { useNamespace as Ce } from "../../config-provider/hooks/use-namespace.mjs";
|
|
16
|
+
import { useGlobalConfig as be } from "../../config-provider/hooks/use-global-config.mjs";
|
|
17
|
+
import Re from "../index.vue.mjs";
|
|
18
|
+
const Oe = /* @__PURE__ */ X({
|
|
19
19
|
name: "EditableGrid",
|
|
20
20
|
__name: "form-item",
|
|
21
21
|
props: {
|
|
@@ -143,33 +143,33 @@ const ze = /* @__PURE__ */ Q({
|
|
|
143
143
|
name: {},
|
|
144
144
|
formItem: {}
|
|
145
145
|
},
|
|
146
|
-
setup(
|
|
147
|
-
expose:
|
|
146
|
+
setup(B, {
|
|
147
|
+
expose: v
|
|
148
148
|
}) {
|
|
149
|
-
const x =
|
|
149
|
+
const x = Y(), a = B, {
|
|
150
150
|
b: T
|
|
151
|
-
} =
|
|
151
|
+
} = Ce("editable-aggrid"), S = fe("editable-aggrid"), r = y(), {
|
|
152
152
|
internalInstance: s
|
|
153
|
-
} =
|
|
153
|
+
} = me();
|
|
154
154
|
function I(e) {
|
|
155
155
|
const o = we(a.columns || []);
|
|
156
156
|
if (!Object.keys(o).length || !e?.length)
|
|
157
157
|
return e;
|
|
158
158
|
let t = [];
|
|
159
159
|
for (const m of e)
|
|
160
|
-
t.push(
|
|
160
|
+
t.push(de(m, o));
|
|
161
161
|
return t;
|
|
162
162
|
}
|
|
163
|
-
const i =
|
|
163
|
+
const i = ye(a.name);
|
|
164
164
|
function F() {
|
|
165
|
-
return a.formItem?.initialValue ??
|
|
165
|
+
return a.formItem?.initialValue ?? ue(s?.getInitialValues() ?? {}, a.name) ?? [];
|
|
166
166
|
}
|
|
167
167
|
let V = F();
|
|
168
|
-
const n =
|
|
169
|
-
|
|
168
|
+
const n = y([]), E = R(a.name), D = R(i);
|
|
169
|
+
w(() => E.value, (e) => {
|
|
170
170
|
if (C(e, n.value))
|
|
171
171
|
return;
|
|
172
|
-
const o = e ??
|
|
172
|
+
const o = e ?? se(V);
|
|
173
173
|
n.value = [...o];
|
|
174
174
|
}, {
|
|
175
175
|
deep: !0,
|
|
@@ -177,8 +177,8 @@ const ze = /* @__PURE__ */ Q({
|
|
|
177
177
|
immediate: !0
|
|
178
178
|
});
|
|
179
179
|
let u;
|
|
180
|
-
|
|
181
|
-
const o =
|
|
180
|
+
w(n, (e) => {
|
|
181
|
+
const o = ge(e, a.rowKey);
|
|
182
182
|
C(o, l(D)) || (u = () => {
|
|
183
183
|
s?.setFieldValue(a.name, [...e]), s?.setFieldValue(i, o);
|
|
184
184
|
});
|
|
@@ -186,20 +186,21 @@ const ze = /* @__PURE__ */ Q({
|
|
|
186
186
|
deep: !0,
|
|
187
187
|
immediate: !0
|
|
188
188
|
});
|
|
189
|
-
const
|
|
190
|
-
add:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
189
|
+
const K = be("valueTypeMap"), N = pe(a, K, i), {
|
|
190
|
+
add: A,
|
|
191
|
+
addByKey: j,
|
|
192
|
+
addMultiple: _,
|
|
193
|
+
remove: k,
|
|
194
|
+
removeByKey: z,
|
|
195
|
+
getRowData: O,
|
|
196
|
+
getRowsData: U,
|
|
197
|
+
getRowDataByKey: H,
|
|
198
|
+
setRowData: L,
|
|
199
|
+
setRowDataByKey: P,
|
|
200
|
+
clear: G,
|
|
200
201
|
refreshRowIds: d
|
|
201
|
-
} =
|
|
202
|
-
function
|
|
202
|
+
} = ce(a, s, n, i);
|
|
203
|
+
function M() {
|
|
203
204
|
if (a.onUpdate?.(), u && (u(), u = void 0), a.supressForceRowUpdate)
|
|
204
205
|
return;
|
|
205
206
|
const e = r.value?._internalGridApi;
|
|
@@ -211,51 +212,52 @@ const ze = /* @__PURE__ */ Q({
|
|
|
211
212
|
force: !0
|
|
212
213
|
}), d.value = [];
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
+
function W(e) {
|
|
215
216
|
n.value = [...e];
|
|
216
217
|
}
|
|
217
218
|
function f(e, o) {
|
|
218
219
|
const t = e === "end" ? n.value.length - 1 : e;
|
|
219
220
|
r.value?.scrollToRow(t, o);
|
|
220
221
|
}
|
|
221
|
-
function
|
|
222
|
+
function $(e, o) {
|
|
222
223
|
r.value?.scrollToColumn(e, o);
|
|
223
224
|
}
|
|
224
|
-
function
|
|
225
|
+
function q(e, o) {
|
|
225
226
|
const t = [i, String(e), o].flat();
|
|
226
227
|
return s?.validateFields([t]);
|
|
227
228
|
}
|
|
228
|
-
function
|
|
229
|
-
const t = l(n).map((m, p) => [i, String(
|
|
229
|
+
function J(e) {
|
|
230
|
+
const t = l(n).map((m, p) => [i, String(he(m, p, a.rowKey)), e].flat());
|
|
230
231
|
return s?.validateFields(t);
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function Q(e, o = !0) {
|
|
233
234
|
const t = Array.isArray(e) ? e : [e];
|
|
234
235
|
r.value?._internalGridApi?.refreshCells({
|
|
235
236
|
columns: t,
|
|
236
237
|
force: o
|
|
237
238
|
});
|
|
238
239
|
}
|
|
239
|
-
return
|
|
240
|
-
add:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
240
|
+
return v({
|
|
241
|
+
add: A,
|
|
242
|
+
addByKey: j,
|
|
243
|
+
addMultiple: _,
|
|
244
|
+
remove: k,
|
|
245
|
+
removeByKey: z,
|
|
246
|
+
getRowData: O,
|
|
247
|
+
getRowsData: U,
|
|
248
|
+
getRowDataByKey: H,
|
|
249
|
+
setRowData: L,
|
|
250
|
+
clear: G,
|
|
251
|
+
setTableData: W,
|
|
250
252
|
scrollTo: f,
|
|
251
253
|
scrollToRow: f,
|
|
252
|
-
scrollToColumn:
|
|
253
|
-
validateCell:
|
|
254
|
-
validateColumn:
|
|
255
|
-
setRowDataByKey:
|
|
254
|
+
scrollToColumn: $,
|
|
255
|
+
validateCell: q,
|
|
256
|
+
validateColumn: J,
|
|
257
|
+
setRowDataByKey: P,
|
|
256
258
|
table: r,
|
|
257
|
-
refreshColumns:
|
|
258
|
-
}), (e, o) => (
|
|
259
|
+
refreshColumns: Q
|
|
260
|
+
}), (e, o) => (ee(), Z(oe, null, [c(l(b).FormItem, {
|
|
259
261
|
hidden: "",
|
|
260
262
|
name: e.name,
|
|
261
263
|
"initial-value": e.formItem?.initialValue,
|
|
@@ -263,25 +265,25 @@ const ze = /* @__PURE__ */ Q({
|
|
|
263
265
|
}, null, 8, ["name", "initial-value"]), c(l(b).FormItem, g({
|
|
264
266
|
label: e.label
|
|
265
267
|
}, e.formItem), {
|
|
266
|
-
default: h(() => [c(
|
|
268
|
+
default: h(() => [c(Re, g(l(ie)(a, ["name", "maxLength", "onChange", "defaultValue", "formItem", "onUpdate"]), {
|
|
267
269
|
ref_key: "tableRef",
|
|
268
270
|
ref: r,
|
|
269
271
|
class: [l(T)(), l(S)],
|
|
270
272
|
size: "mini",
|
|
271
|
-
columns: l(
|
|
273
|
+
columns: l(N),
|
|
272
274
|
"data-source": n.value,
|
|
273
275
|
"search-form": !1,
|
|
274
|
-
onUpdate:
|
|
275
|
-
}),
|
|
276
|
+
onUpdate: M
|
|
277
|
+
}), te({
|
|
276
278
|
_: 2
|
|
277
|
-
}, [
|
|
279
|
+
}, [ae(x, (t, m) => ({
|
|
278
280
|
name: m,
|
|
279
|
-
fn: h((p) => [
|
|
281
|
+
fn: h((p) => [ne(e.$slots, m, le(re(p || {})))])
|
|
280
282
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
281
283
|
_: 3
|
|
282
284
|
}, 16, ["label"])], 64));
|
|
283
285
|
}
|
|
284
286
|
});
|
|
285
287
|
export {
|
|
286
|
-
|
|
288
|
+
Oe as default
|
|
287
289
|
};
|