@aplus-frontend/ui 0.4.2 → 0.4.4

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 (125) hide show
  1. package/es/index.mjs +158 -152
  2. package/es/src/ap-field/date/helper.d.ts +1 -1
  3. package/es/src/ap-field/date/helper.mjs +9 -9
  4. package/es/src/ap-field/date/index.vue.mjs +33 -25
  5. package/es/src/ap-field/date-range/index.vue.mjs +44 -43
  6. package/es/src/ap-field/interface.d.ts +0 -6
  7. package/es/src/ap-field/segmented/index.vue.d.ts +7 -1
  8. package/es/src/ap-field/select/index.vue.d.ts +4 -20
  9. package/es/src/ap-field/select/index.vue.mjs +11 -11
  10. package/es/src/ap-field/text/index.vue.d.ts +13 -1
  11. package/es/src/ap-form/items/text/index.vue.d.ts +26 -2
  12. package/es/src/ap-table/constants.d.ts +28 -12
  13. package/es/src/ap-table/utils.d.ts +13 -1
  14. package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +8 -4
  15. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +45 -55
  16. package/es/src/business/ap-batch-action/index.d.ts +5 -3
  17. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +12 -12
  18. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +7 -7
  19. package/es/src/business/ap-group-search/index.d.ts +8 -34
  20. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +2 -10
  21. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
  22. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -4
  23. package/es/src/business/batch-input-group/index.vue.d.ts +13 -1
  24. package/es/src/config-provider/hooks/use-namespace.d.ts +1 -1
  25. package/es/src/config-provider/hooks/use-namespace.mjs +3 -3
  26. package/es/src/hooks/index.d.ts +2 -0
  27. package/es/src/hooks/index.mjs +7 -3
  28. package/es/src/hooks/useManualRef.d.ts +6 -0
  29. package/es/src/hooks/useManualRef.mjs +27 -0
  30. package/es/src/hooks/useThrottleRef.d.ts +2 -0
  31. package/es/src/hooks/useThrottleRef.mjs +31 -0
  32. package/es/src/index.d.ts +1 -1
  33. package/es/src/index.mjs +231 -228
  34. package/es/src/path-map.mjs +1 -1
  35. package/es/src/scroll-bar/hooks/use-track.d.ts +30 -0
  36. package/es/src/scroll-bar/hooks/use-track.mjs +76 -0
  37. package/es/src/scroll-bar/index.d.ts +4 -0
  38. package/es/src/scroll-bar/index.mjs +3 -0
  39. package/es/src/scroll-bar/index.vue.d.ts +52 -0
  40. package/es/src/scroll-bar/index.vue.mjs +77 -0
  41. package/es/src/scroll-bar/index.vue2.mjs +4 -0
  42. package/es/src/scroll-bar/interface.d.ts +66 -0
  43. package/es/src/scroll-bar/internal.vue.d.ts +22 -0
  44. package/es/src/scroll-bar/internal.vue.mjs +132 -0
  45. package/es/src/scroll-bar/internal.vue2.mjs +4 -0
  46. package/es/src/scroll-bar/style/css.js +1 -0
  47. package/es/src/scroll-bar/style/index.js +1 -0
  48. package/es/src/scroll-bar/utils/index.d.ts +22 -0
  49. package/es/src/scroll-bar/utils/index.mjs +17 -0
  50. package/lib/index.js +1 -1
  51. package/lib/src/ap-field/date/helper.d.ts +1 -1
  52. package/lib/src/ap-field/date/helper.js +1 -1
  53. package/lib/src/ap-field/date/index.vue.js +1 -1
  54. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  55. package/lib/src/ap-field/interface.d.ts +0 -6
  56. package/lib/src/ap-field/segmented/index.vue.d.ts +7 -1
  57. package/lib/src/ap-field/select/index.vue.d.ts +4 -20
  58. package/lib/src/ap-field/select/index.vue.js +1 -1
  59. package/lib/src/ap-field/text/index.vue.d.ts +13 -1
  60. package/lib/src/ap-form/items/text/index.vue.d.ts +26 -2
  61. package/lib/src/ap-table/constants.d.ts +28 -12
  62. package/lib/src/ap-table/utils.d.ts +13 -1
  63. package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +8 -4
  64. package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -1
  65. package/lib/src/business/ap-batch-action/index.d.ts +5 -3
  66. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
  67. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
  68. package/lib/src/business/ap-group-search/index.d.ts +8 -34
  69. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +2 -10
  70. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
  71. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  72. package/lib/src/business/batch-input-group/index.vue.d.ts +13 -1
  73. package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -1
  74. package/lib/src/config-provider/hooks/use-namespace.js +1 -1
  75. package/lib/src/hooks/index.d.ts +2 -0
  76. package/lib/src/hooks/index.js +1 -1
  77. package/lib/src/hooks/useManualRef.d.ts +6 -0
  78. package/lib/src/hooks/useManualRef.js +1 -0
  79. package/lib/src/hooks/useThrottleRef.d.ts +2 -0
  80. package/lib/src/hooks/useThrottleRef.js +1 -0
  81. package/lib/src/index.d.ts +1 -1
  82. package/lib/src/index.js +1 -1
  83. package/lib/src/path-map.js +1 -1
  84. package/lib/src/scroll-bar/hooks/use-track.d.ts +30 -0
  85. package/lib/src/scroll-bar/hooks/use-track.js +1 -0
  86. package/lib/src/scroll-bar/index.d.ts +4 -0
  87. package/lib/src/scroll-bar/index.js +1 -0
  88. package/lib/src/scroll-bar/index.vue.d.ts +52 -0
  89. package/lib/src/scroll-bar/index.vue.js +1 -0
  90. package/lib/src/scroll-bar/index.vue2.js +1 -0
  91. package/lib/src/scroll-bar/interface.d.ts +66 -0
  92. package/lib/src/scroll-bar/internal.vue.d.ts +22 -0
  93. package/lib/src/scroll-bar/internal.vue.js +1 -0
  94. package/lib/src/scroll-bar/internal.vue2.js +1 -0
  95. package/lib/src/scroll-bar/style/css.cjs +1 -0
  96. package/lib/src/scroll-bar/style/index.cjs +1 -0
  97. package/lib/src/scroll-bar/utils/index.d.ts +22 -0
  98. package/lib/src/scroll-bar/utils/index.js +1 -0
  99. package/package.json +3 -3
  100. package/theme/index.css +36 -21
  101. package/theme/index.less +1 -1
  102. package/theme/scroll-bar/index.css +46 -0
  103. package/theme/scroll-bar/index.less +62 -0
  104. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +0 -8
  105. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.mjs +0 -4
  106. package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +0 -116
  107. package/es/src/ap-scroll-bar/index.d.ts +0 -29
  108. package/es/src/ap-scroll-bar/index.mjs +0 -8
  109. package/es/src/ap-scroll-bar/interface.d.ts +0 -4
  110. package/es/src/ap-scroll-bar/style/css.js +0 -1
  111. package/es/src/ap-scroll-bar/style/index.js +0 -1
  112. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +0 -8
  113. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.js +0 -1
  114. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +0 -1
  115. package/lib/src/ap-scroll-bar/index.d.ts +0 -29
  116. package/lib/src/ap-scroll-bar/index.js +0 -1
  117. package/lib/src/ap-scroll-bar/interface.d.ts +0 -4
  118. package/lib/src/ap-scroll-bar/style/css.cjs +0 -1
  119. package/lib/src/ap-scroll-bar/style/index.cjs +0 -1
  120. /package/es/src/{ap-scroll-bar → scroll-bar}/interface.mjs +0 -0
  121. /package/es/src/{ap-scroll-bar → scroll-bar}/style/css.d.ts +0 -0
  122. /package/es/src/{ap-scroll-bar → scroll-bar}/style/index.d.ts +0 -0
  123. /package/lib/src/{ap-scroll-bar → scroll-bar}/interface.js +0 -0
  124. /package/lib/src/{ap-scroll-bar → scroll-bar}/style/css.d.ts +0 -0
  125. /package/lib/src/{ap-scroll-bar → scroll-bar}/style/index.d.ts +0 -0
@@ -1,10 +1,10 @@
1
- import { defineComponent as U, useSlots as H, computed as p, unref as n, isVNode as K, createVNode as M, Fragment as y, openBlock as h, createElementBlock as B, createTextVNode as O, toDisplayString as P, createBlock as D, resolveDynamicComponent as $, mergeProps as L, createSlots as W, renderList as Y, withCtx as Z, renderSlot as q, normalizeProps as G, guardReactiveProps as J } from "vue";
1
+ import { defineComponent as U, useSlots as H, computed as m, unref as n, isVNode as K, createVNode as T, Fragment as h, openBlock as g, createElementBlock as v, createTextVNode as B, toDisplayString as P, createBlock as O, resolveDynamicComponent as $, mergeProps as L, createSlots as W, renderList as Y, withCtx as Z, renderSlot as q, normalizeProps as G, guardReactiveProps as J } from "vue";
2
2
  import { ApFieldDatePresetFormats as Q, PRESET_FORMAT_MAP as X, PRESET_FORMAT_PICK_MAP as ee, PRESET_FORMAT_TIME_MAP as oe } from "../date/constant.mjs";
3
3
  import "../../hooks/index.mjs";
4
- import { isNil as T, omit as b, isString as m, isFunction as ne } from "lodash-unified";
5
- import d from "dayjs";
4
+ import { isNil as b, omit as R, isString as c, isFunction as ne } from "lodash-unified";
5
+ import u from "dayjs";
6
6
  import { DatePicker as te } from "@aplus-frontend/antdv";
7
- import { formatDayWithTimezone as ae, formatValue as R } from "../date/helper.mjs";
7
+ import { formatDayWithTimezone as ae } from "../date/helper.mjs";
8
8
  import { SwapRightOutlined as re } from "@ant-design/icons-vue";
9
9
  import { omitUndefined as le } from "../../utils/index.mjs";
10
10
  import { getTimeFormatToZone as w } from "@aplus-frontend/utils";
@@ -153,76 +153,77 @@ const Be = /* @__PURE__ */ U({
153
153
  setup(_, {
154
154
  emit: A
155
155
  }) {
156
- const o = _, F = A, S = H(), u = p(() => Q.indexOf(o.format) > -1), l = p(() => u.value ? X[o.format] : o.format), {
157
- value: c,
158
- updateValue: k
159
- } = de(o, F), N = ue("DateRange", o), s = ae(o.timezone), v = p(() => {
160
- var r, i;
161
- const e = n(c);
162
- if (T(e) || !(e != null && e.length))
156
+ const o = _, F = A, k = H(), d = m(() => Q.indexOf(o.format) > -1), i = m(() => d.value ? X[o.format] : o.format), {
157
+ value: y,
158
+ updateValue: C
159
+ } = de(o, F), N = ue("DateRange", o), f = ae(o.timezone), S = m(() => {
160
+ var a, l;
161
+ const e = n(y);
162
+ if (b(e) || !(e != null && e.length))
163
163
  return e;
164
- const a = o.timezone ? w(n(c)[0], o.timezone) : (r = n(c)) == null ? void 0 : r[0], t = o.timezone ? w(n(c)[1], o.timezone) : (i = n(c)) == null ? void 0 : i[1];
165
- return [d(a), d(t)];
166
- }), x = p(() => n(u) ? o.picker ?? ee[o.format] : o.picker), z = p(() => {
167
- const e = n(u) ? oe[o.format] : {};
164
+ const r = o.timezone ? w(n(y)[0], o.timezone) : (a = n(y)) == null ? void 0 : a[0], t = o.timezone ? w(n(y)[1], o.timezone) : (l = n(y)) == null ? void 0 : l[1];
165
+ return [u(r), u(t)];
166
+ }), x = m(() => n(d) ? o.picker ?? ee[o.format] : o.picker), z = m(() => {
167
+ const e = n(d) ? oe[o.format] : {};
168
168
  return {
169
- ...le(b(o, ["value", "onUpdate:value", "onChange", "onOk", "format", "mode"])),
169
+ ...le(R(o, ["value", "onUpdate:value", "onChange", "onOk", "format", "mode"])),
170
170
  placeholder: n(N),
171
171
  ...e
172
172
  };
173
173
  });
174
174
  function E(e) {
175
175
  if (!e) {
176
- k(e);
176
+ C(e);
177
177
  return;
178
178
  }
179
- let a = m(e[0]) ? d(e[0]) : e[0], t = m(e[1]) ? d(e[1]) : e[1];
180
- n(u) ? k([s(a, n(l)), s(t, n(l), !1)]) : k([R(a), R(t)]);
179
+ let r = c(e[0]) ? u(e[0]) : e[0], t = c(e[1]) ? u(e[1]) : e[1];
180
+ const a = n(d) ? n(i) : void 0;
181
+ C([f(r, a), f(t, a, !1)]);
181
182
  }
182
183
  function V(e) {
183
- var f;
184
- const a = m(e[0]) ? d(e[0]) : e[0], t = m(e[1]) ? d(e[1]) : e[1], r = e[0] ? n(u) ? s(a, n(l)) : a.valueOf() : null, i = e[1] ? n(u) ? s(t, n(l), !1) : t.valueOf() : null;
185
- (f = o.onOk) == null || f.call(o, [r, i]);
184
+ var p;
185
+ const r = c(e[0]) ? u(e[0]) : e[0], t = c(e[1]) ? u(e[1]) : e[1], a = n(d) ? n(i) : void 0, l = e[0] ? f(r, a) : null, s = e[1] ? f(t, a, !1) : null;
186
+ (p = o.onOk) == null || p.call(o, [l, s]);
186
187
  }
187
- function I(e, a) {
188
- var g, C;
189
- if (T(e)) {
190
- (g = o.onChange) == null || g.call(o, e, a);
188
+ function I(e, r) {
189
+ var M, D;
190
+ if (b(e)) {
191
+ (M = o.onChange) == null || M.call(o, e, r);
191
192
  return;
192
193
  }
193
- const t = m(e[0]) ? d(e[0]) : e[0], r = m(e[1]) ? d(e[1]) : e[1], i = e[0] ? n(u) ? s(t, n(l)) : t.valueOf() : null, f = e[1] ? n(u) ? s(r, n(l), !1) : r.valueOf() : null;
194
- (C = o.onChange) == null || C.call(o, [i, f], a);
194
+ const t = c(e[0]) ? u(e[0]) : e[0], a = c(e[1]) ? u(e[1]) : e[1], l = n(d) ? n(i) : void 0, s = e[0] ? f(t, l) : null, p = e[1] ? f(a, l, !1) : null;
195
+ (D = o.onChange) == null || D.call(o, [s, p], r);
195
196
  }
196
- const j = p(() => {
197
+ const j = m(() => {
197
198
  var t;
198
199
  const e = o.readModeSeparator;
199
200
  if (e)
200
- return K(e) || ne(e) ? o.readModeSeparator : M(y, null, [o.readModeSeparator]);
201
- const a = (t = S.readModeSeparator) == null ? void 0 : t.call(S);
202
- return a ? M(y, null, [a]) : re;
201
+ return K(e) || ne(e) ? o.readModeSeparator : T(h, null, [o.readModeSeparator]);
202
+ const r = (t = k.readModeSeparator) == null ? void 0 : t.call(k);
203
+ return r ? T(h, null, [r]) : re;
203
204
  });
204
- return (e, a) => {
205
- var t, r;
206
- return e.mode === "read" ? (h(), B(y, {
205
+ return (e, r) => {
206
+ var t, a;
207
+ return e.mode === "read" ? (g(), v(h, {
207
208
  key: 0
208
- }, [v.value ? (h(), B(y, {
209
+ }, [S.value ? (g(), v(h, {
209
210
  key: 0
210
- }, [O(P((t = v.value[0]) == null ? void 0 : t.format(l.value)) + " ", 1), (h(), D($(j.value))), O(" " + P((r = v.value[1]) == null ? void 0 : r.format(l.value)), 1)], 64)) : (h(), B(y, {
211
+ }, [B(P((t = S.value[0]) == null ? void 0 : t.format(i.value)) + " ", 1), (g(), O($(j.value))), B(" " + P((a = S.value[1]) == null ? void 0 : a.format(i.value)), 1)], 64)) : (g(), v(h, {
211
212
  key: 1
212
- }, [O(P(e.emptyText), 1)], 64))], 64)) : (h(), D(n(te).RangePicker, L({
213
+ }, [B(P(e.emptyText), 1)], 64))], 64)) : (g(), O(n(te).RangePicker, L({
213
214
  key: 1
214
215
  }, z.value, {
215
- value: v.value,
216
+ value: S.value,
216
217
  picker: x.value,
217
- format: l.value,
218
+ format: i.value,
218
219
  "onUpdate:value": E,
219
220
  onChange: I,
220
221
  onOk: V
221
222
  }), W({
222
223
  _: 2
223
- }, [Y(n(b)(e.$slots, "readModeSeparator"), (i, f) => ({
224
- name: f,
225
- fn: Z((g) => [q(e.$slots, f, G(J(g || {})))])
224
+ }, [Y(n(R)(e.$slots, "readModeSeparator"), (l, s) => ({
225
+ name: s,
226
+ fn: Z((p) => [q(e.$slots, s, G(J(p || {})))])
226
227
  }))]), 1040, ["value", "picker", "format"]));
227
228
  };
228
229
  }
@@ -6,7 +6,6 @@ import { RangePickerProps } from '@aplus-frontend/antdv/es/date-picker/dayjs';
6
6
  import { LiteralUnion } from '../type';
7
7
  import { InputPasswordProps } from './text/input-password-props';
8
8
  import { ZoneAlias } from '@aplus-frontend/utils';
9
- import { SelectValue } from '@aplus-frontend/antdv/es/select';
10
9
  export type FieldMode = 'read' | 'edit';
11
10
  export type BasicApFieldProps<FieldPropsType = any> = {
12
11
  mode?: FieldMode;
@@ -119,11 +118,6 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
119
118
  * 是否延迟请求选项列表
120
119
  */
121
120
  lazy?: boolean;
122
- /**
123
- * 选中之前调用,如果返回false,则不更新值,支持异步
124
- * @returns
125
- */
126
- onBeforeSelect?: (newVal: SelectValue) => boolean | Promise<boolean>;
127
121
  };
128
122
  export type ApFieldSelectExpose = {
129
123
  focus: () => void;
@@ -4,7 +4,13 @@ import { FieldMode } from '..';
4
4
  declare function __VLS_template(): {
5
5
  attrs: Partial<{}>;
6
6
  slots: {
7
- label?(_: any): any;
7
+ label?(_: {
8
+ value: string | number;
9
+ disabled?: boolean;
10
+ payload?: any;
11
+ title?: string;
12
+ className?: string;
13
+ }): any;
8
14
  };
9
15
  refs: {};
10
16
  rootEl: any;
@@ -72,10 +72,6 @@ declare function __VLS_template(): {
72
72
  type: PropType<(val: SelectValue) => void>;
73
73
  default: (val: SelectValue) => void;
74
74
  };
75
- onBeforeSelect: {
76
- type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
77
- default: (nextVal: SelectValue) => boolean | Promise<boolean>;
78
- };
79
75
  children: PropType< VueNode[]>;
80
76
  listHeight: NumberConstructor;
81
77
  onMouseenter: PropType<(e: MouseEvent) => void>;
@@ -195,6 +191,7 @@ declare function __VLS_template(): {
195
191
  type: BooleanConstructor;
196
192
  default: any;
197
193
  };
194
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
198
195
  labelInValue: {
199
196
  type: BooleanConstructor;
200
197
  default: any;
@@ -223,7 +220,6 @@ declare function __VLS_template(): {
223
220
  filterOption: boolean | FilterFunc<DefaultOptionType>;
224
221
  defaultActiveFirstOption: boolean;
225
222
  labelInValue: boolean;
226
- onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
227
223
  }, true, {}, CustomSlotsType<{
228
224
  notFoundContent: any;
229
225
  suffixIcon: any;
@@ -287,10 +283,6 @@ declare function __VLS_template(): {
287
283
  type: PropType<(val: SelectValue) => void>;
288
284
  default: (val: SelectValue) => void;
289
285
  };
290
- onBeforeSelect: {
291
- type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
292
- default: (nextVal: SelectValue) => boolean | Promise<boolean>;
293
- };
294
286
  children: PropType< VueNode[]>;
295
287
  listHeight: NumberConstructor;
296
288
  onMouseenter: PropType<(e: MouseEvent) => void>;
@@ -410,6 +402,7 @@ declare function __VLS_template(): {
410
402
  type: BooleanConstructor;
411
403
  default: any;
412
404
  };
405
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
413
406
  labelInValue: {
414
407
  type: BooleanConstructor;
415
408
  default: any;
@@ -438,7 +431,6 @@ declare function __VLS_template(): {
438
431
  filterOption: boolean | FilterFunc<DefaultOptionType>;
439
432
  defaultActiveFirstOption: boolean;
440
433
  labelInValue: boolean;
441
- onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
442
434
  }> | null;
443
435
  };
444
436
  rootEl: any;
@@ -516,10 +508,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
516
508
  type: PropType<(val: SelectValue) => void>;
517
509
  default: (val: SelectValue) => void;
518
510
  };
519
- onBeforeSelect: {
520
- type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
521
- default: (nextVal: SelectValue) => boolean | Promise<boolean>;
522
- };
523
511
  children: PropType< VueNode[]>;
524
512
  listHeight: NumberConstructor;
525
513
  onMouseenter: PropType<(e: MouseEvent) => void>;
@@ -639,6 +627,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
639
627
  type: BooleanConstructor;
640
628
  default: any;
641
629
  };
630
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
642
631
  labelInValue: {
643
632
  type: BooleanConstructor;
644
633
  default: any;
@@ -667,7 +656,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
667
656
  filterOption: boolean | FilterFunc<DefaultOptionType>;
668
657
  defaultActiveFirstOption: boolean;
669
658
  labelInValue: boolean;
670
- onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
671
659
  }, true, {}, CustomSlotsType<{
672
660
  notFoundContent: any;
673
661
  suffixIcon: any;
@@ -731,10 +719,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
731
719
  type: PropType<(val: SelectValue) => void>;
732
720
  default: (val: SelectValue) => void;
733
721
  };
734
- onBeforeSelect: {
735
- type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
736
- default: (nextVal: SelectValue) => boolean | Promise<boolean>;
737
- };
738
722
  children: PropType< VueNode[]>;
739
723
  listHeight: NumberConstructor;
740
724
  onMouseenter: PropType<(e: MouseEvent) => void>;
@@ -854,6 +838,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
854
838
  type: BooleanConstructor;
855
839
  default: any;
856
840
  };
841
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
857
842
  labelInValue: {
858
843
  type: BooleanConstructor;
859
844
  default: any;
@@ -882,7 +867,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
882
867
  filterOption: boolean | FilterFunc<DefaultOptionType>;
883
868
  defaultActiveFirstOption: boolean;
884
869
  labelInValue: boolean;
885
- onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
886
870
  }> | null;
887
871
  }, any>;
888
872
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,4 +1,4 @@
1
- import { defineComponent as _, ref as y, onMounted as L, computed as w, unref as a, openBlock as S, createElementBlock as R, toDisplayString as U, createBlock as z, mergeProps as D, createSlots as K, renderList as H, withCtx as B, renderSlot as $, normalizeProps as j, guardReactiveProps as E, createVNode as W } from "vue";
1
+ import { defineComponent as _, ref as y, onMounted as L, computed as w, unref as a, openBlock as S, createElementBlock as R, toDisplayString as z, createBlock as D, mergeProps as U, createSlots as K, renderList as H, withCtx as B, renderSlot as $, normalizeProps as j, guardReactiveProps as E, createVNode as W } from "vue";
2
2
  import { debounce as G, isFunction as g, isArray as J, isNil as Q, omit as X } from "lodash-unified";
3
3
  import { Select as Y, Spin as Z } from "@aplus-frontend/antdv";
4
4
  import "../../hooks/index.mjs";
@@ -25,7 +25,6 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
25
25
  dropdownClassName: {},
26
26
  placement: {},
27
27
  status: {},
28
- onBeforeSelect: {},
29
28
  children: {},
30
29
  listHeight: {},
31
30
  onMouseenter: {},
@@ -84,6 +83,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
84
83
  optionFilterProp: {},
85
84
  optionLabelProp: {},
86
85
  defaultActiveFirstOption: { type: Boolean, default: void 0 },
86
+ onClickOption: {},
87
87
  labelInValue: { type: Boolean, default: void 0 },
88
88
  emptyText: { default: "--" },
89
89
  request: {},
@@ -107,11 +107,11 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
107
107
  }).finally(() => {
108
108
  u.value = !1;
109
109
  });
110
- }, 300), e = C, x = (o, t) => {
110
+ }, 300), e = C, O = (o, t) => {
111
111
  var n;
112
112
  const l = ((n = e.fieldNames) == null ? void 0 : n.label) || "label";
113
113
  return typeof (t == null ? void 0 : t[l]) == "string" && t[l].toLowerCase().indexOf(o.toLowerCase()) > -1;
114
- }, { options: s, updateOptions: i } = te(e), c = y(), u = y((e == null ? void 0 : e.loading) || !1), I = b;
114
+ }, { options: s, updateOptions: i } = te(e), c = y(), u = y((e == null ? void 0 : e.loading) || !1), x = b;
115
115
  async function f(o = !0) {
116
116
  if (!g(e.request))
117
117
  return;
@@ -127,7 +127,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
127
127
  u.value = !1;
128
128
  }
129
129
  }
130
- function O(o) {
130
+ function I(o) {
131
131
  var t;
132
132
  (t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && r > 0 && !u.value && f(!0);
133
133
  }
@@ -138,7 +138,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
138
138
  }
139
139
  f();
140
140
  });
141
- const { value: m, updateValue: V } = le(e, I, { beforeUpdateValue: e.onBeforeSelect }), P = oe("Select", e), k = w(() => {
141
+ const { value: m, updateValue: P } = le(e, x), V = oe("Select", e), k = w(() => {
142
142
  var d, v;
143
143
  const o = a(m);
144
144
  if (!o)
@@ -165,7 +165,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
165
165
  notFoundContent: u.value ? void 0 : null
166
166
  } : {
167
167
  showArrow: !0,
168
- filterOption: Q(e == null ? void 0 : e.filterOption) ? x : e == null ? void 0 : e.filterOption
168
+ filterOption: Q(e == null ? void 0 : e.filterOption) ? O : e == null ? void 0 : e.filterOption
169
169
  }), {
170
170
  ...ee(
171
171
  X(e, [
@@ -179,7 +179,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
179
179
  "onBeforeSelect"
180
180
  ])
181
181
  ),
182
- placeholder: a(P),
182
+ placeholder: a(V),
183
183
  ...l
184
184
  };
185
185
  });
@@ -195,7 +195,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
195
195
  focus: A,
196
196
  blur: M,
197
197
  request: f
198
- }), (o, t) => o.mode === "read" ? (S(), R("span", ne, U(k.value), 1)) : (S(), z(a(Y), D({
198
+ }), (o, t) => o.mode === "read" ? (S(), R("span", ne, z(k.value), 1)) : (S(), D(a(Y), U({
199
199
  key: 1,
200
200
  ref_key: "selectRef",
201
201
  ref: c,
@@ -205,8 +205,8 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
205
205
  value: a(m),
206
206
  options: a(s),
207
207
  loading: u.value,
208
- "onUpdate:value": a(V),
209
- onFocus: O
208
+ "onUpdate:value": a(P),
209
+ onFocus: I
210
210
  }), K({ _: 2 }, [
211
211
  H(o.$slots, (l, n) => ({
212
212
  name: n,
@@ -2,7 +2,19 @@ import { ApFieldTextProps } from '../interface';
2
2
  import { InputFocusOptions } from '@aplus-frontend/antdv/es/vc-input/utils/commonUtils';
3
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
4
  import { FieldMode } from '..';
5
- declare function __VLS_template(): any;
5
+ type ApFieldTextSlots = {
6
+ addonAfter?: any;
7
+ addonBefore?: any;
8
+ prefix?: any;
9
+ suffix?: any;
10
+ clearIcon?: any;
11
+ };
12
+ declare function __VLS_template(): {
13
+ attrs: Partial<{}>;
14
+ slots: Readonly<ApFieldTextSlots> & ApFieldTextSlots;
15
+ refs: {};
16
+ rootEl: any;
17
+ };
6
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
7
19
  declare const __VLS_component: DefineComponent<ApFieldTextProps, {
8
20
  focus: (options?: InputFocusOptions) => void;
@@ -145,7 +145,19 @@ declare function __VLS_template(): {
145
145
  setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
146
146
  select: () => void;
147
147
  }> & {} & ComponentCustomProperties & {} & {
148
- $slots: any;
148
+ $slots: Readonly<{
149
+ addonAfter?: any;
150
+ addonBefore?: any;
151
+ prefix?: any;
152
+ suffix?: any;
153
+ clearIcon?: any;
154
+ }> & {
155
+ addonAfter?: any;
156
+ addonBefore?: any;
157
+ prefix?: any;
158
+ suffix?: any;
159
+ clearIcon?: any;
160
+ };
149
161
  }) | null;
150
162
  };
151
163
  rootEl: any;
@@ -288,7 +300,19 @@ declare const __VLS_component: DefineComponent<ApFormItemTextProps, {
288
300
  setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
289
301
  select: () => void;
290
302
  }> & {} & ComponentCustomProperties & {} & {
291
- $slots: any;
303
+ $slots: Readonly<{
304
+ addonAfter?: any;
305
+ addonBefore?: any;
306
+ prefix?: any;
307
+ suffix?: any;
308
+ clearIcon?: any;
309
+ }> & {
310
+ addonAfter?: any;
311
+ addonBefore?: any;
312
+ prefix?: any;
313
+ suffix?: any;
314
+ clearIcon?: any;
315
+ };
292
316
  }) | null;
293
317
  }, any>;
294
318
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1117,7 +1117,19 @@ export declare const apTableFormItemMap: {
1117
1117
  setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
1118
1118
  select: () => void;
1119
1119
  }> & {} & ComponentCustomProperties & {} & {
1120
- $slots: any;
1120
+ $slots: Readonly<{
1121
+ addonAfter?: any;
1122
+ addonBefore?: any;
1123
+ prefix?: any;
1124
+ suffix?: any;
1125
+ clearIcon?: any;
1126
+ }> & {
1127
+ addonAfter?: any;
1128
+ addonBefore?: any;
1129
+ prefix?: any;
1130
+ suffix?: any;
1131
+ clearIcon?: any;
1132
+ };
1121
1133
  }) | null;
1122
1134
  }, any, ComponentProvideOptions, {
1123
1135
  P: {};
@@ -2645,10 +2657,6 @@ export declare const apTableRenderItemMap: {
2645
2657
  type: PropType<(val: SelectValue) => void>;
2646
2658
  default: (val: SelectValue) => void;
2647
2659
  };
2648
- onBeforeSelect: {
2649
- type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
2650
- default: (nextVal: SelectValue) => boolean | Promise<boolean>;
2651
- };
2652
2660
  children: PropType< VueNode[]>;
2653
2661
  listHeight: NumberConstructor;
2654
2662
  onMouseenter: PropType<(e: MouseEvent) => void>;
@@ -2768,6 +2776,7 @@ export declare const apTableRenderItemMap: {
2768
2776
  type: BooleanConstructor;
2769
2777
  default: any;
2770
2778
  };
2779
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
2771
2780
  labelInValue: {
2772
2781
  type: BooleanConstructor;
2773
2782
  default: any;
@@ -2796,7 +2805,6 @@ export declare const apTableRenderItemMap: {
2796
2805
  filterOption: boolean | FilterFunc<DefaultOptionType>;
2797
2806
  defaultActiveFirstOption: boolean;
2798
2807
  labelInValue: boolean;
2799
- onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
2800
2808
  }, true, {}, CustomSlotsType<{
2801
2809
  notFoundContent: any;
2802
2810
  suffixIcon: any;
@@ -2860,10 +2868,6 @@ export declare const apTableRenderItemMap: {
2860
2868
  type: PropType<(val: SelectValue) => void>;
2861
2869
  default: (val: SelectValue) => void;
2862
2870
  };
2863
- onBeforeSelect: {
2864
- type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
2865
- default: (nextVal: SelectValue) => boolean | Promise<boolean>;
2866
- };
2867
2871
  children: PropType< VueNode[]>;
2868
2872
  listHeight: NumberConstructor;
2869
2873
  onMouseenter: PropType<(e: MouseEvent) => void>;
@@ -2983,6 +2987,7 @@ export declare const apTableRenderItemMap: {
2983
2987
  type: BooleanConstructor;
2984
2988
  default: any;
2985
2989
  };
2990
+ onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
2986
2991
  labelInValue: {
2987
2992
  type: BooleanConstructor;
2988
2993
  default: any;
@@ -3011,7 +3016,6 @@ export declare const apTableRenderItemMap: {
3011
3016
  filterOption: boolean | FilterFunc<DefaultOptionType>;
3012
3017
  defaultActiveFirstOption: boolean;
3013
3018
  labelInValue: boolean;
3014
- onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
3015
3019
  }> | null;
3016
3020
  }, any, ComponentProvideOptions, {
3017
3021
  P: {};
@@ -3226,7 +3230,19 @@ export declare const apTableRenderItemMap: {
3226
3230
  allowClear: boolean;
3227
3231
  emptyText: string;
3228
3232
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
3229
- $slots: any;
3233
+ $slots: Readonly<{
3234
+ addonAfter?: any;
3235
+ addonBefore?: any;
3236
+ prefix?: any;
3237
+ suffix?: any;
3238
+ clearIcon?: any;
3239
+ }> & {
3240
+ addonAfter?: any;
3241
+ addonBefore?: any;
3242
+ prefix?: any;
3243
+ suffix?: any;
3244
+ clearIcon?: any;
3245
+ };
3230
3246
  }) & {
3231
3247
  Password: typeof ApFieldPassword;
3232
3248
  };
@@ -428,7 +428,19 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
428
428
  setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
429
429
  select: () => void;
430
430
  }> & {} & ComponentCustomProperties & {} & {
431
- $slots: any;
431
+ $slots: Readonly<{
432
+ addonAfter?: any;
433
+ addonBefore?: any;
434
+ prefix?: any;
435
+ suffix?: any;
436
+ clearIcon?: any;
437
+ }> & {
438
+ addonAfter?: any;
439
+ addonBefore?: any;
440
+ prefix?: any;
441
+ suffix?: any;
442
+ clearIcon?: any;
443
+ };
432
444
  }) | null;
433
445
  }, any, ComponentProvideOptions, {
434
446
  P: {};
@@ -3,19 +3,23 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: Readonly<{
6
- header: () => void;
6
+ header: () => any[];
7
7
  prefix: () => void;
8
8
  suffix: () => void;
9
9
  }> & {
10
- header: () => void;
10
+ header: () => any[];
11
11
  prefix: () => void;
12
12
  suffix: () => void;
13
13
  };
14
- refs: {};
14
+ refs: {
15
+ headerRef: HTMLDivElement;
16
+ };
15
17
  rootEl: HTMLDivElement;
16
18
  };
17
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
- declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
21
+ headerRef: HTMLDivElement;
22
+ }, HTMLDivElement>;
19
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
24
  export default _default;
21
25
  type __VLS_WithTemplateSlots<T, S> = T & {