@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
@@ -1,6 +1,5 @@
1
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from '@vue/runtime-core';
1
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, Ref, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  import { StyleValue } from '../type';
3
- import { Ref } from '@vue/reactivity';
4
3
  export * from './interface';
5
4
  export declare const Scrollbar: {
6
5
  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 StrengthMeter: {
4
4
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
@@ -2,18 +2,24 @@
2
2
  min-width: 88px;
3
3
  box-shadow: none;
4
4
  }
5
- .ant-btn-default[disabled],
6
- .ant-btn-default[disabled]:hover {
7
- color: #bfbfbf !important;
8
- background: #fafafa !important;
9
- border-color: #d9d9d9 !important;
10
- }
11
5
  .ant-btn-primary[disabled],
12
6
  .ant-btn-primary[disabled]:hover {
13
7
  color: #ffffff !important;
14
8
  background: #d6f1e5 !important;
15
9
  border-color: #d6f1e5 !important;
16
10
  }
11
+ .ant-btn-dangerous[disabled],
12
+ .ant-btn-dangerous[disabled]:hover {
13
+ color: #ffffff !important;
14
+ background: #ffdbdc !important;
15
+ border-color: #ffdbdc !important;
16
+ }
17
+ .ant-btn-default[disabled],
18
+ .ant-btn-default[disabled]:hover {
19
+ color: #bfbfbf !important;
20
+ background: #fafafa !important;
21
+ border-color: #d9d9d9 !important;
22
+ }
17
23
  .ant-btn-link[disabled],
18
24
  .ant-btn-link[disabled]:hover,
19
25
  .ant-btn-text[disabled],
@@ -23,18 +23,24 @@
23
23
  min-width: 88px;
24
24
  box-shadow: none;
25
25
  }
26
- .ant-btn-default[disabled],
27
- .ant-btn-default[disabled]:hover {
28
- color: #bfbfbf !important;
29
- background: #fafafa !important;
30
- border-color: #d9d9d9 !important;
31
- }
32
26
  .ant-btn-primary[disabled],
33
27
  .ant-btn-primary[disabled]:hover {
34
28
  color: #ffffff !important;
35
29
  background: #d6f1e5 !important;
36
30
  border-color: #d6f1e5 !important;
37
31
  }
32
+ .ant-btn-dangerous[disabled],
33
+ .ant-btn-dangerous[disabled]:hover {
34
+ color: #ffffff !important;
35
+ background: #ffdbdc !important;
36
+ border-color: #ffdbdc !important;
37
+ }
38
+ .ant-btn-default[disabled],
39
+ .ant-btn-default[disabled]:hover {
40
+ color: #bfbfbf !important;
41
+ background: #fafafa !important;
42
+ border-color: #d9d9d9 !important;
43
+ }
38
44
  .ant-btn-link[disabled],
39
45
  .ant-btn-link[disabled]:hover,
40
46
  .ant-btn-text[disabled],
@@ -215,6 +221,19 @@
215
221
  .ant-modal-root .ant-modal-confirm .ant-modal-body .ant-modal-confirm-btns button {
216
222
  min-width: 88px;
217
223
  }
224
+ .ant-modal-confirm-success .ant-modal-confirm-body > .anticon {
225
+ color: #06c687;
226
+ }
227
+ .ant-modal-confirm-info .ant-modal-confirm-body > .anticon {
228
+ color: #1890ff;
229
+ }
230
+ .ant-modal-confirm-warning .ant-modal-confirm-body > .anticon,
231
+ .ant-modal-confirm-confirm .ant-modal-confirm-body > .anticon {
232
+ color: #faad14;
233
+ }
234
+ .ant-modal-confirm-error .ant-modal-confirm-body > .anticon {
235
+ color: #ff4d4f;
236
+ }
218
237
  .ant-table-wrapper .ant-spin-container .ant-pagination.ant-table-pagination.ant-table-pagination-right {
219
238
  margin: 16px 0 0;
220
239
  }
@@ -105,3 +105,16 @@
105
105
  .ant-modal-root .ant-modal-confirm .ant-modal-body .ant-modal-confirm-btns button {
106
106
  min-width: 88px;
107
107
  }
108
+ .ant-modal-confirm-success .ant-modal-confirm-body > .anticon {
109
+ color: #06c687;
110
+ }
111
+ .ant-modal-confirm-info .ant-modal-confirm-body > .anticon {
112
+ color: #1890ff;
113
+ }
114
+ .ant-modal-confirm-warning .ant-modal-confirm-body > .anticon,
115
+ .ant-modal-confirm-confirm .ant-modal-confirm-body > .anticon {
116
+ color: #faad14;
117
+ }
118
+ .ant-modal-confirm-error .ant-modal-confirm-body > .anticon {
119
+ color: #ff4d4f;
120
+ }
@@ -2,18 +2,24 @@
2
2
  min-width: 88px;
3
3
  box-shadow: none;
4
4
  }
5
- .ant-btn-default[disabled],
6
- .ant-btn-default[disabled]:hover {
7
- color: #abb7cc !important;
8
- background: #f9f9fa !important;
9
- border-color: #dee4ed !important;
10
- }
11
5
  .ant-btn-primary[disabled],
12
6
  .ant-btn-primary[disabled]:hover {
13
7
  color: #ffffff !important;
14
8
  background: #cce2ff !important;
15
9
  border-color: #cce2ff !important;
16
10
  }
11
+ .ant-btn-dangerous[disabled],
12
+ .ant-btn-dangerous[disabled]:hover {
13
+ color: #ffffff !important;
14
+ background: #ffdbdc !important;
15
+ border-color: #ffdbdc !important;
16
+ }
17
+ .ant-btn-default[disabled],
18
+ .ant-btn-default[disabled]:hover {
19
+ color: #abb7cc !important;
20
+ background: #f9f9fa !important;
21
+ border-color: #dee4ed !important;
22
+ }
17
23
  .ant-btn-link[disabled],
18
24
  .ant-btn-link[disabled]:hover,
19
25
  .ant-btn-text[disabled],
@@ -23,18 +23,24 @@
23
23
  min-width: 88px;
24
24
  box-shadow: none;
25
25
  }
26
- .ant-btn-default[disabled],
27
- .ant-btn-default[disabled]:hover {
28
- color: #abb7cc !important;
29
- background: #f9f9fa !important;
30
- border-color: #dee4ed !important;
31
- }
32
26
  .ant-btn-primary[disabled],
33
27
  .ant-btn-primary[disabled]:hover {
34
28
  color: #ffffff !important;
35
29
  background: #cce2ff !important;
36
30
  border-color: #cce2ff !important;
37
31
  }
32
+ .ant-btn-dangerous[disabled],
33
+ .ant-btn-dangerous[disabled]:hover {
34
+ color: #ffffff !important;
35
+ background: #ffdbdc !important;
36
+ border-color: #ffdbdc !important;
37
+ }
38
+ .ant-btn-default[disabled],
39
+ .ant-btn-default[disabled]:hover {
40
+ color: #abb7cc !important;
41
+ background: #f9f9fa !important;
42
+ border-color: #dee4ed !important;
43
+ }
38
44
  .ant-btn-link[disabled],
39
45
  .ant-btn-link[disabled]:hover,
40
46
  .ant-btn-text[disabled],
@@ -209,6 +215,19 @@
209
215
  .ant-modal-root .ant-modal-confirm .ant-modal-body .ant-modal-confirm-btns button {
210
216
  min-width: 88px;
211
217
  }
218
+ .ant-modal-confirm-success .ant-modal-confirm-body > .anticon {
219
+ color: #06c687;
220
+ }
221
+ .ant-modal-confirm-info .ant-modal-confirm-body > .anticon {
222
+ color: #0070ff;
223
+ }
224
+ .ant-modal-confirm-warning .ant-modal-confirm-body > .anticon,
225
+ .ant-modal-confirm-confirm .ant-modal-confirm-body > .anticon {
226
+ color: #ffa940;
227
+ }
228
+ .ant-modal-confirm-error .ant-modal-confirm-body > .anticon {
229
+ color: #ff4d4f;
230
+ }
212
231
  .ant-table-wrapper .ant-spin-container .ant-pagination.ant-table-pagination.ant-table-pagination-right {
213
232
  margin: 10px 0 0;
214
233
  }
@@ -99,3 +99,16 @@
99
99
  .ant-modal-root .ant-modal-confirm .ant-modal-body .ant-modal-confirm-btns button {
100
100
  min-width: 88px;
101
101
  }
102
+ .ant-modal-confirm-success .ant-modal-confirm-body > .anticon {
103
+ color: #06c687;
104
+ }
105
+ .ant-modal-confirm-info .ant-modal-confirm-body > .anticon {
106
+ color: #0070ff;
107
+ }
108
+ .ant-modal-confirm-warning .ant-modal-confirm-body > .anticon,
109
+ .ant-modal-confirm-confirm .ant-modal-confirm-body > .anticon {
110
+ color: #ffa940;
111
+ }
112
+ .ant-modal-confirm-error .ant-modal-confirm-body > .anticon {
113
+ color: #ff4d4f;
114
+ }
@@ -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
  }
@@ -1,4 +1,4 @@
1
- import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from '@vue/runtime-core';
1
+ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
2
  export { default as CollapseTransition } from './collapse-transition.vue';
3
3
  export declare const FadeTransition: DefineComponent<{
4
4
  group: {
@@ -1,30 +1,30 @@
1
1
  import { isUndefined as a } from "lodash-unified";
2
- function s(n, e) {
2
+ function s(e, n) {
3
3
  var t, r;
4
- return n != null && n.parentElement ? n.parentElement.classList.contains(e) ? ((t = n.parentElement) == null ? void 0 : t.parentElement) && ((r = n.parentElement.parentElement.className) == null ? void 0 : r.includes("basic-table")) : s(n.parentElement, e) : !1;
4
+ return e != null && e.parentElement ? e.parentElement.classList.contains(n) ? (t = e.parentElement) != null && t.parentElement ? (r = e.parentElement.parentElement.className) == null ? void 0 : r.includes("basic-table") : !1 : s(e.parentElement, n) : !1;
5
5
  }
6
- const u = (n) => s(n, "ant-form") && (n == null ? void 0 : n.parentNode) || (document == null ? void 0 : document.body), f = ({ text: n }) => {
7
- const e = (t) => t == null || t === "";
8
- return Array.isArray(n) ? e(n[0]) ? "--" : n[0] : e(n) ? "--" : n;
6
+ const u = (e) => s(e, "ant-form") && (e == null ? void 0 : e.parentNode) || (document == null ? void 0 : document.body), f = ({ text: e }) => {
7
+ const n = (t) => t == null || t === "";
8
+ return Array.isArray(e) ? n(e[0]) ? "--" : e[0] : n(e) ? "--" : e;
9
9
  }, m = !1, o = {
10
10
  getPopupContainer: u,
11
11
  transformCellText: f,
12
12
  autoInsertSpaceInButton: m
13
13
  };
14
- function i(n) {
15
- const e = {
16
- ...n
14
+ function p(e) {
15
+ const n = {
16
+ ...e
17
17
  }, t = Object.keys(
18
18
  o
19
19
  );
20
20
  for (const r of t)
21
- a(e[r]) && (e[r] = o[r]);
22
- return e;
21
+ a(n[r]) && (n[r] = o[r]);
22
+ return n;
23
23
  }
24
24
  export {
25
25
  o as antdConfigProviderPresets,
26
26
  m as autoInsertSpaceInButton,
27
27
  u as getPopupContainer,
28
- i as mergeAntdProvideConfig,
28
+ p as mergeAntdProvideConfig,
29
29
  f as transformCellText
30
30
  };
@@ -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 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("ant-design-vue");require("../ap-form.vue.js");require("../../hooks/index.js");const S=require("../../utils/slot.js");require("../../config-provider/index.js");const x=require("lodash-unified");require("../style/modal-form.css");const T=require("../../hooks/useControllableValue.js"),j=require("../../config-provider/hooks/use-locale.js"),M=require("../../config-provider/hooks/use-namespace.js"),O=require("../ap-form.vue2.js");function g(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!e.isVNode(u)}const R=e.defineComponent({__name:"index",props:{initialValues:{},layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinishFailed:{},onValidate:{},open:{type:Boolean,default:void 0},"onUpdate:open":{},modalProps:{default:()=>({})},title:{},width:{default:800},onFinish:{},submitter:{type:[Boolean,Object],default:()=>({resetButtonProps:!1})},showCancel:{type:Boolean,default:!0}},emits:["update:open"],setup(u,{emit:v}){const t=u,f=e.useSlots(),V=v,p=e.ref(),a=e.ref(!1),{value:N,updateValue:d}=T.useControllableValue(t,V,{valuePropName:"open",defaultValue:!1}),{t:m}=j.useLocale(),{b:k,e:h}=M.useNamespace("ap-form-modal-form"),y=S.getSingleVNode(f.trigger),_=y?e.cloneVNode(y,{onClick:()=>{d(!0)}}):null,q=e.computed(()=>{var i,c,b,B;let l;const o=[];if(t.submitter===!1)return null;if(t.showCancel){let n;o.push(e.createVNode(r.Button,{onClick:C,disabled:a.value},g(n=m("ap.common.cancelText"))?n:{default:()=>[n]}))}return((i=t.submitter)==null?void 0:i.resetButtonProps)!==!1&&o.push(e.createVNode(r.Button,e.mergeProps(((c=t.submitter)==null?void 0:c.resetButtonProps)||{},{key:"submit",disabled:a.value,onClick:P}),{default:()=>{var n;return[((n=t.submitter)==null?void 0:n.resetText)||m("ap.common.resetText")]}})),((b=t.submitter)==null?void 0:b.submitButtonProps)!==!1&&o.push(e.createVNode(r.Button,e.mergeProps({type:"primary",key:"submit"},((B=t.submitter)==null?void 0:B.submitButtonProps)||{},{loading:a.value,onClick:w}),{default:()=>{var n;return[((n=t.submitter)==null?void 0:n.submitText)||m("ap.common.okText")]}})),f.submitter?e.createVNode(r.Flex,{justify:"flex-end",class:h("footer")},g(l=f.submitter(o))?l:{default:()=>[l]}):e.createVNode(r.Flex,{justify:"flex-end",class:h("footer")},{default:()=>[e.createVNode(r.Space,null,g(o)?o:{default:()=>[o]})]})});function P(){var l,o,s;t.submitter!==!1&&((l=p.value)==null||l.resetFields(),(s=(o=t.submitter)==null?void 0:o.onReset)==null||s.call(o))}async function w(){var l,o,s,i;if(t.submitter!==!1)try{const c=await((l=p.value)==null?void 0:l.validateFields());(s=(o=t.submitter)==null?void 0:o.onSubmit)==null||s.call(o),a.value=!0,await((i=t.onFinish)==null?void 0:i.call(t,c))&&d(!1)}finally{a.value=!1}}function C(){e.unref(a)||d(!1)}function F(l){!l&&e.unref(a)||d(l)}return(l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(r.Modal),e.mergeProps(l.modalProps,{open:e.unref(N),"onUpdate:open":F,onCancel:C,footer:null,width:l.width,class:e.unref(k)()}),{title:e.withCtx(()=>[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createVNode(O.default,e.mergeProps({ref_key:"formRef",ref:p},e.unref(x.omit)(t,["modalProps","open","onUpdate:open","title","width","onFinish","submitter"])),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(q.value)))]),_:3},16,["open","width","class"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_))))],64))}});exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("ant-design-vue");require("../ap-form.vue.js");require("../../hooks/index.js");const T=require("../../utils/slot.js");require("../../config-provider/index.js");const j=require("lodash-unified");require("../style/modal-form.css");const M=require("../../hooks/useControllableValue.js"),O=require("../../config-provider/hooks/use-locale.js"),R=require("../../config-provider/hooks/use-namespace.js"),D=require("../ap-form.vue2.js");function g(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Object]"&&!e.isVNode(d)}const U=e.defineComponent({__name:"index",props:{initialValues:{},layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinishFailed:{},onValidate:{},open:{type:Boolean,default:void 0},"onUpdate:open":{},modalProps:{default:()=>({})},title:{},width:{default:800},onFinish:{},submitter:{type:[Boolean,Object],default:()=>({resetButtonProps:!1})},showCancel:{type:Boolean,default:!0}},emits:["update:open"],setup(d,{expose:C,emit:B}){const o=d,m=e.useSlots(),N=B,s=e.ref(),c=e.ref(),r=e.ref(!1),{value:k,updateValue:f}=M.useControllableValue(o,N,{valuePropName:"open",defaultValue:!1}),{t:v}=O.useLocale(),{b:_,e:h}=R.useNamespace("ap-form-modal-form");e.watch(()=>s.value,l=>{var t;l&&c.value&&((t=l.setFieldsValue)==null||t.call(l,c.value),c.value=void 0)});const V=T.getSingleVNode(m.trigger),q=V?e.cloneVNode(V,{onClick:()=>{f(!0)}}):null,w=e.computed(()=>{var n,p,b,y;let l;const t=[];if(o.submitter===!1)return null;if(o.showCancel){let u;t.push(e.createVNode(i.Button,{onClick:F,disabled:r.value},g(u=v("ap.common.cancelText"))?u:{default:()=>[u]}))}return((n=o.submitter)==null?void 0:n.resetButtonProps)!==!1&&t.push(e.createVNode(i.Button,e.mergeProps(((p=o.submitter)==null?void 0:p.resetButtonProps)||{},{key:"submit",disabled:r.value,onClick:P}),{default:()=>{var u;return[((u=o.submitter)==null?void 0:u.resetText)||v("ap.common.resetText")]}})),((b=o.submitter)==null?void 0:b.submitButtonProps)!==!1&&t.push(e.createVNode(i.Button,e.mergeProps({type:"primary",key:"submit"},((y=o.submitter)==null?void 0:y.submitButtonProps)||{},{loading:r.value,onClick:x}),{default:()=>{var u;return[((u=o.submitter)==null?void 0:u.submitText)||v("ap.common.okText")]}})),m.submitter?e.createVNode(i.Flex,{justify:"flex-end",class:h("footer")},g(l=m.submitter(t))?l:{default:()=>[l]}):e.createVNode(i.Flex,{justify:"flex-end",class:h("footer")},{default:()=>[e.createVNode(i.Space,null,g(t)?t:{default:()=>[t]})]})});function P(){var l,t,a;o.submitter!==!1&&((l=s.value)==null||l.resetFields(),(a=(t=o.submitter)==null?void 0:t.onReset)==null||a.call(t))}async function x(){var l,t,a,n;if(o.submitter!==!1)try{const p=await((l=s.value)==null?void 0:l.validateFields());(a=(t=o.submitter)==null?void 0:t.onSubmit)==null||a.call(t),r.value=!0,await((n=o.onFinish)==null?void 0:n.call(o,p))&&f(!1)}finally{r.value=!1}}function F(){e.unref(r)||f(!1)}function S(l){!l&&e.unref(r)||f(l)}return C({resetFields:l=>{var t;(t=s.value)==null||t.resetFields(l)},clearValidate:l=>{var t;(t=s.value)==null||t.clearValidate(l)},validateFields:(l,t)=>{var a;return(a=s.value)==null?void 0:a.validateFields(l,t)},getFieldsValue:l=>{var t;return(t=s.value)==null?void 0:t.getFieldsValue(l)},validate:(l,t)=>{var a;return(a=s.value)==null?void 0:a.validate(l,t)},scrollToField:(l,t={})=>{var a;(a=s.value)==null||a.scrollToField(l,t)},setFieldValue:(l,t)=>{var a,n;(n=(a=s.value)==null?void 0:a.setFieldValue)==null||n.call(a,l,t)},setFieldsValue:l=>{var t,a;if(!s.value){c.value=l;return}(a=(t=s.value)==null?void 0:t.setFieldsValue)==null||a.call(t,l)}}),(l,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(i.Modal),e.mergeProps(l.modalProps,{open:e.unref(k),"onUpdate:open":S,onCancel:F,footer:null,width:l.width,class:e.unref(_)()}),{title:e.withCtx(()=>[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])]),default:e.withCtx(()=>[e.createVNode(D.default,e.mergeProps({ref_key:"formRef",ref:s},e.unref(j.omit)(o,["modalProps","open","onUpdate:open","title","width","onFinish","submitter"])),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value)))]),_:3},16,["open","width","class"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))],64))}});exports.default=U;
@@ -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<{