@aplus-frontend/ui 0.4.1 → 0.4.3

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