@aplus-frontend/ui 6.35.2 → 6.36.0

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 (119) hide show
  1. package/es/src/ap-field/date/index.vue.mjs +6 -5
  2. package/es/src/ap-field/date/read.vue2.mjs +8 -7
  3. package/es/src/ap-field/date-range/index.vue.mjs +20 -17
  4. package/es/src/ap-field/date-range/read.vue2.mjs +3 -2
  5. package/es/src/ap-field/index.d.ts +3 -3
  6. package/es/src/ap-field/text/index.vue.d.ts +1 -1
  7. package/es/src/ap-field/text/password.vue.d.ts +1 -1
  8. package/es/src/ap-field/text/read-password.vue.d.ts +1 -1
  9. package/es/src/ap-field/text/read.vue.d.ts +1 -1
  10. package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
  11. package/es/src/ap-field/text-area/read.vue.d.ts +1 -1
  12. package/es/src/ap-form/ap-form.vue.d.ts +1 -1
  13. package/es/src/ap-form/drawer-form/index.vue.d.ts +20 -20
  14. package/es/src/ap-form/interface.d.ts +12 -1
  15. package/es/src/ap-form/item/index.vue.d.ts +34 -34
  16. package/es/src/ap-form/items/checkbox/index.vue.d.ts +2 -2
  17. package/es/src/ap-form/items/date/index.vue.d.ts +2 -2
  18. package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -2
  19. package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
  20. package/es/src/ap-form/items/radio/index.vue.d.ts +2 -2
  21. package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
  22. package/es/src/ap-form/items/switch/index.vue.d.ts +2 -2
  23. package/es/src/ap-form/items/text/index.vue.d.ts +8 -8
  24. package/es/src/ap-form/items/text/password.vue.d.ts +8 -8
  25. package/es/src/ap-form/items/text-area/index.vue.d.ts +6 -6
  26. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  27. package/es/src/ap-form/modal-form/index.vue.d.ts +30 -21
  28. package/es/src/ap-form/render/item.vue.d.ts +2 -2
  29. package/es/src/ap-form/search-form/hooks/use-count-per-row.d.ts +13 -2
  30. package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +32 -22
  31. package/es/src/ap-form/search-form/index.vue.d.ts +298 -20
  32. package/es/src/ap-form/search-form/index.vue.mjs +94 -88
  33. package/es/src/ap-modal/utils/createModal.mjs +38 -35
  34. package/es/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
  35. package/es/src/ap-table/constants.d.ts +77 -77
  36. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +132 -109
  37. package/es/src/business/ap-attachment/ApAttachment.d.ts +9 -0
  38. package/es/src/business/ap-attachment/ApAttachment.mjs +48 -47
  39. package/es/src/business/ap-attachment/constans.d.ts +4 -0
  40. package/es/src/business/ap-attachment/constans.mjs +4 -0
  41. package/es/src/business/ap-attachment/index.d.ts +15 -0
  42. package/es/src/business/ap-attachment/interface.d.ts +1 -0
  43. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +15 -13
  44. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +10 -10
  45. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +10 -10
  46. package/es/src/business/batch-input-group/form-item.vue.d.ts +2 -2
  47. package/es/src/business/batch-input-group/index.vue.d.ts +4 -4
  48. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  49. package/es/src/config-provider/config-provider.d.ts +10 -1
  50. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  51. package/es/src/config-provider/index.d.ts +16 -1
  52. package/es/src/utils/config-provider-preset.d.ts +3 -1
  53. package/es/src/version.d.ts +1 -1
  54. package/es/src/version.mjs +1 -1
  55. package/es/src/work-order-modal/work-order-modal.vue.d.ts +10 -10
  56. package/es/src/work-order-modal/work-order-modal.vue.mjs +6 -4
  57. package/lib/src/ap-field/date/index.vue.js +1 -1
  58. package/lib/src/ap-field/date/read.vue2.js +1 -1
  59. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  60. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  61. package/lib/src/ap-field/index.d.ts +3 -3
  62. package/lib/src/ap-field/text/index.vue.d.ts +1 -1
  63. package/lib/src/ap-field/text/password.vue.d.ts +1 -1
  64. package/lib/src/ap-field/text/read-password.vue.d.ts +1 -1
  65. package/lib/src/ap-field/text/read.vue.d.ts +1 -1
  66. package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
  67. package/lib/src/ap-field/text-area/read.vue.d.ts +1 -1
  68. package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
  69. package/lib/src/ap-form/drawer-form/index.vue.d.ts +20 -20
  70. package/lib/src/ap-form/interface.d.ts +12 -1
  71. package/lib/src/ap-form/item/index.vue.d.ts +34 -34
  72. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +2 -2
  73. package/lib/src/ap-form/items/date/index.vue.d.ts +2 -2
  74. package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -2
  75. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
  76. package/lib/src/ap-form/items/radio/index.vue.d.ts +2 -2
  77. package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
  78. package/lib/src/ap-form/items/switch/index.vue.d.ts +2 -2
  79. package/lib/src/ap-form/items/text/index.vue.d.ts +8 -8
  80. package/lib/src/ap-form/items/text/password.vue.d.ts +8 -8
  81. package/lib/src/ap-form/items/text-area/index.vue.d.ts +6 -6
  82. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  83. package/lib/src/ap-form/modal-form/index.vue.d.ts +30 -21
  84. package/lib/src/ap-form/render/item.vue.d.ts +2 -2
  85. package/lib/src/ap-form/search-form/hooks/use-count-per-row.d.ts +13 -2
  86. package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
  87. package/lib/src/ap-form/search-form/index.vue.d.ts +298 -20
  88. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  89. package/lib/src/ap-modal/utils/createModal.js +1 -1
  90. package/lib/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
  91. package/lib/src/ap-table/constants.d.ts +77 -77
  92. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  93. package/lib/src/business/ap-attachment/ApAttachment.d.ts +9 -0
  94. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  95. package/lib/src/business/ap-attachment/constans.d.ts +4 -0
  96. package/lib/src/business/ap-attachment/constans.js +1 -1
  97. package/lib/src/business/ap-attachment/index.d.ts +15 -0
  98. package/lib/src/business/ap-attachment/interface.d.ts +1 -0
  99. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  100. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +10 -10
  101. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +10 -10
  102. package/lib/src/business/batch-input-group/form-item.vue.d.ts +2 -2
  103. package/lib/src/business/batch-input-group/index.vue.d.ts +4 -4
  104. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  105. package/lib/src/config-provider/config-provider.d.ts +10 -1
  106. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  107. package/lib/src/config-provider/index.d.ts +16 -1
  108. package/lib/src/utils/config-provider-preset.d.ts +3 -1
  109. package/lib/src/version.d.ts +1 -1
  110. package/lib/src/version.js +1 -1
  111. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +10 -10
  112. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  113. package/package.json +3 -3
  114. package/theme/ap-attachment/ap-attachment.css +8 -4
  115. package/theme/ap-attachment/ap-attachment.less +8 -4
  116. package/theme/ap-upload/index.css +6 -0
  117. package/theme/ap-upload/multiple-file.css +6 -0
  118. package/theme/ap-upload/multiple-file.less +7 -0
  119. package/theme/index.css +14 -4
@@ -1,28 +1,29 @@
1
- import { isVNode as se, defineComponent as ie, useSlots as ue, ref as U, shallowRef as z, computed as _, unref as a, watch as M, createVNode as o, Fragment as w, createBlock as y, openBlock as p, mergeProps as ce, withCtx as B, resolveDynamicComponent as I, createElementBlock as pe, renderList as de, normalizeStyle as fe } from "vue";
2
- import { Col as R, Flex as k, Button as q, Row as me } from "@aplus-frontend/antdv";
1
+ import { isVNode as ie, defineComponent as ce, useSlots as ue, ref as B, shallowRef as M, computed as w, unref as a, watch as q, createVNode as o, Fragment as R, createBlock as x, openBlock as p, mergeProps as pe, withCtx as I, resolveDynamicComponent as T, createElementBlock as de, renderList as fe, normalizeStyle as me } from "vue";
2
+ import { Col as _, Flex as k, Button as H, Row as he } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../item/index.vue2.mjs";
5
- import { genRealChildren as H } from "../item-group/helper.mjs";
5
+ import { genRealChildren as G } from "../item-group/helper.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { isArray as he, isBoolean as xe, omit as ye } from "lodash-unified";
8
- import { isDef as G } from "../../utils/index.mjs";
9
- import { execFunc as J, diffFormItem as ge } from "./utils.mjs";
7
+ import { isArray as ge, isBoolean as xe, omit as ye } from "lodash-unified";
8
+ import { isDef as J } from "../../utils/index.mjs";
9
+ import { execFunc as K, diffFormItem as ve } from "./utils.mjs";
10
10
  import "./components/popover-filter.vue.mjs";
11
- import { useCountPerRow as ve } from "./hooks/use-count-per-row.mjs";
11
+ import { useCountPerRow as Se } from "./hooks/use-count-per-row.mjs";
12
12
  import "./components/popover-sorter/index.vue.mjs";
13
13
  import { useSorter as Ce } from "./hooks/use-sorter.mjs";
14
- import { getTargetNode as Se } from "./hooks/use-collapse-input-count.mjs";
15
- import { floorWith as K } from "@fruits-chain/utils";
14
+ import { getTargetNode as we } from "./hooks/use-collapse-input-count.mjs";
15
+ import { floorWith as Q } from "@fruits-chain/utils";
16
+ import { useDevWarning as Re } from "../../utils/warning.mjs";
16
17
  import { useNamespace as _e } from "../../config-provider/hooks/use-namespace.mjs";
17
- import { useLocale as we } from "../../config-provider/hooks/use-locale.mjs";
18
- import Q from "../item/index.vue.mjs";
19
- import Re from "./components/popover-filter.vue2.mjs";
20
- import be from "./components/popover-sorter/index.vue2.mjs";
21
- import Fe from "../ap-form.vue2.mjs";
22
- function Ae(d) {
23
- return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !se(d);
18
+ import { useLocale as be } from "../../config-provider/hooks/use-locale.mjs";
19
+ import X from "../item/index.vue.mjs";
20
+ import Fe from "./components/popover-filter.vue2.mjs";
21
+ import Ae from "./components/popover-sorter/index.vue2.mjs";
22
+ import Ne from "../ap-form.vue2.mjs";
23
+ function Be(d) {
24
+ return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !ie(d);
24
25
  }
25
- const r = 100, Qe = /* @__PURE__ */ ie({
26
+ const r = 100, et = /* @__PURE__ */ ce({
26
27
  name: "ApFormSearchForm",
27
28
  __name: "index",
28
29
  props: {
@@ -114,164 +115,169 @@ const r = 100, Qe = /* @__PURE__ */ ie({
114
115
  default: !0
115
116
  },
116
117
  resizeTarget: {},
118
+ resize: {},
117
119
  loadingDelay: {
118
120
  default: 300
119
121
  }
120
122
  },
121
123
  setup(d, {
122
- expose: X
124
+ expose: Y
123
125
  }) {
124
- const g = ue(), t = d, {
126
+ const y = ue(), t = d;
127
+ Re("SearchForm").deprecated(typeof t.resizeTarget < "u", "resizeTarget", "resize.target");
128
+ const {
125
129
  b: f
126
130
  } = _e("ap-form-search-form"), {
127
- t: T
128
- } = we(), Y = ve(t), v = U(), P = U();
129
- function E() {
131
+ t: P
132
+ } = be(), v = B(), E = B(), Z = Se(t, E), W = B();
133
+ function z() {
130
134
  const e = v.value?.getFieldsValueTransformed(!0);
131
- J(t.onSubmit, e);
135
+ K(t.onSubmit, e);
132
136
  }
133
- function Z() {
134
- t.customReset || v.value?.resetFields?.(), J(t.onReset);
137
+ function ee() {
138
+ t.customReset || v.value?.resetFields?.(), K(t.onReset);
135
139
  }
136
- const ee = (e) => G(e) ? (he(e) ? e : [e]).join("") : Date.now();
140
+ const te = (e) => J(e) ? (ge(e) ? e : [e]).join("") : Date.now();
137
141
  let O = [];
138
- const m = z(H(g.default())), u = z(g.extra?.()), L = _(() => K(r / a(Y), 4)), {
142
+ const m = M(G(y.default())), c = M(y.extra?.()), L = w(() => Q(r / a(Z), 4)), {
139
143
  items: b,
140
- sorted: W,
144
+ sorted: $,
141
145
  handleClickConfirm: F
142
146
  } = Ce(m);
143
- M(() => g.default(), (e) => {
144
- O = m.value, m.value = ge(O, H(e)), W.value = !1;
145
- }), M(() => g.extra?.(), (e) => {
146
- u.value = e;
147
+ q(() => y.default(), (e) => {
148
+ O = m.value, m.value = ve(O, G(e)), $.value = !1;
149
+ }), q(() => y.extra?.(), (e) => {
150
+ c.value = e;
147
151
  });
148
- function te(e) {
149
- return K(e * (r / 24), 4);
152
+ function oe(e) {
153
+ return Q(e * (r / 24), 4);
150
154
  }
151
- const n = _(() => {
152
- const e = m.value, c = [], l = [], x = [], s = a(L);
153
- let C = 0, A = 0;
154
- const ne = r * t.maxRows - s * (a(u) && !t.extraInAction ? 2 : 1);
155
+ const n = w(() => {
156
+ const e = m.value, u = [], l = [], g = [], s = a(L);
157
+ let S = 0, A = 0;
158
+ const le = r * t.maxRows - s * (a(c) && !t.extraInAction ? 2 : 1);
155
159
  e.forEach((N) => {
156
- const j = Se(N);
157
- if (!j)
160
+ const D = we(N);
161
+ if (!D)
158
162
  return;
159
- const i = j.props;
160
- if (xe(i.hidden) ? !!i.hidden : G(i.hidden))
161
- c.push(N);
163
+ const i = D.props;
164
+ if (xe(i.hidden) ? !!i.hidden : J(i.hidden))
165
+ u.push(N);
162
166
  else {
163
- let S = i.span ? te(i.span) : s;
167
+ let C = i.span ? oe(i.span) : s;
164
168
  const V = {
165
169
  node: N,
166
- span: S,
167
- key: `ApFormSearchFormItem-${ee(i.name)}-${i._signal}`
168
- }, D = r - C % r;
169
- D < S && (S += D), C += S, C > ne ? l.push(V) : (A = C, x.push(V));
170
+ span: C,
171
+ key: `ApFormSearchFormItem-${te(i.name)}-${i._signal}`
172
+ }, U = r - S % r;
173
+ U < C && (C += U), S += C, S > le ? l.push(V) : (A = S, g.push(V));
170
174
  }
171
175
  });
172
- const $ = r - (A + s) % r, le = Math.ceil(A) % r < s, re = $ < s ? r : $;
176
+ const j = r - (A + s) % r, re = Math.ceil(A) % r < s, se = j < s ? r : j;
173
177
  return {
174
- hideNode: o(w, null, [c]),
175
- nodes: x,
178
+ hideNode: o(R, null, [u]),
179
+ nodes: g,
176
180
  collapseNodes: l,
177
- extraSpan: re,
178
- lastRowOnlyIncludeActionAndExtra: le
181
+ extraSpan: se,
182
+ lastRowOnlyIncludeActionAndExtra: re
179
183
  };
180
- }), h = (e) => `${e}%`, oe = _(() => {
184
+ }), h = (e) => `${e}%`, ae = w(() => {
181
185
  let e;
182
- const c = n.value.collapseNodes.length || t.sortable && m.value.length, l = o(R, {
186
+ const u = n.value.collapseNodes.length || t.sortable && m.value.length, l = o(_, {
183
187
  flex: h(a(L)),
184
188
  key: "actionWrapper"
185
189
  }, {
186
- default: () => [o(Q, null, {
190
+ default: () => [o(X, null, {
187
191
  default: () => [o(k, {
188
192
  wrap: "wrap",
189
- justify: n.value.lastRowOnlyIncludeActionAndExtra && !(a(u) && t.extraInAction) ? "flex-end" : "space-between"
193
+ justify: n.value.lastRowOnlyIncludeActionAndExtra && !(a(c) && t.extraInAction) ? "flex-end" : "space-between"
190
194
  }, {
191
195
  default: () => [o(k, {
192
196
  gap: 8,
193
197
  wrap: "wrap"
194
198
  }, {
195
- default: () => [c ? o("div", {
199
+ default: () => [u ? o("div", {
196
200
  class: f("column-setting-trigger-wrapper")
197
- }, [n.value.collapseNodes.length ? o(Re, {
198
- onSubmit: E,
201
+ }, [n.value.collapseNodes.length ? o(Fe, {
202
+ onSubmit: z,
199
203
  config: n.value.collapseNodes,
200
204
  submitLoading: t.submitLoading
201
- }, null) : null, t.sortable && b.value.length ? o(be, {
202
- ref: P,
205
+ }, null) : null, t.sortable && b.value.length ? o(Ae, {
206
+ ref: W,
203
207
  items: b.value,
204
208
  onClickConfirm: F,
205
- sorted: W.value
206
- }, null) : null]) : null, o(q, {
209
+ sorted: $.value
210
+ }, null) : null]) : null, o(H, {
207
211
  type: "primary",
208
- onClick: E,
212
+ onClick: z,
209
213
  loading: t.submitLoading ? {
210
214
  delay: t.loadingDelay
211
215
  } : !1,
212
216
  htmlType: "submit",
213
217
  class: f("action-btn")
214
218
  }, {
215
- default: () => [t.searchText || T("ap.apForm.search.search")]
216
- }), o(q, {
217
- onClick: Z,
219
+ default: () => [t.searchText || P("ap.apForm.search.search")]
220
+ }), o(H, {
221
+ onClick: ee,
218
222
  type: "text",
219
223
  class: [f("action-btn"), f("action-btn-reset")]
220
224
  }, {
221
- default: () => [t.resetText || T("ap.apForm.search.reset")]
225
+ default: () => [t.resetText || P("ap.apForm.search.reset")]
222
226
  })]
223
- }), t.extraInAction ? a(u) : null]
227
+ }), t.extraInAction ? a(c) : null]
224
228
  })]
225
229
  })]
226
- }), x = !t.extraInAction && a(u) ? o(R, {
230
+ }), g = !t.extraInAction && a(c) ? o(_, {
227
231
  flex: h(n.value.extraSpan),
228
232
  key: "extraNode"
229
233
  }, {
230
- default: () => [o(Q, null, {
234
+ default: () => [o(X, null, {
231
235
  default: () => [o(k, {
232
236
  justify: n.value.extraSpan === r || n.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
233
- }, Ae(e = a(u)) ? e : {
237
+ }, Be(e = a(c)) ? e : {
234
238
  default: () => [e]
235
239
  })]
236
240
  })]
237
- }) : null, s = o(R, {
241
+ }) : null, s = o(_, {
238
242
  flex: h(n.value.extraSpan)
239
243
  }, null);
240
- return n.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [x || s, l]) : o(w, null, [l, x]);
244
+ return n.value.lastRowOnlyIncludeActionAndExtra ? o(R, null, [g || s, l]) : o(R, null, [l, g]);
241
245
  });
242
- function ae() {
243
- const e = P.value?.getCachedList();
246
+ function ne() {
247
+ const e = W.value?.getCachedList();
244
248
  F(e);
245
249
  }
246
- return X({
247
- apForm: _(() => a(v)),
250
+ return Y({
251
+ apForm: w(() => a(v)),
248
252
  getSorterItems: () => b.value,
249
253
  setSorterItems: F,
250
- resetSorterItems: ae
251
- }), (e, c) => (p(), y(Fe, ce({
254
+ resetSorterItems: ne
255
+ }), (e, u) => (p(), x(Ne, pe({
252
256
  ref_key: "apForm",
253
257
  ref: v,
254
258
  class: a(f)()
255
259
  }, a(ye)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
256
- default: B(() => [(p(), y(I(n.value.hideNode))), o(a(me), {
260
+ default: I(() => [(p(), x(T(n.value.hideNode))), o(a(he), {
261
+ ref_key: "contentWrapperRef",
262
+ ref: E,
257
263
  gutter: 8
258
264
  }, {
259
- default: B(() => [(p(!0), pe(w, null, de(n.value.nodes, (l) => (p(), y(a(R), {
265
+ default: I(() => [(p(!0), de(R, null, fe(n.value.nodes, (l) => (p(), x(a(_), {
260
266
  key: l.key,
261
267
  flex: h(l.span),
262
- style: fe({
268
+ style: me({
263
269
  maxWidth: h(l.span)
264
270
  })
265
271
  }, {
266
- default: B(() => [(p(), y(I(l.node)))]),
272
+ default: I(() => [(p(), x(T(l.node)))]),
267
273
  _: 2
268
- }, 1032, ["flex", "style"]))), 128)), (p(), y(I(oe.value)))]),
274
+ }, 1032, ["flex", "style"]))), 128)), (p(), x(T(ae.value)))]),
269
275
  _: 1
270
- })]),
276
+ }, 512)]),
271
277
  _: 1
272
278
  }, 16, ["class"]));
273
279
  }
274
280
  });
275
281
  export {
276
- Qe as default
282
+ et as default
277
283
  };
@@ -1,39 +1,38 @@
1
- import { render as m, defineComponent as b, createVNode as l, mergeProps as k, h as w } from "vue";
2
- import { Modal as P } from "@aplus-frontend/antdv";
3
- import { ConfigProvider as N, globalConfigCached as f } from "../../config-provider/config-provider.mjs";
4
- import { omit as L } from "lodash-unified";
5
- import { isNumeric as M } from "@aplus-frontend/utils";
1
+ import { defineComponent as w, createVNode as l, mergeProps as P, render as h, h as N } from "vue";
2
+ import { Modal as L } from "@aplus-frontend/antdv";
3
+ import { ConfigProvider as M, globalConfigCached as C } from "../../config-provider/config-provider.mjs";
4
+ import { omit as A } from "lodash-unified";
5
+ import { isNumeric as D } from "@aplus-frontend/utils";
6
6
  import "../../config-provider/index.mjs";
7
- import { getContainerDom as u, getModalGlobalAppContext as A } from "./util.mjs";
8
- import { getTopWindow as E } from "../../utils/index.mjs";
9
- import { useNamespace as T } from "../../config-provider/hooks/use-namespace.mjs";
10
- const z = (p) => {
7
+ import { getContainerDom as u, getModalGlobalAppContext as E } from "./util.mjs";
8
+ import { getTopWindow as G } from "../../utils/index.mjs";
9
+ import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
10
+ const F = (a) => {
11
11
  let o, t;
12
12
  const {
13
- destroyOnClose: a = !0,
13
+ destroyOnClose: p = !0,
14
14
  wrapperOffset: n = !1
15
- } = p, {
15
+ } = a, {
16
16
  b: s
17
- } = T("ap-modal");
17
+ } = H("ap-modal");
18
+ let m = !1;
18
19
  function i() {
19
- o && o(!1), setTimeout(() => {
20
- m(null, r), r.parentElement?.removeChild(r);
21
- }, 500);
20
+ o && o(!1), m = !0;
22
21
  }
23
- function h() {
22
+ function g() {
24
23
  o && o(!0);
25
24
  }
26
25
  function c() {
27
26
  o && o(!1);
28
27
  }
29
- function C(e) {
28
+ function x(e) {
30
29
  t && t(e);
31
30
  }
32
- const g = /* @__PURE__ */ b({
31
+ const O = /* @__PURE__ */ w({
33
32
  data() {
34
33
  return {
35
- open: a,
36
- props: p
34
+ open: p,
35
+ props: a
37
36
  };
38
37
  },
39
38
  created() {
@@ -52,7 +51,7 @@ const z = (p) => {
52
51
  const e = this.props?.content?.component?.exposed ?? void 0;
53
52
  await this.props?.onCancel(e);
54
53
  }
55
- a ? i() : c();
54
+ p ? i() : c();
56
55
  },
57
56
  async handleOk() {
58
57
  try {
@@ -64,7 +63,7 @@ const z = (p) => {
64
63
  }
65
64
  t({
66
65
  confirmLoading: !1
67
- }), a ? i() : c();
66
+ }), p ? i() : c();
68
67
  } catch {
69
68
  t({
70
69
  confirmLoading: !1
@@ -73,39 +72,43 @@ const z = (p) => {
73
72
  }
74
73
  },
75
74
  render() {
76
- const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
77
- return l(N, f.value, {
78
- default: () => [l(P, k({
75
+ const e = A(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
76
+ return l(M, C.value, {
77
+ default: () => [l(L, P({
79
78
  class: {
80
79
  [s()]: !0,
81
80
  [s("wrapper")]: n
82
81
  },
82
+ centered: !0
83
+ }, e, {
83
84
  open: this.open,
84
85
  onCancel: this.handleCancel,
85
86
  onOk: this.handleOk,
86
- centered: !0
87
- }, e), {
87
+ afterOpenChange: (f) => {
88
+ !f && m && (h(null, r), r.parentElement?.removeChild(r)), e?.afterOpenChange && e?.afterOpenChange?.(f);
89
+ }
90
+ }), {
88
91
  default: () => [l("div", {
89
92
  class: {
90
93
  [s("body-wrapper")]: n
91
94
  },
92
95
  style: n === !1 ? {} : {
93
- maxHeight: `calc(100vh - ${(n === !0 ? 100 : M(n) ? Number(n) : 100) * 2}px)`
96
+ maxHeight: `calc(100vh - ${(n === !0 ? 100 : D(n) ? Number(n) : 100) * 2}px)`
94
97
  }
95
98
  }, [this.props?.content])]
96
99
  })]
97
100
  });
98
101
  }
99
- }), x = u(f?.value?.getPopupContainer), v = u(p.getContainer), O = x || v || E().document.body, r = document.createElement("div");
100
- O.appendChild(r);
101
- const d = w(g), y = A();
102
- return d.appContext = p.appContext || y || d.appContext, m(d, r), {
102
+ }), v = u(C?.value?.getPopupContainer), y = u(a.getContainer), b = v || y || G().document.body, r = document.createElement("div");
103
+ b.appendChild(r);
104
+ const d = N(O), k = E();
105
+ return d.appContext = a.appContext || k || d.appContext, h(d, r), {
103
106
  destroy: i,
104
- update: C,
105
- open: h,
107
+ update: x,
108
+ open: g,
106
109
  close: c
107
110
  };
108
111
  };
109
112
  export {
110
- z as createModal
113
+ F as createModal
111
114
  };
@@ -21,9 +21,9 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
21
21
  gutter: ApProCardGutter | ApProCardGutter[];
22
22
  ghost: boolean;
23
23
  bordered: boolean;
24
+ hoverable: boolean;
24
25
  collapsible: boolean;
25
26
  headerBordered: boolean;
26
- hoverable: boolean;
27
27
  defaultCollapsed: boolean;
28
28
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
29
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;