primevue 3.30.1 → 3.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/basecomponent/BaseComponent.vue +1 -1
- package/basecomponent/basecomponent.cjs.js +1 -1
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +1 -1
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +1 -1
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +1 -1
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +1 -1
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +1 -1
- package/basedirective/basedirective.min.js +1 -1
- package/column/Column.d.ts +48 -0
- package/columngroup/ColumnGroup.d.ts +5 -0
- package/core/core.js +19 -13
- package/core/core.min.js +5 -5
- package/datatable/BaseDataTable.vue +7 -1
- package/datatable/BodyCell.vue +5 -3
- package/datatable/ColumnFilter.vue +43 -8
- package/datatable/DataTable.d.ts +30 -0
- package/datatable/FooterCell.vue +3 -1
- package/datatable/HeaderCell.vue +6 -2
- package/datatable/HeaderCheckbox.vue +5 -2
- package/datatable/RowCheckbox.vue +5 -2
- package/datatable/RowRadioButton.vue +5 -2
- package/datatable/TableBody.vue +33 -13
- package/datatable/TableFooter.vue +10 -2
- package/datatable/TableHeader.vue +12 -2
- package/datatable/datatable.cjs.js +149 -43
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +149 -43
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +150 -44
- package/datatable/datatable.min.js +1 -1
- package/dialog/Dialog.vue +13 -1
- package/dialog/dialog.cjs.js +6 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +6 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -2
- package/dialog/dialog.min.js +1 -1
- package/dock/Dock.d.ts +4 -0
- package/dock/DockSub.vue +9 -8
- package/dock/dock.cjs.js +9 -8
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +9 -8
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +9 -8
- package/dock/dock.min.js +1 -1
- package/galleria/Galleria.d.ts +4 -0
- package/galleria/GalleriaContent.vue +16 -6
- package/galleria/GalleriaItem.vue +2 -1
- package/galleria/GalleriaThumbnails.vue +1 -0
- package/galleria/galleria.cjs.js +34 -17
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +35 -18
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +34 -17
- package/galleria/galleria.min.js +1 -1
- package/message/BaseMessage.vue +2 -2
- package/message/Message.d.ts +10 -0
- package/message/Message.vue +3 -3
- package/message/message.cjs.js +8 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +8 -8
- package/message/message.esm.min.js +1 -1
- package/message/message.js +8 -8
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.vue +2 -1
- package/multiselect/multiselect.cjs.js +4 -4
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +5 -5
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +4 -4
- package/multiselect/multiselect.min.js +1 -1
- package/overlaypanel/OverlayPanel.vue +4 -2
- package/overlaypanel/overlaypanel.cjs.js +4 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +4 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +4 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/scrollpanel/ScrollPanel.vue +2 -0
- package/scrollpanel/scrollpanel.cjs.js +6 -2
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +6 -2
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +6 -2
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +3 -1
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +3 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +3 -1
- package/sidebar/sidebar.min.js +1 -1
- package/splitbutton/SplitButton.vue +2 -1
- package/splitbutton/splitbutton.cjs.js +4 -2
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +4 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +4 -2
- package/splitbutton/splitbutton.min.js +1 -1
- package/tabmenu/TabMenu.vue +71 -72
- package/tabmenu/tabmenu.cjs.js +67 -75
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +67 -75
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +67 -75
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/TabView.vue +2 -0
- package/tabview/tabview.cjs.js +6 -2
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +6 -2
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +6 -2
- package/tabview/tabview.min.js +1 -1
- package/toast/BaseToast.vue +2 -2
- package/toast/Toast.d.ts +10 -0
- package/toast/ToastMessage.vue +3 -2
- package/toast/toast.cjs.js +7 -6
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +7 -6
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +7 -6
- package/toast/toast.min.js +1 -1
- package/tree/Tree.d.ts +9 -0
- package/tree/TreeNode.vue +3 -1
- package/tree/tree.cjs.js +3 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +3 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +3 -1
- package/tree/tree.min.js +1 -1
- package/treetable/BaseTreeTable.vue +7 -1
- package/treetable/BodyCell.vue +14 -4
- package/treetable/FooterCell.vue +3 -1
- package/treetable/HeaderCell.vue +9 -2
- package/treetable/TreeTable.d.ts +30 -8
- package/treetable/TreeTable.vue +9 -2
- package/treetable/TreeTableRow.vue +10 -1
- package/treetable/treetable.cjs.js +58 -13
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +59 -14
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +58 -13
- package/treetable/treetable.min.js +1 -1
- package/vetur-attributes.json +8 -0
- package/vetur-tags.json +2 -0
- package/web-types.json +21 -1
package/dock/dock.esm.js
CHANGED
|
@@ -158,10 +158,11 @@ var script$1 = {
|
|
|
158
158
|
getItemProp: function getItemProp(processedItem, name) {
|
|
159
159
|
return processedItem && processedItem.item ? ObjectUtils.getItemValue(processedItem.item[name]) : undefined;
|
|
160
160
|
},
|
|
161
|
-
getPTOptions: function getPTOptions(
|
|
161
|
+
getPTOptions: function getPTOptions(key, index) {
|
|
162
162
|
return this.ptm(key, {
|
|
163
163
|
context: {
|
|
164
|
-
|
|
164
|
+
index: index,
|
|
165
|
+
active: this.isItemActive(this.getItemId(index))
|
|
165
166
|
}
|
|
166
167
|
});
|
|
167
168
|
},
|
|
@@ -349,12 +350,12 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
349
350
|
onMouseenter: function onMouseenter($event) {
|
|
350
351
|
return $options.onItemMouseEnter(index);
|
|
351
352
|
}
|
|
352
|
-
}, $options.getPTOptions(
|
|
353
|
+
}, $options.getPTOptions('menuitem', index), {
|
|
353
354
|
"data-p-focused": $options.isItemActive($options.getItemId(index)),
|
|
354
355
|
"data-p-disabled": $options.disabled(processedItem) || false
|
|
355
356
|
}), [createElementVNode("div", mergeProps({
|
|
356
357
|
"class": _ctx.cx('content')
|
|
357
|
-
}, $options.getPTOptions(
|
|
358
|
+
}, $options.getPTOptions('content', index)), [!$props.templates['item'] ? (openBlock(), createElementBlock(Fragment, {
|
|
358
359
|
key: 0
|
|
359
360
|
}, [processedItem.to && !$options.disabled(processedItem) ? (openBlock(), createBlock(_component_router_link, {
|
|
360
361
|
key: 0,
|
|
@@ -378,10 +379,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
378
379
|
onClick: function onClick($event) {
|
|
379
380
|
return $options.onItemActionClick($event, processedItem, navigate);
|
|
380
381
|
}
|
|
381
|
-
}, $options.getPTOptions(
|
|
382
|
+
}, $options.getPTOptions('action', index)), [!$props.templates['icon'] ? withDirectives((openBlock(), createElementBlock("span", mergeProps({
|
|
382
383
|
key: 0,
|
|
383
384
|
"class": [_ctx.cx('icon'), processedItem.icon]
|
|
384
|
-
}, $options.getPTOptions(
|
|
385
|
+
}, $options.getPTOptions('icon', index)), null, 16)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates['icon']), {
|
|
385
386
|
key: 1,
|
|
386
387
|
item: processedItem,
|
|
387
388
|
"class": normalizeClass(_ctx.cx('icon'))
|
|
@@ -398,10 +399,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
398
399
|
target: processedItem.target,
|
|
399
400
|
tabindex: "-1",
|
|
400
401
|
"aria-hidden": "true"
|
|
401
|
-
}, $options.getPTOptions(
|
|
402
|
+
}, $options.getPTOptions('action', index)), [!$props.templates['icon'] ? withDirectives((openBlock(), createElementBlock("span", mergeProps({
|
|
402
403
|
key: 0,
|
|
403
404
|
"class": [_ctx.cx('icon'), processedItem.icon]
|
|
404
|
-
}, $options.getPTOptions(
|
|
405
|
+
}, $options.getPTOptions('icon', index)), null, 16)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates['icon']), {
|
|
405
406
|
key: 1,
|
|
406
407
|
item: processedItem,
|
|
407
408
|
"class": normalizeClass(_ctx.cx('icon'))
|
package/dock/dock.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/basecomponent";import{useStyle as e}from"primevue/usestyle";import n from"primevue/ripple";import i from"primevue/tooltip";import{UniqueComponentId as o,ObjectUtils as r,DomHandler as a}from"primevue/utils";import{resolveComponent as c,resolveDirective as s,openBlock as l,createElementBlock as d,mergeProps as u,createElementVNode as p,Fragment as m,renderList as f,createBlock as b,withCtx as h,withDirectives as x,resolveDynamicComponent as y,normalizeClass as g,createVNode as I}from"vue";var k=e("\n.p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n\n.p-dock-list-container {\n display: flex;\n pointer-events: auto;\n}\n\n.p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-dock-item {\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n}\n\n.p-dock-link {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n}\n\n.p-dock-item-second-prev,\n.p-dock-item-second-next {\n transform: scale(1.2);\n}\n\n.p-dock-item-prev,\n.p-dock-item-next {\n transform: scale(1.4);\n}\n\n.p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n}\n\n/* Position */\n/* top */\n.p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n}\n\n.p-dock-top .p-dock-item {\n transform-origin: center top;\n}\n\n/* bottom */\n.p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n}\n\n.p-dock-bottom .p-dock-item {\n transform-origin: center bottom;\n}\n\n/* right */\n.p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-right .p-dock-item {\n transform-origin: center right;\n}\n\n.p-dock-right .p-dock-list {\n flex-direction: column;\n}\n\n/* left */\n.p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-left .p-dock-item {\n transform-origin: center left;\n}\n\n.p-dock-left .p-dock-list {\n flex-direction: column;\n}\n",{name:"dock",manual:!0}),v={name:"BaseDock",extends:t,props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,exact:{type:Boolean,default:!0},menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(t){var e=t.props;return["p-dock p-component","p-dock-".concat(e.position),e.class]},container:"p-dock-list-container",menu:"p-dock-list",menuitem:function(t){var e=t.instance,n=t.processedItem,i=t.index;return["p-dock-item",{"p-focus":e.isItemActive(t.id),"p-disabled":e.disabled(n),"p-dock-item-second-prev":e.currentIndex-2===i,"p-dock-item-prev":e.currentIndex-1===i,"p-dock-item-current":e.currentIndex===i,"p-dock-item-next":e.currentIndex+1===i,"p-dock-item-second-next":e.currentIndex+2===i}]},content:"p-menuitem-content",action:function(t){return["p-dock-link",{"router-link-active":t.isActive,"router-link-active-exact":t.props.exact&&t.isExactActive}]},icon:"p-dock-icon"},loadStyle:k.load},provide:function(){return{$parentInstance:this}}};function O(t){return D(t)||S(t)||w(t)||A()}function A(){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(t,e){if(t){if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,e):void 0}}function S(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function D(t){if(Array.isArray(t))return L(t)}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var K={name:"DockSub",hostName:"Dock",extends:t,emits:["focus","blur"],props:{position:{type:String,default:"bottom"},model:{type:Array,default:null},templates:{type:null,default:null},exact:{type:Boolean,default:!0},tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:function(){return{id:this.menuId,currentIndex:-3,focused:!1,focusedOptionIndex:-1}},watch:{menuId:function(t){this.id=t||o()}},mounted:function(){this.id=this.id||o()},methods:{getItemId:function(t){return"".concat(this.id,"_").concat(t)},getItemProp:function(t,e){return t&&t.item?r.getItemValue(t.item[e]):void 0},getPTOptions:function(t,e){return this.ptm(e,{context:{active:this.isItemActive(t)}})},isSameMenuItem:function(t){return t.currentTarget&&(t.currentTarget.isSameNode(t.target)||t.currentTarget.isSameNode(t.target.closest('[data-pc-section="menuitem"]')))},isItemActive:function(t){return t===this.focusedOptionIndex},onListMouseLeave:function(){this.currentIndex=-3},onItemMouseEnter:function(t){this.currentIndex=t},onItemActionClick:function(t,e){e&&e(t)},onItemClick:function(t,e){if(this.isSameMenuItem(t)){var n=this.getItemProp(e,"command");n&&n({originalEvent:t,item:e.item})}},onListFocus:function(t){this.focused=!0,this.changeFocusedOptionIndex(0),this.$emit("focus",t)},onListBlur:function(t){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",t)},onListKeyDown:function(t){switch(t.code){case"ArrowDown":"left"!==this.position&&"right"!==this.position||this.onArrowDownKey(),t.preventDefault();break;case"ArrowUp":"left"!==this.position&&"right"!==this.position||this.onArrowUpKey(),t.preventDefault();break;case"ArrowRight":"top"!==this.position&&"bottom"!==this.position||this.onArrowDownKey(),t.preventDefault();break;case"ArrowLeft":"top"!==this.position&&"bottom"!==this.position||this.onArrowUpKey(),t.preventDefault();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"Enter":case"Space":this.onSpaceKey(t),t.preventDefault()}},onArrowDownKey:function(){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t)},onArrowUpKey:function(){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t)},onHomeKey:function(){this.changeFocusedOptionIndex(0)},onEndKey:function(){this.changeFocusedOptionIndex(a.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},onSpaceKey:function(){var t=a.findSingle(this.$refs.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),e=t&&a.findSingle(t,'[data-pc-section="action"]');e?e.click():t&&t.click()},findNextOptionIndex:function(t){var e=O(a.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(e){return e.id===t}));return e>-1?e+1:0},findPrevOptionIndex:function(t){var e=O(a.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(e){return e.id===t}));return e>-1?e-1:0},changeFocusedOptionIndex:function(t){var e=a.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]');this.focusedOptionIndex=e[t>=e.length?e.length-1:t<0?0:t].getAttribute("id")},disabled:function(t){return"function"==typeof t.disabled?t.disabled():t.disabled}},computed:{focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},directives:{ripple:n,tooltip:i}},P=["id","aria-orientation","aria-activedescendant","tabindex","aria-label","aria-labelledby"],E=["id","aria-label","aria-disabled","onClick","onMouseenter","data-p-focused","data-p-disabled"],M=["href","target","onClick"],T=["href","target"];K.render=function(t,e,n,i,o,r){var a=c("router-link"),I=s("ripple"),k=s("tooltip");return l(),d("div",u({class:t.cx("container")},t.ptm("container")),[p("ul",u({ref:"list",id:o.id,class:t.cx("menu"),role:"menu","aria-orientation":"bottom"===n.position||"top"===n.position?"horizontal":"vertical","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:n.tabindex,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,onFocus:e[0]||(e[0]=function(){return r.onListFocus&&r.onListFocus.apply(r,arguments)}),onBlur:e[1]||(e[1]=function(){return r.onListBlur&&r.onListBlur.apply(r,arguments)}),onKeydown:e[2]||(e[2]=function(){return r.onListKeyDown&&r.onListKeyDown.apply(r,arguments)}),onMouseleave:e[3]||(e[3]=function(){return r.onListMouseLeave&&r.onListMouseLeave.apply(r,arguments)})},t.ptm("menu")),[(l(!0),d(m,null,f(n.model,(function(e,i){return l(),d("li",u({key:i,id:r.getItemId(i),class:t.cx("menuitem",{processedItem:e,index:i,id:r.getItemId(i)}),role:"menuitem","aria-label":e.label,"aria-disabled":r.disabled(e),onClick:function(t){return r.onItemClick(t,e)},onMouseenter:function(t){return r.onItemMouseEnter(i)}},r.getPTOptions(r.getItemId(i),"menuitem"),{"data-p-focused":r.isItemActive(r.getItemId(i)),"data-p-disabled":r.disabled(e)||!1}),[p("div",u({class:t.cx("content")},r.getPTOptions(r.getItemId(i),"content")),[n.templates.item?(l(),b(y(n.templates.item),{key:1,item:e,index:i},null,8,["item","index"])):(l(),d(m,{key:0},[e.to&&!r.disabled(e)?(l(),b(a,{key:0,to:e.to,custom:""},{default:h((function(o){var a=o.navigate,c=o.href,s=o.isActive,p=o.isExactActive;return[x((l(),d("a",u({href:c,class:t.cx("action",{isActive:s,isExactActive:p}),target:e.target,tabindex:"-1","aria-hidden":"true",onClick:function(t){return r.onItemActionClick(t,e,a)}},r.getPTOptions(r.getItemId(i),"action")),[n.templates.icon?(l(),b(y(n.templates.icon),{key:1,item:e,class:g(t.cx("icon"))},null,8,["item","class"])):x((l(),d("span",u({key:0,class:[t.cx("icon"),e.icon]},r.getPTOptions(r.getItemId(i),"icon")),null,16)),[[I]])],16,M)),[[k,{value:e.label,disabled:!n.tooltipOptions},n.tooltipOptions]])]})),_:2},1032,["to"])):x((l(),d("a",u({key:1,href:e.url,class:t.cx("action"),target:e.target,tabindex:"-1","aria-hidden":"true"},r.getPTOptions(r.getItemId(i),"action")),[n.templates.icon?(l(),b(y(n.templates.icon),{key:1,item:e,class:g(t.cx("icon"))},null,8,["item","class"])):x((l(),d("span",u({key:0,class:[t.cx("icon"),e.icon]},r.getPTOptions(r.getItemId(i),"icon")),null,16)),[[I]])],16,T)),[[k,{value:e.label,disabled:!n.tooltipOptions},n.tooltipOptions]])],64))],16)],16,E)})),128))],16,P)],16)};var F={name:"Dock",extends:v,components:{DockSub:K}};F.render=function(t,e,n,i,o,r){var a=c("DockSub");return l(),d("div",u({class:t.cx("root"),style:t.style},t.ptm("root"),{"data-pc-name":"dock"}),[I(a,{model:t.model,templates:t.$slots,exact:t.exact,tooltipOptions:t.tooltipOptions,position:t.position,menuId:t.menuId,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,tabindex:t.tabindex,pt:t.pt},null,8,["model","templates","exact","tooltipOptions","position","menuId","aria-label","aria-labelledby","tabindex","pt"])],16)};export{F as default};
|
|
1
|
+
import t from"primevue/basecomponent";import{useStyle as e}from"primevue/usestyle";import n from"primevue/ripple";import i from"primevue/tooltip";import{UniqueComponentId as o,ObjectUtils as r,DomHandler as a}from"primevue/utils";import{resolveComponent as c,resolveDirective as s,openBlock as l,createElementBlock as d,mergeProps as u,createElementVNode as p,Fragment as m,renderList as f,createBlock as b,withCtx as h,withDirectives as x,resolveDynamicComponent as y,normalizeClass as k,createVNode as g}from"vue";var v=e("\n.p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n\n.p-dock-list-container {\n display: flex;\n pointer-events: auto;\n}\n\n.p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-dock-item {\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n}\n\n.p-dock-link {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n}\n\n.p-dock-item-second-prev,\n.p-dock-item-second-next {\n transform: scale(1.2);\n}\n\n.p-dock-item-prev,\n.p-dock-item-next {\n transform: scale(1.4);\n}\n\n.p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n}\n\n/* Position */\n/* top */\n.p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n}\n\n.p-dock-top .p-dock-item {\n transform-origin: center top;\n}\n\n/* bottom */\n.p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n}\n\n.p-dock-bottom .p-dock-item {\n transform-origin: center bottom;\n}\n\n/* right */\n.p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-right .p-dock-item {\n transform-origin: center right;\n}\n\n.p-dock-right .p-dock-list {\n flex-direction: column;\n}\n\n/* left */\n.p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-left .p-dock-item {\n transform-origin: center left;\n}\n\n.p-dock-left .p-dock-list {\n flex-direction: column;\n}\n",{name:"dock",manual:!0}),I={name:"BaseDock",extends:t,props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,exact:{type:Boolean,default:!0},menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(t){var e=t.props;return["p-dock p-component","p-dock-".concat(e.position),e.class]},container:"p-dock-list-container",menu:"p-dock-list",menuitem:function(t){var e=t.instance,n=t.processedItem,i=t.index;return["p-dock-item",{"p-focus":e.isItemActive(t.id),"p-disabled":e.disabled(n),"p-dock-item-second-prev":e.currentIndex-2===i,"p-dock-item-prev":e.currentIndex-1===i,"p-dock-item-current":e.currentIndex===i,"p-dock-item-next":e.currentIndex+1===i,"p-dock-item-second-next":e.currentIndex+2===i}]},content:"p-menuitem-content",action:function(t){return["p-dock-link",{"router-link-active":t.isActive,"router-link-active-exact":t.props.exact&&t.isExactActive}]},icon:"p-dock-icon"},loadStyle:v.load},provide:function(){return{$parentInstance:this}}};function O(t){return D(t)||S(t)||w(t)||A()}function A(){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(t,e){if(t){if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,e):void 0}}function S(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function D(t){if(Array.isArray(t))return L(t)}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var K={name:"DockSub",hostName:"Dock",extends:t,emits:["focus","blur"],props:{position:{type:String,default:"bottom"},model:{type:Array,default:null},templates:{type:null,default:null},exact:{type:Boolean,default:!0},tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:function(){return{id:this.menuId,currentIndex:-3,focused:!1,focusedOptionIndex:-1}},watch:{menuId:function(t){this.id=t||o()}},mounted:function(){this.id=this.id||o()},methods:{getItemId:function(t){return"".concat(this.id,"_").concat(t)},getItemProp:function(t,e){return t&&t.item?r.getItemValue(t.item[e]):void 0},getPTOptions:function(t,e){return this.ptm(t,{context:{index:e,active:this.isItemActive(this.getItemId(e))}})},isSameMenuItem:function(t){return t.currentTarget&&(t.currentTarget.isSameNode(t.target)||t.currentTarget.isSameNode(t.target.closest('[data-pc-section="menuitem"]')))},isItemActive:function(t){return t===this.focusedOptionIndex},onListMouseLeave:function(){this.currentIndex=-3},onItemMouseEnter:function(t){this.currentIndex=t},onItemActionClick:function(t,e){e&&e(t)},onItemClick:function(t,e){if(this.isSameMenuItem(t)){var n=this.getItemProp(e,"command");n&&n({originalEvent:t,item:e.item})}},onListFocus:function(t){this.focused=!0,this.changeFocusedOptionIndex(0),this.$emit("focus",t)},onListBlur:function(t){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",t)},onListKeyDown:function(t){switch(t.code){case"ArrowDown":"left"!==this.position&&"right"!==this.position||this.onArrowDownKey(),t.preventDefault();break;case"ArrowUp":"left"!==this.position&&"right"!==this.position||this.onArrowUpKey(),t.preventDefault();break;case"ArrowRight":"top"!==this.position&&"bottom"!==this.position||this.onArrowDownKey(),t.preventDefault();break;case"ArrowLeft":"top"!==this.position&&"bottom"!==this.position||this.onArrowUpKey(),t.preventDefault();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"Enter":case"Space":this.onSpaceKey(t),t.preventDefault()}},onArrowDownKey:function(){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t)},onArrowUpKey:function(){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t)},onHomeKey:function(){this.changeFocusedOptionIndex(0)},onEndKey:function(){this.changeFocusedOptionIndex(a.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},onSpaceKey:function(){var t=a.findSingle(this.$refs.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),e=t&&a.findSingle(t,'[data-pc-section="action"]');e?e.click():t&&t.click()},findNextOptionIndex:function(t){var e=O(a.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(e){return e.id===t}));return e>-1?e+1:0},findPrevOptionIndex:function(t){var e=O(a.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(e){return e.id===t}));return e>-1?e-1:0},changeFocusedOptionIndex:function(t){var e=a.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]');this.focusedOptionIndex=e[t>=e.length?e.length-1:t<0?0:t].getAttribute("id")},disabled:function(t){return"function"==typeof t.disabled?t.disabled():t.disabled}},computed:{focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},directives:{ripple:n,tooltip:i}},P=["id","aria-orientation","aria-activedescendant","tabindex","aria-label","aria-labelledby"],E=["id","aria-label","aria-disabled","onClick","onMouseenter","data-p-focused","data-p-disabled"],M=["href","target","onClick"],T=["href","target"];K.render=function(t,e,n,i,o,r){var a=c("router-link"),g=s("ripple"),v=s("tooltip");return l(),d("div",u({class:t.cx("container")},t.ptm("container")),[p("ul",u({ref:"list",id:o.id,class:t.cx("menu"),role:"menu","aria-orientation":"bottom"===n.position||"top"===n.position?"horizontal":"vertical","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:n.tabindex,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,onFocus:e[0]||(e[0]=function(){return r.onListFocus&&r.onListFocus.apply(r,arguments)}),onBlur:e[1]||(e[1]=function(){return r.onListBlur&&r.onListBlur.apply(r,arguments)}),onKeydown:e[2]||(e[2]=function(){return r.onListKeyDown&&r.onListKeyDown.apply(r,arguments)}),onMouseleave:e[3]||(e[3]=function(){return r.onListMouseLeave&&r.onListMouseLeave.apply(r,arguments)})},t.ptm("menu")),[(l(!0),d(m,null,f(n.model,(function(e,i){return l(),d("li",u({key:i,id:r.getItemId(i),class:t.cx("menuitem",{processedItem:e,index:i,id:r.getItemId(i)}),role:"menuitem","aria-label":e.label,"aria-disabled":r.disabled(e),onClick:function(t){return r.onItemClick(t,e)},onMouseenter:function(t){return r.onItemMouseEnter(i)}},r.getPTOptions("menuitem",i),{"data-p-focused":r.isItemActive(r.getItemId(i)),"data-p-disabled":r.disabled(e)||!1}),[p("div",u({class:t.cx("content")},r.getPTOptions("content",i)),[n.templates.item?(l(),b(y(n.templates.item),{key:1,item:e,index:i},null,8,["item","index"])):(l(),d(m,{key:0},[e.to&&!r.disabled(e)?(l(),b(a,{key:0,to:e.to,custom:""},{default:h((function(o){var a=o.navigate,c=o.href,s=o.isActive,p=o.isExactActive;return[x((l(),d("a",u({href:c,class:t.cx("action",{isActive:s,isExactActive:p}),target:e.target,tabindex:"-1","aria-hidden":"true",onClick:function(t){return r.onItemActionClick(t,e,a)}},r.getPTOptions("action",i)),[n.templates.icon?(l(),b(y(n.templates.icon),{key:1,item:e,class:k(t.cx("icon"))},null,8,["item","class"])):x((l(),d("span",u({key:0,class:[t.cx("icon"),e.icon]},r.getPTOptions("icon",i)),null,16)),[[g]])],16,M)),[[v,{value:e.label,disabled:!n.tooltipOptions},n.tooltipOptions]])]})),_:2},1032,["to"])):x((l(),d("a",u({key:1,href:e.url,class:t.cx("action"),target:e.target,tabindex:"-1","aria-hidden":"true"},r.getPTOptions("action",i)),[n.templates.icon?(l(),b(y(n.templates.icon),{key:1,item:e,class:k(t.cx("icon"))},null,8,["item","class"])):x((l(),d("span",u({key:0,class:[t.cx("icon"),e.icon]},r.getPTOptions("icon",i)),null,16)),[[g]])],16,T)),[[v,{value:e.label,disabled:!n.tooltipOptions},n.tooltipOptions]])],64))],16)],16,E)})),128))],16,P)],16)};var F={name:"Dock",extends:I,components:{DockSub:K}};F.render=function(t,e,n,i,o,r){var a=c("DockSub");return l(),d("div",u({class:t.cx("root"),style:t.style},t.ptm("root"),{"data-pc-name":"dock"}),[g(a,{model:t.model,templates:t.$slots,exact:t.exact,tooltipOptions:t.tooltipOptions,position:t.position,menuId:t.menuId,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,tabindex:t.tabindex,pt:t.pt},null,8,["model","templates","exact","tooltipOptions","position","menuId","aria-label","aria-labelledby","tabindex","pt"])],16)};export{F as default};
|
package/dock/dock.js
CHANGED
|
@@ -161,10 +161,11 @@ this.primevue.dock = (function (BaseComponent, usestyle, Ripple, Tooltip, utils,
|
|
|
161
161
|
getItemProp: function getItemProp(processedItem, name) {
|
|
162
162
|
return processedItem && processedItem.item ? utils.ObjectUtils.getItemValue(processedItem.item[name]) : undefined;
|
|
163
163
|
},
|
|
164
|
-
getPTOptions: function getPTOptions(
|
|
164
|
+
getPTOptions: function getPTOptions(key, index) {
|
|
165
165
|
return this.ptm(key, {
|
|
166
166
|
context: {
|
|
167
|
-
|
|
167
|
+
index: index,
|
|
168
|
+
active: this.isItemActive(this.getItemId(index))
|
|
168
169
|
}
|
|
169
170
|
});
|
|
170
171
|
},
|
|
@@ -352,12 +353,12 @@ this.primevue.dock = (function (BaseComponent, usestyle, Ripple, Tooltip, utils,
|
|
|
352
353
|
onMouseenter: function onMouseenter($event) {
|
|
353
354
|
return $options.onItemMouseEnter(index);
|
|
354
355
|
}
|
|
355
|
-
}, $options.getPTOptions(
|
|
356
|
+
}, $options.getPTOptions('menuitem', index), {
|
|
356
357
|
"data-p-focused": $options.isItemActive($options.getItemId(index)),
|
|
357
358
|
"data-p-disabled": $options.disabled(processedItem) || false
|
|
358
359
|
}), [vue.createElementVNode("div", vue.mergeProps({
|
|
359
360
|
"class": _ctx.cx('content')
|
|
360
|
-
}, $options.getPTOptions(
|
|
361
|
+
}, $options.getPTOptions('content', index)), [!$props.templates['item'] ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
361
362
|
key: 0
|
|
362
363
|
}, [processedItem.to && !$options.disabled(processedItem) ? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
363
364
|
key: 0,
|
|
@@ -381,10 +382,10 @@ this.primevue.dock = (function (BaseComponent, usestyle, Ripple, Tooltip, utils,
|
|
|
381
382
|
onClick: function onClick($event) {
|
|
382
383
|
return $options.onItemActionClick($event, processedItem, navigate);
|
|
383
384
|
}
|
|
384
|
-
}, $options.getPTOptions(
|
|
385
|
+
}, $options.getPTOptions('action', index)), [!$props.templates['icon'] ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
385
386
|
key: 0,
|
|
386
387
|
"class": [_ctx.cx('icon'), processedItem.icon]
|
|
387
|
-
}, $options.getPTOptions(
|
|
388
|
+
}, $options.getPTOptions('icon', index)), null, 16)), [[_directive_ripple]]) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['icon']), {
|
|
388
389
|
key: 1,
|
|
389
390
|
item: processedItem,
|
|
390
391
|
"class": vue.normalizeClass(_ctx.cx('icon'))
|
|
@@ -401,10 +402,10 @@ this.primevue.dock = (function (BaseComponent, usestyle, Ripple, Tooltip, utils,
|
|
|
401
402
|
target: processedItem.target,
|
|
402
403
|
tabindex: "-1",
|
|
403
404
|
"aria-hidden": "true"
|
|
404
|
-
}, $options.getPTOptions(
|
|
405
|
+
}, $options.getPTOptions('action', index)), [!$props.templates['icon'] ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
405
406
|
key: 0,
|
|
406
407
|
"class": [_ctx.cx('icon'), processedItem.icon]
|
|
407
|
-
}, $options.getPTOptions(
|
|
408
|
+
}, $options.getPTOptions('icon', index)), null, 16)), [[_directive_ripple]]) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['icon']), {
|
|
408
409
|
key: 1,
|
|
409
410
|
item: processedItem,
|
|
410
411
|
"class": vue.normalizeClass(_ctx.cx('icon'))
|
package/dock/dock.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dock=function(e,t,n,o,i,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e),l=a(n),s=a(o),d=t.useStyle("\n.p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n\n.p-dock-list-container {\n display: flex;\n pointer-events: auto;\n}\n\n.p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-dock-item {\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n}\n\n.p-dock-link {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n}\n\n.p-dock-item-second-prev,\n.p-dock-item-second-next {\n transform: scale(1.2);\n}\n\n.p-dock-item-prev,\n.p-dock-item-next {\n transform: scale(1.4);\n}\n\n.p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n}\n\n/* Position */\n/* top */\n.p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n}\n\n.p-dock-top .p-dock-item {\n transform-origin: center top;\n}\n\n/* bottom */\n.p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n}\n\n.p-dock-bottom .p-dock-item {\n transform-origin: center bottom;\n}\n\n/* right */\n.p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-right .p-dock-item {\n transform-origin: center right;\n}\n\n.p-dock-right .p-dock-list {\n flex-direction: column;\n}\n\n/* left */\n.p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-left .p-dock-item {\n transform-origin: center left;\n}\n\n.p-dock-left .p-dock-list {\n flex-direction: column;\n}\n",{name:"dock",manual:!0}),p={name:"BaseDock",extends:c.default,props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,exact:{type:Boolean,default:!0},menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){var t=e.props;return["p-dock p-component","p-dock-".concat(t.position),t.class]},container:"p-dock-list-container",menu:"p-dock-list",menuitem:function(e){var t=e.instance,n=e.processedItem,o=e.index;return["p-dock-item",{"p-focus":t.isItemActive(e.id),"p-disabled":t.disabled(n),"p-dock-item-second-prev":t.currentIndex-2===o,"p-dock-item-prev":t.currentIndex-1===o,"p-dock-item-current":t.currentIndex===o,"p-dock-item-next":t.currentIndex+1===o,"p-dock-item-second-next":t.currentIndex+2===o}]},content:"p-menuitem-content",action:function(e){return["p-dock-link",{"router-link-active":e.isActive,"router-link-active-exact":e.props.exact&&e.isExactActive}]},icon:"p-dock-icon"},loadStyle:d.load},provide:function(){return{$parentInstance:this}}};function u(e){return h(e)||k(e)||f(e)||m()}function m(){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 f(e,t){if(e){if("string"==typeof e)return b(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)?b(e,t):void 0}}function k(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(e){if(Array.isArray(e))return b(e)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var g={name:"DockSub",hostName:"Dock",extends:c.default,emits:["focus","blur"],props:{position:{type:String,default:"bottom"},model:{type:Array,default:null},templates:{type:null,default:null},exact:{type:Boolean,default:!0},tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:function(){return{id:this.menuId,currentIndex:-3,focused:!1,focusedOptionIndex:-1}},watch:{menuId:function(e){this.id=e||i.UniqueComponentId()}},mounted:function(){this.id=this.id||i.UniqueComponentId()},methods:{getItemId:function(e){return"".concat(this.id,"_").concat(e)},getItemProp:function(e,t){return e&&e.item?i.ObjectUtils.getItemValue(e.item[t]):void 0},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isItemActive(e)}})},isSameMenuItem:function(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[data-pc-section="menuitem"]')))},isItemActive:function(e){return e===this.focusedOptionIndex},onListMouseLeave:function(){this.currentIndex=-3},onItemMouseEnter:function(e){this.currentIndex=e},onItemActionClick:function(e,t){t&&t(e)},onItemClick:function(e,t){if(this.isSameMenuItem(e)){var n=this.getItemProp(t,"command");n&&n({originalEvent:e,item:t.item})}},onListFocus:function(e){this.focused=!0,this.changeFocusedOptionIndex(0),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":"left"!==this.position&&"right"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowUp":"left"!==this.position&&"right"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"ArrowRight":"top"!==this.position&&"bottom"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowLeft":"top"!==this.position&&"bottom"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"Enter":case"Space":this.onSpaceKey(e),e.preventDefault()}},onArrowDownKey:function(){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onArrowUpKey:function(){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onHomeKey:function(){this.changeFocusedOptionIndex(0)},onEndKey:function(){this.changeFocusedOptionIndex(i.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},onSpaceKey:function(){var e=i.DomHandler.findSingle(this.$refs.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),t=e&&i.DomHandler.findSingle(e,'[data-pc-section="action"]');t?t.click():e&&e.click()},findNextOptionIndex:function(e){var t=u(i.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=u(i.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=i.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]');this.focusedOptionIndex=t[e>=t.length?t.length-1:e<0?0:e].getAttribute("id")},disabled:function(e){return"function"==typeof e.disabled?e.disabled():e.disabled}},computed:{focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},directives:{ripple:l.default,tooltip:s.default}},v=["id","aria-orientation","aria-activedescendant","tabindex","aria-label","aria-labelledby"],y=["id","aria-label","aria-disabled","onClick","onMouseenter","data-p-focused","data-p-disabled"],x=["href","target","onClick"],I=["href","target"];g.render=function(e,t,n,o,i,a){var c=r.resolveComponent("router-link"),l=r.resolveDirective("ripple"),s=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("container")},e.ptm("container")),[r.createElementVNode("ul",r.mergeProps({ref:"list",id:i.id,class:e.cx("menu"),role:"menu","aria-orientation":"bottom"===n.position||"top"===n.position?"horizontal":"vertical","aria-activedescendant":i.focused?a.focusedOptionId:void 0,tabindex:n.tabindex,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=function(){return a.onListFocus&&a.onListFocus.apply(a,arguments)}),onBlur:t[1]||(t[1]=function(){return a.onListBlur&&a.onListBlur.apply(a,arguments)}),onKeydown:t[2]||(t[2]=function(){return a.onListKeyDown&&a.onListKeyDown.apply(a,arguments)}),onMouseleave:t[3]||(t[3]=function(){return a.onListMouseLeave&&a.onListMouseLeave.apply(a,arguments)})},e.ptm("menu")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.model,(function(t,o){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:o,id:a.getItemId(o),class:e.cx("menuitem",{processedItem:t,index:o,id:a.getItemId(o)}),role:"menuitem","aria-label":t.label,"aria-disabled":a.disabled(t),onClick:function(e){return a.onItemClick(e,t)},onMouseenter:function(e){return a.onItemMouseEnter(o)}},a.getPTOptions(a.getItemId(o),"menuitem"),{"data-p-focused":a.isItemActive(a.getItemId(o)),"data-p-disabled":a.disabled(t)||!1}),[r.createElementVNode("div",r.mergeProps({class:e.cx("content")},a.getPTOptions(a.getItemId(o),"content")),[n.templates.item?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.item),{key:1,item:t,index:o},null,8,["item","index"])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[t.to&&!a.disabled(t)?(r.openBlock(),r.createBlock(c,{key:0,to:t.to,custom:""},{default:r.withCtx((function(i){var c=i.navigate,d=i.href,p=i.isActive,u=i.isExactActive;return[r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({href:d,class:e.cx("action",{isActive:p,isExactActive:u}),target:t.target,tabindex:"-1","aria-hidden":"true",onClick:function(e){return a.onItemActionClick(e,t,c)}},a.getPTOptions(a.getItemId(o),"action")),[n.templates.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.icon),{key:1,item:t,class:r.normalizeClass(e.cx("icon"))},null,8,["item","class"])):r.withDirectives((r.openBlock(),r.createElementBlock("span",r.mergeProps({key:0,class:[e.cx("icon"),t.icon]},a.getPTOptions(a.getItemId(o),"icon")),null,16)),[[l]])],16,x)),[[s,{value:t.label,disabled:!n.tooltipOptions},n.tooltipOptions]])]})),_:2},1032,["to"])):r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({key:1,href:t.url,class:e.cx("action"),target:t.target,tabindex:"-1","aria-hidden":"true"},a.getPTOptions(a.getItemId(o),"action")),[n.templates.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.icon),{key:1,item:t,class:r.normalizeClass(e.cx("icon"))},null,8,["item","class"])):r.withDirectives((r.openBlock(),r.createElementBlock("span",r.mergeProps({key:0,class:[e.cx("icon"),t.icon]},a.getPTOptions(a.getItemId(o),"icon")),null,16)),[[l]])],16,I)),[[s,{value:t.label,disabled:!n.tooltipOptions},n.tooltipOptions]])],64))],16)],16,y)})),128))],16,v)],16)};var O={name:"Dock",extends:p,components:{DockSub:g}};return O.render=function(e,t,n,o,i,a){var c=r.resolveComponent("DockSub");return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root"),style:e.style},e.ptm("root"),{"data-pc-name":"dock"}),[r.createVNode(c,{model:e.model,templates:e.$slots,exact:e.exact,tooltipOptions:e.tooltipOptions,position:e.position,menuId:e.menuId,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,tabindex:e.tabindex,pt:e.pt},null,8,["model","templates","exact","tooltipOptions","position","menuId","aria-label","aria-labelledby","tabindex","pt"])],16)},O}(primevue.basecomponent,primevue.usestyle,primevue.ripple,primevue.tooltip,primevue.utils,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dock=function(e,t,n,o,i,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e),l=a(n),s=a(o),d=t.useStyle("\n.p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n\n.p-dock-list-container {\n display: flex;\n pointer-events: auto;\n}\n\n.p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-dock-item {\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n}\n\n.p-dock-link {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n}\n\n.p-dock-item-second-prev,\n.p-dock-item-second-next {\n transform: scale(1.2);\n}\n\n.p-dock-item-prev,\n.p-dock-item-next {\n transform: scale(1.4);\n}\n\n.p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n}\n\n/* Position */\n/* top */\n.p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n}\n\n.p-dock-top .p-dock-item {\n transform-origin: center top;\n}\n\n/* bottom */\n.p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n}\n\n.p-dock-bottom .p-dock-item {\n transform-origin: center bottom;\n}\n\n/* right */\n.p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-right .p-dock-item {\n transform-origin: center right;\n}\n\n.p-dock-right .p-dock-list {\n flex-direction: column;\n}\n\n/* left */\n.p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-left .p-dock-item {\n transform-origin: center left;\n}\n\n.p-dock-left .p-dock-list {\n flex-direction: column;\n}\n",{name:"dock",manual:!0}),p={name:"BaseDock",extends:c.default,props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,exact:{type:Boolean,default:!0},menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){var t=e.props;return["p-dock p-component","p-dock-".concat(t.position),t.class]},container:"p-dock-list-container",menu:"p-dock-list",menuitem:function(e){var t=e.instance,n=e.processedItem,o=e.index;return["p-dock-item",{"p-focus":t.isItemActive(e.id),"p-disabled":t.disabled(n),"p-dock-item-second-prev":t.currentIndex-2===o,"p-dock-item-prev":t.currentIndex-1===o,"p-dock-item-current":t.currentIndex===o,"p-dock-item-next":t.currentIndex+1===o,"p-dock-item-second-next":t.currentIndex+2===o}]},content:"p-menuitem-content",action:function(e){return["p-dock-link",{"router-link-active":e.isActive,"router-link-active-exact":e.props.exact&&e.isExactActive}]},icon:"p-dock-icon"},loadStyle:d.load},provide:function(){return{$parentInstance:this}}};function u(e){return k(e)||h(e)||f(e)||m()}function m(){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 f(e,t){if(e){if("string"==typeof e)return b(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)?b(e,t):void 0}}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function k(e){if(Array.isArray(e))return b(e)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var v={name:"DockSub",hostName:"Dock",extends:c.default,emits:["focus","blur"],props:{position:{type:String,default:"bottom"},model:{type:Array,default:null},templates:{type:null,default:null},exact:{type:Boolean,default:!0},tooltipOptions:null,menuId:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},data:function(){return{id:this.menuId,currentIndex:-3,focused:!1,focusedOptionIndex:-1}},watch:{menuId:function(e){this.id=e||i.UniqueComponentId()}},mounted:function(){this.id=this.id||i.UniqueComponentId()},methods:{getItemId:function(e){return"".concat(this.id,"_").concat(e)},getItemProp:function(e,t){return e&&e.item?i.ObjectUtils.getItemValue(e.item[t]):void 0},getPTOptions:function(e,t){return this.ptm(e,{context:{index:t,active:this.isItemActive(this.getItemId(t))}})},isSameMenuItem:function(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[data-pc-section="menuitem"]')))},isItemActive:function(e){return e===this.focusedOptionIndex},onListMouseLeave:function(){this.currentIndex=-3},onItemMouseEnter:function(e){this.currentIndex=e},onItemActionClick:function(e,t){t&&t(e)},onItemClick:function(e,t){if(this.isSameMenuItem(e)){var n=this.getItemProp(t,"command");n&&n({originalEvent:e,item:t.item})}},onListFocus:function(e){this.focused=!0,this.changeFocusedOptionIndex(0),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":"left"!==this.position&&"right"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowUp":"left"!==this.position&&"right"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"ArrowRight":"top"!==this.position&&"bottom"!==this.position||this.onArrowDownKey(),e.preventDefault();break;case"ArrowLeft":"top"!==this.position&&"bottom"!==this.position||this.onArrowUpKey(),e.preventDefault();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"Enter":case"Space":this.onSpaceKey(e),e.preventDefault()}},onArrowDownKey:function(){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onArrowUpKey:function(){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e)},onHomeKey:function(){this.changeFocusedOptionIndex(0)},onEndKey:function(){this.changeFocusedOptionIndex(i.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},onSpaceKey:function(){var e=i.DomHandler.findSingle(this.$refs.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),t=e&&i.DomHandler.findSingle(e,'[data-pc-section="action"]');t?t.click():e&&e.click()},findNextOptionIndex:function(e){var t=u(i.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=u(i.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(t){return t.id===e}));return t>-1?t-1:0},changeFocusedOptionIndex:function(e){var t=i.DomHandler.find(this.$refs.list,'li[data-pc-section="menuitem"][data-p-disabled="false"]');this.focusedOptionIndex=t[e>=t.length?t.length-1:e<0?0:e].getAttribute("id")},disabled:function(e){return"function"==typeof e.disabled?e.disabled():e.disabled}},computed:{focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},directives:{ripple:l.default,tooltip:s.default}},g=["id","aria-orientation","aria-activedescendant","tabindex","aria-label","aria-labelledby"],x=["id","aria-label","aria-disabled","onClick","onMouseenter","data-p-focused","data-p-disabled"],y=["href","target","onClick"],I=["href","target"];v.render=function(e,t,n,o,i,a){var c=r.resolveComponent("router-link"),l=r.resolveDirective("ripple"),s=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("container")},e.ptm("container")),[r.createElementVNode("ul",r.mergeProps({ref:"list",id:i.id,class:e.cx("menu"),role:"menu","aria-orientation":"bottom"===n.position||"top"===n.position?"horizontal":"vertical","aria-activedescendant":i.focused?a.focusedOptionId:void 0,tabindex:n.tabindex,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:t[0]||(t[0]=function(){return a.onListFocus&&a.onListFocus.apply(a,arguments)}),onBlur:t[1]||(t[1]=function(){return a.onListBlur&&a.onListBlur.apply(a,arguments)}),onKeydown:t[2]||(t[2]=function(){return a.onListKeyDown&&a.onListKeyDown.apply(a,arguments)}),onMouseleave:t[3]||(t[3]=function(){return a.onListMouseLeave&&a.onListMouseLeave.apply(a,arguments)})},e.ptm("menu")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.model,(function(t,o){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:o,id:a.getItemId(o),class:e.cx("menuitem",{processedItem:t,index:o,id:a.getItemId(o)}),role:"menuitem","aria-label":t.label,"aria-disabled":a.disabled(t),onClick:function(e){return a.onItemClick(e,t)},onMouseenter:function(e){return a.onItemMouseEnter(o)}},a.getPTOptions("menuitem",o),{"data-p-focused":a.isItemActive(a.getItemId(o)),"data-p-disabled":a.disabled(t)||!1}),[r.createElementVNode("div",r.mergeProps({class:e.cx("content")},a.getPTOptions("content",o)),[n.templates.item?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.item),{key:1,item:t,index:o},null,8,["item","index"])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[t.to&&!a.disabled(t)?(r.openBlock(),r.createBlock(c,{key:0,to:t.to,custom:""},{default:r.withCtx((function(i){var c=i.navigate,d=i.href,p=i.isActive,u=i.isExactActive;return[r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({href:d,class:e.cx("action",{isActive:p,isExactActive:u}),target:t.target,tabindex:"-1","aria-hidden":"true",onClick:function(e){return a.onItemActionClick(e,t,c)}},a.getPTOptions("action",o)),[n.templates.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.icon),{key:1,item:t,class:r.normalizeClass(e.cx("icon"))},null,8,["item","class"])):r.withDirectives((r.openBlock(),r.createElementBlock("span",r.mergeProps({key:0,class:[e.cx("icon"),t.icon]},a.getPTOptions("icon",o)),null,16)),[[l]])],16,y)),[[s,{value:t.label,disabled:!n.tooltipOptions},n.tooltipOptions]])]})),_:2},1032,["to"])):r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({key:1,href:t.url,class:e.cx("action"),target:t.target,tabindex:"-1","aria-hidden":"true"},a.getPTOptions("action",o)),[n.templates.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.icon),{key:1,item:t,class:r.normalizeClass(e.cx("icon"))},null,8,["item","class"])):r.withDirectives((r.openBlock(),r.createElementBlock("span",r.mergeProps({key:0,class:[e.cx("icon"),t.icon]},a.getPTOptions("icon",o)),null,16)),[[l]])],16,I)),[[s,{value:t.label,disabled:!n.tooltipOptions},n.tooltipOptions]])],64))],16)],16,x)})),128))],16,g)],16)};var O={name:"Dock",extends:p,components:{DockSub:v}};return O.render=function(e,t,n,o,i,a){var c=r.resolveComponent("DockSub");return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root"),style:e.style},e.ptm("root"),{"data-pc-name":"dock"}),[r.createVNode(c,{model:e.model,templates:e.$slots,exact:e.exact,tooltipOptions:e.tooltipOptions,position:e.position,menuId:e.menuId,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,tabindex:e.tabindex,pt:e.pt},null,8,["model","templates","exact","tooltipOptions","position","menuId","aria-label","aria-labelledby","tabindex","pt"])],16)},O}(primevue.basecomponent,primevue.usestyle,primevue.ripple,primevue.tooltip,primevue.utils,Vue);
|
package/galleria/Galleria.d.ts
CHANGED
|
@@ -101,6 +101,10 @@ export interface GalleriaPassThroughOptions {
|
|
|
101
101
|
* Uses to pass attributes to the indicator's DOM element.
|
|
102
102
|
*/
|
|
103
103
|
indicator?: GalleriaPassThroughOptionType;
|
|
104
|
+
/**
|
|
105
|
+
* Uses to pass attributes to the indicator button's DOM element.
|
|
106
|
+
*/
|
|
107
|
+
indicatorButton?: GalleriaPassThroughOptionType;
|
|
104
108
|
/**
|
|
105
109
|
* Uses to pass attributes to the thumbnail wrapper's DOM element.
|
|
106
110
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="$attrs.value && $attrs.value.length > 0" :id="id" :class="[cx('root'), $attrs.containerClass]" :style="$attrs.containerStyle" v-bind="{ ...$attrs.containerProps, ...
|
|
3
|
-
<button v-if="$attrs.fullScreen" v-ripple autofocus type="button" :class="cx('closeButton')" :aria-label="closeAriaLabel" @click="$emit('mask-hide')" v-bind="
|
|
4
|
-
<component :is="$attrs.templates['closeicon'] || 'TimesIcon'" :class="cx('closeIcon')" v-bind="
|
|
2
|
+
<div v-if="$attrs.value && $attrs.value.length > 0" :id="id" :class="[cx('root'), $attrs.containerClass]" :style="$attrs.containerStyle" v-bind="{ ...$attrs.containerProps, ...getPTOptions('root') }" data-pc-name="galleria">
|
|
3
|
+
<button v-if="$attrs.fullScreen" v-ripple autofocus type="button" :class="cx('closeButton')" :aria-label="closeAriaLabel" @click="$emit('mask-hide')" v-bind="getPTOptions('closeButton')">
|
|
4
|
+
<component :is="$attrs.templates['closeicon'] || 'TimesIcon'" :class="cx('closeIcon')" v-bind="getPTOptions('closeIcon')" />
|
|
5
5
|
</button>
|
|
6
|
-
<div v-if="$attrs.templates && $attrs.templates['header']" :class="cx('header')" v-bind="
|
|
6
|
+
<div v-if="$attrs.templates && $attrs.templates['header']" :class="cx('header')" v-bind="getPTOptions('header')">
|
|
7
7
|
<component :is="$attrs.templates['header']" />
|
|
8
8
|
</div>
|
|
9
|
-
<div :class="cx('content')" :aria-live="$attrs.autoPlay ? 'polite' : 'off'" v-bind="
|
|
9
|
+
<div :class="cx('content')" :aria-live="$attrs.autoPlay ? 'polite' : 'off'" v-bind="getPTOptions('content')">
|
|
10
10
|
<GalleriaItem
|
|
11
11
|
:id="id"
|
|
12
12
|
v-model:activeIndex="activeIndex"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
:unstyled="unstyled"
|
|
45
45
|
/>
|
|
46
46
|
</div>
|
|
47
|
-
<div v-if="$attrs.templates && $attrs.templates['footer']" :class="cx('footer')" v-bind="
|
|
47
|
+
<div v-if="$attrs.templates && $attrs.templates['footer']" :class="cx('footer')" v-bind="getPTOptions('footer')">
|
|
48
48
|
<component :is="$attrs.templates['footer']" />
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
@@ -60,6 +60,7 @@ import GalleriaThumbnails from './GalleriaThumbnails.vue';
|
|
|
60
60
|
|
|
61
61
|
export default {
|
|
62
62
|
name: 'GalleriaContent',
|
|
63
|
+
hostName: 'Galleria',
|
|
63
64
|
extends: BaseComponent,
|
|
64
65
|
inheritAttrs: false,
|
|
65
66
|
interval: null,
|
|
@@ -97,6 +98,15 @@ export default {
|
|
|
97
98
|
}
|
|
98
99
|
},
|
|
99
100
|
methods: {
|
|
101
|
+
getPTOptions(key) {
|
|
102
|
+
return this.ptm(key, {
|
|
103
|
+
props: {
|
|
104
|
+
...this.$attrs,
|
|
105
|
+
pt: this.pt,
|
|
106
|
+
unstyled: this.unstyled
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
},
|
|
100
110
|
isAutoPlayActive() {
|
|
101
111
|
return this.slideShowActive;
|
|
102
112
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
v-bind="ptm('indicator')"
|
|
30
30
|
:data-p-highlight="isIndicatorItemActive(index)"
|
|
31
31
|
>
|
|
32
|
-
<button v-if="!templates['indicator']" type="button" tabindex="-1" :class="cx('indicatorButton')"></button>
|
|
32
|
+
<button v-if="!templates['indicator']" type="button" tabindex="-1" :class="cx('indicatorButton')" v-bind="ptm('indicatorButton')"></button>
|
|
33
33
|
<component v-if="templates.indicator" :is="templates.indicator" :index="index" />
|
|
34
34
|
</li>
|
|
35
35
|
</ul>
|
|
@@ -44,6 +44,7 @@ import Ripple from 'primevue/ripple';
|
|
|
44
44
|
|
|
45
45
|
export default {
|
|
46
46
|
name: 'GalleriaItem',
|
|
47
|
+
hostName: 'Galleria',
|
|
47
48
|
extends: BaseComponent,
|
|
48
49
|
emits: ['start-slideshow', 'stop-slideshow', 'update:activeIndex'],
|
|
49
50
|
props: {
|
package/galleria/galleria.cjs.js
CHANGED
|
@@ -238,6 +238,7 @@ var script$4 = {
|
|
|
238
238
|
|
|
239
239
|
var script$3 = {
|
|
240
240
|
name: 'GalleriaItem',
|
|
241
|
+
hostName: 'Galleria',
|
|
241
242
|
"extends": BaseComponent__default["default"],
|
|
242
243
|
emits: ['start-slideshow', 'stop-slideshow', 'update:activeIndex'],
|
|
243
244
|
props: {
|
|
@@ -443,12 +444,12 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
443
444
|
}
|
|
444
445
|
}, _ctx.ptm('indicator'), {
|
|
445
446
|
"data-p-highlight": $options.isIndicatorItemActive(index)
|
|
446
|
-
}), [!$props.templates['indicator'] ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
447
|
+
}), [!$props.templates['indicator'] ? (vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
447
448
|
key: 0,
|
|
448
449
|
type: "button",
|
|
449
450
|
tabindex: "-1",
|
|
450
|
-
"class":
|
|
451
|
-
}, null,
|
|
451
|
+
"class": _ctx.cx('indicatorButton')
|
|
452
|
+
}, _ctx.ptm('indicatorButton')), null, 16)) : vue.createCommentVNode("", true), $props.templates.indicator ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.indicator), {
|
|
452
453
|
key: 1,
|
|
453
454
|
index: index
|
|
454
455
|
}, null, 8, ["index"])) : vue.createCommentVNode("", true)], 16, _hoisted_4$1);
|
|
@@ -465,6 +466,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
465
466
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
466
467
|
var script$2 = {
|
|
467
468
|
name: 'GalleriaThumbnails',
|
|
469
|
+
hostName: 'Galleria',
|
|
468
470
|
"extends": BaseComponent__default["default"],
|
|
469
471
|
emits: ['stop-slideshow', 'update:activeIndex'],
|
|
470
472
|
props: {
|
|
@@ -867,12 +869,12 @@ var script$2 = {
|
|
|
867
869
|
}
|
|
868
870
|
};
|
|
869
871
|
|
|
870
|
-
function _typeof$
|
|
871
|
-
function ownKeys$
|
|
872
|
-
function _objectSpread$
|
|
873
|
-
function _defineProperty$
|
|
874
|
-
function _toPropertyKey$
|
|
875
|
-
function _toPrimitive$
|
|
872
|
+
function _typeof$2(obj) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$2(obj); }
|
|
873
|
+
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
874
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
875
|
+
function _defineProperty$2(obj, key, value) { key = _toPropertyKey$2(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
876
|
+
function _toPropertyKey$2(arg) { var key = _toPrimitive$2(arg, "string"); return _typeof$2(key) === "symbol" ? key : String(key); }
|
|
877
|
+
function _toPrimitive$2(input, hint) { if (_typeof$2(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$2(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
876
878
|
var _hoisted_1$2 = ["disabled", "aria-label"];
|
|
877
879
|
var _hoisted_2$1 = ["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"];
|
|
878
880
|
var _hoisted_3$1 = ["tabindex", "aria-label", "aria-current", "onClick"];
|
|
@@ -892,7 +894,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
892
894
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
893
895
|
return $options.navBackward($event);
|
|
894
896
|
})
|
|
895
|
-
}, _objectSpread$
|
|
897
|
+
}, _objectSpread$2(_objectSpread$2({}, $props.prevButtonProps), _ctx.ptm('previousThumbnailButton'))), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.previousthumbnailicon || ($props.isVertical ? 'ChevronUpIcon' : 'ChevronLeftIcon')), vue.mergeProps({
|
|
896
898
|
"class": _ctx.cx('previousThumbnailIcon')
|
|
897
899
|
}, _ctx.ptm('previousThumbnailIcon')), null, 16, ["class"]))], 16, _hoisted_1$2)), [[_directive_ripple]]) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
898
900
|
"class": _ctx.cx('thumbnailItemsContainer'),
|
|
@@ -955,15 +957,22 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
955
957
|
onClick: _cache[5] || (_cache[5] = function ($event) {
|
|
956
958
|
return $options.navForward($event);
|
|
957
959
|
})
|
|
958
|
-
}, _objectSpread$
|
|
960
|
+
}, _objectSpread$2(_objectSpread$2({}, $props.nextButtonProps), _ctx.ptm('nextThumbnailButton'))), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.nextthumbnailicon || ($props.isVertical ? 'ChevronDownIcon' : 'ChevronRightIcon')), vue.mergeProps({
|
|
959
961
|
"class": _ctx.cx('nextThumbnailIcon')
|
|
960
962
|
}, _ctx.ptm('nextThumbnailIcon')), null, 16, ["class"]))], 16, _hoisted_4)), [[_directive_ripple]]) : vue.createCommentVNode("", true)], 16)], 16);
|
|
961
963
|
}
|
|
962
964
|
|
|
963
965
|
script$2.render = render$2;
|
|
964
966
|
|
|
967
|
+
function _typeof$1(obj) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$1(obj); }
|
|
968
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
969
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
970
|
+
function _defineProperty$1(obj, key, value) { key = _toPropertyKey$1(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
971
|
+
function _toPropertyKey$1(arg) { var key = _toPrimitive$1(arg, "string"); return _typeof$1(key) === "symbol" ? key : String(key); }
|
|
972
|
+
function _toPrimitive$1(input, hint) { if (_typeof$1(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$1(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
965
973
|
var script$1 = {
|
|
966
974
|
name: 'GalleriaContent',
|
|
975
|
+
hostName: 'Galleria',
|
|
967
976
|
"extends": BaseComponent__default["default"],
|
|
968
977
|
inheritAttrs: false,
|
|
969
978
|
interval: null,
|
|
@@ -1001,6 +1010,14 @@ var script$1 = {
|
|
|
1001
1010
|
}
|
|
1002
1011
|
},
|
|
1003
1012
|
methods: {
|
|
1013
|
+
getPTOptions: function getPTOptions(key) {
|
|
1014
|
+
return this.ptm(key, {
|
|
1015
|
+
props: _objectSpread$1(_objectSpread$1({}, this.$attrs), {}, {
|
|
1016
|
+
pt: this.pt,
|
|
1017
|
+
unstyled: this.unstyled
|
|
1018
|
+
})
|
|
1019
|
+
});
|
|
1020
|
+
},
|
|
1004
1021
|
isAutoPlayActive: function isAutoPlayActive() {
|
|
1005
1022
|
return this.slideShowActive;
|
|
1006
1023
|
},
|
|
@@ -1062,7 +1079,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1062
1079
|
id: $data.id,
|
|
1063
1080
|
"class": [_ctx.cx('root'), _ctx.$attrs.containerClass],
|
|
1064
1081
|
style: _ctx.$attrs.containerStyle
|
|
1065
|
-
}, _objectSpread(_objectSpread({}, _ctx.$attrs.containerProps),
|
|
1082
|
+
}, _objectSpread(_objectSpread({}, _ctx.$attrs.containerProps), $options.getPTOptions('root')), {
|
|
1066
1083
|
"data-pc-name": "galleria"
|
|
1067
1084
|
}), [_ctx.$attrs.fullScreen ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
1068
1085
|
key: 0,
|
|
@@ -1073,15 +1090,15 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1073
1090
|
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
1074
1091
|
return _ctx.$emit('mask-hide');
|
|
1075
1092
|
})
|
|
1076
|
-
},
|
|
1093
|
+
}, $options.getPTOptions('closeButton')), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$attrs.templates['closeicon'] || 'TimesIcon'), vue.mergeProps({
|
|
1077
1094
|
"class": _ctx.cx('closeIcon')
|
|
1078
|
-
},
|
|
1095
|
+
}, $options.getPTOptions('closeIcon')), null, 16, ["class"]))], 16, _hoisted_2)), [[_directive_ripple]]) : vue.createCommentVNode("", true), _ctx.$attrs.templates && _ctx.$attrs.templates['header'] ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
1079
1096
|
key: 1,
|
|
1080
1097
|
"class": _ctx.cx('header')
|
|
1081
|
-
},
|
|
1098
|
+
}, $options.getPTOptions('header')), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$attrs.templates['header'])))], 16)) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
1082
1099
|
"class": _ctx.cx('content'),
|
|
1083
1100
|
"aria-live": _ctx.$attrs.autoPlay ? 'polite' : 'off'
|
|
1084
|
-
},
|
|
1101
|
+
}, $options.getPTOptions('content')), [vue.createVNode(_component_GalleriaItem, {
|
|
1085
1102
|
id: $data.id,
|
|
1086
1103
|
activeIndex: $data.activeIndex,
|
|
1087
1104
|
"onUpdate:activeIndex": _cache[1] || (_cache[1] = function ($event) {
|
|
@@ -1129,7 +1146,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1129
1146
|
}, null, 8, ["activeIndex", "slideShowActive", "containerId", "value", "templates", "numVisible", "responsiveOptions", "circular", "isVertical", "contentHeight", "showThumbnailNavigators", "prevButtonProps", "nextButtonProps", "onStopSlideshow", "pt", "unstyled"])) : vue.createCommentVNode("", true)], 16, _hoisted_3), _ctx.$attrs.templates && _ctx.$attrs.templates['footer'] ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
1130
1147
|
key: 2,
|
|
1131
1148
|
"class": _ctx.cx('footer')
|
|
1132
|
-
},
|
|
1149
|
+
}, $options.getPTOptions('footer')), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$attrs.templates['footer'])))], 16)) : vue.createCommentVNode("", true)], 16, _hoisted_1$1)) : vue.createCommentVNode("", true);
|
|
1133
1150
|
}
|
|
1134
1151
|
|
|
1135
1152
|
script$1.render = render$1;
|