primevue 4.3.2 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordionheader/AccordionHeader.vue +1 -1
- package/accordionheader/index.d.ts +6 -1
- package/accordionheader/index.mjs +1 -1
- package/accordionheader/index.mjs.map +1 -1
- package/autocomplete/AutoComplete.vue +60 -11
- package/autocomplete/index.d.ts +4 -0
- package/autocomplete/index.mjs +96 -59
- package/autocomplete/index.mjs.map +1 -1
- package/cascadeselect/CascadeSelect.vue +4 -1
- package/cascadeselect/CascadeSelectSub.vue +1 -1
- package/cascadeselect/index.mjs +22 -20
- package/cascadeselect/index.mjs.map +1 -1
- package/checkbox/Checkbox.vue +1 -1
- package/checkbox/index.mjs +2 -1
- package/checkbox/index.mjs.map +1 -1
- package/chip/BaseChip.vue +1 -1
- package/chip/index.d.ts +1 -1
- package/chip/index.mjs +1 -1
- package/chip/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +5 -1
- package/colorpicker/index.mjs +5 -1
- package/colorpicker/index.mjs.map +1 -1
- package/confirmationoptions/index.d.ts +1 -1
- package/confirmdialog/index.d.ts +4 -0
- package/contextmenu/index.mjs +12 -12
- package/contextmenu/index.mjs.map +1 -1
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +3 -3
- package/datatable/DataTable.vue +103 -44
- package/datatable/HeaderCheckbox.vue +2 -2
- package/datatable/RowCheckbox.vue +1 -1
- package/datatable/TableBody.vue +12 -1
- package/datatable/TableFooter.vue +9 -1
- package/datatable/TableHeader.vue +9 -2
- package/datatable/index.d.ts +37 -29
- package/datatable/index.mjs +175 -111
- package/datatable/index.mjs.map +1 -1
- package/datatable/style/index.mjs +4 -4
- package/datatable/style/index.mjs.map +1 -1
- package/dataview/DataView.vue +4 -0
- package/dataview/index.d.ts +63 -6
- package/dataview/index.mjs +6 -2
- package/dataview/index.mjs.map +1 -1
- package/datepicker/DatePicker.vue +379 -236
- package/datepicker/index.d.ts +156 -0
- package/datepicker/index.mjs +676 -406
- package/datepicker/index.mjs.map +1 -1
- package/drawer/Drawer.vue +30 -20
- package/drawer/index.d.ts +10 -0
- package/drawer/index.mjs +42 -25
- package/drawer/index.mjs.map +1 -1
- package/fileupload/FileUpload.vue +3 -4
- package/fileupload/index.mjs +8 -10
- package/fileupload/index.mjs.map +1 -1
- package/galleria/Galleria.vue +39 -3
- package/galleria/index.mjs +40 -3
- package/galleria/index.mjs.map +1 -1
- package/image/Image.vue +1 -1
- package/image/index.mjs +1 -1
- package/image/index.mjs.map +1 -1
- package/inplace/Inplace.vue +1 -1
- package/inplace/index.mjs +3 -2
- package/inplace/index.mjs.map +1 -1
- package/inputmask/InputMask.vue +3 -3
- package/inputmask/index.d.ts +3 -3
- package/inputmask/index.mjs +3 -3
- package/inputmask/index.mjs.map +1 -1
- package/inputnumber/BaseInputNumber.vue +4 -0
- package/inputnumber/InputNumber.vue +3 -10
- package/inputnumber/index.mjs +8 -9
- package/inputnumber/index.mjs.map +1 -1
- package/keyfilter/index.mjs +12 -19
- package/keyfilter/index.mjs.map +1 -1
- package/listbox/Listbox.vue +10 -2
- package/listbox/index.mjs +38 -29
- package/listbox/index.mjs.map +1 -1
- package/megamenu/index.d.ts +1 -1
- package/megamenu/index.mjs +11 -11
- package/megamenu/index.mjs.map +1 -1
- package/menu/Menu.vue +12 -6
- package/menu/Menuitem.vue +14 -4
- package/menu/index.d.ts +3 -12
- package/menu/index.mjs +40 -20
- package/menu/index.mjs.map +1 -1
- package/menubar/index.mjs +16 -16
- package/menubar/index.mjs.map +1 -1
- package/metergroup/MeterGroup.vue +9 -3
- package/metergroup/MeterGroupLabel.vue +10 -1
- package/metergroup/index.d.ts +1 -1
- package/metergroup/index.mjs +32 -7
- package/metergroup/index.mjs.map +1 -1
- package/multiselect/MultiSelect.vue +40 -6
- package/multiselect/index.d.ts +1 -1
- package/multiselect/index.mjs +100 -68
- package/multiselect/index.mjs.map +1 -1
- package/organizationchart/OrganizationChartNode.vue +1 -1
- package/organizationchart/index.mjs.map +1 -1
- package/organizationchart/style/index.mjs +11 -6
- package/organizationchart/style/index.mjs.map +1 -1
- package/package.json +6 -6
- package/paginator/Paginator.vue +2 -0
- package/paginator/index.d.ts +8 -0
- package/paginator/index.mjs +3 -1
- package/paginator/index.mjs.map +1 -1
- package/panel/Panel.vue +2 -2
- package/panel/index.mjs +2 -2
- package/panel/index.mjs.map +1 -1
- package/panelmenu/PanelMenuList.vue +1 -1
- package/panelmenu/index.mjs +4 -4
- package/panelmenu/index.mjs.map +1 -1
- package/password/Password.vue +28 -6
- package/password/index.mjs +44 -16
- package/password/index.mjs.map +1 -1
- package/popover/Popover.vue +1 -1
- package/popover/index.mjs +1 -2
- package/popover/index.mjs.map +1 -1
- package/progressbar/ProgressBar.vue +4 -4
- package/progressbar/index.mjs +8 -12
- package/progressbar/index.mjs.map +1 -1
- package/scrolltop/ScrollTop.vue +2 -2
- package/scrolltop/index.mjs +4 -2
- package/scrolltop/index.mjs.map +1 -1
- package/select/Select.vue +68 -13
- package/select/index.mjs +128 -77
- package/select/index.mjs.map +1 -1
- package/selectbutton/index.d.ts +0 -24
- package/splitter/Splitter.vue +10 -2
- package/splitter/index.d.ts +1 -1
- package/splitter/index.mjs +19 -7
- package/splitter/index.mjs.map +1 -1
- package/splitter/style/index.mjs +1 -13
- package/splitter/style/index.mjs.map +1 -1
- package/step/Step.vue +27 -9
- package/step/index.mjs +46 -16
- package/step/index.mjs.map +1 -1
- package/steppanel/StepPanel.vue +11 -5
- package/steppanel/index.d.ts +8 -0
- package/steppanel/index.mjs +25 -10
- package/steppanel/index.mjs.map +1 -1
- package/stepper/StepperSeparator.vue +5 -2
- package/tab/Tab.vue +4 -4
- package/tab/index.mjs +4 -4
- package/tab/index.mjs.map +1 -1
- package/tablist/TabList.vue +3 -0
- package/tablist/index.mjs +1 -0
- package/tablist/index.mjs.map +1 -1
- package/tabpanel/TabPanel.vue +2 -2
- package/tabpanel/index.mjs +2 -2
- package/tabpanel/index.mjs.map +1 -1
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/index.mjs +13 -14
- package/tieredmenu/index.mjs.map +1 -1
- package/tooltip/index.mjs +47 -30
- package/tooltip/index.mjs.map +1 -1
- package/tree/Tree.vue +14 -2
- package/tree/TreeNode.vue +2 -2
- package/tree/index.mjs +28 -10
- package/tree/index.mjs.map +1 -1
- package/treeselect/TreeSelect.vue +4 -1
- package/treeselect/index.mjs +4 -2
- package/treeselect/index.mjs.map +1 -1
- package/umd/primevue.min.js +12213 -1
- package/virtualscroller/VirtualScroller.vue +13 -2
- package/virtualscroller/index.mjs +28 -18
- package/virtualscroller/index.mjs.map +1 -1
- package/virtualscroller/style/index.mjs +1 -1
- package/virtualscroller/style/index.mjs.map +1 -1
- package/web-types.json +1 -1
package/select/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cn } from '@primeuix/utils';
|
|
1
2
|
import { findSingle, getFocusableElements, isVisible, focus, isTouchDevice, relativePosition, getOuterWidth, absolutePosition, addStyle, getLastFocusableElement, getFirstFocusableElement, isAndroid } from '@primeuix/utils/dom';
|
|
2
3
|
import { isNotEmpty, findLastIndex, equals, isPrintableCharacter, resolveFieldData } from '@primeuix/utils/object';
|
|
3
4
|
import { ZIndex } from '@primeuix/utils/zindex';
|
|
@@ -18,7 +19,7 @@ import Ripple from 'primevue/ripple';
|
|
|
18
19
|
import VirtualScroller from 'primevue/virtualscroller';
|
|
19
20
|
import BaseInput from '@primevue/core/baseinput';
|
|
20
21
|
import SelectStyle from 'primevue/select/style';
|
|
21
|
-
import { resolveComponent, resolveDirective, createElementBlock, openBlock, mergeProps, renderSlot, createCommentVNode, createElementVNode, createVNode, createTextVNode, toDisplayString, normalizeClass, createBlock, resolveDynamicComponent, withCtx, Transition, normalizeProps, createSlots, Fragment, renderList, withDirectives } from 'vue';
|
|
22
|
+
import { resolveComponent, resolveDirective, createElementBlock, openBlock, mergeProps, renderSlot, createCommentVNode, createElementVNode, createVNode, createTextVNode, toDisplayString, normalizeClass, createBlock, resolveDynamicComponent, withCtx, Transition, normalizeProps, createSlots, Fragment, renderList, withDirectives, withModifiers } from 'vue';
|
|
22
23
|
|
|
23
24
|
var script$1 = {
|
|
24
25
|
name: 'BaseSelect',
|
|
@@ -344,18 +345,35 @@ var script = {
|
|
|
344
345
|
this.$emit('focus', event);
|
|
345
346
|
},
|
|
346
347
|
onBlur: function onBlur(event) {
|
|
347
|
-
var
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
348
|
+
var _this3 = this;
|
|
349
|
+
setTimeout(function () {
|
|
350
|
+
var _this3$formField$onBl, _this3$formField;
|
|
351
|
+
_this3.focused = false;
|
|
352
|
+
_this3.focusedOptionIndex = -1;
|
|
353
|
+
_this3.searchValue = '';
|
|
354
|
+
_this3.$emit('blur', event);
|
|
355
|
+
(_this3$formField$onBl = (_this3$formField = _this3.formField).onBlur) === null || _this3$formField$onBl === void 0 || _this3$formField$onBl.call(_this3$formField, event);
|
|
356
|
+
}, 100);
|
|
353
357
|
},
|
|
354
358
|
onKeyDown: function onKeyDown(event) {
|
|
355
|
-
if (this.disabled
|
|
359
|
+
if (this.disabled) {
|
|
356
360
|
event.preventDefault();
|
|
357
361
|
return;
|
|
358
362
|
}
|
|
363
|
+
if (isAndroid()) {
|
|
364
|
+
switch (event.code) {
|
|
365
|
+
case 'Backspace':
|
|
366
|
+
this.onBackspaceKey(event, this.editable);
|
|
367
|
+
break;
|
|
368
|
+
case 'Enter':
|
|
369
|
+
case 'NumpadDecimal':
|
|
370
|
+
this.onEnterKey(event);
|
|
371
|
+
break;
|
|
372
|
+
default:
|
|
373
|
+
event.preventDefault();
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
359
377
|
var metaKey = event.metaKey || event.ctrlKey;
|
|
360
378
|
switch (event.code) {
|
|
361
379
|
case 'ArrowDown':
|
|
@@ -627,18 +645,20 @@ var script = {
|
|
|
627
645
|
}
|
|
628
646
|
},
|
|
629
647
|
onOverlayEnter: function onOverlayEnter(el) {
|
|
630
|
-
var
|
|
648
|
+
var _this4 = this;
|
|
631
649
|
ZIndex.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
632
650
|
addStyle(el, {
|
|
633
651
|
position: 'absolute',
|
|
634
|
-
top: '0'
|
|
635
|
-
left: '0'
|
|
652
|
+
top: '0'
|
|
636
653
|
});
|
|
637
654
|
this.alignOverlay();
|
|
638
655
|
this.scrollInView();
|
|
656
|
+
|
|
657
|
+
// Issue: #7508
|
|
658
|
+
this.$attrSelector && el.setAttribute(this.$attrSelector, '');
|
|
639
659
|
setTimeout(function () {
|
|
640
|
-
|
|
641
|
-
|
|
660
|
+
_this4.autoFilterFocus && _this4.filter && focus(_this4.$refs.filterInput.$el);
|
|
661
|
+
_this4.autoUpdateModel();
|
|
642
662
|
}, 1);
|
|
643
663
|
},
|
|
644
664
|
onOverlayAfterEnter: function onOverlayAfterEnter() {
|
|
@@ -648,14 +668,14 @@ var script = {
|
|
|
648
668
|
this.$emit('show');
|
|
649
669
|
},
|
|
650
670
|
onOverlayLeave: function onOverlayLeave() {
|
|
651
|
-
var
|
|
671
|
+
var _this5 = this;
|
|
652
672
|
this.unbindOutsideClickListener();
|
|
653
673
|
this.unbindScrollListener();
|
|
654
674
|
this.unbindResizeListener();
|
|
655
675
|
if (this.autoFilterFocus && this.filter && !this.editable) {
|
|
656
676
|
this.$nextTick(function () {
|
|
657
|
-
if (
|
|
658
|
-
focus(
|
|
677
|
+
if (_this5.$refs.filterInput) {
|
|
678
|
+
focus(_this5.$refs.filterInput.$el);
|
|
659
679
|
}
|
|
660
680
|
});
|
|
661
681
|
}
|
|
@@ -676,11 +696,12 @@ var script = {
|
|
|
676
696
|
}
|
|
677
697
|
},
|
|
678
698
|
bindOutsideClickListener: function bindOutsideClickListener() {
|
|
679
|
-
var
|
|
699
|
+
var _this6 = this;
|
|
680
700
|
if (!this.outsideClickListener) {
|
|
681
701
|
this.outsideClickListener = function (event) {
|
|
682
|
-
|
|
683
|
-
|
|
702
|
+
var composedPath = event.composedPath();
|
|
703
|
+
if (_this6.overlayVisible && _this6.overlay && !composedPath.includes(_this6.$el) && !composedPath.includes(_this6.overlay)) {
|
|
704
|
+
_this6.hide();
|
|
684
705
|
}
|
|
685
706
|
};
|
|
686
707
|
document.addEventListener('click', this.outsideClickListener, true);
|
|
@@ -693,11 +714,11 @@ var script = {
|
|
|
693
714
|
}
|
|
694
715
|
},
|
|
695
716
|
bindScrollListener: function bindScrollListener() {
|
|
696
|
-
var
|
|
717
|
+
var _this7 = this;
|
|
697
718
|
if (!this.scrollHandler) {
|
|
698
719
|
this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function () {
|
|
699
|
-
if (
|
|
700
|
-
|
|
720
|
+
if (_this7.overlayVisible) {
|
|
721
|
+
_this7.hide();
|
|
701
722
|
}
|
|
702
723
|
});
|
|
703
724
|
}
|
|
@@ -709,11 +730,11 @@ var script = {
|
|
|
709
730
|
}
|
|
710
731
|
},
|
|
711
732
|
bindResizeListener: function bindResizeListener() {
|
|
712
|
-
var
|
|
733
|
+
var _this8 = this;
|
|
713
734
|
if (!this.resizeListener) {
|
|
714
735
|
this.resizeListener = function () {
|
|
715
|
-
if (
|
|
716
|
-
|
|
736
|
+
if (_this8.overlayVisible && !isTouchDevice()) {
|
|
737
|
+
_this8.hide();
|
|
717
738
|
}
|
|
718
739
|
};
|
|
719
740
|
window.addEventListener('resize', this.resizeListener);
|
|
@@ -726,12 +747,12 @@ var script = {
|
|
|
726
747
|
}
|
|
727
748
|
},
|
|
728
749
|
bindLabelClickListener: function bindLabelClickListener() {
|
|
729
|
-
var
|
|
750
|
+
var _this9 = this;
|
|
730
751
|
if (!this.editable && !this.labelClickListener) {
|
|
731
752
|
var label = document.querySelector("label[for=\"".concat(this.labelId, "\"]"));
|
|
732
753
|
if (label && isVisible(label)) {
|
|
733
754
|
this.labelClickListener = function () {
|
|
734
|
-
focus(
|
|
755
|
+
focus(_this9.$refs.focusInput);
|
|
735
756
|
};
|
|
736
757
|
label.addEventListener('click', this.labelClickListener);
|
|
737
758
|
}
|
|
@@ -746,12 +767,12 @@ var script = {
|
|
|
746
767
|
}
|
|
747
768
|
},
|
|
748
769
|
bindMatchMediaOrientationListener: function bindMatchMediaOrientationListener() {
|
|
749
|
-
var
|
|
770
|
+
var _this0 = this;
|
|
750
771
|
if (!this.matchMediaOrientationListener) {
|
|
751
772
|
var query = matchMedia("(orientation: portrait)");
|
|
752
773
|
this.queryOrientation = query;
|
|
753
774
|
this.matchMediaOrientationListener = function () {
|
|
754
|
-
|
|
775
|
+
_this0.alignOverlay();
|
|
755
776
|
};
|
|
756
777
|
this.queryOrientation.addEventListener('change', this.matchMediaOrientationListener);
|
|
757
778
|
}
|
|
@@ -784,35 +805,35 @@ var script = {
|
|
|
784
805
|
return equals(this.d_value, this.getOptionValue(option), this.equalityKey);
|
|
785
806
|
},
|
|
786
807
|
findFirstOptionIndex: function findFirstOptionIndex() {
|
|
787
|
-
var
|
|
808
|
+
var _this1 = this;
|
|
788
809
|
return this.visibleOptions.findIndex(function (option) {
|
|
789
|
-
return
|
|
810
|
+
return _this1.isValidOption(option);
|
|
790
811
|
});
|
|
791
812
|
},
|
|
792
813
|
findLastOptionIndex: function findLastOptionIndex() {
|
|
793
|
-
var
|
|
814
|
+
var _this10 = this;
|
|
794
815
|
return findLastIndex(this.visibleOptions, function (option) {
|
|
795
|
-
return
|
|
816
|
+
return _this10.isValidOption(option);
|
|
796
817
|
});
|
|
797
818
|
},
|
|
798
819
|
findNextOptionIndex: function findNextOptionIndex(index) {
|
|
799
|
-
var
|
|
820
|
+
var _this11 = this;
|
|
800
821
|
var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
801
|
-
return
|
|
822
|
+
return _this11.isValidOption(option);
|
|
802
823
|
}) : -1;
|
|
803
824
|
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
804
825
|
},
|
|
805
826
|
findPrevOptionIndex: function findPrevOptionIndex(index) {
|
|
806
|
-
var
|
|
827
|
+
var _this12 = this;
|
|
807
828
|
var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
|
|
808
|
-
return
|
|
829
|
+
return _this12.isValidOption(option);
|
|
809
830
|
}) : -1;
|
|
810
831
|
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
811
832
|
},
|
|
812
833
|
findSelectedOptionIndex: function findSelectedOptionIndex() {
|
|
813
|
-
var
|
|
834
|
+
var _this13 = this;
|
|
814
835
|
return this.$filled ? this.visibleOptions.findIndex(function (option) {
|
|
815
|
-
return
|
|
836
|
+
return _this13.isValidSelectedOption(option);
|
|
816
837
|
}) : -1;
|
|
817
838
|
},
|
|
818
839
|
findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
|
|
@@ -824,17 +845,17 @@ var script = {
|
|
|
824
845
|
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
825
846
|
},
|
|
826
847
|
searchOptions: function searchOptions(event, _char) {
|
|
827
|
-
var
|
|
848
|
+
var _this14 = this;
|
|
828
849
|
this.searchValue = (this.searchValue || '') + _char;
|
|
829
850
|
var optionIndex = -1;
|
|
830
851
|
var matched = false;
|
|
831
852
|
if (isNotEmpty(this.searchValue)) {
|
|
832
853
|
optionIndex = this.visibleOptions.findIndex(function (option) {
|
|
833
|
-
return
|
|
854
|
+
return _this14.isOptionExactMatched(option);
|
|
834
855
|
});
|
|
835
856
|
if (optionIndex === -1) {
|
|
836
857
|
optionIndex = this.visibleOptions.findIndex(function (option) {
|
|
837
|
-
return
|
|
858
|
+
return _this14.isOptionStartsWith(option);
|
|
838
859
|
});
|
|
839
860
|
}
|
|
840
861
|
if (optionIndex !== -1) {
|
|
@@ -851,8 +872,8 @@ var script = {
|
|
|
851
872
|
clearTimeout(this.searchTimeout);
|
|
852
873
|
}
|
|
853
874
|
this.searchTimeout = setTimeout(function () {
|
|
854
|
-
|
|
855
|
-
|
|
875
|
+
_this14.searchValue = '';
|
|
876
|
+
_this14.searchTimeout = null;
|
|
856
877
|
}, 500);
|
|
857
878
|
return matched;
|
|
858
879
|
},
|
|
@@ -866,18 +887,18 @@ var script = {
|
|
|
866
887
|
}
|
|
867
888
|
},
|
|
868
889
|
scrollInView: function scrollInView() {
|
|
869
|
-
var
|
|
890
|
+
var _this15 = this;
|
|
870
891
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
871
892
|
this.$nextTick(function () {
|
|
872
|
-
var id = index !== -1 ? "".concat(
|
|
873
|
-
var element = findSingle(
|
|
893
|
+
var id = index !== -1 ? "".concat(_this15.$id, "_").concat(index) : _this15.focusedOptionId;
|
|
894
|
+
var element = findSingle(_this15.list, "li[id=\"".concat(id, "\"]"));
|
|
874
895
|
if (element) {
|
|
875
896
|
element.scrollIntoView && element.scrollIntoView({
|
|
876
897
|
block: 'nearest',
|
|
877
898
|
inline: 'nearest'
|
|
878
899
|
});
|
|
879
|
-
} else if (!
|
|
880
|
-
|
|
900
|
+
} else if (!_this15.virtualScrollerDisabled) {
|
|
901
|
+
_this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex);
|
|
881
902
|
}
|
|
882
903
|
});
|
|
883
904
|
},
|
|
@@ -897,14 +918,14 @@ var script = {
|
|
|
897
918
|
});
|
|
898
919
|
},
|
|
899
920
|
flatOptions: function flatOptions(options) {
|
|
900
|
-
var
|
|
921
|
+
var _this16 = this;
|
|
901
922
|
return (options || []).reduce(function (result, option, index) {
|
|
902
923
|
result.push({
|
|
903
924
|
optionGroup: option,
|
|
904
925
|
group: true,
|
|
905
926
|
index: index
|
|
906
927
|
});
|
|
907
|
-
var optionGroupChildren =
|
|
928
|
+
var optionGroupChildren = _this16.getOptionGroupChildren(option);
|
|
908
929
|
optionGroupChildren && optionGroupChildren.forEach(function (o) {
|
|
909
930
|
return result.push(o);
|
|
910
931
|
});
|
|
@@ -924,7 +945,7 @@ var script = {
|
|
|
924
945
|
},
|
|
925
946
|
computed: {
|
|
926
947
|
visibleOptions: function visibleOptions() {
|
|
927
|
-
var
|
|
948
|
+
var _this17 = this;
|
|
928
949
|
var options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
|
|
929
950
|
if (this.filterValue) {
|
|
930
951
|
var filteredOptions = FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
@@ -932,11 +953,11 @@ var script = {
|
|
|
932
953
|
var optionGroups = this.options || [];
|
|
933
954
|
var filtered = [];
|
|
934
955
|
optionGroups.forEach(function (group) {
|
|
935
|
-
var groupChildren =
|
|
956
|
+
var groupChildren = _this17.getOptionGroupChildren(group);
|
|
936
957
|
var filteredItems = groupChildren.filter(function (item) {
|
|
937
958
|
return filteredOptions.includes(item);
|
|
938
959
|
});
|
|
939
|
-
if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof
|
|
960
|
+
if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof _this17.optionGroupChildren === 'string' ? _this17.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
|
|
940
961
|
});
|
|
941
962
|
return this.flatOptions(filtered);
|
|
942
963
|
}
|
|
@@ -987,9 +1008,9 @@ var script = {
|
|
|
987
1008
|
return this.focusedOptionIndex !== -1 ? "".concat(this.$id, "_").concat(this.focusedOptionIndex) : null;
|
|
988
1009
|
},
|
|
989
1010
|
ariaSetSize: function ariaSetSize() {
|
|
990
|
-
var
|
|
1011
|
+
var _this18 = this;
|
|
991
1012
|
return this.visibleOptions.filter(function (option) {
|
|
992
|
-
return !
|
|
1013
|
+
return !_this18.isOptionGroup(option);
|
|
993
1014
|
}).length;
|
|
994
1015
|
},
|
|
995
1016
|
isClearIconVisible: function isClearIconVisible() {
|
|
@@ -997,6 +1018,29 @@ var script = {
|
|
|
997
1018
|
},
|
|
998
1019
|
virtualScrollerDisabled: function virtualScrollerDisabled() {
|
|
999
1020
|
return !this.virtualScrollerOptions;
|
|
1021
|
+
},
|
|
1022
|
+
containerDataP: function containerDataP() {
|
|
1023
|
+
return cn(_defineProperty({
|
|
1024
|
+
invalid: this.$invalid,
|
|
1025
|
+
disabled: this.disabled,
|
|
1026
|
+
focus: this.focused,
|
|
1027
|
+
fluid: this.$fluid,
|
|
1028
|
+
filled: this.$variant === 'filled'
|
|
1029
|
+
}, this.size, this.size));
|
|
1030
|
+
},
|
|
1031
|
+
labelDataP: function labelDataP() {
|
|
1032
|
+
return cn(_defineProperty(_defineProperty({
|
|
1033
|
+
placeholder: !this.editable && this.label === this.placeholder,
|
|
1034
|
+
clearable: this.showClear,
|
|
1035
|
+
disabled: this.disabled,
|
|
1036
|
+
editable: this.editable
|
|
1037
|
+
}, this.size, this.size), "empty", !this.editable && !this.$slots['value'] && (this.label === 'p-emptylabel' || this.label.length === 0)));
|
|
1038
|
+
},
|
|
1039
|
+
dropdownIconDataP: function dropdownIconDataP() {
|
|
1040
|
+
return cn(_defineProperty({}, this.size, this.size));
|
|
1041
|
+
},
|
|
1042
|
+
overlayDataP: function overlayDataP() {
|
|
1043
|
+
return cn(_defineProperty({}, 'portal-' + this.appendTo, 'portal-' + this.appendTo));
|
|
1000
1044
|
}
|
|
1001
1045
|
},
|
|
1002
1046
|
directives: {
|
|
@@ -1017,12 +1061,13 @@ var script = {
|
|
|
1017
1061
|
}
|
|
1018
1062
|
};
|
|
1019
1063
|
|
|
1020
|
-
var _hoisted_1 = ["id"];
|
|
1021
|
-
var _hoisted_2 = ["name", "id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"];
|
|
1022
|
-
var _hoisted_3 = ["name", "id", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "aria-disabled"];
|
|
1023
|
-
var _hoisted_4 = ["
|
|
1064
|
+
var _hoisted_1 = ["id", "data-p"];
|
|
1065
|
+
var _hoisted_2 = ["name", "id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "data-p"];
|
|
1066
|
+
var _hoisted_3 = ["name", "id", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "aria-disabled", "data-p"];
|
|
1067
|
+
var _hoisted_4 = ["data-p"];
|
|
1024
1068
|
var _hoisted_5 = ["id"];
|
|
1025
|
-
var _hoisted_6 = ["id"
|
|
1069
|
+
var _hoisted_6 = ["id"];
|
|
1070
|
+
var _hoisted_7 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onMousedown", "onMousemove", "data-p-selected", "data-p-focused", "data-p-disabled"];
|
|
1026
1071
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1027
1072
|
var _component_SpinnerIcon = resolveComponent("SpinnerIcon");
|
|
1028
1073
|
var _component_InputText = resolveComponent("InputText");
|
|
@@ -1038,9 +1083,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1038
1083
|
ref: "container",
|
|
1039
1084
|
id: _ctx.$id,
|
|
1040
1085
|
"class": _ctx.cx('root'),
|
|
1041
|
-
onClick: _cache[
|
|
1086
|
+
onClick: _cache[12] || (_cache[12] = function () {
|
|
1042
1087
|
return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);
|
|
1043
|
-
})
|
|
1088
|
+
}),
|
|
1089
|
+
"data-p": $options.containerDataP
|
|
1044
1090
|
}, _ctx.ptmi('root')), [_ctx.editable ? (openBlock(), createElementBlock("input", mergeProps({
|
|
1045
1091
|
key: 0,
|
|
1046
1092
|
ref: "focusInput",
|
|
@@ -1073,7 +1119,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1073
1119
|
}),
|
|
1074
1120
|
onInput: _cache[3] || (_cache[3] = function () {
|
|
1075
1121
|
return $options.onEditableInput && $options.onEditableInput.apply($options, arguments);
|
|
1076
|
-
})
|
|
1122
|
+
}),
|
|
1123
|
+
"data-p": $options.labelDataP
|
|
1077
1124
|
}, _ctx.ptm('label')), null, 16, _hoisted_2)) : (openBlock(), createElementBlock("span", mergeProps({
|
|
1078
1125
|
key: 1,
|
|
1079
1126
|
ref: "focusInput",
|
|
@@ -1099,7 +1146,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1099
1146
|
}),
|
|
1100
1147
|
onKeydown: _cache[6] || (_cache[6] = function () {
|
|
1101
1148
|
return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);
|
|
1102
|
-
})
|
|
1149
|
+
}),
|
|
1150
|
+
"data-p": $options.labelDataP
|
|
1103
1151
|
}, _ctx.ptm('label')), [renderSlot(_ctx.$slots, "value", {
|
|
1104
1152
|
value: _ctx.d_value,
|
|
1105
1153
|
placeholder: _ctx.placeholder
|
|
@@ -1140,8 +1188,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1140
1188
|
}, function () {
|
|
1141
1189
|
return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({
|
|
1142
1190
|
"class": [_ctx.cx('dropdownIcon'), _ctx.dropdownIcon],
|
|
1143
|
-
"aria-hidden": "true"
|
|
1144
|
-
|
|
1191
|
+
"aria-hidden": "true",
|
|
1192
|
+
"data-p": $options.dropdownIconDataP
|
|
1193
|
+
}, _ctx.ptm('dropdownIcon')), null, 16, ["class", "data-p"]))];
|
|
1145
1194
|
})], 16), createVNode(_component_Portal, {
|
|
1146
1195
|
appendTo: _ctx.appendTo
|
|
1147
1196
|
}, {
|
|
@@ -1159,12 +1208,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1159
1208
|
ref: $options.overlayRef,
|
|
1160
1209
|
"class": [_ctx.cx('overlay'), _ctx.panelClass, _ctx.overlayClass],
|
|
1161
1210
|
style: [_ctx.panelStyle, _ctx.overlayStyle],
|
|
1162
|
-
onClick: _cache[
|
|
1211
|
+
onClick: _cache[10] || (_cache[10] = function () {
|
|
1163
1212
|
return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);
|
|
1164
1213
|
}),
|
|
1165
|
-
onKeydown: _cache[
|
|
1214
|
+
onKeydown: _cache[11] || (_cache[11] = function () {
|
|
1166
1215
|
return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
|
|
1167
|
-
})
|
|
1216
|
+
}),
|
|
1217
|
+
"data-p": $options.overlayDataP
|
|
1168
1218
|
}, _ctx.ptm('overlay')), [createElementVNode("span", mergeProps({
|
|
1169
1219
|
ref: "firstHiddenFocusableElementOnOverlay",
|
|
1170
1220
|
role: "presentation",
|
|
@@ -1284,7 +1334,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1284
1334
|
"class": _ctx.cx('optionGroupLabel'),
|
|
1285
1335
|
ref_for: true
|
|
1286
1336
|
}, _ctx.ptm('optionGroupLabel')), toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 17)];
|
|
1287
|
-
})], 16,
|
|
1337
|
+
})], 16, _hoisted_6)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({
|
|
1288
1338
|
key: 1,
|
|
1289
1339
|
id: _ctx.$id + '_' + $options.getOptionIndex(i, getItemOptions),
|
|
1290
1340
|
"class": _ctx.cx('option', {
|
|
@@ -1300,13 +1350,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1300
1350
|
"aria-disabled": $options.isOptionDisabled(option),
|
|
1301
1351
|
"aria-setsize": $options.ariaSetSize,
|
|
1302
1352
|
"aria-posinset": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),
|
|
1303
|
-
|
|
1353
|
+
onMousedown: function onMousedown($event) {
|
|
1304
1354
|
return $options.onOptionSelect($event, option);
|
|
1305
1355
|
},
|
|
1306
1356
|
onMousemove: function onMousemove($event) {
|
|
1307
1357
|
return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions));
|
|
1308
1358
|
},
|
|
1309
|
-
|
|
1359
|
+
onClick: _cache[8] || (_cache[8] = withModifiers(function () {}, ["stop"])),
|
|
1360
|
+
"data-p-selected": !_ctx.checkmark && $options.isSelected(option),
|
|
1310
1361
|
"data-p-focused": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions),
|
|
1311
1362
|
"data-p-disabled": $options.isOptionDisabled(option),
|
|
1312
1363
|
ref_for: true
|
|
@@ -1329,7 +1380,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1329
1380
|
"class": _ctx.cx('optionLabel'),
|
|
1330
1381
|
ref_for: true
|
|
1331
1382
|
}, _ctx.ptm('optionLabel')), toDisplayString($options.getOptionLabel(option)), 17)];
|
|
1332
|
-
})], 16,
|
|
1383
|
+
})], 16, _hoisted_7)), [[_directive_ripple]])], 64);
|
|
1333
1384
|
}), 128)), $data.filterValue && (!items || items && items.length === 0) ? (openBlock(), createElementBlock("li", mergeProps({
|
|
1334
1385
|
key: 0,
|
|
1335
1386
|
"class": _ctx.cx('emptyMessage'),
|
|
@@ -1346,7 +1397,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1346
1397
|
"data-p-hidden-accessible": true
|
|
1347
1398
|
}), [renderSlot(_ctx.$slots, "empty", {}, function () {
|
|
1348
1399
|
return [createTextVNode(toDisplayString($options.emptyMessageText), 1)];
|
|
1349
|
-
})], 16)) : createCommentVNode("", true)], 16,
|
|
1400
|
+
})], 16)) : createCommentVNode("", true)], 16, _hoisted_5)];
|
|
1350
1401
|
}),
|
|
1351
1402
|
_: 2
|
|
1352
1403
|
}, [_ctx.$slots.loader ? {
|
|
@@ -1380,13 +1431,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1380
1431
|
"aria-hidden": "true",
|
|
1381
1432
|
"class": "p-hidden-accessible p-hidden-focusable",
|
|
1382
1433
|
tabindex: 0,
|
|
1383
|
-
onFocus: _cache[
|
|
1434
|
+
onFocus: _cache[9] || (_cache[9] = function () {
|
|
1384
1435
|
return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments);
|
|
1385
1436
|
})
|
|
1386
1437
|
}, _ctx.ptm('hiddenLastFocusableEl'), {
|
|
1387
1438
|
"data-p-hidden-accessible": true,
|
|
1388
1439
|
"data-p-hidden-focusable": true
|
|
1389
|
-
}), null, 16)], 16)) : createCommentVNode("", true)];
|
|
1440
|
+
}), null, 16)], 16, _hoisted_4)) : createCommentVNode("", true)];
|
|
1390
1441
|
}),
|
|
1391
1442
|
_: 3
|
|
1392
1443
|
}, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])];
|