@aplus-frontend/ui 0.0.1-beta.26 → 0.0.1-beta.27

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 (55) hide show
  1. package/es/src/ap-action/style/item.css +2 -1
  2. package/es/src/ap-form/interface.d.ts +1 -0
  3. package/es/src/ap-form/modal-form/index.vue.d.ts +11 -2
  4. package/es/src/ap-form/modal-form/index.vue.mjs +119 -76
  5. package/es/src/base-button/index.d.ts +1 -1
  6. package/es/src/basic/index.d.ts +1 -1
  7. package/es/src/button/index.d.ts +1 -1
  8. package/es/src/config-provider/index.d.ts +1 -1
  9. package/es/src/container/index.d.ts +1 -1
  10. package/es/src/count-down/index.d.ts +1 -1
  11. package/es/src/cropper/index.d.ts +369 -0
  12. package/es/src/description/index.d.ts +1 -1
  13. package/es/src/dropdown/index.d.ts +1 -1
  14. package/es/src/icon/index.d.ts +1 -1
  15. package/es/src/icon-picker/index.d.ts +1 -1
  16. package/es/src/modal/index.d.ts +963 -0
  17. package/es/src/scroll-bar/index.d.ts +1 -2
  18. package/es/src/strength-meter/index.d.ts +1 -1
  19. package/es/src/theme/antd-global-overwrite/admin/button.css +12 -6
  20. package/es/src/theme/antd-global-overwrite/admin/index.css +25 -6
  21. package/es/src/theme/antd-global-overwrite/admin/modal.css +13 -0
  22. package/es/src/theme/antd-global-overwrite/aplus/button.css +12 -6
  23. package/es/src/theme/antd-global-overwrite/aplus/index.css +25 -6
  24. package/es/src/theme/antd-global-overwrite/aplus/modal.css +13 -0
  25. package/es/src/theme/ap-action/item.css +2 -1
  26. package/es/src/transition/index.d.ts +1 -1
  27. package/es/src/utils/config-provider-preset.mjs +11 -11
  28. package/lib/src/ap-action/style/item.css +2 -1
  29. package/lib/src/ap-form/interface.d.ts +1 -0
  30. package/lib/src/ap-form/modal-form/index.vue.d.ts +11 -2
  31. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  32. package/lib/src/base-button/index.d.ts +1 -1
  33. package/lib/src/basic/index.d.ts +1 -1
  34. package/lib/src/button/index.d.ts +1 -1
  35. package/lib/src/config-provider/index.d.ts +1 -1
  36. package/lib/src/container/index.d.ts +1 -1
  37. package/lib/src/count-down/index.d.ts +1 -1
  38. package/lib/src/cropper/index.d.ts +369 -0
  39. package/lib/src/description/index.d.ts +1 -1
  40. package/lib/src/dropdown/index.d.ts +1 -1
  41. package/lib/src/icon/index.d.ts +1 -1
  42. package/lib/src/icon-picker/index.d.ts +1 -1
  43. package/lib/src/modal/index.d.ts +963 -0
  44. package/lib/src/scroll-bar/index.d.ts +1 -2
  45. package/lib/src/strength-meter/index.d.ts +1 -1
  46. package/lib/src/theme/antd-global-overwrite/admin/button.css +12 -6
  47. package/lib/src/theme/antd-global-overwrite/admin/index.css +25 -6
  48. package/lib/src/theme/antd-global-overwrite/admin/modal.css +13 -0
  49. package/lib/src/theme/antd-global-overwrite/aplus/button.css +12 -6
  50. package/lib/src/theme/antd-global-overwrite/aplus/index.css +25 -6
  51. package/lib/src/theme/antd-global-overwrite/aplus/modal.css +13 -0
  52. package/lib/src/theme/ap-action/item.css +2 -1
  53. package/lib/src/transition/index.d.ts +1 -1
  54. package/lib/src/utils/config-provider-preset.js +1 -1
  55. package/package.json +1 -1
@@ -24,5 +24,6 @@
24
24
  margin-right: 4px;
25
25
  }
26
26
  .aplus-action-item--disabled {
27
- color: #ABB7CC;
27
+ color: #CCE2FF;
28
+ cursor: not-allowed;
28
29
  }
@@ -65,3 +65,4 @@ export type ApFormModalFormProps = Omit<ApFormProps, 'onFinish'> & {
65
65
  submitter?: false | ApFormSubmitterConfig;
66
66
  showCancel?: boolean;
67
67
  };
68
+ export type ApFormModalFormExpose = ApFormExpose;
@@ -1,6 +1,6 @@
1
1
  import { ApFormModalFormProps, ApFormSubmitterConfig } from '../interface';
2
2
  import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
3
- import { FormLabelAlign } from 'ant-design-vue/es/form/interface';
3
+ import { NamePath, ValidateOptions, FormLabelAlign } from 'ant-design-vue/es/form/interface';
4
4
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
5
5
  import { LegacyButtonType, ButtonHTMLType } from 'ant-design-vue/es/button/buttonTypes';
6
6
  import { ButtonType, ButtonShape, ButtonSize } from 'ant-design-vue/es/button';
@@ -27,7 +27,16 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
27
27
  };
28
28
  open: undefined;
29
29
  showCancel: boolean;
30
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
30
+ }>, {
31
+ resetFields: (name?: NamePath | undefined) => void;
32
+ clearValidate: (name?: NamePath | undefined) => void;
33
+ validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<Partial<any>> | undefined;
34
+ getFieldsValue: (nameList?: true | (string | number)[] | undefined) => Partial<any> | undefined;
35
+ validate: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<Partial<any>> | undefined;
36
+ scrollToField: (name: NamePath, options?: {}) => void;
37
+ setFieldValue: (key: string, newValue: any) => void;
38
+ setFieldsValue: (values: Record<string, any>) => void;
39
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
31
40
  "update:open": (...args: any[]) => void;
32
41
  }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormModalFormProps>, {
33
42
  layout: string;
@@ -1,19 +1,19 @@
1
- import { isVNode as z, defineComponent as D, useSlots as E, ref as N, cloneVNode as L, computed as A, createVNode as a, mergeProps as m, unref as s, openBlock as g, createElementBlock as W, Fragment as G, withCtx as y, renderSlot as V, createTextVNode as H, toDisplayString as I, createBlock as x, resolveDynamicComponent as P } from "vue";
2
- import { Button as C, Flex as S, Space as J, Modal as K } from "ant-design-vue";
1
+ import { isVNode as E, defineComponent as L, useSlots as A, ref as F, watch as W, cloneVNode as G, computed as H, createVNode as n, mergeProps as p, unref as r, openBlock as g, createElementBlock as J, Fragment as K, withCtx as V, renderSlot as N, createTextVNode as Q, toDisplayString as X, createBlock as T, resolveDynamicComponent as P } from "vue";
2
+ import { Button as y, Flex as S, Space as Y, Modal as Z } from "ant-design-vue";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
5
- import { getSingleVNode as Q } from "../../utils/slot.mjs";
5
+ import { getSingleVNode as I } from "../../utils/slot.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { omit as X } from "lodash-unified";
7
+ import { omit as ee } from "lodash-unified";
8
8
  import "../style/modal-form.css";
9
- import { useControllableValue as Y } from "../../hooks/useControllableValue.mjs";
10
- import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
11
- import { useNamespace as ee } from "../../config-provider/hooks/use-namespace.mjs";
12
- import te from "../ap-form.vue2.mjs";
13
- function B(r) {
14
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !z(r);
9
+ import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
10
+ import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
11
+ import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
12
+ import oe from "../ap-form.vue2.mjs";
13
+ function C(d) {
14
+ return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !E(d);
15
15
  }
16
- const ce = /* @__PURE__ */ D({
16
+ const we = /* @__PURE__ */ L({
17
17
  __name: "index",
18
18
  props: {
19
19
  initialValues: {},
@@ -83,113 +83,156 @@ const ce = /* @__PURE__ */ D({
83
83
  }
84
84
  },
85
85
  emits: ["update:open"],
86
- setup(r, {
87
- emit: _
86
+ setup(d, {
87
+ expose: _,
88
+ emit: j
88
89
  }) {
89
- const e = r, p = E(), T = _, c = N(), n = N(!1), {
90
- value: j,
90
+ const a = d, b = A(), R = j, o = F(), c = F(), u = F(!1), {
91
+ value: M,
91
92
  updateValue: f
92
- } = Y(e, T, {
93
+ } = te(a, R, {
93
94
  valuePropName: "open",
94
95
  defaultValue: !1
95
96
  }), {
96
- t: b
97
- } = Z(), {
98
- b: R,
99
- e: k
100
- } = ee("ap-form-modal-form"), v = Q(p.trigger), M = v ? L(v, {
97
+ t: v
98
+ } = le(), {
99
+ b: O,
100
+ e: B
101
+ } = ae("ap-form-modal-form");
102
+ W(() => o.value, (t) => {
103
+ var e;
104
+ t && c.value && ((e = t.setFieldsValue) == null || e.call(t, c.value), c.value = void 0);
105
+ });
106
+ const k = I(b.trigger), U = k ? G(k, {
101
107
  onClick: () => {
102
108
  f(!0);
103
109
  }
104
- }) : null, O = A(() => {
105
- var u, d, h, F;
106
- let o;
107
- const t = [];
108
- if (e.submitter === !1)
110
+ }) : null, $ = H(() => {
111
+ var i, m, h, x;
112
+ let t;
113
+ const e = [];
114
+ if (a.submitter === !1)
109
115
  return null;
110
- if (e.showCancel) {
111
- let l;
112
- t.push(a(C, {
116
+ if (a.showCancel) {
117
+ let s;
118
+ e.push(n(y, {
113
119
  onClick: w,
114
- disabled: n.value
115
- }, B(l = b("ap.common.cancelText")) ? l : {
116
- default: () => [l]
120
+ disabled: u.value
121
+ }, C(s = v("ap.common.cancelText")) ? s : {
122
+ default: () => [s]
117
123
  }));
118
124
  }
119
- return ((u = e.submitter) == null ? void 0 : u.resetButtonProps) !== !1 && t.push(a(C, m(((d = e.submitter) == null ? void 0 : d.resetButtonProps) || {}, {
125
+ return ((i = a.submitter) == null ? void 0 : i.resetButtonProps) !== !1 && e.push(n(y, p(((m = a.submitter) == null ? void 0 : m.resetButtonProps) || {}, {
120
126
  key: "submit",
121
- disabled: n.value,
122
- onClick: U
127
+ disabled: u.value,
128
+ onClick: q
123
129
  }), {
124
130
  default: () => {
125
- var l;
126
- return [((l = e.submitter) == null ? void 0 : l.resetText) || b("ap.common.resetText")];
131
+ var s;
132
+ return [((s = a.submitter) == null ? void 0 : s.resetText) || v("ap.common.resetText")];
127
133
  }
128
- })), ((h = e.submitter) == null ? void 0 : h.submitButtonProps) !== !1 && t.push(a(C, m({
134
+ })), ((h = a.submitter) == null ? void 0 : h.submitButtonProps) !== !1 && e.push(n(y, p({
129
135
  type: "primary",
130
136
  key: "submit"
131
- }, ((F = e.submitter) == null ? void 0 : F.submitButtonProps) || {}, {
132
- loading: n.value,
133
- onClick: $
137
+ }, ((x = a.submitter) == null ? void 0 : x.submitButtonProps) || {}, {
138
+ loading: u.value,
139
+ onClick: z
134
140
  }), {
135
141
  default: () => {
136
- var l;
137
- return [((l = e.submitter) == null ? void 0 : l.submitText) || b("ap.common.okText")];
142
+ var s;
143
+ return [((s = a.submitter) == null ? void 0 : s.submitText) || v("ap.common.okText")];
138
144
  }
139
- })), p.submitter ? a(S, {
145
+ })), b.submitter ? n(S, {
140
146
  justify: "flex-end",
141
- class: k("footer")
142
- }, B(o = p.submitter(t)) ? o : {
143
- default: () => [o]
144
- }) : a(S, {
147
+ class: B("footer")
148
+ }, C(t = b.submitter(e)) ? t : {
149
+ default: () => [t]
150
+ }) : n(S, {
145
151
  justify: "flex-end",
146
- class: k("footer")
152
+ class: B("footer")
147
153
  }, {
148
- default: () => [a(J, null, B(t) ? t : {
149
- default: () => [t]
154
+ default: () => [n(Y, null, C(e) ? e : {
155
+ default: () => [e]
150
156
  })]
151
157
  });
152
158
  });
153
- function U() {
154
- var o, t, i;
155
- e.submitter !== !1 && ((o = c.value) == null || o.resetFields(), (i = (t = e.submitter) == null ? void 0 : t.onReset) == null || i.call(t));
159
+ function q() {
160
+ var t, e, l;
161
+ a.submitter !== !1 && ((t = o.value) == null || t.resetFields(), (l = (e = a.submitter) == null ? void 0 : e.onReset) == null || l.call(e));
156
162
  }
157
- async function $() {
158
- var o, t, i, u;
159
- if (e.submitter !== !1)
163
+ async function z() {
164
+ var t, e, l, i;
165
+ if (a.submitter !== !1)
160
166
  try {
161
- const d = await ((o = c.value) == null ? void 0 : o.validateFields());
162
- (i = (t = e.submitter) == null ? void 0 : t.onSubmit) == null || i.call(t), n.value = !0, await ((u = e.onFinish) == null ? void 0 : u.call(e, d)) && f(!1);
167
+ const m = await ((t = o.value) == null ? void 0 : t.validateFields());
168
+ (l = (e = a.submitter) == null ? void 0 : e.onSubmit) == null || l.call(e), u.value = !0, await ((i = a.onFinish) == null ? void 0 : i.call(a, m)) && f(!1);
163
169
  } finally {
164
- n.value = !1;
170
+ u.value = !1;
165
171
  }
166
172
  }
167
173
  function w() {
168
- s(n) || f(!1);
174
+ r(u) || f(!1);
169
175
  }
170
- function q(o) {
171
- !o && s(n) || f(o);
176
+ function D(t) {
177
+ !t && r(u) || f(t);
172
178
  }
173
- return (o, t) => (g(), W(G, null, [a(s(K), m(o.modalProps, {
174
- open: s(j),
175
- "onUpdate:open": q,
179
+ return _({
180
+ resetFields: (t) => {
181
+ var e;
182
+ (e = o.value) == null || e.resetFields(t);
183
+ },
184
+ clearValidate: (t) => {
185
+ var e;
186
+ (e = o.value) == null || e.clearValidate(t);
187
+ },
188
+ validateFields: (t, e) => {
189
+ var l;
190
+ return (l = o.value) == null ? void 0 : l.validateFields(t, e);
191
+ },
192
+ getFieldsValue: (t) => {
193
+ var e;
194
+ return (e = o.value) == null ? void 0 : e.getFieldsValue(t);
195
+ },
196
+ validate: (t, e) => {
197
+ var l;
198
+ return (l = o.value) == null ? void 0 : l.validate(t, e);
199
+ },
200
+ scrollToField: (t, e = {}) => {
201
+ var l;
202
+ (l = o.value) == null || l.scrollToField(t, e);
203
+ },
204
+ setFieldValue: (t, e) => {
205
+ var l, i;
206
+ (i = (l = o.value) == null ? void 0 : l.setFieldValue) == null || i.call(l, t, e);
207
+ },
208
+ setFieldsValue: (t) => {
209
+ var e, l;
210
+ if (!o.value) {
211
+ c.value = t;
212
+ return;
213
+ }
214
+ (l = (e = o.value) == null ? void 0 : e.setFieldsValue) == null || l.call(e, t);
215
+ }
216
+ }), (t, e) => (g(), J(K, null, [n(r(Z), p(t.modalProps, {
217
+ open: r(M),
218
+ "onUpdate:open": D,
176
219
  onCancel: w,
177
220
  footer: null,
178
- width: o.width,
179
- class: s(R)()
221
+ width: t.width,
222
+ class: r(O)()
180
223
  }), {
181
- title: y(() => [V(o.$slots, "title", {}, () => [H(I(e.title), 1)])]),
182
- default: y(() => [a(te, m({
224
+ title: V(() => [N(t.$slots, "title", {}, () => [Q(X(a.title), 1)])]),
225
+ default: V(() => [n(oe, p({
183
226
  ref_key: "formRef",
184
- ref: c
185
- }, s(X)(e, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
186
- default: y(() => [V(o.$slots, "default")]),
227
+ ref: o
228
+ }, r(ee)(a, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
229
+ default: V(() => [N(t.$slots, "default")]),
187
230
  _: 3
188
- }, 16), (g(), x(P(O.value)))]),
231
+ }, 16), (g(), T(P($.value)))]),
189
232
  _: 3
190
- }, 16, ["open", "width", "class"]), (g(), x(P(s(M))))], 64));
233
+ }, 16, ["open", "width", "class"]), (g(), T(P(r(U))))], 64));
191
234
  }
192
235
  });
193
236
  export {
194
- ce as default
237
+ we as default
195
238
  };
@@ -1,6 +1,6 @@
1
1
  import { default as ModalButton } from './modal-button.vue';
2
2
  import { default as PopConfirmButton } from './pop-confirm-button.vue';
3
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from '@vue/runtime-core';
3
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
4
4
  export * from './interface';
5
5
  export { ModalButton, PopConfirmButton };
6
6
  export declare const BaseButton: {
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, VNode, RendererNode, RendererElement, VNodeChild, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from '@vue/runtime-core';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, VNode, RendererNode, RendererElement, VNodeChild, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
3
3
  export * from './interface';
4
4
  export declare const BasicHelp: {
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from '@vue/runtime-core';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  export declare const Button: {
3
3
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
4
4
  type: {
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from '@vue/runtime-core';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
3
3
  import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
4
4
  import { CSPConfig } from 'ant-design-vue/es/config-provider';
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from '@vue/runtime-core';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  export * from './interface';
3
3
  export declare const ScrollContainer: {
4
4
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from '@vue/runtime-core';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  export * from './interface';
3
3
  export declare const CountdownButton: {
4
4
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{