@aplus-frontend/ui 7.17.1 → 7.17.3
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 +29 -31
- package/es/src/ag-grid/editable/form-item.vue.mjs +48 -48
- package/es/src/ag-grid/index.vue.mjs +180 -183
- package/es/src/ap-field/cascader/index.vue.mjs +64 -67
- package/es/src/ap-field/interface.d.ts +6 -1
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.mjs +139 -128
- package/es/src/ap-field/select/read.vue2.mjs +1 -0
- package/es/src/ap-form/interface.d.ts +18 -0
- package/es/src/ap-form/items/select/index.vue.d.ts +8 -6
- package/es/src/ap-form/items/switch/index.vue.d.ts +1 -1
- package/es/src/ap-table/constants.d.ts +7 -6
- package/es/src/check-card/index.vue2.mjs +61 -64
- package/es/src/hooks/index.d.ts +0 -1
- package/es/src/hooks/index.mjs +10 -12
- 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/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +6 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +18 -0
- package/lib/src/ap-form/items/select/index.vue.d.ts +8 -6
- package/lib/src/ap-form/items/switch/index.vue.d.ts +1 -1
- package/lib/src/ap-table/constants.d.ts +7 -6
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/hooks/index.d.ts +0 -1
- package/lib/src/hooks/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/es/src/hooks/useMessage.d.ts +0 -62
- package/es/src/hooks/useMessage.mjs +0 -86
- package/lib/src/hooks/useMessage.d.ts +0 -62
- package/lib/src/hooks/useMessage.js +0 -1
package/es/index.mjs
CHANGED
|
@@ -6,8 +6,8 @@ import { DEFAULT_NAMESPACE as A, DEFAULT_UIMODE as i, configProviderContextKey a
|
|
|
6
6
|
import { keysOf as F, provideGlobalConfig as g, useGlobalConfig as I } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
7
7
|
import { buildLocaleContext as T, buildTranslator as b, localeContextKey as C, 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
|
-
import { ConfigProvider as N, globalConfigCached as
|
|
10
|
-
import { APConfigProvider as
|
|
9
|
+
import { ConfigProvider as N, globalConfigCached as w } from "./src/config-provider/config-provider.mjs";
|
|
10
|
+
import { APConfigProvider as M } from "./src/config-provider/index.mjs";
|
|
11
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";
|
|
@@ -33,7 +33,7 @@ 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";
|
|
35
35
|
import { ApField as ve, ApFieldRead as Ne } from "./src/ap-field/index.mjs";
|
|
36
|
-
import { ApFieldText as
|
|
36
|
+
import { ApFieldText as ye } from "./src/ap-field/text/index.mjs";
|
|
37
37
|
import { default as Be } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
38
38
|
import { default as Ke } from "./src/ap-field/date/index.vue.mjs";
|
|
39
39
|
import { default as Oe } from "./src/ap-field/number/index.vue.mjs";
|
|
@@ -59,7 +59,7 @@ import { CheckCard as ho } from "./src/check-card/index.mjs";
|
|
|
59
59
|
import { default as Eo } from "./src/check-card/group.vue.mjs";
|
|
60
60
|
import { ApModal as Ro } from "./src/ap-modal/index.mjs";
|
|
61
61
|
import { default as No } from "./src/ap-list/index.vue.mjs";
|
|
62
|
-
import { default as
|
|
62
|
+
import { default as yo } from "./src/ap-button/ap-button.vue.mjs";
|
|
63
63
|
import { default as Bo } from "./src/ap-button/ap-action-button.vue.mjs";
|
|
64
64
|
import { default as Ko } from "./src/ap-button/ap-confirm-button.vue.mjs";
|
|
65
65
|
import { ApDrawer as Oo } from "./src/ap-drawer/index.mjs";
|
|
@@ -85,7 +85,7 @@ import { handleExportDownload as Dr } from "./src/business/ap-export-group/handl
|
|
|
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";
|
|
87
87
|
import { ApInputRadio as vr } from "./src/business/ap-input-radio/index.mjs";
|
|
88
|
-
import { ApLabel as
|
|
88
|
+
import { ApLabel as wr, ApLabelGroup as yr } from "./src/business/ap-label/index.mjs";
|
|
89
89
|
import { locales as Br } from "./src/business/ap-ladder/interface.mjs";
|
|
90
90
|
import { ApLadder as Kr } from "./src/business/ap-ladder/index.mjs";
|
|
91
91
|
import { ApSelectLayout as Or } from "./src/business/ap-select-layout/index.mjs";
|
|
@@ -109,8 +109,8 @@ 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";
|
|
111
111
|
import { ApKeepAlive as vt } from "./src/business/ap-keep-alive/index.mjs";
|
|
112
|
-
import { LruCacher as
|
|
113
|
-
import { useApKeepAliveInject as
|
|
112
|
+
import { LruCacher as wt } from "./src/business/ap-keep-alive/cacher/lru-cacher.mjs";
|
|
113
|
+
import { useApKeepAliveInject as Mt } from "./src/business/ap-keep-alive/hook.mjs";
|
|
114
114
|
import { matches as kt } from "./src/business/ap-keep-alive/utils.mjs";
|
|
115
115
|
import { ApDraggableGrid as Ut } from "./src/business/ap-draggable-grid/index.mjs";
|
|
116
116
|
import { ApValueSelectCard as Vt } from "./src/business/ap-value-select-card/index.mjs";
|
|
@@ -136,8 +136,8 @@ import { default as Dp } from "./src/scroll-bar/index.vue.mjs";
|
|
|
136
136
|
import { default as Pp } from "./src/scroll-bar/internal.vue.mjs";
|
|
137
137
|
import { default as Lp } from "./src/scroll-view/index.vue.mjs";
|
|
138
138
|
import { default as vp } from "./src/portal/index.vue.mjs";
|
|
139
|
-
import { default as
|
|
140
|
-
import { default as
|
|
139
|
+
import { default as wp } from "./src/full-screen/index.vue.mjs";
|
|
140
|
+
import { default as Mp } from "./src/resize-observer/index.vue.mjs";
|
|
141
141
|
import { ROW_SELECTION_FIELD as kp } from "./src/ap-grid/constants.mjs";
|
|
142
142
|
import { toTreeArray as Up } from "./src/ap-grid/utils/to-tree-array.mjs";
|
|
143
143
|
import { default as Vp } from "./src/ap-grid/index.vue.mjs";
|
|
@@ -151,12 +151,11 @@ import { default as oa } from "./src/ag-grid/index.vue.mjs";
|
|
|
151
151
|
import { default as ta } from "./src/ag-grid/editable/index.vue.mjs";
|
|
152
152
|
import { default as aa } from "./src/ag-grid/editable/form-item.vue.mjs";
|
|
153
153
|
import { ApSkeleton as ma } from "./src/skeleton/index.mjs";
|
|
154
|
-
import {
|
|
155
|
-
import {
|
|
156
|
-
import {
|
|
157
|
-
import {
|
|
158
|
-
import {
|
|
159
|
-
import { useResize as Ia } from "./src/hooks/useResize.mjs";
|
|
154
|
+
import { useControllableValue as da } from "./src/hooks/useControllableValue.mjs";
|
|
155
|
+
import { useManualRef as sa } from "./src/hooks/useManualRef.mjs";
|
|
156
|
+
import { useThrottleRef as Aa } from "./src/hooks/useThrottleRef.mjs";
|
|
157
|
+
import { useFullScreen as na } from "./src/hooks/useFullScreen.mjs";
|
|
158
|
+
import { useResize as Fa } from "./src/hooks/useResize.mjs";
|
|
160
159
|
const a = console.log;
|
|
161
160
|
a(`UI version: ${p}`);
|
|
162
161
|
const l = {
|
|
@@ -168,7 +167,7 @@ const l = {
|
|
|
168
167
|
}
|
|
169
168
|
};
|
|
170
169
|
export {
|
|
171
|
-
|
|
170
|
+
M as APConfigProvider,
|
|
172
171
|
oa as AgGrid,
|
|
173
172
|
Bo as ApActionButton,
|
|
174
173
|
Go as ApActionGroup,
|
|
@@ -180,7 +179,7 @@ export {
|
|
|
180
179
|
dr as ApAttachment,
|
|
181
180
|
sr as ApBatchAction,
|
|
182
181
|
Ar as ApBatchActionGroup,
|
|
183
|
-
|
|
182
|
+
yo as ApButton,
|
|
184
183
|
nr as ApButtonGroup,
|
|
185
184
|
Fr as ApCard,
|
|
186
185
|
Ko as ApConfirmButton,
|
|
@@ -208,7 +207,7 @@ export {
|
|
|
208
207
|
Qe as ApFieldSelect,
|
|
209
208
|
eo as ApFieldSlider,
|
|
210
209
|
He as ApFieldSwitch,
|
|
211
|
-
|
|
210
|
+
ye as ApFieldText,
|
|
212
211
|
je as ApFieldTextArea,
|
|
213
212
|
fo as ApFieldTreeSelect,
|
|
214
213
|
sp as ApFilePreview,
|
|
@@ -243,8 +242,8 @@ export {
|
|
|
243
242
|
vr as ApInputRadio,
|
|
244
243
|
vt as ApKeepAlive,
|
|
245
244
|
Et as ApKeepAliveProps,
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
wr as ApLabel,
|
|
246
|
+
yr as ApLabelGroup,
|
|
248
247
|
Kr as ApLadder,
|
|
249
248
|
No as ApList,
|
|
250
249
|
Ro as ApModal,
|
|
@@ -285,17 +284,17 @@ export {
|
|
|
285
284
|
$p as EditableGridFormItem,
|
|
286
285
|
Ip as EditableTable,
|
|
287
286
|
Tp as EditableTableFormItem,
|
|
288
|
-
|
|
287
|
+
wp as FullScreen,
|
|
289
288
|
Zo as Highlight,
|
|
290
289
|
Pp as InternalScrollBar,
|
|
291
290
|
$o as LoadingBar,
|
|
292
|
-
|
|
291
|
+
wt as LruCacher,
|
|
293
292
|
Xp as Mask,
|
|
294
293
|
Zt as NeedNameKeyDefault,
|
|
295
294
|
vp as Portal,
|
|
296
295
|
kp as ROW_SELECTION_FIELD,
|
|
297
296
|
Wo as Render,
|
|
298
|
-
|
|
297
|
+
Mp as ResizeObserver,
|
|
299
298
|
Dp as ScrollBar,
|
|
300
299
|
Lp as ScrollView,
|
|
301
300
|
Zp as Splitter,
|
|
@@ -316,7 +315,7 @@ export {
|
|
|
316
315
|
ot as formatDataIndex,
|
|
317
316
|
rt as formatNumber,
|
|
318
317
|
mp as formatString,
|
|
319
|
-
|
|
318
|
+
w as globalConfigCached,
|
|
320
319
|
Dr as handleExportDownload,
|
|
321
320
|
kt as isNameMatches,
|
|
322
321
|
F as keysOf,
|
|
@@ -328,22 +327,21 @@ export {
|
|
|
328
327
|
G as translate,
|
|
329
328
|
_t as useAgGridModal,
|
|
330
329
|
$t as useAgGridSelectModal,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
330
|
+
Mt as useApKeepAliveInject,
|
|
331
|
+
da as useControllableValue,
|
|
332
|
+
na as useFullScreen,
|
|
334
333
|
L as useGetDerivedNamespace,
|
|
335
334
|
I as useGlobalConfig,
|
|
336
335
|
D as useLocale,
|
|
337
|
-
|
|
338
|
-
da as useMessage,
|
|
336
|
+
sa as useManualRef,
|
|
339
337
|
R as useNamespace,
|
|
340
338
|
Xr as usePageListAgGrid,
|
|
341
339
|
Jr as usePageListApGrid,
|
|
342
340
|
Wr as usePageListApTable,
|
|
343
|
-
|
|
341
|
+
Fa as useResize,
|
|
344
342
|
ar as useTableModal,
|
|
345
343
|
Ap as useTablePaging,
|
|
346
344
|
mr as useTableSelectModal,
|
|
347
|
-
|
|
345
|
+
Aa as useThrottleRef,
|
|
348
346
|
Xo as useTimeAgo
|
|
349
347
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as L, useSlots as P, ref as y, onMounted as G, watch as W, createElementBlock as U, openBlock as $, Fragment as q, createVNode as p, unref as l, mergeProps as g, withCtx as h, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
2
|
import { cloneDeep as u, isEqual as ee, omit as oe } from "lodash-unified";
|
|
3
|
-
import { ApForm as
|
|
3
|
+
import { ApForm as C } from "../../ap-form/index.mjs";
|
|
4
4
|
import { useInjectForm as te } from "../../ap-form/context.mjs";
|
|
5
5
|
import { useWatch as ae } from "../../ap-form/hooks/use-watch.mjs";
|
|
6
6
|
import { getModelValue as ne } from "../../ap-form/utils/get.mjs";
|
|
@@ -11,11 +11,11 @@ import { useEditableFormItemApi as se } from "../hooks/use-editable-form-item-ap
|
|
|
11
11
|
import "../index.vue2.mjs";
|
|
12
12
|
import ie from "../style/editable.mjs";
|
|
13
13
|
import { getShadowName as me } from "../utils.mjs";
|
|
14
|
-
import { getColumnTransformOptions as ue, arrayToObject as
|
|
14
|
+
import { getColumnTransformOptions as ue, arrayToObject as b } from "./utils.mjs";
|
|
15
15
|
import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
|
|
16
16
|
import { useGlobalConfig as pe } from "../../config-provider/hooks/use-global-config.mjs";
|
|
17
17
|
import fe from "../index.vue.mjs";
|
|
18
|
-
const
|
|
18
|
+
const Ne = /* @__PURE__ */ L({
|
|
19
19
|
name: "EditableGrid",
|
|
20
20
|
__name: "form-item",
|
|
21
21
|
props: {
|
|
@@ -137,15 +137,15 @@ const _e = /* @__PURE__ */ A({
|
|
|
137
137
|
name: {},
|
|
138
138
|
formItem: {}
|
|
139
139
|
},
|
|
140
|
-
setup(
|
|
141
|
-
expose:
|
|
140
|
+
setup(R, {
|
|
141
|
+
expose: B
|
|
142
142
|
}) {
|
|
143
|
-
const
|
|
144
|
-
b:
|
|
145
|
-
} = de("editable-aggrid"),
|
|
143
|
+
const v = P(), o = R, {
|
|
144
|
+
b: x
|
|
145
|
+
} = de("editable-aggrid"), I = ie("editable-aggrid"), r = y(), {
|
|
146
146
|
internalInstance: s
|
|
147
147
|
} = te();
|
|
148
|
-
function
|
|
148
|
+
function S(e) {
|
|
149
149
|
const t = ue(o.columns || []);
|
|
150
150
|
if (!Object.keys(t).length || !e?.length)
|
|
151
151
|
return e;
|
|
@@ -156,31 +156,31 @@ const _e = /* @__PURE__ */ A({
|
|
|
156
156
|
}
|
|
157
157
|
const i = me(o.name);
|
|
158
158
|
let f = [];
|
|
159
|
-
|
|
159
|
+
G(() => {
|
|
160
160
|
const e = o.formItem?.initialValue ?? ne(s?.getInitialValues() ?? {}, o.name);
|
|
161
|
-
e && (s?.updateInitialModel(i,
|
|
161
|
+
e && (s?.updateInitialModel(i, b(u(e), o.rowKey)), f = u(e), n.value || _(u(e), "suffix", !0));
|
|
162
162
|
});
|
|
163
|
-
const n = y([]),
|
|
164
|
-
|
|
163
|
+
const n = y([]), T = ae(o.name);
|
|
164
|
+
W(() => T.value, (e) => {
|
|
165
165
|
ee(e, n.value) || c(e ?? u(f));
|
|
166
166
|
}, {
|
|
167
167
|
deep: !0,
|
|
168
168
|
flush: "post",
|
|
169
169
|
immediate: !0
|
|
170
170
|
});
|
|
171
|
-
const
|
|
172
|
-
add:
|
|
173
|
-
addMultiple:
|
|
171
|
+
const E = pe("valueTypeMap"), F = re(o, E, i), {
|
|
172
|
+
add: V,
|
|
173
|
+
addMultiple: N,
|
|
174
174
|
__addMultiple: _,
|
|
175
|
-
remove:
|
|
176
|
-
removeByKey:
|
|
177
|
-
getRowData:
|
|
178
|
-
getRowsData:
|
|
179
|
-
setRowData:
|
|
180
|
-
clear:
|
|
175
|
+
remove: j,
|
|
176
|
+
removeByKey: k,
|
|
177
|
+
getRowData: D,
|
|
178
|
+
getRowsData: O,
|
|
179
|
+
setRowData: z,
|
|
180
|
+
clear: H,
|
|
181
181
|
refreshRowIds: d
|
|
182
182
|
} = se(o, s, n, i);
|
|
183
|
-
function
|
|
183
|
+
function K() {
|
|
184
184
|
const e = r.value?._internalGridApi;
|
|
185
185
|
if (!d.value?.length || !e)
|
|
186
186
|
return;
|
|
@@ -192,57 +192,57 @@ const _e = /* @__PURE__ */ A({
|
|
|
192
192
|
}
|
|
193
193
|
function c(e) {
|
|
194
194
|
n.value = [...e];
|
|
195
|
-
const t =
|
|
195
|
+
const t = b(e, o.rowKey);
|
|
196
196
|
s?.setFieldValue(o.name, [...e]), s?.setFieldValue(i, t);
|
|
197
197
|
}
|
|
198
198
|
function w(e, t) {
|
|
199
199
|
const a = e === "end" ? n.value.length - 1 : e;
|
|
200
200
|
r.value?.scrollToRow(a, t);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function M(e, t) {
|
|
203
203
|
r.value?.scrollToColumn(e, t);
|
|
204
204
|
}
|
|
205
|
-
return
|
|
206
|
-
add:
|
|
207
|
-
addMultiple:
|
|
208
|
-
remove:
|
|
209
|
-
removeByKey:
|
|
210
|
-
getRowData:
|
|
211
|
-
getRowsData:
|
|
212
|
-
setRowData:
|
|
213
|
-
clear:
|
|
205
|
+
return B({
|
|
206
|
+
add: V,
|
|
207
|
+
addMultiple: N,
|
|
208
|
+
remove: j,
|
|
209
|
+
removeByKey: k,
|
|
210
|
+
getRowData: D,
|
|
211
|
+
getRowsData: O,
|
|
212
|
+
setRowData: z,
|
|
213
|
+
clear: H,
|
|
214
214
|
setTableData: c,
|
|
215
215
|
scrollTo: w,
|
|
216
216
|
scrollToRow: w,
|
|
217
|
-
scrollToColumn:
|
|
217
|
+
scrollToColumn: M,
|
|
218
218
|
table: r
|
|
219
|
-
}), (e, t) => (
|
|
219
|
+
}), (e, t) => ($(), U(q, null, [p(l(C).FormItem, {
|
|
220
220
|
hidden: "",
|
|
221
221
|
name: e.name,
|
|
222
222
|
"initial-value": e.formItem?.initialValue,
|
|
223
|
-
transform:
|
|
224
|
-
}, null, 8, ["name", "initial-value"]), p(l(
|
|
223
|
+
transform: S
|
|
224
|
+
}, null, 8, ["name", "initial-value"]), p(l(C).FormItem, g({
|
|
225
225
|
label: e.label
|
|
226
|
-
}, {
|
|
227
|
-
default:
|
|
226
|
+
}, e.formItem), {
|
|
227
|
+
default: h(() => [p(fe, g(l(oe)(o, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
228
228
|
ref_key: "tableRef",
|
|
229
229
|
ref: r,
|
|
230
|
-
class: [l(
|
|
230
|
+
class: [l(x)(), l(I)],
|
|
231
231
|
size: "mini",
|
|
232
|
-
columns: l(
|
|
232
|
+
columns: l(F),
|
|
233
233
|
"data-source": n.value,
|
|
234
234
|
"search-form": !1,
|
|
235
|
-
onUpdate:
|
|
235
|
+
onUpdate: K
|
|
236
236
|
}), J({
|
|
237
237
|
_: 2
|
|
238
|
-
}, [Q(
|
|
238
|
+
}, [Q(v, (a, m) => ({
|
|
239
239
|
name: m,
|
|
240
|
-
fn:
|
|
240
|
+
fn: h((A) => [X(e.$slots, m, Y(Z(A || {})))])
|
|
241
241
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
242
242
|
_: 3
|
|
243
|
-
},
|
|
243
|
+
}, 16, ["label"])], 64));
|
|
244
244
|
}
|
|
245
245
|
});
|
|
246
246
|
export {
|
|
247
|
-
|
|
247
|
+
Ne as default
|
|
248
248
|
};
|