@aplus-frontend/ui 0.3.11 → 0.3.13

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 (79) hide show
  1. package/es/index.mjs +173 -169
  2. package/es/src/ap-field/radio/style/index.js +1 -0
  3. package/es/src/ap-form/ap-form.vue.d.ts +12 -31
  4. package/es/src/ap-form/ap-form.vue2.mjs +135 -118
  5. package/es/src/ap-form/drawer-form/index.vue.d.ts +22 -40
  6. package/es/src/ap-form/drawer-form/index.vue.mjs +3 -3
  7. package/es/src/ap-form/index.d.ts +3 -1
  8. package/es/src/ap-form/index.mjs +26 -22
  9. package/es/src/ap-form/interface.d.ts +3 -1
  10. package/es/src/ap-form/modal-form/index.vue.d.ts +23 -41
  11. package/es/src/ap-form/modal-form/index.vue.mjs +60 -59
  12. package/es/src/ap-form/provider/context.d.ts +3 -0
  13. package/es/src/ap-form/provider/context.mjs +17 -0
  14. package/es/src/ap-form/provider/index.vue.d.ts +19 -0
  15. package/es/src/ap-form/provider/index.vue.mjs +39 -0
  16. package/es/src/ap-form/provider/index.vue2.mjs +4 -0
  17. package/es/src/ap-form/provider/interface.d.ts +22 -0
  18. package/es/src/ap-form/search-form/index.vue.d.ts +22 -40
  19. package/es/src/business/ap-ladder/style/index.js +1 -0
  20. package/es/src/business/ap-table-modal/interface.d.ts +2 -0
  21. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +50 -48
  22. package/es/src/business/batch-input-group/form-item.vue.d.ts +6 -0
  23. package/es/src/business/batch-input-group/form-item.vue.mjs +101 -0
  24. package/es/src/business/batch-input-group/form-item.vue2.mjs +4 -0
  25. package/es/src/business/batch-input-group/index.d.ts +2 -1
  26. package/es/src/business/batch-input-group/index.mjs +1 -0
  27. package/es/src/business/batch-input-group/index.vue.mjs +46 -44
  28. package/es/src/business/batch-input-group/interface.d.ts +8 -0
  29. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +43 -38
  30. package/es/src/config-provider/config-provider.d.ts +1 -0
  31. package/es/src/config-provider/css-var.d.ts +1 -0
  32. package/es/src/config-provider/css-var.mjs +14 -12
  33. package/es/src/config-provider/index.d.ts +5 -0
  34. package/es/src/index.mjs +154 -150
  35. package/es/src/utils/slot.mjs +6 -8
  36. package/lib/index.js +1 -1
  37. package/lib/src/ap-field/radio/style/index.js +1 -0
  38. package/lib/src/ap-form/ap-form.vue.d.ts +12 -31
  39. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  40. package/lib/src/ap-form/drawer-form/index.vue.d.ts +22 -40
  41. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  42. package/lib/src/ap-form/index.d.ts +3 -1
  43. package/lib/src/ap-form/index.js +1 -1
  44. package/lib/src/ap-form/interface.d.ts +3 -1
  45. package/lib/src/ap-form/modal-form/index.vue.d.ts +23 -41
  46. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  47. package/lib/src/ap-form/provider/context.d.ts +3 -0
  48. package/lib/src/ap-form/provider/context.js +1 -0
  49. package/lib/src/ap-form/provider/index.vue.d.ts +19 -0
  50. package/lib/src/ap-form/provider/index.vue.js +1 -0
  51. package/lib/src/ap-form/provider/index.vue2.js +1 -0
  52. package/lib/src/ap-form/provider/interface.d.ts +22 -0
  53. package/lib/src/ap-form/render/style/index.d.ts +1 -0
  54. package/lib/src/ap-form/render/style/index.js +1 -0
  55. package/lib/src/ap-form/search-form/index.vue.d.ts +22 -40
  56. package/lib/src/business/ap-ladder/style/index.js +1 -0
  57. package/lib/src/business/ap-table-modal/interface.d.ts +2 -0
  58. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  59. package/lib/src/business/batch-input-group/form-item.vue.d.ts +6 -0
  60. package/lib/src/business/batch-input-group/form-item.vue.js +1 -0
  61. package/lib/src/business/batch-input-group/form-item.vue2.js +1 -0
  62. package/lib/src/business/batch-input-group/index.d.ts +2 -1
  63. package/lib/src/business/batch-input-group/index.js +1 -1
  64. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  65. package/lib/src/business/batch-input-group/interface.d.ts +8 -0
  66. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  67. package/lib/src/config-provider/config-provider.d.ts +1 -0
  68. package/lib/src/config-provider/css-var.d.ts +1 -0
  69. package/lib/src/config-provider/css-var.js +1 -1
  70. package/lib/src/config-provider/index.d.ts +5 -0
  71. package/lib/src/index.js +1 -1
  72. package/lib/src/utils/slot.js +1 -1
  73. package/package.json +2 -2
  74. /package/es/src/ap-field/radio/style/{style.d.ts → index.d.ts} +0 -0
  75. /package/es/src/ap-form/render/style/{style.d.ts → index.d.ts} +0 -0
  76. /package/{lib/src/ap-form/render/style/style.d.ts → es/src/ap-form/render/style/index.js} +0 -0
  77. /package/es/src/business/ap-ladder/style/{style.d.ts → index.d.ts} +0 -0
  78. /package/lib/src/ap-field/radio/style/{style.d.ts → index.d.ts} +0 -0
  79. /package/lib/src/business/ap-ladder/style/{style.d.ts → index.d.ts} +0 -0
@@ -1,17 +1,17 @@
1
- import { defineComponent as F, ref as m, unref as s, computed as U, h as q, openBlock as $, createBlock as z, mergeProps as b, withCtx as k, createVNode as T } from "vue";
2
- import { message as h, Modal as H } from "@aplus-frontend/antdv";
1
+ import { defineComponent as U, ref as m, unref as s, computed as q, h as V, openBlock as k, createBlock as T, mergeProps as y, withCtx as h, resolveDynamicComponent as $, createCommentVNode as z, createVNode as S } from "vue";
2
+ import { message as B, Modal as W } from "@aplus-frontend/antdv";
3
3
  import "../../index.mjs";
4
- import { cloneDeep as V, omit as S } from "lodash-unified";
5
- import { transformTableParams as W } from "@aplus-frontend/utils";
4
+ import { cloneDeep as Y, omit as R } from "lodash-unified";
5
+ import { transformTableParams as J } from "@aplus-frontend/utils";
6
6
  import "./modal-title.vue.mjs";
7
- import { AsyncOpenResultError as x } from "./interface.mjs";
7
+ import { AsyncOpenResultError as b } from "./interface.mjs";
8
8
  import "./table-layout/index.vue.mjs";
9
- import { useGlobalConfig as Y } from "../../config-provider/hooks/use-global-config.mjs";
10
- import { useLocale as J } from "../../config-provider/hooks/use-locale.mjs";
11
- import Q from "./modal-title.vue2.mjs";
12
- import X from "./table-layout/index.vue2.mjs";
13
- import { ApTable as Z } from "../../ap-table/index.mjs";
14
- const fe = /* @__PURE__ */ F({
9
+ import { useGlobalConfig as Q } from "../../config-provider/hooks/use-global-config.mjs";
10
+ import { useLocale as X } from "../../config-provider/hooks/use-locale.mjs";
11
+ import Z from "./modal-title.vue2.mjs";
12
+ import j from "./table-layout/index.vue2.mjs";
13
+ import { ApTable as ee } from "../../ap-table/index.mjs";
14
+ const pe = /* @__PURE__ */ U({
15
15
  __name: "table-modal",
16
16
  props: {
17
17
  columns: {},
@@ -24,6 +24,7 @@ const fe = /* @__PURE__ */ F({
24
24
  disabledCheckbox: { type: [Boolean, Function] },
25
25
  rowSelection: {},
26
26
  tableLayoutConfig: {},
27
+ renderHeader: {},
27
28
  prefixCls: {},
28
29
  confirmLoading: { type: Boolean, default: void 0 },
29
30
  title: {},
@@ -61,12 +62,12 @@ const fe = /* @__PURE__ */ F({
61
62
  mousePosition: {}
62
63
  },
63
64
  emits: ["finish"],
64
- setup(B, { expose: R, emit: M }) {
65
- const e = B, P = M, i = m(!1), y = m({}), d = m(null), a = m([]), C = m();
65
+ setup(M, { expose: P, emit: K }) {
66
+ const e = M, _ = K, i = m(!1), x = m({}), d = m(null), a = m([]), C = m();
66
67
  let c = null, n = null;
67
- const K = Y("uiMode", "admin"), { t: g } = J(), _ = async (o = [], t = {}) => {
68
+ const I = Q("uiMode", "admin"), { t: g } = X(), D = async (o = [], t = {}) => {
68
69
  var l, r, u;
69
- switch (a.value = [...o], i.value = !0, y.value = t == null ? void 0 : t.extraParams, C.value = t.apTableDataSources || ((l = e.apTableProps) == null ? void 0 : l.dataSource), t.refreshMode || "reset") {
70
+ switch (a.value = [...o], i.value = !0, x.value = t == null ? void 0 : t.extraParams, C.value = t.apTableDataSources || ((l = e.apTableProps) == null ? void 0 : l.dataSource), t.refreshMode || "reset") {
70
71
  case "reset":
71
72
  (r = d.value) == null || r.reset();
72
73
  break;
@@ -80,31 +81,31 @@ const fe = /* @__PURE__ */ F({
80
81
  c = p, n = f;
81
82
  });
82
83
  }, w = () => {
83
- i.value = !1, c = null, n == null || n(x.ModalCancel), n = null;
84
- }, I = async (o) => {
85
- o = W({
84
+ i.value = !1, c = null, n == null || n(b.ModalCancel), n = null;
85
+ }, L = async (o) => {
86
+ o = J({
86
87
  ...o,
87
- ...y.value
88
+ ...x.value
88
89
  });
89
90
  const t = e.api, { records: l, total: r } = await t(o);
90
91
  return {
91
92
  data: l,
92
93
  total: r
93
94
  };
94
- }, L = () => {
95
+ }, N = () => {
95
96
  if (a.value.length > e.maxCount) {
96
- n == null || n(x.ExceedMaxCount);
97
+ n == null || n(b.ExceedMaxCount);
97
98
  return;
98
99
  }
99
100
  if (e.getRowKey) {
100
- const o = V(s(a)), t = o.map(e.getRowKey);
101
- P("finish", t, o), c == null || c({ keys: t, rows: o });
101
+ const o = Y(s(a)), t = o.map(e.getRowKey);
102
+ _("finish", t, o), c == null || c({ keys: t, rows: o });
102
103
  } else {
103
- n == null || n(x.NotFineGetRowKey);
104
+ n == null || n(b.NotFineGetRowKey);
104
105
  return;
105
106
  }
106
107
  i.value = !1;
107
- }, A = U(() => {
108
+ }, A = q(() => {
108
109
  if (!e.getRowKey) return;
109
110
  const o = e.getRowKey;
110
111
  return {
@@ -115,14 +116,14 @@ const fe = /* @__PURE__ */ F({
115
116
  onSelectAll(t, l) {
116
117
  var u, p;
117
118
  if (l.length > e.maxCount) {
118
- h.warning(
119
+ B.warning(
119
120
  g("ap.apTableModal.messageMaxCount", { maxCount: e.maxCount })
120
121
  );
121
122
  return;
122
123
  }
123
124
  const r = (u = d.value) == null ? void 0 : u.dataSource;
124
125
  if (t) {
125
- const f = s(r).filter((v) => !a.value.some((E) => o(E) === o(v)));
126
+ const f = s(r).filter((v) => !a.value.some((F) => o(F) === o(v)));
126
127
  a.value = a.value.concat(f);
127
128
  } else
128
129
  a.value = (p = a.value) == null ? void 0 : p.filter((f) => !r.some((v) => o(v) === o(f)));
@@ -130,7 +131,7 @@ const fe = /* @__PURE__ */ F({
130
131
  onSelect(t, l) {
131
132
  if (l) {
132
133
  if (a.value.length >= e.maxCount) {
133
- h.warning(
134
+ B.warning(
134
135
  g("ap.apTableModal.messageMaxCount", { maxCount: e.maxCount })
135
136
  );
136
137
  return;
@@ -149,8 +150,8 @@ const fe = /* @__PURE__ */ F({
149
150
  }),
150
151
  ...e.rowSelection || {}
151
152
  };
152
- }), D = () => e.isRenderModalTitleSuffix ? q(
153
- Q,
153
+ }), O = () => e.isRenderModalTitleSuffix ? V(
154
+ Z,
154
155
  {
155
156
  title: e.title,
156
157
  count: a.value.length || 0,
@@ -159,9 +160,9 @@ const fe = /* @__PURE__ */ F({
159
160
  {
160
161
  default: e.renderModalTitleSuffix ?? void 0
161
162
  }
162
- ) : e.title, N = () => d.value, O = () => {
163
+ ) : e.title, G = () => d.value, H = () => {
163
164
  a.value = [];
164
- }, G = (o) => {
165
+ }, E = (o) => {
165
166
  const t = e.getRowKey;
166
167
  if (!t) return;
167
168
  const l = a.value.findIndex(
@@ -169,16 +170,16 @@ const fe = /* @__PURE__ */ F({
169
170
  );
170
171
  a.value.splice(l, 1);
171
172
  };
172
- return R({
173
- open: _,
173
+ return P({
174
+ open: D,
174
175
  close: w,
175
- getApTableInstance: N
176
- }), (o, t) => ($(), z(s(H), b(
176
+ getApTableInstance: G
177
+ }), (o, t) => (k(), T(s(W), y(
177
178
  {
178
179
  open: i.value,
179
180
  "onUpdate:open": t[0] || (t[0] = (l) => i.value = l)
180
181
  },
181
- s(S)(e, [
182
+ s(R)(e, [
182
183
  "api",
183
184
  "getRowKey",
184
185
  "centered",
@@ -193,30 +194,31 @@ const fe = /* @__PURE__ */ F({
193
194
  "tableLayoutConfig"
194
195
  ]),
195
196
  {
196
- title: D(),
197
+ title: O(),
197
198
  "body-style": { maxHeight: "calc(100vh - 205px)", overflowY: "scroll" },
198
199
  centered: e.centered ?? !0,
199
- onOk: L,
200
+ onOk: N,
200
201
  onCancel: w
201
202
  }
202
203
  ), {
203
- default: k(() => [
204
- T(X, b(e.tableLayoutConfig || {}, {
204
+ default: h(() => [
205
+ e.renderHeader ? (k(), T($(e.renderHeader), { key: 0 })) : z("", !0),
206
+ S(j, y(e.tableLayoutConfig || {}, {
205
207
  "selected-list": a.value,
206
- onClear: O,
207
- onDeleteItem: G
208
+ onClear: H,
209
+ onDeleteItem: E
208
210
  }), {
209
- default: k(() => [
210
- T(s(Z), b(s(S)(e.apTableProps, "dataSource"), {
211
+ default: h(() => [
212
+ S(s(ee), y(s(R)(e.apTableProps, "dataSource"), {
211
213
  ref_key: "apTableRef",
212
214
  ref: d,
213
215
  scroll: { y: "100%" },
214
216
  style: { padding: "0px" },
215
217
  columns: o.columns,
216
- request: I,
218
+ request: L,
217
219
  "row-key": o.getRowKey,
218
220
  "row-selection": A.value,
219
- bordered: s(K) === "admin",
221
+ bordered: s(I) === "admin",
220
222
  "data-source": C.value
221
223
  }), null, 16, ["columns", "row-key", "row-selection", "bordered", "data-source"])
222
224
  ]),
@@ -228,5 +230,5 @@ const fe = /* @__PURE__ */ F({
228
230
  }
229
231
  });
230
232
  export {
231
- fe as default
233
+ pe as default
232
234
  };
@@ -0,0 +1,6 @@
1
+ import { ApFormItemBatchInputProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<ApFormItemBatchInputProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormItemBatchInputProps> & Readonly<{}>, {
4
+ trim: boolean;
5
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,101 @@
1
+ import { defineComponent as B, computed as n, openBlock as b, createBlock as _, mergeProps as u, unref as f, withCtx as g, createVNode as x } from "vue";
2
+ import "./index.vue2.mjs";
3
+ import "../../ap-form/item/index.vue2.mjs";
4
+ import { isValid as d } from "@aplus-frontend/utils";
5
+ import { omit as p } from "lodash-unified";
6
+ import V from "../../ap-form/item/index.vue.mjs";
7
+ import k from "./index.vue.mjs";
8
+ const A = /* @__PURE__ */ B({
9
+ __name: "form-item",
10
+ props: {
11
+ htmlFor: {},
12
+ prefixCls: {},
13
+ label: {},
14
+ help: {},
15
+ extra: {},
16
+ labelCol: {},
17
+ wrapperCol: {},
18
+ hasFeedback: { type: Boolean },
19
+ colon: { type: Boolean },
20
+ labelAlign: {},
21
+ prop: {},
22
+ name: {},
23
+ rules: {},
24
+ autoLink: { type: Boolean },
25
+ required: { type: Boolean },
26
+ validateFirst: { type: Boolean },
27
+ validateStatus: {},
28
+ validateTrigger: {},
29
+ messageVariables: {},
30
+ hidden: { type: Boolean },
31
+ noStyle: { type: Boolean },
32
+ tooltip: {},
33
+ span: {},
34
+ order: {},
35
+ offset: {},
36
+ push: {},
37
+ pull: {},
38
+ xs: {},
39
+ sm: {},
40
+ md: {},
41
+ lg: {},
42
+ xl: {},
43
+ xxl: {},
44
+ flex: {},
45
+ bordered: { type: Boolean },
46
+ valuePropName: {},
47
+ initialValue: {},
48
+ _signal: {},
49
+ transform: {},
50
+ field: {},
51
+ disabled: { type: Boolean },
52
+ placeholer: {},
53
+ trim: { type: Boolean, default: !0 }
54
+ },
55
+ setup(c) {
56
+ const l = c, y = n(() => (l == null ? void 0 : l.transform) || {
57
+ flat: !1,
58
+ transformer: (e) => {
59
+ var o, a, i, r, m, s;
60
+ if (e)
61
+ return !(e != null && e.value) || ((o = e == null ? void 0 : e.value) == null ? void 0 : o.length) < 1 ? void 0 : (a = l == null ? void 0 : l.field) != null && a.options ? {
62
+ ...e,
63
+ value: (r = (i = e == null ? void 0 : e.value) == null ? void 0 : i.filter((t) => d(t == null ? void 0 : t.trim()))) == null ? void 0 : r.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
64
+ } : (s = (m = e == null ? void 0 : e.value) == null ? void 0 : m.filter((t) => d(t == null ? void 0 : t.trim()))) == null ? void 0 : s.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
65
+ }
66
+ }), v = n(() => {
67
+ var e;
68
+ return ((e = l.field) == null ? void 0 : e.style) || "width:auto";
69
+ }), h = n(() => {
70
+ var e, o;
71
+ return (l == null ? void 0 : l.initialValue) || {
72
+ key: (o = (e = l == null ? void 0 : l.field) == null ? void 0 : e.options) == null ? void 0 : o.map((a) => a.value)
73
+ };
74
+ });
75
+ return (e, o) => (b(), _(V, u(
76
+ f(p)(l, [
77
+ "field",
78
+ "initialValue",
79
+ "transform",
80
+ "placeholder",
81
+ "disabled"
82
+ ]),
83
+ {
84
+ "initial-value": h.value,
85
+ transform: y.value
86
+ }
87
+ ), {
88
+ default: g(() => [
89
+ x(k, u(f(p)(l.field, ["style"]), {
90
+ style: v.value,
91
+ disabled: e.disabled,
92
+ placeholer: e.placeholer
93
+ }), null, 16, ["style", "disabled", "placeholer"])
94
+ ]),
95
+ _: 1
96
+ }, 16, ["initial-value", "transform"]));
97
+ }
98
+ });
99
+ export {
100
+ A as default
101
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./form-item.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -1,2 +1,3 @@
1
1
  import { default as BatchInputGroup } from './index.vue';
2
- export { BatchInputGroup };
2
+ import { default as ApFormItemBatchInput } from './form-item.vue';
3
+ export { BatchInputGroup, ApFormItemBatchInput };
@@ -1 +1,2 @@
1
1
  import "./index.vue2.mjs";
2
+ import "./form-item.vue2.mjs";
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, ref as B, computed as r, unref as n, openBlock as g, createElementBlock as P, createVNode as s, withCtx as A, createBlock as T, normalizeStyle as z, createCommentVNode as K, mergeProps as M } from "vue";
1
+ import { defineComponent as O, ref as B, computed as r, unref as l, openBlock as g, createElementBlock as P, createVNode as p, withCtx as A, createBlock as T, normalizeStyle as z, createCommentVNode as K, mergeProps as M } from "vue";
2
2
  import "../../ap-field/index.mjs";
3
3
  import { Space as $ } from "@aplus-frontend/antdv";
4
4
  import "../../config-provider/index.mjs";
@@ -12,7 +12,7 @@ import { useLocale as H } from "../../config-provider/hooks/use-locale.mjs";
12
12
  import Y from "../../ap-field/select/index.vue.mjs";
13
13
  import { ApFieldText as J } from "../../ap-field/text/index.mjs";
14
14
  import Q from "./popover-input/index.vue2.mjs";
15
- const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
15
+ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
16
16
  __name: "index",
17
17
  props: {
18
18
  style: { type: [Boolean, null, String, Object, Array] },
@@ -68,69 +68,69 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
68
68
  emptyText: { default: "--" }
69
69
  },
70
70
  emits: ["update:value"],
71
- setup(V, { emit: C }) {
72
- const l = V, S = N("Text", l), x = C, { value: a, updateValue: p } = q(
73
- l,
74
- x
75
- ), f = B(), d = B(), { t: I } = H(), U = r(() => l.options ? l.options.length > 1 && l.hasAll ? [
76
- { value: c, label: I("ap.apGroupSearch.all") },
77
- ...l.options
78
- ] : l.options : []), b = r(() => l.options ? l.options.map((e) => e.value) : []), w = r(() => {
71
+ setup(b, { emit: V }) {
72
+ const n = b, C = N("Text", n), S = V, { value: a, updateValue: i } = q(
73
+ n,
74
+ S
75
+ ), f = B(), c = B(), { t: I } = H(), U = r(() => n.options ? n.options.length > 1 && n.hasAll ? [
76
+ { value: d, label: I("ap.apGroupSearch.all") },
77
+ ...n.options
78
+ ] : n.options : []), w = r(() => n.options ? n.options.map((e) => e.value) : []), k = r(() => {
79
79
  var e, t;
80
- return (t = (e = n(a)) == null ? void 0 : e.value) != null && t.length ? n(a).value.join(",") : "";
81
- }), _ = r(() => {
80
+ return (t = (e = l(a)) == null ? void 0 : e.value) != null && t.length ? l(a).value.join(",") : "";
81
+ }), x = r(() => {
82
82
  var e, t;
83
- return (t = (e = n(a)) == null ? void 0 : e.value) != null && t.length ? n(a).value.join(`
83
+ return (t = (e = l(a)) == null ? void 0 : e.value) != null && t.length ? l(a).value.join(`
84
84
  `) : "";
85
- }), k = r(() => {
85
+ }), R = r(() => {
86
86
  var t;
87
- const e = (t = n(a)) == null ? void 0 : t.key;
87
+ const e = (t = l(a)) == null ? void 0 : t.key;
88
88
  if (e != null && e.length)
89
- return e.length === 1 ? e[0] : c;
90
- }), R = r(() => {
89
+ return e.length === 1 ? e[0] : d;
90
+ }), _ = r(() => {
91
91
  var o;
92
- const e = (o = n(a)) == null ? void 0 : o.key;
93
- return !e || (e == null ? void 0 : e.length) <= 1 ? n(S) : (l.options || []).filter((u) => e.includes(u.value)).map((u) => u.label).join("/");
92
+ const e = (o = l(a)) == null ? void 0 : o.key;
93
+ return !e || (e == null ? void 0 : e.length) <= 1 ? l(C) : (n.options || []).filter((u) => e.includes(u.value)).map((u) => u.label).join("/");
94
94
  });
95
95
  function j(e) {
96
- const t = n(a) || {}, o = e === c ? n(b) : G(e) ? [e] : [];
97
- p({
96
+ const t = l(a) || {}, o = e === d ? l(w) : G(e) ? [e] : [];
97
+ i({
98
98
  ...t,
99
99
  key: o
100
100
  });
101
101
  }
102
102
  function E(e) {
103
103
  var v, y;
104
- const t = n(a) || {}, o = e.target.value || "", u = o.replace(/[,]+/g, ",");
104
+ const t = l(a) || {}, o = e.target.value || "", u = o.replace(/[,]+/g, ",");
105
105
  if (o !== u) {
106
- const h = (y = (v = d.value) == null ? void 0 : v.$el) == null ? void 0 : y.querySelector("input");
106
+ const h = (y = (v = c.value) == null ? void 0 : v.$el) == null ? void 0 : y.querySelector("input");
107
107
  h && (h.value = u);
108
108
  }
109
- let i = u.split(",");
110
- i.length === 1 && i[0] === "" && (i = []), p({
109
+ let s = u.split(",");
110
+ s.length === 1 && s[0] === "" && (s = []), i({
111
111
  ...t,
112
- value: i
112
+ value: s
113
113
  });
114
114
  }
115
115
  function F(e) {
116
- const t = n(a) || {};
116
+ const t = l(a) || {};
117
117
  let o = e.split(/,|\n/);
118
- p({
118
+ i({
119
119
  ...t,
120
120
  value: o
121
121
  });
122
122
  }
123
123
  function m() {
124
124
  var o;
125
- const e = n(a) || {}, t = (o = e.value) == null ? void 0 : o.filter(Boolean);
126
- p({
125
+ const e = l(a) || {}, t = (o = e.value) == null ? void 0 : o.filter(Boolean);
126
+ i({
127
127
  ...e,
128
128
  value: t
129
129
  });
130
130
  }
131
131
  function L(e) {
132
132
  var t;
133
- m(), (t = l.onBlur) == null || t.call(l, e);
133
+ m(), (t = n.onBlur) == null || t.call(n, e);
134
134
  }
135
135
  return (e, t) => (g(), P("div", {
136
136
  ref_key: "containerRef",
@@ -141,21 +141,22 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
141
141
  onBlur: t[1] || (t[1] = //@ts-ignore
142
142
  (...o) => e.onBlur && e.onBlur(...o))
143
143
  }, [
144
- s(n($).Compact, { block: "" }, {
144
+ p(l($).Compact, { block: "" }, {
145
145
  default: A(() => {
146
146
  var o;
147
147
  return [
148
- (o = e.options) != null && o.length ? (g(), T(n(Y), {
148
+ (o = e.options) != null && o.length ? (g(), T(l(Y), {
149
149
  key: 0,
150
150
  style: z(e.style),
151
151
  options: U.value,
152
- value: k.value,
152
+ value: R.value,
153
153
  "allow-clear": !1,
154
154
  "dropdown-match-select-width": !1,
155
+ disabled: e.disabled,
155
156
  "onUpdate:value": j
156
- }, null, 8, ["style", "options", "value"])) : K("", !0),
157
- s(n(J), M(
158
- n(D)(l, [
157
+ }, null, 8, ["style", "options", "value", "disabled"])) : K("", !0),
158
+ p(l(J), M(
159
+ l(D)(n, [
159
160
  "style",
160
161
  "value",
161
162
  "onUpdate:value",
@@ -165,21 +166,22 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
165
166
  ]),
166
167
  {
167
168
  ref_key: "inputRef",
168
- ref: d,
169
+ ref: c,
169
170
  style: e.inputStyle,
170
- value: w.value,
171
- placeholder: R.value,
171
+ value: k.value,
172
+ placeholder: _.value,
172
173
  onInput: E,
173
174
  onBlur: L
174
175
  }
175
176
  ), {
176
177
  suffix: A(() => [
177
- s(Q, {
178
+ p(Q, {
178
179
  _parent: f.value,
179
- value: _.value,
180
+ value: x.value,
181
+ disabled: e.disabled,
180
182
  "onUpdate:value": F,
181
183
  onClose: m
182
- }, null, 8, ["_parent", "value"])
184
+ }, null, 8, ["_parent", "value", "disabled"])
183
185
  ]),
184
186
  _: 1
185
187
  }, 16, ["style", "value", "placeholder"])
@@ -191,5 +193,5 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
191
193
  }
192
194
  });
193
195
  export {
194
- ce as default
196
+ de as default
195
197
  };
@@ -1,4 +1,5 @@
1
1
  import { ApFieldTextAreaProps, ApFieldTextProps } from '../../ap-field';
2
+ import { ApFormItemProps } from '../../ap-form';
2
3
  import { DefaultOptionType } from '@aplus-frontend/antdv/es/select';
3
4
  import { StyleValue } from 'vue';
4
5
  export type BatchInputGroupValueType = {
@@ -31,4 +32,11 @@ export interface BatchInputGroupProps extends Omit<ApFieldTextProps, 'value' | '
31
32
  export interface BatchInputGroupPopoverInputProps extends Pick<ApFieldTextAreaProps, 'value' | 'onUpdate:value'> {
32
33
  _parent?: HTMLElement;
33
34
  onClose?: () => void;
35
+ disabled?: boolean;
34
36
  }
37
+ export type ApFormItemBatchInputProps = ApFormItemProps & {
38
+ field?: Omit<BatchInputGroupProps, 'value' | 'onUpdate:value'>;
39
+ disabled?: boolean;
40
+ placeholer?: string;
41
+ trim?: boolean;
42
+ };
@@ -1,74 +1,79 @@
1
- import { defineComponent as V, ref as y, openBlock as k, createElementBlock as A, normalizeClass as l, unref as e, createVNode as p, withCtx as i, createElementVNode as w } from "vue";
2
- import { Popover as L, Textarea as N } from "@aplus-frontend/antdv";
1
+ import { defineComponent as A, ref as m, openBlock as w, createElementBlock as B, normalizeClass as p, unref as e, createVNode as c, withCtx as d, createElementVNode as L } from "vue";
2
+ import { Popover as N, Textarea as P } from "@aplus-frontend/antdv";
3
3
  import "../../../config-provider/index.mjs";
4
- import { IconApAdLineScreen as P } from "@aplus-frontend/icon";
4
+ import { IconApAdLineScreen as z } from "@aplus-frontend/icon";
5
5
  import "../../../hooks/index.mjs";
6
- import { useControllableValue as z } from "../../../hooks/useControllableValue.mjs";
7
- import { useLocale as B } from "../../../config-provider/hooks/use-locale.mjs";
8
- import { useNamespace as E } from "../../../config-provider/hooks/use-namespace.mjs";
9
- const j = /* @__PURE__ */ V({
6
+ import { useControllableValue as E } from "../../../hooks/useControllableValue.mjs";
7
+ import { useLocale as F } from "../../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as O } from "../../../config-provider/hooks/use-namespace.mjs";
9
+ const D = /* @__PURE__ */ A({
10
10
  __name: "index",
11
11
  props: {
12
12
  _parent: {},
13
13
  onClose: { type: Function },
14
+ disabled: { type: Boolean },
14
15
  value: {},
15
16
  "onUpdate:value": { type: Function }
16
17
  },
17
18
  emits: ["update:value"],
18
- setup(m, { emit: f }) {
19
- const n = m, d = f, { value: v, updateValue: g } = z(n, d), a = y(), h = (t) => n._parent || t, { t: _ } = B();
20
- function C(t) {
21
- var u;
22
- const o = t.target.value || "", r = o.replace(/[\n,]+/g, `
19
+ setup(f, { emit: v }) {
20
+ const o = f, g = v, { value: b, updateValue: h } = E(o, g), n = m(!1), l = m(), C = (t) => o._parent || t, { t: _ } = F();
21
+ function x(t) {
22
+ var s;
23
+ const a = t.target.value || "", r = a.replace(/[\n,]+/g, `
23
24
  `);
24
- if (r !== o) {
25
- const s = ((u = a.value) == null ? void 0 : u.$el) || a.value;
26
- s && (s.value = r);
25
+ if (r !== a) {
26
+ const i = ((s = l.value) == null ? void 0 : s.$el) || l.value;
27
+ i && (i.value = r);
27
28
  }
28
- g(r);
29
+ h(r);
29
30
  }
30
- function x(t) {
31
- var o;
32
- t || (o = n.onClose) == null || o.call(n);
31
+ function y(t) {
32
+ var a;
33
+ o.disabled ? n.value = !1 : n.value = t, !t && ((a = o.onClose) == null || a.call(o));
33
34
  }
34
- const { b: c, e: b, em: I } = E("batch-input-group-popover-input");
35
- return (t, o) => (k(), A("div", {
36
- class: l(e(c)())
35
+ const { b: u, e: I, em: V, bm: k } = O("batch-input-group-popover-input");
36
+ return (t, a) => (w(), B("div", {
37
+ class: p(e(u)())
37
38
  }, [
38
- p(e(L), {
39
- "overlay-class-name": e(b)("popover"),
40
- "get-popup-container": h,
39
+ c(e(N), {
40
+ "overlay-class-name": e(I)("popover"),
41
+ "get-popup-container": C,
41
42
  trigger: "click",
42
43
  placement: "bottomLeft",
43
- onOpenChange: x
44
+ open: n.value,
45
+ onOpenChange: y
44
46
  }, {
45
- content: i(() => [
46
- w("div", {
47
- class: l(e(I)("popover", "content"))
47
+ content: d(() => [
48
+ L("div", {
49
+ class: p(e(V)("popover", "content"))
48
50
  }, [
49
- p(e(N), {
51
+ c(e(P), {
50
52
  ref_key: "textAreaRef",
51
- ref: a,
53
+ ref: l,
52
54
  placeholder: e(_)("ap.batchInputGroup.popoverInputPlaceholder"),
53
55
  bordered: !1,
54
56
  rows: 10,
55
- value: e(v),
57
+ value: e(b),
56
58
  "allow-clear": !1,
57
59
  "auto-size": !1,
58
- onInput: C
60
+ onInput: x
59
61
  }, null, 8, ["placeholder", "value"])
60
62
  ], 2)
61
63
  ]),
62
- default: i(() => [
63
- p(e(P), {
64
- class: l(e(c)("trigger-icon"))
64
+ default: d(() => [
65
+ c(e(z), {
66
+ class: p([
67
+ e(u)("trigger-icon"),
68
+ t.disabled ? e(k)("trigger-icon", "disabled") : null
69
+ ])
65
70
  }, null, 8, ["class"])
66
71
  ]),
67
72
  _: 1
68
- }, 8, ["overlay-class-name"])
73
+ }, 8, ["overlay-class-name", "open"])
69
74
  ], 2));
70
75
  }
71
76
  });
72
77
  export {
73
- j as default
78
+ D as default
74
79
  };