@aplus-frontend/ui 6.12.0 → 6.13.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 (70) hide show
  1. package/es/src/ap-descriptions/interface.d.ts +1 -1
  2. package/es/src/ap-form/ap-form.vue2.mjs +118 -108
  3. package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
  4. package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
  5. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  6. package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
  7. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  8. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
  9. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +23 -18
  10. package/es/src/ap-form/search-form/hooks/use-sorter.mjs +31 -30
  11. package/es/src/ap-form/search-form/index.vue.mjs +42 -41
  12. package/es/src/ap-grid/index.vue.mjs +221 -225
  13. package/es/src/ap-modal/interface.d.ts +8 -0
  14. package/es/src/ap-modal/utils/createModalStream.mjs +69 -66
  15. package/es/src/ap-table/ap-table.vue2.mjs +107 -111
  16. package/es/src/ap-table/constants.d.ts +5 -5
  17. package/es/src/ap-table/context.d.ts +1 -0
  18. package/es/src/ap-table/context.mjs +6 -5
  19. package/es/src/ap-table/utils.d.ts +5 -3247
  20. package/es/src/ap-table/utils.mjs +107 -121
  21. package/es/src/business/ap-view/ap-view.vue2.mjs +76 -74
  22. package/es/src/business/ap-view/interface.d.ts +1 -0
  23. package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
  24. package/es/src/business/batch-input-group/index.vue.mjs +56 -52
  25. package/es/src/business/batch-input-group/interface.d.ts +5 -0
  26. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +36 -32
  27. package/es/src/business/batch-input-group/utils.d.ts +8 -0
  28. package/es/src/business/batch-input-group/utils.mjs +10 -0
  29. package/es/src/version.d.ts +1 -1
  30. package/es/src/version.mjs +1 -1
  31. package/lib/src/ap-descriptions/interface.d.ts +1 -1
  32. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  33. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
  34. package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
  35. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  36. package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
  37. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  38. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
  39. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
  40. package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
  41. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  42. package/lib/src/ap-grid/index.vue.js +1 -1
  43. package/lib/src/ap-modal/interface.d.ts +8 -0
  44. package/lib/src/ap-modal/utils/createModalStream.js +1 -1
  45. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  46. package/lib/src/ap-table/constants.d.ts +5 -5
  47. package/lib/src/ap-table/context.d.ts +1 -0
  48. package/lib/src/ap-table/context.js +1 -1
  49. package/lib/src/ap-table/utils.d.ts +5 -3247
  50. package/lib/src/ap-table/utils.js +1 -1
  51. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  52. package/lib/src/business/ap-view/interface.d.ts +1 -0
  53. package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
  54. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  55. package/lib/src/business/batch-input-group/interface.d.ts +5 -0
  56. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +3 -2
  57. package/lib/src/business/batch-input-group/utils.d.ts +8 -0
  58. package/lib/src/business/batch-input-group/utils.js +1 -0
  59. package/lib/src/version.d.ts +1 -1
  60. package/lib/src/version.js +1 -1
  61. package/package.json +1 -1
  62. package/theme/ap-grid/index.css +3 -0
  63. package/theme/ap-grid/index.less +3 -4
  64. package/theme/index.css +3 -0
  65. package/es/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
  66. package/es/src/ap-table/components/dynamic-component/index.vue.mjs +0 -4
  67. package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +0 -15
  68. package/lib/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
  69. package/lib/src/ap-table/components/dynamic-component/index.vue.js +0 -1
  70. package/lib/src/ap-table/components/dynamic-component/index.vue2.js +0 -1
@@ -1,26 +1,27 @@
1
- import { isVNode as le, defineComponent as re, useSlots as se, ref as D, shallowRef as U, computed as S, unref as n, watch as W, createVNode as o, Fragment as _, createBlock as g, openBlock as d, mergeProps as ie, withCtx as B, resolveDynamicComponent as I, createElementBlock as ue, renderList as ce } from "vue";
2
- import { Col as w, Flex as N, Button as M, Row as pe } from "@aplus-frontend/antdv";
1
+ import { isVNode as ne, defineComponent as le, useSlots as re, ref as D, shallowRef as U, computed as S, unref as n, watch as W, createVNode as o, Fragment as _, createBlock as x, openBlock as d, mergeProps as se, withCtx as A, resolveDynamicComponent as B, createElementBlock as ie, renderList as ue } from "vue";
2
+ import { Col as w, Flex as I, Button as M, Row as ce } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../item/index.vue2.mjs";
5
5
  import { genRealChildren as z } from "../item-group/helper.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { isArray as de, isBoolean as fe, omit as me } from "lodash-unified";
7
+ import { isArray as pe, isBoolean as de, omit as me } from "lodash-unified";
8
8
  import { isDef as q } from "../../utils/index.mjs";
9
- import { execFunc as H, diffFormItem as he } from "./utils.mjs";
9
+ import { execFunc as H, diffFormItem as fe } from "./utils.mjs";
10
10
  import "./components/popover-filter.vue.mjs";
11
- import { useCountPerRow as xe } from "./hooks/use-count-per-row.mjs";
11
+ import { useCountPerRow as he } from "./hooks/use-count-per-row.mjs";
12
12
  import "./components/popover-sorter/index.vue.mjs";
13
13
  import { useSorter as ge } from "./hooks/use-sorter.mjs";
14
+ import { getTargetNode as xe } from "./hooks/use-collapse-input-count.mjs";
14
15
  import { useNamespace as ye } from "../../config-provider/hooks/use-namespace.mjs";
15
16
  import { useLocale as ve } from "../../config-provider/hooks/use-locale.mjs";
16
17
  import G from "../item/index.vue.mjs";
17
18
  import Ce from "./components/popover-filter.vue2.mjs";
18
19
  import Se from "./components/popover-sorter/index.vue2.mjs";
19
20
  import _e from "../ap-form.vue2.mjs";
20
- function we(f) {
21
- return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !le(f);
21
+ function we(m) {
22
+ return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !ne(m);
22
23
  }
23
- const s = 24, ze = /* @__PURE__ */ re({
24
+ const s = 24, He = /* @__PURE__ */ le({
24
25
  name: "ApFormSearchForm",
25
26
  __name: "index",
26
27
  props: {
@@ -115,15 +116,15 @@ const s = 24, ze = /* @__PURE__ */ re({
115
116
  default: 300
116
117
  }
117
118
  },
118
- setup(f, {
119
+ setup(m, {
119
120
  expose: J
120
121
  }) {
121
122
  var L;
122
- const i = se(), t = f, {
123
- b: m
123
+ const i = re(), t = m, {
124
+ b: f
124
125
  } = ye("ap-form-search-form"), {
125
126
  t: k
126
- } = ve(), K = xe(t), y = D(), Q = D();
127
+ } = ve(), K = he(t), y = D(), Q = D();
127
128
  function T() {
128
129
  var a;
129
130
  const e = (a = y.value) == null ? void 0 : a.getFieldsValueTransformed(!0);
@@ -133,7 +134,7 @@ const s = 24, ze = /* @__PURE__ */ re({
133
134
  var e, a;
134
135
  t.customReset || (a = (e = y.value) == null ? void 0 : e.resetFields) == null || a.call(e), H(t.onReset);
135
136
  }
136
- const Y = (e) => q(e) ? (de(e) ? e : [e]).join("") : Date.now();
137
+ const Y = (e) => q(e) ? (pe(e) ? e : [e]).join("") : Date.now();
137
138
  let E = [];
138
139
  const h = U(z(i.default())), c = U((L = i.extra) == null ? void 0 : L.call(i)), P = S(() => Math.floor(s / n(K))), {
139
140
  items: R,
@@ -141,7 +142,7 @@ const s = 24, ze = /* @__PURE__ */ re({
141
142
  handleClickConfirm: b
142
143
  } = ge(h);
143
144
  W(() => i.default(), (e) => {
144
- E = h.value, h.value = he(E, z(e)), O.value = !1;
145
+ E = h.value, h.value = fe(E, z(e)), O.value = !1;
145
146
  }), W(() => {
146
147
  var e;
147
148
  return (e = i.extra) == null ? void 0 : e.call(i);
@@ -149,27 +150,27 @@ const s = 24, ze = /* @__PURE__ */ re({
149
150
  c.value = e;
150
151
  });
151
152
  const l = S(() => {
152
- const e = h.value, a = [], r = [], x = [], u = n(P);
153
+ const e = h.value, a = [], r = [], g = [], u = n(P);
153
154
  let v = 0, F = 0;
154
155
  const te = s * t.maxRows - u * (n(c) && !t.extraInAction ? 2 : 1);
155
- e.forEach((A, ne) => {
156
- const p = A.props;
157
- if (fe(p.hidden) ? !!p.hidden : q(p.hidden))
158
- a.push(A);
156
+ e.forEach((N) => {
157
+ const p = xe(N).props;
158
+ if (de(p.hidden) ? !!p.hidden : q(p.hidden))
159
+ a.push(N);
159
160
  else {
160
161
  let C = p.span || u;
161
- const j = {
162
- node: A,
162
+ const V = {
163
+ node: N,
163
164
  span: C,
164
- key: `ApFormSearchFormItem-${ne}-${Y(p.name)}-${p._signal}`
165
- }, V = s - v % s;
166
- V < C && (C += V), v += C, v > te ? r.push(j) : (F = v, x.push(j));
165
+ key: `ApFormSearchFormItem-${Y(p.name)}-${p._signal}`
166
+ }, $ = s - v % s;
167
+ $ < C && (C += $), v += C, v > te ? r.push(V) : (F = v, g.push(V));
167
168
  }
168
169
  });
169
- const $ = s - (F + u) % s, oe = F % s < u, ae = $ < u ? s : $;
170
+ const j = s - (F + u) % s, oe = F % s < u, ae = j < u ? s : j;
170
171
  return {
171
172
  hideNode: o(_, null, [a]),
172
- nodes: x,
173
+ nodes: g,
173
174
  collapseNodes: r,
174
175
  extraSpan: ae,
175
176
  lastRowOnlyIncludeActionAndExtra: oe
@@ -181,16 +182,16 @@ const s = 24, ze = /* @__PURE__ */ re({
181
182
  key: "actionWrapper"
182
183
  }, {
183
184
  default: () => [o(G, null, {
184
- default: () => [o(N, {
185
+ default: () => [o(I, {
185
186
  wrap: "wrap",
186
187
  justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(c) && t.extraInAction) ? "flex-end" : "space-between"
187
188
  }, {
188
- default: () => [o(N, {
189
+ default: () => [o(I, {
189
190
  gap: 8,
190
191
  wrap: "wrap"
191
192
  }, {
192
193
  default: () => [a ? o("div", {
193
- class: m("column-setting-trigger-wrapper")
194
+ class: f("column-setting-trigger-wrapper")
194
195
  }, [l.value.collapseNodes.length ? o(Ce, {
195
196
  onSubmit: T,
196
197
  config: l.value.collapseNodes,
@@ -207,25 +208,25 @@ const s = 24, ze = /* @__PURE__ */ re({
207
208
  delay: t.loadingDelay
208
209
  } : !1,
209
210
  htmlType: "submit",
210
- class: m("action-btn")
211
+ class: f("action-btn")
211
212
  }, {
212
213
  default: () => [t.searchText || k("ap.apForm.search.search")]
213
214
  }), o(M, {
214
215
  onClick: X,
215
216
  type: "text",
216
- class: [m("action-btn"), m("action-btn-reset")]
217
+ class: [f("action-btn"), f("action-btn-reset")]
217
218
  }, {
218
219
  default: () => [t.resetText || k("ap.apForm.search.reset")]
219
220
  })]
220
221
  }), t.extraInAction ? n(c) : null]
221
222
  })]
222
223
  })]
223
- }), x = !t.extraInAction && n(c) ? o(w, {
224
+ }), g = !t.extraInAction && n(c) ? o(w, {
224
225
  span: l.value.extraSpan,
225
226
  key: "extraNode"
226
227
  }, {
227
228
  default: () => [o(G, null, {
228
- default: () => [o(N, {
229
+ default: () => [o(I, {
229
230
  justify: l.value.extraSpan === s || l.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
230
231
  }, we(e = n(c)) ? e : {
231
232
  default: () => [e]
@@ -234,7 +235,7 @@ const s = 24, ze = /* @__PURE__ */ re({
234
235
  }) : null, u = o(w, {
235
236
  span: l.value.extraSpan
236
237
  }, null);
237
- return l.value.lastRowOnlyIncludeActionAndExtra ? o(_, null, [x || u, r]) : o(_, null, [r, x]);
238
+ return l.value.lastRowOnlyIncludeActionAndExtra ? o(_, null, [g || u, r]) : o(_, null, [r, g]);
238
239
  });
239
240
  function ee() {
240
241
  var a;
@@ -246,21 +247,21 @@ const s = 24, ze = /* @__PURE__ */ re({
246
247
  getSorterItems: () => R.value,
247
248
  setSorterItems: b,
248
249
  resetSorterItems: ee
249
- }), (e, a) => (d(), g(_e, ie({
250
+ }), (e, a) => (d(), x(_e, se({
250
251
  ref_key: "apForm",
251
252
  ref: y,
252
- class: n(m)()
253
+ class: n(f)()
253
254
  }, n(me)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
254
- default: B(() => [(d(), g(I(l.value.hideNode))), o(n(pe), {
255
+ default: A(() => [(d(), x(B(l.value.hideNode))), o(n(ce), {
255
256
  gutter: 8
256
257
  }, {
257
- default: B(() => [(d(!0), ue(_, null, ce(l.value.nodes, (r) => (d(), g(n(w), {
258
+ default: A(() => [(d(!0), ie(_, null, ue(l.value.nodes, (r) => (d(), x(n(w), {
258
259
  key: r.key,
259
260
  span: r.span
260
261
  }, {
261
- default: B(() => [(d(), g(I(r.node)))]),
262
+ default: A(() => [(d(), x(B(r.node)))]),
262
263
  _: 2
263
- }, 1032, ["span"]))), 128)), (d(), g(I(Z.value)))]),
264
+ }, 1032, ["span"]))), 128)), (d(), x(B(Z.value)))]),
264
265
  _: 1
265
266
  })]),
266
267
  _: 1
@@ -268,5 +269,5 @@ const s = 24, ze = /* @__PURE__ */ re({
268
269
  }
269
270
  });
270
271
  export {
271
- ze as default
272
+ He as default
272
273
  };