@aplus-frontend/ui 0.4.1 → 0.4.2

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 (116) hide show
  1. package/es/src/ap-field/number/index.vue.d.ts +322 -1
  2. package/es/src/ap-field/radio/index.vue.d.ts +98 -2
  3. package/es/src/ap-field/rate/index.vue.d.ts +82 -1
  4. package/es/src/ap-field/segmented/index.vue.d.ts +1 -7
  5. package/es/src/ap-field/select/index.vue.d.ts +423 -1
  6. package/es/src/ap-field/select/index.vue.mjs +4 -3
  7. package/es/src/ap-field/slider/index.vue.d.ts +257 -1
  8. package/es/src/ap-field/text/index.vue.d.ts +1 -13
  9. package/es/src/ap-field/text-area/index.vue.d.ts +267 -2
  10. package/es/src/ap-form/ap-form.vue.d.ts +636 -1
  11. package/es/src/ap-form/drawer-form/index.vue.d.ts +1454 -4
  12. package/es/src/ap-form/item/index.vue.d.ts +777 -1
  13. package/es/src/ap-form/items/number/index.vue.d.ts +783 -2
  14. package/es/src/ap-form/items/radio/index.vue.d.ts +221 -3
  15. package/es/src/ap-form/items/text/index.vue.d.ts +128 -15
  16. package/es/src/ap-form/items/text/password.vue.d.ts +148 -1
  17. package/es/src/ap-form/items/text-area/index.vue.d.ts +566 -3
  18. package/es/src/ap-form/modal-form/index.vue.d.ts +1454 -5
  19. package/es/src/ap-form/modal-form/index.vue.mjs +64 -66
  20. package/es/src/ap-form/search-form/index.vue.d.ts +1454 -3
  21. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +4 -1
  22. package/es/src/ap-list/index.vue.d.ts +1 -1
  23. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +3 -1
  24. package/es/src/ap-scroll-bar/index.d.ts +3 -1
  25. package/es/src/ap-table/ap-table.vue.d.ts +1 -1
  26. package/es/src/ap-table/ap-table.vue2.mjs +98 -97
  27. package/es/src/ap-table/constants.d.ts +2260 -26
  28. package/es/src/ap-table/context.d.ts +1 -0
  29. package/es/src/ap-table/context.mjs +11 -10
  30. package/es/src/ap-table/utils.d.ts +1168 -8
  31. package/es/src/ap-tag/ap-tag-group.vue.d.ts +3 -1
  32. package/es/src/ap-upload/apUpload.vue.d.ts +3 -1
  33. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +453 -2
  34. package/es/src/ap-upload/components/Picture.vue.d.ts +3 -1
  35. package/es/src/ap-upload/components/SingleFile.vue.d.ts +3 -1
  36. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +1 -1
  37. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +66 -61
  38. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +3 -1
  39. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +5 -4
  40. package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +3 -1
  41. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +8 -7
  42. package/es/src/business/ap-group-search/index.d.ts +444 -4
  43. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +421 -3
  44. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +1 -0
  45. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +1 -1
  46. package/es/src/business/ap-table-modal/index.d.ts +22 -2
  47. package/es/src/business/ap-table-modal/interface.d.ts +2 -2
  48. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +22 -2
  49. package/es/src/business/batch-input-group/index.vue.d.ts +134 -3
  50. package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +267 -2
  51. package/es/src/business/hooks/usePageListApTable.mjs +20 -18
  52. package/es/src/editable-table/form-item.vue.d.ts +1 -1
  53. package/es/src/editable-table/index.vue.d.ts +1 -1
  54. package/es/src/work-order-modal/work-order-modal.vue.d.ts +827 -2
  55. package/lib/src/ap-field/number/index.vue.d.ts +322 -1
  56. package/lib/src/ap-field/radio/index.vue.d.ts +98 -2
  57. package/lib/src/ap-field/rate/index.vue.d.ts +82 -1
  58. package/lib/src/ap-field/segmented/index.vue.d.ts +1 -7
  59. package/lib/src/ap-field/select/index.vue.d.ts +423 -1
  60. package/lib/src/ap-field/select/index.vue.js +1 -1
  61. package/lib/src/ap-field/slider/index.vue.d.ts +257 -1
  62. package/lib/src/ap-field/text/index.vue.d.ts +1 -13
  63. package/lib/src/ap-field/text-area/index.vue.d.ts +267 -2
  64. package/lib/src/ap-form/ap-form.vue.d.ts +636 -1
  65. package/lib/src/ap-form/drawer-form/index.vue.d.ts +1454 -4
  66. package/lib/src/ap-form/item/index.vue.d.ts +777 -1
  67. package/lib/src/ap-form/items/number/index.vue.d.ts +783 -2
  68. package/lib/src/ap-form/items/radio/index.vue.d.ts +221 -3
  69. package/lib/src/ap-form/items/text/index.vue.d.ts +128 -15
  70. package/lib/src/ap-form/items/text/password.vue.d.ts +148 -1
  71. package/lib/src/ap-form/items/text-area/index.vue.d.ts +566 -3
  72. package/lib/src/ap-form/modal-form/index.vue.d.ts +1454 -5
  73. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  74. package/lib/src/ap-form/search-form/index.vue.d.ts +1454 -3
  75. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +4 -1
  76. package/lib/src/ap-list/index.vue.d.ts +1 -1
  77. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +3 -1
  78. package/lib/src/ap-scroll-bar/index.d.ts +3 -1
  79. package/lib/src/ap-table/ap-table.vue.d.ts +1 -1
  80. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  81. package/lib/src/ap-table/constants.d.ts +2260 -26
  82. package/lib/src/ap-table/context.d.ts +1 -0
  83. package/lib/src/ap-table/context.js +1 -1
  84. package/lib/src/ap-table/utils.d.ts +1168 -8
  85. package/lib/src/ap-tag/ap-tag-group.vue.d.ts +3 -1
  86. package/lib/src/ap-upload/apUpload.vue.d.ts +3 -1
  87. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +453 -2
  88. package/lib/src/ap-upload/components/Picture.vue.d.ts +3 -1
  89. package/lib/src/ap-upload/components/SingleFile.vue.d.ts +3 -1
  90. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +1 -1
  91. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  92. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +3 -1
  93. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
  94. package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +3 -1
  95. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
  96. package/lib/src/business/ap-group-search/index.d.ts +444 -4
  97. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +421 -3
  98. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +1 -1
  99. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +1 -1
  100. package/lib/src/business/ap-table-modal/index.d.ts +22 -2
  101. package/lib/src/business/ap-table-modal/interface.d.ts +2 -2
  102. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +22 -2
  103. package/lib/src/business/batch-input-group/index.vue.d.ts +134 -3
  104. package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +267 -2
  105. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  106. package/lib/src/editable-table/form-item.vue.d.ts +1 -1
  107. package/lib/src/editable-table/index.vue.d.ts +1 -1
  108. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +827 -2
  109. package/package.json +5 -5
  110. package/theme/ap-form/index.css +3 -4
  111. package/theme/ap-form/modal-form.css +3 -4
  112. package/theme/ap-form/modal-form.less +3 -4
  113. package/theme/ap-table/ap-table.css +3 -4
  114. package/theme/ap-table-modal/index.css +3 -4
  115. package/theme/editable-table/index.css +3 -4
  116. package/theme/index.css +3 -4
@@ -72,6 +72,10 @@ 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
+ };
75
79
  children: PropType< VueNode[]>;
76
80
  listHeight: NumberConstructor;
77
81
  onMouseenter: PropType<(e: MouseEvent) => void>;
@@ -219,6 +223,7 @@ declare function __VLS_template(): {
219
223
  filterOption: boolean | FilterFunc<DefaultOptionType>;
220
224
  defaultActiveFirstOption: boolean;
221
225
  labelInValue: boolean;
226
+ onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
222
227
  }, true, {}, CustomSlotsType<{
223
228
  notFoundContent: any;
224
229
  suffixIcon: any;
@@ -282,6 +287,10 @@ declare function __VLS_template(): {
282
287
  type: PropType<(val: SelectValue) => void>;
283
288
  default: (val: SelectValue) => void;
284
289
  };
290
+ onBeforeSelect: {
291
+ type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
292
+ default: (nextVal: SelectValue) => boolean | Promise<boolean>;
293
+ };
285
294
  children: PropType< VueNode[]>;
286
295
  listHeight: NumberConstructor;
287
296
  onMouseenter: PropType<(e: MouseEvent) => void>;
@@ -429,6 +438,7 @@ declare function __VLS_template(): {
429
438
  filterOption: boolean | FilterFunc<DefaultOptionType>;
430
439
  defaultActiveFirstOption: boolean;
431
440
  labelInValue: boolean;
441
+ onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
432
442
  }> | null;
433
443
  };
434
444
  rootEl: any;
@@ -462,7 +472,419 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
462
472
  emptyText: string;
463
473
  searchMode: "filter" | "request";
464
474
  refetchOnFocus: boolean;
465
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
475
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
476
+ selectRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
477
+ value: {
478
+ type: PropType<SelectValue>;
479
+ default: SelectValue;
480
+ };
481
+ defaultValue: {
482
+ type: PropType<SelectValue>;
483
+ default: SelectValue;
484
+ };
485
+ notFoundContent: VueTypeValidableDef<any>;
486
+ suffixIcon: VueTypeValidableDef<any>;
487
+ itemIcon: VueTypeValidableDef<any>;
488
+ size: {
489
+ type: PropType<ButtonSize>;
490
+ default: ButtonSize;
491
+ };
492
+ mode: {
493
+ type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
494
+ default: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
495
+ };
496
+ bordered: {
497
+ type: BooleanConstructor;
498
+ default: boolean;
499
+ };
500
+ transitionName: StringConstructor;
501
+ choiceTransitionName: {
502
+ type: PropType<"">;
503
+ default: "";
504
+ };
505
+ popupClassName: StringConstructor;
506
+ dropdownClassName: StringConstructor;
507
+ placement: {
508
+ type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
509
+ default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
510
+ };
511
+ status: {
512
+ type: PropType<"" | "error" | "warning">;
513
+ default: "" | "error" | "warning";
514
+ };
515
+ 'onUpdate:value': {
516
+ type: PropType<(val: SelectValue) => void>;
517
+ default: (val: SelectValue) => void;
518
+ };
519
+ onBeforeSelect: {
520
+ type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
521
+ default: (nextVal: SelectValue) => boolean | Promise<boolean>;
522
+ };
523
+ children: PropType< VueNode[]>;
524
+ listHeight: NumberConstructor;
525
+ onMouseenter: PropType<(e: MouseEvent) => void>;
526
+ onMouseleave: PropType<(e: MouseEvent) => void>;
527
+ tabindex: NumberConstructor;
528
+ onClick: PropType<(e: MouseEvent) => void>;
529
+ onFocus: {
530
+ type: PropType<(e: FocusEvent) => void>;
531
+ };
532
+ onBlur: {
533
+ type: PropType<(e: FocusEvent) => void>;
534
+ };
535
+ onChange: PropType<(value: SelectValue, option: DefaultOptionType | DefaultOptionType[]) => void>;
536
+ onKeydown: PropType<(e: KeyboardEvent) => void>;
537
+ onKeyup: PropType<(e: KeyboardEvent) => void>;
538
+ onMousedown: PropType<(e: MouseEvent) => void>;
539
+ onSelect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
540
+ open: {
541
+ type: BooleanConstructor;
542
+ default: any;
543
+ };
544
+ animation: StringConstructor;
545
+ direction: {
546
+ type: PropType<"rtl" | "ltr">;
547
+ };
548
+ disabled: {
549
+ type: BooleanConstructor;
550
+ default: any;
551
+ };
552
+ prefixCls: StringConstructor;
553
+ id: StringConstructor;
554
+ autofocus: BooleanConstructor;
555
+ getPopupContainer: {
556
+ type: PropType<RenderDOMFunc>;
557
+ };
558
+ virtual: {
559
+ type: BooleanConstructor;
560
+ default: any;
561
+ };
562
+ dropdownMatchSelectWidth: {
563
+ type: PropType<number | boolean>;
564
+ default: any;
565
+ };
566
+ options: PropType<DefaultOptionType[]>;
567
+ showAction: {
568
+ type: PropType<("click" | "focus")[]>;
569
+ };
570
+ onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
571
+ loading: {
572
+ type: BooleanConstructor;
573
+ default: any;
574
+ };
575
+ placeholder: VueTypeValidableDef<any>;
576
+ clearIcon: VueTypeValidableDef<any>;
577
+ allowClear: {
578
+ type: BooleanConstructor;
579
+ default: any;
580
+ };
581
+ onSearch: PropType<(value: string) => void>;
582
+ fieldNames: PropType<FieldNames>;
583
+ dropdownStyle: {
584
+ type: PropType<CSSProperties>;
585
+ };
586
+ dropdownRender: {
587
+ type: PropType<DropdownRender>;
588
+ };
589
+ dropdownAlign: PropType<AlignType>;
590
+ showSearch: {
591
+ type: BooleanConstructor;
592
+ default: any;
593
+ };
594
+ searchValue: StringConstructor;
595
+ onInputKeyDown: PropType<(e: KeyboardEvent) => void>;
596
+ removeIcon: VueTypeValidableDef<any>;
597
+ maxTagCount: {
598
+ type: PropType<number | "responsive">;
599
+ };
600
+ maxTagTextLength: NumberConstructor;
601
+ maxTagPlaceholder: VueTypeValidableDef<any>;
602
+ tokenSeparators: {
603
+ type: PropType<string[]>;
604
+ };
605
+ tagRender: {
606
+ type: PropType<(props: CustomTagProps) => any>;
607
+ };
608
+ optionLabelRender: {
609
+ type: PropType<(option: Record<string, any>) => any>;
610
+ };
611
+ onClear: PropType<() => void>;
612
+ defaultOpen: {
613
+ type: BooleanConstructor;
614
+ default: any;
615
+ };
616
+ onDropdownVisibleChange: {
617
+ type: PropType<(open: boolean) => void>;
618
+ };
619
+ showArrow: {
620
+ type: BooleanConstructor;
621
+ default: any;
622
+ };
623
+ onPopupScroll: PropType<(e: UIEvent) => void>;
624
+ menuItemSelectedIcon: VueTypeValidableDef<any>;
625
+ listItemHeight: NumberConstructor;
626
+ inputValue: StringConstructor;
627
+ autoClearSearchValue: {
628
+ type: BooleanConstructor;
629
+ default: any;
630
+ };
631
+ filterOption: {
632
+ type: PropType<boolean | FilterFunc<DefaultOptionType>>;
633
+ default: any;
634
+ };
635
+ filterSort: PropType<(optionA: DefaultOptionType, optionB: DefaultOptionType) => number>;
636
+ optionFilterProp: StringConstructor;
637
+ optionLabelProp: StringConstructor;
638
+ defaultActiveFirstOption: {
639
+ type: BooleanConstructor;
640
+ default: any;
641
+ };
642
+ labelInValue: {
643
+ type: BooleanConstructor;
644
+ default: any;
645
+ };
646
+ }>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
647
+ size: ButtonSize;
648
+ value: SelectValue;
649
+ mode: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
650
+ open: boolean;
651
+ disabled: boolean;
652
+ autofocus: boolean;
653
+ virtual: boolean;
654
+ dropdownMatchSelectWidth: number | boolean;
655
+ status: "" | "error" | "warning";
656
+ defaultValue: SelectValue;
657
+ 'onUpdate:value': (val: SelectValue) => void;
658
+ placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
659
+ loading: boolean;
660
+ bordered: boolean;
661
+ allowClear: boolean;
662
+ showSearch: boolean;
663
+ choiceTransitionName: "";
664
+ defaultOpen: boolean;
665
+ showArrow: boolean;
666
+ autoClearSearchValue: boolean;
667
+ filterOption: boolean | FilterFunc<DefaultOptionType>;
668
+ defaultActiveFirstOption: boolean;
669
+ labelInValue: boolean;
670
+ onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
671
+ }, true, {}, CustomSlotsType<{
672
+ notFoundContent: any;
673
+ suffixIcon: any;
674
+ itemIcon: any;
675
+ removeIcon: any;
676
+ clearIcon: any;
677
+ dropdownRender: any;
678
+ option: any;
679
+ placeholder: any;
680
+ tagRender: any;
681
+ maxTagPlaceholder: any;
682
+ optionLabel: any;
683
+ default: any;
684
+ }>, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
685
+ P: {};
686
+ B: {};
687
+ D: {};
688
+ C: {};
689
+ M: {};
690
+ Defaults: {};
691
+ }, Readonly< ExtractPropTypes<{
692
+ value: {
693
+ type: PropType<SelectValue>;
694
+ default: SelectValue;
695
+ };
696
+ defaultValue: {
697
+ type: PropType<SelectValue>;
698
+ default: SelectValue;
699
+ };
700
+ notFoundContent: VueTypeValidableDef<any>;
701
+ suffixIcon: VueTypeValidableDef<any>;
702
+ itemIcon: VueTypeValidableDef<any>;
703
+ size: {
704
+ type: PropType<ButtonSize>;
705
+ default: ButtonSize;
706
+ };
707
+ mode: {
708
+ type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
709
+ default: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
710
+ };
711
+ bordered: {
712
+ type: BooleanConstructor;
713
+ default: boolean;
714
+ };
715
+ transitionName: StringConstructor;
716
+ choiceTransitionName: {
717
+ type: PropType<"">;
718
+ default: "";
719
+ };
720
+ popupClassName: StringConstructor;
721
+ dropdownClassName: StringConstructor;
722
+ placement: {
723
+ type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
724
+ default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
725
+ };
726
+ status: {
727
+ type: PropType<"" | "error" | "warning">;
728
+ default: "" | "error" | "warning";
729
+ };
730
+ 'onUpdate:value': {
731
+ type: PropType<(val: SelectValue) => void>;
732
+ default: (val: SelectValue) => void;
733
+ };
734
+ onBeforeSelect: {
735
+ type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
736
+ default: (nextVal: SelectValue) => boolean | Promise<boolean>;
737
+ };
738
+ children: PropType< VueNode[]>;
739
+ listHeight: NumberConstructor;
740
+ onMouseenter: PropType<(e: MouseEvent) => void>;
741
+ onMouseleave: PropType<(e: MouseEvent) => void>;
742
+ tabindex: NumberConstructor;
743
+ onClick: PropType<(e: MouseEvent) => void>;
744
+ onFocus: {
745
+ type: PropType<(e: FocusEvent) => void>;
746
+ };
747
+ onBlur: {
748
+ type: PropType<(e: FocusEvent) => void>;
749
+ };
750
+ onChange: PropType<(value: SelectValue, option: DefaultOptionType | DefaultOptionType[]) => void>;
751
+ onKeydown: PropType<(e: KeyboardEvent) => void>;
752
+ onKeyup: PropType<(e: KeyboardEvent) => void>;
753
+ onMousedown: PropType<(e: MouseEvent) => void>;
754
+ onSelect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
755
+ open: {
756
+ type: BooleanConstructor;
757
+ default: any;
758
+ };
759
+ animation: StringConstructor;
760
+ direction: {
761
+ type: PropType<"rtl" | "ltr">;
762
+ };
763
+ disabled: {
764
+ type: BooleanConstructor;
765
+ default: any;
766
+ };
767
+ prefixCls: StringConstructor;
768
+ id: StringConstructor;
769
+ autofocus: BooleanConstructor;
770
+ getPopupContainer: {
771
+ type: PropType<RenderDOMFunc>;
772
+ };
773
+ virtual: {
774
+ type: BooleanConstructor;
775
+ default: any;
776
+ };
777
+ dropdownMatchSelectWidth: {
778
+ type: PropType<number | boolean>;
779
+ default: any;
780
+ };
781
+ options: PropType<DefaultOptionType[]>;
782
+ showAction: {
783
+ type: PropType<("click" | "focus")[]>;
784
+ };
785
+ onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
786
+ loading: {
787
+ type: BooleanConstructor;
788
+ default: any;
789
+ };
790
+ placeholder: VueTypeValidableDef<any>;
791
+ clearIcon: VueTypeValidableDef<any>;
792
+ allowClear: {
793
+ type: BooleanConstructor;
794
+ default: any;
795
+ };
796
+ onSearch: PropType<(value: string) => void>;
797
+ fieldNames: PropType<FieldNames>;
798
+ dropdownStyle: {
799
+ type: PropType<CSSProperties>;
800
+ };
801
+ dropdownRender: {
802
+ type: PropType<DropdownRender>;
803
+ };
804
+ dropdownAlign: PropType<AlignType>;
805
+ showSearch: {
806
+ type: BooleanConstructor;
807
+ default: any;
808
+ };
809
+ searchValue: StringConstructor;
810
+ onInputKeyDown: PropType<(e: KeyboardEvent) => void>;
811
+ removeIcon: VueTypeValidableDef<any>;
812
+ maxTagCount: {
813
+ type: PropType<number | "responsive">;
814
+ };
815
+ maxTagTextLength: NumberConstructor;
816
+ maxTagPlaceholder: VueTypeValidableDef<any>;
817
+ tokenSeparators: {
818
+ type: PropType<string[]>;
819
+ };
820
+ tagRender: {
821
+ type: PropType<(props: CustomTagProps) => any>;
822
+ };
823
+ optionLabelRender: {
824
+ type: PropType<(option: Record<string, any>) => any>;
825
+ };
826
+ onClear: PropType<() => void>;
827
+ defaultOpen: {
828
+ type: BooleanConstructor;
829
+ default: any;
830
+ };
831
+ onDropdownVisibleChange: {
832
+ type: PropType<(open: boolean) => void>;
833
+ };
834
+ showArrow: {
835
+ type: BooleanConstructor;
836
+ default: any;
837
+ };
838
+ onPopupScroll: PropType<(e: UIEvent) => void>;
839
+ menuItemSelectedIcon: VueTypeValidableDef<any>;
840
+ listItemHeight: NumberConstructor;
841
+ inputValue: StringConstructor;
842
+ autoClearSearchValue: {
843
+ type: BooleanConstructor;
844
+ default: any;
845
+ };
846
+ filterOption: {
847
+ type: PropType<boolean | FilterFunc<DefaultOptionType>>;
848
+ default: any;
849
+ };
850
+ filterSort: PropType<(optionA: DefaultOptionType, optionB: DefaultOptionType) => number>;
851
+ optionFilterProp: StringConstructor;
852
+ optionLabelProp: StringConstructor;
853
+ defaultActiveFirstOption: {
854
+ type: BooleanConstructor;
855
+ default: any;
856
+ };
857
+ labelInValue: {
858
+ type: BooleanConstructor;
859
+ default: any;
860
+ };
861
+ }>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
862
+ size: ButtonSize;
863
+ value: SelectValue;
864
+ mode: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
865
+ open: boolean;
866
+ disabled: boolean;
867
+ autofocus: boolean;
868
+ virtual: boolean;
869
+ dropdownMatchSelectWidth: number | boolean;
870
+ status: "" | "error" | "warning";
871
+ defaultValue: SelectValue;
872
+ 'onUpdate:value': (val: SelectValue) => void;
873
+ placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
874
+ loading: boolean;
875
+ bordered: boolean;
876
+ allowClear: boolean;
877
+ showSearch: boolean;
878
+ choiceTransitionName: "";
879
+ defaultOpen: boolean;
880
+ showArrow: boolean;
881
+ autoClearSearchValue: boolean;
882
+ filterOption: boolean | FilterFunc<DefaultOptionType>;
883
+ defaultActiveFirstOption: boolean;
884
+ labelInValue: boolean;
885
+ onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
886
+ }> | null;
887
+ }, any>;
466
888
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
467
889
  export default _default;
468
890
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("lodash-unified"),w=require("@aplus-frontend/antdv");require("../../hooks/index.js");const k=require("../../utils/index.js"),T=require("../hooks/use-default-placeholder.js"),_=require("../hooks/use-options.js"),A=require("../../hooks/useControllableValue.js"),U={key:0},D=o.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean,default:void 0},placeholder:{},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},onBeforeSelect:{}},emits:["update:value"],setup(S,{expose:B,emit:g}){let r=0;const b=i.debounce(t=>{if(!i.isFunction(e.request))return;r+=1;const n=r;s([]),u.value=!0,e.request(t).then(l=>{r===n&&s(l)}).finally(()=>{u.value=!1})},300),e=S,C=(t,n)=>{var a;const l=((a=e.fieldNames)==null?void 0:a.label)||"label";return typeof(n==null?void 0:n[l])=="string"&&n[l].toLowerCase().indexOf(t.toLowerCase())>-1},{options:c,updateOptions:s}=_.default(e),f=o.ref(),u=o.ref((e==null?void 0:e.loading)||!1),F=g;async function p(t=!0){if(!i.isFunction(e.request))return;u.value=!0,r+=1;const n=r;try{t&&s([]);const l=await e.request();if(n!==r)return;s(l)}finally{u.value=!1}}function q(t){var n;(n=e.onFocus)==null||n.call(e,t),e.refetchOnFocus&&r>0&&!u.value&&p(!0)}o.onMounted(()=>{if(e.lazy){r+=1;return}p()});const{value:v,updateValue:x}=A.useControllableValue(e,F,{beforeUpdateValue:e.onBeforeSelect}),N=T.useDefaultPlaceholder("Select",e),O=o.computed(()=>{var d,h;const t=o.unref(v);if(!t)return e.emptyText;const n=((d=e.fieldNames)==null?void 0:d.label)||"label",l=((h=e.fieldNames)==null?void 0:h.value)||"value";if(i.isArray(t))return t.map(m=>{var y;return(y=o.unref(c).find(M=>M[l]===m))==null?void 0:y[n]}).filter(Boolean).join("、")||e.emptyText;const a=o.unref(c).find(m=>m[l]===t);return(a==null?void 0:a[n])||e.emptyText}),I=o.computed(()=>{const t=!!(e!=null&&e.showSearch),n=e.searchMode;let l={};return t&&(l=n==="request"?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:b,notFoundContent:u.value?void 0:null}:{showArrow:!0,filterOption:i.isNil(e==null?void 0:e.filterOption)?C:e==null?void 0:e.filterOption}),{...k.omitUndefined(i.omit(e,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus"])),placeholder:o.unref(N),...l}});function P(){var t;(t=f.value)==null||t.focus()}function V(){var t;(t=f.value)==null||t.blur()}return B({focus:P,blur:V,request:p}),(t,n)=>t.mode==="read"?(o.openBlock(),o.createElementBlock("span",U,o.toDisplayString(O.value),1)):(o.openBlock(),o.createBlock(o.unref(w.Select),o.mergeProps({key:1,ref_key:"selectRef",ref:f,"allow-clear":""},I.value,{mode:t.multiple?"multiple":void 0,value:o.unref(v),options:o.unref(c),loading:u.value,"onUpdate:value":o.unref(x),onFocus:q}),o.createSlots({_:2},[o.renderList(t.$slots,(l,a)=>({name:a,fn:o.withCtx(d=>[o.renderSlot(t.$slots,a,o.normalizeProps(o.guardReactiveProps(d||{})))])})),u.value?{name:"notFoundContent",fn:o.withCtx(()=>[o.createVNode(o.unref(w.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","options","loading","onUpdate:value"]))}});exports.default=D;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("lodash-unified"),S=require("@aplus-frontend/antdv");require("../../hooks/index.js");const k=require("../../utils/index.js"),T=require("../hooks/use-default-placeholder.js"),_=require("../hooks/use-options.js"),A=require("../../hooks/useControllableValue.js"),U={key:0},D=o.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},onBeforeSelect:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},onDeselect:{},loading:{type:Boolean,default:void 0},placeholder:{},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},emits:["update:value"],setup(w,{expose:B,emit:g}){let r=0;const b=i.debounce(t=>{if(!i.isFunction(e.request))return;r+=1;const n=r;s([]),u.value=!0,e.request(t).then(l=>{r===n&&s(l)}).finally(()=>{u.value=!1})},300),e=w,C=(t,n)=>{var a;const l=((a=e.fieldNames)==null?void 0:a.label)||"label";return typeof(n==null?void 0:n[l])=="string"&&n[l].toLowerCase().indexOf(t.toLowerCase())>-1},{options:c,updateOptions:s}=_.default(e),f=o.ref(),u=o.ref((e==null?void 0:e.loading)||!1),F=g;async function p(t=!0){if(!i.isFunction(e.request))return;u.value=!0,r+=1;const n=r;try{t&&s([]);const l=await e.request();if(n!==r)return;s(l)}finally{u.value=!1}}function q(t){var n;(n=e.onFocus)==null||n.call(e,t),e.refetchOnFocus&&r>0&&!u.value&&p(!0)}o.onMounted(()=>{if(e.lazy){r+=1;return}p()});const{value:v,updateValue:x}=A.useControllableValue(e,F,{beforeUpdateValue:e.onBeforeSelect}),N=T.useDefaultPlaceholder("Select",e),O=o.computed(()=>{var d,h;const t=o.unref(v);if(!t)return e.emptyText;const n=((d=e.fieldNames)==null?void 0:d.label)||"label",l=((h=e.fieldNames)==null?void 0:h.value)||"value";if(i.isArray(t))return t.map(m=>{var y;return(y=o.unref(c).find(M=>M[l]===m))==null?void 0:y[n]}).filter(Boolean).join("、")||e.emptyText;const a=o.unref(c).find(m=>m[l]===t);return(a==null?void 0:a[n])||e.emptyText}),I=o.computed(()=>{const t=!!(e!=null&&e.showSearch),n=e.searchMode;let l={};return t&&(l=n==="request"?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:b,notFoundContent:u.value?void 0:null}:{showArrow:!0,filterOption:i.isNil(e==null?void 0:e.filterOption)?C:e==null?void 0:e.filterOption}),{...k.omitUndefined(i.omit(e,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus","onBeforeSelect"])),placeholder:o.unref(N),...l}});function P(){var t;(t=f.value)==null||t.focus()}function V(){var t;(t=f.value)==null||t.blur()}return B({focus:P,blur:V,request:p}),(t,n)=>t.mode==="read"?(o.openBlock(),o.createElementBlock("span",U,o.toDisplayString(O.value),1)):(o.openBlock(),o.createBlock(o.unref(S.Select),o.mergeProps({key:1,ref_key:"selectRef",ref:f,"allow-clear":""},I.value,{mode:t.multiple?"multiple":void 0,value:o.unref(v),options:o.unref(c),loading:u.value,"onUpdate:value":o.unref(x),onFocus:q}),o.createSlots({_:2},[o.renderList(t.$slots,(l,a)=>({name:a,fn:o.withCtx(d=>[o.renderSlot(t.$slots,a,o.normalizeProps(o.guardReactiveProps(d||{})))])})),u.value?{name:"notFoundContent",fn:o.withCtx(()=>[o.createVNode(o.unref(S.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","options","loading","onUpdate:value"]))}});exports.default=D;