primevue 3.30.0 → 3.30.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.
- package/README.md +4 -2
- package/accordion/Accordion.d.ts +6 -1
- package/accordion/Accordion.vue +2 -1
- package/accordion/accordion.cjs.js +5 -9
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +5 -9
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +6 -10
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +1 -1
- package/autocomplete/AutoComplete.d.ts +1 -1
- package/avatar/Avatar.d.ts +1 -1
- package/badge/Badge.d.ts +1 -1
- package/basecomponent/BaseComponent.vue +12 -16
- package/basecomponent/basecomponent.cjs.js +18 -6
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +18 -6
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +18 -6
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +8 -2
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +8 -2
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +8 -2
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BlockUI.d.ts +1 -1
- package/breadcrumb/Breadcrumb.d.ts +1 -1
- package/button/Button.d.ts +1 -1
- package/calendar/Calendar.d.ts +1 -1
- package/carousel/Carousel.d.ts +1 -1
- package/cascadeselect/CascadeSelect.d.ts +1 -1
- package/chart/Chart.d.ts +1 -1
- package/checkbox/Checkbox.d.ts +1 -1
- package/chip/Chip.d.ts +1 -1
- package/chips/Chips.d.ts +1 -1
- package/colorpicker/ColorPicker.d.ts +1 -1
- package/column/Column.d.ts +49 -1
- package/columngroup/ColumnGroup.d.ts +6 -1
- package/config/PrimeVue.d.ts +13 -6
- package/confirmdialog/ConfirmDialog.d.ts +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +1 -1
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/core/core.js +144 -103
- package/core/core.min.js +10 -10
- package/datatable/BaseDataTable.vue +7 -1
- package/datatable/BodyCell.vue +7 -4
- package/datatable/ColumnFilter.vue +43 -8
- package/datatable/DataTable.d.ts +31 -1
- package/datatable/FooterCell.vue +5 -2
- package/datatable/HeaderCell.vue +8 -3
- package/datatable/HeaderCheckbox.vue +5 -2
- package/datatable/RowCheckbox.vue +5 -2
- package/datatable/RowRadioButton.vue +5 -2
- package/datatable/TableBody.vue +33 -13
- package/datatable/TableFooter.vue +13 -4
- package/datatable/TableHeader.vue +16 -5
- package/datatable/datatable.cjs.js +221 -145
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +221 -145
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +222 -146
- package/datatable/datatable.min.js +1 -1
- package/dataview/BaseDataView.vue +1 -2
- package/dataview/DataView.d.ts +1 -1
- package/dataview/DataView.vue +3 -3
- package/dataview/dataview.cjs.js +5 -13
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +5 -13
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +5 -13
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +6 -1
- package/deferredcontent/DeferredContent.d.ts +1 -1
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.vue +13 -1
- package/dialog/dialog.cjs.js +6 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +6 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -2
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +1 -1
- package/dock/Dock.d.ts +5 -1
- package/dock/DockSub.vue +9 -8
- package/dock/dock.cjs.js +9 -8
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +9 -8
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +9 -8
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +1 -1
- package/editor/Editor.d.ts +1 -1
- package/fieldset/Fieldset.d.ts +1 -1
- package/fileupload/FileUpload.d.ts +1 -1
- package/galleria/Galleria.d.ts +5 -1
- package/galleria/GalleriaContent.vue +16 -6
- package/galleria/GalleriaItem.vue +2 -1
- package/galleria/GalleriaThumbnails.vue +1 -0
- package/galleria/galleria.cjs.js +34 -17
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +35 -18
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +34 -17
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +1 -1
- package/inlinemessage/InlineMessage.d.ts +1 -1
- package/inplace/Inplace.d.ts +1 -1
- package/inputnumber/InputNumber.d.ts +1 -1
- package/inputswitch/InputSwitch.d.ts +1 -1
- package/inputtext/InputText.d.ts +26 -1
- package/inputtext/InputText.vue +2 -1
- package/inputtext/inputtext.cjs.js +2 -1
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +2 -1
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +2 -1
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +1 -1
- package/listbox/Listbox.d.ts +1 -1
- package/megamenu/MegaMenu.d.ts +1 -1
- package/menu/Menu.d.ts +1 -1
- package/menubar/Menubar.d.ts +1 -1
- package/message/BaseMessage.vue +2 -2
- package/message/Message.d.ts +11 -1
- package/message/Message.vue +3 -3
- package/message/message.cjs.js +8 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +8 -8
- package/message/message.esm.min.js +1 -1
- package/message/message.js +8 -8
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +1 -1
- package/multiselect/MultiSelect.vue +3 -2
- package/multiselect/multiselect.cjs.js +5 -5
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +6 -6
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +5 -5
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +18 -1
- package/orderlist/OrderList.vue +7 -7
- package/orderlist/orderlist.cjs.js +19 -15
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +19 -15
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +19 -15
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +1 -1
- package/overlaypanel/OverlayPanel.d.ts +1 -1
- package/overlaypanel/OverlayPanel.vue +4 -2
- package/overlaypanel/overlaypanel.cjs.js +4 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +4 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +4 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/JumpToPageDropdown.vue +1 -1
- package/paginator/Paginator.d.ts +1 -26
- package/paginator/paginator.cjs.js +1 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +1 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +1 -1
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +2 -2
- package/panelmenu/PanelMenu.d.ts +1 -1
- package/password/Password.d.ts +1 -1
- package/picklist/BasePickList.vue +4 -4
- package/picklist/PickList.d.ts +22 -1
- package/picklist/PickList.vue +19 -19
- package/picklist/picklist.cjs.js +59 -47
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +59 -47
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +59 -47
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +1 -1
- package/progressspinner/ProgressSpinner.d.ts +1 -1
- package/radiobutton/RadioButton.d.ts +1 -1
- package/rating/Rating.d.ts +1 -1
- package/row/Row.d.ts +1 -1
- package/scrollpanel/ScrollPanel.d.ts +1 -1
- package/scrollpanel/ScrollPanel.vue +2 -0
- package/scrollpanel/scrollpanel.cjs.js +6 -2
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +6 -2
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +6 -2
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.d.ts +1 -1
- package/selectbutton/SelectButton.d.ts +1 -1
- package/sidebar/Sidebar.d.ts +1 -1
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +3 -1
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +3 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +3 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +1 -1
- package/slider/Slider.d.ts +1 -1
- package/speeddial/SpeedDial.d.ts +1 -1
- package/splitbutton/SplitButton.d.ts +1 -1
- package/splitbutton/SplitButton.vue +2 -1
- package/splitbutton/splitbutton.cjs.js +4 -2
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +4 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +4 -2
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +1 -1
- package/splitterpanel/SplitterPanel.d.ts +1 -1
- package/steps/Steps.d.ts +1 -1
- package/tabmenu/TabMenu.d.ts +1 -1
- package/tabmenu/TabMenu.vue +71 -72
- package/tabmenu/tabmenu.cjs.js +67 -75
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +67 -75
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +67 -75
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +17 -1
- package/tabview/TabView.d.ts +6 -1
- package/tabview/TabView.vue +12 -4
- package/tabview/tabview.cjs.js +23 -16
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +23 -16
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +24 -17
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +1 -1
- package/terminal/Terminal.d.ts +1 -1
- package/textarea/Textarea.d.ts +18 -1
- package/textarea/Textarea.vue +8 -1
- package/textarea/textarea.cjs.js +8 -1
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +8 -1
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +8 -1
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +1 -1
- package/timeline/Timeline.d.ts +20 -1
- package/timeline/Timeline.vue +14 -6
- package/timeline/timeline.cjs.js +17 -7
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +17 -7
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +17 -7
- package/timeline/timeline.min.js +1 -1
- package/toast/BaseToast.vue +2 -2
- package/toast/Toast.d.ts +11 -1
- package/toast/ToastMessage.vue +3 -2
- package/toast/toast.cjs.js +7 -6
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +7 -6
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +7 -6
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +1 -1
- package/toolbar/Toolbar.d.ts +1 -1
- package/tree/Tree.d.ts +10 -1
- package/tree/TreeNode.vue +3 -1
- package/tree/tree.cjs.js +3 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +3 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +3 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +1 -1
- package/treetable/BaseTreeTable.vue +9 -3
- package/treetable/BodyCell.vue +16 -5
- package/treetable/FooterCell.vue +5 -2
- package/treetable/HeaderCell.vue +11 -3
- package/treetable/TreeTable.d.ts +31 -9
- package/treetable/TreeTable.vue +13 -5
- package/treetable/TreeTableRow.vue +11 -2
- package/treetable/treetable.cjs.js +84 -55
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +85 -56
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +84 -55
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +1 -1
- package/usestyle/UseStyle.d.ts +1 -0
- package/usestyle/usestyle.cjs.js +12 -10
- package/usestyle/usestyle.cjs.min.js +1 -1
- package/usestyle/usestyle.esm.js +12 -10
- package/usestyle/usestyle.esm.min.js +1 -1
- package/usestyle/usestyle.js +12 -10
- package/usestyle/usestyle.min.js +1 -1
- package/utils/Utils.d.ts +4 -3
- package/utils/utils.cjs.js +19 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +19 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +19 -5
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +8 -0
- package/vetur-tags.json +2 -0
- package/virtualscroller/VirtualScroller.d.ts +1 -1
- package/web-types.json +21 -1
package/picklist/picklist.js
CHANGED
|
@@ -28,6 +28,10 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
28
28
|
sourceWrapper: 'p-picklist-list-wrapper p-picklist-source-wrapper',
|
|
29
29
|
sourceHeader: 'p-picklist-header',
|
|
30
30
|
sourceList: 'p-picklist-list p-picklist-source-list',
|
|
31
|
+
buttons: 'p-picklist-buttons p-picklist-transfer-buttons',
|
|
32
|
+
targetWrapper: 'p-picklist-list-wrapper p-picklist-target-wrapper',
|
|
33
|
+
targetHeader: 'p-picklist-header',
|
|
34
|
+
targetList: 'p-picklist-list p-picklist-target',
|
|
31
35
|
item: function item(_ref2) {
|
|
32
36
|
var instance = _ref2.instance,
|
|
33
37
|
_item = _ref2.item,
|
|
@@ -38,10 +42,6 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
38
42
|
'p-focus': id === instance.focusedOptionId
|
|
39
43
|
}];
|
|
40
44
|
},
|
|
41
|
-
buttons: 'p-picklist-buttons p-picklist-transfer-buttons',
|
|
42
|
-
targetWrapper: 'p-picklist-list-wrapper p-picklist-target-wrapper',
|
|
43
|
-
targetHeader: 'p-picklist-header',
|
|
44
|
-
targetList: 'p-picklist-list p-picklist-target',
|
|
45
45
|
targetControls: 'p-picklist-buttons p-picklist-target-controls'
|
|
46
46
|
};
|
|
47
47
|
var _useStyle = usestyle.useStyle(styles, {
|
|
@@ -214,11 +214,11 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
214
214
|
getItemKey: function getItemKey(item, index) {
|
|
215
215
|
return this.dataKey ? utils.ObjectUtils.resolveFieldData(item, this.dataKey) : index;
|
|
216
216
|
},
|
|
217
|
-
getPTOptions: function getPTOptions(item, key) {
|
|
217
|
+
getPTOptions: function getPTOptions(item, key, id, listIndex) {
|
|
218
218
|
return this.ptm(key, {
|
|
219
219
|
context: {
|
|
220
|
-
active: this.isSelected(item),
|
|
221
|
-
focused:
|
|
220
|
+
active: this.isSelected(item, listIndex),
|
|
221
|
+
focused: id === this.focusedOptionId
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
},
|
|
@@ -777,8 +777,9 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
777
777
|
type: "button",
|
|
778
778
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
779
779
|
return $options.moveUp($event, 0);
|
|
780
|
-
})
|
|
781
|
-
|
|
780
|
+
}),
|
|
781
|
+
pt: _ctx.ptm('sourceMoveUpButton')
|
|
782
|
+
}, _ctx.moveUpButtonProps, {
|
|
782
783
|
unstyled: _ctx.unstyled
|
|
783
784
|
}), {
|
|
784
785
|
icon: vue.withCtx(function () {
|
|
@@ -787,14 +788,15 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
787
788
|
})];
|
|
788
789
|
}),
|
|
789
790
|
_: 3
|
|
790
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
791
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
791
792
|
"aria-label": $options.moveTopAriaLabel,
|
|
792
793
|
disabled: $options.moveDisabled(0),
|
|
793
794
|
type: "button",
|
|
794
795
|
onClick: _cache[1] || (_cache[1] = function ($event) {
|
|
795
796
|
return $options.moveTop($event, 0);
|
|
796
|
-
})
|
|
797
|
-
|
|
797
|
+
}),
|
|
798
|
+
pt: _ctx.ptm('sourceMoveTopButton')
|
|
799
|
+
}, _ctx.moveTopButtonProps, {
|
|
798
800
|
unstyled: _ctx.unstyled
|
|
799
801
|
}), {
|
|
800
802
|
icon: vue.withCtx(function () {
|
|
@@ -803,14 +805,15 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
803
805
|
})];
|
|
804
806
|
}),
|
|
805
807
|
_: 3
|
|
806
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
808
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
807
809
|
"aria-label": $options.moveDownAriaLabel,
|
|
808
810
|
disabled: $options.moveDisabled(0),
|
|
809
811
|
type: "button",
|
|
810
812
|
onClick: _cache[2] || (_cache[2] = function ($event) {
|
|
811
813
|
return $options.moveDown($event, 0);
|
|
812
|
-
})
|
|
813
|
-
|
|
814
|
+
}),
|
|
815
|
+
pt: _ctx.ptm('sourceMoveDownButton')
|
|
816
|
+
}, _ctx.moveDownButtonProps, {
|
|
814
817
|
unstyled: _ctx.unstyled
|
|
815
818
|
}), {
|
|
816
819
|
icon: vue.withCtx(function () {
|
|
@@ -819,14 +822,15 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
819
822
|
})];
|
|
820
823
|
}),
|
|
821
824
|
_: 3
|
|
822
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
825
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
823
826
|
"aria-label": $options.moveBottomAriaLabel,
|
|
824
827
|
disabled: $options.moveDisabled(0),
|
|
825
828
|
type: "button",
|
|
826
829
|
onClick: _cache[3] || (_cache[3] = function ($event) {
|
|
827
830
|
return $options.moveBottom($event, 0);
|
|
828
|
-
})
|
|
829
|
-
|
|
831
|
+
}),
|
|
832
|
+
pt: _ctx.ptm('sourceMoveBottomButton')
|
|
833
|
+
}, _ctx.moveBottomButtonProps, {
|
|
830
834
|
unstyled: _ctx.unstyled
|
|
831
835
|
}), {
|
|
832
836
|
icon: vue.withCtx(function () {
|
|
@@ -835,7 +839,7 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
835
839
|
})];
|
|
836
840
|
}),
|
|
837
841
|
_: 3
|
|
838
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), vue.renderSlot(_ctx.$slots, "sourcecontrolsend")], 16)) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
842
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.renderSlot(_ctx.$slots, "sourcecontrolsend")], 16)) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
839
843
|
"class": _ctx.cx('sourceWrapper')
|
|
840
844
|
}, _ctx.ptm('sourceWrapper')), [_ctx.$slots.sourceheader ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
841
845
|
key: 0,
|
|
@@ -885,9 +889,9 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
885
889
|
},
|
|
886
890
|
role: "option",
|
|
887
891
|
"aria-selected": $options.isSelected(item, 0)
|
|
888
|
-
}, $options.getPTOptions(item, 'item'), {
|
|
892
|
+
}, $options.getPTOptions(item, 'item', "".concat($options.idSource, "_").concat(i), 0), {
|
|
889
893
|
"data-p-highlight": $options.isSelected(item, 0),
|
|
890
|
-
"data-p-focused": "".concat($
|
|
894
|
+
"data-p-focused": "".concat($options.idSource, "_").concat(i) === $options.focusedOptionId
|
|
891
895
|
}), [vue.renderSlot(_ctx.$slots, "item", {
|
|
892
896
|
item: item,
|
|
893
897
|
index: i
|
|
@@ -901,8 +905,9 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
901
905
|
"aria-label": $options.moveToTargetAriaLabel,
|
|
902
906
|
type: "button",
|
|
903
907
|
onClick: $options.moveToTarget,
|
|
904
|
-
disabled: $options.moveDisabled(0)
|
|
905
|
-
|
|
908
|
+
disabled: $options.moveDisabled(0),
|
|
909
|
+
pt: _ctx.ptm('moveToTargetButton')
|
|
910
|
+
}, _ctx.moveToTargetProps, {
|
|
906
911
|
unstyled: _ctx.unstyled
|
|
907
912
|
}), {
|
|
908
913
|
icon: vue.withCtx(function () {
|
|
@@ -913,12 +918,13 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
913
918
|
})];
|
|
914
919
|
}),
|
|
915
920
|
_: 3
|
|
916
|
-
}, 16, ["aria-label", "onClick", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
921
|
+
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
917
922
|
"aria-label": $options.moveAllToTargetAriaLabel,
|
|
918
923
|
type: "button",
|
|
919
924
|
onClick: $options.moveAllToTarget,
|
|
920
|
-
disabled: $options.moveAllDisabled('sourceList')
|
|
921
|
-
|
|
925
|
+
disabled: $options.moveAllDisabled('sourceList'),
|
|
926
|
+
pt: _ctx.ptm('moveAllToTargetButton')
|
|
927
|
+
}, _ctx.moveAllToTargetProps, {
|
|
922
928
|
unstyled: _ctx.unstyled
|
|
923
929
|
}), {
|
|
924
930
|
icon: vue.withCtx(function () {
|
|
@@ -929,12 +935,13 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
929
935
|
})];
|
|
930
936
|
}),
|
|
931
937
|
_: 3
|
|
932
|
-
}, 16, ["aria-label", "onClick", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
938
|
+
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
933
939
|
"aria-label": $options.moveToSourceAriaLabel,
|
|
934
940
|
type: "button",
|
|
935
941
|
onClick: $options.moveToSource,
|
|
936
|
-
disabled: $options.moveDisabled(1)
|
|
937
|
-
|
|
942
|
+
disabled: $options.moveDisabled(1),
|
|
943
|
+
pt: _ctx.ptm('moveToSourceButton')
|
|
944
|
+
}, _ctx.moveToSourceProps, {
|
|
938
945
|
unstyled: _ctx.unstyled
|
|
939
946
|
}), {
|
|
940
947
|
icon: vue.withCtx(function () {
|
|
@@ -945,12 +952,13 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
945
952
|
})];
|
|
946
953
|
}),
|
|
947
954
|
_: 3
|
|
948
|
-
}, 16, ["aria-label", "onClick", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
955
|
+
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
949
956
|
"aria-label": $options.moveAllToSourceAriaLabel,
|
|
950
957
|
type: "button",
|
|
951
958
|
onClick: $options.moveAllToSource,
|
|
952
|
-
disabled: $options.moveSourceDisabled('targetList')
|
|
953
|
-
|
|
959
|
+
disabled: $options.moveSourceDisabled('targetList'),
|
|
960
|
+
pt: _ctx.ptm('moveAllToSourceButton')
|
|
961
|
+
}, _ctx.moveAllToSourceProps, {
|
|
954
962
|
unstyled: _ctx.unstyled
|
|
955
963
|
}), {
|
|
956
964
|
icon: vue.withCtx(function () {
|
|
@@ -961,7 +969,7 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
961
969
|
})];
|
|
962
970
|
}),
|
|
963
971
|
_: 3
|
|
964
|
-
}, 16, ["aria-label", "onClick", "disabled", "unstyled"]), vue.renderSlot(_ctx.$slots, "movecontrolsend")], 16), vue.createElementVNode("div", vue.mergeProps({
|
|
972
|
+
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), vue.renderSlot(_ctx.$slots, "movecontrolsend")], 16), vue.createElementVNode("div", vue.mergeProps({
|
|
965
973
|
"class": _ctx.cx('targetWrapper')
|
|
966
974
|
}, _ctx.ptm('targetWrapper')), [_ctx.$slots.targetheader ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
967
975
|
key: 0,
|
|
@@ -1014,9 +1022,9 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
1014
1022
|
}),
|
|
1015
1023
|
role: "option",
|
|
1016
1024
|
"aria-selected": $options.isSelected(item, 1)
|
|
1017
|
-
}, $options.getPTOptions(item, 'item'), {
|
|
1025
|
+
}, $options.getPTOptions(item, 'item', "".concat($options.idTarget, "_").concat(i), 1), {
|
|
1018
1026
|
"data-p-highlight": $options.isSelected(item, 1),
|
|
1019
|
-
"data-p-focused": "".concat($
|
|
1027
|
+
"data-p-focused": "".concat($options.idTarget, "_").concat(i) === $options.focusedOptionId
|
|
1020
1028
|
}), [vue.renderSlot(_ctx.$slots, "item", {
|
|
1021
1029
|
item: item,
|
|
1022
1030
|
index: i
|
|
@@ -1033,8 +1041,9 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
1033
1041
|
type: "button",
|
|
1034
1042
|
onClick: _cache[13] || (_cache[13] = function ($event) {
|
|
1035
1043
|
return $options.moveUp($event, 1);
|
|
1036
|
-
})
|
|
1037
|
-
|
|
1044
|
+
}),
|
|
1045
|
+
pt: _ctx.ptm('targetMoveUpButton')
|
|
1046
|
+
}, _ctx.moveUpButtonProps, {
|
|
1038
1047
|
unstyled: _ctx.unstyled
|
|
1039
1048
|
}), {
|
|
1040
1049
|
icon: vue.withCtx(function () {
|
|
@@ -1043,14 +1052,15 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
1043
1052
|
})];
|
|
1044
1053
|
}),
|
|
1045
1054
|
_: 3
|
|
1046
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
1055
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
1047
1056
|
"aria-label": $options.moveTopAriaLabel,
|
|
1048
1057
|
disabled: $options.moveDisabled(1),
|
|
1049
1058
|
type: "button",
|
|
1050
1059
|
onClick: _cache[14] || (_cache[14] = function ($event) {
|
|
1051
1060
|
return $options.moveTop($event, 1);
|
|
1052
|
-
})
|
|
1053
|
-
|
|
1061
|
+
}),
|
|
1062
|
+
pt: _ctx.ptm('targetMoveTopButton')
|
|
1063
|
+
}, _ctx.moveTopButtonProps, {
|
|
1054
1064
|
unstyled: _ctx.unstyled
|
|
1055
1065
|
}), {
|
|
1056
1066
|
icon: vue.withCtx(function () {
|
|
@@ -1059,14 +1069,15 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
1059
1069
|
})];
|
|
1060
1070
|
}),
|
|
1061
1071
|
_: 3
|
|
1062
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
1072
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
1063
1073
|
"aria-label": $options.moveDownAriaLabel,
|
|
1064
1074
|
disabled: $options.moveDisabled(1),
|
|
1065
1075
|
type: "button",
|
|
1066
1076
|
onClick: _cache[15] || (_cache[15] = function ($event) {
|
|
1067
1077
|
return $options.moveDown($event, 1);
|
|
1068
|
-
})
|
|
1069
|
-
|
|
1078
|
+
}),
|
|
1079
|
+
pt: _ctx.ptm('targetMoveDownButton')
|
|
1080
|
+
}, _ctx.moveDownButtonProps, {
|
|
1070
1081
|
unstyled: _ctx.unstyled
|
|
1071
1082
|
}), {
|
|
1072
1083
|
icon: vue.withCtx(function () {
|
|
@@ -1075,14 +1086,15 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
1075
1086
|
})];
|
|
1076
1087
|
}),
|
|
1077
1088
|
_: 3
|
|
1078
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
1089
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
1079
1090
|
"aria-label": $options.moveBottomAriaLabel,
|
|
1080
1091
|
disabled: $options.moveDisabled(1),
|
|
1081
1092
|
type: "button",
|
|
1082
1093
|
onClick: _cache[16] || (_cache[16] = function ($event) {
|
|
1083
1094
|
return $options.moveBottom($event, 1);
|
|
1084
|
-
})
|
|
1085
|
-
|
|
1095
|
+
}),
|
|
1096
|
+
pt: _ctx.ptm('targetMoveBottomButton')
|
|
1097
|
+
}, _ctx.moveBottomButtonProps, {
|
|
1086
1098
|
unstyled: _ctx.unstyled
|
|
1087
1099
|
}), {
|
|
1088
1100
|
icon: vue.withCtx(function () {
|
|
@@ -1091,7 +1103,7 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
|
|
|
1091
1103
|
})];
|
|
1092
1104
|
}),
|
|
1093
1105
|
_: 3
|
|
1094
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), vue.renderSlot(_ctx.$slots, "targetcontrolsend")], 16)) : vue.createCommentVNode("", true)], 16);
|
|
1106
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.renderSlot(_ctx.$slots, "targetcontrolsend")], 16)) : vue.createCommentVNode("", true)], 16);
|
|
1095
1107
|
}
|
|
1096
1108
|
|
|
1097
1109
|
script.render = render;
|
package/picklist/picklist.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.picklist=function(e,t,o,n,i,r,l,s,a,c,u,d,p,m){"use strict";function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(e),v=h(t),g=h(o),b=h(n),y=h(i),k=h(r),I=h(l),w=h(s),$=h(a),D=h(c),L=h(d),x=p.useStyle("\n.p-picklist {\n display: flex;\n}\n\n.p-picklist-buttons {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.p-picklist-list-wrapper {\n flex: 1 1 50%;\n}\n\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n transition: none !important;\n}\n",{name:"picklist",manual:!0});function S(e){return B(e)||P(e)||C(e)||T()}function T(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){if(e){if("string"==typeof e)return A(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?A(e,t):void 0}}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(e){if(Array.isArray(e))return A(e)}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var V={name:"PickList",extends:{name:"BasePickList",extends:L.default,props:{modelValue:{type:Array,default:function(){return[[],[]]}},selection:{type:Array,default:function(){return[[],[]]}},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},css:{classes:{root:function(e){return["p-picklist p-component",{"p-picklist-striped":e.props.stripedRows}]},sourceControls:"p-picklist-buttons p-picklist-source-controls",sourceWrapper:"p-picklist-list-wrapper p-picklist-source-wrapper",sourceHeader:"p-picklist-header",sourceList:"p-picklist-list p-picklist-source-list",item:function(e){var t=e.instance,o=e.id;return["p-picklist-item",{"p-highlight":t.isSelected(e.item,e.listIndex),"p-focus":o===t.focusedOptionId}]},buttons:"p-picklist-buttons p-picklist-transfer-buttons",targetWrapper:"p-picklist-list-wrapper p-picklist-target-wrapper",targetHeader:"p-picklist-header",targetList:"p-picklist-list p-picklist-target",targetControls:"p-picklist-buttons p-picklist-target-controls"},loadStyle:x.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||u.UniqueComponentId()},selection:function(e){this.d_selection=e},breakpoint:function(e){this.destroyMedia(),this.initMedia()}},updated:function(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount:function(){this.destroyStyle(),this.destroyMedia()},mounted:function(){this.id=this.id||u.UniqueComponentId(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?u.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),focused:this.id===this.focusedOptionId}})},isSelected:function(e,t){return-1!=u.ObjectUtils.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){var o=u.DomHandler.findSingle(this.$refs[t].$el,'[data-p-highlight="true"]'),n=u.ObjectUtils.findIndexInList(o,this.$refs[t].$el.children);this.focused[t]=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:o?n:-1,t),this.$emit("focus",e)},onListBlur:function(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown:function(e,t){this.focused[t]=!0,this.focusedOptionIndex=e},moveUp:function(e,t){if(this.d_selection&&this.d_selection[t]){for(var o=S(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var l=o[r-1];o[r-1]=o[r],o[r]=l}var s=S(this.modelValue);s[t]=o,this.reorderDirection="up",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var o=S(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var l=o.splice(r,1)[0];o.unshift(l)}var s=S(this.modelValue);s[t]=o,this.reorderDirection="top",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var o=S(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var l=o[r+1];o[r+1]=o[r],o[r]=l}var s=S(this.modelValue);s[t]=o,this.reorderDirection="down",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var o=S(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var l=o.splice(r,1)[0];o.push(l)}var s=S(this.modelValue);s[t]=o,this.reorderDirection="bottom",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,o=S(this.modelValue[0]),n=S(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,n)&&n.push(o.splice(u.ObjectUtils.findIndexInList(r,o),1)[0])}var l=S(this.modelValue);l[0]=o,l[1]=n,this.$emit("update:modelValue",l),this.$emit("move-to-target",{originalEvent:e,items:t}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget:function(e){if(this.modelValue[0]){var t=S(this.modelValue[0]),o=S(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),o=[].concat(S(o),S(t)),t=[];var n=S(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource:function(e){var t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,o=S(this.modelValue[0]),n=S(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,o)&&o.push(n.splice(u.ObjectUtils.findIndexInList(r,n),1)[0])}var l=S(this.modelValue);l[0]=o,l[1]=n,this.$emit("update:modelValue",l),this.$emit("move-to-source",{originalEvent:e,items:t}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource:function(e){if(this.modelValue[1]){var t=S(this.modelValue[0]),o=S(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:o}),t=[].concat(S(t),S(o)),o=[];var n=S(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick:function(e,t,o,n){var i=0===n?"sourceList":"targetList";this.itemTouched=!1;var r,l=this.d_selection[n],s=u.ObjectUtils.findIndexInList(t,this.d_selection),a=-1!=s,c=!this.itemTouched&&this.metaKeySelection,d=u.DomHandler.find(this.$refs[i].$el,'[data-pc-section="item"]')[o].getAttribute("id");if(this.focusedOptionIndex=d,c){var p=e.metaKey||e.ctrlKey;a&&p?r=l.filter((function(e,t){return t!==s})):(r=p&&l?S(l):[]).push(t)}else a?r=l.filter((function(e,t){return t!==s})):(r=l?S(l):[]).push(t);var m=S(this.d_selection);m[n]=r,this.d_selection=m,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,o){0===o?this.moveToTarget(e):1===o&&this.moveToSource(e)},onItemTouchEnd:function(){this.itemTouched=!0},onItemKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=S(this.modelValue),this.$emit("update:selection",this.d_selection))}},onArrowDownKey:function(e,t){var o=this.findNextOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var o=this.findPrevOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var o=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]'),n=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=S(o).findIndex((function(e){return e===n})),r="sourceList"===t?0:1;this.onItemClick(e,this.modelValue[r][i],i,r),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey){var o="sourceList"===t?0:1,n=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]'),i=u.ObjectUtils.findIndexInList(this.d_selection[o][0],S(this.modelValue[o])),r=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),l=S(n).findIndex((function(e){return e===r}));this.d_selection[o]=S(this.modelValue[o]).slice(Math.min(i,l),Math.max(i,l)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var o="sourceList"===t?0:1,n=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]'),i=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),r=S(n).findIndex((function(e){return e===i}));this.d_selection[o]=S(this.modelValue[o]).slice(0,r+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var o=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]');if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,i=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),r=S(o).findIndex((function(e){return e===i}));this.d_selection[n]=S(this.modelValue[n]).slice(r,o.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(o.length-1,t);e.preventDefault()},findNextOptionIndex:function(e,t){var o=S(u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return o>-1?o+1:0},findPrevOptionIndex:function(e,t){var o=S(u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return o>-1?o-1:0},changeFocusedOptionIndex:function(e,t){var o=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]'),n=e>=o.length?o.length-1:e<0?0:e;this.focusedOptionIndex=o[n].getAttribute("id"),this.scrollInView(o[n].getAttribute("id"),t)},scrollInView:function(e,t){var o=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},updateListScroll:function(e){var t=u.DomHandler.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":u.DomHandler.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":u.DomHandler.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia:function(){this.media=window.matchMedia("(max-width: ".concat(this.breakpoint,")")),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia:function(){this.unbindMediaChangeListener()},bindMediaChangeListener:function(){var e=this;this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=function(t){e.viewChanged=t.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener:function(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-picklist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled:function(e){return u.ObjectUtils.isEmpty(this[e])},moveSourceDisabled:function(){return u.ObjectUtils.isEmpty(this.targetList)}},computed:{idSource:function(){return"".concat(this.id,"_source")},idTarget:function(){return"".concat(this.id,"_target")},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},sourceList:function(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList:function(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:function(){return u.UniqueComponentId()},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:f.default,AngleRightIcon:w.default,AngleLeftIcon:I.default,AngleDownIcon:k.default,AngleUpIcon:$.default,AngleDoubleRightIcon:b.default,AngleDoubleLeftIcon:g.default,AngleDoubleDownIcon:v.default,AngleDoubleUpIcon:y.default},directives:{ripple:D.default}};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function _(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function E(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach((function(t){U(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function U(e,t,o){return(t=K(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function K(e){var t=M(e,"string");return"symbol"===O(t)?t:String(t)}function M(e,t){if("object"!==O(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var j=["id","onClick","onDblclick","onMousedown","aria-selected","data-p-highlight","data-p-focused"],N=["id","onClick","onDblclick","onMousedown","aria-selected","data-p-highlight","data-p-focused"];return V.render=function(e,t,o,n,i,r){var l=m.resolveComponent("AngleUpIcon"),s=m.resolveComponent("PLButton"),a=m.resolveComponent("AngleDoubleUpIcon"),c=m.resolveComponent("AngleDownIcon"),u=m.resolveComponent("AngleDoubleDownIcon"),d=m.resolveDirective("ripple");return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls")),[m.renderSlot(e.$slots,"sourcecontrolsstart"),m.createVNode(s,m.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return r.moveUp(e,0)})},E(E({},e.moveUpButtonProps),e.ptm("sourceMoveUpButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"moveupicon",{},(function(){return[m.createVNode(l,m.normalizeProps(m.guardReactiveProps(e.ptm("sourceMoveUpButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return r.moveTop(e,0)})},E(E({},e.moveTopButtonProps),e.ptm("sourceMoveTopButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movetopicon",{},(function(){return[m.createVNode(a,m.normalizeProps(m.guardReactiveProps(e.ptm("sourceMoveTopButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return r.moveDown(e,0)})},E(E({},e.moveDownButtonProps),e.ptm("sourceMoveDownButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movedownicon",{},(function(){return[m.createVNode(c,m.normalizeProps(m.guardReactiveProps(e.ptm("sourceMoveDownButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return r.moveBottom(e,0)})},E(E({},e.moveBottomButtonProps),e.ptm("sourceMoveBottomButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movebottomicon",{},(function(){return[m.createVNode(u,m.normalizeProps(m.guardReactiveProps(e.ptm("sourceMoveBottomButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),m.renderSlot(e.$slots,"sourcecontrolsend")],16)):m.createCommentVNode("",!0),m.createElementVNode("div",m.mergeProps({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper")),[e.$slots.sourceheader?(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader")),[m.renderSlot(e.$slots,"sourceheader")],16)):m.createCommentVNode("",!0),m.createVNode(m.TransitionGroup,m.mergeProps({ref:"sourceList",id:r.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("sourceList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.sourceList?r.focusedOptionId:void 0,tabindex:r.sourceList&&r.sourceList.length>0?e.tabindex:-1,onFocus:t[5]||(t[5]=function(e){return r.onListFocus(e,"sourceList")}),onBlur:t[6]||(t[6]=function(e){return r.onListBlur(e,"sourceList")}),onKeydown:t[7]||(t[7]=function(e){return r.onItemKeyDown(e,"sourceList")})},E(E({},e.sourceListProps),e.ptm("sourceList"))),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.sourceList,(function(o,n){return m.withDirectives((m.openBlock(),m.createElementBlock("li",m.mergeProps({key:r.getItemKey(o,n),id:r.idSource+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return r.onItemClick(e,o,n,0)},onDblclick:function(e){return r.onItemDblClick(e,o,0)},onTouchend:t[4]||(t[4]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(n,"sourceList")},role:"option","aria-selected":r.isSelected(o,0)},r.getPTOptions(o,"item"),{"data-p-highlight":r.isSelected(o,0),"data-p-focused":"".concat(i.id,"_").concat(n)===r.focusedOptionId}),[m.renderSlot(e.$slots,"item",{item:o,index:n})],16,j)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),m.createElementVNode("div",m.mergeProps({class:e.cx("buttons")},e.ptm("buttons")),[m.renderSlot(e.$slots,"movecontrolsstart"),m.createVNode(s,m.mergeProps({"aria-label":r.moveToTargetAriaLabel,type:"button",onClick:r.moveToTarget,disabled:r.moveDisabled(0)},E(E({},e.moveToTargetProps),e.ptm("moveToTargetButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movetotargeticon",{viewChanged:i.viewChanged},(function(){return[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(i.viewChanged?"AngleDownIcon":"AngleRightIcon"),m.normalizeProps(m.guardReactiveProps(e.ptm("moveToTargetButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveAllToTargetAriaLabel,type:"button",onClick:r.moveAllToTarget,disabled:r.moveAllDisabled("sourceList")},E(E({},e.moveAllToTargetProps),e.ptm("moveAllToTargetButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movealltotargeticon",{viewChanged:i.viewChanged},(function(){return[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(i.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),m.normalizeProps(m.guardReactiveProps(e.ptm("moveAllToTargetButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveToSourceAriaLabel,type:"button",onClick:r.moveToSource,disabled:r.moveDisabled(1)},E(E({},e.moveToSourceProps),e.ptm("moveToSourceButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movetosourceicon",{viewChanged:i.viewChanged},(function(){return[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(i.viewChanged?"AngleUpIcon":"AngleLeftIcon"),m.normalizeProps(m.guardReactiveProps(e.ptm("moveToSourceButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveAllToSourceAriaLabel,type:"button",onClick:r.moveAllToSource,disabled:r.moveSourceDisabled("targetList")},E(E({},e.moveAllToSourceProps),e.ptm("moveAllToSourceButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movealltosourceicon",{viewChanged:i.viewChanged},(function(){return[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(i.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),m.normalizeProps(m.guardReactiveProps(e.ptm("moveAllToSourceButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","unstyled"]),m.renderSlot(e.$slots,"movecontrolsend")],16),m.createElementVNode("div",m.mergeProps({class:e.cx("targetWrapper")},e.ptm("targetWrapper")),[e.$slots.targetheader?(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader")),[m.renderSlot(e.$slots,"targetheader")],16)):m.createCommentVNode("",!0),m.createVNode(m.TransitionGroup,m.mergeProps({ref:"targetList",id:r.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("targetList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.targetList?r.focusedOptionId:void 0,tabindex:r.targetList&&r.targetList.length>0?e.tabindex:-1,onFocus:t[10]||(t[10]=function(e){return r.onListFocus(e,"targetList")}),onBlur:t[11]||(t[11]=function(e){return r.onListBlur(e,"targetList")}),onKeydown:t[12]||(t[12]=function(e){return r.onItemKeyDown(e,"targetList")})},E(E({},e.targetListProps),e.ptm("targetList"))),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.targetList,(function(o,n){return m.withDirectives((m.openBlock(),m.createElementBlock("li",m.mergeProps({key:r.getItemKey(o,n),id:r.idTarget+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return r.onItemClick(e,o,n,1)},onDblclick:function(e){return r.onItemDblClick(e,o,1)},onKeydown:t[8]||(t[8]=function(e){return r.onItemKeyDown(e,"targetList")}),onMousedown:function(e){return r.onOptionMouseDown(n,"targetList")},onTouchend:t[9]||(t[9]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),role:"option","aria-selected":r.isSelected(o,1)},r.getPTOptions(o,"item"),{"data-p-highlight":r.isSelected(o,1),"data-p-focused":"".concat(i.id,"_").concat(n)===r.focusedOptionId}),[m.renderSlot(e.$slots,"item",{item:o,index:n})],16,N)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:1,class:e.cx("targetControls")},e.ptm("targetControls")),[m.renderSlot(e.$slots,"targetcontrolsstart"),m.createVNode(s,m.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return r.moveUp(e,1)})},E(E({},e.moveUpButtonProps),e.ptm("targetMoveUpButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"moveupicon",{},(function(){return[m.createVNode(l,m.normalizeProps(m.guardReactiveProps(e.ptm("targetMoveUpButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return r.moveTop(e,1)})},E(E({},e.moveTopButtonProps),e.ptm("targetMoveTopButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movetopicon",{},(function(){return[m.createVNode(a,m.normalizeProps(m.guardReactiveProps(e.ptm("targetMoveTopButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return r.moveDown(e,1)})},E(E({},e.moveDownButtonProps),e.ptm("targetMoveDownButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movedownicon",{},(function(){return[m.createVNode(c,m.normalizeProps(m.guardReactiveProps(e.ptm("targetMoveDownButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return r.moveBottom(e,1)})},E(E({},e.moveBottomButtonProps),e.ptm("targetMoveBottomButton")),{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movebottomicon",{},(function(){return[m.createVNode(u,m.normalizeProps(m.guardReactiveProps(e.ptm("targetMoveBottomButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),m.renderSlot(e.$slots,"targetcontrolsend")],16)):m.createCommentVNode("",!0)],16)},V}(primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleleft,primevue.icons.angledoubleright,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleleft,primevue.icons.angleright,primevue.icons.angleup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.picklist=function(e,t,o,n,i,r,l,s,a,c,u,d,p,m){"use strict";function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(e),v=h(t),g=h(o),b=h(n),y=h(i),k=h(r),I=h(l),w=h(s),$=h(a),D=h(c),L=h(d),x=p.useStyle("\n.p-picklist {\n display: flex;\n}\n\n.p-picklist-buttons {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.p-picklist-list-wrapper {\n flex: 1 1 50%;\n}\n\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n transition: none !important;\n}\n",{name:"picklist",manual:!0});function S(e){return B(e)||P(e)||C(e)||T()}function T(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){if(e){if("string"==typeof e)return A(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?A(e,t):void 0}}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(e){if(Array.isArray(e))return A(e)}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var V={name:"PickList",extends:{name:"BasePickList",extends:L.default,props:{modelValue:{type:Array,default:function(){return[[],[]]}},selection:{type:Array,default:function(){return[[],[]]}},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},css:{classes:{root:function(e){return["p-picklist p-component",{"p-picklist-striped":e.props.stripedRows}]},sourceControls:"p-picklist-buttons p-picklist-source-controls",sourceWrapper:"p-picklist-list-wrapper p-picklist-source-wrapper",sourceHeader:"p-picklist-header",sourceList:"p-picklist-list p-picklist-source-list",buttons:"p-picklist-buttons p-picklist-transfer-buttons",targetWrapper:"p-picklist-list-wrapper p-picklist-target-wrapper",targetHeader:"p-picklist-header",targetList:"p-picklist-list p-picklist-target",item:function(e){var t=e.instance,o=e.id;return["p-picklist-item",{"p-highlight":t.isSelected(e.item,e.listIndex),"p-focus":o===t.focusedOptionId}]},targetControls:"p-picklist-buttons p-picklist-target-controls"},loadStyle:x.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||u.UniqueComponentId()},selection:function(e){this.d_selection=e},breakpoint:function(e){this.destroyMedia(),this.initMedia()}},updated:function(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount:function(){this.destroyStyle(),this.destroyMedia()},mounted:function(){this.id=this.id||u.UniqueComponentId(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?u.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,o,n){return this.ptm(t,{context:{active:this.isSelected(e,n),focused:o===this.focusedOptionId}})},isSelected:function(e,t){return-1!=u.ObjectUtils.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){var o=u.DomHandler.findSingle(this.$refs[t].$el,'[data-p-highlight="true"]'),n=u.ObjectUtils.findIndexInList(o,this.$refs[t].$el.children);this.focused[t]=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:o?n:-1,t),this.$emit("focus",e)},onListBlur:function(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown:function(e,t){this.focused[t]=!0,this.focusedOptionIndex=e},moveUp:function(e,t){if(this.d_selection&&this.d_selection[t]){for(var o=S(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var l=o[r-1];o[r-1]=o[r],o[r]=l}var s=S(this.modelValue);s[t]=o,this.reorderDirection="up",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var o=S(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var l=o.splice(r,1)[0];o.unshift(l)}var s=S(this.modelValue);s[t]=o,this.reorderDirection="top",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var o=S(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var l=o[r+1];o[r+1]=o[r],o[r]=l}var s=S(this.modelValue);s[t]=o,this.reorderDirection="down",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var o=S(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var l=o.splice(r,1)[0];o.push(l)}var s=S(this.modelValue);s[t]=o,this.reorderDirection="bottom",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,o=S(this.modelValue[0]),n=S(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,n)&&n.push(o.splice(u.ObjectUtils.findIndexInList(r,o),1)[0])}var l=S(this.modelValue);l[0]=o,l[1]=n,this.$emit("update:modelValue",l),this.$emit("move-to-target",{originalEvent:e,items:t}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget:function(e){if(this.modelValue[0]){var t=S(this.modelValue[0]),o=S(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),o=[].concat(S(o),S(t)),t=[];var n=S(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource:function(e){var t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,o=S(this.modelValue[0]),n=S(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,o)&&o.push(n.splice(u.ObjectUtils.findIndexInList(r,n),1)[0])}var l=S(this.modelValue);l[0]=o,l[1]=n,this.$emit("update:modelValue",l),this.$emit("move-to-source",{originalEvent:e,items:t}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource:function(e){if(this.modelValue[1]){var t=S(this.modelValue[0]),o=S(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:o}),t=[].concat(S(t),S(o)),o=[];var n=S(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick:function(e,t,o,n){var i=0===n?"sourceList":"targetList";this.itemTouched=!1;var r,l=this.d_selection[n],s=u.ObjectUtils.findIndexInList(t,this.d_selection),a=-1!=s,c=!this.itemTouched&&this.metaKeySelection,d=u.DomHandler.find(this.$refs[i].$el,'[data-pc-section="item"]')[o].getAttribute("id");if(this.focusedOptionIndex=d,c){var p=e.metaKey||e.ctrlKey;a&&p?r=l.filter((function(e,t){return t!==s})):(r=p&&l?S(l):[]).push(t)}else a?r=l.filter((function(e,t){return t!==s})):(r=l?S(l):[]).push(t);var m=S(this.d_selection);m[n]=r,this.d_selection=m,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,o){0===o?this.moveToTarget(e):1===o&&this.moveToSource(e)},onItemTouchEnd:function(){this.itemTouched=!0},onItemKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=S(this.modelValue),this.$emit("update:selection",this.d_selection))}},onArrowDownKey:function(e,t){var o=this.findNextOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var o=this.findPrevOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var o=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]'),n=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),i=S(o).findIndex((function(e){return e===n})),r="sourceList"===t?0:1;this.onItemClick(e,this.modelValue[r][i],i,r),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey){var o="sourceList"===t?0:1,n=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]'),i=u.ObjectUtils.findIndexInList(this.d_selection[o][0],S(this.modelValue[o])),r=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),l=S(n).findIndex((function(e){return e===r}));this.d_selection[o]=S(this.modelValue[o]).slice(Math.min(i,l),Math.max(i,l)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var o="sourceList"===t?0:1,n=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]'),i=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),r=S(n).findIndex((function(e){return e===i}));this.d_selection[o]=S(this.modelValue[o]).slice(0,r+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var o=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]');if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,i=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),r=S(o).findIndex((function(e){return e===i}));this.d_selection[n]=S(this.modelValue[n]).slice(r,o.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(o.length-1,t);e.preventDefault()},findNextOptionIndex:function(e,t){var o=S(u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return o>-1?o+1:0},findPrevOptionIndex:function(e,t){var o=S(u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return o>-1?o-1:0},changeFocusedOptionIndex:function(e,t){var o=u.DomHandler.find(this.$refs[t].$el,'[data-pc-section="item"]'),n=e>=o.length?o.length-1:e<0?0:e;this.focusedOptionIndex=o[n].getAttribute("id"),this.scrollInView(o[n].getAttribute("id"),t)},scrollInView:function(e,t){var o=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},updateListScroll:function(e){var t=u.DomHandler.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":u.DomHandler.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":u.DomHandler.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia:function(){this.media=window.matchMedia("(max-width: ".concat(this.breakpoint,")")),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia:function(){this.unbindMediaChangeListener()},bindMediaChangeListener:function(){var e=this;this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=function(t){e.viewChanged=t.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener:function(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);var e="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-picklist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=e}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled:function(e){return u.ObjectUtils.isEmpty(this[e])},moveSourceDisabled:function(){return u.ObjectUtils.isEmpty(this.targetList)}},computed:{idSource:function(){return"".concat(this.id,"_source")},idTarget:function(){return"".concat(this.id,"_target")},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},sourceList:function(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList:function(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:function(){return u.UniqueComponentId()},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:f.default,AngleRightIcon:w.default,AngleLeftIcon:I.default,AngleDownIcon:k.default,AngleUpIcon:$.default,AngleDoubleRightIcon:b.default,AngleDoubleLeftIcon:g.default,AngleDoubleDownIcon:v.default,AngleDoubleUpIcon:y.default},directives:{ripple:D.default}};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function _(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function E(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach((function(t){U(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function U(e,t,o){return(t=K(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function K(e){var t=M(e,"string");return"symbol"===O(t)?t:String(t)}function M(e,t){if("object"!==O(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var j=["id","onClick","onDblclick","onMousedown","aria-selected","data-p-highlight","data-p-focused"],N=["id","onClick","onDblclick","onMousedown","aria-selected","data-p-highlight","data-p-focused"];return V.render=function(e,t,o,n,i,r){var l=m.resolveComponent("AngleUpIcon"),s=m.resolveComponent("PLButton"),a=m.resolveComponent("AngleDoubleUpIcon"),c=m.resolveComponent("AngleDownIcon"),u=m.resolveComponent("AngleDoubleDownIcon"),d=m.resolveDirective("ripple");return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls")),[m.renderSlot(e.$slots,"sourcecontrolsstart"),m.createVNode(s,m.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return r.moveUp(e,0)}),pt:e.ptm("sourceMoveUpButton")},e.moveUpButtonProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"moveupicon",{},(function(){return[m.createVNode(l,m.normalizeProps(m.guardReactiveProps(e.ptm("sourceMoveUpButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return r.moveTop(e,0)}),pt:e.ptm("sourceMoveTopButton")},e.moveTopButtonProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movetopicon",{},(function(){return[m.createVNode(a,m.normalizeProps(m.guardReactiveProps(e.ptm("sourceMoveTopButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return r.moveDown(e,0)}),pt:e.ptm("sourceMoveDownButton")},e.moveDownButtonProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movedownicon",{},(function(){return[m.createVNode(c,m.normalizeProps(m.guardReactiveProps(e.ptm("sourceMoveDownButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return r.moveBottom(e,0)}),pt:e.ptm("sourceMoveBottomButton")},e.moveBottomButtonProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movebottomicon",{},(function(){return[m.createVNode(u,m.normalizeProps(m.guardReactiveProps(e.ptm("sourceMoveBottomButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),m.renderSlot(e.$slots,"sourcecontrolsend")],16)):m.createCommentVNode("",!0),m.createElementVNode("div",m.mergeProps({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper")),[e.$slots.sourceheader?(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader")),[m.renderSlot(e.$slots,"sourceheader")],16)):m.createCommentVNode("",!0),m.createVNode(m.TransitionGroup,m.mergeProps({ref:"sourceList",id:r.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("sourceList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.sourceList?r.focusedOptionId:void 0,tabindex:r.sourceList&&r.sourceList.length>0?e.tabindex:-1,onFocus:t[5]||(t[5]=function(e){return r.onListFocus(e,"sourceList")}),onBlur:t[6]||(t[6]=function(e){return r.onListBlur(e,"sourceList")}),onKeydown:t[7]||(t[7]=function(e){return r.onItemKeyDown(e,"sourceList")})},E(E({},e.sourceListProps),e.ptm("sourceList"))),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.sourceList,(function(o,n){return m.withDirectives((m.openBlock(),m.createElementBlock("li",m.mergeProps({key:r.getItemKey(o,n),id:r.idSource+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return r.onItemClick(e,o,n,0)},onDblclick:function(e){return r.onItemDblClick(e,o,0)},onTouchend:t[4]||(t[4]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(n,"sourceList")},role:"option","aria-selected":r.isSelected(o,0)},r.getPTOptions(o,"item","".concat(r.idSource,"_").concat(n),0),{"data-p-highlight":r.isSelected(o,0),"data-p-focused":"".concat(r.idSource,"_").concat(n)===r.focusedOptionId}),[m.renderSlot(e.$slots,"item",{item:o,index:n})],16,j)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),m.createElementVNode("div",m.mergeProps({class:e.cx("buttons")},e.ptm("buttons")),[m.renderSlot(e.$slots,"movecontrolsstart"),m.createVNode(s,m.mergeProps({"aria-label":r.moveToTargetAriaLabel,type:"button",onClick:r.moveToTarget,disabled:r.moveDisabled(0),pt:e.ptm("moveToTargetButton")},e.moveToTargetProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movetotargeticon",{viewChanged:i.viewChanged},(function(){return[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(i.viewChanged?"AngleDownIcon":"AngleRightIcon"),m.normalizeProps(m.guardReactiveProps(e.ptm("moveToTargetButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveAllToTargetAriaLabel,type:"button",onClick:r.moveAllToTarget,disabled:r.moveAllDisabled("sourceList"),pt:e.ptm("moveAllToTargetButton")},e.moveAllToTargetProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movealltotargeticon",{viewChanged:i.viewChanged},(function(){return[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(i.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),m.normalizeProps(m.guardReactiveProps(e.ptm("moveAllToTargetButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveToSourceAriaLabel,type:"button",onClick:r.moveToSource,disabled:r.moveDisabled(1),pt:e.ptm("moveToSourceButton")},e.moveToSourceProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movetosourceicon",{viewChanged:i.viewChanged},(function(){return[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(i.viewChanged?"AngleUpIcon":"AngleLeftIcon"),m.normalizeProps(m.guardReactiveProps(e.ptm("moveToSourceButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveAllToSourceAriaLabel,type:"button",onClick:r.moveAllToSource,disabled:r.moveSourceDisabled("targetList"),pt:e.ptm("moveAllToSourceButton")},e.moveAllToSourceProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movealltosourceicon",{viewChanged:i.viewChanged},(function(){return[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(i.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),m.normalizeProps(m.guardReactiveProps(e.ptm("moveAllToSourceButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),m.renderSlot(e.$slots,"movecontrolsend")],16),m.createElementVNode("div",m.mergeProps({class:e.cx("targetWrapper")},e.ptm("targetWrapper")),[e.$slots.targetheader?(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader")),[m.renderSlot(e.$slots,"targetheader")],16)):m.createCommentVNode("",!0),m.createVNode(m.TransitionGroup,m.mergeProps({ref:"targetList",id:r.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("targetList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.targetList?r.focusedOptionId:void 0,tabindex:r.targetList&&r.targetList.length>0?e.tabindex:-1,onFocus:t[10]||(t[10]=function(e){return r.onListFocus(e,"targetList")}),onBlur:t[11]||(t[11]=function(e){return r.onListBlur(e,"targetList")}),onKeydown:t[12]||(t[12]=function(e){return r.onItemKeyDown(e,"targetList")})},E(E({},e.targetListProps),e.ptm("targetList"))),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.targetList,(function(o,n){return m.withDirectives((m.openBlock(),m.createElementBlock("li",m.mergeProps({key:r.getItemKey(o,n),id:r.idTarget+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return r.onItemClick(e,o,n,1)},onDblclick:function(e){return r.onItemDblClick(e,o,1)},onKeydown:t[8]||(t[8]=function(e){return r.onItemKeyDown(e,"targetList")}),onMousedown:function(e){return r.onOptionMouseDown(n,"targetList")},onTouchend:t[9]||(t[9]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),role:"option","aria-selected":r.isSelected(o,1)},r.getPTOptions(o,"item","".concat(r.idTarget,"_").concat(n),1),{"data-p-highlight":r.isSelected(o,1),"data-p-focused":"".concat(r.idTarget,"_").concat(n)===r.focusedOptionId}),[m.renderSlot(e.$slots,"item",{item:o,index:n})],16,N)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:1,class:e.cx("targetControls")},e.ptm("targetControls")),[m.renderSlot(e.$slots,"targetcontrolsstart"),m.createVNode(s,m.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return r.moveUp(e,1)}),pt:e.ptm("targetMoveUpButton")},e.moveUpButtonProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"moveupicon",{},(function(){return[m.createVNode(l,m.normalizeProps(m.guardReactiveProps(e.ptm("targetMoveUpButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return r.moveTop(e,1)}),pt:e.ptm("targetMoveTopButton")},e.moveTopButtonProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movetopicon",{},(function(){return[m.createVNode(a,m.normalizeProps(m.guardReactiveProps(e.ptm("targetMoveTopButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return r.moveDown(e,1)}),pt:e.ptm("targetMoveDownButton")},e.moveDownButtonProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movedownicon",{},(function(){return[m.createVNode(c,m.normalizeProps(m.guardReactiveProps(e.ptm("targetMoveDownButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),m.createVNode(s,m.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return r.moveBottom(e,1)}),pt:e.ptm("targetMoveBottomButton")},e.moveBottomButtonProps,{unstyled:e.unstyled}),{icon:m.withCtx((function(){return[m.renderSlot(e.$slots,"movebottomicon",{},(function(){return[m.createVNode(u,m.normalizeProps(m.guardReactiveProps(e.ptm("targetMoveBottomButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),m.renderSlot(e.$slots,"targetcontrolsend")],16)):m.createCommentVNode("",!0)],16)},V}(primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleleft,primevue.icons.angledoubleright,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleleft,primevue.icons.angleright,primevue.icons.angleup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
@@ -11,7 +11,7 @@ import { VNode } from 'vue';
|
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
13
|
|
|
14
|
-
export declare type ProgressBarPassThroughOptionType = ProgressBarPassThroughAttributes | ((options: ProgressBarPassThroughMethodOptions) => ProgressBarPassThroughAttributes) | null | undefined;
|
|
14
|
+
export declare type ProgressBarPassThroughOptionType = ProgressBarPassThroughAttributes | ((options: ProgressBarPassThroughMethodOptions) => ProgressBarPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Custom passthrough(pt) option method.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { ComponentHooks } from '../basecomponent';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
-
export declare type ProgressSpinnerPassThroughOptionType = ProgressSpinnerPassThroughAttributes | ((options: ProgressSpinnerPassThroughMethodOptions) => ProgressSpinnerPassThroughAttributes) | null | undefined;
|
|
13
|
+
export declare type ProgressSpinnerPassThroughOptionType = ProgressSpinnerPassThroughAttributes | ((options: ProgressSpinnerPassThroughMethodOptions) => ProgressSpinnerPassThroughAttributes | string) | string | null | undefined;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Custom passthrough(pt) option method.
|
|
@@ -11,7 +11,7 @@ import { InputHTMLAttributes } from 'vue';
|
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
13
|
|
|
14
|
-
export declare type RadioButtonPassThroughOptionType = RadioButtonPassThroughAttributes | ((options: RadioButtonPassThroughMethodOptions) => RadioButtonPassThroughAttributes) | null | undefined;
|
|
14
|
+
export declare type RadioButtonPassThroughOptionType = RadioButtonPassThroughAttributes | ((options: RadioButtonPassThroughMethodOptions) => RadioButtonPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Custom passthrough(pt) option method.
|
package/rating/Rating.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { VNode } from 'vue';
|
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
13
|
|
|
14
|
-
export declare type RatingPassThroughOptionType = RatingPassThroughAttributes | ((options: RatingPassThroughMethodOptions) => RatingPassThroughAttributes) | null | undefined;
|
|
14
|
+
export declare type RatingPassThroughOptionType = RatingPassThroughAttributes | ((options: RatingPassThroughMethodOptions) => RatingPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Custom passthrough(pt) option method.
|
package/row/Row.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { ComponentHooks } from '../basecomponent';
|
|
|
9
9
|
import { ColumnGroupPassThroughOptions } from '../columngroup';
|
|
10
10
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
11
11
|
|
|
12
|
-
export declare type RowPassThroughOptionType = RowPassThroughAttributes | ((options: RowPassThroughMethodOptions) => RowPassThroughAttributes) | null | undefined;
|
|
12
|
+
export declare type RowPassThroughOptionType = RowPassThroughAttributes | ((options: RowPassThroughMethodOptions) => RowPassThroughAttributes | string) | string | null | undefined;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Custom passthrough(pt) option method.
|
|
@@ -11,7 +11,7 @@ import { VNode } from 'vue';
|
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
13
|
|
|
14
|
-
export declare type ScrollPanelPassThroughOptionType = ScrollPanelPassThroughAttributes | ((options: ScrollPanelPassThroughMethodOptions) => ScrollPanelPassThroughAttributes) | null | undefined;
|
|
14
|
+
export declare type ScrollPanelPassThroughOptionType = ScrollPanelPassThroughAttributes | ((options: ScrollPanelPassThroughMethodOptions) => ScrollPanelPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Custom passthrough(pt) option method.
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
@focus="onFocus"
|
|
19
19
|
@blur="onBlur"
|
|
20
20
|
v-bind="ptm('barx')"
|
|
21
|
+
data-pc-group-section="bar"
|
|
21
22
|
></div>
|
|
22
23
|
<div
|
|
23
24
|
ref="yBar"
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
@keyup="onKeyUp"
|
|
32
33
|
@focus="onFocus"
|
|
33
34
|
v-bind="ptm('bary')"
|
|
35
|
+
data-pc-group-section="bar"
|
|
34
36
|
></div>
|
|
35
37
|
</div>
|
|
36
38
|
</template>
|
|
@@ -375,7 +375,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
375
375
|
onBlur: _cache[6] || (_cache[6] = function () {
|
|
376
376
|
return $options.onBlur && $options.onBlur.apply($options, arguments);
|
|
377
377
|
})
|
|
378
|
-
}, _ctx.ptm('barx')
|
|
378
|
+
}, _ctx.ptm('barx'), {
|
|
379
|
+
"data-pc-group-section": "bar"
|
|
380
|
+
}), null, 16, _hoisted_1), vue.createElementVNode("div", vue.mergeProps({
|
|
379
381
|
ref: "yBar",
|
|
380
382
|
"class": _ctx.cx('bary'),
|
|
381
383
|
tabindex: "0",
|
|
@@ -394,7 +396,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
394
396
|
onFocus: _cache[10] || (_cache[10] = function () {
|
|
395
397
|
return $options.onFocus && $options.onFocus.apply($options, arguments);
|
|
396
398
|
})
|
|
397
|
-
}, _ctx.ptm('bary')
|
|
399
|
+
}, _ctx.ptm('bary'), {
|
|
400
|
+
"data-pc-group-section": "bar"
|
|
401
|
+
}), null, 16, _hoisted_2)], 16);
|
|
398
402
|
}
|
|
399
403
|
|
|
400
404
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),t=require("primevue/basecomponent"),n=require("primevue/usestyle"),o=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(t),i=n.useStyle("\n.p-scrollpanel-wrapper {\n overflow: hidden;\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n float: left;\n}\n\n.p-scrollpanel-content {\n height: calc(100% + 18px);\n width: calc(100% + 18px);\n padding: 0 18px 18px 0;\n position: relative;\n overflow: scroll;\n box-sizing: border-box;\n scrollbar-width: none;\n}\n\n.p-scrollpanel-content::-webkit-scrollbar {\n display: none;\n}\n\n.p-scrollpanel-bar {\n position: relative;\n background: #c1c1c1;\n border-radius: 3px;\n z-index: 2;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.25s linear;\n}\n\n.p-scrollpanel-bar-y {\n width: 9px;\n top: 0;\n}\n\n.p-scrollpanel-bar-x {\n height: 9px;\n bottom: 0;\n}\n\n.p-scrollpanel-hidden {\n visibility: hidden;\n}\n\n.p-scrollpanel:hover .p-scrollpanel-bar,\n.p-scrollpanel:active .p-scrollpanel-bar {\n opacity: 1;\n}\n\n.p-scrollpanel-grabbed {\n user-select: none;\n}\n",{name:"scrollpanel",manual:!0}),l={name:"ScrollPanel",extends:{name:"BaseScrollPanel",extends:s.default,props:{step:{type:Number,default:5}},css:{classes:{root:"p-scrollpanel p-component",wrapper:"p-scrollpanel-wrapper",content:"p-scrollpanel-content",barx:"p-scrollpanel-bar p-scrollpanel-bar-x",bary:"p-scrollpanel-bar p-scrollpanel-bar-y"},loadStyle:i.load},provide:function(){return{$parentInstance:this}}},initialized:!1,documentResizeListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,frame:null,scrollXRatio:null,scrollYRatio:null,isXBarClicked:!1,isYBarClicked:!1,lastPageX:null,lastPageY:null,timer:null,outsideClickListener:null,data:function(){return{id:e.UniqueComponentId(),orientation:"vertical",lastScrollTop:0,lastScrollLeft:0}},mounted:function(){this.$el.offsetParent&&this.initialize()},updated:function(){!this.initialized&&this.$el.offsetParent&&this.initialize()},beforeUnmount:function(){this.unbindDocumentResizeListener(),this.frame&&window.cancelAnimationFrame(this.frame)},methods:{initialize:function(){this.moveBar(),this.bindDocumentResizeListener(),this.calculateContainerHeight()},calculateContainerHeight:function(){var t=getComputedStyle(this.$el),n=getComputedStyle(this.$refs.xBar),o=e.DomHandler.getHeight(this.$el)-parseInt(n.height,10);"none"!==t["max-height"]&&0===o&&(this.$el.style.height=this.$refs.content.offsetHeight+parseInt(n.height,10)>parseInt(t["max-height"],10)?t["max-height"]:this.$refs.content.offsetHeight+parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth)+"px")},moveBar:function(){var t=this,n=this.$refs.content.scrollWidth,o=-1*(this.$el.clientHeight-this.$refs.xBar.clientHeight);this.scrollXRatio=this.$refs.content.clientWidth/n;var r=this.$refs.content.scrollHeight,s=-1*(this.$el.clientWidth-this.$refs.yBar.clientWidth);this.scrollYRatio=this.$refs.content.clientHeight/r,this.frame=this.requestAnimationFrame((function(){t.scrollXRatio>=1?(t.$refs.xBar.setAttribute("data-p-scrollpanel-hidden","true"),!t.isUnstyled&&e.DomHandler.addClass(t.$refs.xBar,"p-scrollpanel-hidden")):(t.$refs.xBar.setAttribute("data-p-scrollpanel-hidden","false"),!t.isUnstyled&&e.DomHandler.removeClass(t.$refs.xBar,"p-scrollpanel-hidden"),t.$refs.xBar.style.cssText="width:"+Math.max(100*t.scrollXRatio,10)+"%; left:"+t.$refs.content.scrollLeft/n*100+"%;bottom:"+o+"px;"),t.scrollYRatio>=1?(t.$refs.yBar.setAttribute("data-p-scrollpanel-hidden","true"),!t.isUnstyled&&e.DomHandler.addClass(t.$refs.yBar,"p-scrollpanel-hidden")):(t.$refs.yBar.setAttribute("data-p-scrollpanel-hidden","false"),!t.isUnstyled&&e.DomHandler.removeClass(t.$refs.yBar,"p-scrollpanel-hidden"),t.$refs.yBar.style.cssText="height:"+Math.max(100*t.scrollYRatio,10)+"%; top: calc("+t.$refs.content.scrollTop/r*100+"% - "+t.$refs.xBar.clientHeight+"px);right:"+s+"px;")}))},onYBarMouseDown:function(t){this.isYBarClicked=!0,this.$refs.yBar.focus(),this.lastPageY=t.pageY,this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","true"),!this.isUnstyled&&e.DomHandler.addClass(this.$refs.yBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","true"),!this.isUnstyled&&e.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),t.preventDefault()},onXBarMouseDown:function(t){this.isXBarClicked=!0,this.$refs.xBar.focus(),this.lastPageX=t.pageX,this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.addClass(this.$refs.xBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),t.preventDefault()},onScroll:function(e){this.lastScrollLeft!==e.target.scrollLeft?(this.lastScrollLeft=e.target.scrollLeft,this.orientation="horizontal"):this.lastScrollTop!==e.target.scrollTop&&(this.lastScrollTop=e.target.scrollTop,this.orientation="vertical"),this.moveBar()},onKeyDown:function(e){if("vertical"===this.orientation)switch(e.code){case"ArrowDown":this.setTimer("scrollTop",this.step),e.preventDefault();break;case"ArrowUp":this.setTimer("scrollTop",-1*this.step),e.preventDefault();break;case"ArrowLeft":case"ArrowRight":e.preventDefault()}else if("horizontal"===this.orientation)switch(e.code){case"ArrowRight":this.setTimer("scrollLeft",this.step),e.preventDefault();break;case"ArrowLeft":this.setTimer("scrollLeft",-1*this.step),e.preventDefault();break;case"ArrowDown":case"ArrowUp":e.preventDefault()}},onKeyUp:function(){this.clearTimer()},repeat:function(e,t){this.$refs.content[e]+=t,this.moveBar()},setTimer:function(e,t){var n=this;this.clearTimer(),this.timer=setTimeout((function(){n.repeat(e,t)}),40)},clearTimer:function(){this.timer&&clearTimeout(this.timer)},onDocumentMouseMove:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))},onMouseMoveForXBar:function(e){var t=this,n=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((function(){t.$refs.content.scrollLeft+=n/t.scrollXRatio}))},onMouseMoveForYBar:function(e){var t=this,n=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((function(){t.$refs.content.scrollTop+=n/t.scrollYRatio}))},onFocus:function(e){this.$refs.xBar.isSameNode(e.target)?this.orientation="horizontal":this.$refs.yBar.isSameNode(e.target)&&(this.orientation="vertical")},onBlur:function(){"horizontal"===this.orientation&&(this.orientation="vertical")},onDocumentMouseUp:function(){this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.removeClass(this.$refs.yBar,"p-scrollpanel-grabbed"),this.$refs.xBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.removeClass(this.$refs.xBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.removeClass(document.body,"p-scrollpanel-grabbed"),this.unbindDocumentMouseListeners(),this.isXBarClicked=!1,this.isYBarClicked=!1},requestAnimationFrame:function(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)},refresh:function(){this.moveBar()},scrollTop:function(e){var t=this.$refs.content.scrollHeight-this.$refs.content.clientHeight;this.$refs.content.scrollTop=e=e>t?t:e>0?e:0},timeoutFrame:function(e){setTimeout(e,0)},bindDocumentMouseListeners:function(){var e=this;this.documentMouseMoveListener||(this.documentMouseMoveListener=function(t){e.onDocumentMouseMove(t)},document.addEventListener("mousemove",this.documentMouseMoveListener)),this.documentMouseUpListener||(this.documentMouseUpListener=function(t){e.onDocumentMouseUp(t)},document.addEventListener("mouseup",this.documentMouseUpListener))},unbindDocumentMouseListeners:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},bindDocumentResizeListener:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.moveBar()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentResizeListener:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}}},a=["aria-valuenow"],c=["aria-valuenow"];l.render=function(e,t,n,r,s,i){return o.openBlock(),o.createElementBlock("div",o.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"scrollpanel"}),[o.createElementVNode("div",o.mergeProps({class:e.cx("wrapper")},e.ptm("wrapper")),[o.createElementVNode("div",o.mergeProps({ref:"content",class:e.cx("content"),onScroll:t[0]||(t[0]=function(){return i.onScroll&&i.onScroll.apply(i,arguments)}),onMouseenter:t[1]||(t[1]=function(){return i.moveBar&&i.moveBar.apply(i,arguments)})},e.ptm("content")),[o.renderSlot(e.$slots,"default")],16)],16),o.createElementVNode("div",o.mergeProps({ref:"xBar",class:e.cx("barx"),tabindex:"0",role:"scrollbar","aria-orientation":"horizontal","aria-valuenow":s.lastScrollLeft,onMousedown:t[2]||(t[2]=function(){return i.onXBarMouseDown&&i.onXBarMouseDown.apply(i,arguments)}),onKeydown:t[3]||(t[3]=function(e){return i.onKeyDown(e)}),onKeyup:t[4]||(t[4]=function(){return i.onKeyUp&&i.onKeyUp.apply(i,arguments)}),onFocus:t[5]||(t[5]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[6]||(t[6]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)})},e.ptm("barx")),null,16,a),o.createElementVNode("div",o.mergeProps({ref:"yBar",class:e.cx("bary"),tabindex:"0",role:"scrollbar","aria-orientation":"vertical","aria-valuenow":s.lastScrollTop,onMousedown:t[7]||(t[7]=function(){return i.onYBarMouseDown&&i.onYBarMouseDown.apply(i,arguments)}),onKeydown:t[8]||(t[8]=function(e){return i.onKeyDown(e)}),onKeyup:t[9]||(t[9]=function(){return i.onKeyUp&&i.onKeyUp.apply(i,arguments)}),onFocus:t[10]||(t[10]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)})},e.ptm("bary")),null,16,c)],16)},module.exports=l;
|
|
1
|
+
"use strict";var e=require("primevue/utils"),t=require("primevue/basecomponent"),n=require("primevue/usestyle"),o=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(t),i=n.useStyle("\n.p-scrollpanel-wrapper {\n overflow: hidden;\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n float: left;\n}\n\n.p-scrollpanel-content {\n height: calc(100% + 18px);\n width: calc(100% + 18px);\n padding: 0 18px 18px 0;\n position: relative;\n overflow: scroll;\n box-sizing: border-box;\n scrollbar-width: none;\n}\n\n.p-scrollpanel-content::-webkit-scrollbar {\n display: none;\n}\n\n.p-scrollpanel-bar {\n position: relative;\n background: #c1c1c1;\n border-radius: 3px;\n z-index: 2;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.25s linear;\n}\n\n.p-scrollpanel-bar-y {\n width: 9px;\n top: 0;\n}\n\n.p-scrollpanel-bar-x {\n height: 9px;\n bottom: 0;\n}\n\n.p-scrollpanel-hidden {\n visibility: hidden;\n}\n\n.p-scrollpanel:hover .p-scrollpanel-bar,\n.p-scrollpanel:active .p-scrollpanel-bar {\n opacity: 1;\n}\n\n.p-scrollpanel-grabbed {\n user-select: none;\n}\n",{name:"scrollpanel",manual:!0}),a={name:"ScrollPanel",extends:{name:"BaseScrollPanel",extends:s.default,props:{step:{type:Number,default:5}},css:{classes:{root:"p-scrollpanel p-component",wrapper:"p-scrollpanel-wrapper",content:"p-scrollpanel-content",barx:"p-scrollpanel-bar p-scrollpanel-bar-x",bary:"p-scrollpanel-bar p-scrollpanel-bar-y"},loadStyle:i.load},provide:function(){return{$parentInstance:this}}},initialized:!1,documentResizeListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,frame:null,scrollXRatio:null,scrollYRatio:null,isXBarClicked:!1,isYBarClicked:!1,lastPageX:null,lastPageY:null,timer:null,outsideClickListener:null,data:function(){return{id:e.UniqueComponentId(),orientation:"vertical",lastScrollTop:0,lastScrollLeft:0}},mounted:function(){this.$el.offsetParent&&this.initialize()},updated:function(){!this.initialized&&this.$el.offsetParent&&this.initialize()},beforeUnmount:function(){this.unbindDocumentResizeListener(),this.frame&&window.cancelAnimationFrame(this.frame)},methods:{initialize:function(){this.moveBar(),this.bindDocumentResizeListener(),this.calculateContainerHeight()},calculateContainerHeight:function(){var t=getComputedStyle(this.$el),n=getComputedStyle(this.$refs.xBar),o=e.DomHandler.getHeight(this.$el)-parseInt(n.height,10);"none"!==t["max-height"]&&0===o&&(this.$el.style.height=this.$refs.content.offsetHeight+parseInt(n.height,10)>parseInt(t["max-height"],10)?t["max-height"]:this.$refs.content.offsetHeight+parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth)+"px")},moveBar:function(){var t=this,n=this.$refs.content.scrollWidth,o=-1*(this.$el.clientHeight-this.$refs.xBar.clientHeight);this.scrollXRatio=this.$refs.content.clientWidth/n;var r=this.$refs.content.scrollHeight,s=-1*(this.$el.clientWidth-this.$refs.yBar.clientWidth);this.scrollYRatio=this.$refs.content.clientHeight/r,this.frame=this.requestAnimationFrame((function(){t.scrollXRatio>=1?(t.$refs.xBar.setAttribute("data-p-scrollpanel-hidden","true"),!t.isUnstyled&&e.DomHandler.addClass(t.$refs.xBar,"p-scrollpanel-hidden")):(t.$refs.xBar.setAttribute("data-p-scrollpanel-hidden","false"),!t.isUnstyled&&e.DomHandler.removeClass(t.$refs.xBar,"p-scrollpanel-hidden"),t.$refs.xBar.style.cssText="width:"+Math.max(100*t.scrollXRatio,10)+"%; left:"+t.$refs.content.scrollLeft/n*100+"%;bottom:"+o+"px;"),t.scrollYRatio>=1?(t.$refs.yBar.setAttribute("data-p-scrollpanel-hidden","true"),!t.isUnstyled&&e.DomHandler.addClass(t.$refs.yBar,"p-scrollpanel-hidden")):(t.$refs.yBar.setAttribute("data-p-scrollpanel-hidden","false"),!t.isUnstyled&&e.DomHandler.removeClass(t.$refs.yBar,"p-scrollpanel-hidden"),t.$refs.yBar.style.cssText="height:"+Math.max(100*t.scrollYRatio,10)+"%; top: calc("+t.$refs.content.scrollTop/r*100+"% - "+t.$refs.xBar.clientHeight+"px);right:"+s+"px;")}))},onYBarMouseDown:function(t){this.isYBarClicked=!0,this.$refs.yBar.focus(),this.lastPageY=t.pageY,this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","true"),!this.isUnstyled&&e.DomHandler.addClass(this.$refs.yBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","true"),!this.isUnstyled&&e.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),t.preventDefault()},onXBarMouseDown:function(t){this.isXBarClicked=!0,this.$refs.xBar.focus(),this.lastPageX=t.pageX,this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.addClass(this.$refs.xBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),t.preventDefault()},onScroll:function(e){this.lastScrollLeft!==e.target.scrollLeft?(this.lastScrollLeft=e.target.scrollLeft,this.orientation="horizontal"):this.lastScrollTop!==e.target.scrollTop&&(this.lastScrollTop=e.target.scrollTop,this.orientation="vertical"),this.moveBar()},onKeyDown:function(e){if("vertical"===this.orientation)switch(e.code){case"ArrowDown":this.setTimer("scrollTop",this.step),e.preventDefault();break;case"ArrowUp":this.setTimer("scrollTop",-1*this.step),e.preventDefault();break;case"ArrowLeft":case"ArrowRight":e.preventDefault()}else if("horizontal"===this.orientation)switch(e.code){case"ArrowRight":this.setTimer("scrollLeft",this.step),e.preventDefault();break;case"ArrowLeft":this.setTimer("scrollLeft",-1*this.step),e.preventDefault();break;case"ArrowDown":case"ArrowUp":e.preventDefault()}},onKeyUp:function(){this.clearTimer()},repeat:function(e,t){this.$refs.content[e]+=t,this.moveBar()},setTimer:function(e,t){var n=this;this.clearTimer(),this.timer=setTimeout((function(){n.repeat(e,t)}),40)},clearTimer:function(){this.timer&&clearTimeout(this.timer)},onDocumentMouseMove:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))},onMouseMoveForXBar:function(e){var t=this,n=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame((function(){t.$refs.content.scrollLeft+=n/t.scrollXRatio}))},onMouseMoveForYBar:function(e){var t=this,n=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame((function(){t.$refs.content.scrollTop+=n/t.scrollYRatio}))},onFocus:function(e){this.$refs.xBar.isSameNode(e.target)?this.orientation="horizontal":this.$refs.yBar.isSameNode(e.target)&&(this.orientation="vertical")},onBlur:function(){"horizontal"===this.orientation&&(this.orientation="vertical")},onDocumentMouseUp:function(){this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.removeClass(this.$refs.yBar,"p-scrollpanel-grabbed"),this.$refs.xBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.removeClass(this.$refs.xBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&e.DomHandler.removeClass(document.body,"p-scrollpanel-grabbed"),this.unbindDocumentMouseListeners(),this.isXBarClicked=!1,this.isYBarClicked=!1},requestAnimationFrame:function(e){return(window.requestAnimationFrame||this.timeoutFrame)(e)},refresh:function(){this.moveBar()},scrollTop:function(e){var t=this.$refs.content.scrollHeight-this.$refs.content.clientHeight;this.$refs.content.scrollTop=e=e>t?t:e>0?e:0},timeoutFrame:function(e){setTimeout(e,0)},bindDocumentMouseListeners:function(){var e=this;this.documentMouseMoveListener||(this.documentMouseMoveListener=function(t){e.onDocumentMouseMove(t)},document.addEventListener("mousemove",this.documentMouseMoveListener)),this.documentMouseUpListener||(this.documentMouseUpListener=function(t){e.onDocumentMouseUp(t)},document.addEventListener("mouseup",this.documentMouseUpListener))},unbindDocumentMouseListeners:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},bindDocumentResizeListener:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.moveBar()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentResizeListener:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}}},l=["aria-valuenow"],c=["aria-valuenow"];a.render=function(e,t,n,r,s,i){return o.openBlock(),o.createElementBlock("div",o.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"scrollpanel"}),[o.createElementVNode("div",o.mergeProps({class:e.cx("wrapper")},e.ptm("wrapper")),[o.createElementVNode("div",o.mergeProps({ref:"content",class:e.cx("content"),onScroll:t[0]||(t[0]=function(){return i.onScroll&&i.onScroll.apply(i,arguments)}),onMouseenter:t[1]||(t[1]=function(){return i.moveBar&&i.moveBar.apply(i,arguments)})},e.ptm("content")),[o.renderSlot(e.$slots,"default")],16)],16),o.createElementVNode("div",o.mergeProps({ref:"xBar",class:e.cx("barx"),tabindex:"0",role:"scrollbar","aria-orientation":"horizontal","aria-valuenow":s.lastScrollLeft,onMousedown:t[2]||(t[2]=function(){return i.onXBarMouseDown&&i.onXBarMouseDown.apply(i,arguments)}),onKeydown:t[3]||(t[3]=function(e){return i.onKeyDown(e)}),onKeyup:t[4]||(t[4]=function(){return i.onKeyUp&&i.onKeyUp.apply(i,arguments)}),onFocus:t[5]||(t[5]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[6]||(t[6]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)})},e.ptm("barx"),{"data-pc-group-section":"bar"}),null,16,l),o.createElementVNode("div",o.mergeProps({ref:"yBar",class:e.cx("bary"),tabindex:"0",role:"scrollbar","aria-orientation":"vertical","aria-valuenow":s.lastScrollTop,onMousedown:t[7]||(t[7]=function(){return i.onYBarMouseDown&&i.onYBarMouseDown.apply(i,arguments)}),onKeydown:t[8]||(t[8]=function(e){return i.onKeyDown(e)}),onKeyup:t[9]||(t[9]=function(){return i.onKeyUp&&i.onKeyUp.apply(i,arguments)}),onFocus:t[10]||(t[10]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)})},e.ptm("bary"),{"data-pc-group-section":"bar"}),null,16,c)],16)},module.exports=a;
|
|
@@ -369,7 +369,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
369
369
|
onBlur: _cache[6] || (_cache[6] = function () {
|
|
370
370
|
return $options.onBlur && $options.onBlur.apply($options, arguments);
|
|
371
371
|
})
|
|
372
|
-
}, _ctx.ptm('barx')
|
|
372
|
+
}, _ctx.ptm('barx'), {
|
|
373
|
+
"data-pc-group-section": "bar"
|
|
374
|
+
}), null, 16, _hoisted_1), createElementVNode("div", mergeProps({
|
|
373
375
|
ref: "yBar",
|
|
374
376
|
"class": _ctx.cx('bary'),
|
|
375
377
|
tabindex: "0",
|
|
@@ -388,7 +390,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
388
390
|
onFocus: _cache[10] || (_cache[10] = function () {
|
|
389
391
|
return $options.onFocus && $options.onFocus.apply($options, arguments);
|
|
390
392
|
})
|
|
391
|
-
}, _ctx.ptm('bary')
|
|
393
|
+
}, _ctx.ptm('bary'), {
|
|
394
|
+
"data-pc-group-section": "bar"
|
|
395
|
+
}), null, 16, _hoisted_2)], 16);
|
|
392
396
|
}
|
|
393
397
|
|
|
394
398
|
script.render = render;
|