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.esm.js
CHANGED
|
@@ -25,6 +25,10 @@ var classes = {
|
|
|
25
25
|
sourceWrapper: 'p-picklist-list-wrapper p-picklist-source-wrapper',
|
|
26
26
|
sourceHeader: 'p-picklist-header',
|
|
27
27
|
sourceList: 'p-picklist-list p-picklist-source-list',
|
|
28
|
+
buttons: 'p-picklist-buttons p-picklist-transfer-buttons',
|
|
29
|
+
targetWrapper: 'p-picklist-list-wrapper p-picklist-target-wrapper',
|
|
30
|
+
targetHeader: 'p-picklist-header',
|
|
31
|
+
targetList: 'p-picklist-list p-picklist-target',
|
|
28
32
|
item: function item(_ref2) {
|
|
29
33
|
var instance = _ref2.instance,
|
|
30
34
|
_item = _ref2.item,
|
|
@@ -35,10 +39,6 @@ var classes = {
|
|
|
35
39
|
'p-focus': id === instance.focusedOptionId
|
|
36
40
|
}];
|
|
37
41
|
},
|
|
38
|
-
buttons: 'p-picklist-buttons p-picklist-transfer-buttons',
|
|
39
|
-
targetWrapper: 'p-picklist-list-wrapper p-picklist-target-wrapper',
|
|
40
|
-
targetHeader: 'p-picklist-header',
|
|
41
|
-
targetList: 'p-picklist-list p-picklist-target',
|
|
42
42
|
targetControls: 'p-picklist-buttons p-picklist-target-controls'
|
|
43
43
|
};
|
|
44
44
|
var _useStyle = useStyle(styles, {
|
|
@@ -211,11 +211,11 @@ var script = {
|
|
|
211
211
|
getItemKey: function getItemKey(item, index) {
|
|
212
212
|
return this.dataKey ? ObjectUtils.resolveFieldData(item, this.dataKey) : index;
|
|
213
213
|
},
|
|
214
|
-
getPTOptions: function getPTOptions(item, key) {
|
|
214
|
+
getPTOptions: function getPTOptions(item, key, id, listIndex) {
|
|
215
215
|
return this.ptm(key, {
|
|
216
216
|
context: {
|
|
217
|
-
active: this.isSelected(item),
|
|
218
|
-
focused:
|
|
217
|
+
active: this.isSelected(item, listIndex),
|
|
218
|
+
focused: id === this.focusedOptionId
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
221
|
},
|
|
@@ -774,8 +774,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
774
774
|
type: "button",
|
|
775
775
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
776
776
|
return $options.moveUp($event, 0);
|
|
777
|
-
})
|
|
778
|
-
|
|
777
|
+
}),
|
|
778
|
+
pt: _ctx.ptm('sourceMoveUpButton')
|
|
779
|
+
}, _ctx.moveUpButtonProps, {
|
|
779
780
|
unstyled: _ctx.unstyled
|
|
780
781
|
}), {
|
|
781
782
|
icon: withCtx(function () {
|
|
@@ -784,14 +785,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
784
785
|
})];
|
|
785
786
|
}),
|
|
786
787
|
_: 3
|
|
787
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
788
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
788
789
|
"aria-label": $options.moveTopAriaLabel,
|
|
789
790
|
disabled: $options.moveDisabled(0),
|
|
790
791
|
type: "button",
|
|
791
792
|
onClick: _cache[1] || (_cache[1] = function ($event) {
|
|
792
793
|
return $options.moveTop($event, 0);
|
|
793
|
-
})
|
|
794
|
-
|
|
794
|
+
}),
|
|
795
|
+
pt: _ctx.ptm('sourceMoveTopButton')
|
|
796
|
+
}, _ctx.moveTopButtonProps, {
|
|
795
797
|
unstyled: _ctx.unstyled
|
|
796
798
|
}), {
|
|
797
799
|
icon: withCtx(function () {
|
|
@@ -800,14 +802,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
800
802
|
})];
|
|
801
803
|
}),
|
|
802
804
|
_: 3
|
|
803
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
805
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
804
806
|
"aria-label": $options.moveDownAriaLabel,
|
|
805
807
|
disabled: $options.moveDisabled(0),
|
|
806
808
|
type: "button",
|
|
807
809
|
onClick: _cache[2] || (_cache[2] = function ($event) {
|
|
808
810
|
return $options.moveDown($event, 0);
|
|
809
|
-
})
|
|
810
|
-
|
|
811
|
+
}),
|
|
812
|
+
pt: _ctx.ptm('sourceMoveDownButton')
|
|
813
|
+
}, _ctx.moveDownButtonProps, {
|
|
811
814
|
unstyled: _ctx.unstyled
|
|
812
815
|
}), {
|
|
813
816
|
icon: withCtx(function () {
|
|
@@ -816,14 +819,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
816
819
|
})];
|
|
817
820
|
}),
|
|
818
821
|
_: 3
|
|
819
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
822
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
820
823
|
"aria-label": $options.moveBottomAriaLabel,
|
|
821
824
|
disabled: $options.moveDisabled(0),
|
|
822
825
|
type: "button",
|
|
823
826
|
onClick: _cache[3] || (_cache[3] = function ($event) {
|
|
824
827
|
return $options.moveBottom($event, 0);
|
|
825
|
-
})
|
|
826
|
-
|
|
828
|
+
}),
|
|
829
|
+
pt: _ctx.ptm('sourceMoveBottomButton')
|
|
830
|
+
}, _ctx.moveBottomButtonProps, {
|
|
827
831
|
unstyled: _ctx.unstyled
|
|
828
832
|
}), {
|
|
829
833
|
icon: withCtx(function () {
|
|
@@ -832,7 +836,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
832
836
|
})];
|
|
833
837
|
}),
|
|
834
838
|
_: 3
|
|
835
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), renderSlot(_ctx.$slots, "sourcecontrolsend")], 16)) : createCommentVNode("", true), createElementVNode("div", mergeProps({
|
|
839
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), renderSlot(_ctx.$slots, "sourcecontrolsend")], 16)) : createCommentVNode("", true), createElementVNode("div", mergeProps({
|
|
836
840
|
"class": _ctx.cx('sourceWrapper')
|
|
837
841
|
}, _ctx.ptm('sourceWrapper')), [_ctx.$slots.sourceheader ? (openBlock(), createElementBlock("div", mergeProps({
|
|
838
842
|
key: 0,
|
|
@@ -882,9 +886,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
882
886
|
},
|
|
883
887
|
role: "option",
|
|
884
888
|
"aria-selected": $options.isSelected(item, 0)
|
|
885
|
-
}, $options.getPTOptions(item, 'item'), {
|
|
889
|
+
}, $options.getPTOptions(item, 'item', "".concat($options.idSource, "_").concat(i), 0), {
|
|
886
890
|
"data-p-highlight": $options.isSelected(item, 0),
|
|
887
|
-
"data-p-focused": "".concat($
|
|
891
|
+
"data-p-focused": "".concat($options.idSource, "_").concat(i) === $options.focusedOptionId
|
|
888
892
|
}), [renderSlot(_ctx.$slots, "item", {
|
|
889
893
|
item: item,
|
|
890
894
|
index: i
|
|
@@ -898,8 +902,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
898
902
|
"aria-label": $options.moveToTargetAriaLabel,
|
|
899
903
|
type: "button",
|
|
900
904
|
onClick: $options.moveToTarget,
|
|
901
|
-
disabled: $options.moveDisabled(0)
|
|
902
|
-
|
|
905
|
+
disabled: $options.moveDisabled(0),
|
|
906
|
+
pt: _ctx.ptm('moveToTargetButton')
|
|
907
|
+
}, _ctx.moveToTargetProps, {
|
|
903
908
|
unstyled: _ctx.unstyled
|
|
904
909
|
}), {
|
|
905
910
|
icon: withCtx(function () {
|
|
@@ -910,12 +915,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
910
915
|
})];
|
|
911
916
|
}),
|
|
912
917
|
_: 3
|
|
913
|
-
}, 16, ["aria-label", "onClick", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
918
|
+
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
914
919
|
"aria-label": $options.moveAllToTargetAriaLabel,
|
|
915
920
|
type: "button",
|
|
916
921
|
onClick: $options.moveAllToTarget,
|
|
917
|
-
disabled: $options.moveAllDisabled('sourceList')
|
|
918
|
-
|
|
922
|
+
disabled: $options.moveAllDisabled('sourceList'),
|
|
923
|
+
pt: _ctx.ptm('moveAllToTargetButton')
|
|
924
|
+
}, _ctx.moveAllToTargetProps, {
|
|
919
925
|
unstyled: _ctx.unstyled
|
|
920
926
|
}), {
|
|
921
927
|
icon: withCtx(function () {
|
|
@@ -926,12 +932,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
926
932
|
})];
|
|
927
933
|
}),
|
|
928
934
|
_: 3
|
|
929
|
-
}, 16, ["aria-label", "onClick", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
935
|
+
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
930
936
|
"aria-label": $options.moveToSourceAriaLabel,
|
|
931
937
|
type: "button",
|
|
932
938
|
onClick: $options.moveToSource,
|
|
933
|
-
disabled: $options.moveDisabled(1)
|
|
934
|
-
|
|
939
|
+
disabled: $options.moveDisabled(1),
|
|
940
|
+
pt: _ctx.ptm('moveToSourceButton')
|
|
941
|
+
}, _ctx.moveToSourceProps, {
|
|
935
942
|
unstyled: _ctx.unstyled
|
|
936
943
|
}), {
|
|
937
944
|
icon: withCtx(function () {
|
|
@@ -942,12 +949,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
942
949
|
})];
|
|
943
950
|
}),
|
|
944
951
|
_: 3
|
|
945
|
-
}, 16, ["aria-label", "onClick", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
952
|
+
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
946
953
|
"aria-label": $options.moveAllToSourceAriaLabel,
|
|
947
954
|
type: "button",
|
|
948
955
|
onClick: $options.moveAllToSource,
|
|
949
|
-
disabled: $options.moveSourceDisabled('targetList')
|
|
950
|
-
|
|
956
|
+
disabled: $options.moveSourceDisabled('targetList'),
|
|
957
|
+
pt: _ctx.ptm('moveAllToSourceButton')
|
|
958
|
+
}, _ctx.moveAllToSourceProps, {
|
|
951
959
|
unstyled: _ctx.unstyled
|
|
952
960
|
}), {
|
|
953
961
|
icon: withCtx(function () {
|
|
@@ -958,7 +966,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
958
966
|
})];
|
|
959
967
|
}),
|
|
960
968
|
_: 3
|
|
961
|
-
}, 16, ["aria-label", "onClick", "disabled", "unstyled"]), renderSlot(_ctx.$slots, "movecontrolsend")], 16), createElementVNode("div", mergeProps({
|
|
969
|
+
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), renderSlot(_ctx.$slots, "movecontrolsend")], 16), createElementVNode("div", mergeProps({
|
|
962
970
|
"class": _ctx.cx('targetWrapper')
|
|
963
971
|
}, _ctx.ptm('targetWrapper')), [_ctx.$slots.targetheader ? (openBlock(), createElementBlock("div", mergeProps({
|
|
964
972
|
key: 0,
|
|
@@ -1011,9 +1019,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1011
1019
|
}),
|
|
1012
1020
|
role: "option",
|
|
1013
1021
|
"aria-selected": $options.isSelected(item, 1)
|
|
1014
|
-
}, $options.getPTOptions(item, 'item'), {
|
|
1022
|
+
}, $options.getPTOptions(item, 'item', "".concat($options.idTarget, "_").concat(i), 1), {
|
|
1015
1023
|
"data-p-highlight": $options.isSelected(item, 1),
|
|
1016
|
-
"data-p-focused": "".concat($
|
|
1024
|
+
"data-p-focused": "".concat($options.idTarget, "_").concat(i) === $options.focusedOptionId
|
|
1017
1025
|
}), [renderSlot(_ctx.$slots, "item", {
|
|
1018
1026
|
item: item,
|
|
1019
1027
|
index: i
|
|
@@ -1030,8 +1038,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1030
1038
|
type: "button",
|
|
1031
1039
|
onClick: _cache[13] || (_cache[13] = function ($event) {
|
|
1032
1040
|
return $options.moveUp($event, 1);
|
|
1033
|
-
})
|
|
1034
|
-
|
|
1041
|
+
}),
|
|
1042
|
+
pt: _ctx.ptm('targetMoveUpButton')
|
|
1043
|
+
}, _ctx.moveUpButtonProps, {
|
|
1035
1044
|
unstyled: _ctx.unstyled
|
|
1036
1045
|
}), {
|
|
1037
1046
|
icon: withCtx(function () {
|
|
@@ -1040,14 +1049,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1040
1049
|
})];
|
|
1041
1050
|
}),
|
|
1042
1051
|
_: 3
|
|
1043
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
1052
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
1044
1053
|
"aria-label": $options.moveTopAriaLabel,
|
|
1045
1054
|
disabled: $options.moveDisabled(1),
|
|
1046
1055
|
type: "button",
|
|
1047
1056
|
onClick: _cache[14] || (_cache[14] = function ($event) {
|
|
1048
1057
|
return $options.moveTop($event, 1);
|
|
1049
|
-
})
|
|
1050
|
-
|
|
1058
|
+
}),
|
|
1059
|
+
pt: _ctx.ptm('targetMoveTopButton')
|
|
1060
|
+
}, _ctx.moveTopButtonProps, {
|
|
1051
1061
|
unstyled: _ctx.unstyled
|
|
1052
1062
|
}), {
|
|
1053
1063
|
icon: withCtx(function () {
|
|
@@ -1056,14 +1066,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1056
1066
|
})];
|
|
1057
1067
|
}),
|
|
1058
1068
|
_: 3
|
|
1059
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
1069
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
1060
1070
|
"aria-label": $options.moveDownAriaLabel,
|
|
1061
1071
|
disabled: $options.moveDisabled(1),
|
|
1062
1072
|
type: "button",
|
|
1063
1073
|
onClick: _cache[15] || (_cache[15] = function ($event) {
|
|
1064
1074
|
return $options.moveDown($event, 1);
|
|
1065
|
-
})
|
|
1066
|
-
|
|
1075
|
+
}),
|
|
1076
|
+
pt: _ctx.ptm('targetMoveDownButton')
|
|
1077
|
+
}, _ctx.moveDownButtonProps, {
|
|
1067
1078
|
unstyled: _ctx.unstyled
|
|
1068
1079
|
}), {
|
|
1069
1080
|
icon: withCtx(function () {
|
|
@@ -1072,14 +1083,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1072
1083
|
})];
|
|
1073
1084
|
}),
|
|
1074
1085
|
_: 3
|
|
1075
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
1086
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_PLButton, mergeProps({
|
|
1076
1087
|
"aria-label": $options.moveBottomAriaLabel,
|
|
1077
1088
|
disabled: $options.moveDisabled(1),
|
|
1078
1089
|
type: "button",
|
|
1079
1090
|
onClick: _cache[16] || (_cache[16] = function ($event) {
|
|
1080
1091
|
return $options.moveBottom($event, 1);
|
|
1081
|
-
})
|
|
1082
|
-
|
|
1092
|
+
}),
|
|
1093
|
+
pt: _ctx.ptm('targetMoveBottomButton')
|
|
1094
|
+
}, _ctx.moveBottomButtonProps, {
|
|
1083
1095
|
unstyled: _ctx.unstyled
|
|
1084
1096
|
}), {
|
|
1085
1097
|
icon: withCtx(function () {
|
|
@@ -1088,7 +1100,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1088
1100
|
})];
|
|
1089
1101
|
}),
|
|
1090
1102
|
_: 3
|
|
1091
|
-
}, 16, ["aria-label", "disabled", "unstyled"]), renderSlot(_ctx.$slots, "targetcontrolsend")], 16)) : createCommentVNode("", true)], 16);
|
|
1103
|
+
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), renderSlot(_ctx.$slots, "targetcontrolsend")], 16)) : createCommentVNode("", true)], 16);
|
|
1092
1104
|
}
|
|
1093
1105
|
|
|
1094
1106
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/button";import t from"primevue/icons/angledoubledown";import i from"primevue/icons/angledoubleleft";import n from"primevue/icons/angledoubleright";import o from"primevue/icons/angledoubleup";import r from"primevue/icons/angledown";import s from"primevue/icons/angleleft";import l from"primevue/icons/angleright";import a from"primevue/icons/angleup";import c from"primevue/ripple";import{UniqueComponentId as u,ObjectUtils as d,DomHandler as p}from"primevue/utils";import m from"primevue/basecomponent";import{useStyle as h}from"primevue/usestyle";import{resolveComponent as f,resolveDirective as v,openBlock as g,createElementBlock as b,mergeProps as y,renderSlot as I,createVNode as $,withCtx as L,normalizeProps as w,guardReactiveProps as k,createCommentVNode as T,createElementVNode as x,TransitionGroup as D,Fragment as A,renderList as S,withDirectives as _,createBlock as C,resolveDynamicComponent as B}from"vue";var O=h("\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 V(e){return M(e)||K(e)||P(e)||E()}function E(){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 P(e,t){if(e){if("string"==typeof e)return U(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?U(e,t):void 0}}function K(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function M(e){if(Array.isArray(e))return U(e)}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var j={name:"PickList",extends:{name:"BasePickList",extends:m,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,i=e.id;return["p-picklist-item",{"p-highlight":t.isSelected(e.item,e.listIndex),"p-focus":i===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:O.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()},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(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?d.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!=d.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){var i=p.findSingle(this.$refs[t].$el,'[data-p-highlight="true"]'),n=d.findIndexInList(i,this.$refs[t].$el.children);this.focused[t]=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:i?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 i=V(this.modelValue[t]),n=this.d_selection[t],o=0;o<n.length;o++){var r=d.findIndexInList(n[o],i);if(0===r)break;var s=i[r-1];i[r-1]=i[r],i[r]=s}var l=V(this.modelValue);l[t]=i,this.reorderDirection="up",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var i=V(this.modelValue[t]),n=this.d_selection[t],o=0;o<n.length;o++){var r=d.findIndexInList(n[o],i);if(0===r)break;var s=i.splice(r,1)[0];i.unshift(s)}var l=V(this.modelValue);l[t]=i,this.reorderDirection="top",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var i=V(this.modelValue[t]),n=this.d_selection[t],o=n.length-1;o>=0;o--){var r=d.findIndexInList(n[o],i);if(r===i.length-1)break;var s=i[r+1];i[r+1]=i[r],i[r]=s}var l=V(this.modelValue);l[t]=i,this.reorderDirection="down",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var i=V(this.modelValue[t]),n=this.d_selection[t],o=n.length-1;o>=0;o--){var r=d.findIndexInList(n[o],i);if(r===i.length-1)break;var s=i.splice(r,1)[0];i.push(s)}var l=V(this.modelValue);l[t]=i,this.reorderDirection="bottom",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,i=V(this.modelValue[0]),n=V(this.modelValue[1]);if(t){for(var o=0;o<t.length;o++){var r=t[o];-1==d.findIndexInList(r,n)&&n.push(i.splice(d.findIndexInList(r,i),1)[0])}var s=V(this.modelValue);s[0]=i,s[1]=n,this.$emit("update:modelValue",s),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=V(this.modelValue[0]),i=V(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[].concat(V(i),V(t)),t=[];var n=V(this.modelValue);n[0]=t,n[1]=i,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,i=V(this.modelValue[0]),n=V(this.modelValue[1]);if(t){for(var o=0;o<t.length;o++){var r=t[o];-1==d.findIndexInList(r,i)&&i.push(n.splice(d.findIndexInList(r,n),1)[0])}var s=V(this.modelValue);s[0]=i,s[1]=n,this.$emit("update:modelValue",s),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=V(this.modelValue[0]),i=V(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[].concat(V(t),V(i)),i=[];var n=V(this.modelValue);n[0]=t,n[1]=i,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,i,n){var o=0===n?"sourceList":"targetList";this.itemTouched=!1;var r,s=this.d_selection[n],l=d.findIndexInList(t,this.d_selection),a=-1!=l,c=!this.itemTouched&&this.metaKeySelection,u=p.find(this.$refs[o].$el,'[data-pc-section="item"]')[i].getAttribute("id");if(this.focusedOptionIndex=u,c){var m=e.metaKey||e.ctrlKey;a&&m?r=s.filter((function(e,t){return t!==l})):(r=m&&s?V(s):[]).push(t)}else a?r=s.filter((function(e,t){return t!==l})):(r=s?V(s):[]).push(t);var h=V(this.d_selection);h[n]=r,this.d_selection=h,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,i){0===i?this.moveToTarget(e):1===i&&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=V(this.modelValue),this.$emit("update:selection",this.d_selection))}},onArrowDownKey:function(e,t){var i=this.findNextOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(i,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var i=this.findPrevOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(i,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var i=p.find(this.$refs[t].$el,'[data-pc-section="item"]'),n=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),o=V(i).findIndex((function(e){return e===n})),r="sourceList"===t?0:1;this.onItemClick(e,this.modelValue[r][o],o,r),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey){var i="sourceList"===t?0:1,n=p.find(this.$refs[t].$el,'[data-pc-section="item"]'),o=d.findIndexInList(this.d_selection[i][0],V(this.modelValue[i])),r=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),s=V(n).findIndex((function(e){return e===r}));this.d_selection[i]=V(this.modelValue[i]).slice(Math.min(o,s),Math.max(o,s)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var i="sourceList"===t?0:1,n=p.find(this.$refs[t].$el,'[data-pc-section="item"]'),o=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),r=V(n).findIndex((function(e){return e===o}));this.d_selection[i]=V(this.modelValue[i]).slice(0,r+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var i=p.find(this.$refs[t].$el,'[data-pc-section="item"]');if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,o=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),r=V(i).findIndex((function(e){return e===o}));this.d_selection[n]=V(this.modelValue[n]).slice(r,i.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(i.length-1,t);e.preventDefault()},findNextOptionIndex:function(e,t){var i=V(p.find(this.$refs[t].$el,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return i>-1?i+1:0},findPrevOptionIndex:function(e,t){var i=V(p.find(this.$refs[t].$el,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return i>-1?i-1:0},changeFocusedOptionIndex:function(e,t){var i=p.find(this.$refs[t].$el,'[data-pc-section="item"]'),n=e>=i.length?i.length-1:e<0?0:e;this.focusedOptionIndex=i[n].getAttribute("id"),this.scrollInView(i[n].getAttribute("id"),t)},scrollInView:function(e,t){var i=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},updateListScroll:function(e){var t=p.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":p.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":p.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 d.isEmpty(this[e])},moveSourceDisabled:function(){return d.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()},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:e,AngleRightIcon:l,AngleLeftIcon:s,AngleDownIcon:r,AngleUpIcon:a,AngleDoubleRightIcon:n,AngleDoubleLeftIcon:i,AngleDoubleDownIcon:t,AngleDoubleUpIcon:o},directives:{ripple:c}};function F(e){return F="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},F(e)}function H(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function R(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach((function(t){W(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function W(e,t,i){return(t=N(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function N(e){var t=q(e,"string");return"symbol"===F(t)?t:String(t)}function q(e,t){if("object"!==F(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==F(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var z=["id","onClick","onDblclick","onMousedown","aria-selected","data-p-highlight","data-p-focused"],G=["id","onClick","onDblclick","onMousedown","aria-selected","data-p-highlight","data-p-focused"];j.render=function(e,t,i,n,o,r){var s=f("AngleUpIcon"),l=f("PLButton"),a=f("AngleDoubleUpIcon"),c=f("AngleDownIcon"),u=f("AngleDoubleDownIcon"),d=v("ripple");return g(),b("div",y({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(g(),b("div",y({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls")),[I(e.$slots,"sourcecontrolsstart"),$(l,y({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return r.moveUp(e,0)})},R(R({},e.moveUpButtonProps),e.ptm("sourceMoveUpButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"moveupicon",{},(function(){return[$(s,w(k(e.ptm("sourceMoveUpButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),$(l,y({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return r.moveTop(e,0)})},R(R({},e.moveTopButtonProps),e.ptm("sourceMoveTopButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movetopicon",{},(function(){return[$(a,w(k(e.ptm("sourceMoveTopButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),$(l,y({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return r.moveDown(e,0)})},R(R({},e.moveDownButtonProps),e.ptm("sourceMoveDownButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movedownicon",{},(function(){return[$(c,w(k(e.ptm("sourceMoveDownButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),$(l,y({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return r.moveBottom(e,0)})},R(R({},e.moveBottomButtonProps),e.ptm("sourceMoveBottomButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movebottomicon",{},(function(){return[$(u,w(k(e.ptm("sourceMoveBottomButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),I(e.$slots,"sourcecontrolsend")],16)):T("",!0),x("div",y({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper")),[e.$slots.sourceheader?(g(),b("div",y({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader")),[I(e.$slots,"sourceheader")],16)):T("",!0),$(D,y({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":o.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")})},R(R({},e.sourceListProps),e.ptm("sourceList"))),{default:L((function(){return[(g(!0),b(A,null,S(r.sourceList,(function(i,n){return _((g(),b("li",y({key:r.getItemKey(i,n),id:r.idSource+"_"+n,class:e.cx("item",{item:i,id:"".concat(r.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return r.onItemClick(e,i,n,0)},onDblclick:function(e){return r.onItemDblClick(e,i,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(i,0)},r.getPTOptions(i,"item"),{"data-p-highlight":r.isSelected(i,0),"data-p-focused":"".concat(o.id,"_").concat(n)===r.focusedOptionId}),[I(e.$slots,"item",{item:i,index:n})],16,z)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),x("div",y({class:e.cx("buttons")},e.ptm("buttons")),[I(e.$slots,"movecontrolsstart"),$(l,y({"aria-label":r.moveToTargetAriaLabel,type:"button",onClick:r.moveToTarget,disabled:r.moveDisabled(0)},R(R({},e.moveToTargetProps),e.ptm("moveToTargetButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movetotargeticon",{viewChanged:o.viewChanged},(function(){return[(g(),C(B(o.viewChanged?"AngleDownIcon":"AngleRightIcon"),w(k(e.ptm("moveToTargetButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","unstyled"]),$(l,y({"aria-label":r.moveAllToTargetAriaLabel,type:"button",onClick:r.moveAllToTarget,disabled:r.moveAllDisabled("sourceList")},R(R({},e.moveAllToTargetProps),e.ptm("moveAllToTargetButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movealltotargeticon",{viewChanged:o.viewChanged},(function(){return[(g(),C(B(o.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),w(k(e.ptm("moveAllToTargetButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","unstyled"]),$(l,y({"aria-label":r.moveToSourceAriaLabel,type:"button",onClick:r.moveToSource,disabled:r.moveDisabled(1)},R(R({},e.moveToSourceProps),e.ptm("moveToSourceButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movetosourceicon",{viewChanged:o.viewChanged},(function(){return[(g(),C(B(o.viewChanged?"AngleUpIcon":"AngleLeftIcon"),w(k(e.ptm("moveToSourceButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","unstyled"]),$(l,y({"aria-label":r.moveAllToSourceAriaLabel,type:"button",onClick:r.moveAllToSource,disabled:r.moveSourceDisabled("targetList")},R(R({},e.moveAllToSourceProps),e.ptm("moveAllToSourceButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movealltosourceicon",{viewChanged:o.viewChanged},(function(){return[(g(),C(B(o.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),w(k(e.ptm("moveAllToSourceButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","unstyled"]),I(e.$slots,"movecontrolsend")],16),x("div",y({class:e.cx("targetWrapper")},e.ptm("targetWrapper")),[e.$slots.targetheader?(g(),b("div",y({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader")),[I(e.$slots,"targetheader")],16)):T("",!0),$(D,y({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":o.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")})},R(R({},e.targetListProps),e.ptm("targetList"))),{default:L((function(){return[(g(!0),b(A,null,S(r.targetList,(function(i,n){return _((g(),b("li",y({key:r.getItemKey(i,n),id:r.idTarget+"_"+n,class:e.cx("item",{item:i,id:"".concat(r.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return r.onItemClick(e,i,n,1)},onDblclick:function(e){return r.onItemDblClick(e,i,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(i,1)},r.getPTOptions(i,"item"),{"data-p-highlight":r.isSelected(i,1),"data-p-focused":"".concat(o.id,"_").concat(n)===r.focusedOptionId}),[I(e.$slots,"item",{item:i,index:n})],16,G)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(g(),b("div",y({key:1,class:e.cx("targetControls")},e.ptm("targetControls")),[I(e.$slots,"targetcontrolsstart"),$(l,y({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return r.moveUp(e,1)})},R(R({},e.moveUpButtonProps),e.ptm("targetMoveUpButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"moveupicon",{},(function(){return[$(s,w(k(e.ptm("targetMoveUpButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),$(l,y({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return r.moveTop(e,1)})},R(R({},e.moveTopButtonProps),e.ptm("targetMoveTopButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movetopicon",{},(function(){return[$(a,w(k(e.ptm("targetMoveTopButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),$(l,y({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return r.moveDown(e,1)})},R(R({},e.moveDownButtonProps),e.ptm("targetMoveDownButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movedownicon",{},(function(){return[$(c,w(k(e.ptm("targetMoveDownButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),$(l,y({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return r.moveBottom(e,1)})},R(R({},e.moveBottomButtonProps),e.ptm("targetMoveBottomButton")),{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movebottomicon",{},(function(){return[$(u,w(k(e.ptm("targetMoveBottomButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","unstyled"]),I(e.$slots,"targetcontrolsend")],16)):T("",!0)],16)};export{j as default};
|
|
1
|
+
import e from"primevue/button";import t from"primevue/icons/angledoubledown";import i from"primevue/icons/angledoubleleft";import n from"primevue/icons/angledoubleright";import o from"primevue/icons/angledoubleup";import r from"primevue/icons/angledown";import s from"primevue/icons/angleleft";import l from"primevue/icons/angleright";import a from"primevue/icons/angleup";import c from"primevue/ripple";import{UniqueComponentId as u,ObjectUtils as d,DomHandler as p}from"primevue/utils";import m from"primevue/basecomponent";import{useStyle as h}from"primevue/usestyle";import{resolveComponent as f,resolveDirective as v,openBlock as g,createElementBlock as b,mergeProps as y,renderSlot as I,createVNode as $,withCtx as L,normalizeProps as w,guardReactiveProps as k,createCommentVNode as T,createElementVNode as x,TransitionGroup as D,Fragment as S,renderList as A,withDirectives as _,createBlock as C,resolveDynamicComponent as B}from"vue";var O=h("\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 V(e){return M(e)||K(e)||P(e)||E()}function E(){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 P(e,t){if(e){if("string"==typeof e)return U(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?U(e,t):void 0}}function K(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function M(e){if(Array.isArray(e))return U(e)}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var j={name:"PickList",extends:{name:"BasePickList",extends:m,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,i=e.id;return["p-picklist-item",{"p-highlight":t.isSelected(e.item,e.listIndex),"p-focus":i===t.focusedOptionId}]},targetControls:"p-picklist-buttons p-picklist-target-controls"},loadStyle:O.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()},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(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?d.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,i,n){return this.ptm(t,{context:{active:this.isSelected(e,n),focused:i===this.focusedOptionId}})},isSelected:function(e,t){return-1!=d.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){var i=p.findSingle(this.$refs[t].$el,'[data-p-highlight="true"]'),n=d.findIndexInList(i,this.$refs[t].$el.children);this.focused[t]=!0,this.changeFocusedOptionIndex(-1!==this.focusedOptionIndex?this.focusedOptionIndex:i?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 i=V(this.modelValue[t]),n=this.d_selection[t],o=0;o<n.length;o++){var r=d.findIndexInList(n[o],i);if(0===r)break;var s=i[r-1];i[r-1]=i[r],i[r]=s}var l=V(this.modelValue);l[t]=i,this.reorderDirection="up",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var i=V(this.modelValue[t]),n=this.d_selection[t],o=0;o<n.length;o++){var r=d.findIndexInList(n[o],i);if(0===r)break;var s=i.splice(r,1)[0];i.unshift(s)}var l=V(this.modelValue);l[t]=i,this.reorderDirection="top",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var i=V(this.modelValue[t]),n=this.d_selection[t],o=n.length-1;o>=0;o--){var r=d.findIndexInList(n[o],i);if(r===i.length-1)break;var s=i[r+1];i[r+1]=i[r],i[r]=s}var l=V(this.modelValue);l[t]=i,this.reorderDirection="down",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var i=V(this.modelValue[t]),n=this.d_selection[t],o=n.length-1;o>=0;o--){var r=d.findIndexInList(n[o],i);if(r===i.length-1)break;var s=i.splice(r,1)[0];i.push(s)}var l=V(this.modelValue);l[t]=i,this.reorderDirection="bottom",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,i=V(this.modelValue[0]),n=V(this.modelValue[1]);if(t){for(var o=0;o<t.length;o++){var r=t[o];-1==d.findIndexInList(r,n)&&n.push(i.splice(d.findIndexInList(r,i),1)[0])}var s=V(this.modelValue);s[0]=i,s[1]=n,this.$emit("update:modelValue",s),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=V(this.modelValue[0]),i=V(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[].concat(V(i),V(t)),t=[];var n=V(this.modelValue);n[0]=t,n[1]=i,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,i=V(this.modelValue[0]),n=V(this.modelValue[1]);if(t){for(var o=0;o<t.length;o++){var r=t[o];-1==d.findIndexInList(r,i)&&i.push(n.splice(d.findIndexInList(r,n),1)[0])}var s=V(this.modelValue);s[0]=i,s[1]=n,this.$emit("update:modelValue",s),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=V(this.modelValue[0]),i=V(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[].concat(V(t),V(i)),i=[];var n=V(this.modelValue);n[0]=t,n[1]=i,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,i,n){var o=0===n?"sourceList":"targetList";this.itemTouched=!1;var r,s=this.d_selection[n],l=d.findIndexInList(t,this.d_selection),a=-1!=l,c=!this.itemTouched&&this.metaKeySelection,u=p.find(this.$refs[o].$el,'[data-pc-section="item"]')[i].getAttribute("id");if(this.focusedOptionIndex=u,c){var m=e.metaKey||e.ctrlKey;a&&m?r=s.filter((function(e,t){return t!==l})):(r=m&&s?V(s):[]).push(t)}else a?r=s.filter((function(e,t){return t!==l})):(r=s?V(s):[]).push(t);var h=V(this.d_selection);h[n]=r,this.d_selection=h,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,i){0===i?this.moveToTarget(e):1===i&&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=V(this.modelValue),this.$emit("update:selection",this.d_selection))}},onArrowDownKey:function(e,t){var i=this.findNextOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(i,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var i=this.findPrevOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(i,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var i=p.find(this.$refs[t].$el,'[data-pc-section="item"]'),n=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),o=V(i).findIndex((function(e){return e===n})),r="sourceList"===t?0:1;this.onItemClick(e,this.modelValue[r][o],o,r),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey){var i="sourceList"===t?0:1,n=p.find(this.$refs[t].$el,'[data-pc-section="item"]'),o=d.findIndexInList(this.d_selection[i][0],V(this.modelValue[i])),r=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),s=V(n).findIndex((function(e){return e===r}));this.d_selection[i]=V(this.modelValue[i]).slice(Math.min(o,s),Math.max(o,s)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var i="sourceList"===t?0:1,n=p.find(this.$refs[t].$el,'[data-pc-section="item"]'),o=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),r=V(n).findIndex((function(e){return e===o}));this.d_selection[i]=V(this.modelValue[i]).slice(0,r+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var i=p.find(this.$refs[t].$el,'[data-pc-section="item"]');if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,o=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]")),r=V(i).findIndex((function(e){return e===o}));this.d_selection[n]=V(this.modelValue[n]).slice(r,i.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(i.length-1,t);e.preventDefault()},findNextOptionIndex:function(e,t){var i=V(p.find(this.$refs[t].$el,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return i>-1?i+1:0},findPrevOptionIndex:function(e,t){var i=V(p.find(this.$refs[t].$el,'[data-pc-section="item"]')).findIndex((function(t){return t.id===e}));return i>-1?i-1:0},changeFocusedOptionIndex:function(e,t){var i=p.find(this.$refs[t].$el,'[data-pc-section="item"]'),n=e>=i.length?i.length-1:e<0?0:e;this.focusedOptionIndex=i[n].getAttribute("id"),this.scrollInView(i[n].getAttribute("id"),t)},scrollInView:function(e,t){var i=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},updateListScroll:function(e){var t=p.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":p.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":p.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 d.isEmpty(this[e])},moveSourceDisabled:function(){return d.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()},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:e,AngleRightIcon:l,AngleLeftIcon:s,AngleDownIcon:r,AngleUpIcon:a,AngleDoubleRightIcon:n,AngleDoubleLeftIcon:i,AngleDoubleDownIcon:t,AngleDoubleUpIcon:o},directives:{ripple:c}};function F(e){return F="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},F(e)}function H(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function R(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach((function(t){W(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function W(e,t,i){return(t=N(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function N(e){var t=q(e,"string");return"symbol"===F(t)?t:String(t)}function q(e,t){if("object"!==F(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==F(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var z=["id","onClick","onDblclick","onMousedown","aria-selected","data-p-highlight","data-p-focused"],G=["id","onClick","onDblclick","onMousedown","aria-selected","data-p-highlight","data-p-focused"];j.render=function(e,t,i,n,o,r){var s=f("AngleUpIcon"),l=f("PLButton"),a=f("AngleDoubleUpIcon"),c=f("AngleDownIcon"),u=f("AngleDoubleDownIcon"),d=v("ripple");return g(),b("div",y({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(g(),b("div",y({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls")),[I(e.$slots,"sourcecontrolsstart"),$(l,y({"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:L((function(){return[I(e.$slots,"moveupicon",{},(function(){return[$(s,w(k(e.ptm("sourceMoveUpButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),$(l,y({"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:L((function(){return[I(e.$slots,"movetopicon",{},(function(){return[$(a,w(k(e.ptm("sourceMoveTopButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),$(l,y({"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:L((function(){return[I(e.$slots,"movedownicon",{},(function(){return[$(c,w(k(e.ptm("sourceMoveDownButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),$(l,y({"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:L((function(){return[I(e.$slots,"movebottomicon",{},(function(){return[$(u,w(k(e.ptm("sourceMoveBottomButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),I(e.$slots,"sourcecontrolsend")],16)):T("",!0),x("div",y({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper")),[e.$slots.sourceheader?(g(),b("div",y({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader")),[I(e.$slots,"sourceheader")],16)):T("",!0),$(D,y({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":o.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")})},R(R({},e.sourceListProps),e.ptm("sourceList"))),{default:L((function(){return[(g(!0),b(S,null,A(r.sourceList,(function(i,n){return _((g(),b("li",y({key:r.getItemKey(i,n),id:r.idSource+"_"+n,class:e.cx("item",{item:i,id:"".concat(r.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return r.onItemClick(e,i,n,0)},onDblclick:function(e){return r.onItemDblClick(e,i,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(i,0)},r.getPTOptions(i,"item","".concat(r.idSource,"_").concat(n),0),{"data-p-highlight":r.isSelected(i,0),"data-p-focused":"".concat(r.idSource,"_").concat(n)===r.focusedOptionId}),[I(e.$slots,"item",{item:i,index:n})],16,z)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),x("div",y({class:e.cx("buttons")},e.ptm("buttons")),[I(e.$slots,"movecontrolsstart"),$(l,y({"aria-label":r.moveToTargetAriaLabel,type:"button",onClick:r.moveToTarget,disabled:r.moveDisabled(0),pt:e.ptm("moveToTargetButton")},e.moveToTargetProps,{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movetotargeticon",{viewChanged:o.viewChanged},(function(){return[(g(),C(B(o.viewChanged?"AngleDownIcon":"AngleRightIcon"),w(k(e.ptm("moveToTargetButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),$(l,y({"aria-label":r.moveAllToTargetAriaLabel,type:"button",onClick:r.moveAllToTarget,disabled:r.moveAllDisabled("sourceList"),pt:e.ptm("moveAllToTargetButton")},e.moveAllToTargetProps,{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movealltotargeticon",{viewChanged:o.viewChanged},(function(){return[(g(),C(B(o.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),w(k(e.ptm("moveAllToTargetButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),$(l,y({"aria-label":r.moveToSourceAriaLabel,type:"button",onClick:r.moveToSource,disabled:r.moveDisabled(1),pt:e.ptm("moveToSourceButton")},e.moveToSourceProps,{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movetosourceicon",{viewChanged:o.viewChanged},(function(){return[(g(),C(B(o.viewChanged?"AngleUpIcon":"AngleLeftIcon"),w(k(e.ptm("moveToSourceButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),$(l,y({"aria-label":r.moveAllToSourceAriaLabel,type:"button",onClick:r.moveAllToSource,disabled:r.moveSourceDisabled("targetList"),pt:e.ptm("moveAllToSourceButton")},e.moveAllToSourceProps,{unstyled:e.unstyled}),{icon:L((function(){return[I(e.$slots,"movealltosourceicon",{viewChanged:o.viewChanged},(function(){return[(g(),C(B(o.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),w(k(e.ptm("moveAllToSourceButton").icon)),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),I(e.$slots,"movecontrolsend")],16),x("div",y({class:e.cx("targetWrapper")},e.ptm("targetWrapper")),[e.$slots.targetheader?(g(),b("div",y({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader")),[I(e.$slots,"targetheader")],16)):T("",!0),$(D,y({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":o.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")})},R(R({},e.targetListProps),e.ptm("targetList"))),{default:L((function(){return[(g(!0),b(S,null,A(r.targetList,(function(i,n){return _((g(),b("li",y({key:r.getItemKey(i,n),id:r.idTarget+"_"+n,class:e.cx("item",{item:i,id:"".concat(r.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return r.onItemClick(e,i,n,1)},onDblclick:function(e){return r.onItemDblClick(e,i,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(i,1)},r.getPTOptions(i,"item","".concat(r.idTarget,"_").concat(n),1),{"data-p-highlight":r.isSelected(i,1),"data-p-focused":"".concat(r.idTarget,"_").concat(n)===r.focusedOptionId}),[I(e.$slots,"item",{item:i,index:n})],16,G)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(g(),b("div",y({key:1,class:e.cx("targetControls")},e.ptm("targetControls")),[I(e.$slots,"targetcontrolsstart"),$(l,y({"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:L((function(){return[I(e.$slots,"moveupicon",{},(function(){return[$(s,w(k(e.ptm("targetMoveUpButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),$(l,y({"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:L((function(){return[I(e.$slots,"movetopicon",{},(function(){return[$(a,w(k(e.ptm("targetMoveTopButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),$(l,y({"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:L((function(){return[I(e.$slots,"movedownicon",{},(function(){return[$(c,w(k(e.ptm("targetMoveDownButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),$(l,y({"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:L((function(){return[I(e.$slots,"movebottomicon",{},(function(){return[$(u,w(k(e.ptm("targetMoveBottomButton").icon)),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),I(e.$slots,"targetcontrolsend")],16)):T("",!0)],16)};export{j as default};
|