primevue 3.32.0 → 3.32.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/accordion/Accordion.d.ts +2 -2
- package/accordiontab/AccordionTab.d.ts +4 -3
- package/autocomplete/AutoComplete.d.ts +17 -7
- package/autocomplete/AutoComplete.vue +2 -2
- package/autocomplete/autocomplete.cjs.js +3 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +3 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +3 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +2 -2
- package/avatargroup/AvatarGroup.d.ts +2 -2
- package/badge/Badge.d.ts +2 -2
- package/badgedirective/BadgeDirective.d.ts +2 -1
- package/basecomponent/BaseComponent.vue +67 -12
- package/basecomponent/basecomponent.cjs.js +76 -22
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +76 -22
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +76 -22
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +47 -7
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +47 -7
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +47 -7
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +44 -32
- package/baseicon/baseicon.cjs.js +19 -30
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +19 -30
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +20 -32
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.d.ts +2 -2
- package/breadcrumb/Breadcrumb.d.ts +2 -2
- package/button/Button.d.ts +2 -2
- package/button/Button.vue +2 -2
- package/button/button.cjs.js +2 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +2 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -2
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +30 -6
- package/calendar/Calendar.vue +9 -8
- package/calendar/calendar.cjs.js +19 -10
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +19 -10
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +19 -10
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +2 -2
- package/carousel/Carousel.d.ts +2 -2
- package/carousel/Carousel.vue +2 -1
- package/carousel/carousel.cjs.js +4 -3
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +4 -3
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +2 -2
- package/chart/Chart.d.ts +2 -2
- package/checkbox/Checkbox.d.ts +2 -2
- package/chip/Chip.d.ts +6 -4
- package/chips/Chips.d.ts +13 -4
- package/chips/Chips.vue +1 -1
- package/chips/chips.cjs.js +1 -0
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -0
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -0
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +2 -2
- package/colorpicker/ColorPicker.vue +1 -40
- package/colorpicker/colorpicker.cjs.js +8 -47
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +8 -47
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +8 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +13 -10
- package/columngroup/ColumnGroup.d.ts +2 -2
- package/config/PrimeVue.d.ts +2 -2
- package/confirmdialog/ConfirmDialog.d.ts +3 -2
- package/confirmpopup/ConfirmPopup.d.ts +3 -2
- package/contextmenu/ContextMenu.d.ts +3 -2
- package/core/core.js +551 -489
- package/core/core.min.js +10 -10
- package/datatable/BodyCell.vue +2 -0
- package/datatable/DataTable.d.ts +4 -2
- package/datatable/DataTable.vue +45 -15
- package/datatable/TableBody.vue +1 -1
- package/datatable/datatable.cjs.js +119 -74
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +119 -74
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +119 -74
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +2 -2
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +4 -3
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +4 -3
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
- package/deferredcontent/DeferredContent.d.ts +2 -2
- package/dialog/Dialog.d.ts +13 -3
- package/dialog/Dialog.vue +10 -7
- package/dialog/dialog.cjs.js +13 -7
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +14 -8
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +13 -7
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +2 -2
- package/dock/Dock.d.ts +2 -2
- package/dropdown/Dropdown.d.ts +21 -10
- package/dropdown/Dropdown.vue +9 -0
- package/dropdown/dropdown.cjs.js +8 -0
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +8 -0
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +8 -0
- package/dropdown/dropdown.min.js +1 -1
- package/editor/BaseEditor.vue +8 -6
- package/editor/Editor.d.ts +2 -2
- package/editor/editor.cjs.js +8 -6
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +8 -6
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +8 -6
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +2 -2
- package/fileupload/FileUpload.d.ts +12 -7
- package/fileupload/FileUpload.vue +4 -0
- package/fileupload/fileupload.cjs.js +4 -0
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -0
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +5 -2
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +2 -1
- package/galleria/Galleria.d.ts +2 -2
- package/galleria/GalleriaItem.vue +2 -2
- package/galleria/GalleriaThumbnails.vue +5 -1
- package/galleria/galleria.cjs.js +16 -7
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +16 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +16 -7
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +6 -4
- package/image/Image.vue +8 -6
- package/image/image.cjs.js +18 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +19 -6
- package/image/image.esm.min.js +1 -1
- package/image/image.js +18 -5
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +2 -2
- package/inplace/Inplace.d.ts +2 -2
- package/inputmask/InputMask.d.ts +2 -2
- package/inputnumber/InputNumber.d.ts +2 -2
- package/inputnumber/InputNumber.vue +1 -0
- package/inputnumber/inputnumber.cjs.js +1 -0
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +1 -0
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +1 -0
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +2 -2
- package/inputtext/InputText.d.ts +2 -2
- package/knob/Knob.d.ts +2 -2
- package/listbox/Listbox.d.ts +11 -5
- package/megamenu/MegaMenu.d.ts +3 -2
- package/menu/Menu.d.ts +2 -2
- package/menubar/Menubar.d.ts +3 -2
- package/message/BaseMessage.vue +5 -0
- package/message/Message.d.ts +4 -2
- package/message/message.cjs.js +1 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +1 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +1 -1
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +16 -6
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +1 -0
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -0
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -0
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +2 -2
- package/organizationchart/OrganizationChart.d.ts +2 -2
- package/overlaypanel/OverlayPanel.d.ts +2 -2
- package/package.json +9 -4
- package/paginator/Paginator.d.ts +2 -2
- package/panel/Panel.d.ts +3 -2
- package/panelmenu/PanelMenu.d.ts +3 -2
- package/passthrough/index.cjs.js +16 -60
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +0 -9
- package/passthrough/index.esm.js +16 -60
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +18 -59
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +365 -359
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.d.ts +1 -2
- package/passthrough/tailwind/index.esm.js +365 -359
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +365 -359
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +6 -4
- package/password/Password.vue +1 -0
- package/password/password.cjs.js +2 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -1
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +2 -2
- package/picklist/PickList.vue +9 -7
- package/picklist/picklist.cjs.js +27 -9
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +27 -9
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +27 -9
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +2 -2
- package/progressspinner/ProgressSpinner.d.ts +2 -2
- package/radiobutton/RadioButton.d.ts +2 -2
- package/rating/Rating.d.ts +3 -2
- package/resources/themes/arya-blue/theme.css +4 -4
- package/resources/themes/arya-green/theme.css +4 -4
- package/resources/themes/arya-orange/theme.css +4 -4
- package/resources/themes/arya-purple/theme.css +4 -4
- package/resources/themes/bootstrap4-dark-blue/theme.css +8 -11
- package/resources/themes/bootstrap4-dark-purple/theme.css +8 -11
- package/resources/themes/bootstrap4-light-blue/theme.css +8 -11
- package/resources/themes/bootstrap4-light-purple/theme.css +8 -11
- package/resources/themes/fluent-light/theme.css +4 -4
- package/resources/themes/lara-dark-blue/theme.css +4 -4
- package/resources/themes/lara-dark-indigo/theme.css +4 -4
- package/resources/themes/lara-dark-purple/theme.css +4 -4
- package/resources/themes/lara-dark-teal/theme.css +4 -4
- package/resources/themes/lara-light-blue/theme.css +4 -4
- package/resources/themes/lara-light-indigo/theme.css +4 -4
- package/resources/themes/lara-light-purple/theme.css +4 -4
- package/resources/themes/lara-light-teal/theme.css +4 -4
- package/resources/themes/luna-amber/theme.css +4 -4
- package/resources/themes/luna-blue/theme.css +4 -4
- package/resources/themes/luna-green/theme.css +4 -4
- package/resources/themes/luna-pink/theme.css +4 -4
- package/resources/themes/md-dark-deeppurple/theme.css +4 -4
- package/resources/themes/md-dark-indigo/theme.css +4 -4
- package/resources/themes/md-light-deeppurple/theme.css +4 -4
- package/resources/themes/md-light-indigo/theme.css +4 -4
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-dark-indigo/theme.css +4 -4
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-light-indigo/theme.css +4 -4
- package/resources/themes/mira/theme.css +4 -4
- package/resources/themes/nano/theme.css +4 -4
- package/resources/themes/nova/theme.css +4 -4
- package/resources/themes/nova-accent/theme.css +4 -4
- package/resources/themes/nova-alt/theme.css +4 -4
- package/resources/themes/nova-vue/theme.css +4 -4
- package/resources/themes/rhea/theme.css +4 -4
- package/resources/themes/saga-blue/theme.css +4 -4
- package/resources/themes/saga-green/theme.css +4 -4
- package/resources/themes/saga-orange/theme.css +4 -4
- package/resources/themes/saga-purple/theme.css +4 -4
- package/resources/themes/soho-dark/theme.css +4 -4
- package/resources/themes/soho-light/theme.css +4 -4
- package/resources/themes/tailwind-light/theme.css +4 -4
- package/resources/themes/vela-blue/theme.css +4 -4
- package/resources/themes/vela-green/theme.css +4 -4
- package/resources/themes/vela-orange/theme.css +4 -4
- package/resources/themes/vela-purple/theme.css +4 -4
- package/resources/themes/viva-dark/theme.css +4 -4
- package/resources/themes/viva-light/theme.css +4 -4
- package/ripple/Ripple.d.ts +2 -1
- package/scrollpanel/ScrollPanel.d.ts +2 -2
- package/scrolltop/ScrollTop.d.ts +2 -2
- package/selectbutton/SelectButton.d.ts +6 -2
- package/selectbutton/SelectButton.vue +2 -1
- package/selectbutton/selectbutton.cjs.js +2 -1
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +2 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -1
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +10 -4
- package/sidebar/Sidebar.vue +2 -2
- package/sidebar/sidebar.cjs.js +4 -2
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +5 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +4 -2
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +2 -2
- package/slider/Slider.d.ts +2 -2
- package/speeddial/SpeedDial.d.ts +9 -7
- package/speeddial/SpeedDial.vue +1 -1
- package/speeddial/speeddial.cjs.js +1 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +4 -2
- package/splitter/Splitter.d.ts +2 -2
- package/splitterpanel/SplitterPanel.d.ts +2 -2
- package/steps/Steps.d.ts +2 -2
- package/styleclass/StyleClass.d.ts +2 -1
- package/tabmenu/TabMenu.d.ts +2 -2
- package/tabpanel/TabPanel.d.ts +2 -2
- package/tabview/TabView.d.ts +2 -2
- package/tag/Tag.d.ts +2 -2
- package/terminal/Terminal.d.ts +2 -2
- package/textarea/Textarea.d.ts +2 -2
- package/tieredmenu/TieredMenu.d.ts +3 -2
- package/timeline/Timeline.d.ts +2 -2
- package/toast/BaseToast.vue +2 -0
- package/toast/Toast.d.ts +16 -4
- package/toast/toast.cjs.js +1 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +1 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +3 -2
- package/toolbar/Toolbar.d.ts +2 -2
- package/tooltip/Tooltip.d.ts +2 -1
- package/tree/Tree.d.ts +6 -2
- package/treeselect/TreeSelect.d.ts +3 -2
- package/treetable/TreeTable.d.ts +3 -2
- package/treetable/TreeTable.vue +4 -2
- package/treetable/treetable.cjs.js +6 -5
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +6 -5
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +6 -5
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +5 -2
- package/ts-helpers.d.ts +2 -0
- package/virtualscroller/VirtualScroller.d.ts +8 -6
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.fileupload=function(e,t,l,n,o,i,s,a,r,u,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=p(e),f=p(t),m=p(l),h=p(n),y=p(o),g=p(i),v=p(s),b=p(a),B=p(u),F=r.useStyle("\n.p-fileupload-content {\n position: relative;\n}\n\n.p-fileupload-content .p-progressbar {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.p-button.p-fileupload-choose {\n position: relative;\n overflow: hidden;\n}\n\n.p-fileupload-buttonbar {\n display: flex;\n flex-wrap: wrap;\n}\n\n.p-fileupload > input[type='file'],\n.p-fileupload-basic input[type='file'] {\n display: none;\n}\n\n.p-fluid .p-fileupload .p-button {\n width: auto;\n}\n\n.p-fileupload-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n\n.p-fileupload-file-thumbnail {\n flex-shrink: 0;\n}\n\n.p-fileupload-file-actions {\n margin-left: auto;\n}\n",{name:"fileupload",manual:!0}),C={name:"BaseFileUpload",extends:b.default,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},css:{classes:{root:function(e){return["p-fileupload p-fileupload-".concat(e.props.mode," p-component")]},buttonbar:"p-fileupload-buttonbar",chooseButton:function(e){var t=e.instance,l=e.props;return["p-button p-component p-fileupload-choose",{"p-fileupload-choose-selected":"basic"===l.mode&&t.hasFiles,"p-disabled":l.disabled,"p-focus":t.focused}]},chooseIcon:"p-button-icon p-button-icon-left",chooseButtonLabel:"p-button-label",content:"p-fileupload-content",empty:"p-fileupload-empty",uploadIcon:"p-button-icon p-button-icon-left",label:"p-button-label",file:"p-fileupload-file",thumbnail:"p-fileupload-file-thumbnail",details:"p-fileupload-file-details",fileName:"p-fileupload-file-name",fileSize:"p-fileupload-file-size",badge:"p-fileupload-file-badge",actions:"p-fileupload-file-actions",removeButton:"p-fileupload-file-remove"},loadStyle:F.load},provide:function(){return{$parentInstance:this}}},k={name:"FileContent",hostName:"FileUpload",extends:b.default,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){if(0===e)return"0 B";var t=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,t)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}},components:{FileUploadButton:d.default,FileUploadBadge:B.default,TimesIcon:m.default}},I=["alt","src","width"];function S(e){return w(e)||L(e)||D(e)||x()}function x(){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 L(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function w(e){if(Array.isArray(e))return $(e)}function E(e,t){var l="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!l){if(Array.isArray(e)||(l=D(e))||t&&e&&"number"==typeof e.length){l&&(e=l);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){l=l.call(e)},n:function(){var e=l.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==l.return||l.return()}finally{if(a)throw i}}}}function D(e,t){if(e){if("string"==typeof e)return $(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);return"Object"===l&&e.constructor&&(l=e.constructor.name),"Map"===l||"Set"===l?Array.from(e):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?$(e,t):void 0}}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var l=0,n=new Array(t);l<t;l++)n[l]=e[l];return n}k.render=function(e,t,l,n,o,i){var s=c.resolveComponent("FileUploadBadge"),a=c.resolveComponent("TimesIcon"),r=c.resolveComponent("FileUploadButton");return c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.files,(function(t,n){return c.openBlock(),c.createElementBlock("div",c.mergeProps({key:t.name+t.type+t.size,class:e.cx("file")},e.ptm("file")),[c.createElementVNode("img",c.mergeProps({role:"presentation",class:e.cx("thumbnail"),alt:t.name,src:t.objectURL,width:l.previewWidth},e.ptm("thumbnail")),null,16,I),c.createElementVNode("div",c.mergeProps({class:e.cx("details")},e.ptm("details")),[c.createElementVNode("div",c.mergeProps({class:e.cx("fileName")},e.ptm("fileName")),c.toDisplayString(t.name),17),c.createElementVNode("span",c.mergeProps({class:e.cx("fileSize")},e.ptm("fileSize")),c.toDisplayString(i.formatSize(t.size)),17),c.createVNode(s,{value:l.badgeValue,class:c.normalizeClass(e.cx("badge")),severity:l.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),c.createElementVNode("div",c.mergeProps({class:e.cx("actions")},e.ptm("actions")),[c.createVNode(r,{onClick:function(t){return e.$emit("remove",n)},text:"",rounded:"",severity:"danger",class:c.normalizeClass(e.cx("removeButton")),unstyled:e.unstyled,pt:e.ptm("removeButton")},{icon:c.withCtx((function(o){return[l.templates.fileremoveicon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(l.templates.fileremoveicon),{key:0,class:c.normalizeClass(o.class),file:t,index:n},null,8,["class","file","index"])):(c.openBlock(),c.createBlock(a,c.mergeProps({key:1,class:o.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))]})),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)})),128)};var P={name:"FileUpload",extends:C,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)this.duplicateIEEvent=!1;else{this.messages=[],this.files=this.files||[];var t,l=E(e.dataTransfer?e.dataTransfer.files:e.target.files);try{for(l.s();!(t=l.n()).done;){var n=t.value;this.isFileSelected(n)||this.validate(n)&&(this.isImage(n)&&(n.objectURL=window.URL.createObjectURL(n)),this.files.push(n))}}catch(e){l.e(e)}finally{l.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,l=new FormData;this.$emit("before-upload",{xhr:t,formData:l});var n,o=E(this.files);try{for(o.s();!(n=o.n()).done;){var i=n.value;l.append(this.name,i,i.name)}}catch(e){o.e(e)}finally{o.f()}t.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(100*t.loaded/t.total)),e.$emit("progress",{originalEvent:t,progress:e.progress})})),t.onreadystatechange=function(){var l;4===t.readyState&&(e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(l=e.uploadedFiles).push.apply(l,S(e.files)),e.clear())},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:l}),t.withCredentials=this.withCredentials,t.send(l)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t,l=E(this.files);try{for(l.s();!(t=l.n()).done;){var n=t.value;if(n.name+n.type+n.size===e.name+e.type+e.size)return!0}}catch(e){l.e(e)}finally{l.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid:function(e){var t,l=this.accept.split(",").map((function(e){return e.trim()})),n=E(l);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(this.isWildcard(o)?this.getTypeClass(e.type)===this.getTypeClass(o):e.type==o||this.getFileExtension(e).toLowerCase()===o.toLowerCase())return!0}}catch(e){n.e(e)}finally{n.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return-1!==e.indexOf("*")},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||this.$refs.content.setAttribute("data-p-highlight",!1)},onDrop:function(e){if(!this.disabled){this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick:function(){this.hasFiles?this.upload():this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=S(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=S(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){if(0===e)return"0 B";var t=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,t)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return"advanced"===this.mode},isBasic:function(){return"basic"===this.mode},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((function(e){return e.name})).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:d.default,FileUploadProgressBar:g.default,FileUploadMessage:y.default,FileContent:k,PlusIcon:f.default,UploadIcon:h.default,TimesIcon:m.default},directives:{ripple:v.default}},U=["multiple","accept","disabled"],V=["accept","disabled","multiple"];return P.render=function(e,t,l,n,o,i){var s=c.resolveComponent("FileUploadButton"),a=c.resolveComponent("FileUploadProgressBar"),r=c.resolveComponent("FileUploadMessage"),u=c.resolveComponent("FileContent"),p=c.resolveDirective("ripple");return i.isAdvanced?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[c.createElementVNode("input",c.mergeProps({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),multiple:e.multiple,accept:e.accept,disabled:i.chooseDisabled},e.ptm("input")),null,16,U),c.createElementVNode("div",c.mergeProps({class:e.cx("buttonbar")},e.ptm("buttonbar")),[c.renderSlot(e.$slots,"header",{files:o.files,uploadedFiles:o.uploadedFiles,chooseCallback:i.choose,uploadCallback:i.upload,clearCallback:i.clear},(function(){return[c.withDirectives((c.openBlock(),c.createElementBlock("span",c.mergeProps({class:i.chooseButtonClass,style:e.style,onClick:t[1]||(t[1]=function(){return i.choose&&i.choose.apply(i,arguments)}),onKeydown:t[2]||(t[2]=c.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[3]||(t[3]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[4]||(t[4]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[c.renderSlot(e.$slots,"chooseicon",{class:c.normalizeClass(e.cx("chooseIcon"))},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),c.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),c.createElementVNode("span",c.mergeProps({class:e.cx("chooseButtonLabel")},e.ptm("chooseButtonLabel")),c.toDisplayString(i.chooseButtonLabel),17)],16)),[[p]]),e.showUploadButton?(c.openBlock(),c.createBlock(s,{key:0,label:i.uploadButtonLabel,onClick:i.upload,disabled:i.uploadDisabled,unstyled:e.unstyled,pt:e.ptm("uploadButton"),"data-pc-section":"uploadbutton"},{icon:c.withCtx((function(t){return[c.renderSlot(e.$slots,"uploadicon",{},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),c.mergeProps({class:[t.class,e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):c.createCommentVNode("",!0),e.showCancelButton?(c.openBlock(),c.createBlock(s,{key:1,label:i.cancelButtonLabel,onClick:i.clear,disabled:i.cancelDisabled,unstyled:e.unstyled,pt:e.ptm("cancelButton"),"data-pc-section":"cancelbutton"},{icon:c.withCtx((function(t){return[c.renderSlot(e.$slots,"cancelicon",{},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.cancelIcon?"span":"TimesIcon"),c.mergeProps({class:[t.class,e.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):c.createCommentVNode("",!0)]}))],16),c.createElementVNode("div",c.mergeProps({ref:"content",class:e.cx("content"),onDragenter:t[5]||(t[5]=function(){return i.onDragEnter&&i.onDragEnter.apply(i,arguments)}),onDragover:t[6]||(t[6]=function(){return i.onDragOver&&i.onDragOver.apply(i,arguments)}),onDragleave:t[7]||(t[7]=function(){return i.onDragLeave&&i.onDragLeave.apply(i,arguments)}),onDrop:t[8]||(t[8]=function(){return i.onDrop&&i.onDrop.apply(i,arguments)})},e.ptm("content"),{"data-p-highlight":!1}),[c.renderSlot(e.$slots,"content",{files:o.files,uploadedFiles:o.uploadedFiles,removeUploadedFileCallback:i.removeUploadedFile,removeFileCallback:i.remove,progress:o.progress,messages:o.messages},(function(){return[i.hasFiles?(c.openBlock(),c.createBlock(a,{key:0,value:o.progress,showValue:!1,unstyled:e.unstyled,pt:e.ptm("progressbar")},null,8,["value","unstyled","pt"])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.messages,(function(t){return c.openBlock(),c.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("message")},{default:c.withCtx((function(){return[c.createTextVNode(c.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),i.hasFiles?(c.openBlock(),c.createBlock(u,{key:1,files:o.files,onRemove:i.remove,badgeValue:i.pendingLabel,previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])):c.createCommentVNode("",!0),c.createVNode(u,{files:o.uploadedFiles,onRemove:i.removeUploadedFile,badgeValue:i.completedLabel,badgeSeverity:"success",previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]})),!e.$slots.empty||i.hasFiles||i.hasUploadedFiles?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,class:e.cx("empty")},e.ptm("empty")),[c.renderSlot(e.$slots,"empty")],16))],16)],16)):i.isBasic?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:1,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.messages,(function(t){return c.openBlock(),c.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("messages")},{default:c.withCtx((function(){return[c.createTextVNode(c.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),c.withDirectives((c.openBlock(),c.createElementBlock("span",c.mergeProps({class:i.chooseButtonClass,style:e.style,onMouseup:t[12]||(t[12]=function(){return i.onBasicUploaderClick&&i.onBasicUploaderClick.apply(i,arguments)}),onKeydown:t[13]||(t[13]=c.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[14]||(t[14]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[15]||(t[15]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[!i.hasFiles||e.auto?c.renderSlot(e.$slots,"uploadicon",{key:0,class:c.normalizeClass(e.cx("uploadIcon"))},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),c.mergeProps({class:[e.cx("uploadIcon"),e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))]})):c.renderSlot(e.$slots,"chooseicon",{key:1,class:c.normalizeClass(e.cx("chooseIcon"))},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),c.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),c.createElementVNode("span",c.mergeProps({class:e.cx("label")},e.ptm("label")),c.toDisplayString(i.basicChooseButtonLabel),17),i.hasFiles?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:2,ref:"fileInput",type:"file",accept:e.accept,disabled:e.disabled,multiple:e.multiple,onChange:t[9]||(t[9]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),onFocus:t[10]||(t[10]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[11]||(t[11]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)})},e.ptm("input")),null,16,V))],16)),[[p]])],16)):c.createCommentVNode("",!0)},P}(primevue.button,primevue.icons.plus,primevue.icons.times,primevue.icons.upload,primevue.message,primevue.progressbar,primevue.ripple,primevue.basecomponent,primevue.usestyle,primevue.badge,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.fileupload=function(e,t,l,n,o,i,s,a,r,u,c,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(e),m=d(t),h=d(l),y=d(n),g=d(o),v=d(i),b=d(s),B=d(r),F=d(c),C=u.useStyle("\n.p-fileupload-content {\n position: relative;\n}\n\n.p-fileupload-content .p-progressbar {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.p-button.p-fileupload-choose {\n position: relative;\n overflow: hidden;\n}\n\n.p-fileupload-buttonbar {\n display: flex;\n flex-wrap: wrap;\n}\n\n.p-fileupload > input[type='file'],\n.p-fileupload-basic input[type='file'] {\n display: none;\n}\n\n.p-fluid .p-fileupload .p-button {\n width: auto;\n}\n\n.p-fileupload-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n\n.p-fileupload-file-thumbnail {\n flex-shrink: 0;\n}\n\n.p-fileupload-file-actions {\n margin-left: auto;\n}\n",{name:"fileupload",manual:!0}),k={name:"BaseFileUpload",extends:B.default,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},css:{classes:{root:function(e){return["p-fileupload p-fileupload-".concat(e.props.mode," p-component")]},buttonbar:"p-fileupload-buttonbar",chooseButton:function(e){var t=e.instance,l=e.props;return["p-button p-component p-fileupload-choose",{"p-fileupload-choose-selected":"basic"===l.mode&&t.hasFiles,"p-disabled":l.disabled,"p-focus":t.focused}]},chooseIcon:"p-button-icon p-button-icon-left",chooseButtonLabel:"p-button-label",content:"p-fileupload-content",empty:"p-fileupload-empty",uploadIcon:"p-button-icon p-button-icon-left",label:"p-button-label",file:"p-fileupload-file",thumbnail:"p-fileupload-file-thumbnail",details:"p-fileupload-file-details",fileName:"p-fileupload-file-name",fileSize:"p-fileupload-file-size",badge:"p-fileupload-file-badge",actions:"p-fileupload-file-actions",removeButton:"p-fileupload-file-remove"},loadStyle:C.load},provide:function(){return{$parentInstance:this}}},I={name:"FileContent",hostName:"FileUpload",extends:B.default,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){if(0===e)return"0 B";var t=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,t)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}},components:{FileUploadButton:f.default,FileUploadBadge:F.default,TimesIcon:h.default}},S=["alt","src","width"];function x(e){return E(e)||w(e)||$(e)||L()}function L(){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 w(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function E(e){if(Array.isArray(e))return U(e)}function D(e,t){var l="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!l){if(Array.isArray(e)||(l=$(e))||t&&e&&"number"==typeof e.length){l&&(e=l);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){l=l.call(e)},n:function(){var e=l.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==l.return||l.return()}finally{if(a)throw i}}}}function $(e,t){if(e){if("string"==typeof e)return U(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);return"Object"===l&&e.constructor&&(l=e.constructor.name),"Map"===l||"Set"===l?Array.from(e):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?U(e,t):void 0}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var l=0,n=new Array(t);l<t;l++)n[l]=e[l];return n}I.render=function(e,t,l,n,o,i){var s=p.resolveComponent("FileUploadBadge"),a=p.resolveComponent("TimesIcon"),r=p.resolveComponent("FileUploadButton");return p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(l.files,(function(t,n){return p.openBlock(),p.createElementBlock("div",p.mergeProps({key:t.name+t.type+t.size,class:e.cx("file")},e.ptm("file")),[p.createElementVNode("img",p.mergeProps({role:"presentation",class:e.cx("thumbnail"),alt:t.name,src:t.objectURL,width:l.previewWidth},e.ptm("thumbnail")),null,16,S),p.createElementVNode("div",p.mergeProps({class:e.cx("details")},e.ptm("details")),[p.createElementVNode("div",p.mergeProps({class:e.cx("fileName")},e.ptm("fileName")),p.toDisplayString(t.name),17),p.createElementVNode("span",p.mergeProps({class:e.cx("fileSize")},e.ptm("fileSize")),p.toDisplayString(i.formatSize(t.size)),17),p.createVNode(s,{value:l.badgeValue,class:p.normalizeClass(e.cx("badge")),severity:l.badgeSeverity,unstyled:e.unstyled,pt:e.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("actions")},e.ptm("actions")),[p.createVNode(r,{onClick:function(t){return e.$emit("remove",n)},text:"",rounded:"",severity:"danger",class:p.normalizeClass(e.cx("removeButton")),unstyled:e.unstyled,pt:e.ptm("removeButton")},{icon:p.withCtx((function(o){return[l.templates.fileremoveicon?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(l.templates.fileremoveicon),{key:0,class:p.normalizeClass(o.class),file:t,index:n},null,8,["class","file","index"])):(p.openBlock(),p.createBlock(a,p.mergeProps({key:1,class:o.class,"aria-hidden":"true"},e.ptm("removeButton").icon),null,16,["class"]))]})),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)})),128)};var P={name:"FileUpload",extends:k,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)this.duplicateIEEvent=!1;else{this.messages=[],this.files=this.files||[];var t,l=D(e.dataTransfer?e.dataTransfer.files:e.target.files);try{for(l.s();!(t=l.n()).done;){var n=t.value;this.isFileSelected(n)||this.validate(n)&&(this.isImage(n)&&(n.objectURL=window.URL.createObjectURL(n)),this.files.push(n))}}catch(e){l.e(e)}finally{l.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),"drop"!==e.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,l=new FormData;this.$emit("before-upload",{xhr:t,formData:l});var n,o=D(this.files);try{for(o.s();!(n=o.n()).done;){var i=n.value;l.append(this.name,i,i.name)}}catch(e){o.e(e)}finally{o.f()}t.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(100*t.loaded/t.total)),e.$emit("progress",{originalEvent:t,progress:e.progress})})),t.onreadystatechange=function(){var l;4===t.readyState&&(e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(l=e.uploadedFiles).push.apply(l,x(e.files)),e.clear())},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:l}),t.withCredentials=this.withCredentials,t.send(l)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t,l=D(this.files);try{for(l.s();!(t=l.n()).done;){var n=t.value;if(n.name+n.type+n.size===e.name+e.type+e.size)return!0}}catch(e){l.e(e)}finally{l.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):!(this.maxFileSize&&e.size>this.maxFileSize)||(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1)},isFileTypeValid:function(e){var t,l=this.accept.split(",").map((function(e){return e.trim()})),n=D(l);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(this.isWildcard(o)?this.getTypeClass(e.type)===this.getTypeClass(o):e.type==o||this.getFileExtension(e).toLowerCase()===o.toLowerCase())return!0}}catch(e){n.e(e)}finally{n.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return-1!==e.indexOf("*")},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||(!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||t&&1===t.length)&&this.onFileSelect(e)}},onBasicUploaderClick:function(){this.hasFiles?this.upload():this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=x(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=x(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){if(0===e)return"0 B";var t=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,t)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return"advanced"===this.mode},isBasic:function(){return"basic"===this.mode},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map((function(e){return e.name})).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:f.default,FileUploadProgressBar:v.default,FileUploadMessage:g.default,FileContent:I,PlusIcon:m.default,UploadIcon:y.default,TimesIcon:h.default},directives:{ripple:b.default}},V=["multiple","accept","disabled"],N=["accept","disabled","multiple"];return P.render=function(e,t,l,n,o,i){var s=p.resolveComponent("FileUploadButton"),a=p.resolveComponent("FileUploadProgressBar"),r=p.resolveComponent("FileUploadMessage"),u=p.resolveComponent("FileContent"),c=p.resolveDirective("ripple");return i.isAdvanced?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[p.createElementVNode("input",p.mergeProps({ref:"fileInput",type:"file",onChange:t[0]||(t[0]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),multiple:e.multiple,accept:e.accept,disabled:i.chooseDisabled},e.ptm("input")),null,16,V),p.createElementVNode("div",p.mergeProps({class:e.cx("buttonbar")},e.ptm("buttonbar")),[p.renderSlot(e.$slots,"header",{files:o.files,uploadedFiles:o.uploadedFiles,chooseCallback:i.choose,uploadCallback:i.upload,clearCallback:i.clear},(function(){return[p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onClick:t[1]||(t[1]=function(){return i.choose&&i.choose.apply(i,arguments)}),onKeydown:t[2]||(t[2]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[3]||(t[3]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[4]||(t[4]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[p.renderSlot(e.$slots,"chooseicon",{class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("chooseButtonLabel")},e.ptm("chooseButtonLabel")),p.toDisplayString(i.chooseButtonLabel),17)],16)),[[c]]),e.showUploadButton?(p.openBlock(),p.createBlock(s,{key:0,label:i.uploadButtonLabel,onClick:i.upload,disabled:i.uploadDisabled,unstyled:e.unstyled,pt:e.ptm("uploadButton"),"data-pc-section":"uploadbutton"},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"uploadicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[t.class,e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0),e.showCancelButton?(p.openBlock(),p.createBlock(s,{key:1,label:i.cancelButtonLabel,onClick:i.clear,disabled:i.cancelDisabled,unstyled:e.unstyled,pt:e.ptm("cancelButton"),"data-pc-section":"cancelbutton"},{icon:p.withCtx((function(t){return[p.renderSlot(e.$slots,"cancelicon",{},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.cancelIcon?"span":"TimesIcon"),p.mergeProps({class:[t.class,e.cancelIcon],"aria-hidden":"true"},e.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]}))]})),_:3},8,["label","onClick","disabled","unstyled","pt"])):p.createCommentVNode("",!0)]}))],16),p.createElementVNode("div",p.mergeProps({ref:"content",class:e.cx("content"),onDragenter:t[5]||(t[5]=function(){return i.onDragEnter&&i.onDragEnter.apply(i,arguments)}),onDragover:t[6]||(t[6]=function(){return i.onDragOver&&i.onDragOver.apply(i,arguments)}),onDragleave:t[7]||(t[7]=function(){return i.onDragLeave&&i.onDragLeave.apply(i,arguments)}),onDrop:t[8]||(t[8]=function(){return i.onDrop&&i.onDrop.apply(i,arguments)})},e.ptm("content"),{"data-p-highlight":!1}),[p.renderSlot(e.$slots,"content",{files:o.files,uploadedFiles:o.uploadedFiles,removeUploadedFileCallback:i.removeUploadedFile,removeFileCallback:i.remove,progress:o.progress,messages:o.messages},(function(){return[i.hasFiles?(p.openBlock(),p.createBlock(a,{key:0,value:o.progress,showValue:!1,unstyled:e.unstyled,pt:e.ptm("progressbar")},null,8,["value","unstyled","pt"])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("message")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),i.hasFiles?(p.openBlock(),p.createBlock(u,{key:1,files:o.files,onRemove:i.remove,badgeValue:i.pendingLabel,previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])):p.createCommentVNode("",!0),p.createVNode(u,{files:o.uploadedFiles,onRemove:i.removeUploadedFile,badgeValue:i.completedLabel,badgeSeverity:"success",previewWidth:e.previewWidth,templates:e.$slots,unstyled:e.unstyled,pt:e.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]})),!e.$slots.empty||i.hasFiles||i.hasUploadedFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("empty")},e.ptm("empty")),[p.renderSlot(e.$slots,"empty")],16))],16)],16)):i.isBasic?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"fileupload"}),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.messages,(function(t){return p.openBlock(),p.createBlock(r,{key:t,severity:"error",onClose:i.onMessageClose,unstyled:e.unstyled,pt:e.ptm("messages")},{default:p.withCtx((function(){return[p.createTextVNode(p.toDisplayString(t),1)]})),_:2},1032,["onClose","unstyled","pt"])})),128)),p.withDirectives((p.openBlock(),p.createElementBlock("span",p.mergeProps({class:i.chooseButtonClass,style:e.style,onMouseup:t[12]||(t[12]=function(){return i.onBasicUploaderClick&&i.onBasicUploaderClick.apply(i,arguments)}),onKeydown:t[13]||(t[13]=p.withKeys((function(){return i.choose&&i.choose.apply(i,arguments)}),["enter"])),onFocus:t[14]||(t[14]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[15]||(t[15]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),tabindex:"0"},e.ptm("chooseButton")),[!i.hasFiles||e.auto?p.renderSlot(e.$slots,"uploadicon",{key:0,class:p.normalizeClass(e.cx("uploadIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.uploadIcon?"span":"UploadIcon"),p.mergeProps({class:[e.cx("uploadIcon"),e.uploadIcon],"aria-hidden":"true"},e.ptm("uploadIcon")),null,16,["class"]))]})):p.renderSlot(e.$slots,"chooseicon",{key:1,class:p.normalizeClass(e.cx("chooseIcon"))},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.chooseIcon?"span":"PlusIcon"),p.mergeProps({class:[e.cx("chooseIcon"),e.chooseIcon],"aria-hidden":"true"},e.ptm("chooseIcon")),null,16,["class"]))]})),p.createElementVNode("span",p.mergeProps({class:e.cx("label")},e.ptm("label")),p.toDisplayString(i.basicChooseButtonLabel),17),i.hasFiles?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("input",p.mergeProps({key:2,ref:"fileInput",type:"file",accept:e.accept,disabled:e.disabled,multiple:e.multiple,onChange:t[9]||(t[9]=function(){return i.onFileSelect&&i.onFileSelect.apply(i,arguments)}),onFocus:t[10]||(t[10]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[11]||(t[11]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)})},e.ptm("input")),null,16,N))],16)),[[c]])],16)):p.createCommentVNode("",!0)},P}(primevue.button,primevue.icons.plus,primevue.icons.times,primevue.icons.upload,primevue.message,primevue.progressbar,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,primevue.badge,Vue);
|
package/focustrap/FocusTrap.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { DirectiveBinding, ObjectDirective } from 'vue';
|
|
10
10
|
import { DirectiveHooks } from '../basedirective';
|
|
11
|
+
import { PTOptions } from '../ts-helpers';
|
|
11
12
|
|
|
12
13
|
export declare type FocusTrapDirectivePassThroughOptionType = FocusTrapDirectivePassThroughAttributes | null | undefined;
|
|
13
14
|
|
|
@@ -29,7 +30,7 @@ export interface FocusTrapOptions {
|
|
|
29
30
|
* Used to pass attributes to DOM elements inside the component.
|
|
30
31
|
* @type {FocusTrapDirectivePassThroughOptions}
|
|
31
32
|
*/
|
|
32
|
-
pt?: FocusTrapDirectivePassThroughOptions
|
|
33
|
+
pt?: PTOptions<FocusTrapDirectivePassThroughOptions>;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
/**
|
package/galleria/Galleria.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { ButtonHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
13
13
|
|
|
14
14
|
export declare type GalleriaPassThroughOptionType = GalleriaPassThroughAttributes | ((options: GalleriaPassThroughMethodOptions) => GalleriaPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
@@ -377,7 +377,7 @@ export interface GalleriaProps {
|
|
|
377
377
|
* Used to pass attributes to DOM elements inside the component.
|
|
378
378
|
* @type {GalleriaPassThroughOptions}
|
|
379
379
|
*/
|
|
380
|
-
pt?: GalleriaPassThroughOptions
|
|
380
|
+
pt?: PTOptions<GalleriaPassThroughOptions>;
|
|
381
381
|
/**
|
|
382
382
|
* When enabled, it removes component related styles in the core.
|
|
383
383
|
* @defaultValue false
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="cx('itemWrapper')" v-bind="ptm('itemWrapper')">
|
|
3
3
|
<div :class="cx('itemContainer')" v-bind="ptm('itemContainer')">
|
|
4
|
-
<button v-if="showItemNavigators" v-ripple type="button" :class="cx('previousItemButton')" @click="navBackward($event)" :disabled="isNavBackwardDisabled()" v-bind="ptm('previousItemButton')">
|
|
4
|
+
<button v-if="showItemNavigators" v-ripple type="button" :class="cx('previousItemButton')" @click="navBackward($event)" :disabled="isNavBackwardDisabled()" v-bind="ptm('previousItemButton')" data-pc-group-section="itemnavigator">
|
|
5
5
|
<component :is="templates.previousitemicon || 'ChevronLeftIcon'" :class="cx('previousItemIcon')" v-bind="ptm('previousItemIcon')" />
|
|
6
6
|
</button>
|
|
7
7
|
<div :id="id + '_item_' + activeIndex" :class="cx('item')" role="group" :aria-label="ariaSlideNumber(activeIndex + 1)" :aria-roledescription="ariaSlideLabel" v-bind="ptm('item')">
|
|
8
8
|
<component v-if="templates.item" :is="templates.item" :item="activeItem" />
|
|
9
9
|
</div>
|
|
10
|
-
<button v-if="showItemNavigators" v-ripple type="button" :class="cx('nextItemButton')" @click="navForward($event)" :disabled="isNavForwardDisabled()" v-bind="ptm('nextItemButton')">
|
|
10
|
+
<button v-if="showItemNavigators" v-ripple type="button" :class="cx('nextItemButton')" @click="navForward($event)" :disabled="isNavForwardDisabled()" v-bind="ptm('nextItemButton')" data-pc-group-section="itemnavigator">
|
|
11
11
|
<component :is="templates.nextitemicon || 'ChevronRightIcon'" :class="cx('nextItemIcon')" v-bind="ptm('nextItemIcon')" />
|
|
12
12
|
</button>
|
|
13
13
|
<div v-if="templates['caption']" :class="cx('caption')" v-bind="ptm('caption')">
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
:aria-label="ariaPrevButtonLabel"
|
|
11
11
|
@click="navBackward($event)"
|
|
12
12
|
v-bind="{ ...prevButtonProps, ...ptm('previousThumbnailButton') }"
|
|
13
|
+
data-pc-group-section="thumbnailnavigator"
|
|
13
14
|
>
|
|
14
15
|
<component :is="templates.previousthumbnailicon || (isVertical ? 'ChevronUpIcon' : 'ChevronLeftIcon')" :class="cx('previousThumbnailIcon')" v-bind="ptm('previousThumbnailIcon')" />
|
|
15
16
|
</button>
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
:aria-label="ariaNextButtonLabel"
|
|
53
54
|
@click="navForward($event)"
|
|
54
55
|
v-bind="{ ...nextButtonProps, ...ptm('nextThumbnailButton') }"
|
|
56
|
+
data-pc-group-section="thumbnailnavigator"
|
|
55
57
|
>
|
|
56
58
|
<component :is="templates.nextthumbnailicon || (isVertical ? 'ChevronDownIcon' : 'ChevronRightIcon')" :class="cx('nextThumbnailIcon')" v-bind="ptm('nextThumbnailIcon')" />
|
|
57
59
|
</button>
|
|
@@ -436,6 +438,8 @@ export default {
|
|
|
436
438
|
|
|
437
439
|
if (this.responsiveOptions && !this.isUnstyled) {
|
|
438
440
|
this.sortedResponsiveOptions = [...this.responsiveOptions];
|
|
441
|
+
const comparer = new Intl.Collator(undefined, { numeric: true }).compare;
|
|
442
|
+
|
|
439
443
|
this.sortedResponsiveOptions.sort((data1, data2) => {
|
|
440
444
|
const value1 = data1.breakpoint;
|
|
441
445
|
const value2 = data2.breakpoint;
|
|
@@ -444,7 +448,7 @@ export default {
|
|
|
444
448
|
if (value1 == null && value2 != null) result = -1;
|
|
445
449
|
else if (value1 != null && value2 == null) result = 1;
|
|
446
450
|
else if (value1 == null && value2 == null) result = 0;
|
|
447
|
-
else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1
|
|
451
|
+
else if (typeof value1 === 'string' && typeof value2 === 'string') result = comparer(value1, value2);
|
|
448
452
|
else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
449
453
|
|
|
450
454
|
return -1 * result;
|
package/galleria/galleria.cjs.js
CHANGED
|
@@ -400,7 +400,9 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
400
400
|
return $options.navBackward($event);
|
|
401
401
|
}),
|
|
402
402
|
disabled: $options.isNavBackwardDisabled()
|
|
403
|
-
}, _ctx.ptm('previousItemButton')
|
|
403
|
+
}, _ctx.ptm('previousItemButton'), {
|
|
404
|
+
"data-pc-group-section": "itemnavigator"
|
|
405
|
+
}), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.previousitemicon || 'ChevronLeftIcon'), vue.mergeProps({
|
|
404
406
|
"class": _ctx.cx('previousItemIcon')
|
|
405
407
|
}, _ctx.ptm('previousItemIcon')), null, 16, ["class"]))], 16, _hoisted_1$3)), [[_directive_ripple]]) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
406
408
|
id: $props.id + '_item_' + $props.activeIndex,
|
|
@@ -419,7 +421,9 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
419
421
|
return $options.navForward($event);
|
|
420
422
|
}),
|
|
421
423
|
disabled: $options.isNavForwardDisabled()
|
|
422
|
-
}, _ctx.ptm('nextItemButton')
|
|
424
|
+
}, _ctx.ptm('nextItemButton'), {
|
|
425
|
+
"data-pc-group-section": "itemnavigator"
|
|
426
|
+
}), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.nextitemicon || 'ChevronRightIcon'), vue.mergeProps({
|
|
423
427
|
"class": _ctx.cx('nextItemIcon')
|
|
424
428
|
}, _ctx.ptm('nextItemIcon')), null, 16, ["class"]))], 16, _hoisted_3$2)), [[_directive_ripple]]) : vue.createCommentVNode("", true), $props.templates['caption'] ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
425
429
|
key: 2,
|
|
@@ -792,13 +796,14 @@ var script$2 = {
|
|
|
792
796
|
var innerHTML = "\n #".concat(this.containerId, " [data-pc-section=\"thumbnailitem\"] {\n flex: 1 0 ").concat(100 / this.d_numVisible, "%\n }\n ");
|
|
793
797
|
if (this.responsiveOptions && !this.isUnstyled) {
|
|
794
798
|
this.sortedResponsiveOptions = _toConsumableArray(this.responsiveOptions);
|
|
799
|
+
var comparer = new Intl.Collator(undefined, {
|
|
800
|
+
numeric: true
|
|
801
|
+
}).compare;
|
|
795
802
|
this.sortedResponsiveOptions.sort(function (data1, data2) {
|
|
796
803
|
var value1 = data1.breakpoint;
|
|
797
804
|
var value2 = data2.breakpoint;
|
|
798
805
|
var result = null;
|
|
799
|
-
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1
|
|
800
|
-
numeric: true
|
|
801
|
-
});else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
806
|
+
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = comparer(value1, value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
802
807
|
return -1 * result;
|
|
803
808
|
});
|
|
804
809
|
for (var i = 0; i < this.sortedResponsiveOptions.length; i++) {
|
|
@@ -903,7 +908,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
903
908
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
904
909
|
return $options.navBackward($event);
|
|
905
910
|
})
|
|
906
|
-
}, _objectSpread$2(_objectSpread$2({}, $props.prevButtonProps), _ctx.ptm('previousThumbnailButton'))
|
|
911
|
+
}, _objectSpread$2(_objectSpread$2({}, $props.prevButtonProps), _ctx.ptm('previousThumbnailButton')), {
|
|
912
|
+
"data-pc-group-section": "thumbnailnavigator"
|
|
913
|
+
}), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.previousthumbnailicon || ($props.isVertical ? 'ChevronUpIcon' : 'ChevronLeftIcon')), vue.mergeProps({
|
|
907
914
|
"class": _ctx.cx('previousThumbnailIcon')
|
|
908
915
|
}, _ctx.ptm('previousThumbnailIcon')), null, 16, ["class"]))], 16, _hoisted_1$2)), [[_directive_ripple]]) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
909
916
|
"class": _ctx.cx('thumbnailItemsContainer'),
|
|
@@ -966,7 +973,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
966
973
|
onClick: _cache[5] || (_cache[5] = function ($event) {
|
|
967
974
|
return $options.navForward($event);
|
|
968
975
|
})
|
|
969
|
-
}, _objectSpread$2(_objectSpread$2({}, $props.nextButtonProps), _ctx.ptm('nextThumbnailButton'))
|
|
976
|
+
}, _objectSpread$2(_objectSpread$2({}, $props.nextButtonProps), _ctx.ptm('nextThumbnailButton')), {
|
|
977
|
+
"data-pc-group-section": "thumbnailnavigator"
|
|
978
|
+
}), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.nextthumbnailicon || ($props.isVertical ? 'ChevronDownIcon' : 'ChevronRightIcon')), vue.mergeProps({
|
|
970
979
|
"class": _ctx.cx('nextThumbnailIcon')
|
|
971
980
|
}, _ctx.ptm('nextThumbnailIcon')), null, 16, ["class"]))], 16, _hoisted_4)), [[_directive_ripple]]) : vue.createCommentVNode("", true)], 16)], 16);
|
|
972
981
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/focustrap"),t=require("primevue/portal"),n=require("primevue/utils"),i=require("primevue/basecomponent"),a=require("primevue/usestyle"),r=require("primevue/icons/times"),o=require("primevue/ripple"),l=require("primevue/icons/chevronleft"),s=require("primevue/icons/chevronright"),c=require("vue"),u=require("primevue/icons/chevrondown"),d=require("primevue/icons/chevronup");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=m(e),h=m(t),v=m(i),f=m(r),b=m(o),g=m(l),y=m(s),I=m(u),x=m(d),w=a.useStyle("\n.p-galleria-content {\n display: flex;\n flex-direction: column;\n}\n\n.p-galleria-item-wrapper {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.p-galleria-item-container {\n position: relative;\n display: flex;\n height: 100%;\n}\n\n.p-galleria-item-nav {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n}\n\n.p-galleria-item-prev {\n left: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-galleria-item-next {\n right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-galleria-item {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n}\n\n.p-galleria-item-nav-onhover .p-galleria-item-nav {\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav {\n pointer-events: all;\n opacity: 1;\n}\n\n.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled {\n pointer-events: none;\n}\n\n.p-galleria-caption {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n\n/* Thumbnails */\n.p-galleria-thumbnail-wrapper {\n display: flex;\n flex-direction: column;\n overflow: auto;\n flex-shrink: 0;\n}\n\n.p-galleria-thumbnail-prev,\n.p-galleria-thumbnail-next {\n align-self: center;\n flex: 0 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-galleria-thumbnail-prev span,\n.p-galleria-thumbnail-next span {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-galleria-thumbnail-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-galleria-thumbnail-items-container {\n overflow: hidden;\n width: 100%;\n}\n\n.p-galleria-thumbnail-items {\n display: flex;\n}\n\n.p-galleria-thumbnail-item {\n overflow: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n opacity: 0.5;\n}\n\n.p-galleria-thumbnail-item:hover {\n opacity: 1;\n transition: opacity 0.3s;\n}\n\n.p-galleria-thumbnail-item-current {\n opacity: 1;\n}\n\n/* Positions */\n/* Thumbnails */\n.p-galleria-thumbnails-left .p-galleria-content,\n.p-galleria-thumbnails-right .p-galleria-content {\n flex-direction: row;\n}\n\n.p-galleria-thumbnails-left .p-galleria-item-wrapper,\n.p-galleria-thumbnails-right .p-galleria-item-wrapper {\n flex-direction: row;\n}\n\n.p-galleria-thumbnails-left .p-galleria-item-wrapper,\n.p-galleria-thumbnails-top .p-galleria-item-wrapper {\n order: 2;\n}\n\n.p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper,\n.p-galleria-thumbnails-top .p-galleria-thumbnail-wrapper {\n order: 1;\n}\n\n.p-galleria-thumbnails-left .p-galleria-thumbnail-container,\n.p-galleria-thumbnails-right .p-galleria-thumbnail-container {\n flex-direction: column;\n flex-grow: 1;\n}\n\n.p-galleria-thumbnails-left .p-galleria-thumbnail-items,\n.p-galleria-thumbnails-right .p-galleria-thumbnail-items {\n flex-direction: column;\n height: 100%;\n}\n\n/* Indicators */\n.p-galleria-indicators {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-galleria-indicator > button {\n display: inline-flex;\n align-items: center;\n}\n\n.p-galleria-indicators-left .p-galleria-item-wrapper,\n.p-galleria-indicators-right .p-galleria-item-wrapper {\n flex-direction: row;\n align-items: center;\n}\n\n.p-galleria-indicators-left .p-galleria-item-container,\n.p-galleria-indicators-top .p-galleria-item-container {\n order: 2;\n}\n\n.p-galleria-indicators-left .p-galleria-indicators,\n.p-galleria-indicators-top .p-galleria-indicators {\n order: 1;\n}\n\n.p-galleria-indicators-left .p-galleria-indicators,\n.p-galleria-indicators-right .p-galleria-indicators {\n flex-direction: column;\n}\n\n.p-galleria-indicator-onitem .p-galleria-indicators {\n position: absolute;\n display: flex;\n}\n\n.p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators {\n top: 0;\n left: 0;\n width: 100%;\n align-items: flex-start;\n}\n\n.p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators {\n right: 0;\n top: 0;\n height: 100%;\n align-items: flex-end;\n}\n\n.p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators {\n bottom: 0;\n left: 0;\n width: 100%;\n align-items: flex-end;\n}\n\n.p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators {\n left: 0;\n top: 0;\n height: 100%;\n align-items: flex-start;\n}\n\n/* FullScreen */\n.p-galleria-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-galleria-close {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n}\n\n.p-galleria-mask .p-galleria-item-nav {\n position: fixed;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n/* Animation */\n.p-galleria-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n\n.p-galleria-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.p-galleria-enter-from,\n.p-galleria-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n\n.p-galleria-enter-active .p-galleria-item-nav {\n opacity: 0;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-galleria-thumbnail-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active {\n visibility: visible;\n}\n",{name:"galleria",manual:!0}),S={name:"BaseGalleria",extends:v.default,props:{id:{type:String,default:null},value:{type:Array,default:null},activeIndex:{type:Number,default:0},fullScreen:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},numVisible:{type:Number,default:3},responsiveOptions:{type:Array,default:null},showItemNavigators:{type:Boolean,default:!1},showThumbnailNavigators:{type:Boolean,default:!0},showItemNavigatorsOnHover:{type:Boolean,default:!1},changeItemOnIndicatorHover:{type:Boolean,default:!1},circular:{type:Boolean,default:!1},autoPlay:{type:Boolean,default:!1},transitionInterval:{type:Number,default:4e3},showThumbnails:{type:Boolean,default:!0},thumbnailsPosition:{type:String,default:"bottom"},verticalThumbnailViewPortHeight:{type:String,default:"300px"},showIndicators:{type:Boolean,default:!1},showIndicatorsOnItem:{type:Boolean,default:!1},indicatorsPosition:{type:String,default:"bottom"},baseZIndex:{type:Number,default:0},maskClass:{type:String,default:null},containerStyle:{type:null,default:null},containerClass:{type:null,default:null},containerProps:{type:null,default:null},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},css:{classes:{mask:function(e){var t=e.instance;return["p-galleria-mask p-component-overlay p-component-overlay-enter",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},root:function(e){var t=e.instance,n=t.$attrs.showThumbnails&&t.getPositionClass("p-galleria-thumbnails",t.$attrs.thumbnailsPosition),i=t.$attrs.showIndicators&&t.getPositionClass("p-galleria-indicators",t.$attrs.indicatorsPosition);return["p-galleria p-component",{"p-galleria-fullscreen":t.$attrs.fullScreen,"p-galleria-indicator-onitem":t.$attrs.showIndicatorsOnItem,"p-galleria-item-nav-onhover":t.$attrs.showItemNavigatorsOnHover&&!t.$attrs.fullScreen},n,i]},closeButton:"p-galleria-close p-link",closeIcon:"p-galleria-close-icon",header:"p-galleria-header",content:"p-galleria-content",footer:"p-galleria-footer",itemWrapper:"p-galleria-item-wrapper",itemContainer:"p-galleria-item-container",previousItemButton:function(e){return["p-galleria-item-prev p-galleria-item-nav p-link",{"p-disabled":e.instance.isNavBackwardDisabled()}]},previousItemIcon:"p-galleria-item-prev-icon",item:"p-galleria-item",nextItemButton:function(e){return["p-galleria-item-next p-galleria-item-nav p-link",{"p-disabled":e.instance.isNavForwardDisabled()}]},nextItemIcon:"p-galleria-item-next-icon",caption:"p-galleria-caption",indicators:"p-galleria-indicators p-reset",indicator:function(e){return["p-galleria-indicator",{"p-highlight":e.instance.isIndicatorItemActive(e.index)}]},indicatorButton:"p-link",thumbnailWrapper:"p-galleria-thumbnail-wrapper",thumbnailContainer:"p-galleria-thumbnail-container",previousThumbnailButton:function(e){return["p-galleria-thumbnail-prev p-link",{"p-disabled":e.instance.isNavBackwardDisabled()}]},previousThumbnailIcon:"p-galleria-thumbnail-prev-icon",thumbnailItemsContainer:"p-galleria-thumbnail-items-container",thumbnailItems:"p-galleria-thumbnail-items",thumbnailItem:function(e){var t=e.instance,n=e.index;return["p-galleria-thumbnail-item",{"p-galleria-thumbnail-item-current":e.activeIndex===n,"p-galleria-thumbnail-item-active":t.isItemActive(n),"p-galleria-thumbnail-item-start":t.firstItemAciveIndex()===n,"p-galleria-thumbnail-item-end":t.lastItemActiveIndex()===n}]},thumbnailItemContent:"p-galleria-thumbnail-item-content",nextThumbnailButton:function(e){return["p-galleria-thumbnail-next p-link",{"p-disabled":e.instance.isNavForwardDisabled()}]},nextThumbnailIcon:"p-galleria-thumbnail-next-icon"},loadStyle:w.load},provide:function(){return{$parentInstance:this}}},k={name:"GalleriaItem",hostName:"Galleria",extends:v.default,emits:["start-slideshow","stop-slideshow","update:activeIndex"],props:{circular:{type:Boolean,default:!1},activeIndex:{type:Number,default:0},value:{type:Array,default:null},showItemNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},slideShowActive:{type:Boolean,default:!0},changeItemOnIndicatorHover:{type:Boolean,default:!0},autoPlay:{type:Boolean,default:!1},templates:{type:null,default:null},id:{type:String,default:null}},mounted:function(){this.autoPlay&&this.$emit("start-slideshow")},methods:{getIndicatorPTOptions:function(e){return{context:{highlighted:this.activeIndex===e}}},next:function(){this.$emit("update:activeIndex",this.circular&&this.value.length-1===this.activeIndex?0:this.activeIndex+1)},prev:function(){this.$emit("update:activeIndex",this.circular&&0===this.activeIndex?this.value.length-1:0!==this.activeIndex?this.activeIndex-1:0)},stopSlideShow:function(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},navBackward:function(e){this.stopSlideShow(),this.prev(),e&&e.cancelable&&e.preventDefault()},navForward:function(e){this.stopSlideShow(),this.next(),e&&e.cancelable&&e.preventDefault()},onIndicatorClick:function(e){this.stopSlideShow(),this.$emit("update:activeIndex",e)},onIndicatorMouseEnter:function(e){this.changeItemOnIndicatorHover&&(this.stopSlideShow(),this.$emit("update:activeIndex",e))},onIndicatorKeyDown:function(e,t){switch(e.code){case"Enter":case"Space":this.stopSlideShow(),this.$emit("update:activeIndex",t),e.preventDefault();break;case"ArrowDown":case"ArrowUp":e.preventDefault()}},isIndicatorItemActive:function(e){return this.activeIndex===e},isNavBackwardDisabled:function(){return!this.circular&&0===this.activeIndex},isNavForwardDisabled:function(){return!this.circular&&this.activeIndex===this.value.length-1},ariaSlideNumber:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,e):void 0},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{activeItem:function(){return this.value[this.activeIndex]},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0}},components:{ChevronLeftIcon:g.default,ChevronRightIcon:y.default},directives:{ripple:b.default}},B=["disabled"],P=["id","aria-label","aria-roledescription"],C=["disabled"],$=["aria-label","aria-selected","aria-controls","onClick","onMouseenter","onKeydown","data-p-highlight"];function O(e){return A(e)||N(e)||D(e)||V()}function V(){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 D(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function N(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function A(e){if(Array.isArray(e))return T(e)}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}k.render=function(e,t,n,i,a,r){var o=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("itemWrapper")},e.ptm("itemWrapper")),[c.createElementVNode("div",c.mergeProps({class:e.cx("itemContainer")},e.ptm("itemContainer")),[n.showItemNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,type:"button",class:e.cx("previousItemButton"),onClick:t[0]||(t[0]=function(e){return r.navBackward(e)}),disabled:r.isNavBackwardDisabled()},e.ptm("previousItemButton")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.previousitemicon||"ChevronLeftIcon"),c.mergeProps({class:e.cx("previousItemIcon")},e.ptm("previousItemIcon")),null,16,["class"]))],16,B)),[[o]]):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({id:n.id+"_item_"+n.activeIndex,class:e.cx("item"),role:"group","aria-label":r.ariaSlideNumber(n.activeIndex+1),"aria-roledescription":r.ariaSlideLabel},e.ptm("item")),[n.templates.item?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.item),{key:0,item:r.activeItem},null,8,["item"])):c.createCommentVNode("",!0)],16,P),n.showItemNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:1,type:"button",class:e.cx("nextItemButton"),onClick:t[1]||(t[1]=function(e){return r.navForward(e)}),disabled:r.isNavForwardDisabled()},e.ptm("nextItemButton")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.nextitemicon||"ChevronRightIcon"),c.mergeProps({class:e.cx("nextItemIcon")},e.ptm("nextItemIcon")),null,16,["class"]))],16,C)),[[o]]):c.createCommentVNode("",!0),n.templates.caption?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:2,class:e.cx("caption")},e.ptm("caption")),[n.templates.caption?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.caption),{key:0,item:r.activeItem},null,8,["item"])):c.createCommentVNode("",!0)],16)):c.createCommentVNode("",!0)],16),n.showIndicators?(c.openBlock(),c.createElementBlock("ul",c.mergeProps({key:0,class:e.cx("indicators")},e.ptm("indicators")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,(function(t,i){return c.openBlock(),c.createElementBlock("li",c.mergeProps({key:"p-galleria-indicator-".concat(i),class:e.cx("indicator",{index:i}),tabindex:"0","aria-label":r.ariaPageLabel(i+1),"aria-selected":n.activeIndex===i,"aria-controls":n.id+"_item_"+i,onClick:function(e){return r.onIndicatorClick(i)},onMouseenter:function(e){return r.onIndicatorMouseEnter(i)},onKeydown:function(e){return r.onIndicatorKeyDown(e,i)}},e.ptm("indicator",r.getIndicatorPTOptions(i)),{"data-p-highlight":r.isIndicatorItemActive(i)}),[n.templates.indicator?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,type:"button",tabindex:"-1",class:e.cx("indicatorButton")},e.ptm("indicatorButton",r.getIndicatorPTOptions(i))),null,16)),n.templates.indicator?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.indicator),{key:1,index:i},null,8,["index"])):c.createCommentVNode("",!0)],16,$)})),128))],16)):c.createCommentVNode("",!0)],16)};var _={name:"GalleriaThumbnails",hostName:"Galleria",extends:v.default,emits:["stop-slideshow","update:activeIndex"],props:{containerId:{type:String,default:null},value:{type:Array,default:null},numVisible:{type:Number,default:3},activeIndex:{type:Number,default:0},isVertical:{type:Boolean,default:!1},slideShowActive:{type:Boolean,default:!1},circular:{type:Boolean,default:!1},responsiveOptions:{type:Array,default:null},contentHeight:{type:String,default:"300px"},showThumbnailNavigators:{type:Boolean,default:!0},templates:{type:null,default:null},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},startPos:null,thumbnailsStyle:null,sortedResponsiveOptions:null,data:function(){return{d_numVisible:this.numVisible,d_oldNumVisible:this.numVisible,d_activeIndex:this.activeIndex,d_oldActiveItemIndex:this.activeIndex,totalShiftedItems:0,page:0}},watch:{numVisible:function(e,t){this.d_numVisible=e,this.d_oldNumVisible=t},activeIndex:function(e,t){this.d_activeIndex=e,this.d_oldActiveItemIndex=t}},mounted:function(){this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners()},updated:function(){var e=this.totalShiftedItems;this.d_oldNumVisible===this.d_numVisible&&this.d_oldActiveItemIndex===this.d_activeIndex||((e=this.d_activeIndex<=this.getMedianItemIndex()?0:this.value.length-this.d_numVisible+this.getMedianItemIndex()<this.d_activeIndex?this.d_numVisible-this.value.length:this.value.length-this.d_numVisible<this.d_activeIndex&&this.d_numVisible%2==0?-1*this.d_activeIndex+this.getMedianItemIndex()+1:-1*this.d_activeIndex+this.getMedianItemIndex())!==this.totalShiftedItems&&(this.totalShiftedItems=e),this.$refs.itemsContainer.style.transform=this.isVertical?"translate3d(0, ".concat(e*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(e*(100/this.d_numVisible),"%, 0, 0)"),this.d_oldActiveItemIndex!==this.d_activeIndex&&(document.body.setAttribute("data-p-items-hidden","false"),!this.isUnstyled&&n.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.d_oldActiveItemIndex=this.d_activeIndex,this.d_oldNumVisible=this.d_numVisible)},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.thumbnailsStyle&&this.thumbnailsStyle.parentNode.removeChild(this.thumbnailsStyle)},methods:{step:function(e){var t=this.totalShiftedItems+e;e<0&&-1*t+this.d_numVisible>this.value.length-1?t=this.d_numVisible-this.value.length:e>0&&t>0&&(t=0),this.circular&&(e<0&&this.value.length-1===this.d_activeIndex?t=0:e>0&&0===this.d_activeIndex&&(t=this.d_numVisible-this.value.length)),this.$refs.itemsContainer&&(document.body.setAttribute("data-p-items-hidden","false"),!this.isUnstyled&&n.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical?"translate3d(0, ".concat(t*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(t*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=t},stopSlideShow:function(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},getMedianItemIndex:function(){var e=Math.floor(this.d_numVisible/2);return this.d_numVisible%2?e:e-1},navBackward:function(e){this.stopSlideShow();var t=0!==this.d_activeIndex?this.d_activeIndex-1:0;this.d_numVisible-(t+this.totalShiftedItems)-1>this.getMedianItemIndex()&&(-1*this.totalShiftedItems!=0||this.circular)&&this.step(1),this.$emit("update:activeIndex",this.circular&&0===this.d_activeIndex?this.value.length-1:t),e.cancelable&&e.preventDefault()},navForward:function(e){this.stopSlideShow();var t=this.d_activeIndex===this.value.length-1?this.value.length-1:this.d_activeIndex+1;t+this.totalShiftedItems>this.getMedianItemIndex()&&(-1*this.totalShiftedItems<this.getTotalPageNumber()-1||this.circular)&&this.step(-1),this.$emit("update:activeIndex",this.circular&&this.value.length-1===this.d_activeIndex?0:t),e.cancelable&&e.preventDefault()},onItemClick:function(e){this.stopSlideShow();var t=e;if(t!==this.d_activeIndex){var n=t+this.totalShiftedItems,i=0;t<this.d_activeIndex?(i=this.d_numVisible-n-1-this.getMedianItemIndex())>0&&-1*this.totalShiftedItems!=0&&this.step(i):(i=this.getMedianItemIndex()-n)<0&&-1*this.totalShiftedItems<this.getTotalPageNumber()-1&&this.step(i),this.$emit("update:activeIndex",t)}},onThumbnailKeydown:function(e,t){switch("Enter"!==e.code&&"Space"!==e.code||(this.onItemClick(t),e.preventDefault()),e.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":e.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var e=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]'),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t+1===e.length?e.length-1:t+1)},onLeftKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e-1<=0?0:e-1)},onHomeKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,0)},onEndKey:function(){var e=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]'),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,e.length-1)},onTabKey:function(){var e=O(n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]')),t=e.findIndex((function(e){return!0===n.DomHandler.getAttribute(e,"data-p-active")})),i=n.DomHandler.findSingle(this.$refs.itemsContainer,'[tabindex="0"]'),a=e.findIndex((function(e){return e===i.parentElement}));e[a].children[0].tabIndex="-1",e[t].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var e=O(n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]')),t=n.DomHandler.findSingle(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"] > [tabindex="0"]');return e.findIndex((function(e){return e===t.parentElement}))},changedFocusedIndicator:function(e,t){var i=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]');i[e].children[0].tabIndex="-1",i[t].children[0].tabIndex="0",i[t].children[0].focus()},onTransitionEnd:function(){this.$refs.itemsContainer&&(document.body.setAttribute("data-p-items-hidden","true"),!this.isUnstyled&&n.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="")},onTouchStart:function(e){var t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}},onTouchMove:function(e){e.cancelable&&e.preventDefault()},onTouchEnd:function(e){var t=e.changedTouches[0];this.changePageOnTouch(e,this.isVertical?t.pageY-this.startPos.y:t.pageX-this.startPos.x)},changePageOnTouch:function(e,t){t<0?this.navForward(e):this.navBackward(e)},getTotalPageNumber:function(){return this.value.length>this.d_numVisible?this.value.length-this.d_numVisible+1:0},createStyle:function(){var e;this.thumbnailsStyle||(this.thumbnailsStyle=document.createElement("style"),this.thumbnailsStyle.type="text/css",n.DomHandler.setAttribute(this.thumbnailsStyle,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.body.appendChild(this.thumbnailsStyle));var t="\n #".concat(this.containerId,' [data-pc-section="thumbnailitem"] {\n flex: 1 0 ').concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){this.sortedResponsiveOptions=O(this.responsiveOptions),this.sortedResponsiveOptions.sort((function(e,t){var n=e.breakpoint,i=t.breakpoint;return-1*(null==n&&null!=i?-1:null!=n&&null==i?1:null==n&&null==i?0:"string"==typeof n&&"string"==typeof i?n.localeCompare(i,void 0,{numeric:!0}):n<i?-1:n>i?1:0)}));for(var i=0;i<this.sortedResponsiveOptions.length;i++){var a=this.sortedResponsiveOptions[i];t+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n #").concat(this.containerId," .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}this.thumbnailsStyle.innerHTML=t},calculatePosition:function(){if(this.$refs.itemsContainer&&this.sortedResponsiveOptions){for(var e=window.innerWidth,t={numVisible:this.numVisible},n=0;n<this.sortedResponsiveOptions.length;n++){var i=this.sortedResponsiveOptions[n];parseInt(i.breakpoint,10)>=e&&(t=i)}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},bindDocumentListeners:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},isNavBackwardDisabled:function(){return!this.circular&&0===this.d_activeIndex||this.value.length<=this.d_numVisible},isNavForwardDisabled:function(){return!this.circular&&this.d_activeIndex===this.value.length-1||this.value.length<=this.d_numVisible},firstItemAciveIndex:function(){return-1*this.totalShiftedItems},lastItemActiveIndex:function(){return this.firstItemAciveIndex()+this.d_numVisible-1},isItemActive:function(e){return this.firstItemAciveIndex()<=e&&this.lastItemActiveIndex()>=e},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0}},components:{ChevronLeftIcon:g.default,ChevronRightIcon:y.default,ChevronUpIcon:x.default,ChevronDownIcon:I.default},directives:{ripple:b.default}};function E(e){return E="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},E(e)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){var t=F(e,"string");return"symbol"===E(t)?t:String(t)}function F(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==E(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var U=["disabled","aria-label"],M=["data-p-active","aria-selected","aria-controls","onKeydown","data-p-galleria-thumbnail-item-current","data-p-galleria-thumbnail-item-active","data-p-galleria-thumbnail-item-start","data-p-galleria-thumbnail-item-end"],K=["tabindex","aria-label","aria-current","onClick"],q=["disabled","aria-label"];function G(e){return G="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},G(e)}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){Z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e){var t=Y(e,"string");return"symbol"===G(t)?t:String(t)}function Y(e,t){if("object"!==G(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==G(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}_.render=function(e,t,n,i,a,r){var o=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("thumbnailWrapper")},e.ptm("thumbnailWrapper")),[c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailContainer")},e.ptm("thumbnailContainer")),[n.showThumbnailNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,class:e.cx("previousThumbnailButton"),disabled:r.isNavBackwardDisabled(),type:"button","aria-label":r.ariaPrevButtonLabel,onClick:t[0]||(t[0]=function(e){return r.navBackward(e)})},L(L({},n.prevButtonProps),e.ptm("previousThumbnailButton"))),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.previousthumbnailicon||(n.isVertical?"ChevronUpIcon":"ChevronLeftIcon")),c.mergeProps({class:e.cx("previousThumbnailIcon")},e.ptm("previousThumbnailIcon")),null,16,["class"]))],16,U)),[[o]]):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailItemsContainer"),style:{height:n.isVertical?n.contentHeight:""}},e.ptm("thumbnailItemsContainer")),[c.createElementVNode("div",c.mergeProps({ref:"itemsContainer",class:e.cx("thumbnailItems"),role:"tablist",onTransitionend:t[1]||(t[1]=function(){return r.onTransitionEnd&&r.onTransitionEnd.apply(r,arguments)}),onTouchstart:t[2]||(t[2]=function(e){return r.onTouchStart(e)}),onTouchmove:t[3]||(t[3]=function(e){return r.onTouchMove(e)}),onTouchend:t[4]||(t[4]=function(e){return r.onTouchEnd(e)})},e.ptm("thumbnailItems")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,(function(t,i){return c.openBlock(),c.createElementBlock("div",c.mergeProps({key:"p-galleria-thumbnail-item-".concat(i),class:e.cx("thumbnailItem",{index:i,activeIndex:n.activeIndex}),role:"tab","data-p-active":n.activeIndex===i,"aria-selected":n.activeIndex===i,"aria-controls":n.containerId+"_item_"+i,onKeydown:function(e){return r.onThumbnailKeydown(e,i)}},e.ptm("thumbnailItem"),{"data-p-galleria-thumbnail-item-current":n.activeIndex===i,"data-p-galleria-thumbnail-item-active":r.isItemActive(i),"data-p-galleria-thumbnail-item-start":r.firstItemAciveIndex()===i,"data-p-galleria-thumbnail-item-end":r.lastItemActiveIndex()===i}),[c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailItemContent"),tabindex:n.activeIndex===i?"0":"-1","aria-label":r.ariaPageLabel(i+1),"aria-current":n.activeIndex===i?"page":void 0,onClick:function(e){return r.onItemClick(i)}},e.ptm("thumbnailItemContent")),[n.templates.thumbnail?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.thumbnail),{key:0,item:t},null,8,["item"])):c.createCommentVNode("",!0)],16,K)],16,M)})),128))],16)],16),n.showThumbnailNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:1,class:e.cx("nextThumbnailButton"),disabled:r.isNavForwardDisabled(),type:"button","aria-label":r.ariaNextButtonLabel,onClick:t[5]||(t[5]=function(e){return r.navForward(e)})},L(L({},n.nextButtonProps),e.ptm("nextThumbnailButton"))),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.nextthumbnailicon||(n.isVertical?"ChevronDownIcon":"ChevronRightIcon")),c.mergeProps({class:e.cx("nextThumbnailIcon")},e.ptm("nextThumbnailIcon")),null,16,["class"]))],16,q)),[[o]]):c.createCommentVNode("",!0)],16)],16)};var J={name:"GalleriaContent",hostName:"Galleria",extends:v.default,inheritAttrs:!1,interval:null,emits:["activeitem-change","mask-hide"],data:function(){return{id:this.$attrs.id||n.UniqueComponentId(),activeIndex:this.$attrs.activeIndex,numVisible:this.$attrs.numVisible,slideShowActive:!1}},watch:{"$attrs.value":function(e){e&&e.length<this.numVisible&&(this.numVisible=e.length)},"$attrs.activeIndex":function(e){this.activeIndex=e},"$attrs.numVisible":function(e){this.numVisible=e},"$attrs.autoPlay":function(e){e?this.startSlideShow():this.stopSlideShow()}},updated:function(){this.$emit("activeitem-change",this.activeIndex)},beforeUnmount:function(){this.slideShowActive&&this.stopSlideShow()},methods:{getPTOptions:function(e){return this.ptm(e,{props:W(W({},this.$attrs),{},{pt:this.pt,unstyled:this.unstyled})})},isAutoPlayActive:function(){return this.slideShowActive},startSlideShow:function(){var e=this;this.interval=setInterval((function(){e.activeIndex=e.$attrs.circular&&e.$attrs.value.length-1===e.activeIndex?0:e.activeIndex+1}),this.$attrs.transitionInterval),this.slideShowActive=!0},stopSlideShow:function(){this.interval&&clearInterval(this.interval),this.slideShowActive=!1},getPositionClass:function(e,t){var n=["top","left","bottom","right"].find((function(e){return e===t}));return n?"".concat(e,"-").concat(n):""},isVertical:function(){return"left"===this.$attrs.thumbnailsPosition||"right"===this.$attrs.thumbnailsPosition}},computed:{closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{GalleriaItem:k,GalleriaThumbnails:_,TimesIcon:f.default},directives:{ripple:b.default}};function Q(e){return Q="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},Q(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return(t=ie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ie(e){var t=ae(e,"string");return"symbol"===Q(t)?t:String(t)}function ae(e,t){if("object"!==Q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var re=["id"],oe=["aria-label"],le=["aria-live"];J.render=function(e,t,n,i,a,r){var o=c.resolveComponent("GalleriaItem"),l=c.resolveComponent("GalleriaThumbnails"),s=c.resolveDirective("ripple");return e.$attrs.value&&e.$attrs.value.length>0?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,id:a.id,class:[e.cx("root"),e.$attrs.containerClass],style:e.$attrs.containerStyle},te(te({},e.$attrs.containerProps),r.getPTOptions("root")),{"data-pc-name":"galleria"}),[e.$attrs.fullScreen?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":r.closeAriaLabel,onClick:t[0]||(t[0]=function(t){return e.$emit("mask-hide")})},r.getPTOptions("closeButton")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.closeicon||"TimesIcon"),c.mergeProps({class:e.cx("closeIcon")},r.getPTOptions("closeIcon")),null,16,["class"]))],16,oe)),[[s]]):c.createCommentVNode("",!0),e.$attrs.templates&&e.$attrs.templates.header?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:1,class:e.cx("header")},r.getPTOptions("header")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.header)))],16)):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({class:e.cx("content"),"aria-live":e.$attrs.autoPlay?"polite":"off"},r.getPTOptions("content")),[c.createVNode(o,{id:a.id,activeIndex:a.activeIndex,"onUpdate:activeIndex":t[1]||(t[1]=function(e){return a.activeIndex=e}),slideShowActive:a.slideShowActive,"onUpdate:slideShowActive":t[2]||(t[2]=function(e){return a.slideShowActive=e}),value:e.$attrs.value,circular:e.$attrs.circular,templates:e.$attrs.templates,showIndicators:e.$attrs.showIndicators,changeItemOnIndicatorHover:e.$attrs.changeItemOnIndicatorHover,showItemNavigators:e.$attrs.showItemNavigators,autoPlay:e.$attrs.autoPlay,onStartSlideshow:r.startSlideShow,onStopSlideshow:r.stopSlideShow,pt:e.pt,unstyled:e.unstyled},null,8,["id","activeIndex","slideShowActive","value","circular","templates","showIndicators","changeItemOnIndicatorHover","showItemNavigators","autoPlay","onStartSlideshow","onStopSlideshow","pt","unstyled"]),e.$attrs.showThumbnails?(c.openBlock(),c.createBlock(l,{key:0,activeIndex:a.activeIndex,"onUpdate:activeIndex":t[3]||(t[3]=function(e){return a.activeIndex=e}),slideShowActive:a.slideShowActive,"onUpdate:slideShowActive":t[4]||(t[4]=function(e){return a.slideShowActive=e}),containerId:a.id,value:e.$attrs.value,templates:e.$attrs.templates,numVisible:a.numVisible,responsiveOptions:e.$attrs.responsiveOptions,circular:e.$attrs.circular,isVertical:r.isVertical(),contentHeight:e.$attrs.verticalThumbnailViewPortHeight,showThumbnailNavigators:e.$attrs.showThumbnailNavigators,prevButtonProps:e.$attrs.prevButtonProps,nextButtonProps:e.$attrs.nextButtonProps,onStopSlideshow:r.stopSlideShow,pt:e.pt,unstyled:e.unstyled},null,8,["activeIndex","slideShowActive","containerId","value","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","prevButtonProps","nextButtonProps","onStopSlideshow","pt","unstyled"])):c.createCommentVNode("",!0)],16,le),e.$attrs.templates&&e.$attrs.templates.footer?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:2,class:e.cx("footer")},r.getPTOptions("footer")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.footer)))],16)):c.createCommentVNode("",!0)],16,re)):c.createCommentVNode("",!0)};var se={name:"Galleria",extends:S,inheritAttrs:!1,emits:["update:activeIndex","update:visible"],container:null,mask:null,data:function(){return{containerVisible:this.visible}},updated:function(){this.fullScreen&&this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.fullScreen&&n.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.mask=null,this.container&&(n.ZIndexUtils.clear(this.container),this.container=null)},methods:{onBeforeEnter:function(e){n.ZIndexUtils.set("modal",e,this.baseZIndex||this.$primevue.config.zIndex.modal)},onEnter:function(e){this.mask.style.zIndex=String(parseInt(e.style.zIndex,10)-1),n.DomHandler.addClass(document.body,"p-overflow-hidden"),this.focus()},onBeforeLeave:function(){!this.isUnstyled&&n.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onAfterLeave:function(e){n.ZIndexUtils.clear(e),this.containerVisible=!1,n.DomHandler.removeClass(document.body,"p-overflow-hidden")},onActiveItemChange:function(e){this.activeIndex!==e&&this.$emit("update:activeIndex",e)},maskHide:function(){this.$emit("update:visible",!1)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},focus:function(){var e=this.container.$el.querySelector("[autofocus]");e&&e.focus()}},components:{GalleriaContent:J,Portal:h.default},directives:{focustrap:p.default}},ce=["role","aria-modal"];se.render=function(e,t,n,i,a,r){var o=c.resolveComponent("GalleriaContent"),l=c.resolveComponent("Portal"),s=c.resolveDirective("focustrap");return e.fullScreen?(c.openBlock(),c.createBlock(l,{key:0},{default:c.withCtx((function(){return[a.containerVisible?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,ref:r.maskRef,class:[e.cx("mask"),e.maskClass],role:e.fullScreen?"dialog":"region","aria-modal":e.fullScreen?"true":void 0},e.ptm("mask")),[c.createVNode(c.Transition,c.mergeProps({name:"p-galleria",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave,appear:""},e.ptm("transition")),{default:c.withCtx((function(){return[e.visible?c.withDirectives((c.openBlock(),c.createBlock(o,c.mergeProps({key:0,ref:r.containerRef,onMaskHide:r.maskHide,templates:e.$slots,onActiveitemChange:r.onActiveItemChange,pt:e.pt,unstyled:e.unstyled},e.$props),null,16,["onMaskHide","templates","onActiveitemChange","pt","unstyled"])),[[s]]):c.createCommentVNode("",!0)]})),_:1},16,["onBeforeEnter","onEnter","onBeforeLeave","onAfterLeave"])],16,ce)):c.createCommentVNode("",!0)]})),_:1})):(c.openBlock(),c.createBlock(o,c.mergeProps({key:1,templates:e.$slots,onActiveitemChange:r.onActiveItemChange,pt:e.pt,unstyled:e.unstyled},e.$props),null,16,["templates","onActiveitemChange","pt","unstyled"]))},module.exports=se;
|
|
1
|
+
"use strict";var e=require("primevue/focustrap"),t=require("primevue/portal"),n=require("primevue/utils"),i=require("primevue/basecomponent"),a=require("primevue/usestyle"),r=require("primevue/icons/times"),o=require("primevue/ripple"),l=require("primevue/icons/chevronleft"),s=require("primevue/icons/chevronright"),c=require("vue"),u=require("primevue/icons/chevrondown"),d=require("primevue/icons/chevronup");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=p(e),h=p(t),v=p(i),f=p(r),b=p(o),g=p(l),y=p(s),I=p(u),x=p(d),w=a.useStyle("\n.p-galleria-content {\n display: flex;\n flex-direction: column;\n}\n\n.p-galleria-item-wrapper {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.p-galleria-item-container {\n position: relative;\n display: flex;\n height: 100%;\n}\n\n.p-galleria-item-nav {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n}\n\n.p-galleria-item-prev {\n left: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-galleria-item-next {\n right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-galleria-item {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n}\n\n.p-galleria-item-nav-onhover .p-galleria-item-nav {\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav {\n pointer-events: all;\n opacity: 1;\n}\n\n.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled {\n pointer-events: none;\n}\n\n.p-galleria-caption {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n\n/* Thumbnails */\n.p-galleria-thumbnail-wrapper {\n display: flex;\n flex-direction: column;\n overflow: auto;\n flex-shrink: 0;\n}\n\n.p-galleria-thumbnail-prev,\n.p-galleria-thumbnail-next {\n align-self: center;\n flex: 0 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-galleria-thumbnail-prev span,\n.p-galleria-thumbnail-next span {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-galleria-thumbnail-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-galleria-thumbnail-items-container {\n overflow: hidden;\n width: 100%;\n}\n\n.p-galleria-thumbnail-items {\n display: flex;\n}\n\n.p-galleria-thumbnail-item {\n overflow: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n opacity: 0.5;\n}\n\n.p-galleria-thumbnail-item:hover {\n opacity: 1;\n transition: opacity 0.3s;\n}\n\n.p-galleria-thumbnail-item-current {\n opacity: 1;\n}\n\n/* Positions */\n/* Thumbnails */\n.p-galleria-thumbnails-left .p-galleria-content,\n.p-galleria-thumbnails-right .p-galleria-content {\n flex-direction: row;\n}\n\n.p-galleria-thumbnails-left .p-galleria-item-wrapper,\n.p-galleria-thumbnails-right .p-galleria-item-wrapper {\n flex-direction: row;\n}\n\n.p-galleria-thumbnails-left .p-galleria-item-wrapper,\n.p-galleria-thumbnails-top .p-galleria-item-wrapper {\n order: 2;\n}\n\n.p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper,\n.p-galleria-thumbnails-top .p-galleria-thumbnail-wrapper {\n order: 1;\n}\n\n.p-galleria-thumbnails-left .p-galleria-thumbnail-container,\n.p-galleria-thumbnails-right .p-galleria-thumbnail-container {\n flex-direction: column;\n flex-grow: 1;\n}\n\n.p-galleria-thumbnails-left .p-galleria-thumbnail-items,\n.p-galleria-thumbnails-right .p-galleria-thumbnail-items {\n flex-direction: column;\n height: 100%;\n}\n\n/* Indicators */\n.p-galleria-indicators {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-galleria-indicator > button {\n display: inline-flex;\n align-items: center;\n}\n\n.p-galleria-indicators-left .p-galleria-item-wrapper,\n.p-galleria-indicators-right .p-galleria-item-wrapper {\n flex-direction: row;\n align-items: center;\n}\n\n.p-galleria-indicators-left .p-galleria-item-container,\n.p-galleria-indicators-top .p-galleria-item-container {\n order: 2;\n}\n\n.p-galleria-indicators-left .p-galleria-indicators,\n.p-galleria-indicators-top .p-galleria-indicators {\n order: 1;\n}\n\n.p-galleria-indicators-left .p-galleria-indicators,\n.p-galleria-indicators-right .p-galleria-indicators {\n flex-direction: column;\n}\n\n.p-galleria-indicator-onitem .p-galleria-indicators {\n position: absolute;\n display: flex;\n}\n\n.p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators {\n top: 0;\n left: 0;\n width: 100%;\n align-items: flex-start;\n}\n\n.p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators {\n right: 0;\n top: 0;\n height: 100%;\n align-items: flex-end;\n}\n\n.p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators {\n bottom: 0;\n left: 0;\n width: 100%;\n align-items: flex-end;\n}\n\n.p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators {\n left: 0;\n top: 0;\n height: 100%;\n align-items: flex-start;\n}\n\n/* FullScreen */\n.p-galleria-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-galleria-close {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n}\n\n.p-galleria-mask .p-galleria-item-nav {\n position: fixed;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n/* Animation */\n.p-galleria-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n\n.p-galleria-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.p-galleria-enter-from,\n.p-galleria-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n\n.p-galleria-enter-active .p-galleria-item-nav {\n opacity: 0;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-galleria-thumbnail-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active {\n visibility: visible;\n}\n",{name:"galleria",manual:!0}),S={name:"BaseGalleria",extends:v.default,props:{id:{type:String,default:null},value:{type:Array,default:null},activeIndex:{type:Number,default:0},fullScreen:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},numVisible:{type:Number,default:3},responsiveOptions:{type:Array,default:null},showItemNavigators:{type:Boolean,default:!1},showThumbnailNavigators:{type:Boolean,default:!0},showItemNavigatorsOnHover:{type:Boolean,default:!1},changeItemOnIndicatorHover:{type:Boolean,default:!1},circular:{type:Boolean,default:!1},autoPlay:{type:Boolean,default:!1},transitionInterval:{type:Number,default:4e3},showThumbnails:{type:Boolean,default:!0},thumbnailsPosition:{type:String,default:"bottom"},verticalThumbnailViewPortHeight:{type:String,default:"300px"},showIndicators:{type:Boolean,default:!1},showIndicatorsOnItem:{type:Boolean,default:!1},indicatorsPosition:{type:String,default:"bottom"},baseZIndex:{type:Number,default:0},maskClass:{type:String,default:null},containerStyle:{type:null,default:null},containerClass:{type:null,default:null},containerProps:{type:null,default:null},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},css:{classes:{mask:function(e){var t=e.instance;return["p-galleria-mask p-component-overlay p-component-overlay-enter",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},root:function(e){var t=e.instance,n=t.$attrs.showThumbnails&&t.getPositionClass("p-galleria-thumbnails",t.$attrs.thumbnailsPosition),i=t.$attrs.showIndicators&&t.getPositionClass("p-galleria-indicators",t.$attrs.indicatorsPosition);return["p-galleria p-component",{"p-galleria-fullscreen":t.$attrs.fullScreen,"p-galleria-indicator-onitem":t.$attrs.showIndicatorsOnItem,"p-galleria-item-nav-onhover":t.$attrs.showItemNavigatorsOnHover&&!t.$attrs.fullScreen},n,i]},closeButton:"p-galleria-close p-link",closeIcon:"p-galleria-close-icon",header:"p-galleria-header",content:"p-galleria-content",footer:"p-galleria-footer",itemWrapper:"p-galleria-item-wrapper",itemContainer:"p-galleria-item-container",previousItemButton:function(e){return["p-galleria-item-prev p-galleria-item-nav p-link",{"p-disabled":e.instance.isNavBackwardDisabled()}]},previousItemIcon:"p-galleria-item-prev-icon",item:"p-galleria-item",nextItemButton:function(e){return["p-galleria-item-next p-galleria-item-nav p-link",{"p-disabled":e.instance.isNavForwardDisabled()}]},nextItemIcon:"p-galleria-item-next-icon",caption:"p-galleria-caption",indicators:"p-galleria-indicators p-reset",indicator:function(e){return["p-galleria-indicator",{"p-highlight":e.instance.isIndicatorItemActive(e.index)}]},indicatorButton:"p-link",thumbnailWrapper:"p-galleria-thumbnail-wrapper",thumbnailContainer:"p-galleria-thumbnail-container",previousThumbnailButton:function(e){return["p-galleria-thumbnail-prev p-link",{"p-disabled":e.instance.isNavBackwardDisabled()}]},previousThumbnailIcon:"p-galleria-thumbnail-prev-icon",thumbnailItemsContainer:"p-galleria-thumbnail-items-container",thumbnailItems:"p-galleria-thumbnail-items",thumbnailItem:function(e){var t=e.instance,n=e.index;return["p-galleria-thumbnail-item",{"p-galleria-thumbnail-item-current":e.activeIndex===n,"p-galleria-thumbnail-item-active":t.isItemActive(n),"p-galleria-thumbnail-item-start":t.firstItemAciveIndex()===n,"p-galleria-thumbnail-item-end":t.lastItemActiveIndex()===n}]},thumbnailItemContent:"p-galleria-thumbnail-item-content",nextThumbnailButton:function(e){return["p-galleria-thumbnail-next p-link",{"p-disabled":e.instance.isNavForwardDisabled()}]},nextThumbnailIcon:"p-galleria-thumbnail-next-icon"},loadStyle:w.load},provide:function(){return{$parentInstance:this}}},k={name:"GalleriaItem",hostName:"Galleria",extends:v.default,emits:["start-slideshow","stop-slideshow","update:activeIndex"],props:{circular:{type:Boolean,default:!1},activeIndex:{type:Number,default:0},value:{type:Array,default:null},showItemNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},slideShowActive:{type:Boolean,default:!0},changeItemOnIndicatorHover:{type:Boolean,default:!0},autoPlay:{type:Boolean,default:!1},templates:{type:null,default:null},id:{type:String,default:null}},mounted:function(){this.autoPlay&&this.$emit("start-slideshow")},methods:{getIndicatorPTOptions:function(e){return{context:{highlighted:this.activeIndex===e}}},next:function(){this.$emit("update:activeIndex",this.circular&&this.value.length-1===this.activeIndex?0:this.activeIndex+1)},prev:function(){this.$emit("update:activeIndex",this.circular&&0===this.activeIndex?this.value.length-1:0!==this.activeIndex?this.activeIndex-1:0)},stopSlideShow:function(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},navBackward:function(e){this.stopSlideShow(),this.prev(),e&&e.cancelable&&e.preventDefault()},navForward:function(e){this.stopSlideShow(),this.next(),e&&e.cancelable&&e.preventDefault()},onIndicatorClick:function(e){this.stopSlideShow(),this.$emit("update:activeIndex",e)},onIndicatorMouseEnter:function(e){this.changeItemOnIndicatorHover&&(this.stopSlideShow(),this.$emit("update:activeIndex",e))},onIndicatorKeyDown:function(e,t){switch(e.code){case"Enter":case"Space":this.stopSlideShow(),this.$emit("update:activeIndex",t),e.preventDefault();break;case"ArrowDown":case"ArrowUp":e.preventDefault()}},isIndicatorItemActive:function(e){return this.activeIndex===e},isNavBackwardDisabled:function(){return!this.circular&&0===this.activeIndex},isNavForwardDisabled:function(){return!this.circular&&this.activeIndex===this.value.length-1},ariaSlideNumber:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,e):void 0},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{activeItem:function(){return this.value[this.activeIndex]},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0}},components:{ChevronLeftIcon:g.default,ChevronRightIcon:y.default},directives:{ripple:b.default}},B=["disabled"],P=["id","aria-label","aria-roledescription"],C=["disabled"],$=["aria-label","aria-selected","aria-controls","onClick","onMouseenter","onKeydown","data-p-highlight"];function O(e){return A(e)||N(e)||D(e)||V()}function V(){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 D(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function N(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function A(e){if(Array.isArray(e))return T(e)}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}k.render=function(e,t,n,i,a,r){var o=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("itemWrapper")},e.ptm("itemWrapper")),[c.createElementVNode("div",c.mergeProps({class:e.cx("itemContainer")},e.ptm("itemContainer")),[n.showItemNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,type:"button",class:e.cx("previousItemButton"),onClick:t[0]||(t[0]=function(e){return r.navBackward(e)}),disabled:r.isNavBackwardDisabled()},e.ptm("previousItemButton"),{"data-pc-group-section":"itemnavigator"}),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.previousitemicon||"ChevronLeftIcon"),c.mergeProps({class:e.cx("previousItemIcon")},e.ptm("previousItemIcon")),null,16,["class"]))],16,B)),[[o]]):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({id:n.id+"_item_"+n.activeIndex,class:e.cx("item"),role:"group","aria-label":r.ariaSlideNumber(n.activeIndex+1),"aria-roledescription":r.ariaSlideLabel},e.ptm("item")),[n.templates.item?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.item),{key:0,item:r.activeItem},null,8,["item"])):c.createCommentVNode("",!0)],16,P),n.showItemNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:1,type:"button",class:e.cx("nextItemButton"),onClick:t[1]||(t[1]=function(e){return r.navForward(e)}),disabled:r.isNavForwardDisabled()},e.ptm("nextItemButton"),{"data-pc-group-section":"itemnavigator"}),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.nextitemicon||"ChevronRightIcon"),c.mergeProps({class:e.cx("nextItemIcon")},e.ptm("nextItemIcon")),null,16,["class"]))],16,C)),[[o]]):c.createCommentVNode("",!0),n.templates.caption?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:2,class:e.cx("caption")},e.ptm("caption")),[n.templates.caption?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.caption),{key:0,item:r.activeItem},null,8,["item"])):c.createCommentVNode("",!0)],16)):c.createCommentVNode("",!0)],16),n.showIndicators?(c.openBlock(),c.createElementBlock("ul",c.mergeProps({key:0,class:e.cx("indicators")},e.ptm("indicators")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,(function(t,i){return c.openBlock(),c.createElementBlock("li",c.mergeProps({key:"p-galleria-indicator-".concat(i),class:e.cx("indicator",{index:i}),tabindex:"0","aria-label":r.ariaPageLabel(i+1),"aria-selected":n.activeIndex===i,"aria-controls":n.id+"_item_"+i,onClick:function(e){return r.onIndicatorClick(i)},onMouseenter:function(e){return r.onIndicatorMouseEnter(i)},onKeydown:function(e){return r.onIndicatorKeyDown(e,i)}},e.ptm("indicator",r.getIndicatorPTOptions(i)),{"data-p-highlight":r.isIndicatorItemActive(i)}),[n.templates.indicator?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,type:"button",tabindex:"-1",class:e.cx("indicatorButton")},e.ptm("indicatorButton",r.getIndicatorPTOptions(i))),null,16)),n.templates.indicator?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.indicator),{key:1,index:i},null,8,["index"])):c.createCommentVNode("",!0)],16,$)})),128))],16)):c.createCommentVNode("",!0)],16)};var _={name:"GalleriaThumbnails",hostName:"Galleria",extends:v.default,emits:["stop-slideshow","update:activeIndex"],props:{containerId:{type:String,default:null},value:{type:Array,default:null},numVisible:{type:Number,default:3},activeIndex:{type:Number,default:0},isVertical:{type:Boolean,default:!1},slideShowActive:{type:Boolean,default:!1},circular:{type:Boolean,default:!1},responsiveOptions:{type:Array,default:null},contentHeight:{type:String,default:"300px"},showThumbnailNavigators:{type:Boolean,default:!0},templates:{type:null,default:null},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},startPos:null,thumbnailsStyle:null,sortedResponsiveOptions:null,data:function(){return{d_numVisible:this.numVisible,d_oldNumVisible:this.numVisible,d_activeIndex:this.activeIndex,d_oldActiveItemIndex:this.activeIndex,totalShiftedItems:0,page:0}},watch:{numVisible:function(e,t){this.d_numVisible=e,this.d_oldNumVisible=t},activeIndex:function(e,t){this.d_activeIndex=e,this.d_oldActiveItemIndex=t}},mounted:function(){this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners()},updated:function(){var e=this.totalShiftedItems;this.d_oldNumVisible===this.d_numVisible&&this.d_oldActiveItemIndex===this.d_activeIndex||((e=this.d_activeIndex<=this.getMedianItemIndex()?0:this.value.length-this.d_numVisible+this.getMedianItemIndex()<this.d_activeIndex?this.d_numVisible-this.value.length:this.value.length-this.d_numVisible<this.d_activeIndex&&this.d_numVisible%2==0?-1*this.d_activeIndex+this.getMedianItemIndex()+1:-1*this.d_activeIndex+this.getMedianItemIndex())!==this.totalShiftedItems&&(this.totalShiftedItems=e),this.$refs.itemsContainer.style.transform=this.isVertical?"translate3d(0, ".concat(e*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(e*(100/this.d_numVisible),"%, 0, 0)"),this.d_oldActiveItemIndex!==this.d_activeIndex&&(document.body.setAttribute("data-p-items-hidden","false"),!this.isUnstyled&&n.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.d_oldActiveItemIndex=this.d_activeIndex,this.d_oldNumVisible=this.d_numVisible)},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.thumbnailsStyle&&this.thumbnailsStyle.parentNode.removeChild(this.thumbnailsStyle)},methods:{step:function(e){var t=this.totalShiftedItems+e;e<0&&-1*t+this.d_numVisible>this.value.length-1?t=this.d_numVisible-this.value.length:e>0&&t>0&&(t=0),this.circular&&(e<0&&this.value.length-1===this.d_activeIndex?t=0:e>0&&0===this.d_activeIndex&&(t=this.d_numVisible-this.value.length)),this.$refs.itemsContainer&&(document.body.setAttribute("data-p-items-hidden","false"),!this.isUnstyled&&n.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical?"translate3d(0, ".concat(t*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(t*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=t},stopSlideShow:function(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},getMedianItemIndex:function(){var e=Math.floor(this.d_numVisible/2);return this.d_numVisible%2?e:e-1},navBackward:function(e){this.stopSlideShow();var t=0!==this.d_activeIndex?this.d_activeIndex-1:0;this.d_numVisible-(t+this.totalShiftedItems)-1>this.getMedianItemIndex()&&(-1*this.totalShiftedItems!=0||this.circular)&&this.step(1),this.$emit("update:activeIndex",this.circular&&0===this.d_activeIndex?this.value.length-1:t),e.cancelable&&e.preventDefault()},navForward:function(e){this.stopSlideShow();var t=this.d_activeIndex===this.value.length-1?this.value.length-1:this.d_activeIndex+1;t+this.totalShiftedItems>this.getMedianItemIndex()&&(-1*this.totalShiftedItems<this.getTotalPageNumber()-1||this.circular)&&this.step(-1),this.$emit("update:activeIndex",this.circular&&this.value.length-1===this.d_activeIndex?0:t),e.cancelable&&e.preventDefault()},onItemClick:function(e){this.stopSlideShow();var t=e;if(t!==this.d_activeIndex){var n=t+this.totalShiftedItems,i=0;t<this.d_activeIndex?(i=this.d_numVisible-n-1-this.getMedianItemIndex())>0&&-1*this.totalShiftedItems!=0&&this.step(i):(i=this.getMedianItemIndex()-n)<0&&-1*this.totalShiftedItems<this.getTotalPageNumber()-1&&this.step(i),this.$emit("update:activeIndex",t)}},onThumbnailKeydown:function(e,t){switch("Enter"!==e.code&&"Space"!==e.code||(this.onItemClick(t),e.preventDefault()),e.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":e.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var e=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]'),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t+1===e.length?e.length-1:t+1)},onLeftKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e-1<=0?0:e-1)},onHomeKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,0)},onEndKey:function(){var e=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]'),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,e.length-1)},onTabKey:function(){var e=O(n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]')),t=e.findIndex((function(e){return!0===n.DomHandler.getAttribute(e,"data-p-active")})),i=n.DomHandler.findSingle(this.$refs.itemsContainer,'[tabindex="0"]'),a=e.findIndex((function(e){return e===i.parentElement}));e[a].children[0].tabIndex="-1",e[t].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var e=O(n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]')),t=n.DomHandler.findSingle(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"] > [tabindex="0"]');return e.findIndex((function(e){return e===t.parentElement}))},changedFocusedIndicator:function(e,t){var i=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]');i[e].children[0].tabIndex="-1",i[t].children[0].tabIndex="0",i[t].children[0].focus()},onTransitionEnd:function(){this.$refs.itemsContainer&&(document.body.setAttribute("data-p-items-hidden","true"),!this.isUnstyled&&n.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="")},onTouchStart:function(e){var t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}},onTouchMove:function(e){e.cancelable&&e.preventDefault()},onTouchEnd:function(e){var t=e.changedTouches[0];this.changePageOnTouch(e,this.isVertical?t.pageY-this.startPos.y:t.pageX-this.startPos.x)},changePageOnTouch:function(e,t){t<0?this.navForward(e):this.navBackward(e)},getTotalPageNumber:function(){return this.value.length>this.d_numVisible?this.value.length-this.d_numVisible+1:0},createStyle:function(){var e;this.thumbnailsStyle||(this.thumbnailsStyle=document.createElement("style"),this.thumbnailsStyle.type="text/css",n.DomHandler.setAttribute(this.thumbnailsStyle,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.body.appendChild(this.thumbnailsStyle));var t="\n #".concat(this.containerId,' [data-pc-section="thumbnailitem"] {\n flex: 1 0 ').concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){this.sortedResponsiveOptions=O(this.responsiveOptions);var i=new Intl.Collator(void 0,{numeric:!0}).compare;this.sortedResponsiveOptions.sort((function(e,t){var n=e.breakpoint,a=t.breakpoint;return-1*(null==n&&null!=a?-1:null!=n&&null==a?1:null==n&&null==a?0:"string"==typeof n&&"string"==typeof a?i(n,a):n<a?-1:n>a?1:0)}));for(var a=0;a<this.sortedResponsiveOptions.length;a++){var r=this.sortedResponsiveOptions[a];t+="\n @media screen and (max-width: ".concat(r.breakpoint,") {\n #").concat(this.containerId," .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100/r.numVisible,"%\n }\n }\n ")}}this.thumbnailsStyle.innerHTML=t},calculatePosition:function(){if(this.$refs.itemsContainer&&this.sortedResponsiveOptions){for(var e=window.innerWidth,t={numVisible:this.numVisible},n=0;n<this.sortedResponsiveOptions.length;n++){var i=this.sortedResponsiveOptions[n];parseInt(i.breakpoint,10)>=e&&(t=i)}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},bindDocumentListeners:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},isNavBackwardDisabled:function(){return!this.circular&&0===this.d_activeIndex||this.value.length<=this.d_numVisible},isNavForwardDisabled:function(){return!this.circular&&this.d_activeIndex===this.value.length-1||this.value.length<=this.d_numVisible},firstItemAciveIndex:function(){return-1*this.totalShiftedItems},lastItemActiveIndex:function(){return this.firstItemAciveIndex()+this.d_numVisible-1},isItemActive:function(e){return this.firstItemAciveIndex()<=e&&this.lastItemActiveIndex()>=e},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0}},components:{ChevronLeftIcon:g.default,ChevronRightIcon:y.default,ChevronUpIcon:x.default,ChevronDownIcon:I.default},directives:{ripple:b.default}};function E(e){return E="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},E(e)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){var t=F(e,"string");return"symbol"===E(t)?t:String(t)}function F(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==E(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var U=["disabled","aria-label"],M=["data-p-active","aria-selected","aria-controls","onKeydown","data-p-galleria-thumbnail-item-current","data-p-galleria-thumbnail-item-active","data-p-galleria-thumbnail-item-start","data-p-galleria-thumbnail-item-end"],K=["tabindex","aria-label","aria-current","onClick"],q=["disabled","aria-label"];function G(e){return G="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},G(e)}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){Z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e){var t=Y(e,"string");return"symbol"===G(t)?t:String(t)}function Y(e,t){if("object"!==G(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==G(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}_.render=function(e,t,n,i,a,r){var o=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("thumbnailWrapper")},e.ptm("thumbnailWrapper")),[c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailContainer")},e.ptm("thumbnailContainer")),[n.showThumbnailNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,class:e.cx("previousThumbnailButton"),disabled:r.isNavBackwardDisabled(),type:"button","aria-label":r.ariaPrevButtonLabel,onClick:t[0]||(t[0]=function(e){return r.navBackward(e)})},L(L({},n.prevButtonProps),e.ptm("previousThumbnailButton")),{"data-pc-group-section":"thumbnailnavigator"}),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.previousthumbnailicon||(n.isVertical?"ChevronUpIcon":"ChevronLeftIcon")),c.mergeProps({class:e.cx("previousThumbnailIcon")},e.ptm("previousThumbnailIcon")),null,16,["class"]))],16,U)),[[o]]):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailItemsContainer"),style:{height:n.isVertical?n.contentHeight:""}},e.ptm("thumbnailItemsContainer")),[c.createElementVNode("div",c.mergeProps({ref:"itemsContainer",class:e.cx("thumbnailItems"),role:"tablist",onTransitionend:t[1]||(t[1]=function(){return r.onTransitionEnd&&r.onTransitionEnd.apply(r,arguments)}),onTouchstart:t[2]||(t[2]=function(e){return r.onTouchStart(e)}),onTouchmove:t[3]||(t[3]=function(e){return r.onTouchMove(e)}),onTouchend:t[4]||(t[4]=function(e){return r.onTouchEnd(e)})},e.ptm("thumbnailItems")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,(function(t,i){return c.openBlock(),c.createElementBlock("div",c.mergeProps({key:"p-galleria-thumbnail-item-".concat(i),class:e.cx("thumbnailItem",{index:i,activeIndex:n.activeIndex}),role:"tab","data-p-active":n.activeIndex===i,"aria-selected":n.activeIndex===i,"aria-controls":n.containerId+"_item_"+i,onKeydown:function(e){return r.onThumbnailKeydown(e,i)}},e.ptm("thumbnailItem"),{"data-p-galleria-thumbnail-item-current":n.activeIndex===i,"data-p-galleria-thumbnail-item-active":r.isItemActive(i),"data-p-galleria-thumbnail-item-start":r.firstItemAciveIndex()===i,"data-p-galleria-thumbnail-item-end":r.lastItemActiveIndex()===i}),[c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailItemContent"),tabindex:n.activeIndex===i?"0":"-1","aria-label":r.ariaPageLabel(i+1),"aria-current":n.activeIndex===i?"page":void 0,onClick:function(e){return r.onItemClick(i)}},e.ptm("thumbnailItemContent")),[n.templates.thumbnail?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.thumbnail),{key:0,item:t},null,8,["item"])):c.createCommentVNode("",!0)],16,K)],16,M)})),128))],16)],16),n.showThumbnailNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:1,class:e.cx("nextThumbnailButton"),disabled:r.isNavForwardDisabled(),type:"button","aria-label":r.ariaNextButtonLabel,onClick:t[5]||(t[5]=function(e){return r.navForward(e)})},L(L({},n.nextButtonProps),e.ptm("nextThumbnailButton")),{"data-pc-group-section":"thumbnailnavigator"}),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.nextthumbnailicon||(n.isVertical?"ChevronDownIcon":"ChevronRightIcon")),c.mergeProps({class:e.cx("nextThumbnailIcon")},e.ptm("nextThumbnailIcon")),null,16,["class"]))],16,q)),[[o]]):c.createCommentVNode("",!0)],16)],16)};var J={name:"GalleriaContent",hostName:"Galleria",extends:v.default,inheritAttrs:!1,interval:null,emits:["activeitem-change","mask-hide"],data:function(){return{id:this.$attrs.id||n.UniqueComponentId(),activeIndex:this.$attrs.activeIndex,numVisible:this.$attrs.numVisible,slideShowActive:!1}},watch:{"$attrs.value":function(e){e&&e.length<this.numVisible&&(this.numVisible=e.length)},"$attrs.activeIndex":function(e){this.activeIndex=e},"$attrs.numVisible":function(e){this.numVisible=e},"$attrs.autoPlay":function(e){e?this.startSlideShow():this.stopSlideShow()}},updated:function(){this.$emit("activeitem-change",this.activeIndex)},beforeUnmount:function(){this.slideShowActive&&this.stopSlideShow()},methods:{getPTOptions:function(e){return this.ptm(e,{props:W(W({},this.$attrs),{},{pt:this.pt,unstyled:this.unstyled})})},isAutoPlayActive:function(){return this.slideShowActive},startSlideShow:function(){var e=this;this.interval=setInterval((function(){e.activeIndex=e.$attrs.circular&&e.$attrs.value.length-1===e.activeIndex?0:e.activeIndex+1}),this.$attrs.transitionInterval),this.slideShowActive=!0},stopSlideShow:function(){this.interval&&clearInterval(this.interval),this.slideShowActive=!1},getPositionClass:function(e,t){var n=["top","left","bottom","right"].find((function(e){return e===t}));return n?"".concat(e,"-").concat(n):""},isVertical:function(){return"left"===this.$attrs.thumbnailsPosition||"right"===this.$attrs.thumbnailsPosition}},computed:{closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{GalleriaItem:k,GalleriaThumbnails:_,TimesIcon:f.default},directives:{ripple:b.default}};function Q(e){return Q="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},Q(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return(t=ie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ie(e){var t=ae(e,"string");return"symbol"===Q(t)?t:String(t)}function ae(e,t){if("object"!==Q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var re=["id"],oe=["aria-label"],le=["aria-live"];J.render=function(e,t,n,i,a,r){var o=c.resolveComponent("GalleriaItem"),l=c.resolveComponent("GalleriaThumbnails"),s=c.resolveDirective("ripple");return e.$attrs.value&&e.$attrs.value.length>0?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,id:a.id,class:[e.cx("root"),e.$attrs.containerClass],style:e.$attrs.containerStyle},te(te({},e.$attrs.containerProps),r.getPTOptions("root")),{"data-pc-name":"galleria"}),[e.$attrs.fullScreen?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":r.closeAriaLabel,onClick:t[0]||(t[0]=function(t){return e.$emit("mask-hide")})},r.getPTOptions("closeButton")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.closeicon||"TimesIcon"),c.mergeProps({class:e.cx("closeIcon")},r.getPTOptions("closeIcon")),null,16,["class"]))],16,oe)),[[s]]):c.createCommentVNode("",!0),e.$attrs.templates&&e.$attrs.templates.header?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:1,class:e.cx("header")},r.getPTOptions("header")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.header)))],16)):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({class:e.cx("content"),"aria-live":e.$attrs.autoPlay?"polite":"off"},r.getPTOptions("content")),[c.createVNode(o,{id:a.id,activeIndex:a.activeIndex,"onUpdate:activeIndex":t[1]||(t[1]=function(e){return a.activeIndex=e}),slideShowActive:a.slideShowActive,"onUpdate:slideShowActive":t[2]||(t[2]=function(e){return a.slideShowActive=e}),value:e.$attrs.value,circular:e.$attrs.circular,templates:e.$attrs.templates,showIndicators:e.$attrs.showIndicators,changeItemOnIndicatorHover:e.$attrs.changeItemOnIndicatorHover,showItemNavigators:e.$attrs.showItemNavigators,autoPlay:e.$attrs.autoPlay,onStartSlideshow:r.startSlideShow,onStopSlideshow:r.stopSlideShow,pt:e.pt,unstyled:e.unstyled},null,8,["id","activeIndex","slideShowActive","value","circular","templates","showIndicators","changeItemOnIndicatorHover","showItemNavigators","autoPlay","onStartSlideshow","onStopSlideshow","pt","unstyled"]),e.$attrs.showThumbnails?(c.openBlock(),c.createBlock(l,{key:0,activeIndex:a.activeIndex,"onUpdate:activeIndex":t[3]||(t[3]=function(e){return a.activeIndex=e}),slideShowActive:a.slideShowActive,"onUpdate:slideShowActive":t[4]||(t[4]=function(e){return a.slideShowActive=e}),containerId:a.id,value:e.$attrs.value,templates:e.$attrs.templates,numVisible:a.numVisible,responsiveOptions:e.$attrs.responsiveOptions,circular:e.$attrs.circular,isVertical:r.isVertical(),contentHeight:e.$attrs.verticalThumbnailViewPortHeight,showThumbnailNavigators:e.$attrs.showThumbnailNavigators,prevButtonProps:e.$attrs.prevButtonProps,nextButtonProps:e.$attrs.nextButtonProps,onStopSlideshow:r.stopSlideShow,pt:e.pt,unstyled:e.unstyled},null,8,["activeIndex","slideShowActive","containerId","value","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","prevButtonProps","nextButtonProps","onStopSlideshow","pt","unstyled"])):c.createCommentVNode("",!0)],16,le),e.$attrs.templates&&e.$attrs.templates.footer?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:2,class:e.cx("footer")},r.getPTOptions("footer")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.footer)))],16)):c.createCommentVNode("",!0)],16,re)):c.createCommentVNode("",!0)};var se={name:"Galleria",extends:S,inheritAttrs:!1,emits:["update:activeIndex","update:visible"],container:null,mask:null,data:function(){return{containerVisible:this.visible}},updated:function(){this.fullScreen&&this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.fullScreen&&n.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.mask=null,this.container&&(n.ZIndexUtils.clear(this.container),this.container=null)},methods:{onBeforeEnter:function(e){n.ZIndexUtils.set("modal",e,this.baseZIndex||this.$primevue.config.zIndex.modal)},onEnter:function(e){this.mask.style.zIndex=String(parseInt(e.style.zIndex,10)-1),n.DomHandler.addClass(document.body,"p-overflow-hidden"),this.focus()},onBeforeLeave:function(){!this.isUnstyled&&n.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onAfterLeave:function(e){n.ZIndexUtils.clear(e),this.containerVisible=!1,n.DomHandler.removeClass(document.body,"p-overflow-hidden")},onActiveItemChange:function(e){this.activeIndex!==e&&this.$emit("update:activeIndex",e)},maskHide:function(){this.$emit("update:visible",!1)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},focus:function(){var e=this.container.$el.querySelector("[autofocus]");e&&e.focus()}},components:{GalleriaContent:J,Portal:h.default},directives:{focustrap:m.default}},ce=["role","aria-modal"];se.render=function(e,t,n,i,a,r){var o=c.resolveComponent("GalleriaContent"),l=c.resolveComponent("Portal"),s=c.resolveDirective("focustrap");return e.fullScreen?(c.openBlock(),c.createBlock(l,{key:0},{default:c.withCtx((function(){return[a.containerVisible?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,ref:r.maskRef,class:[e.cx("mask"),e.maskClass],role:e.fullScreen?"dialog":"region","aria-modal":e.fullScreen?"true":void 0},e.ptm("mask")),[c.createVNode(c.Transition,c.mergeProps({name:"p-galleria",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave,appear:""},e.ptm("transition")),{default:c.withCtx((function(){return[e.visible?c.withDirectives((c.openBlock(),c.createBlock(o,c.mergeProps({key:0,ref:r.containerRef,onMaskHide:r.maskHide,templates:e.$slots,onActiveitemChange:r.onActiveItemChange,pt:e.pt,unstyled:e.unstyled},e.$props),null,16,["onMaskHide","templates","onActiveitemChange","pt","unstyled"])),[[s]]):c.createCommentVNode("",!0)]})),_:1},16,["onBeforeEnter","onEnter","onBeforeLeave","onAfterLeave"])],16,ce)):c.createCommentVNode("",!0)]})),_:1})):(c.openBlock(),c.createBlock(o,c.mergeProps({key:1,templates:e.$slots,onActiveitemChange:r.onActiveItemChange,pt:e.pt,unstyled:e.unstyled},e.$props),null,16,["templates","onActiveitemChange","pt","unstyled"]))},module.exports=se;
|
package/galleria/galleria.esm.js
CHANGED
|
@@ -386,7 +386,9 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
386
386
|
return $options.navBackward($event);
|
|
387
387
|
}),
|
|
388
388
|
disabled: $options.isNavBackwardDisabled()
|
|
389
|
-
}, _ctx.ptm('previousItemButton')
|
|
389
|
+
}, _ctx.ptm('previousItemButton'), {
|
|
390
|
+
"data-pc-group-section": "itemnavigator"
|
|
391
|
+
}), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.previousitemicon || 'ChevronLeftIcon'), mergeProps({
|
|
390
392
|
"class": _ctx.cx('previousItemIcon')
|
|
391
393
|
}, _ctx.ptm('previousItemIcon')), null, 16, ["class"]))], 16, _hoisted_1$3)), [[_directive_ripple]]) : createCommentVNode("", true), createElementVNode("div", mergeProps({
|
|
392
394
|
id: $props.id + '_item_' + $props.activeIndex,
|
|
@@ -405,7 +407,9 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
405
407
|
return $options.navForward($event);
|
|
406
408
|
}),
|
|
407
409
|
disabled: $options.isNavForwardDisabled()
|
|
408
|
-
}, _ctx.ptm('nextItemButton')
|
|
410
|
+
}, _ctx.ptm('nextItemButton'), {
|
|
411
|
+
"data-pc-group-section": "itemnavigator"
|
|
412
|
+
}), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.nextitemicon || 'ChevronRightIcon'), mergeProps({
|
|
409
413
|
"class": _ctx.cx('nextItemIcon')
|
|
410
414
|
}, _ctx.ptm('nextItemIcon')), null, 16, ["class"]))], 16, _hoisted_3$2)), [[_directive_ripple]]) : createCommentVNode("", true), $props.templates['caption'] ? (openBlock(), createElementBlock("div", mergeProps({
|
|
411
415
|
key: 2,
|
|
@@ -778,13 +782,14 @@ var script$2 = {
|
|
|
778
782
|
var innerHTML = "\n #".concat(this.containerId, " [data-pc-section=\"thumbnailitem\"] {\n flex: 1 0 ").concat(100 / this.d_numVisible, "%\n }\n ");
|
|
779
783
|
if (this.responsiveOptions && !this.isUnstyled) {
|
|
780
784
|
this.sortedResponsiveOptions = _toConsumableArray(this.responsiveOptions);
|
|
785
|
+
var comparer = new Intl.Collator(undefined, {
|
|
786
|
+
numeric: true
|
|
787
|
+
}).compare;
|
|
781
788
|
this.sortedResponsiveOptions.sort(function (data1, data2) {
|
|
782
789
|
var value1 = data1.breakpoint;
|
|
783
790
|
var value2 = data2.breakpoint;
|
|
784
791
|
var result = null;
|
|
785
|
-
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1
|
|
786
|
-
numeric: true
|
|
787
|
-
});else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
792
|
+
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = comparer(value1, value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
788
793
|
return -1 * result;
|
|
789
794
|
});
|
|
790
795
|
for (var i = 0; i < this.sortedResponsiveOptions.length; i++) {
|
|
@@ -889,7 +894,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
889
894
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
890
895
|
return $options.navBackward($event);
|
|
891
896
|
})
|
|
892
|
-
}, _objectSpread$2(_objectSpread$2({}, $props.prevButtonProps), _ctx.ptm('previousThumbnailButton'))
|
|
897
|
+
}, _objectSpread$2(_objectSpread$2({}, $props.prevButtonProps), _ctx.ptm('previousThumbnailButton')), {
|
|
898
|
+
"data-pc-group-section": "thumbnailnavigator"
|
|
899
|
+
}), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.previousthumbnailicon || ($props.isVertical ? 'ChevronUpIcon' : 'ChevronLeftIcon')), mergeProps({
|
|
893
900
|
"class": _ctx.cx('previousThumbnailIcon')
|
|
894
901
|
}, _ctx.ptm('previousThumbnailIcon')), null, 16, ["class"]))], 16, _hoisted_1$2)), [[_directive_ripple]]) : createCommentVNode("", true), createElementVNode("div", mergeProps({
|
|
895
902
|
"class": _ctx.cx('thumbnailItemsContainer'),
|
|
@@ -952,7 +959,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
952
959
|
onClick: _cache[5] || (_cache[5] = function ($event) {
|
|
953
960
|
return $options.navForward($event);
|
|
954
961
|
})
|
|
955
|
-
}, _objectSpread$2(_objectSpread$2({}, $props.nextButtonProps), _ctx.ptm('nextThumbnailButton'))
|
|
962
|
+
}, _objectSpread$2(_objectSpread$2({}, $props.nextButtonProps), _ctx.ptm('nextThumbnailButton')), {
|
|
963
|
+
"data-pc-group-section": "thumbnailnavigator"
|
|
964
|
+
}), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.nextthumbnailicon || ($props.isVertical ? 'ChevronDownIcon' : 'ChevronRightIcon')), mergeProps({
|
|
956
965
|
"class": _ctx.cx('nextThumbnailIcon')
|
|
957
966
|
}, _ctx.ptm('nextThumbnailIcon')), null, 16, ["class"]))], 16, _hoisted_4)), [[_directive_ripple]]) : createCommentVNode("", true)], 16)], 16);
|
|
958
967
|
}
|