@aplus-frontend/ui 6.26.4 → 6.27.0

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 (102) hide show
  1. package/es/src/ag-grid/hooks/use-columns-def.d.ts +2 -2
  2. package/es/src/ag-grid/hooks/use-columns-def.mjs +29 -29
  3. package/es/src/ag-grid/hooks/use-columns.d.ts +1 -1
  4. package/es/src/ag-grid/hooks/use-columns.mjs +8 -8
  5. package/es/src/ag-grid/hooks/use-pinned-row.d.ts +7 -0
  6. package/es/src/ag-grid/hooks/use-pinned-row.mjs +32 -0
  7. package/es/src/ag-grid/hooks/use-virtual-config.d.ts +5 -0
  8. package/es/src/ag-grid/hooks/use-virtual-config.mjs +25 -0
  9. package/es/src/ag-grid/index.vue.mjs +274 -232
  10. package/es/src/ag-grid/interface.d.ts +25 -2
  11. package/es/src/ap-field/select/index.vue.d.ts +51 -21
  12. package/es/src/ap-field/select/index.vue.mjs +51 -49
  13. package/es/src/ap-field/select/read.vue2.mjs +4 -1
  14. package/es/src/ap-field/tree-select/index.vue.d.ts +29 -21
  15. package/es/src/ap-field/tree-select/index.vue.mjs +11 -9
  16. package/es/src/ap-field/tree-select/read.vue2.mjs +7 -5
  17. package/es/src/ap-form/ap-form.vue.d.ts +20 -0
  18. package/es/src/ap-form/ap-form.vue2.mjs +11 -10
  19. package/es/src/ap-form/drawer-form/index.vue.d.ts +22 -0
  20. package/es/src/ap-form/drawer-form/index.vue.mjs +1 -0
  21. package/es/src/ap-form/hooks/use-watch.mjs +25 -28
  22. package/es/src/ap-form/interface.d.ts +1 -1
  23. package/es/src/ap-form/items/select/index.vue.d.ts +64 -28
  24. package/es/src/ap-form/items/tree-select/index.vue.d.ts +40 -28
  25. package/es/src/ap-form/modal-form/index.vue.d.ts +22 -0
  26. package/es/src/ap-form/modal-form/index.vue.mjs +31 -30
  27. package/es/src/ap-form/search-form/index.vue.d.ts +24 -2
  28. package/es/src/ap-form/search-form/index.vue.mjs +72 -68
  29. package/es/src/ap-table/constants.d.ts +52 -28
  30. package/es/src/ap-upload/apUpload.vue.d.ts +9 -0
  31. package/es/src/ap-upload/apUpload.vue.mjs +38 -34
  32. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +59 -59
  33. package/es/src/ap-upload/components/Picture.vue2.mjs +74 -74
  34. package/es/src/ap-upload/components/SingleFile.vue2.mjs +95 -95
  35. package/es/src/business/ap-value-select-card/index.vue2.mjs +120 -123
  36. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +11 -0
  37. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +11 -0
  38. package/es/src/business/hooks/usePageListAgGrid.d.ts +1 -1
  39. package/es/src/business/hooks/usePageListAgGrid.mjs +4 -4
  40. package/es/src/business/hooks/usePageListApGrid.mjs +14 -14
  41. package/es/src/config-provider/config-provider-props.d.ts +14 -1
  42. package/es/src/config-provider/config-provider.d.ts +31 -1
  43. package/es/src/config-provider/hooks/use-global-config.d.ts +14 -1
  44. package/es/src/config-provider/index.d.ts +52 -1
  45. package/es/src/utils/config-provider-preset.d.ts +11 -1
  46. package/es/src/version.d.ts +1 -1
  47. package/es/src/version.mjs +1 -1
  48. package/es/src/work-order-modal/work-order-modal.vue.d.ts +11 -0
  49. package/lib/src/ag-grid/hooks/use-columns-def.d.ts +2 -2
  50. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  51. package/lib/src/ag-grid/hooks/use-columns.d.ts +1 -1
  52. package/lib/src/ag-grid/hooks/use-columns.js +1 -1
  53. package/lib/src/ag-grid/hooks/use-pinned-row.d.ts +7 -0
  54. package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -0
  55. package/lib/src/ag-grid/hooks/use-virtual-config.d.ts +5 -0
  56. package/lib/src/ag-grid/hooks/use-virtual-config.js +1 -0
  57. package/lib/src/ag-grid/index.vue.js +1 -1
  58. package/lib/src/ag-grid/interface.d.ts +25 -2
  59. package/lib/src/ap-field/select/index.vue.d.ts +51 -21
  60. package/lib/src/ap-field/select/index.vue.js +1 -1
  61. package/lib/src/ap-field/select/read.vue2.js +1 -1
  62. package/lib/src/ap-field/tree-select/index.vue.d.ts +29 -21
  63. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  64. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  65. package/lib/src/ap-form/ap-form.vue.d.ts +20 -0
  66. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  67. package/lib/src/ap-form/drawer-form/index.vue.d.ts +22 -0
  68. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  69. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  70. package/lib/src/ap-form/interface.d.ts +1 -1
  71. package/lib/src/ap-form/items/select/index.vue.d.ts +64 -28
  72. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +40 -28
  73. package/lib/src/ap-form/modal-form/index.vue.d.ts +22 -0
  74. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  75. package/lib/src/ap-form/search-form/index.vue.d.ts +24 -2
  76. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  77. package/lib/src/ap-table/constants.d.ts +52 -28
  78. package/lib/src/ap-upload/apUpload.vue.d.ts +9 -0
  79. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  80. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  81. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  82. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  83. package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
  84. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +11 -0
  85. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +11 -0
  86. package/lib/src/business/hooks/usePageListAgGrid.d.ts +1 -1
  87. package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
  88. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  89. package/lib/src/config-provider/config-provider-props.d.ts +14 -1
  90. package/lib/src/config-provider/config-provider.d.ts +31 -1
  91. package/lib/src/config-provider/hooks/use-global-config.d.ts +14 -1
  92. package/lib/src/config-provider/index.d.ts +52 -1
  93. package/lib/src/utils/config-provider-preset.d.ts +11 -1
  94. package/lib/src/version.d.ts +1 -1
  95. package/lib/src/version.js +1 -1
  96. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +11 -0
  97. package/package.json +3 -3
  98. package/theme/ap-pro-card/index.css +5 -5
  99. package/theme/ap-pro-card/index.less +5 -5
  100. package/theme/ap-value-select-card/index.css +3 -4
  101. package/theme/ap-value-select-card/index.less +3 -4
  102. package/theme/index.css +8 -9
@@ -4,7 +4,7 @@ import { TableProps } from '@aplus-frontend/antdv';
4
4
  import { ApFormSearchFormPopoverSorterItem, ApFormSearchFormProps } from '../ap-form/interface';
5
5
  import { Recordable } from '../type';
6
6
  import { SortOrder, TableRowSelection } from '@aplus-frontend/antdv/es/table/interface';
7
- import { ColDef, IRowNode } from 'ag-grid-community';
7
+ import { ColDef, IRowNode, RowPinnedType, ScrollDirection } from 'ag-grid-community';
8
8
  import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
9
9
  export type AgGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<ExtraProColumnType<RecordType>, 'sorter' | 'rowSpan' | 'customCell' | 'customHeaderCell' | 'minWidth' | 'width' | 'maxWidth' | 'className' | 'class' | 'colSpan'> & {
10
10
  children?: AgGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
@@ -106,6 +106,11 @@ export type AgGridRowSelection<RecordType> = Pick<TableRowSelection<RecordType>,
106
106
  */
107
107
  preserveSelectedRowKeys?: boolean;
108
108
  };
109
+ export type AgGridVirtualConfig = {
110
+ row?: boolean;
111
+ col?: boolean;
112
+ rowBuffer?: number;
113
+ };
109
114
  export type AgGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection' | 'rowClassName' | 'footer' | 'loading' | 'sticky'> & {
110
115
  /**
111
116
  * 列配置
@@ -203,11 +208,13 @@ export type AgGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
203
208
  columnResizable?: boolean;
204
209
  loading?: boolean;
205
210
  /**
206
- * 设置总结栏
211
+ * 总结栏配置项
207
212
  */
208
213
  summary?: {
209
214
  top?: RecordType[];
210
215
  bottom?: RecordType[];
216
+ cellClassName?: string | string[] | ((data: RecordType, column: ColDef<RecordType>, pinned: RowPinnedType) => string | string[]);
217
+ rowClassName?: string | string[] | ((data: RecordType, rowIndex: number, pinned: RowPinnedType) => string | string[]);
211
218
  };
212
219
  /**
213
220
  * 指定每一行占据的高度(大量数据展示时的性能优化)
@@ -221,6 +228,22 @@ export type AgGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
221
228
  * 单元格tooltip使用原生实现 默认为 `false`
222
229
  */
223
230
  browserTooltips?: boolean;
231
+ /**
232
+ * 虚拟列表配置项
233
+ */
234
+ virtual?: false | AgGridVirtualConfig;
235
+ /**
236
+ * 行点击事件
237
+ * @param record 行数据
238
+ * @returns
239
+ */
240
+ onRowClicked?: (record: RecordType) => void;
241
+ /**
242
+ * 表格滚动结束后的事件
243
+ * @param direction
244
+ * @returns
245
+ */
246
+ onScrollEnd?: (direction: ScrollDirection) => void;
224
247
  };
225
248
  export type AgGridExpose<SearchParamsType = Recordable, RecordType = any> = {
226
249
  /**
@@ -50,6 +50,15 @@ declare function __VLS_template(): {
50
50
  type: BooleanConstructor;
51
51
  default: boolean;
52
52
  };
53
+ showArrow: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ variant: {
58
+ type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
59
+ default: "filled" | "outlined" | "borderless" | "underlined";
60
+ };
61
+ maxCount: NumberConstructor;
53
62
  transitionName: StringConstructor;
54
63
  choiceTransitionName: {
55
64
  type: PropType<"">;
@@ -132,6 +141,7 @@ declare function __VLS_template(): {
132
141
  clearIcon: VueTypeValidableDef<any>;
133
142
  options: PropType<DefaultOptionType[]>;
134
143
  onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
144
+ prefix: VueTypeValidableDef<any>;
135
145
  onSearch: PropType<(value: string) => void>;
136
146
  fieldNames: PropType<FieldNames>;
137
147
  dropdownStyle: {
@@ -165,10 +175,6 @@ declare function __VLS_template(): {
165
175
  onDropdownVisibleChange: {
166
176
  type: PropType<(open: boolean) => void>;
167
177
  };
168
- showArrow: {
169
- type: BooleanConstructor;
170
- default: any;
171
- };
172
178
  onPopupScroll: PropType<(e: UIEvent) => void>;
173
179
  menuItemSelectedIcon: VueTypeValidableDef<any>;
174
180
  listItemHeight: NumberConstructor;
@@ -202,6 +208,7 @@ declare function __VLS_template(): {
202
208
  virtual: boolean;
203
209
  dropdownMatchSelectWidth: number | boolean;
204
210
  loading: boolean;
211
+ variant: "filled" | "outlined" | "borderless" | "underlined";
205
212
  bordered: boolean;
206
213
  defaultValue: SelectValue;
207
214
  status: "" | "error" | "warning";
@@ -212,11 +219,11 @@ declare function __VLS_template(): {
212
219
  placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
213
220
  showSearch: boolean;
214
221
  choiceTransitionName: "";
215
- showArrow: boolean;
216
222
  autoClearSearchValue: boolean;
217
223
  filterOption: boolean | FilterFunc<DefaultOptionType>;
218
224
  defaultActiveFirstOption: boolean;
219
225
  labelInValue: boolean;
226
+ showArrow: boolean;
220
227
  }, true, {}, CustomSlotsType<{
221
228
  notFoundContent: any;
222
229
  suffixIcon: any;
@@ -230,6 +237,7 @@ declare function __VLS_template(): {
230
237
  maxTagPlaceholder: any;
231
238
  optionLabel: any;
232
239
  default: any;
240
+ prefix: any;
233
241
  }>, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
234
242
  P: {};
235
243
  B: {};
@@ -261,6 +269,15 @@ declare function __VLS_template(): {
261
269
  type: BooleanConstructor;
262
270
  default: boolean;
263
271
  };
272
+ showArrow: {
273
+ type: BooleanConstructor;
274
+ default: boolean;
275
+ };
276
+ variant: {
277
+ type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
278
+ default: "filled" | "outlined" | "borderless" | "underlined";
279
+ };
280
+ maxCount: NumberConstructor;
264
281
  transitionName: StringConstructor;
265
282
  choiceTransitionName: {
266
283
  type: PropType<"">;
@@ -343,6 +360,7 @@ declare function __VLS_template(): {
343
360
  clearIcon: VueTypeValidableDef<any>;
344
361
  options: PropType<DefaultOptionType[]>;
345
362
  onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
363
+ prefix: VueTypeValidableDef<any>;
346
364
  onSearch: PropType<(value: string) => void>;
347
365
  fieldNames: PropType<FieldNames>;
348
366
  dropdownStyle: {
@@ -376,10 +394,6 @@ declare function __VLS_template(): {
376
394
  onDropdownVisibleChange: {
377
395
  type: PropType<(open: boolean) => void>;
378
396
  };
379
- showArrow: {
380
- type: BooleanConstructor;
381
- default: any;
382
- };
383
397
  onPopupScroll: PropType<(e: UIEvent) => void>;
384
398
  menuItemSelectedIcon: VueTypeValidableDef<any>;
385
399
  listItemHeight: NumberConstructor;
@@ -413,6 +427,7 @@ declare function __VLS_template(): {
413
427
  virtual: boolean;
414
428
  dropdownMatchSelectWidth: number | boolean;
415
429
  loading: boolean;
430
+ variant: "filled" | "outlined" | "borderless" | "underlined";
416
431
  bordered: boolean;
417
432
  defaultValue: SelectValue;
418
433
  status: "" | "error" | "warning";
@@ -423,11 +438,11 @@ declare function __VLS_template(): {
423
438
  placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
424
439
  showSearch: boolean;
425
440
  choiceTransitionName: "";
426
- showArrow: boolean;
427
441
  autoClearSearchValue: boolean;
428
442
  filterOption: boolean | FilterFunc<DefaultOptionType>;
429
443
  defaultActiveFirstOption: boolean;
430
444
  labelInValue: boolean;
445
+ showArrow: boolean;
431
446
  }> | null;
432
447
  };
433
448
  rootEl: any;
@@ -453,8 +468,8 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
453
468
  lazy: boolean;
454
469
  allowClear: boolean;
455
470
  defaultOpen: boolean;
456
- showSearch: boolean;
457
471
  showArrow: boolean;
472
+ showSearch: boolean;
458
473
  autoClearSearchValue: boolean;
459
474
  defaultActiveFirstOption: boolean;
460
475
  labelInValue: boolean;
@@ -487,6 +502,15 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
487
502
  type: BooleanConstructor;
488
503
  default: boolean;
489
504
  };
505
+ showArrow: {
506
+ type: BooleanConstructor;
507
+ default: boolean;
508
+ };
509
+ variant: {
510
+ type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
511
+ default: "filled" | "outlined" | "borderless" | "underlined";
512
+ };
513
+ maxCount: NumberConstructor;
490
514
  transitionName: StringConstructor;
491
515
  choiceTransitionName: {
492
516
  type: PropType<"">;
@@ -569,6 +593,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
569
593
  clearIcon: VueTypeValidableDef<any>;
570
594
  options: PropType<DefaultOptionType[]>;
571
595
  onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
596
+ prefix: VueTypeValidableDef<any>;
572
597
  onSearch: PropType<(value: string) => void>;
573
598
  fieldNames: PropType<FieldNames>;
574
599
  dropdownStyle: {
@@ -602,10 +627,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
602
627
  onDropdownVisibleChange: {
603
628
  type: PropType<(open: boolean) => void>;
604
629
  };
605
- showArrow: {
606
- type: BooleanConstructor;
607
- default: any;
608
- };
609
630
  onPopupScroll: PropType<(e: UIEvent) => void>;
610
631
  menuItemSelectedIcon: VueTypeValidableDef<any>;
611
632
  listItemHeight: NumberConstructor;
@@ -639,6 +660,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
639
660
  virtual: boolean;
640
661
  dropdownMatchSelectWidth: number | boolean;
641
662
  loading: boolean;
663
+ variant: "filled" | "outlined" | "borderless" | "underlined";
642
664
  bordered: boolean;
643
665
  defaultValue: SelectValue;
644
666
  status: "" | "error" | "warning";
@@ -649,11 +671,11 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
649
671
  placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
650
672
  showSearch: boolean;
651
673
  choiceTransitionName: "";
652
- showArrow: boolean;
653
674
  autoClearSearchValue: boolean;
654
675
  filterOption: boolean | FilterFunc<DefaultOptionType>;
655
676
  defaultActiveFirstOption: boolean;
656
677
  labelInValue: boolean;
678
+ showArrow: boolean;
657
679
  }, true, {}, CustomSlotsType<{
658
680
  notFoundContent: any;
659
681
  suffixIcon: any;
@@ -667,6 +689,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
667
689
  maxTagPlaceholder: any;
668
690
  optionLabel: any;
669
691
  default: any;
692
+ prefix: any;
670
693
  }>, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
671
694
  P: {};
672
695
  B: {};
@@ -698,6 +721,15 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
698
721
  type: BooleanConstructor;
699
722
  default: boolean;
700
723
  };
724
+ showArrow: {
725
+ type: BooleanConstructor;
726
+ default: boolean;
727
+ };
728
+ variant: {
729
+ type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
730
+ default: "filled" | "outlined" | "borderless" | "underlined";
731
+ };
732
+ maxCount: NumberConstructor;
701
733
  transitionName: StringConstructor;
702
734
  choiceTransitionName: {
703
735
  type: PropType<"">;
@@ -780,6 +812,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
780
812
  clearIcon: VueTypeValidableDef<any>;
781
813
  options: PropType<DefaultOptionType[]>;
782
814
  onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
815
+ prefix: VueTypeValidableDef<any>;
783
816
  onSearch: PropType<(value: string) => void>;
784
817
  fieldNames: PropType<FieldNames>;
785
818
  dropdownStyle: {
@@ -813,10 +846,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
813
846
  onDropdownVisibleChange: {
814
847
  type: PropType<(open: boolean) => void>;
815
848
  };
816
- showArrow: {
817
- type: BooleanConstructor;
818
- default: any;
819
- };
820
849
  onPopupScroll: PropType<(e: UIEvent) => void>;
821
850
  menuItemSelectedIcon: VueTypeValidableDef<any>;
822
851
  listItemHeight: NumberConstructor;
@@ -850,6 +879,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
850
879
  virtual: boolean;
851
880
  dropdownMatchSelectWidth: number | boolean;
852
881
  loading: boolean;
882
+ variant: "filled" | "outlined" | "borderless" | "underlined";
853
883
  bordered: boolean;
854
884
  defaultValue: SelectValue;
855
885
  status: "" | "error" | "warning";
@@ -860,11 +890,11 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
860
890
  placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
861
891
  showSearch: boolean;
862
892
  choiceTransitionName: "";
863
- showArrow: boolean;
864
893
  autoClearSearchValue: boolean;
865
894
  filterOption: boolean | FilterFunc<DefaultOptionType>;
866
895
  defaultActiveFirstOption: boolean;
867
896
  labelInValue: boolean;
897
+ showArrow: boolean;
868
898
  }> | null;
869
899
  }, any>;
870
900
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,8 +1,8 @@
1
- import { defineComponent as M, ref as g, onMounted as D, watch as R, computed as p, unref as a, createElementBlock as z, createBlock as E, openBlock as S, toDisplayString as U, mergeProps as K, createSlots as H, renderList as $, withCtx as w, renderSlot as j, normalizeProps as W, guardReactiveProps as Y, createVNode as G } from "vue";
2
- import { debounce as J, isFunction as B, isArray as Q, isNil as X, omit as Z } from "lodash-unified";
3
- import { Select as ee, Spin as oe } from "@aplus-frontend/antdv";
1
+ import { defineComponent as M, ref as g, onMounted as D, watch as R, computed as p, unref as a, createElementBlock as z, createBlock as E, openBlock as S, toDisplayString as U, mergeProps as K, createSlots as H, renderList as $, withCtx as B, renderSlot as j, normalizeProps as W, guardReactiveProps as Y, createVNode as G } from "vue";
2
+ import { debounce as J, isFunction as C, isArray as Q, isNil as X, omit as Z } from "lodash-unified";
3
+ import { Select as ee, Spin as te } from "@aplus-frontend/antdv";
4
4
  import "../../hooks/index.mjs";
5
- import { useDefaultPlaceholder as te } from "../hooks/use-default-placeholder.mjs";
5
+ import { useDefaultPlaceholder as oe } from "../hooks/use-default-placeholder.mjs";
6
6
  import { useSelectOptions as le, SELECT_ALL_VALUE_KEY as f } from "./use-select-options.mjs";
7
7
  import { useControllableValue as ae } from "../../hooks/useControllableValue.mjs";
8
8
  const ne = { key: 0 }, fe = /* @__PURE__ */ M({
@@ -18,6 +18,9 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
18
18
  itemIcon: {},
19
19
  size: {},
20
20
  bordered: { type: Boolean, default: void 0 },
21
+ showArrow: { type: Boolean, default: void 0 },
22
+ variant: {},
23
+ maxCount: {},
21
24
  transitionName: {},
22
25
  choiceTransitionName: {},
23
26
  popupClassName: {},
@@ -56,6 +59,7 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
56
59
  clearIcon: {},
57
60
  options: {},
58
61
  onDeselect: {},
62
+ prefix: {},
59
63
  fieldNames: {},
60
64
  dropdownStyle: {},
61
65
  dropdownRender: {},
@@ -71,7 +75,6 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
71
75
  optionLabelRender: {},
72
76
  onClear: {},
73
77
  onDropdownVisibleChange: {},
74
- showArrow: { type: Boolean, default: void 0 },
75
78
  onPopupScroll: {},
76
79
  menuItemSelectedIcon: {},
77
80
  listItemHeight: {},
@@ -97,42 +100,42 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
97
100
  searchDelay: { default: 300 }
98
101
  },
99
102
  emits: ["update:value"],
100
- setup(C, { expose: F, emit: b }) {
103
+ setup(w, { expose: F, emit: b }) {
101
104
  let r = 0;
102
- const o = C, N = J((e) => {
103
- if (!B(o.request))
105
+ const t = w, N = J((e) => {
106
+ if (!C(t.request))
104
107
  return;
105
108
  r += 1;
106
109
  const l = r;
107
- s([]), n.value = !0, o.request(e).then((t) => {
108
- r === l && (s(t), n.value = !1);
110
+ s([]), n.value = !0, t.request(e).then((o) => {
111
+ r === l && (s(o), n.value = !1);
109
112
  });
110
- }, o.searchDelay), O = (e, l) => {
111
- const t = o.fieldNames?.label || "label";
112
- return typeof l?.[t] == "string" && l[t].toLowerCase().indexOf(e.toLowerCase()) > -1;
113
- }, { options: u, updateOptions: s } = le(o), m = g(), n = g(o?.loading || !1), A = b;
113
+ }, t.searchDelay), O = (e, l) => {
114
+ const o = t.fieldNames?.label || "label";
115
+ return typeof l?.[o] == "string" && l[o].toLowerCase().indexOf(e.toLowerCase()) > -1;
116
+ }, { options: u, updateOptions: s } = le(t), m = g(), n = g(t?.loading || !1), x = b;
114
117
  async function d(e = !0) {
115
- if (!B(o.request))
118
+ if (!C(t.request))
116
119
  return;
117
120
  n.value = !0, r += 1;
118
121
  const l = r;
119
122
  try {
120
123
  e && s([]);
121
- const t = await o.request(void 0, o.params);
124
+ const o = await t.request(void 0, t.params);
122
125
  if (l !== r)
123
126
  return;
124
- s(t);
127
+ s(o);
125
128
  } finally {
126
129
  n.value = !1;
127
130
  }
128
131
  }
129
- function V(e) {
130
- o.onFocus?.(e), o.refetchOnFocus && r > 0 && !n.value && d(!0);
132
+ function I(e) {
133
+ t.onFocus?.(e), t.refetchOnFocus && r > 0 && !n.value && d(!0);
131
134
  }
132
135
  D(() => {
133
- o.lazy || d();
136
+ t.lazy || d();
134
137
  }), R(
135
- () => o.params,
138
+ () => t.params,
136
139
  () => {
137
140
  d();
138
141
  },
@@ -140,30 +143,29 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
140
143
  deep: !0
141
144
  }
142
145
  );
143
- const { value: c, updateValue: v } = ae(o, A), x = te("Select", o), I = p(() => {
146
+ const { value: c, updateValue: v } = ae(t, x), V = oe("Select", t), A = p(() => {
144
147
  const e = a(c);
145
148
  if (!e)
146
- return o.emptyText;
147
- const l = o.fieldNames?.label || "label", t = o.fieldNames?.value || "value";
149
+ return t.emptyText;
150
+ const l = t.fieldNames?.label || "label", o = t.fieldNames?.value || "value";
148
151
  return Q(e) ? e.map(
149
- (i) => a(u).find((q) => q[t] === i)?.[l]
150
- ).filter(Boolean).join("、") || o.emptyText : a(u).find(
151
- (i) => i[t] === e
152
- )?.[l] || o.emptyText;
152
+ (i) => a(u).find((q) => q[o] === i)?.[l]
153
+ ).filter(Boolean).join("、") || t.emptyText : a(u).find(
154
+ (i) => i[o] === e
155
+ )?.[l] || t.emptyText;
153
156
  }), _ = p(() => {
154
- const e = !!o?.showSearch, l = o.searchMode;
155
- let t = {};
156
- return e && (t = l === "request" ? {
157
- showArrow: !1,
157
+ const e = !!t?.showSearch, l = t.searchMode;
158
+ let o = {};
159
+ return e && (o = l === "request" ? {
158
160
  defaultActiveFirstOption: !1,
159
161
  onSearch: N,
160
162
  notFoundContent: n.value ? void 0 : null,
161
- filterOption: !1
163
+ filterOption: !1,
164
+ suffixIcon: null
162
165
  } : {
163
- showArrow: !0,
164
- filterOption: X(o?.filterOption) ? O : o?.filterOption
166
+ filterOption: X(t?.filterOption) ? O : t?.filterOption
165
167
  }), {
166
- ...Z(o, [
168
+ ...Z(t, [
167
169
  "mode",
168
170
  "value",
169
171
  "onUpdate:value",
@@ -173,25 +175,25 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
173
175
  "onFocus",
174
176
  "onBeforeSelect"
175
177
  ]),
176
- placeholder: a(x),
177
- ...t
178
+ placeholder: a(V),
179
+ ...o
178
180
  };
179
181
  }), y = p(
180
- () => u.value.map((e) => e[o.fieldNames?.value || "value"]).filter((e) => e !== f)
182
+ () => u.value.map((e) => e[t.fieldNames?.value || "value"]).filter((e) => e !== f)
181
183
  ), P = p(() => {
182
- if (!o.multiple || !o.addAll)
184
+ if (!t.multiple || !t.addAll)
183
185
  return a(c);
184
186
  if (u.value.some(
185
- (e) => e[o.fieldNames?.value || "value"] === f
187
+ (e) => e[t.fieldNames?.value || "value"] === f
186
188
  )) {
187
189
  const e = a(y), l = a(c) || [];
188
- if (e.length && e.every((t) => l?.includes(t)))
190
+ if (e.length && e.every((o) => l?.includes(o)))
189
191
  return [f];
190
192
  }
191
193
  return a(c);
192
194
  });
193
195
  function k(e) {
194
- return o.multiple && e.includes(f) ? v(a(y)) : v(e);
196
+ return t.multiple && e.includes(f) ? v(a(y)) : v(e);
195
197
  }
196
198
  function L() {
197
199
  m.value?.focus();
@@ -203,7 +205,7 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
203
205
  focus: L,
204
206
  blur: T,
205
207
  request: d
206
- }), (e, l) => e.mode === "read" ? (S(), z("span", ne, U(I.value), 1)) : (S(), E(a(ee), K({
208
+ }), (e, l) => e.mode === "read" ? (S(), z("span", ne, U(A.value), 1)) : (S(), E(a(ee), K({
207
209
  key: 1,
208
210
  ref_key: "selectRef",
209
211
  ref: m,
@@ -214,18 +216,18 @@ const ne = { key: 0 }, fe = /* @__PURE__ */ M({
214
216
  options: a(u),
215
217
  loading: n.value,
216
218
  "onUpdate:value": k,
217
- onFocus: V
219
+ onFocus: I
218
220
  }), H({ _: 2 }, [
219
- $(e.$slots, (t, h) => ({
221
+ $(e.$slots, (o, h) => ({
220
222
  name: h,
221
- fn: w((i) => [
223
+ fn: B((i) => [
222
224
  j(e.$slots, h, W(Y(i || {})))
223
225
  ])
224
226
  })),
225
227
  n.value ? {
226
228
  name: "notFoundContent",
227
- fn: w(() => [
228
- G(a(oe), { size: "small" })
229
+ fn: B(() => [
230
+ G(a(te), { size: "small" })
229
231
  ]),
230
232
  key: "0"
231
233
  } : void 0
@@ -13,6 +13,9 @@ const f = { key: 0 }, C = /* @__PURE__ */ i({
13
13
  itemIcon: {},
14
14
  size: {},
15
15
  bordered: { type: Boolean },
16
+ showArrow: { type: Boolean },
17
+ variant: {},
18
+ maxCount: {},
16
19
  transitionName: {},
17
20
  choiceTransitionName: {},
18
21
  popupClassName: {},
@@ -51,6 +54,7 @@ const f = { key: 0 }, C = /* @__PURE__ */ i({
51
54
  clearIcon: {},
52
55
  options: {},
53
56
  onDeselect: {},
57
+ prefix: {},
54
58
  fieldNames: {},
55
59
  dropdownStyle: {},
56
60
  dropdownRender: {},
@@ -66,7 +70,6 @@ const f = { key: 0 }, C = /* @__PURE__ */ i({
66
70
  optionLabelRender: {},
67
71
  onClear: {},
68
72
  onDropdownVisibleChange: {},
69
- showArrow: { type: Boolean },
70
73
  onPopupScroll: {},
71
74
  menuItemSelectedIcon: {},
72
75
  listItemHeight: {},