@aplus-frontend/ui 0.2.7 → 0.2.9

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 +151 -147
  2. package/es/src/ap-field/switch/index.vue.mjs +38 -37
  3. package/es/src/ap-form/drawer-form/index.vue.mjs +104 -99
  4. package/es/src/ap-modal/utils/createModal.mjs +14 -13
  5. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +53 -0
  6. package/es/src/business/ap-group-search/ap-group-search.vue.mjs +4 -0
  7. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +191 -0
  8. package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +355 -0
  9. package/es/src/business/ap-group-search/extension-select/index.vue.mjs +4 -0
  10. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +124 -0
  11. package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +3 -0
  12. package/es/src/business/ap-group-search/images/icon-down.vue.mjs +28 -0
  13. package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +3 -0
  14. package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +45 -0
  15. package/es/src/business/ap-group-search/index.d.ts +2830 -0
  16. package/es/src/business/ap-group-search/index.mjs +14 -0
  17. package/es/src/business/ap-group-search/interface.d.ts +11 -0
  18. package/es/src/business/ap-group-search/interface.mjs +1 -0
  19. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +357 -0
  20. package/es/src/business/ap-group-search/popover-select/index.vue.mjs +4 -0
  21. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +192 -0
  22. package/es/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
  23. package/es/src/business/ap-group-search/popover-select/style/css.js +1 -0
  24. package/es/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
  25. package/es/src/business/ap-group-search/popover-select/style/index.js +1 -0
  26. package/es/src/business/ap-group-search/style/css.d.ts +0 -0
  27. package/es/src/business/ap-group-search/style/css.js +1 -0
  28. package/es/src/business/ap-group-search/style/index.d.ts +0 -0
  29. package/es/src/business/ap-group-search/style/index.js +1 -0
  30. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +24 -23
  31. package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +17 -11
  32. package/es/src/business/index.d.ts +1 -0
  33. package/es/src/business/index.mjs +30 -26
  34. package/es/src/check-card/index.vue2.mjs +43 -43
  35. package/es/src/index.mjs +33 -29
  36. package/es/src/locale/lang/en.mjs +8 -0
  37. package/es/src/locale/lang/zh-cn.mjs +8 -0
  38. package/es/src/path-map.mjs +3 -1
  39. package/es/src/work-order-modal/createWorkOrder.mjs +13 -12
  40. package/lib/index.js +1 -1
  41. package/lib/src/ap-field/switch/index.vue.js +1 -1
  42. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  43. package/lib/src/ap-modal/utils/createModal.js +1 -1
  44. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +53 -0
  45. package/lib/src/business/ap-group-search/ap-group-search.vue.js +1 -0
  46. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -0
  47. package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +355 -0
  48. package/lib/src/business/ap-group-search/extension-select/index.vue.js +1 -0
  49. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -0
  50. package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +3 -0
  51. package/lib/src/business/ap-group-search/images/icon-down.vue.js +1 -0
  52. package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +3 -0
  53. package/lib/src/business/ap-group-search/images/icon-line-select.vue.js +1 -0
  54. package/lib/src/business/ap-group-search/index.d.ts +2830 -0
  55. package/lib/src/business/ap-group-search/index.js +1 -0
  56. package/lib/src/business/ap-group-search/interface.d.ts +11 -0
  57. package/lib/src/business/ap-group-search/interface.js +1 -0
  58. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +357 -0
  59. package/lib/src/business/ap-group-search/popover-select/index.vue.js +1 -0
  60. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -0
  61. package/lib/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
  62. package/lib/src/business/ap-group-search/popover-select/style/css.js +1 -0
  63. package/lib/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
  64. package/lib/src/business/ap-group-search/popover-select/style/index.js +1 -0
  65. package/lib/src/business/ap-group-search/style/css.d.ts +0 -0
  66. package/lib/src/business/ap-group-search/style/css.js +1 -0
  67. package/lib/src/business/ap-group-search/style/index.d.ts +0 -0
  68. package/lib/src/business/ap-group-search/style/index.js +1 -0
  69. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
  70. package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
  71. package/lib/src/business/index.d.ts +1 -0
  72. package/lib/src/business/index.js +1 -1
  73. package/lib/src/check-card/index.vue2.js +1 -1
  74. package/lib/src/index.js +1 -1
  75. package/lib/src/locale/lang/en.js +1 -1
  76. package/lib/src/locale/lang/zh-cn.js +1 -1
  77. package/lib/src/path-map.js +1 -1
  78. package/lib/src/work-order-modal/createWorkOrder.js +1 -1
  79. package/package.json +6 -5
@@ -1,19 +1,19 @@
1
- import { isVNode as H, defineComponent as J, useSlots as K, ref as h, computed as O, watch as R, unref as s, cloneVNode as Q, createVNode as d, mergeProps as v, openBlock as b, createElementBlock as P, Fragment as Y, withCtx as g, renderSlot as M, createTextVNode as Z, toDisplayString as ee, createBlock as N, resolveDynamicComponent as S, normalizeClass as te, withModifiers as ie, createCommentVNode as _ } from "vue";
2
- import { Button as V, Flex as ne, Space as oe, Drawer as le } from "@aplus-frontend/antdv";
1
+ import { isVNode as K, defineComponent as Q, useSlots as Y, ref as v, computed as w, unref as l, watch as N, cloneVNode as Z, createVNode as d, mergeProps as b, openBlock as g, createElementBlock as P, Fragment as ee, withCtx as F, renderSlot as M, createTextVNode as te, toDisplayString as ie, createBlock as S, resolveDynamicComponent as _, normalizeClass as ne, withModifiers as oe, createCommentVNode as L } from "vue";
2
+ import { Button as V, Flex as le, Space as ae, Drawer as se } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
5
- import { getSingleVNode as ae } from "../../utils/slot.mjs";
5
+ import { getSingleVNode as re } from "../../utils/slot.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { isBoolean as se, isUndefined as re, omit as ue } from "lodash-unified";
8
- import { convertReactiveToRaw as de } from "../../utils/index.mjs";
9
- import { useControllableValue as ce } from "../../hooks/useControllableValue.mjs";
10
- import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
11
- import { useNamespace as fe } from "../../config-provider/hooks/use-namespace.mjs";
12
- import pe from "../ap-form.vue2.mjs";
13
- function L(c) {
14
- return typeof c == "function" || Object.prototype.toString.call(c) === "[object Object]" && !H(c);
7
+ import { isBoolean as ue, isUndefined as de, omit as me } from "lodash-unified";
8
+ import { convertReactiveToRaw as ce } from "../../utils/index.mjs";
9
+ import { useControllableValue as fe } from "../../hooks/useControllableValue.mjs";
10
+ import { useLocale as pe } from "../../config-provider/hooks/use-locale.mjs";
11
+ import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
12
+ import ve from "../ap-form.vue2.mjs";
13
+ function j(c) {
14
+ return typeof c == "function" || Object.prototype.toString.call(c) === "[object Object]" && !K(c);
15
15
  }
16
- const Le = /* @__PURE__ */ J({
16
+ const Ee = /* @__PURE__ */ Q({
17
17
  __name: "index",
18
18
  props: {
19
19
  layout: {
@@ -89,17 +89,17 @@ const Le = /* @__PURE__ */ J({
89
89
  },
90
90
  emits: ["update:open"],
91
91
  setup(c, {
92
- expose: j,
93
- emit: E
92
+ expose: E,
93
+ emit: U
94
94
  }) {
95
- const n = c, F = K(), U = E, l = h(), m = h(), u = h(!1), {
96
- value: z,
97
- updateValue: f
98
- } = ce(n, U, {
95
+ const n = c, y = Y(), D = U, a = v(), p = v(), u = v(!1), {
96
+ value: C,
97
+ updateValue: h
98
+ } = fe(n, D, {
99
99
  valuePropName: "open",
100
100
  defaultValue: !1
101
- }), p = O(() => {
102
- var t, i, a, r;
101
+ }), m = w(() => {
102
+ var t, i, s, r;
103
103
  const e = {
104
104
  onResize: () => {
105
105
  },
@@ -107,181 +107,186 @@ const Le = /* @__PURE__ */ J({
107
107
  maxWidth: window.innerWidth * 0.8,
108
108
  resizeOnOpen: !0
109
109
  };
110
- return se(n.resize) ? n.resize ? e : {} : {
110
+ return ue(n.resize) ? n.resize ? e : {} : {
111
111
  minWidth: ((t = n.resize) == null ? void 0 : t.minWidth) ?? e.minWidth,
112
112
  maxWidth: ((i = n.resize) == null ? void 0 : i.maxWidth) ?? e.maxWidth,
113
- onResize: ((a = n.resize) == null ? void 0 : a.onResize) ?? e.onResize,
114
- resizeOnOpen: re((r = n.resize) == null ? void 0 : r.resizeOnOpen) ? e.onResize : n.resize.resizeOnOpen
113
+ onResize: ((s = n.resize) == null ? void 0 : s.onResize) ?? e.onResize,
114
+ resizeOnOpen: de((r = n.resize) == null ? void 0 : r.resizeOnOpen) ? e.onResize : n.resize.resizeOnOpen
115
115
  };
116
- }), y = h(C()), {
117
- t: w
118
- } = me(), {
119
- e: D
120
- } = fe("ap-form-drawer-form");
121
- R(() => l.value, (e) => {
116
+ }), f = v(x()), {
117
+ t: z
118
+ } = pe(), {
119
+ e: $,
120
+ em: W
121
+ } = he("ap-form-drawer-form"), q = w(() => [$("resize-bar"), {
122
+ [W("resize-bar", "min-disabled")]: l(f) === l(m).minWidth
123
+ }, {
124
+ [W("resize-bar", "max-disabled")]: l(f) === l(m).maxWidth
125
+ }]);
126
+ N(() => a.value, (e) => {
122
127
  var t;
123
- e && m.value && ((t = e.setFieldsValue) == null || t.call(e, m.value), m.value = void 0);
124
- }), R(() => s(z), (e) => {
128
+ e && p.value && ((t = e.setFieldsValue) == null || t.call(e, p.value), p.value = void 0);
129
+ }), N(() => l(C), (e) => {
125
130
  var t;
126
- e && (t = s(p)) != null && t.resizeOnOpen && (y.value = C());
131
+ e && (t = l(m)) != null && t.resizeOnOpen && (f.value = x());
127
132
  });
128
- function C() {
133
+ function x() {
129
134
  var t;
130
- const e = (t = s(p)) == null ? void 0 : t.minWidth;
135
+ const e = (t = l(m)) == null ? void 0 : t.minWidth;
131
136
  return !e || e && e < n.width ? n.width : e;
132
137
  }
133
- const W = ae(F.trigger), B = W ? Q(W, {
138
+ const B = re(y.trigger), k = B ? Z(B, {
134
139
  onClick: () => {
135
- f(!0);
140
+ h(!0);
136
141
  }
137
- }) : null, $ = O(() => {
138
- var t, i, a, r;
142
+ }) : null, I = w(() => {
143
+ var t, i, s, r;
139
144
  const e = [];
140
145
  if (n.submitter === !1)
141
146
  return null;
142
147
  if (n.showCancel) {
143
148
  let o;
144
149
  e.push(d(V, {
145
- onClick: T,
150
+ onClick: R,
146
151
  disabled: u.value
147
- }, L(o = w("ap.common.cancelText")) ? o : {
152
+ }, j(o = z("ap.common.cancelText")) ? o : {
148
153
  default: () => [o]
149
154
  }));
150
155
  }
151
- return ((t = n.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(d(V, v(((i = n.submitter) == null ? void 0 : i.resetButtonProps) || {}, {
156
+ return ((t = n.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(d(V, b(((i = n.submitter) == null ? void 0 : i.resetButtonProps) || {}, {
152
157
  key: "submit",
153
158
  disabled: u.value,
154
- onClick: I
159
+ onClick: X
155
160
  }), {
156
161
  default: () => {
157
162
  var o;
158
- return [((o = n.submitter) == null ? void 0 : o.resetText) || w("ap.common.resetText")];
163
+ return [((o = n.submitter) == null ? void 0 : o.resetText) || z("ap.common.resetText")];
159
164
  }
160
- })), ((a = n.submitter) == null ? void 0 : a.submitButtonProps) !== !1 && e.push(d(V, v({
165
+ })), ((s = n.submitter) == null ? void 0 : s.submitButtonProps) !== !1 && e.push(d(V, b({
161
166
  type: "primary",
162
167
  key: "submit"
163
168
  }, ((r = n.submitter) == null ? void 0 : r.submitButtonProps) || {}, {
164
169
  loading: u.value,
165
- onClick: A
170
+ onClick: G
166
171
  }), {
167
172
  default: () => {
168
173
  var o;
169
- return [((o = n.submitter) == null ? void 0 : o.submitText) || w("ap.common.okText")];
174
+ return [((o = n.submitter) == null ? void 0 : o.submitText) || z("ap.common.okText")];
170
175
  }
171
- })), d(ne, {
176
+ })), d(le, {
172
177
  justify: "flex-end"
173
178
  }, {
174
- default: () => [F.submitter ? F.submitter(e) : d(oe, null, L(e) ? e : {
179
+ default: () => [y.submitter ? y.submitter(e) : d(ae, null, j(e) ? e : {
175
180
  default: () => [e]
176
181
  })]
177
182
  });
178
183
  });
179
- function q() {
184
+ function A() {
180
185
  var e, t;
181
- (t = (e = p.value) == null ? void 0 : e.onResize) == null || t.call(e), document.addEventListener("mousemove", k), document.addEventListener("mouseup", x);
186
+ (t = (e = m.value) == null ? void 0 : e.onResize) == null || t.call(e), document.addEventListener("mousemove", T), document.addEventListener("mouseup", O);
182
187
  }
183
- function k(e) {
184
- const t = s(p), i = (document.body.offsetWidth || 1e3) - (e.clientX - document.body.offsetLeft), a = (t == null ? void 0 : t.minWidth) ?? (n.width || 800), r = (t == null ? void 0 : t.maxWidth) ?? window.innerWidth * 0.8;
188
+ function T(e) {
189
+ const t = l(m), i = (document.body.offsetWidth || 1e3) - (e.clientX - document.body.offsetLeft), s = (t == null ? void 0 : t.minWidth) ?? (n.width || 800), r = (t == null ? void 0 : t.maxWidth) ?? window.innerWidth * 0.8;
185
190
  let o = i;
186
- i < a && (o = a), i > r && (o = r), y.value = o;
191
+ i < s && (o = s), i > r && (o = r), f.value = o;
187
192
  }
188
- function x() {
189
- document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", x);
193
+ function O() {
194
+ document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", O);
190
195
  }
191
- function I() {
196
+ function X() {
192
197
  var e, t, i;
193
- n.submitter !== !1 && ((e = l.value) == null || e.resetFields(), (i = (t = n.submitter) == null ? void 0 : t.onReset) == null || i.call(t));
198
+ n.submitter !== !1 && ((e = a.value) == null || e.resetFields(), (i = (t = n.submitter) == null ? void 0 : t.onReset) == null || i.call(t));
194
199
  }
195
- async function A() {
196
- var e, t, i, a;
200
+ async function G() {
201
+ var e, t, i, s;
197
202
  if (n.submitter !== !1)
198
203
  try {
199
- const r = await ((e = l.value) == null ? void 0 : e.validateFields());
204
+ const r = await ((e = a.value) == null ? void 0 : e.validateFields());
200
205
  (i = (t = n.submitter) == null ? void 0 : t.onSubmit) == null || i.call(t), u.value = !0;
201
- const o = (a = n.onFinish) == null ? void 0 : a.call(n, de(r));
206
+ const o = (s = n.onFinish) == null ? void 0 : s.call(n, ce(r));
202
207
  if (n.submitTimeout && o instanceof Promise) {
203
- const G = setTimeout(() => u.value = !1, n.submitTimeout);
208
+ const J = setTimeout(() => u.value = !1, n.submitTimeout);
204
209
  o.finally(() => {
205
- clearTimeout(G), u.value = !1;
210
+ clearTimeout(J), u.value = !1;
206
211
  });
207
212
  }
208
- await o && f(!1);
213
+ await o && h(!1);
209
214
  } finally {
210
215
  u.value = !1;
211
216
  }
212
217
  }
213
- function T() {
214
- s(u) || f(!1);
218
+ function R() {
219
+ l(u) || h(!1);
215
220
  }
216
- function X(e) {
217
- !e && s(u) || f(e);
221
+ function H(e) {
222
+ !e && l(u) || h(e);
218
223
  }
219
- return j({
224
+ return E({
220
225
  resetFields: () => {
221
226
  var e;
222
- (e = l.value) == null || e.resetFields();
227
+ (e = a.value) == null || e.resetFields();
223
228
  },
224
229
  clearValidate: (e) => {
225
230
  var t;
226
- (t = l.value) == null || t.clearValidate(e);
231
+ (t = a.value) == null || t.clearValidate(e);
227
232
  },
228
233
  validateFields: (e, t) => {
229
234
  var i;
230
- return (i = l.value) == null ? void 0 : i.validateFields(e, t);
235
+ return (i = a.value) == null ? void 0 : i.validateFields(e, t);
231
236
  },
232
237
  getFieldsValue: (e) => {
233
238
  var t;
234
- return (t = l.value) == null ? void 0 : t.getFieldsValue(e);
239
+ return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
235
240
  },
236
241
  validate: (e, t) => {
237
242
  var i;
238
- return (i = l.value) == null ? void 0 : i.validate(e, t);
243
+ return (i = a.value) == null ? void 0 : i.validate(e, t);
239
244
  },
240
245
  scrollToField: (e, t = {}) => {
241
246
  var i;
242
- (i = l.value) == null || i.scrollToField(e, t);
247
+ (i = a.value) == null || i.scrollToField(e, t);
243
248
  },
244
249
  setFieldValue: (e, t) => {
245
- var i, a;
246
- (a = (i = l.value) == null ? void 0 : i.setFieldValue) == null || a.call(i, e, t);
250
+ var i, s;
251
+ (s = (i = a.value) == null ? void 0 : i.setFieldValue) == null || s.call(i, e, t);
247
252
  },
248
253
  setFieldsValue: (e) => {
249
254
  var t, i;
250
- if (!l.value) {
251
- m.value = e;
255
+ if (!a.value) {
256
+ p.value = e;
252
257
  return;
253
258
  }
254
- (i = (t = l.value) == null ? void 0 : t.setFieldsValue) == null || i.call(t, e);
259
+ (i = (t = a.value) == null ? void 0 : t.setFieldsValue) == null || i.call(t, e);
255
260
  },
256
261
  getInternalInstance: (e) => {
257
262
  var t;
258
- return (t = l.value) == null ? void 0 : t.getInternalInstance(e);
263
+ return (t = a.value) == null ? void 0 : t.getInternalInstance(e);
259
264
  }
260
- }), (e, t) => (b(), P(Y, null, [d(s(le), v(e.drawerProps, {
261
- open: s(z),
262
- "onUpdate:open": X,
263
- onCancel: T,
264
- width: y.value
265
+ }), (e, t) => (g(), P(ee, null, [d(l(se), b(e.drawerProps, {
266
+ open: l(C),
267
+ "onUpdate:open": H,
268
+ onCancel: R,
269
+ width: f.value
265
270
  }), {
266
- title: g(() => [M(e.$slots, "title", {}, () => [Z(ee(n.title), 1)])]),
267
- footer: g(() => [(b(), N(S($.value)))]),
268
- default: g(() => [d(pe, v({
271
+ title: F(() => [M(e.$slots, "title", {}, () => [te(ie(n.title), 1)])]),
272
+ footer: F(() => [(g(), S(_(I.value)))]),
273
+ default: F(() => [d(ve, b({
269
274
  ref_key: "formRef",
270
- ref: l
271
- }, s(ue)(n, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
272
- default: g(() => [M(e.$slots, "default")]),
275
+ ref: a
276
+ }, l(me)(n, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
277
+ default: F(() => [M(e.$slots, "default")]),
273
278
  _: 3
274
- }, 16), e.resize ? (b(), P("div", {
279
+ }, 16), e.resize ? (g(), P("div", {
275
280
  key: 0,
276
- class: te(s(D)("resize-bar")),
277
- onMousedown: ie(q, ["stop", "prevent"])
278
- }, null, 34)) : _("", !0)]),
281
+ class: ne(q.value),
282
+ onMousedown: oe(A, ["stop", "prevent"])
283
+ }, null, 34)) : L("", !0)]),
279
284
  _: 3
280
- }, 16, ["open", "width"]), s(B) ? (b(), N(S(s(B)), {
285
+ }, 16, ["open", "width"]), l(k) ? (g(), S(_(l(k)), {
281
286
  key: 0
282
- })) : _("", !0)], 64));
287
+ })) : L("", !0)], 64));
283
288
  }
284
289
  });
285
290
  export {
286
- Le as default
291
+ Ee as default
287
292
  };
@@ -1,17 +1,18 @@
1
- import { render as l, defineComponent as C, createVNode as h, mergeProps as g, h as O } from "vue";
1
+ import { render as c, defineComponent as C, createVNode as l, mergeProps as g, h as O } from "vue";
2
2
  import { Modal as k } from "@aplus-frontend/antdv";
3
3
  import { ConfigProvider as y, globalConfigCached as v } from "../../config-provider/config-provider.mjs";
4
4
  const b = (i) => {
5
5
  let p, n;
6
6
  function d() {
7
7
  p && p(!1), setTimeout(() => {
8
- l(null, r), c.removeChild(r);
8
+ var e;
9
+ c(null, t), (e = t.parentElement) == null || e.removeChild(t);
9
10
  }, 500);
10
11
  }
11
- function m(e) {
12
+ function h(e) {
12
13
  n && n(e);
13
14
  }
14
- const f = /* @__PURE__ */ C({
15
+ const m = /* @__PURE__ */ C({
15
16
  data() {
16
17
  return {
17
18
  open: !0,
@@ -20,20 +21,20 @@ const b = (i) => {
20
21
  },
21
22
  methods: {
22
23
  async handleCancel() {
23
- var e, o, t, s, a;
24
+ var e, o, r, s, a;
24
25
  if ((e = this.props) != null && e.onCancel) {
25
- const u = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
26
+ const u = ((s = (r = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : r.component) == null ? void 0 : s.exposed) ?? void 0;
26
27
  await ((a = this.props) == null ? void 0 : a.onCancel(u));
27
28
  }
28
29
  d();
29
30
  },
30
31
  async handleOk() {
31
- var e, o, t, s;
32
+ var e, o, r, s;
32
33
  try {
33
34
  if (n({
34
35
  confirmLoading: !0
35
36
  }), (e = this.props) != null && e.onOk) {
36
- const a = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
37
+ const a = ((s = (r = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : r.component) == null ? void 0 : s.exposed) ?? void 0;
37
38
  await this.props.onOk(a);
38
39
  }
39
40
  n({
@@ -60,8 +61,8 @@ const b = (i) => {
60
61
  const {
61
62
  ...e
62
63
  } = this.props;
63
- return delete e.onCancel, delete e.onOk, h(y, v.value, {
64
- default: () => [h(k, g({
64
+ return delete e.onCancel, delete e.onOk, l(y, v.value, {
65
+ default: () => [l(k, g({
65
66
  open: this.open,
66
67
  destroyOnClose: !0,
67
68
  onCancel: this.handleCancel,
@@ -74,10 +75,10 @@ const b = (i) => {
74
75
  })]
75
76
  });
76
77
  }
77
- }), c = i.getContainer || document.body, r = document.createElement("div");
78
- return c.appendChild(r), l(O(f), r), {
78
+ }), f = i.getContainer || document.body, t = document.createElement("div");
79
+ return f.appendChild(t), c(O(m), t), {
79
80
  destroy: d,
80
- update: m
81
+ update: h
81
82
  };
82
83
  };
83
84
  export {
@@ -0,0 +1,53 @@
1
+ import { SelectValue } from '@aplus-frontend/antdv/es/select';
2
+ import { GroupSearchProps } from './interface';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
+ declare function __VLS_template(): {
5
+ slots: {
6
+ search?(_: {
7
+ value: any;
8
+ change: (e: any) => void;
9
+ key: SelectValue;
10
+ }): any;
11
+ };
12
+ refs: {};
13
+ attrs: Partial<{}>;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<GroupSearchProps>, {
17
+ hasAll: boolean;
18
+ dropdownMatchSelectWidth: boolean;
19
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
20
+ "update:value": (...args: any[]) => void;
21
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GroupSearchProps>, {
22
+ hasAll: boolean;
23
+ dropdownMatchSelectWidth: boolean;
24
+ }>>> & {
25
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
26
+ }, {
27
+ dropdownMatchSelectWidth: number | boolean;
28
+ hasAll: boolean;
29
+ }, {}>;
30
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
31
+ export default _default;
32
+ type __VLS_WithDefaults<P, D> = {
33
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
34
+ default: D[K];
35
+ }> : P[K];
36
+ };
37
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
38
+ type __VLS_TypePropsToOption<T> = {
39
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
40
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
41
+ } : {
42
+ type: PropType<T[K]>;
43
+ required: true;
44
+ };
45
+ };
46
+ type __VLS_WithTemplateSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
51
+ type __VLS_PrettifyLocal<T> = {
52
+ [K in keyof T]: T[K];
53
+ } & {};
@@ -0,0 +1,4 @@
1
+ import f from "./ap-group-search.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,191 @@
1
+ import { defineComponent as M, computed as i, onMounted as V, watch as L, unref as t, openBlock as P, createElementBlock as N, normalizeClass as f, createVNode as p, withCtx as y, normalizeStyle as K, renderSlot as O } from "vue";
2
+ import { Flex as T, Select as F } from "@aplus-frontend/antdv";
3
+ import R from "./images/icon-down.vue.mjs";
4
+ import "./extension-select/index.vue.mjs";
5
+ import { useControllableValue as $ } from "../../hooks/useControllableValue.mjs";
6
+ import "../../config-provider/index.mjs";
7
+ import { useLocale as j } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useGlobalConfig as D } from "../../config-provider/hooks/use-global-config.mjs";
9
+ import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import G from "./extension-select/index.vue2.mjs";
11
+ const d = "GROUP_SEARCH_ALL", ee = /* @__PURE__ */ M({
12
+ __name: "ap-group-search",
13
+ props: {
14
+ value: {},
15
+ defaultValue: {},
16
+ notFoundContent: {},
17
+ suffixIcon: {},
18
+ itemIcon: {},
19
+ size: {},
20
+ mode: {},
21
+ bordered: { type: Boolean },
22
+ transitionName: {},
23
+ choiceTransitionName: {},
24
+ popupClassName: {},
25
+ dropdownClassName: {},
26
+ placement: {},
27
+ status: {},
28
+ "onUpdate:value": {},
29
+ children: {},
30
+ listHeight: {},
31
+ onMouseenter: {},
32
+ onMouseleave: {},
33
+ tabindex: {},
34
+ onClick: {},
35
+ onFocus: {},
36
+ onBlur: {},
37
+ onChange: {},
38
+ onKeydown: {},
39
+ onKeyup: {},
40
+ onMousedown: {},
41
+ onSelect: {},
42
+ open: { type: Boolean },
43
+ animation: {},
44
+ direction: {},
45
+ disabled: { type: Boolean },
46
+ prefixCls: {},
47
+ id: {},
48
+ autofocus: { type: Boolean },
49
+ getPopupContainer: {},
50
+ virtual: { type: Boolean },
51
+ dropdownMatchSelectWidth: { default: !1 },
52
+ options: {},
53
+ showAction: {},
54
+ onDeselect: {},
55
+ loading: { type: Boolean },
56
+ placeholder: {},
57
+ clearIcon: {},
58
+ allowClear: { type: Boolean },
59
+ onSearch: {},
60
+ fieldNames: {},
61
+ dropdownStyle: {},
62
+ dropdownRender: {},
63
+ dropdownAlign: {},
64
+ showSearch: { type: Boolean },
65
+ searchValue: {},
66
+ onInputKeyDown: {},
67
+ removeIcon: {},
68
+ maxTagCount: {},
69
+ maxTagTextLength: {},
70
+ maxTagPlaceholder: {},
71
+ tokenSeparators: {},
72
+ tagRender: {},
73
+ optionLabelRender: {},
74
+ onClear: {},
75
+ defaultOpen: { type: Boolean },
76
+ onDropdownVisibleChange: {},
77
+ showArrow: { type: Boolean },
78
+ onPopupScroll: {},
79
+ menuItemSelectedIcon: {},
80
+ listItemHeight: {},
81
+ inputValue: {},
82
+ autoClearSearchValue: { type: Boolean },
83
+ filterOption: {},
84
+ filterSort: {},
85
+ optionFilterProp: {},
86
+ optionLabelProp: {},
87
+ defaultActiveFirstOption: { type: Boolean },
88
+ labelInValue: { type: Boolean },
89
+ hasAll: { type: Boolean, default: !0 },
90
+ style: {}
91
+ },
92
+ emits: ["update:value"],
93
+ setup(v, { emit: g }) {
94
+ const { t: m } = j(), S = D("uiMode", "aplus"), l = v, C = i(() => ({
95
+ width: "auto",
96
+ ...l.style
97
+ })), w = g, { value: a, updateValue: u } = $(l, w), B = (e) => {
98
+ let o = e;
99
+ e === d ? o = l.options.map((n) => n.value) : o = toString.call(o) === "[object Array]" ? e : [e], u({
100
+ ...a.value,
101
+ key: o
102
+ });
103
+ }, b = i(() => {
104
+ let e = [];
105
+ return l.hasAll && (e = [
106
+ { value: d, label: m("ap.apGroupSearch.all") }
107
+ ]), [...e, ...l.options];
108
+ }), A = i(() => {
109
+ var r, s;
110
+ const e = (r = a == null ? void 0 : a.value) == null ? void 0 : r.key, o = m("ap.apGroupSearch.defaultPlaceholder");
111
+ if (!e) return o;
112
+ const n = toString.call(e) === "[object Array]" ? e : [e];
113
+ return ((s = l.options) == null ? void 0 : s.filter((c) => n.includes(c.value)).map((c) => c.label).join("/")) || o;
114
+ });
115
+ V(() => {
116
+ L(
117
+ () => {
118
+ var e;
119
+ return [l.hasAll, (e = t(a)) == null ? void 0 : e.key];
120
+ },
121
+ () => {
122
+ var e, o;
123
+ l.hasAll && !((e = t(a)) != null && e.key) && u({
124
+ ...t(a),
125
+ key: (o = l.options) == null ? void 0 : o.map((n) => n.value)
126
+ });
127
+ },
128
+ {
129
+ immediate: !0
130
+ }
131
+ );
132
+ });
133
+ const _ = i(() => {
134
+ var o, n;
135
+ const e = (o = t(a)) == null ? void 0 : o.key;
136
+ if (e)
137
+ return toString.call(e) === "[object Array]" ? (e == null ? void 0 : e.length) === ((n = l.options) == null ? void 0 : n.length) ? d : e == null ? void 0 : e[0] : e;
138
+ }), h = (e) => {
139
+ var o;
140
+ e !== ((o = t(a)) == null ? void 0 : o.value) && u({
141
+ ...a.value,
142
+ value: e
143
+ });
144
+ }, { b: x, e: k, em: I } = E("ap-group-search");
145
+ return (e, o) => (P(), N("div", {
146
+ class: f(t(x)())
147
+ }, [
148
+ p(t(T), null, {
149
+ default: y(() => {
150
+ var n, r;
151
+ return [
152
+ p(t(F), {
153
+ value: _.value,
154
+ style: K(C.value),
155
+ class: f(`${e.$attrs.class} ${t(S) === "admin" ? t(I)("search", "admin") : t(k)("search")}`),
156
+ options: b.value,
157
+ bordered: !1,
158
+ dropdownMatchSelectWidth: l.dropdownMatchSelectWidth,
159
+ onChange: B
160
+ }, {
161
+ suffixIcon: y(() => [
162
+ p(R)
163
+ ]),
164
+ _: 1
165
+ }, 8, ["value", "style", "class", "options", "dropdownMatchSelectWidth"]),
166
+ O(e.$slots, "search", {
167
+ value: (n = t(a)) == null ? void 0 : n.value,
168
+ change: h,
169
+ key: (r = t(a)) == null ? void 0 : r.key
170
+ }, () => {
171
+ var s;
172
+ return [
173
+ p(G, {
174
+ style: { width: "100%" },
175
+ maxTagCount: "responsive",
176
+ value: (s = t(a)) == null ? void 0 : s.value,
177
+ onChange: h,
178
+ placeholder: A.value
179
+ }, null, 8, ["value", "placeholder"])
180
+ ];
181
+ })
182
+ ];
183
+ }),
184
+ _: 3
185
+ })
186
+ ], 2));
187
+ }
188
+ });
189
+ export {
190
+ ee as default
191
+ };