@aplus-frontend/ui 7.10.1 → 7.10.2

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 (29) hide show
  1. package/es/src/ap-action/item-dropdown/index.vue.mjs +43 -38
  2. package/es/src/ap-action/style/dropdown-item.mjs +17 -11
  3. package/es/src/ap-action/style/index.mjs +8 -9
  4. package/es/src/ap-form/style/item.mjs +15 -15
  5. package/es/src/config-provider/config-provider-props.d.ts +12 -12
  6. package/es/src/config-provider/config-provider-props.mjs +12 -12
  7. package/es/src/config-provider/config-provider.d.ts +27 -27
  8. package/es/src/config-provider/config-provider.mjs +42 -40
  9. package/es/src/config-provider/hooks/use-global-config.d.ts +13 -13
  10. package/es/src/config-provider/index.d.ts +43 -43
  11. package/es/src/design-token/interface.d.ts +2 -0
  12. package/es/src/utils/cssinjs/index.mjs +36 -35
  13. package/es/src/version.d.ts +1 -1
  14. package/es/src/version.mjs +1 -1
  15. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  16. package/lib/src/ap-action/style/dropdown-item.js +1 -1
  17. package/lib/src/ap-action/style/index.js +1 -1
  18. package/lib/src/ap-form/style/item.js +1 -1
  19. package/lib/src/config-provider/config-provider-props.d.ts +12 -12
  20. package/lib/src/config-provider/config-provider-props.js +1 -1
  21. package/lib/src/config-provider/config-provider.d.ts +27 -27
  22. package/lib/src/config-provider/config-provider.js +1 -1
  23. package/lib/src/config-provider/hooks/use-global-config.d.ts +13 -13
  24. package/lib/src/config-provider/index.d.ts +43 -43
  25. package/lib/src/design-token/interface.d.ts +2 -0
  26. package/lib/src/utils/cssinjs/index.js +1 -1
  27. package/lib/src/version.d.ts +1 -1
  28. package/lib/src/version.js +1 -1
  29. package/package.json +3 -4
@@ -1,17 +1,17 @@
1
- import { defineComponent as w, ref as B, computed as A, createBlock as n, openBlock as t, unref as o, normalizeClass as s, withCtx as l, createElementVNode as c, createVNode as d, normalizeProps as b, guardReactiveProps as C, renderSlot as I, resolveDynamicComponent as h, createCommentVNode as D, createElementBlock as P, Fragment as N, renderList as $, mergeProps as p } from "vue";
2
- import { Dropdown as L, Menu as V, MenuItem as x } from "@aplus-frontend/antdv";
3
- import { IconApAdLineDown as z } from "@aplus-frontend/icon";
4
- import { isUndefined as E, omit as F } from "lodash-unified";
1
+ import { defineComponent as C, ref as w, computed as A, createBlock as r, openBlock as t, unref as o, normalizeClass as s, withCtx as a, createElementVNode as u, createVNode as d, normalizeProps as B, guardReactiveProps as b, renderSlot as I, resolveDynamicComponent as D, createCommentVNode as P, createElementBlock as N, Fragment as $, renderList as L, mergeProps as m } from "vue";
2
+ import { Dropdown as V, Menu as z, MenuItem as E } from "@aplus-frontend/antdv";
3
+ import { IconApAdLineDown as F } from "@aplus-frontend/icon";
4
+ import { isUndefined as M, omit as S } from "lodash-unified";
5
5
  import "../../config-provider/index.mjs";
6
6
  import "../item/index.vue.mjs";
7
7
  import "../item-modal/index.vue2.mjs";
8
8
  import "../item-popconfirm/index.vue2.mjs";
9
- import M from "../style/dropdown-item.mjs";
10
- import { useNamespace as S } from "../../config-provider/hooks/use-namespace.mjs";
11
- import y from "../item/index.vue2.mjs";
12
- import U from "../item-modal/index.vue.mjs";
13
- import R from "../item-popconfirm/index.vue.mjs";
14
- const ee = /* @__PURE__ */ w({
9
+ import x from "../style/dropdown-item.mjs";
10
+ import { useNamespace as O } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import g from "../item/index.vue2.mjs";
12
+ import R from "../item-modal/index.vue.mjs";
13
+ import U from "../item-popconfirm/index.vue.mjs";
14
+ const oe = /* @__PURE__ */ C({
15
15
  name: "ApActionItemDropDown",
16
16
  __name: "index",
17
17
  props: {
@@ -29,42 +29,47 @@ const ee = /* @__PURE__ */ w({
29
29
  iconFirst: { type: Boolean },
30
30
  tooltip: {}
31
31
  },
32
- setup(g) {
33
- const m = g, i = B(!1), { e: f, b: _ } = S("action-item-dropdown"), u = M("action-item-dropdown"), v = A(() => m.actions.filter((e) => e.visible || E(e.visible)).map((e) => ({
32
+ setup(y) {
33
+ const p = y, i = w(!1), { e: c, b: _ } = O("action-item-dropdown"), f = x("action-item-dropdown"), v = (e, n) => {
34
+ (n.source === "trigger" || e) && (i.value = e);
35
+ }, k = A(() => p.actions.filter((e) => e.visible || M(e.visible)).map((e) => ({
34
36
  ...e,
35
- onAction: async (a) => {
37
+ onClick: (n) => {
38
+ e.onClick?.(n), !e.onAction && (i.value = !1);
39
+ },
40
+ onAction: e.onAction ? async (n) => {
36
41
  try {
37
- await e.onAction?.(a);
42
+ await e.onAction?.(n);
38
43
  } finally {
39
44
  i.value = !1;
40
45
  }
41
- }
46
+ } : void 0
42
47
  })));
43
- return (e, a) => (t(), n(o(L), {
48
+ return (e, n) => (t(), r(o(V), {
44
49
  open: i.value,
45
- "onUpdate:open": a[0] || (a[0] = (r) => i.value = r),
46
50
  trigger: e.trigger,
47
51
  placement: e.placement,
48
- class: s(o(u))
52
+ class: s(o(f)),
53
+ onOpenChange: v
49
54
  }, {
50
- overlay: l(() => [
51
- d(o(V), null, {
52
- default: l(() => [
53
- (t(!0), P(N, null, $(v.value, (r, k) => (t(), n(o(x), {
54
- key: k,
55
- class: s([o(u), o(f)("item")])
55
+ overlay: a(() => [
56
+ d(o(z), null, {
57
+ default: a(() => [
58
+ (t(!0), N($, null, L(k.value, (l, h) => (t(), r(o(E), {
59
+ key: h,
60
+ class: s([o(f), o(c)("item")])
56
61
  }, {
57
- default: l(() => [
58
- r.modalProps ? (t(), n(U, p({
62
+ default: a(() => [
63
+ l.modalProps ? (t(), r(R, m({
59
64
  key: 0,
60
65
  ref_for: !0
61
- }, r), null, 16)) : r.popconfirmProps ? (t(), n(R, p({
66
+ }, l), null, 16)) : l.popconfirmProps ? (t(), r(U, m({
62
67
  key: 1,
63
68
  ref_for: !0
64
- }, r), null, 16)) : (t(), n(y, p({
69
+ }, l), null, 16)) : (t(), r(g, m({
65
70
  key: 2,
66
71
  ref_for: !0
67
- }, r), null, 16))
72
+ }, l), null, 16))
68
73
  ]),
69
74
  _: 2
70
75
  }, 1032, ["class"]))), 128))
@@ -72,19 +77,19 @@ const ee = /* @__PURE__ */ w({
72
77
  _: 1
73
78
  })
74
79
  ]),
75
- default: l(() => [
76
- c("span", {
80
+ default: a(() => [
81
+ u("span", {
77
82
  class: s(o(_)())
78
83
  }, [
79
- d(y, b(C(o(F)(m, ["actions", "trigger", "placement", "text"]))), {
80
- default: l(() => [
84
+ d(g, B(b(o(S)(p, ["actions", "trigger", "placement", "text"]))), {
85
+ default: a(() => [
81
86
  I(e.$slots, "default", {}, () => [
82
- (t(), n(h(() => e.text)))
87
+ (t(), r(D(() => e.text)))
83
88
  ]),
84
- c("span", {
85
- class: s(o(f)("icon"))
89
+ u("span", {
90
+ class: s(o(c)("icon"))
86
91
  }, [
87
- e.showIcon ? (t(), n(o(z), { key: 0 })) : D("", !0)
92
+ e.showIcon ? (t(), r(o(F), { key: 0 })) : P("", !0)
88
93
  ], 2)
89
94
  ]),
90
95
  _: 3
@@ -96,5 +101,5 @@ const ee = /* @__PURE__ */ w({
96
101
  }
97
102
  });
98
103
  export {
99
- ee as default
104
+ oe as default
100
105
  };
@@ -1,27 +1,33 @@
1
- import { genComponentStyleHook as i } from "../../utils/cssinjs/index.mjs";
2
- const l = (e) => {
3
- const { componentCls: n, namespace: t } = e, o = `.${t}-action-item`;
1
+ import { genComponentStyleHook as t } from "../../utils/cssinjs/index.mjs";
2
+ const l = (n) => {
3
+ const { componentCls: e, namespace: o } = n, i = `.${o}-action-item`;
4
4
  return {
5
- [n]: {
5
+ [e]: {
6
6
  display: "inline-flex",
7
7
  flexDirection: "row",
8
8
  alignItems: "center",
9
9
  // dropdown menu item
10
10
  "&__item": {
11
- [o]: {
12
- width: "100%"
11
+ padding: "0px !important",
12
+ [i]: {
13
+ width: "100%",
14
+ paddingInline: "12px",
15
+ paddingBlock: "6px"
16
+ },
17
+ [`${i}--loading`]: {
18
+ marginInlineEnd: n.calc(n.spaceXS).mul(-3).equal()
13
19
  }
14
20
  },
15
- [`${n}__icon`]: {
16
- fontSize: e.fontSize,
21
+ [`${e}__icon`]: {
22
+ fontSize: n.fontSize,
17
23
  display: "inline-flex"
18
24
  }
19
25
  }
20
26
  };
21
- }, s = i("ApAction.Dropdown", (e) => [
22
- l(e)
27
+ }, p = t("ApAction.Dropdown", (n) => [
28
+ l(n)
23
29
  ]);
24
30
  export {
25
- s as default,
31
+ p as default,
26
32
  l as genActionDropdownItemStyle
27
33
  };
@@ -2,11 +2,11 @@ import { resetComponent as t } from "../../style/index.mjs";
2
2
  import { genComponentStyleHook as s } from "../../utils/cssinjs/index.mjs";
3
3
  const d = (o) => {
4
4
  const {
5
- loadingOpacity: n,
6
- colorLink: r,
5
+ loadingOpacity: r,
6
+ colorLink: n,
7
7
  colorSuccess: a,
8
- colorError: l,
9
- colorWarn: c,
8
+ colorError: c,
9
+ colorWarn: l,
10
10
  componentCls: i
11
11
  } = o;
12
12
  return {
@@ -23,7 +23,7 @@ const d = (o) => {
23
23
  opacity: 0.7
24
24
  },
25
25
  "&--primary": {
26
- color: r,
26
+ color: n,
27
27
  [`&${i}--disabled`]: {
28
28
  color: o.colorLinkDisabled
29
29
  }
@@ -35,19 +35,19 @@ const d = (o) => {
35
35
  }
36
36
  },
37
37
  "&--error": {
38
- color: l,
38
+ color: c,
39
39
  [`&${i}--disabled`]: {
40
40
  color: o.colorErrorDisabled
41
41
  }
42
42
  },
43
43
  "&--warn": {
44
- color: c,
44
+ color: l,
45
45
  [`&${i}--disabled`]: {
46
46
  color: o.colorWarnDisabled
47
47
  }
48
48
  },
49
49
  "&--loading": {
50
- opacity: n,
50
+ opacity: r,
51
51
  transition: `opacity ${o.motionDurationMid}`,
52
52
  cursor: "default",
53
53
  [`&${i}--disabled`]: {
@@ -65,7 +65,6 @@ const d = (o) => {
65
65
  },
66
66
  [`${i}-loading-icon`]: {
67
67
  display: "inline-block",
68
- lineHeight: 0,
69
68
  transition: ["width", "opacity", "margin"].map(
70
69
  (e) => `${e} ${o.motionDurationSlow} ${o.apActionLoadingIconEase}`
71
70
  ).join(",")
@@ -1,6 +1,6 @@
1
- import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
2
- const o = (n) => {
3
- const { componentCls: e, namespace: a } = n, i = `${e}--disabled`, t = n.calc(n.controlHeight).sub(n.calc(n.lineWidth).mul(2)).equal();
1
+ import { genComponentStyleHook as o } from "../../utils/cssinjs/index.mjs";
2
+ const l = (n) => {
3
+ const { componentCls: e, namespace: t, antdv: i } = n, r = `${e}--disabled`, a = n.calc(n.controlHeight).sub(n.calc(n.lineWidth).mul(2)).equal();
4
4
  return {
5
5
  [e]: {
6
6
  // bordered
@@ -12,7 +12,7 @@ const o = (n) => {
12
12
  ".ant-input-affix-wrapper": {
13
13
  padding: 0
14
14
  },
15
- [`&:has(.${a}-batch-input-group):has(.ant-select)`]: {
15
+ [`&:has(.${t}-batch-input-group):has(.ant-select)`]: {
16
16
  ".ant-input-affix-wrapper": {
17
17
  paddingInlineEnd: n.space
18
18
  }
@@ -23,7 +23,7 @@ const o = (n) => {
23
23
  paddingInlineStart: 0
24
24
  }
25
25
  },
26
- [`&:has(div.${a}-batch-input-group .ant-input)`]: {
26
+ [`&:has(div.${t}-batch-input-group .ant-input)`]: {
27
27
  paddingInlineEnd: n.space,
28
28
  ".ant-input": {
29
29
  paddingInlineStart: 0
@@ -52,7 +52,7 @@ const o = (n) => {
52
52
  background: "unset !important"
53
53
  },
54
54
  ".ant-select-single .ant-select-selector": {
55
- height: `${t} !important`
55
+ height: `${a} !important`
56
56
  },
57
57
  "input.ant-input-number-input": {
58
58
  paddingInlineStart: 0
@@ -72,25 +72,25 @@ const o = (n) => {
72
72
  },
73
73
  ".ant-form-item-label > label": {
74
74
  paddingRight: n.spaceLG,
75
- height: t,
75
+ height: a,
76
76
  "&::after": {
77
77
  margin: 0
78
78
  }
79
79
  },
80
80
  ".ant-form-item-control-input": {
81
- minHeight: t,
81
+ minHeight: a,
82
82
  ".ant-select-single": {
83
83
  height: "unset"
84
84
  }
85
85
  },
86
- [`&:hover:not(${i})`]: {
86
+ [`&:hover:not(${r})`]: {
87
87
  borderColor: n.hoverColorBase
88
88
  },
89
89
  "&:focus": {
90
90
  borderColor: n.activeColorBase,
91
- boxShadow: "0 0 0 2px rgba(5, 155, 255, 0.1)"
91
+ boxShadow: `0 0 0 2px ${n.calc(i.controlOutline).colorMix(10)}`
92
92
  },
93
- [`.${a}-batch-input-group-popover-input__popover`]: {
93
+ [`.${t}-batch-input-group-popover-input__popover`]: {
94
94
  width: "calc(100% + 12px)"
95
95
  }
96
96
  },
@@ -105,7 +105,7 @@ const o = (n) => {
105
105
  // focus
106
106
  "&--focused": {
107
107
  borderColor: n.activeColorBase,
108
- boxShadow: "0 0 0 2px rgba(5, 155, 255, 0.1)"
108
+ boxShadow: `0 0 0 2px ${n.calc(i.controlOutline).colorMix(10)}`
109
109
  },
110
110
  // other
111
111
  ".ant-form-show-help": {
@@ -132,8 +132,8 @@ const o = (n) => {
132
132
  }
133
133
  }
134
134
  };
135
- }, p = r("ApForm", (n) => [o(n)]);
135
+ }, d = o("ApForm", (n) => [l(n)]);
136
136
  export {
137
- p as default,
138
- o as genApFormItemStyle
137
+ d as default,
138
+ l as genApFormItemStyle
139
139
  };
@@ -166,6 +166,18 @@ export declare const configProviderProps: () => {
166
166
  apTitle: {
167
167
  type: PropType<ApTitleConfig>;
168
168
  };
169
+ searchForm: {
170
+ type: PropType<SearchFormGlobalConfig>;
171
+ default: () => {};
172
+ };
173
+ apUpload: {
174
+ type: PropType<ApUploadConfig>;
175
+ default: () => {};
176
+ };
177
+ apDescriptions: {
178
+ type: PropType<ApDescriptionsConfig>;
179
+ default: () => {};
180
+ };
169
181
  /**
170
182
  * @description aplus-ui的locale
171
183
  */
@@ -191,14 +203,6 @@ export declare const configProviderProps: () => {
191
203
  uiMode: {
192
204
  type: PropType<UiModeType>;
193
205
  };
194
- apUpload: {
195
- type: PropType<ApUploadConfig>;
196
- default: () => {};
197
- };
198
- apDescriptions: {
199
- type: PropType<ApDescriptionsConfig>;
200
- default: () => {};
201
- };
202
206
  valueTypeMap: {
203
207
  type: PropType<Record<string, ValueTypeRenderConfig>>;
204
208
  default: () => {};
@@ -218,10 +222,6 @@ export declare const configProviderProps: () => {
218
222
  type: PropType<ViewCacheOption>;
219
223
  default: () => {};
220
224
  };
221
- searchForm: {
222
- type: PropType<SearchFormGlobalConfig>;
223
- default: () => {};
224
- };
225
225
  };
226
226
  export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
227
227
  export {};
@@ -14,6 +14,18 @@ const t = () => ({
14
14
  },
15
15
  apTitle: {
16
16
  type: Object
17
+ },
18
+ searchForm: {
19
+ type: Object,
20
+ default: () => ({})
21
+ },
22
+ apUpload: {
23
+ type: Object,
24
+ default: () => ({})
25
+ },
26
+ apDescriptions: {
27
+ type: Object,
28
+ default: () => ({})
17
29
  }
18
30
  }), o = () => ({
19
31
  /**
@@ -41,14 +53,6 @@ const t = () => ({
41
53
  uiMode: {
42
54
  type: String
43
55
  },
44
- apUpload: {
45
- type: Object,
46
- default: () => ({})
47
- },
48
- apDescriptions: {
49
- type: Object,
50
- default: () => ({})
51
- },
52
56
  valueTypeMap: {
53
57
  type: Object,
54
58
  default: () => ({})
@@ -68,10 +72,6 @@ const t = () => ({
68
72
  type: Object,
69
73
  default: () => ({})
70
74
  },
71
- searchForm: {
72
- type: Object,
73
- default: () => ({})
74
- },
75
75
  ...t(),
76
76
  ...e()
77
77
  });
@@ -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, ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from './constants';
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
- api: ApiType;
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 P, ref as G, defineComponent as T, computed as a, unref as n, watch as h, onActivated as b, createVNode as w, renderSlot as A } from "vue";
2
- import { ConfigProvider as D } from "@aplus-frontend/antdv";
3
- import { useDevWarning as F } from "../utils/warning.mjs";
4
- import { mergeAntdProviderConfigWithCache as d, mergeAntdProvideConfig as l } from "../utils/config-provider-preset.mjs";
5
- import { configProviderProps as N } from "./config-provider-props.mjs";
6
- import { DEFAULT_NAMESPACE as I } from "./constants.mjs";
7
- import { useGlobalConfig as M, provideGlobalConfig as k } from "./hooks/use-global-config.mjs";
8
- function y(e) {
9
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !P(e);
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 r = G({}), V = /* @__PURE__ */ T({
11
+ const i = f({}), E = /* @__PURE__ */ p({
12
12
  name: "AplusConfigProvider",
13
- props: N(),
13
+ props: w(),
14
14
  setup(e, {
15
- slots: u
15
+ slots: l
16
16
  }) {
17
- F("ConfigProvider")(!e.uiMode, "breaking", "uiMode has been remove, see migrate guild https://aplus.aplnk.com/aplus-ui/guild/migrate-7.2.html");
18
- const i = M();
19
- let t = !0;
20
- const c = a(() => e.namespace !== void 0 ? e.namespace : i.value?.namespace || I), g = a(() => e.apGrid !== void 0 ? e.apGrid : i.value?.apGrid), m = a(() => e.agGrid !== void 0 ? e.agGrid : i.value?.agGrid), f = a(() => e.apProCard !== void 0 ? e.apProCard : i.value?.apProCard), v = a(() => e.apImage !== void 0 ? e.apImage : i.value?.apImage), C = a(() => e.apTitle !== void 0 ? e.apTitle : i.value?.apTitle), p = a(() => ({
21
- namespace: n(c),
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
- searchForm: e.searchForm,
33
- apGrid: n(g),
34
- agGrid: n(m),
35
- apProCard: n(f),
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
- }), b(() => {
45
- if (t) {
46
- t = !1;
46
+ }), C(() => {
47
+ if (r) {
48
+ r = !1;
47
49
  return;
48
50
  }
49
- r.value = d(l(e), r.value);
51
+ i.value = t(n(e), i.value);
50
52
  }), () => {
51
- let o;
52
- return w(D, r.value, y(o = A(u, "default", {
53
- config: s?.value
54
- })) ? o : {
55
- default: () => [o]
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
- V as ConfigProvider,
62
- r as globalConfigCached
63
+ E as ConfigProvider,
64
+ i as globalConfigCached
63
65
  };