@aplus-frontend/ui 7.10.1 → 7.10.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/src/ag-grid/editable/index.vue.mjs +85 -79
- package/es/src/ap-action/item-dropdown/index.vue.mjs +43 -38
- package/es/src/ap-action/style/dropdown-item.mjs +17 -11
- package/es/src/ap-action/style/index.mjs +8 -9
- package/es/src/ap-form/style/item.mjs +15 -15
- package/es/src/config-provider/config-provider-props.d.ts +12 -12
- package/es/src/config-provider/config-provider-props.mjs +12 -12
- package/es/src/config-provider/config-provider.d.ts +27 -27
- package/es/src/config-provider/config-provider.mjs +42 -40
- package/es/src/config-provider/hooks/use-global-config.d.ts +13 -13
- package/es/src/config-provider/index.d.ts +43 -43
- package/es/src/design-token/interface.d.ts +2 -0
- package/es/src/utils/cssinjs/index.mjs +36 -35
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/style/dropdown-item.js +1 -1
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +12 -12
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +27 -27
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +13 -13
- package/lib/src/config-provider/index.d.ts +43 -43
- package/lib/src/design-token/interface.d.ts +2 -0
- package/lib/src/utils/cssinjs/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -6
|
@@ -7,7 +7,7 @@ import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
|
7
7
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
8
8
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
9
9
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
|
|
10
|
-
import { UiModeType,
|
|
10
|
+
import { UiModeType, SearchFormGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ApiType, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
|
|
11
11
|
import { LocaleType } from '../locale';
|
|
12
12
|
import { RecursivePartial } from '../type';
|
|
13
13
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
@@ -168,6 +168,18 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
168
168
|
uiMode?: UiModeType | undefined;
|
|
169
169
|
}>;
|
|
170
170
|
};
|
|
171
|
+
searchForm: {
|
|
172
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
173
|
+
default: () => {};
|
|
174
|
+
};
|
|
175
|
+
apUpload: {
|
|
176
|
+
type: PropType<ApUploadConfig>;
|
|
177
|
+
default: () => {};
|
|
178
|
+
};
|
|
179
|
+
apDescriptions: {
|
|
180
|
+
type: PropType<ApDescriptionsConfig>;
|
|
181
|
+
default: () => {};
|
|
182
|
+
};
|
|
171
183
|
aplusLocale: {
|
|
172
184
|
type: PropType<LocaleType>;
|
|
173
185
|
};
|
|
@@ -184,14 +196,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
184
196
|
uiMode: {
|
|
185
197
|
type: PropType<UiModeType>;
|
|
186
198
|
};
|
|
187
|
-
apUpload: {
|
|
188
|
-
type: PropType<ApUploadConfig>;
|
|
189
|
-
default: () => {};
|
|
190
|
-
};
|
|
191
|
-
apDescriptions: {
|
|
192
|
-
type: PropType<ApDescriptionsConfig>;
|
|
193
|
-
default: () => {};
|
|
194
|
-
};
|
|
195
199
|
valueTypeMap: {
|
|
196
200
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
197
201
|
default: () => {};
|
|
@@ -211,10 +215,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
211
215
|
type: PropType<ViewCacheOption>;
|
|
212
216
|
default: () => {};
|
|
213
217
|
};
|
|
214
|
-
searchForm: {
|
|
215
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
216
|
-
default: () => {};
|
|
217
|
-
};
|
|
218
218
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
219
219
|
iconPrefixCls: StringConstructor;
|
|
220
220
|
getTargetContainer: {
|
|
@@ -372,6 +372,18 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
372
372
|
uiMode?: UiModeType | undefined;
|
|
373
373
|
}>;
|
|
374
374
|
};
|
|
375
|
+
searchForm: {
|
|
376
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
377
|
+
default: () => {};
|
|
378
|
+
};
|
|
379
|
+
apUpload: {
|
|
380
|
+
type: PropType<ApUploadConfig>;
|
|
381
|
+
default: () => {};
|
|
382
|
+
};
|
|
383
|
+
apDescriptions: {
|
|
384
|
+
type: PropType<ApDescriptionsConfig>;
|
|
385
|
+
default: () => {};
|
|
386
|
+
};
|
|
375
387
|
aplusLocale: {
|
|
376
388
|
type: PropType<LocaleType>;
|
|
377
389
|
};
|
|
@@ -388,14 +400,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
388
400
|
uiMode: {
|
|
389
401
|
type: PropType<UiModeType>;
|
|
390
402
|
};
|
|
391
|
-
apUpload: {
|
|
392
|
-
type: PropType<ApUploadConfig>;
|
|
393
|
-
default: () => {};
|
|
394
|
-
};
|
|
395
|
-
apDescriptions: {
|
|
396
|
-
type: PropType<ApDescriptionsConfig>;
|
|
397
|
-
default: () => {};
|
|
398
|
-
};
|
|
399
403
|
valueTypeMap: {
|
|
400
404
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
401
405
|
default: () => {};
|
|
@@ -415,10 +419,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
415
419
|
type: PropType<ViewCacheOption>;
|
|
416
420
|
default: () => {};
|
|
417
421
|
};
|
|
418
|
-
searchForm: {
|
|
419
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
420
|
-
default: () => {};
|
|
421
|
-
};
|
|
422
422
|
}>> & Readonly<{}>, {
|
|
423
423
|
input: InputConfig;
|
|
424
424
|
select: SelectConfig;
|
|
@@ -451,12 +451,12 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
451
451
|
timePicker: TimePickerConfig;
|
|
452
452
|
card: CardConfig;
|
|
453
453
|
apUpload: ApUploadConfig;
|
|
454
|
-
|
|
454
|
+
searchForm: SearchFormGlobalConfig;
|
|
455
455
|
apDescriptions: ApDescriptionsConfig;
|
|
456
|
+
api: ApiType;
|
|
456
457
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
457
458
|
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
458
459
|
exportField: ExportField;
|
|
459
460
|
viewCacheOption: ViewCacheOption;
|
|
460
|
-
searchForm: SearchFormGlobalConfig;
|
|
461
461
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
462
462
|
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
|
|
@@ -1,63 +1,65 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { useDevWarning as
|
|
4
|
-
import { mergeAntdProviderConfigWithCache as
|
|
5
|
-
import { configProviderProps as
|
|
6
|
-
import { DEFAULT_NAMESPACE as
|
|
7
|
-
import { useGlobalConfig as
|
|
8
|
-
function
|
|
9
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1
|
+
import { isVNode as m, ref as f, defineComponent as p, computed as s, watch as v, onActivated as C, createVNode as P, renderSlot as h } from "vue";
|
|
2
|
+
import { ConfigProvider as T } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useDevWarning as b } from "../utils/warning.mjs";
|
|
4
|
+
import { mergeAntdProviderConfigWithCache as t, mergeAntdProvideConfig as n } from "../utils/config-provider-preset.mjs";
|
|
5
|
+
import { configProviderProps as w } from "./config-provider-props.mjs";
|
|
6
|
+
import { DEFAULT_NAMESPACE as A } from "./constants.mjs";
|
|
7
|
+
import { useGlobalConfig as D, provideGlobalConfig as F } from "./hooks/use-global-config.mjs";
|
|
8
|
+
function G(e) {
|
|
9
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const i = f({}), E = /* @__PURE__ */ p({
|
|
12
12
|
name: "AplusConfigProvider",
|
|
13
|
-
props:
|
|
13
|
+
props: w(),
|
|
14
14
|
setup(e, {
|
|
15
|
-
slots:
|
|
15
|
+
slots: l
|
|
16
16
|
}) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
b("ConfigProvider")(!e.uiMode, "breaking", "uiMode has been remove, see migrate guild https://aplus.aplnk.com/aplus-ui/guild/migrate-7.2.html");
|
|
18
|
+
function o(a, c) {
|
|
19
|
+
return e[a] ?? d.value?.[a] ?? c;
|
|
20
|
+
}
|
|
21
|
+
const d = D(), u = s(() => ({
|
|
22
|
+
namespace: o("namespace", A),
|
|
23
|
+
apGrid: o("apGrid"),
|
|
24
|
+
agGrid: o("agGrid"),
|
|
25
|
+
apProCard: o("apProCard"),
|
|
26
|
+
apImage: o("apImage"),
|
|
27
|
+
apTitle: o("apTitle"),
|
|
28
|
+
searchForm: o("searchForm"),
|
|
29
|
+
apUpload: o("apUpload"),
|
|
30
|
+
apDescriptions: o("apDescriptions"),
|
|
22
31
|
aplusLocale: e.aplusLocale,
|
|
23
32
|
aplusToken: e.aplusToken,
|
|
24
33
|
api: e.api,
|
|
25
|
-
apUpload: e.apUpload,
|
|
26
|
-
apDescriptions: e.apDescriptions,
|
|
27
34
|
valueTypeMap: e.valueTypeMap,
|
|
28
35
|
downloadCenterTriggerConfig: e.downloadCenterTriggerConfig,
|
|
29
36
|
exportField: e.exportField,
|
|
30
37
|
scrollYDomName: e.scrollYDomName,
|
|
31
|
-
viewCacheOption: e.viewCacheOption
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
apImage: n(v),
|
|
37
|
-
apTitle: n(C)
|
|
38
|
-
})), s = k(p);
|
|
39
|
-
return h(() => e, (o) => {
|
|
40
|
-
r.value = d(l(o), r.value);
|
|
38
|
+
viewCacheOption: e.viewCacheOption
|
|
39
|
+
})), g = F(u);
|
|
40
|
+
let r = !0;
|
|
41
|
+
return v(() => e, (a) => {
|
|
42
|
+
i.value = t(n(a), i.value);
|
|
41
43
|
}, {
|
|
42
44
|
deep: !0,
|
|
43
45
|
immediate: !0
|
|
44
|
-
}),
|
|
45
|
-
if (
|
|
46
|
-
|
|
46
|
+
}), C(() => {
|
|
47
|
+
if (r) {
|
|
48
|
+
r = !1;
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
49
|
-
|
|
51
|
+
i.value = t(n(e), i.value);
|
|
50
52
|
}), () => {
|
|
51
|
-
let
|
|
52
|
-
return
|
|
53
|
-
config:
|
|
54
|
-
})) ?
|
|
55
|
-
default: () => [
|
|
53
|
+
let a;
|
|
54
|
+
return P(T, i.value, G(a = h(l, "default", {
|
|
55
|
+
config: g?.value
|
|
56
|
+
})) ? a : {
|
|
57
|
+
default: () => [a]
|
|
56
58
|
});
|
|
57
59
|
};
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
62
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
E as ConfigProvider,
|
|
64
|
+
i as globalConfigCached
|
|
63
65
|
};
|
|
@@ -8,7 +8,7 @@ import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
|
8
8
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
9
9
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
10
10
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '../..';
|
|
11
|
-
import { UiModeType,
|
|
11
|
+
import { UiModeType, SearchFormGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ApiType, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from '..';
|
|
12
12
|
import { LocaleType } from '../../locale';
|
|
13
13
|
import { RecursivePartial } from '../../type';
|
|
14
14
|
export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
|
|
@@ -171,6 +171,18 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
171
171
|
uiMode?: UiModeType | undefined;
|
|
172
172
|
}>;
|
|
173
173
|
};
|
|
174
|
+
searchForm: {
|
|
175
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
176
|
+
default: () => {};
|
|
177
|
+
};
|
|
178
|
+
apUpload: {
|
|
179
|
+
type: PropType<ApUploadConfig>;
|
|
180
|
+
default: () => {};
|
|
181
|
+
};
|
|
182
|
+
apDescriptions: {
|
|
183
|
+
type: PropType<ApDescriptionsConfig>;
|
|
184
|
+
default: () => {};
|
|
185
|
+
};
|
|
174
186
|
aplusLocale: {
|
|
175
187
|
type: PropType<LocaleType>;
|
|
176
188
|
};
|
|
@@ -187,14 +199,6 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
187
199
|
uiMode: {
|
|
188
200
|
type: PropType<UiModeType>;
|
|
189
201
|
};
|
|
190
|
-
apUpload: {
|
|
191
|
-
type: PropType<ApUploadConfig>;
|
|
192
|
-
default: () => {};
|
|
193
|
-
};
|
|
194
|
-
apDescriptions: {
|
|
195
|
-
type: PropType<ApDescriptionsConfig>;
|
|
196
|
-
default: () => {};
|
|
197
|
-
};
|
|
198
202
|
valueTypeMap: {
|
|
199
203
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
200
204
|
default: () => {};
|
|
@@ -214,8 +218,4 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
214
218
|
type: PropType<ViewCacheOption>;
|
|
215
219
|
default: () => {};
|
|
216
220
|
};
|
|
217
|
-
searchForm: {
|
|
218
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
219
|
-
default: () => {};
|
|
220
|
-
};
|
|
221
221
|
}>>>> | undefined;
|
|
@@ -6,7 +6,7 @@ import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
|
6
6
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
7
7
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
8
8
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
|
|
9
|
-
import { UiModeType,
|
|
9
|
+
import { UiModeType, SearchFormGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ApiType, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
|
|
10
10
|
import { LocaleType } from '../locale';
|
|
11
11
|
import { RecursivePartial } from '../type';
|
|
12
12
|
export * from './config-provider-props';
|
|
@@ -173,6 +173,18 @@ export declare const APConfigProvider: {
|
|
|
173
173
|
uiMode?: UiModeType | undefined;
|
|
174
174
|
}>;
|
|
175
175
|
};
|
|
176
|
+
searchForm: {
|
|
177
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
178
|
+
default: () => {};
|
|
179
|
+
};
|
|
180
|
+
apUpload: {
|
|
181
|
+
type: PropType<ApUploadConfig>;
|
|
182
|
+
default: () => {};
|
|
183
|
+
};
|
|
184
|
+
apDescriptions: {
|
|
185
|
+
type: PropType<ApDescriptionsConfig>;
|
|
186
|
+
default: () => {};
|
|
187
|
+
};
|
|
176
188
|
aplusLocale: {
|
|
177
189
|
type: PropType<LocaleType>;
|
|
178
190
|
};
|
|
@@ -189,14 +201,6 @@ export declare const APConfigProvider: {
|
|
|
189
201
|
uiMode: {
|
|
190
202
|
type: PropType<UiModeType>;
|
|
191
203
|
};
|
|
192
|
-
apUpload: {
|
|
193
|
-
type: PropType<ApUploadConfig>;
|
|
194
|
-
default: () => {};
|
|
195
|
-
};
|
|
196
|
-
apDescriptions: {
|
|
197
|
-
type: PropType<ApDescriptionsConfig>;
|
|
198
|
-
default: () => {};
|
|
199
|
-
};
|
|
200
204
|
valueTypeMap: {
|
|
201
205
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
202
206
|
default: () => {};
|
|
@@ -216,10 +220,6 @@ export declare const APConfigProvider: {
|
|
|
216
220
|
type: PropType<ViewCacheOption>;
|
|
217
221
|
default: () => {};
|
|
218
222
|
};
|
|
219
|
-
searchForm: {
|
|
220
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
221
|
-
default: () => {};
|
|
222
|
-
};
|
|
223
223
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
224
224
|
input: InputConfig;
|
|
225
225
|
select: SelectConfig;
|
|
@@ -252,13 +252,13 @@ export declare const APConfigProvider: {
|
|
|
252
252
|
timePicker: TimePickerConfig;
|
|
253
253
|
card: CardConfig;
|
|
254
254
|
apUpload: ApUploadConfig;
|
|
255
|
-
|
|
255
|
+
searchForm: SearchFormGlobalConfig;
|
|
256
256
|
apDescriptions: ApDescriptionsConfig;
|
|
257
|
+
api: ApiType;
|
|
257
258
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
258
259
|
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
259
260
|
exportField: ExportField;
|
|
260
261
|
viewCacheOption: ViewCacheOption;
|
|
261
|
-
searchForm: SearchFormGlobalConfig;
|
|
262
262
|
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
263
263
|
P: {};
|
|
264
264
|
B: {};
|
|
@@ -423,6 +423,18 @@ export declare const APConfigProvider: {
|
|
|
423
423
|
uiMode?: UiModeType | undefined;
|
|
424
424
|
}>;
|
|
425
425
|
};
|
|
426
|
+
searchForm: {
|
|
427
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
428
|
+
default: () => {};
|
|
429
|
+
};
|
|
430
|
+
apUpload: {
|
|
431
|
+
type: PropType<ApUploadConfig>;
|
|
432
|
+
default: () => {};
|
|
433
|
+
};
|
|
434
|
+
apDescriptions: {
|
|
435
|
+
type: PropType<ApDescriptionsConfig>;
|
|
436
|
+
default: () => {};
|
|
437
|
+
};
|
|
426
438
|
aplusLocale: {
|
|
427
439
|
type: PropType<LocaleType>;
|
|
428
440
|
};
|
|
@@ -439,14 +451,6 @@ export declare const APConfigProvider: {
|
|
|
439
451
|
uiMode: {
|
|
440
452
|
type: PropType<UiModeType>;
|
|
441
453
|
};
|
|
442
|
-
apUpload: {
|
|
443
|
-
type: PropType<ApUploadConfig>;
|
|
444
|
-
default: () => {};
|
|
445
|
-
};
|
|
446
|
-
apDescriptions: {
|
|
447
|
-
type: PropType<ApDescriptionsConfig>;
|
|
448
|
-
default: () => {};
|
|
449
|
-
};
|
|
450
454
|
valueTypeMap: {
|
|
451
455
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
452
456
|
default: () => {};
|
|
@@ -466,10 +470,6 @@ export declare const APConfigProvider: {
|
|
|
466
470
|
type: PropType<ViewCacheOption>;
|
|
467
471
|
default: () => {};
|
|
468
472
|
};
|
|
469
|
-
searchForm: {
|
|
470
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
471
|
-
default: () => {};
|
|
472
|
-
};
|
|
473
473
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
474
474
|
input: InputConfig;
|
|
475
475
|
select: SelectConfig;
|
|
@@ -502,13 +502,13 @@ export declare const APConfigProvider: {
|
|
|
502
502
|
timePicker: TimePickerConfig;
|
|
503
503
|
card: CardConfig;
|
|
504
504
|
apUpload: ApUploadConfig;
|
|
505
|
-
|
|
505
|
+
searchForm: SearchFormGlobalConfig;
|
|
506
506
|
apDescriptions: ApDescriptionsConfig;
|
|
507
|
+
api: ApiType;
|
|
507
508
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
508
509
|
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
509
510
|
exportField: ExportField;
|
|
510
511
|
viewCacheOption: ViewCacheOption;
|
|
511
|
-
searchForm: SearchFormGlobalConfig;
|
|
512
512
|
}>;
|
|
513
513
|
__isFragment?: never;
|
|
514
514
|
__isTeleport?: never;
|
|
@@ -670,6 +670,18 @@ export declare const APConfigProvider: {
|
|
|
670
670
|
uiMode?: UiModeType | undefined;
|
|
671
671
|
}>;
|
|
672
672
|
};
|
|
673
|
+
searchForm: {
|
|
674
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
675
|
+
default: () => {};
|
|
676
|
+
};
|
|
677
|
+
apUpload: {
|
|
678
|
+
type: PropType<ApUploadConfig>;
|
|
679
|
+
default: () => {};
|
|
680
|
+
};
|
|
681
|
+
apDescriptions: {
|
|
682
|
+
type: PropType<ApDescriptionsConfig>;
|
|
683
|
+
default: () => {};
|
|
684
|
+
};
|
|
673
685
|
aplusLocale: {
|
|
674
686
|
type: PropType<LocaleType>;
|
|
675
687
|
};
|
|
@@ -686,14 +698,6 @@ export declare const APConfigProvider: {
|
|
|
686
698
|
uiMode: {
|
|
687
699
|
type: PropType<UiModeType>;
|
|
688
700
|
};
|
|
689
|
-
apUpload: {
|
|
690
|
-
type: PropType<ApUploadConfig>;
|
|
691
|
-
default: () => {};
|
|
692
|
-
};
|
|
693
|
-
apDescriptions: {
|
|
694
|
-
type: PropType<ApDescriptionsConfig>;
|
|
695
|
-
default: () => {};
|
|
696
|
-
};
|
|
697
701
|
valueTypeMap: {
|
|
698
702
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
699
703
|
default: () => {};
|
|
@@ -713,10 +717,6 @@ export declare const APConfigProvider: {
|
|
|
713
717
|
type: PropType<ViewCacheOption>;
|
|
714
718
|
default: () => {};
|
|
715
719
|
};
|
|
716
|
-
searchForm: {
|
|
717
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
718
|
-
default: () => {};
|
|
719
|
-
};
|
|
720
720
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
721
721
|
input: InputConfig;
|
|
722
722
|
select: SelectConfig;
|
|
@@ -749,13 +749,13 @@ export declare const APConfigProvider: {
|
|
|
749
749
|
timePicker: TimePickerConfig;
|
|
750
750
|
card: CardConfig;
|
|
751
751
|
apUpload: ApUploadConfig;
|
|
752
|
-
|
|
752
|
+
searchForm: SearchFormGlobalConfig;
|
|
753
753
|
apDescriptions: ApDescriptionsConfig;
|
|
754
|
+
api: ApiType;
|
|
754
755
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
755
756
|
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
756
757
|
exportField: ExportField;
|
|
757
758
|
viewCacheOption: ViewCacheOption;
|
|
758
|
-
searchForm: SearchFormGlobalConfig;
|
|
759
759
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
|
|
760
760
|
$props: {
|
|
761
761
|
onClick?: () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GlobalToken } from '@aplus-frontend/antdv/es/theme';
|
|
1
2
|
import { CSSInterpolation, CSSObject } from '@emotion/serialize';
|
|
2
3
|
import { AgGridToken } from '../ag-grid/style';
|
|
3
4
|
import { SearchFormToken } from '../ap-form/style/search-form';
|
|
@@ -296,6 +297,7 @@ export type TokenWithComponentCls<Token> = Token & {
|
|
|
296
297
|
};
|
|
297
298
|
export type TokenWithUtil<Token> = TokenWithComponentCls<Token> & {
|
|
298
299
|
calc: (cssVar: any) => InstanceType<typeof TokenUtil>;
|
|
300
|
+
antdv: GlobalToken;
|
|
299
301
|
};
|
|
300
302
|
export type CssVarToken<Token = Recordable> = {
|
|
301
303
|
[key in keyof Token]: Token[key] | string;
|
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import S from "@emotion/css
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { useToken as g } from "@aplus-frontend/antdv/es/theme/internal";
|
|
2
|
+
import { injectGlobal as S, cx as b } from "@emotion/css";
|
|
3
|
+
import V from "@emotion/css/create-instance";
|
|
4
|
+
import { omit as f, isFunction as w } from "lodash-unified";
|
|
5
|
+
import { ref as A, computed as a, watch as k } from "vue";
|
|
5
6
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import { useToken as
|
|
7
|
-
import { css as
|
|
8
|
-
import { downSpecificityPlugin as
|
|
9
|
-
import { TokenUtil as
|
|
10
|
-
import { camelToKebab as
|
|
11
|
-
import { useGlobalConfig as
|
|
12
|
-
const { css:
|
|
7
|
+
import { useToken as h } from "../../config-provider/hooks/use-token.mjs";
|
|
8
|
+
import { css as j } from "./instance.mjs";
|
|
9
|
+
import { downSpecificityPlugin as G } from "./plugin-specificity.mjs";
|
|
10
|
+
import { TokenUtil as P } from "./TokenUtil.mjs";
|
|
11
|
+
import { camelToKebab as x, generateCssVar as E } from "./utils.mjs";
|
|
12
|
+
import { useGlobalConfig as F } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
const { css: Q } = V({
|
|
13
14
|
key: "css-dev-only",
|
|
14
|
-
stylisPlugins: [
|
|
15
|
+
stylisPlugins: [G]
|
|
15
16
|
});
|
|
16
|
-
function
|
|
17
|
+
function H(l) {
|
|
17
18
|
const t = {};
|
|
18
19
|
for (const n in l)
|
|
19
|
-
t[n] = `var(${
|
|
20
|
+
t[n] = `var(${x(n)})`;
|
|
20
21
|
return t;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function R(l, t, n, d) {
|
|
23
24
|
return (s) => {
|
|
24
|
-
const
|
|
25
|
-
...f(
|
|
26
|
-
...
|
|
25
|
+
const u = l.split("."), { token: m, rootCls: p } = h(), [, C] = g(), T = A(), c = F("namespace"), $ = a(() => ({
|
|
26
|
+
...f(m.value || {}, "components"),
|
|
27
|
+
...m.value.components?.[u[0]] || {}
|
|
27
28
|
})), i = a(() => {
|
|
28
|
-
const e =
|
|
29
|
+
const e = m.value.components?.[u[0]] || {};
|
|
29
30
|
return {
|
|
30
|
-
...
|
|
31
|
+
...w(n) ? n($.value) : n || {},
|
|
31
32
|
...e
|
|
32
33
|
};
|
|
33
34
|
}), v = a(() => ({
|
|
34
|
-
...f(
|
|
35
|
+
...f(m.value || {}, "components"),
|
|
35
36
|
...i.value,
|
|
36
|
-
componentCls: `.${
|
|
37
|
-
namespace:
|
|
37
|
+
componentCls: `.${c.value}-${s}`,
|
|
38
|
+
namespace: c.value
|
|
38
39
|
}));
|
|
39
|
-
return
|
|
40
|
-
() =>
|
|
40
|
+
return k(
|
|
41
|
+
() => c.value,
|
|
41
42
|
(e) => {
|
|
42
|
-
const o =
|
|
43
|
+
const o = H(
|
|
43
44
|
v.value
|
|
44
45
|
);
|
|
45
|
-
o.componentCls = `.${e}-${s}`, o.namespace = e, o.calc = (y) => new
|
|
46
|
+
o.componentCls = `.${e}-${s}`, o.namespace = e, o.calc = (y) => new P(y), o.antdv = C.value;
|
|
46
47
|
const r = t(o, {
|
|
47
48
|
...v.value,
|
|
48
49
|
componentCls: `.${e}-${s}`,
|
|
49
50
|
namespace: e
|
|
50
51
|
});
|
|
51
|
-
|
|
52
|
+
S(r);
|
|
52
53
|
},
|
|
53
54
|
{ immediate: !0 }
|
|
54
|
-
),
|
|
55
|
-
[() => i.value, () =>
|
|
55
|
+
), k(
|
|
56
|
+
[() => i.value, () => p.value],
|
|
56
57
|
([e, o]) => {
|
|
57
|
-
const r =
|
|
58
|
-
Object.keys(r).length &&
|
|
59
|
-
[`.${o}.${
|
|
58
|
+
const r = E(e, d);
|
|
59
|
+
Object.keys(r).length && j({
|
|
60
|
+
[`.${o}.${c.value}-${s}`]: r
|
|
60
61
|
});
|
|
61
62
|
},
|
|
62
63
|
{ deep: !0, immediate: !0 }
|
|
63
|
-
), a(() =>
|
|
64
|
+
), a(() => b(p.value, T.value));
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
export {
|
|
67
|
-
|
|
68
|
+
R as genComponentStyleHook
|
|
68
69
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.10.
|
|
1
|
+
declare const _default: "7.10.3";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("lodash-unified"),y=require("../../ap-form/index.js");require("../../config-provider/index.js");require("../../hooks/index.js");const L=require("../hooks/use-editable-api.js"),M=require("../hooks/use-editable-columns.js");require("../index.vue2.js");const U=require("../style/editable.js"),p=require("./utils.js"),W=require("../../config-provider/hooks/use-namespace.js"),$=require("../../hooks/useControllableValue.js"),J=require("../../config-provider/hooks/use-global-config.js"),Q=require("../index.vue.js"),X=e.defineComponent({name:"EditableGrid",__name:"index",props:{dropdownPrefixCls:{},bordered:{type:Boolean},locale:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{},showSorterTooltip:{type:[Boolean,Object]},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{},title:{},id:{},showHeader:{type:Boolean},components:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean]},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean},indentSize:{},expandIconColumnIndex:{},showExpandColumn:{type:Boolean},expandedRowClassName:{},childrenColumnName:{},rowExpandable:{},transformCellText:{},rowHoverable:{type:Boolean},rowSelection:{type:[Boolean,Object]},onLoadingChange:{},onShownColumnsChange:{},pagination:{type:[Boolean,Object],default:!1},searchFormWrapperStyle:{},tableWrapperStyle:{},wrapperStyle:{},tableStyle:{},adaptive:{type:Boolean},columnResizable:{type:Boolean,default:!1},loading:{type:Boolean,default:void 0},summary:{},rowHeight:{default:66},getRowHeight:{},advanceRenderer:{type:Boolean},browserTooltips:{type:Boolean},virtual:{type:[Boolean,Object],default:void 0},onRowClicked:{},onScrollEnd:{},rowClassName:{},rowClassRules:{},autoHeight:{type:Boolean},onUpdate:{},customRow:{},theme:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},name:{default:"ap-editable-table-inner-name"},onFieldChange:{}},emits:["update:value"],setup(h,{expose:v,emit:C}){const R=e.useSlots(),a=h,{b:x}=W.useNamespace("editable-aggrid"),B=U.default("editable-aggrid"),_=C,i=e.ref(),{value:r,updateValue:w}=$.useControllableValue(a,_),l=e.ref(),S=y.ApForm.useWatch(a.name,l);e.watch(r,o=>{const t=p.arrayToObject(o,a.rowKey);c.isEqual(t,e.unref(S))||l.value?.setFieldValue(a.name,t)},{deep:!0});const T=J.useGlobalConfig("valueTypeMap"),q=M.useGetEditableColumns(a,T),{add:F,addMultiple:E,remove:A,removeByKey:j,getRowData:N,getRowsData:K,setRowData:V,clear:k,refreshRowIds:f}=L.useEditableApi(a,l,r,w);function O(){const o=i.value?._internalGridApi;if(!f.value?.length||!o)return;const t=f.value.map(n=>o.getRowNode(n)).filter(n=>!!n);o.refreshCells({rowNodes:t,force:!0}),f.value=[]}function D(){l.value?.resetFields()}function I(o){return o?(c.isArray(o)?o:[o]).map(n=>c.isArray(n)?[a.name,...n]:[a.name,n]):void 0}async function H(o,t){const s=(await l.value?.validateFields(I(o),t))?.[a.name];try{const d=Object.keys(s),g=r.value.map(u=>p.getRowKey(u,void 0,a.rowKey));return d.sort((u,G)=>g.findIndex(m=>String(m)===u)-g.findIndex(m=>String(m)===G)),d.map(u=>s[u])}catch{return s}}function P(o){w(o);const t=p.arrayToObject(o,a.rowKey);l.value?.setFieldValue(a.name,t)}function b(o,t){const n=o==="end"?r.value.length-1:o;i.value?.scrollToRow(n,t)}function z(o,t){i.value?.scrollToColumn(o,t)}return v({resetFields:D,validateFields:H,add:F,addMultiple:E,remove:A,removeByKey:j,getRowData:N,getRowsData:K,setRowData:V,clear:k,setTableData:P,scrollTo:b,scrollToRow:b,scrollToColumn:z}),(o,t)=>(e.openBlock(),e.createBlock(e.unref(y.ApForm),{ref_key:"formRef",ref:l,"initial-values":{[a.name]:e.unref(p.arrayToObject)(e.unref(r),a.rowKey)},style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(y.ApForm).FormItem,{name:o.name,"no-style":""},{default:e.withCtx(()=>[e.createVNode(Q.default,e.mergeProps(e.unref(c.omit)(a,["name","value","onUpdate:value","maxLength","onChange","defaultValue"]),{ref_key:"tableRef",ref:i,class:[e.unref(x)(),e.unref(B)],size:"mini",columns:e.unref(q),"data-source":e.unref(r),"search-form":!1,onUpdate:O}),e.createSlots({_:2},[e.renderList(R,(n,s)=>({name:s,fn:e.withCtx(d=>[e.renderSlot(o.$slots,s,e.normalizeProps(e.guardReactiveProps(d||{})))])}))]),1040,["class","columns","data-source"])]),_:3},8,["name"])]),_:3},8,["initial-values"]))}});exports.default=X;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@aplus-frontend/antdv"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@aplus-frontend/antdv"),g=require("@aplus-frontend/icon"),c=require("lodash-unified");require("../../config-provider/index.js");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");const k=require("../style/dropdown-item.js"),v=require("../../config-provider/hooks/use-namespace.js"),i=require("../item/index.vue2.js"),B=require("../item-modal/index.vue.js"),y=require("../item-popconfirm/index.vue.js"),C=e.defineComponent({name:"ApActionItemDropDown",__name:"index",props:{trigger:{default:()=>["hover"]},placement:{default:"bottomLeft"},actions:{default:()=>[]},showIcon:{type:Boolean,default:!0},text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onClick:{},loading:{type:Boolean,default:!1},icon:{},iconFirst:{type:Boolean},tooltip:{}},setup(p){const a=p,n=e.ref(!1),{e:u,b:d}=v.useNamespace("action-item-dropdown"),s=k.default("action-item-dropdown"),f=(t,o)=>{(o.source==="trigger"||t)&&(n.value=t)},m=e.computed(()=>a.actions.filter(t=>t.visible||c.isUndefined(t.visible)).map(t=>({...t,onClick:o=>{t.onClick?.(o),!t.onAction&&(n.value=!1)},onAction:t.onAction?async o=>{try{await t.onAction?.(o)}finally{n.value=!1}}:void 0})));return(t,o)=>(e.openBlock(),e.createBlock(e.unref(l.Dropdown),{open:n.value,trigger:t.trigger,placement:t.placement,class:e.normalizeClass(e.unref(s)),onOpenChange:f},{overlay:e.withCtx(()=>[e.createVNode(e.unref(l.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(r,_)=>(e.openBlock(),e.createBlock(e.unref(l.MenuItem),{key:_,class:e.normalizeClass([e.unref(s),e.unref(u)("item")])},{default:e.withCtx(()=>[r.modalProps?(e.openBlock(),e.createBlock(B.default,e.mergeProps({key:0,ref_for:!0},r),null,16)):r.popconfirmProps?(e.openBlock(),e.createBlock(y.default,e.mergeProps({key:1,ref_for:!0},r),null,16)):(e.openBlock(),e.createBlock(i.default,e.mergeProps({key:2,ref_for:!0},r),null,16))]),_:2},1032,["class"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(d)())},[e.createVNode(i.default,e.normalizeProps(e.guardReactiveProps(e.unref(c.omit)(a,["actions","trigger","placement","text"]))),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>t.text)))]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(u)("icon"))},[t.showIcon?(e.openBlock(),e.createBlock(e.unref(g.IconApAdLineDown),{key:0})):e.createCommentVNode("",!0)],2)]),_:3},16)],2)]),_:3},8,["open","trigger","placement","class"]))}});exports.default=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../utils/cssinjs/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../utils/cssinjs/index.js"),i=e=>{const{componentCls:n,namespace:o}=e,t=`.${o}-action-item`;return{[n]:{display:"inline-flex",flexDirection:"row",alignItems:"center","&__item":{padding:"0px !important",[t]:{width:"100%",paddingInline:"12px",paddingBlock:"6px"},[`${t}--loading`]:{marginInlineEnd:e.calc(e.spaceXS).mul(-3).equal()}},[`${n}__icon`]:{fontSize:e.fontSize,display:"inline-flex"}}}},c=l.genComponentStyleHook("ApAction.Dropdown",e=>[i(e)]);exports.default=c;exports.genActionDropdownItemStyle=i;
|