@aplus-frontend/ui 7.14.5 → 7.15.1

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 (107) hide show
  1. package/es/src/ag-grid/editable/form-item.vue.mjs +8 -7
  2. package/es/src/ag-grid/editable/index.vue.mjs +19 -18
  3. package/es/src/ag-grid/index.vue.mjs +110 -105
  4. package/es/src/ag-grid/interface.d.ts +7 -0
  5. package/es/src/ap-field/checkbox/index.vue.d.ts +1 -1
  6. package/es/src/ap-field/date/index.vue.d.ts +1086 -6
  7. package/es/src/ap-field/date/index.vue.mjs +63 -57
  8. package/es/src/ap-field/date-range/index.vue.d.ts +1155 -4
  9. package/es/src/ap-field/date-range/index.vue.mjs +70 -63
  10. package/es/src/ap-field/interface.d.ts +25 -29
  11. package/es/src/ap-field/number/index.vue.d.ts +1 -1
  12. package/es/src/ap-field/radio/index.vue.d.ts +1 -1
  13. package/es/src/ap-field/rate/index.vue.d.ts +1 -1
  14. package/es/src/ap-field/second/index.vue.d.ts +1 -1
  15. package/es/src/ap-field/select/index.vue.d.ts +3 -2
  16. package/es/src/ap-field/select/index.vue.mjs +116 -104
  17. package/es/src/ap-field/select/read.vue2.mjs +4 -3
  18. package/es/src/ap-field/slider/index.vue.d.ts +1 -1
  19. package/es/src/ap-field/switch/index.vue.d.ts +232 -4
  20. package/es/src/ap-field/switch/index.vue.mjs +48 -42
  21. package/es/src/ap-field/text/password.vue.d.ts +1 -1
  22. package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
  23. package/es/src/ap-form/drawer-form/index.vue.d.ts +1 -0
  24. package/es/src/ap-form/drawer-form/index.vue.mjs +107 -116
  25. package/es/src/ap-form/interface.d.ts +1 -1
  26. package/es/src/ap-form/item-group/index.vue.d.ts +2 -4
  27. package/es/src/ap-form/item-group/index.vue.mjs +37 -42
  28. package/es/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
  29. package/es/src/ap-form/items/checkbox/index.vue.mjs +20 -14
  30. package/es/src/ap-form/items/date/index.vue.d.ts +1497 -5
  31. package/es/src/ap-form/items/date/index.vue.mjs +25 -19
  32. package/es/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
  33. package/es/src/ap-form/items/date-range/index.vue.mjs +25 -19
  34. package/es/src/ap-form/items/number/index.vue.d.ts +4 -4
  35. package/es/src/ap-form/items/radio/index.vue.d.ts +5 -5
  36. package/es/src/ap-form/items/radio/index.vue.mjs +2 -3
  37. package/es/src/ap-form/items/select/index.vue.d.ts +18 -12
  38. package/es/src/ap-form/items/switch/index.vue.d.ts +436 -5
  39. package/es/src/ap-form/items/switch/index.vue.mjs +24 -17
  40. package/es/src/ap-form/items/text/password.vue.d.ts +5 -5
  41. package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  42. package/es/src/ap-table/components/setting/template/item.vue2.mjs +27 -26
  43. package/es/src/ap-table/constants.d.ts +1923 -107
  44. package/es/src/time-ago/index.vue.mjs +21 -17
  45. package/es/src/time-ago/interface.d.ts +8 -0
  46. package/es/src/time-ago/useTimeAgo.d.ts +21 -0
  47. package/es/src/time-ago/useTimeAgo.mjs +36 -34
  48. package/es/src/time-ago/utils.d.ts +11 -0
  49. package/es/src/time-ago/utils.mjs +41 -9
  50. package/es/src/utils/index.d.ts +1 -0
  51. package/es/src/utils/index.mjs +18 -14
  52. package/es/src/version.d.ts +1 -1
  53. package/es/src/version.mjs +1 -1
  54. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  55. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  56. package/lib/src/ag-grid/index.vue.js +1 -1
  57. package/lib/src/ag-grid/interface.d.ts +7 -0
  58. package/lib/src/ap-field/checkbox/index.vue.d.ts +1 -1
  59. package/lib/src/ap-field/date/index.vue.d.ts +1086 -6
  60. package/lib/src/ap-field/date/index.vue.js +1 -1
  61. package/lib/src/ap-field/date-range/index.vue.d.ts +1155 -4
  62. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  63. package/lib/src/ap-field/interface.d.ts +25 -29
  64. package/lib/src/ap-field/number/index.vue.d.ts +1 -1
  65. package/lib/src/ap-field/radio/index.vue.d.ts +1 -1
  66. package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
  67. package/lib/src/ap-field/second/index.vue.d.ts +1 -1
  68. package/lib/src/ap-field/select/index.vue.d.ts +3 -2
  69. package/lib/src/ap-field/select/index.vue.js +1 -1
  70. package/lib/src/ap-field/select/read.vue2.js +1 -1
  71. package/lib/src/ap-field/slider/index.vue.d.ts +1 -1
  72. package/lib/src/ap-field/switch/index.vue.d.ts +232 -4
  73. package/lib/src/ap-field/switch/index.vue.js +1 -1
  74. package/lib/src/ap-field/text/password.vue.d.ts +1 -1
  75. package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
  76. package/lib/src/ap-form/drawer-form/index.vue.d.ts +1 -0
  77. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  78. package/lib/src/ap-form/interface.d.ts +1 -1
  79. package/lib/src/ap-form/item-group/index.vue.d.ts +2 -4
  80. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  81. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
  82. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  83. package/lib/src/ap-form/items/date/index.vue.d.ts +1497 -5
  84. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  85. package/lib/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
  86. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  87. package/lib/src/ap-form/items/number/index.vue.d.ts +4 -4
  88. package/lib/src/ap-form/items/radio/index.vue.d.ts +5 -5
  89. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  90. package/lib/src/ap-form/items/select/index.vue.d.ts +18 -12
  91. package/lib/src/ap-form/items/switch/index.vue.d.ts +436 -5
  92. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  93. package/lib/src/ap-form/items/text/password.vue.d.ts +5 -5
  94. package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  95. package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
  96. package/lib/src/ap-table/constants.d.ts +1923 -107
  97. package/lib/src/time-ago/index.vue.js +1 -1
  98. package/lib/src/time-ago/interface.d.ts +8 -0
  99. package/lib/src/time-ago/useTimeAgo.d.ts +21 -0
  100. package/lib/src/time-ago/useTimeAgo.js +1 -1
  101. package/lib/src/time-ago/utils.d.ts +11 -0
  102. package/lib/src/time-ago/utils.js +1 -1
  103. package/lib/src/utils/index.d.ts +1 -0
  104. package/lib/src/utils/index.js +1 -1
  105. package/lib/src/version.d.ts +1 -1
  106. package/lib/src/version.js +1 -1
  107. package/package.json +5 -5
@@ -1,11 +1,11 @@
1
- import { defineComponent as U, useSlots as x, ref as z, unref as o, computed as g, createVNode as u, Fragment as s, createBlock as h, createElementBlock as D, openBlock as f, resolveDynamicComponent as E, mergeProps as p, createSlots as v, renderList as V, withCtx as k, renderSlot as B, normalizeProps as b, guardReactiveProps as w } from "vue";
2
- import { Switch as A, Popconfirm as K } from "@aplus-frontend/antdv";
3
- import { isNil as L, isFunction as M, omit as P } from "lodash-unified";
1
+ import { defineComponent as z, useSlots as D, ref as v, unref as o, computed as V, createVNode as a, Fragment as s, createBlock as p, createElementBlock as E, openBlock as f, resolveDynamicComponent as K, mergeProps as k, createSlots as b, renderList as w, withCtx as C, renderSlot as B, normalizeProps as A, guardReactiveProps as P } from "vue";
2
+ import { Switch as _, Popconfirm as L } from "@aplus-frontend/antdv";
3
+ import { isNil as M, isFunction as j, omit as S } from "lodash-unified";
4
4
  import "../../utils/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { useControllableValue as R } from "../../hooks/useControllableValue.mjs";
7
- import { isDef as d } from "../../utils/is.mjs";
8
- const Q = /* @__PURE__ */ U({
6
+ import { useControllableValue as q } from "../../hooks/useControllableValue.mjs";
7
+ import { isDef as r } from "../../utils/is.mjs";
8
+ const X = /* @__PURE__ */ z({
9
9
  name: "ApFieldSwitch",
10
10
  __name: "index",
11
11
  props: {
@@ -51,76 +51,82 @@ const Q = /* @__PURE__ */ U({
51
51
  confirm: {}
52
52
  },
53
53
  emits: ["update:checked"],
54
- setup(S, {
55
- emit: _
54
+ setup(F, {
55
+ expose: N,
56
+ emit: T
56
57
  }) {
57
- const i = x(), e = S, F = _, {
58
+ const d = D(), e = F, $ = T, h = v(), {
58
59
  value: t,
59
- updateValue: r
60
- } = R(e, F, {
60
+ updateValue: i
61
+ } = q(e, $, {
61
62
  valuePropName: "checked"
62
- }), c = z(!1);
63
- async function C(n, a) {
64
- if (!d(e.confirm)) {
65
- if (!d(e.onAction)) {
66
- r(n);
63
+ }), c = v(!1);
64
+ async function y(n, u) {
65
+ if (!r(e.confirm)) {
66
+ if (!r(e.onAction)) {
67
+ i(n);
67
68
  return;
68
69
  }
69
70
  c.value = !0;
70
71
  try {
71
- await e.onAction(n, a) && r(n);
72
+ await e.onAction(n, u) && i(n);
72
73
  } finally {
73
74
  c.value = !1;
74
75
  }
75
76
  }
76
77
  }
77
- async function N() {
78
+ async function x() {
78
79
  const n = o(t) === e.checkedValue ? e.unCheckedValue : e.checkedValue;
79
- if (!d(e.onAction)) {
80
- r(n);
80
+ if (!r(e.onAction)) {
81
+ i(n);
81
82
  return;
82
83
  }
83
- await e.onAction(n) && r(n);
84
+ await e.onAction(n) && i(n);
84
85
  }
85
- const T = g(() => {
86
+ const R = V(() => {
86
87
  const n = o(t);
87
- return L(n) ? u(s, null, [e.emptyText]) : n === e.checkedValue ? u(s, null, [e.checkedChildren || i.checkedChildren?.() || `${e.checkedValue}`]) : u(s, null, [e.unCheckedChildren || i.unCheckedChildren?.() || `${e.unCheckedValue}`]);
88
- }), $ = g(() => d(e.confirm) ? M(e.confirm) ? e.confirm(o(t)) : e.confirm : {});
89
- return (n, a) => n.mode === "read" ? (f(), h(E(T.value), {
88
+ return M(n) ? a(s, null, [e.emptyText]) : n === e.checkedValue ? a(s, null, [e.checkedChildren || d.checkedChildren?.() || `${e.checkedValue}`]) : a(s, null, [e.unCheckedChildren || d.unCheckedChildren?.() || `${e.unCheckedValue}`]);
89
+ }), U = V(() => r(e.confirm) ? j(e.confirm) ? e.confirm(o(t)) : e.confirm : {});
90
+ return N({
91
+ focus: () => h.value?.focus(),
92
+ blur: () => h.value?.blur()
93
+ }), (n, u) => n.mode === "read" ? (f(), p(K(R.value), {
90
94
  key: 0
91
- })) : (f(), D(s, {
95
+ })) : (f(), E(s, {
92
96
  key: 1
93
- }, [!o(d)(n.confirm) || n.disabled ? (f(), h(o(A), p({
94
- key: 0
95
- }, o(P)(e, ["onUpdate:checked", "emptyText"]), {
97
+ }, [!o(r)(n.confirm) || n.disabled ? (f(), p(o(_), k({
98
+ key: 0,
99
+ ref_key: "switchRef",
100
+ ref: h
101
+ }, o(S)(e, ["onUpdate:checked", "emptyText"]), {
96
102
  checked: o(t),
97
103
  loading: n.loading ?? c.value,
98
- onClick: C
99
- }), v({
104
+ onClick: y
105
+ }), b({
100
106
  _: 2
101
- }, [V(i, (y, l) => ({
107
+ }, [w(d, (g, l) => ({
102
108
  name: l,
103
- fn: k((m) => [B(n.$slots, l, b(w(m || {})))])
104
- }))]), 1040, ["checked", "loading"])) : (f(), h(o(K), p({
109
+ fn: C((m) => [B(n.$slots, l, A(P(m || {})))])
110
+ }))]), 1040, ["checked", "loading"])) : (f(), p(o(L), k({
105
111
  key: 1,
106
112
  disabled: c.value
107
- }, $.value, {
108
- onConfirm: N
113
+ }, U.value, {
114
+ onConfirm: x
109
115
  }), {
110
- default: k(() => [u(o(A), p(o(P)(e, ["onUpdate:checked", "emptyText"]), {
116
+ default: C(() => [a(o(_), k(o(S)(e, ["onUpdate:checked", "emptyText"]), {
111
117
  checked: o(t),
112
118
  loading: n.loading ?? c.value,
113
- onClick: C
114
- }), v({
119
+ onClick: y
120
+ }), b({
115
121
  _: 2
116
- }, [V(i, (y, l) => ({
122
+ }, [w(d, (g, l) => ({
117
123
  name: l,
118
- fn: k((m) => [B(n.$slots, l, b(w(m || {})))])
124
+ fn: C((m) => [B(n.$slots, l, A(P(m || {})))])
119
125
  }))]), 1040, ["checked", "loading"])]),
120
126
  _: 3
121
127
  }, 16, ["disabled"]))], 64));
122
128
  }
123
129
  });
124
130
  export {
125
- Q as default
131
+ X as default
126
132
  };
@@ -17,8 +17,8 @@ declare function __VLS_template(): {
17
17
  };
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: DefineComponent<ApFieldTextPasswordProps, {
20
- focus: () => void;
21
20
  blur: () => void;
21
+ focus: () => void;
22
22
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
23
23
  "update:value": (...args: any[]) => void;
24
24
  "update:visible": (...args: any[]) => void;
@@ -9,8 +9,8 @@ import { ShowCountProps } from '@aplus-frontend/antdv/es/vc-input/inputProps';
9
9
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
10
10
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
11
11
  declare const _default: DefineComponent<ApFieldTextAreaProps, {
12
- focus: (options?: InputFocusOptions) => void;
13
12
  blur: () => void;
13
+ focus: (options?: InputFocusOptions) => void;
14
14
  resizableTextArea: any;
15
15
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
16
  "update:value": (...args: any[]) => void;
@@ -926,6 +926,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
926
926
  type: PropType<sizeType>;
927
927
  };
928
928
  maxSize: NumberConstructor;
929
+ minSize: NumberConstructor;
929
930
  drawerStyle: {
930
931
  type: PropType<CSSProperties>;
931
932
  default: CSSProperties;
@@ -1,20 +1,20 @@
1
- import { isVNode as Q, defineComponent as Y, useSlots as Z, shallowRef as ee, ref as y, computed as w, unref as n, watch as P, cloneVNode as te, createVNode as s, mergeProps as p, createElementBlock as N, openBlock as h, Fragment as ie, createBlock as S, createCommentVNode as M, withCtx as v, renderSlot as _, withModifiers as ne, normalizeClass as oe, resolveDynamicComponent as I, createTextVNode as ae, toDisplayString as se } from "vue";
2
- import { Button as z, Flex as le, Space as re, Drawer as ue } from "@aplus-frontend/antdv";
3
- import { isBoolean as de, isUndefined as me, omit as ce } from "lodash-unified";
1
+ import { isVNode as q, defineComponent as A, useSlots as E, shallowRef as L, ref as v, watch as G, computed as T, unref as l, cloneVNode as H, createVNode as o, mergeProps as m, createElementBlock as J, openBlock as h, Fragment as K, createBlock as w, createCommentVNode as Q, withCtx as c, renderSlot as B, resolveDynamicComponent as R, createTextVNode as X, toDisplayString as Y } from "vue";
2
+ import { Button as b, Flex as Z, Space as ee, Drawer as te } from "@aplus-frontend/antdv";
3
+ import { isBoolean as ie, isUndefined as ae, omit as le } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { convertReactiveToRaw as fe } from "../../utils/index.mjs";
7
- import { getSingleVNode as pe } from "../../utils/slot.mjs";
6
+ import { getNumberPx as F, convertReactiveToRaw as ne } from "../../utils/index.mjs";
7
+ import { getSingleVNode as oe } from "../../utils/slot.mjs";
8
8
  import "../ap-form.vue.mjs";
9
- import he from "../style/drawer-form.mjs";
10
- import { useControllableValue as ve } from "../../hooks/useControllableValue.mjs";
11
- import { useLocale as be } from "../../config-provider/hooks/use-locale.mjs";
12
- import { useNamespace as Fe } from "../../config-provider/hooks/use-namespace.mjs";
13
- import ge from "../ap-form.vue2.mjs";
14
- function L(r) {
15
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Q(r);
9
+ import se from "../style/drawer-form.mjs";
10
+ import { useControllableValue as re } from "../../hooks/useControllableValue.mjs";
11
+ import { useLocale as ue } from "../../config-provider/hooks/use-locale.mjs";
12
+ import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
13
+ import me from "../ap-form.vue2.mjs";
14
+ function x(s) {
15
+ return typeof s == "function" || Object.prototype.toString.call(s) === "[object Object]" && !q(s);
16
16
  }
17
- const De = /* @__PURE__ */ Y({
17
+ const Se = /* @__PURE__ */ A({
18
18
  name: "ApFormDrawerForm",
19
19
  __name: "index",
20
20
  props: {
@@ -100,17 +100,25 @@ const De = /* @__PURE__ */ Y({
100
100
  }
101
101
  },
102
102
  emits: ["update:open"],
103
- setup(r, {
104
- expose: U,
105
- emit: j
103
+ setup(s, {
104
+ expose: O,
105
+ emit: k
106
106
  }) {
107
- const t = r, b = Z(), E = j, o = ee(), d = y(), a = y(!1), {
108
- value: C,
109
- updateValue: m
110
- } = ve(t, E, {
107
+ const t = s, f = E(), W = k, a = L(), r = v(), n = v(!1), {
108
+ value: P,
109
+ updateValue: u
110
+ } = re(t, W, {
111
111
  valuePropName: "open",
112
112
  defaultValue: !1
113
- }), l = w(() => {
113
+ }), {
114
+ t: p
115
+ } = ue(), N = se("ap-form-drawer-form"), {
116
+ b: S
117
+ } = de("ap-form-drawer-form");
118
+ G(() => a.value, (e) => {
119
+ e && r.value && (e.setFieldsValue?.(r.value), r.value = void 0);
120
+ });
121
+ const d = T(() => {
114
122
  const e = {
115
123
  onResize: () => {
116
124
  },
@@ -118,160 +126,143 @@ const De = /* @__PURE__ */ Y({
118
126
  maxWidth: window.innerWidth * 0.8,
119
127
  resizeOnOpen: !0
120
128
  };
121
- return de(t.resize) ? t.resize ? e : {} : {
129
+ return ie(t.resize) ? t.resize ? e : {} : {
122
130
  minWidth: t.resize?.minWidth ?? e.minWidth,
123
131
  maxWidth: t.resize?.maxWidth ?? e.maxWidth,
124
132
  onResize: t.resize?.onResize ?? e.onResize,
125
- resizeOnOpen: me(t.resize?.resizeOnOpen) ? e.onResize : t.resize.resizeOnOpen
133
+ resizeOnOpen: ae(t.resize?.resizeOnOpen) ? e.resizeOnOpen : t.resize.resizeOnOpen
126
134
  };
127
- }), u = y(T()), {
128
- t: F
129
- } = be(), D = he("ap-form-drawer-form"), {
130
- b: $,
131
- e: q,
132
- em: V
133
- } = Fe("ap-form-drawer-form"), A = w(() => [q("resize-bar"), {
134
- [V("resize-bar", "min-disabled")]: n(u) === n(l).minWidth
135
- }, {
136
- [V("resize-bar", "max-disabled")]: n(u) === n(l).maxWidth
137
- }]);
138
- P(() => o.value, (e) => {
139
- e && d.value && (e.setFieldsValue?.(d.value), d.value = void 0);
140
- }), P(() => n(C), (e) => {
141
- e && n(l)?.resizeOnOpen && (u.value = T());
142
135
  });
143
- function T() {
144
- const e = n(l)?.minWidth;
136
+ function _() {
137
+ const e = l(d)?.minWidth;
145
138
  return !e || e && e < t.width ? t.width : e;
146
139
  }
147
- const R = pe(b.trigger), W = R ? te(R, {
140
+ const g = v(F(_()));
141
+ function I(e) {
142
+ const {
143
+ resizeOnOpen: i,
144
+ onResize: C
145
+ } = d.value;
146
+ i && (g.value = e, C?.(e));
147
+ }
148
+ const y = oe(f.trigger), z = y ? H(y, {
148
149
  onClick: () => {
149
- m(!0);
150
+ u(!0);
150
151
  }
151
- }) : null, X = w(() => {
152
+ }) : null, j = T(() => {
152
153
  const e = [];
153
154
  if (t.submitter === !1)
154
155
  return null;
155
156
  if (t.showCancel) {
156
157
  let i;
157
- e.push(s(z, {
158
- onClick: k,
159
- disabled: a.value
160
- }, L(i = F("ap.common.cancelText")) ? i : {
158
+ e.push(o(b, {
159
+ onClick: V,
160
+ disabled: n.value
161
+ }, x(i = p("ap.common.cancelText")) ? i : {
161
162
  default: () => [i]
162
163
  }));
163
164
  }
164
- return t.submitter?.resetButtonProps !== !1 && e.push(s(z, p(t.submitter?.resetButtonProps || {}, {
165
+ return t.submitter?.resetButtonProps !== !1 && e.push(o(b, m(t.submitter?.resetButtonProps || {}, {
165
166
  key: "submit",
166
- disabled: a.value,
167
- onClick: H
167
+ disabled: n.value,
168
+ onClick: U
168
169
  }), {
169
- default: () => [t.submitter?.resetText || F("ap.common.resetText")]
170
- })), t.submitter?.submitButtonProps !== !1 && e.push(s(z, p({
170
+ default: () => [t.submitter?.resetText || p("ap.common.resetText")]
171
+ })), t.submitter?.submitButtonProps !== !1 && e.push(o(b, m({
171
172
  type: "primary",
172
173
  key: "submit"
173
174
  }, t.submitter?.submitButtonProps || {}, {
174
- loading: a.value,
175
- onClick: J
175
+ loading: n.value,
176
+ onClick: D
176
177
  }), {
177
- default: () => [t.submitter?.submitText || F("ap.common.okText")]
178
- })), s(le, {
178
+ default: () => [t.submitter?.submitText || p("ap.common.okText")]
179
+ })), o(Z, {
179
180
  justify: "flex-end"
180
181
  }, {
181
- default: () => [b.submitter ? b.submitter(e) : s(re, null, L(e) ? e : {
182
+ default: () => [f.submitter ? f.submitter(e) : o(ee, null, x(e) ? e : {
182
183
  default: () => [e]
183
184
  })]
184
185
  });
185
186
  });
186
- function G() {
187
- l.value?.onResize?.(), document.addEventListener("mousemove", B), document.addEventListener("mouseup", x);
188
- }
189
- function B(e) {
190
- const i = n(l), c = (document.body.offsetWidth || 1e3) - (e.clientX - document.body.offsetLeft), f = i?.minWidth ?? (t.width || 800), O = i?.maxWidth ?? window.innerWidth * 0.8;
191
- let g = c;
192
- c < f && (g = f), c > O && (g = O), u.value = g;
187
+ function U() {
188
+ t.submitter !== !1 && (a.value?.resetFields(), t.submitter?.onReset?.());
193
189
  }
194
- function x() {
195
- document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", x);
196
- }
197
- function H() {
198
- t.submitter !== !1 && (o.value?.resetFields(), t.submitter?.onReset?.());
199
- }
200
- async function J() {
190
+ async function D() {
201
191
  if (t.submitter !== !1)
202
192
  try {
203
- const e = await o.value?.validateFieldsReturnTransformed();
204
- t.submitter?.onSubmit?.(), a.value = !0;
205
- const i = t.onFinish?.(fe(e));
193
+ const e = await a.value?.validateFieldsReturnTransformed();
194
+ t.submitter?.onSubmit?.(), n.value = !0;
195
+ const i = t.onFinish?.(ne(e));
206
196
  if (t.submitTimeout && i instanceof Promise) {
207
- const f = setTimeout(() => a.value = !1, t.submitTimeout);
197
+ const $ = setTimeout(() => n.value = !1, t.submitTimeout);
208
198
  i.finally(() => {
209
- clearTimeout(f), a.value = !1;
199
+ clearTimeout($), n.value = !1;
210
200
  });
211
201
  }
212
- await i && m(!1);
202
+ await i && u(!1);
213
203
  } finally {
214
- a.value = !1;
204
+ n.value = !1;
215
205
  }
216
206
  }
217
- function k() {
218
- n(a) || m(!1);
207
+ function V() {
208
+ l(n) || u(!1);
219
209
  }
220
- function K(e) {
221
- !e && n(a) || m(e);
210
+ function M(e) {
211
+ !e && l(n) || u(e);
222
212
  }
223
- return U({
213
+ return O({
224
214
  resetFields: async () => {
225
- o.value?.resetFields();
215
+ a.value?.resetFields();
226
216
  },
227
217
  clearValidate: (e) => {
228
- o.value?.clearValidate(e);
218
+ a.value?.clearValidate(e);
229
219
  },
230
- validateFields: (e, i) => o.value?.validateFields(e, i),
231
- getFieldsValue: (e) => o.value?.getFieldsValue(e),
232
- validate: (e, i) => o.value?.validate(e, i),
220
+ validateFields: (e, i) => a.value?.validateFields(e, i),
221
+ getFieldsValue: (e) => a.value?.getFieldsValue(e),
222
+ validate: (e, i) => a.value?.validate(e, i),
233
223
  scrollToField: (e, i = {}) => {
234
- o.value?.scrollToField(e, i);
224
+ a.value?.scrollToField(e, i);
235
225
  },
236
226
  setFieldValue: (e, i) => {
237
- o.value?.setFieldValue?.(e, i);
227
+ a.value?.setFieldValue?.(e, i);
238
228
  },
239
229
  setFieldsValue: (e) => {
240
- if (!o.value) {
241
- d.value = e;
230
+ if (!a.value) {
231
+ r.value = e;
242
232
  return;
243
233
  }
244
- o.value?.setFieldsValue?.(e);
234
+ a.value?.setFieldsValue?.(e);
235
+ },
236
+ getInternalInstance: (e) => a.value?.getInternalInstance(e),
237
+ getFieldsValueTransformed: (e) => a.value?.getFieldsValueTransformed(e),
238
+ validateFieldsReturnTransformed: (e) => a.value?.validateFieldsReturnTransformed(e)
239
+ }), (e, i) => (h(), J(K, null, [o(l(te), m(e.drawerProps, {
240
+ open: l(P),
241
+ size: g.value,
242
+ "max-size": l(F)(d.value.maxWidth),
243
+ "min-size": l(F)(d.value.minWidth),
244
+ resizable: {
245
+ onResize: I
245
246
  },
246
- getInternalInstance: (e) => o.value?.getInternalInstance(e),
247
- getFieldsValueTransformed: (e) => o.value?.getFieldsValueTransformed(e),
248
- validateFieldsReturnTransformed: (e) => o.value?.validateFieldsReturnTransformed(e)
249
- }), (e, i) => (h(), N(ie, null, [s(n(ue), p(e.drawerProps, {
250
- open: n(C),
251
- width: u.value,
252
- class: [n($)(), n(D)],
253
- "onUpdate:open": K,
254
- onCancel: k
247
+ class: [l(S)(), l(N)],
248
+ "onUpdate:open": M,
249
+ onCancel: V
255
250
  }), {
256
- title: v(() => [_(e.$slots, "title", {}, () => [ae(se(t.title), 1)])]),
257
- footer: v(() => [(h(), S(I(X.value)))]),
258
- default: v(() => [s(ge, p({
251
+ title: c(() => [B(e.$slots, "title", {}, () => [X(Y(t.title), 1)])]),
252
+ footer: c(() => [(h(), w(R(j.value)))]),
253
+ default: c(() => [o(me, m({
259
254
  ref_key: "formRef",
260
- ref: o
261
- }, n(ce)(t, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
262
- default: v(() => [_(e.$slots, "default")]),
255
+ ref: a
256
+ }, l(le)(t, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
257
+ default: c(() => [B(e.$slots, "default")]),
263
258
  _: 3
264
- }, 16), e.resize ? (h(), N("div", {
265
- key: 0,
266
- class: oe(A.value),
267
- onMousedown: ne(G, ["stop", "prevent"])
268
- }, null, 34)) : M("", !0)]),
259
+ }, 16)]),
269
260
  _: 3
270
- }, 16, ["open", "width", "class"]), n(W) ? (h(), S(I(n(W)), {
261
+ }, 16, ["open", "size", "max-size", "min-size", "resizable", "class"]), l(z) ? (h(), w(R(l(z)), {
271
262
  key: 0
272
- })) : M("", !0)], 64));
263
+ })) : Q("", !0)], 64));
273
264
  }
274
265
  });
275
266
  export {
276
- De as default
267
+ Se as default
277
268
  };
@@ -278,7 +278,7 @@ export type ApFormModalFormProps = Omit<ApFormProps, 'onFinish'> & {
278
278
  submitTimeout?: number;
279
279
  };
280
280
  export type CustomizeResizeType = {
281
- onResize?: () => void;
281
+ onResize?: (_size: number) => void;
282
282
  maxWidth?: DrawerProps['width'];
283
283
  minWidth?: DrawerProps['width'];
284
284
  resizeOnOpen?: boolean;
@@ -4,10 +4,8 @@ import { Breakpoint } from '@aplus-frontend/antdv/es/_util/responsiveObserve';
4
4
  import { Gutter } from '@aplus-frontend/antdv/es/grid/Row';
5
5
  declare function __VLS_template(): {
6
6
  attrs: Partial<{}>;
7
- slots: Readonly<{
8
- default(): any[];
9
- }> & {
10
- default(): any[];
7
+ slots: {
8
+ default?(_: {}): any;
11
9
  };
12
10
  refs: {};
13
11
  rootEl: any;
@@ -1,17 +1,19 @@
1
- import { isVNode as C, defineComponent as P, useSlots as k, ref as w, onBeforeUpdate as S, watch as B, unref as r, createVNode as N, mergeProps as d, createBlock as f, openBlock as s, withCtx as R, createElementBlock as b, Fragment as x, renderList as j, resolveDynamicComponent as v } from "vue";
2
- import { Col as F, Row as I } from "@aplus-frontend/antdv";
3
- import { pick as D, isBoolean as O, omit as V } from "lodash-unified";
1
+ import { isVNode as _, defineComponent as P, unref as o, createVNode as s, mergeProps as a, createBlock as y, openBlock as S, withCtx as c, renderSlot as h } from "vue";
2
+ import { Col as w, Row as C } from "@aplus-frontend/antdv";
3
+ import { pick as R, isBoolean as b, omit as N } from "lodash-unified";
4
+ import "../../render/index.mjs";
4
5
  import "../../config-provider/index.mjs";
5
6
  import "../../utils/index.mjs";
6
- import { apFormItemColPropKeys as $ } from "../constant.mjs";
7
- import A from "../style/item-group.mjs";
8
- import { genRealChildren as E, buildColSpan as G, getStringName as H } from "./helper.mjs";
9
- import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { isDef as L } from "../../utils/is.mjs";
11
- function U(o) {
12
- return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !C(o);
7
+ import { apFormItemColPropKeys as j } from "../constant.mjs";
8
+ import k from "../style/item-group.mjs";
9
+ import { buildColSpan as x, getStringName as B } from "./helper.mjs";
10
+ import { useNamespace as I } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { isDef as $ } from "../../utils/is.mjs";
12
+ import F from "../../render/render.mjs";
13
+ function O(e) {
14
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !_(e);
13
15
  }
14
- const ee = /* @__PURE__ */ P({
16
+ const M = /* @__PURE__ */ P({
15
17
  name: "ApFormItemGroup",
16
18
  __name: "index",
17
19
  props: {
@@ -29,41 +31,34 @@ const ee = /* @__PURE__ */ P({
29
31
  default: 3
30
32
  }
31
33
  },
32
- setup(o) {
33
- const a = o, m = k(), {
34
- b: i
35
- } = K("ap-form-item-group"), g = A("ap-form-item-group"), p = w([]);
36
- S(() => {
37
- p.value = c(m.default());
38
- }), B(() => m.default(), (n) => {
39
- p.value = c(n);
40
- }, {
41
- immediate: !0
42
- });
43
- function c(n) {
44
- const l = E(n || []);
45
- return r(l).map((e, y) => {
46
- const t = e.props, u = D(t, $), _ = u?.span ? {} : G(a.countPerRow), h = O(t.hidden) ? !!t.hidden : L(t.hidden);
47
- return {
48
- key: `${y}-${H(t.name)}`,
49
- node: N(F, d(_, u, {
50
- class: h ? i("col-hidden") : ""
51
- }), U(e) ? e : {
52
- default: () => [e]
53
- })
54
- };
34
+ setup(e) {
35
+ const p = e, {
36
+ b: m
37
+ } = I("ap-form-item-group"), f = k("ap-form-item-group");
38
+ function u(n) {
39
+ return o(n).map((t, d) => {
40
+ const r = t.props, i = R(r, j), l = i?.span ? {} : x(p.countPerRow), g = b(r.hidden) ? !!r.hidden : $(r.hidden);
41
+ return s(w, a(l, i, {
42
+ key: `${d}-${B(r.name)}`,
43
+ class: g ? m("col-hidden") : ""
44
+ }), O(t) ? t : {
45
+ default: () => [t]
46
+ });
55
47
  });
56
48
  }
57
- return (n, l) => (s(), f(r(I), d({
58
- class: [r(i)(), r(g)]
59
- }, r(V)(a, ["countPerRow"])), {
60
- default: R(() => [(s(!0), b(x, null, j(p.value, (e) => (s(), f(v(e.node), {
61
- key: e.key
62
- }))), 128))]),
63
- _: 1
49
+ return (n, t) => (S(), y(o(C), a({
50
+ class: [o(m)(), o(f)]
51
+ }, o(N)(p, ["countPerRow"])), {
52
+ default: c(() => [s(o(F), {
53
+ renderer: u
54
+ }, {
55
+ default: c(() => [h(n.$slots, "default")]),
56
+ _: 3
57
+ })]),
58
+ _: 3
64
59
  }, 16, ["class"]));
65
60
  }
66
61
  });
67
62
  export {
68
- ee as default
63
+ M as default
69
64
  };