primevue 3.30.0 → 3.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/accordion/Accordion.d.ts +6 -1
- package/accordion/Accordion.vue +2 -1
- package/accordion/accordion.cjs.js +5 -9
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +5 -9
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +6 -10
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +1 -1
- package/autocomplete/AutoComplete.d.ts +1 -1
- package/avatar/Avatar.d.ts +1 -1
- package/badge/Badge.d.ts +1 -1
- package/basecomponent/BaseComponent.vue +12 -16
- package/basecomponent/basecomponent.cjs.js +18 -6
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +18 -6
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +18 -6
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +8 -2
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +8 -2
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +8 -2
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BlockUI.d.ts +1 -1
- package/breadcrumb/Breadcrumb.d.ts +1 -1
- package/button/Button.d.ts +1 -1
- package/calendar/Calendar.d.ts +1 -1
- package/carousel/Carousel.d.ts +1 -1
- package/cascadeselect/CascadeSelect.d.ts +1 -1
- package/chart/Chart.d.ts +1 -1
- package/checkbox/Checkbox.d.ts +1 -1
- package/chip/Chip.d.ts +1 -1
- package/chips/Chips.d.ts +1 -1
- package/colorpicker/ColorPicker.d.ts +1 -1
- package/column/Column.d.ts +49 -1
- package/columngroup/ColumnGroup.d.ts +6 -1
- package/config/PrimeVue.d.ts +13 -6
- package/confirmdialog/ConfirmDialog.d.ts +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +1 -1
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/core/core.js +144 -103
- package/core/core.min.js +10 -10
- package/datatable/BaseDataTable.vue +7 -1
- package/datatable/BodyCell.vue +7 -4
- package/datatable/ColumnFilter.vue +43 -8
- package/datatable/DataTable.d.ts +31 -1
- package/datatable/FooterCell.vue +5 -2
- package/datatable/HeaderCell.vue +8 -3
- package/datatable/HeaderCheckbox.vue +5 -2
- package/datatable/RowCheckbox.vue +5 -2
- package/datatable/RowRadioButton.vue +5 -2
- package/datatable/TableBody.vue +33 -13
- package/datatable/TableFooter.vue +13 -4
- package/datatable/TableHeader.vue +16 -5
- package/datatable/datatable.cjs.js +221 -145
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +221 -145
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +222 -146
- package/datatable/datatable.min.js +1 -1
- package/dataview/BaseDataView.vue +1 -2
- package/dataview/DataView.d.ts +1 -1
- package/dataview/DataView.vue +3 -3
- package/dataview/dataview.cjs.js +5 -13
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +5 -13
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +5 -13
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +6 -1
- package/deferredcontent/DeferredContent.d.ts +1 -1
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.vue +13 -1
- package/dialog/dialog.cjs.js +6 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +6 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -2
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +1 -1
- package/dock/Dock.d.ts +5 -1
- package/dock/DockSub.vue +9 -8
- package/dock/dock.cjs.js +9 -8
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +9 -8
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +9 -8
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +1 -1
- package/editor/Editor.d.ts +1 -1
- package/fieldset/Fieldset.d.ts +1 -1
- package/fileupload/FileUpload.d.ts +1 -1
- package/galleria/Galleria.d.ts +5 -1
- package/galleria/GalleriaContent.vue +16 -6
- package/galleria/GalleriaItem.vue +2 -1
- package/galleria/GalleriaThumbnails.vue +1 -0
- package/galleria/galleria.cjs.js +34 -17
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +35 -18
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +34 -17
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +1 -1
- package/inlinemessage/InlineMessage.d.ts +1 -1
- package/inplace/Inplace.d.ts +1 -1
- package/inputnumber/InputNumber.d.ts +1 -1
- package/inputswitch/InputSwitch.d.ts +1 -1
- package/inputtext/InputText.d.ts +26 -1
- package/inputtext/InputText.vue +2 -1
- package/inputtext/inputtext.cjs.js +2 -1
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +2 -1
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +2 -1
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +1 -1
- package/listbox/Listbox.d.ts +1 -1
- package/megamenu/MegaMenu.d.ts +1 -1
- package/menu/Menu.d.ts +1 -1
- package/menubar/Menubar.d.ts +1 -1
- package/message/BaseMessage.vue +2 -2
- package/message/Message.d.ts +11 -1
- package/message/Message.vue +3 -3
- package/message/message.cjs.js +8 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +8 -8
- package/message/message.esm.min.js +1 -1
- package/message/message.js +8 -8
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +1 -1
- package/multiselect/MultiSelect.vue +3 -2
- package/multiselect/multiselect.cjs.js +5 -5
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +6 -6
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +5 -5
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +18 -1
- package/orderlist/OrderList.vue +7 -7
- package/orderlist/orderlist.cjs.js +19 -15
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +19 -15
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +19 -15
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +1 -1
- package/overlaypanel/OverlayPanel.d.ts +1 -1
- package/overlaypanel/OverlayPanel.vue +4 -2
- package/overlaypanel/overlaypanel.cjs.js +4 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +4 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +4 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/JumpToPageDropdown.vue +1 -1
- package/paginator/Paginator.d.ts +1 -26
- package/paginator/paginator.cjs.js +1 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +1 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +1 -1
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +2 -2
- package/panelmenu/PanelMenu.d.ts +1 -1
- package/password/Password.d.ts +1 -1
- package/picklist/BasePickList.vue +4 -4
- package/picklist/PickList.d.ts +22 -1
- package/picklist/PickList.vue +19 -19
- package/picklist/picklist.cjs.js +59 -47
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +59 -47
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +59 -47
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +1 -1
- package/progressspinner/ProgressSpinner.d.ts +1 -1
- package/radiobutton/RadioButton.d.ts +1 -1
- package/rating/Rating.d.ts +1 -1
- package/row/Row.d.ts +1 -1
- package/scrollpanel/ScrollPanel.d.ts +1 -1
- package/scrollpanel/ScrollPanel.vue +2 -0
- package/scrollpanel/scrollpanel.cjs.js +6 -2
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +6 -2
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +6 -2
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.d.ts +1 -1
- package/selectbutton/SelectButton.d.ts +1 -1
- package/sidebar/Sidebar.d.ts +1 -1
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +3 -1
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +3 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +3 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +1 -1
- package/slider/Slider.d.ts +1 -1
- package/speeddial/SpeedDial.d.ts +1 -1
- package/splitbutton/SplitButton.d.ts +1 -1
- package/splitbutton/SplitButton.vue +2 -1
- package/splitbutton/splitbutton.cjs.js +4 -2
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +4 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +4 -2
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +1 -1
- package/splitterpanel/SplitterPanel.d.ts +1 -1
- package/steps/Steps.d.ts +1 -1
- package/tabmenu/TabMenu.d.ts +1 -1
- package/tabmenu/TabMenu.vue +71 -72
- package/tabmenu/tabmenu.cjs.js +67 -75
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +67 -75
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +67 -75
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +17 -1
- package/tabview/TabView.d.ts +6 -1
- package/tabview/TabView.vue +12 -4
- package/tabview/tabview.cjs.js +23 -16
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +23 -16
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +24 -17
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +1 -1
- package/terminal/Terminal.d.ts +1 -1
- package/textarea/Textarea.d.ts +18 -1
- package/textarea/Textarea.vue +8 -1
- package/textarea/textarea.cjs.js +8 -1
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +8 -1
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +8 -1
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +1 -1
- package/timeline/Timeline.d.ts +20 -1
- package/timeline/Timeline.vue +14 -6
- package/timeline/timeline.cjs.js +17 -7
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +17 -7
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +17 -7
- package/timeline/timeline.min.js +1 -1
- package/toast/BaseToast.vue +2 -2
- package/toast/Toast.d.ts +11 -1
- package/toast/ToastMessage.vue +3 -2
- package/toast/toast.cjs.js +7 -6
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +7 -6
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +7 -6
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +1 -1
- package/toolbar/Toolbar.d.ts +1 -1
- package/tree/Tree.d.ts +10 -1
- package/tree/TreeNode.vue +3 -1
- package/tree/tree.cjs.js +3 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +3 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +3 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +1 -1
- package/treetable/BaseTreeTable.vue +9 -3
- package/treetable/BodyCell.vue +16 -5
- package/treetable/FooterCell.vue +5 -2
- package/treetable/HeaderCell.vue +11 -3
- package/treetable/TreeTable.d.ts +31 -9
- package/treetable/TreeTable.vue +13 -5
- package/treetable/TreeTableRow.vue +11 -2
- package/treetable/treetable.cjs.js +84 -55
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +85 -56
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +84 -55
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +1 -1
- package/usestyle/UseStyle.d.ts +1 -0
- package/usestyle/usestyle.cjs.js +12 -10
- package/usestyle/usestyle.cjs.min.js +1 -1
- package/usestyle/usestyle.esm.js +12 -10
- package/usestyle/usestyle.esm.min.js +1 -1
- package/usestyle/usestyle.js +12 -10
- package/usestyle/usestyle.min.js +1 -1
- package/utils/Utils.d.ts +4 -3
- package/utils/utils.cjs.js +19 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +19 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +19 -5
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +8 -0
- package/vetur-tags.json +2 -0
- package/virtualscroller/VirtualScroller.d.ts +1 -1
- package/web-types.json +21 -1
package/tabview/tabview.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.tabview=function(e,t,n,r,a,i,o){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(e),s=c(t),d=c(n),p=c(a),u=i.useStyle("\n.p-tabview-nav-container {\n position: relative;\n}\n\n.p-tabview-scrollable .p-tabview-nav-container {\n overflow: hidden;\n}\n\n.p-tabview-nav-content {\n overflow-x: auto;\n overflow-y: hidden;\n scroll-behavior: smooth;\n scrollbar-width: none;\n overscroll-behavior: contain auto;\n}\n\n.p-tabview-nav {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n flex: 1 1 auto;\n}\n\n.p-tabview-header-action {\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n position: relative;\n text-decoration: none;\n overflow: hidden;\n}\n\n.p-tabview-ink-bar {\n display: none;\n z-index: 1;\n}\n\n.p-tabview-header-action:focus {\n z-index: 1;\n}\n\n.p-tabview-title {\n line-height: 1;\n white-space: nowrap;\n}\n\n.p-tabview-nav-btn {\n position: absolute;\n top: 0;\n z-index: 2;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-tabview-nav-prev {\n left: 0;\n}\n\n.p-tabview-nav-next {\n right: 0;\n}\n\n.p-tabview-nav-content::-webkit-scrollbar {\n display: none;\n}\n",{name:"tabview",manual:!0});function b(e){return b="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},b(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=g(e,"string");return"symbol"===b(t)?t:String(t)}function g(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y={name:"TabView",extends:{name:"BaseTabView",extends:p.default,props:{activeIndex:{type:Number,default:0},lazy:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},tabindex:{type:Number,default:0},selectOnFocus:{type:Boolean,default:!1},previousButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null},prevIcon:{type:String,default:void 0},nextIcon:{type:String,default:void 0}},css:{classes:{root:function(e){return["p-tabview p-component",{"p-tabview-scrollable":e.props.scrollable}]},navContainer:"p-tabview-nav-container",previousButton:"p-tabview-nav-prev p-tabview-nav-btn p-link",navContent:"p-tabview-nav-content",nav:"p-tabview-nav",tab:{header:function(e){var t=e.instance,n=e.tab,r=e.index;return["p-tabview-header",t.getTabProp(n,"headerClass"),{"p-highlight":t.d_activeIndex===r,"p-disabled":t.getTabProp(n,"disabled")}]},headerAction:"p-tabview-nav-link p-tabview-header-action",headerTitle:"p-tabview-title",content:function(e){return["p-tabview-panel",e.instance.getTabProp(e.tab,"contentClass")]}},inkbar:"p-tabview-ink-bar",nextButton:"p-tabview-nav-next p-tabview-nav-btn p-link",panelContainer:"p-tabview-panels"},loadStyle:u.load},provide:function(){return{$parentInstance:this}}},emits:["update:activeIndex","tab-change","tab-click"],data:function(){return{id:this.$attrs.id,d_activeIndex:this.activeIndex,isPrevButtonDisabled:!0,isNextButtonDisabled:!1}},watch:{"$attrs.id":function(e){this.id=e||r.UniqueComponentId()},activeIndex:function(e){this.d_activeIndex=e,this.scrollInView({index:e})}},mounted:function(){this.id=this.id||r.UniqueComponentId(),this.updateInkBar(),this.scrollable&&this.updateButtonState()},updated:function(){this.updateInkBar()},methods:{isTabPanel:function(e){return"TabPanel"===e.type.name},isTabActive:function(e){return this.d_activeIndex===e},getTabProp:function(e,t){return e.props?e.props[t]:void 0},getKey:function(e,t){return this.getTabProp(e,"header")||t},getTabHeaderActionId:function(e){return"".concat(this.id,"_").concat(e,"_header_action")},getTabContentId:function(e){return"".concat(this.id,"_").concat(e,"_content")},getTabPT:function(e,t,n){var r={props:e.props,parent:{props:this.$props,state:this.$data},context:{index:n}};return f(f({},this.ptm("tab.".concat(t),{tab:r})),this.ptmo(this.getTabProp(e,"pt"),t,r))},onScroll:function(e){this.scrollable&&this.updateButtonState(),e.preventDefault()},onPrevButtonClick:function(){var e=this.$refs.content,t=r.DomHandler.getWidth(e),n=e.scrollLeft-t;e.scrollLeft=n<=0?0:n},onNextButtonClick:function(){var e=this.$refs.content,t=r.DomHandler.getWidth(e)-this.getVisibleButtonWidths(),n=e.scrollLeft+t,a=e.scrollWidth-t;e.scrollLeft=n>=a?a:n},onTabClick:function(e,t,n){this.changeActiveIndex(e,t,n),this.$emit("tab-click",{originalEvent:e,index:n})},onTabKeyDown:function(e,t,n){switch(e.code){case"ArrowLeft":this.onTabArrowLeftKey(e);break;case"ArrowRight":this.onTabArrowRightKey(e);break;case"Home":this.onTabHomeKey(e);break;case"End":this.onTabEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onTabEnterKey(e,t,n)}},onTabArrowRightKey:function(e){var t=this.findNextHeaderAction(e.target.parentElement);t?this.changeFocusedTab(e,t):this.onTabHomeKey(e),e.preventDefault()},onTabArrowLeftKey:function(e){var t=this.findPrevHeaderAction(e.target.parentElement);t?this.changeFocusedTab(e,t):this.onTabEndKey(e),e.preventDefault()},onTabHomeKey:function(e){var t=this.findFirstHeaderAction();this.changeFocusedTab(e,t),e.preventDefault()},onTabEndKey:function(e){var t=this.findLastHeaderAction();this.changeFocusedTab(e,t),e.preventDefault()},onPageDownKey:function(e){this.scrollInView({index:this.$refs.nav.children.length-2}),e.preventDefault()},onPageUpKey:function(e){this.scrollInView({index:0}),e.preventDefault()},onTabEnterKey:function(e,t,n){this.changeActiveIndex(e,t,n),e.preventDefault()},findNextHeaderAction:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e:e.nextElementSibling;return t?r.DomHandler.getAttribute(t,"data-p-disabled")||"inkbar"===r.DomHandler.getAttribute(t,"data-pc-section")?this.findNextHeaderAction(t):r.DomHandler.findSingle(t,'[data-pc-section="headeraction"]'):null},findPrevHeaderAction:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e:e.previousElementSibling;return t?r.DomHandler.getAttribute(t,"data-p-disabled")||"inkbar"===r.DomHandler.getAttribute(t,"data-pc-section")?this.findPrevHeaderAction(t):r.DomHandler.findSingle(t,'[data-pc-section="headeraction"]'):null},findFirstHeaderAction:function(){return this.findNextHeaderAction(this.$refs.nav.firstElementChild,!0)},findLastHeaderAction:function(){return this.findPrevHeaderAction(this.$refs.nav.lastElementChild,!0)},changeActiveIndex:function(e,t,n){this.getTabProp(t,"disabled")||this.d_activeIndex===n||(this.d_activeIndex=n,this.$emit("update:activeIndex",n),this.$emit("tab-change",{originalEvent:e,index:n}),this.scrollInView({index:n}))},changeFocusedTab:function(e,t){if(t&&(r.DomHandler.focus(t),this.scrollInView({element:t}),this.selectOnFocus)){var n=parseInt(t.parentElement.dataset.index,10);this.changeActiveIndex(e,this.tabs[n],n)}},scrollInView:function(e){var t=e.index,n=e.element||this.$refs.nav.children[void 0===t?-1:t];n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest"})},updateInkBar:function(){var e=this.$refs.nav.children[this.d_activeIndex];this.$refs.inkbar.style.width=r.DomHandler.getWidth(e)+"px",this.$refs.inkbar.style.left=r.DomHandler.getOffset(e).left-r.DomHandler.getOffset(this.$refs.nav).left+"px"},updateButtonState:function(){var e=this.$refs.content,t=e.scrollLeft,n=e.scrollWidth,a=r.DomHandler.getWidth(e);this.isPrevButtonDisabled=0===t,this.isNextButtonDisabled=parseInt(t)===n-a},getVisibleButtonWidths:function(){var e=this.$refs;return[e.prevBtn,e.nextBtn].reduce((function(e,t){return t?e+r.DomHandler.getWidth(t):e}),0)}},computed:{tabs:function(){var e=this;return this.$slots.default().reduce((function(t,n){return e.isTabPanel(n)?t.push(n):n.children&&n.children instanceof Array&&n.children.forEach((function(n){e.isTabPanel(n)&&t.push(n)})),t}),[])},prevButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.previous:void 0},nextButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.next:void 0}},directives:{ripple:d.default},components:{ChevronLeftIcon:l.default,ChevronRightIcon:s.default}};function x(e){return x="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},x(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){var t=B(e,"string");return"symbol"===x(t)?t:String(t)}function B(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var I=["tabindex","aria-label"],D=["data-p-highlight","data-p-disabled","data-pc-index","data-p-active"],A=["id","tabindex","aria-disabled","aria-selected","aria-controls","onClick","onKeydown"],C=["tabindex","aria-label"],S=["aria-labelledby","data-pc-index","data-p-active"];return y.render=function(e,t,n,r,a,i){var c=o.resolveDirective("ripple");return o.openBlock(),o.createElementBlock("div",o.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"tabview"}),[o.createElementVNode("div",o.mergeProps({class:e.cx("navContainer")},e.ptm("navContainer")),[e.scrollable&&!a.isPrevButtonDisabled?o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({key:0,ref:"prevBtn",type:"button",class:e.cx("previousButton"),tabindex:e.tabindex,"aria-label":i.prevButtonAriaLabel,onClick:t[0]||(t[0]=function(){return i.onPrevButtonClick&&i.onPrevButtonClick.apply(i,arguments)})},P(P({},e.previousButtonProps),e.ptm("previousButton"))),[o.renderSlot(e.$slots,"previcon",{},(function(){return[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.prevIcon?"span":"ChevronLeftIcon"),o.mergeProps({"aria-hidden":"true",class:e.prevIcon},e.ptm("previousIcon")),null,16,["class"]))]}))],16,I)),[[c]]):o.createCommentVNode("",!0),o.createElementVNode("div",o.mergeProps({ref:"content",class:e.cx("navContent"),onScroll:t[1]||(t[1]=function(){return i.onScroll&&i.onScroll.apply(i,arguments)})},e.ptm("navContent")),[o.createElementVNode("ul",o.mergeProps({ref:"nav",class:e.cx("nav"),role:"tablist"},e.ptm("nav")),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.tabs,(function(t,n){return o.openBlock(),o.createElementBlock("li",o.mergeProps({key:i.getKey(t,n),style:i.getTabProp(t,"headerStyle"),class:e.cx("tab.header",{tab:t,index:n}),role:"presentation","data-pc-name":"tabpanel","data-p-highlight":a.d_activeIndex===n,"data-p-disabled":i.getTabProp(t,"disabled"),"data-pc-index":n,"data-p-active":a.d_activeIndex===n},P(P(P({},i.getTabProp(t,"headerProps")),i.getTabPT(t,"root",n)),i.getTabPT(t,"header",n))),[o.withDirectives((o.openBlock(),o.createElementBlock("a",o.mergeProps({id:i.getTabHeaderActionId(n),class:e.cx("tab.headerAction"),tabindex:i.getTabProp(t,"disabled")||!i.isTabActive(n)?-1:e.tabindex,role:"tab","aria-disabled":i.getTabProp(t,"disabled"),"aria-selected":i.isTabActive(n),"aria-controls":i.getTabContentId(n),onClick:function(e){return i.onTabClick(e,t,n)},onKeydown:function(e){return i.onTabKeyDown(e,t,n)}},P(P({},i.getTabProp(t,"headerActionProps")),i.getTabPT(t,"headerAction",n))),[t.props&&t.props.header?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:e.cx("tab.headerTitle")},i.getTabPT(t,"headerTitle",n)),o.toDisplayString(t.props.header),17)):o.createCommentVNode("",!0),t.children&&t.children.header?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.children.header),{key:1})):o.createCommentVNode("",!0)],16,A)),[[c]])],16,D)})),128)),o.createElementVNode("li",o.mergeProps({ref:"inkbar",class:e.cx("inkbar"),role:"presentation","aria-hidden":"true"},e.ptm("inkbar")),null,16)],16)],16),e.scrollable&&!a.isNextButtonDisabled?o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({key:1,ref:"nextBtn",type:"button",class:e.cx("nextButton"),tabindex:e.tabindex,"aria-label":i.nextButtonAriaLabel,onClick:t[2]||(t[2]=function(){return i.onNextButtonClick&&i.onNextButtonClick.apply(i,arguments)})},P(P({},e.nextButtonProps),e.ptm("nextButton"))),[o.renderSlot(e.$slots,"nexticon",{},(function(){return[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.nextIcon?"span":"ChevronRightIcon"),o.mergeProps({"aria-hidden":"true",class:e.nextIcon},e.ptm("nextIcon")),null,16,["class"]))]}))],16,C)),[[c]]):o.createCommentVNode("",!0)],16),o.createElementVNode("div",o.mergeProps({class:e.cx("panelContainer")},e.ptm("panelContainer")),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.tabs,(function(t,n){return o.openBlock(),o.createElementBlock(o.Fragment,{key:i.getKey(t,n)},[!e.lazy||i.isTabActive(n)?o.withDirectives((o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,style:i.getTabProp(t,"contentStyle"),class:e.cx("tab.content",{tab:t}),role:"tabpanel","aria-labelledby":i.getTabHeaderActionId(n),"data-pc-name":"tabpanel","data-pc-index":n,"data-p-active":a.d_activeIndex===n},P(P(P({},i.getTabProp(t,"contentProps")),i.getTabPT(t,"root",n)),i.getTabPT(t,"content",n))),[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t)))],16,S)),[[o.vShow,!!e.lazy||i.isTabActive(n)]]):o.createCommentVNode("",!0)],64)})),128))],16)],16)},y}(primevue.icons.chevronleft,primevue.icons.chevronright,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.tabview=function(e,t,n,a,i,r,o){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(e),s=c(t),d=c(n),p=c(r),u=o.useStyle("\n.p-tabview-nav-container {\n position: relative;\n}\n\n.p-tabview-scrollable .p-tabview-nav-container {\n overflow: hidden;\n}\n\n.p-tabview-nav-content {\n overflow-x: auto;\n overflow-y: hidden;\n scroll-behavior: smooth;\n scrollbar-width: none;\n overscroll-behavior: contain auto;\n}\n\n.p-tabview-nav {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n flex: 1 1 auto;\n}\n\n.p-tabview-header-action {\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n position: relative;\n text-decoration: none;\n overflow: hidden;\n}\n\n.p-tabview-ink-bar {\n display: none;\n z-index: 1;\n}\n\n.p-tabview-header-action:focus {\n z-index: 1;\n}\n\n.p-tabview-title {\n line-height: 1;\n white-space: nowrap;\n}\n\n.p-tabview-nav-btn {\n position: absolute;\n top: 0;\n z-index: 2;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-tabview-nav-prev {\n left: 0;\n}\n\n.p-tabview-nav-next {\n right: 0;\n}\n\n.p-tabview-nav-content::-webkit-scrollbar {\n display: none;\n}\n",{name:"tabview",manual:!0}),b={name:"TabView",extends:{name:"BaseTabView",extends:p.default,props:{activeIndex:{type:Number,default:0},lazy:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},tabindex:{type:Number,default:0},selectOnFocus:{type:Boolean,default:!1},previousButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null},prevIcon:{type:String,default:void 0},nextIcon:{type:String,default:void 0}},css:{classes:{root:function(e){return["p-tabview p-component",{"p-tabview-scrollable":e.props.scrollable}]},navContainer:"p-tabview-nav-container",previousButton:"p-tabview-nav-prev p-tabview-nav-btn p-link",navContent:"p-tabview-nav-content",nav:"p-tabview-nav",tab:{header:function(e){var t=e.instance,n=e.tab,a=e.index;return["p-tabview-header",t.getTabProp(n,"headerClass"),{"p-highlight":t.d_activeIndex===a,"p-disabled":t.getTabProp(n,"disabled")}]},headerAction:"p-tabview-nav-link p-tabview-header-action",headerTitle:"p-tabview-title",content:function(e){return["p-tabview-panel",e.instance.getTabProp(e.tab,"contentClass")]}},inkbar:"p-tabview-ink-bar",nextButton:"p-tabview-nav-next p-tabview-nav-btn p-link",panelContainer:"p-tabview-panels"},loadStyle:u.load},provide:function(){return{$parentInstance:this}}},emits:["update:activeIndex","tab-change","tab-click"],data:function(){return{id:this.$attrs.id,d_activeIndex:this.activeIndex,isPrevButtonDisabled:!0,isNextButtonDisabled:!1}},watch:{"$attrs.id":function(e){this.id=e||a.UniqueComponentId()},activeIndex:function(e){this.d_activeIndex=e,this.scrollInView({index:e})}},mounted:function(){this.id=this.id||a.UniqueComponentId(),this.updateInkBar(),this.scrollable&&this.updateButtonState()},updated:function(){this.updateInkBar()},methods:{isTabPanel:function(e){return"TabPanel"===e.type.name},isTabActive:function(e){return this.d_activeIndex===e},getTabProp:function(e,t){return e.props?e.props[t]:void 0},getKey:function(e,t){return this.getTabProp(e,"header")||t},getTabHeaderActionId:function(e){return"".concat(this.id,"_").concat(e,"_header_action")},getTabContentId:function(e){return"".concat(this.id,"_").concat(e,"_content")},getTabPT:function(e,t,n){var a=this.tabs.length,r={props:e.props,parent:{props:this.$props,state:this.$data},context:{index:n,count:a,first:0===n,last:n===a-1,active:this.isTabActive(n)}};return i.mergeProps(this.ptm("tab.".concat(t),{tab:r}),this.ptm("tabpanel.".concat(t),{tabpanel:r}),this.ptm("tabpanel.".concat(t),r),this.ptmo(this.getTabProp(e,"pt"),t,r))},onScroll:function(e){this.scrollable&&this.updateButtonState(),e.preventDefault()},onPrevButtonClick:function(){var e=this.$refs.content,t=a.DomHandler.getWidth(e),n=e.scrollLeft-t;e.scrollLeft=n<=0?0:n},onNextButtonClick:function(){var e=this.$refs.content,t=a.DomHandler.getWidth(e)-this.getVisibleButtonWidths(),n=e.scrollLeft+t,i=e.scrollWidth-t;e.scrollLeft=n>=i?i:n},onTabClick:function(e,t,n){this.changeActiveIndex(e,t,n),this.$emit("tab-click",{originalEvent:e,index:n})},onTabKeyDown:function(e,t,n){switch(e.code){case"ArrowLeft":this.onTabArrowLeftKey(e);break;case"ArrowRight":this.onTabArrowRightKey(e);break;case"Home":this.onTabHomeKey(e);break;case"End":this.onTabEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onTabEnterKey(e,t,n)}},onTabArrowRightKey:function(e){var t=this.findNextHeaderAction(e.target.parentElement);t?this.changeFocusedTab(e,t):this.onTabHomeKey(e),e.preventDefault()},onTabArrowLeftKey:function(e){var t=this.findPrevHeaderAction(e.target.parentElement);t?this.changeFocusedTab(e,t):this.onTabEndKey(e),e.preventDefault()},onTabHomeKey:function(e){var t=this.findFirstHeaderAction();this.changeFocusedTab(e,t),e.preventDefault()},onTabEndKey:function(e){var t=this.findLastHeaderAction();this.changeFocusedTab(e,t),e.preventDefault()},onPageDownKey:function(e){this.scrollInView({index:this.$refs.nav.children.length-2}),e.preventDefault()},onPageUpKey:function(e){this.scrollInView({index:0}),e.preventDefault()},onTabEnterKey:function(e,t,n){this.changeActiveIndex(e,t,n),e.preventDefault()},findNextHeaderAction:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e:e.nextElementSibling;return t?a.DomHandler.getAttribute(t,"data-p-disabled")||"inkbar"===a.DomHandler.getAttribute(t,"data-pc-section")?this.findNextHeaderAction(t):a.DomHandler.findSingle(t,'[data-pc-section="headeraction"]'):null},findPrevHeaderAction:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e:e.previousElementSibling;return t?a.DomHandler.getAttribute(t,"data-p-disabled")||"inkbar"===a.DomHandler.getAttribute(t,"data-pc-section")?this.findPrevHeaderAction(t):a.DomHandler.findSingle(t,'[data-pc-section="headeraction"]'):null},findFirstHeaderAction:function(){return this.findNextHeaderAction(this.$refs.nav.firstElementChild,!0)},findLastHeaderAction:function(){return this.findPrevHeaderAction(this.$refs.nav.lastElementChild,!0)},changeActiveIndex:function(e,t,n){this.getTabProp(t,"disabled")||this.d_activeIndex===n||(this.d_activeIndex=n,this.$emit("update:activeIndex",n),this.$emit("tab-change",{originalEvent:e,index:n}),this.scrollInView({index:n}))},changeFocusedTab:function(e,t){if(t&&(a.DomHandler.focus(t),this.scrollInView({element:t}),this.selectOnFocus)){var n=parseInt(t.parentElement.dataset.index,10);this.changeActiveIndex(e,this.tabs[n],n)}},scrollInView:function(e){var t=e.index,n=e.element||this.$refs.nav.children[void 0===t?-1:t];n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest"})},updateInkBar:function(){var e=this.$refs.nav.children[this.d_activeIndex];this.$refs.inkbar.style.width=a.DomHandler.getWidth(e)+"px",this.$refs.inkbar.style.left=a.DomHandler.getOffset(e).left-a.DomHandler.getOffset(this.$refs.nav).left+"px"},updateButtonState:function(){var e=this.$refs.content,t=e.scrollLeft,n=e.scrollWidth,i=a.DomHandler.getWidth(e);this.isPrevButtonDisabled=0===t,this.isNextButtonDisabled=parseInt(t)===n-i},getVisibleButtonWidths:function(){var e=this.$refs;return[e.prevBtn,e.nextBtn].reduce((function(e,t){return t?e+a.DomHandler.getWidth(t):e}),0)}},computed:{tabs:function(){var e=this;return this.$slots.default().reduce((function(t,n){return e.isTabPanel(n)?t.push(n):n.children&&n.children instanceof Array&&n.children.forEach((function(n){e.isTabPanel(n)&&t.push(n)})),t}),[])},prevButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.previous:void 0},nextButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.next:void 0}},directives:{ripple:d.default},components:{ChevronLeftIcon:l.default,ChevronRightIcon:s.default}};function v(e){return v="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},v(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=y(e,"string");return"symbol"===v(t)?t:String(t)}function y(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!==v(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var x=["tabindex","aria-label"],w=["data-p-highlight","data-p-disabled","data-pc-index","data-p-active"],P=["id","tabindex","aria-disabled","aria-selected","aria-controls","onClick","onKeydown"],k=["tabindex","aria-label"],T=["aria-labelledby","data-pc-index","data-p-active"];return b.render=function(e,t,n,a,r,o){var c=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"tabview"}),[i.createElementVNode("div",i.mergeProps({class:e.cx("navContainer")},e.ptm("navContainer")),[e.scrollable&&!r.isPrevButtonDisabled?i.withDirectives((i.openBlock(),i.createElementBlock("button",i.mergeProps({key:0,ref:"prevBtn",type:"button",class:e.cx("previousButton"),tabindex:e.tabindex,"aria-label":o.prevButtonAriaLabel,onClick:t[0]||(t[0]=function(){return o.onPrevButtonClick&&o.onPrevButtonClick.apply(o,arguments)})},f(f({},e.previousButtonProps),e.ptm("previousButton")),{"data-pc-group-section":"navbutton"}),[i.renderSlot(e.$slots,"previcon",{},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.prevIcon?"span":"ChevronLeftIcon"),i.mergeProps({"aria-hidden":"true",class:e.prevIcon},e.ptm("previousIcon")),null,16,["class"]))]}))],16,x)),[[c]]):i.createCommentVNode("",!0),i.createElementVNode("div",i.mergeProps({ref:"content",class:e.cx("navContent"),onScroll:t[1]||(t[1]=function(){return o.onScroll&&o.onScroll.apply(o,arguments)})},e.ptm("navContent")),[i.createElementVNode("ul",i.mergeProps({ref:"nav",class:e.cx("nav"),role:"tablist"},e.ptm("nav")),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.tabs,(function(t,n){return i.openBlock(),i.createElementBlock("li",i.mergeProps({key:o.getKey(t,n),style:o.getTabProp(t,"headerStyle"),class:e.cx("tab.header",{tab:t,index:n}),role:"presentation"},f(f(f({},o.getTabProp(t,"headerProps")),o.getTabPT(t,"root",n)),o.getTabPT(t,"header",n)),{"data-pc-name":"tabpanel","data-p-highlight":r.d_activeIndex===n,"data-p-disabled":o.getTabProp(t,"disabled"),"data-pc-index":n,"data-p-active":r.d_activeIndex===n}),[i.withDirectives((i.openBlock(),i.createElementBlock("a",i.mergeProps({id:o.getTabHeaderActionId(n),class:e.cx("tab.headerAction"),tabindex:o.getTabProp(t,"disabled")||!o.isTabActive(n)?-1:e.tabindex,role:"tab","aria-disabled":o.getTabProp(t,"disabled"),"aria-selected":o.isTabActive(n),"aria-controls":o.getTabContentId(n),onClick:function(e){return o.onTabClick(e,t,n)},onKeydown:function(e){return o.onTabKeyDown(e,t,n)}},f(f({},o.getTabProp(t,"headerActionProps")),o.getTabPT(t,"headerAction",n))),[t.props&&t.props.header?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:0,class:e.cx("tab.headerTitle")},o.getTabPT(t,"headerTitle",n)),i.toDisplayString(t.props.header),17)):i.createCommentVNode("",!0),t.children&&t.children.header?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.children.header),{key:1})):i.createCommentVNode("",!0)],16,P)),[[c]])],16,w)})),128)),i.createElementVNode("li",i.mergeProps({ref:"inkbar",class:e.cx("inkbar"),role:"presentation","aria-hidden":"true"},e.ptm("inkbar")),null,16)],16)],16),e.scrollable&&!r.isNextButtonDisabled?i.withDirectives((i.openBlock(),i.createElementBlock("button",i.mergeProps({key:1,ref:"nextBtn",type:"button",class:e.cx("nextButton"),tabindex:e.tabindex,"aria-label":o.nextButtonAriaLabel,onClick:t[2]||(t[2]=function(){return o.onNextButtonClick&&o.onNextButtonClick.apply(o,arguments)})},f(f({},e.nextButtonProps),e.ptm("nextButton")),{"data-pc-group-section":"navbutton"}),[i.renderSlot(e.$slots,"nexticon",{},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.nextIcon?"span":"ChevronRightIcon"),i.mergeProps({"aria-hidden":"true",class:e.nextIcon},e.ptm("nextIcon")),null,16,["class"]))]}))],16,k)),[[c]]):i.createCommentVNode("",!0)],16),i.createElementVNode("div",i.mergeProps({class:e.cx("panelContainer")},e.ptm("panelContainer")),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.tabs,(function(t,n){return i.openBlock(),i.createElementBlock(i.Fragment,{key:o.getKey(t,n)},[!e.lazy||o.isTabActive(n)?i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:0,style:o.getTabProp(t,"contentStyle"),class:e.cx("tab.content",{tab:t}),role:"tabpanel","aria-labelledby":o.getTabHeaderActionId(n)},f(f(f({},o.getTabProp(t,"contentProps")),o.getTabPT(t,"root",n)),o.getTabPT(t,"content",n)),{"data-pc-name":"tabpanel","data-pc-index":n,"data-p-active":r.d_activeIndex===n}),[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t)))],16,T)),[[i.vShow,!!e.lazy||o.isTabActive(n)]]):i.createCommentVNode("",!0)],64)})),128))],16)],16)},b}(primevue.icons.chevronleft,primevue.icons.chevronright,primevue.ripple,primevue.utils,Vue,primevue.basecomponent,primevue.usestyle);
|
package/tag/Tag.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { VNode } from 'vue';
|
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
13
|
|
|
14
|
-
export declare type TagPassThroughOptionType = TagPassThroughAttributes | ((options: TagPassThroughMethodOptions) => TagPassThroughAttributes) | null | undefined;
|
|
14
|
+
export declare type TagPassThroughOptionType = TagPassThroughAttributes | ((options: TagPassThroughMethodOptions) => TagPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Custom passthrough(pt) option method.
|
package/terminal/Terminal.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { ComponentHooks } from '../basecomponent';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
-
export declare type TerminalPassThroughOptionType = TerminalPassThroughAttributes | ((options: TerminalPassThroughMethodOptions) => TerminalPassThroughAttributes) | null | undefined;
|
|
13
|
+
export declare type TerminalPassThroughOptionType = TerminalPassThroughAttributes | ((options: TerminalPassThroughMethodOptions) => TerminalPassThroughAttributes | string) | string | null | undefined;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Custom passthrough(pt) option method.
|
package/textarea/Textarea.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { TextareaHTMLAttributes } from 'vue';
|
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
13
|
|
|
14
|
-
export declare type TextareaPassThroughOptionType = TextareaPassThroughAttributes | ((options: TextareaPassThroughMethodOptions) => TextareaPassThroughAttributes) | null | undefined;
|
|
14
|
+
export declare type TextareaPassThroughOptionType = TextareaPassThroughAttributes | ((options: TextareaPassThroughMethodOptions) => TextareaPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Custom passthrough(pt) option method.
|
|
@@ -19,6 +19,7 @@ export declare type TextareaPassThroughOptionType = TextareaPassThroughAttribute
|
|
|
19
19
|
export interface TextareaPassThroughMethodOptions {
|
|
20
20
|
instance: any;
|
|
21
21
|
props: TextareaProps;
|
|
22
|
+
context: TextareaContext;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -44,6 +45,22 @@ export interface TextareaPassThroughAttributes {
|
|
|
44
45
|
[key: string]: any;
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Defines current options in Textarea component.
|
|
50
|
+
*/
|
|
51
|
+
export interface TextareaContext {
|
|
52
|
+
/**
|
|
53
|
+
* Current filled state of the component as a boolean.
|
|
54
|
+
* @defaultValue false
|
|
55
|
+
*/
|
|
56
|
+
filled: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Current disabled state of the component as a boolean.
|
|
59
|
+
* @defaultValue false
|
|
60
|
+
*/
|
|
61
|
+
disabled: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
47
64
|
/**
|
|
48
65
|
* Defines valid properties in Textarea component. In addition to these, all properties of TextareaHTMLAttributes can be used in this component.
|
|
49
66
|
* @extends TextareaHTMLAttributes
|
package/textarea/Textarea.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root')" data-pc-name="textarea"></textarea>
|
|
2
|
+
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root', ptmParams)" data-pc-name="textarea"></textarea>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -44,6 +44,13 @@ export default {
|
|
|
44
44
|
computed: {
|
|
45
45
|
filled() {
|
|
46
46
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
47
|
+
},
|
|
48
|
+
ptmParams() {
|
|
49
|
+
return {
|
|
50
|
+
context: {
|
|
51
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
52
|
+
}
|
|
53
|
+
};
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
56
|
};
|
package/textarea/textarea.cjs.js
CHANGED
|
@@ -78,6 +78,13 @@ var script = {
|
|
|
78
78
|
computed: {
|
|
79
79
|
filled: function filled() {
|
|
80
80
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
81
|
+
},
|
|
82
|
+
ptmParams: function ptmParams() {
|
|
83
|
+
return {
|
|
84
|
+
context: {
|
|
85
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
86
|
+
}
|
|
87
|
+
};
|
|
81
88
|
}
|
|
82
89
|
}
|
|
83
90
|
};
|
|
@@ -90,7 +97,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
90
97
|
onInput: _cache[0] || (_cache[0] = function () {
|
|
91
98
|
return $options.onInput && $options.onInput.apply($options, arguments);
|
|
92
99
|
})
|
|
93
|
-
}, _ctx.ptm('root'), {
|
|
100
|
+
}, _ctx.ptm('root', $options.ptmParams), {
|
|
94
101
|
"data-pc-name": "textarea"
|
|
95
102
|
}), null, 16, _hoisted_1);
|
|
96
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/usestyle"),n=require("vue");function
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/usestyle"),n=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(e),l=t.useStyle("\n.p-inputtextarea-resizable {\n overflow: hidden;\n resize: none;\n}\n\n.p-fluid .p-inputtextarea {\n width: 100%;\n}\n",{name:"textarea",manual:!0}),s={name:"Textarea",extends:{name:"BaseTextarea",extends:i.default,props:{modelValue:null,autoResize:Boolean},css:{classes:{root:function(e){return["p-inputtextarea p-inputtext p-component",{"p-filled":e.instance.filled,"p-inputtextarea-resizable ":e.props.autoResize}]}},loadStyle:l.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],mounted:function(){this.$el.offsetParent&&this.autoResize&&this.resize()},updated:function(){this.$el.offsetParent&&this.autoResize&&this.resize()},methods:{resize:function(){var e=window.getComputedStyle(this.$el);this.$el.style.height="auto",this.$el.style.height="calc(".concat(e.borderTopWidth," + ").concat(e.borderBottomWidth," + ").concat(this.$el.scrollHeight,"px)"),parseFloat(this.$el.style.height)>=parseFloat(this.$el.style.maxHeight)?(this.$el.style.overflowY="scroll",this.$el.style.height=this.$el.style.maxHeight):this.$el.style.overflow="hidden"},onInput:function(e){this.autoResize&&this.resize(),this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},o=["value"];s.render=function(e,t,a,i,l,s){return n.openBlock(),n.createElementBlock("textarea",n.mergeProps({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return s.onInput&&s.onInput.apply(s,arguments)})},e.ptm("root",s.ptmParams),{"data-pc-name":"textarea"}),null,16,o)},module.exports=s;
|
package/textarea/textarea.esm.js
CHANGED
|
@@ -72,6 +72,13 @@ var script = {
|
|
|
72
72
|
computed: {
|
|
73
73
|
filled: function filled() {
|
|
74
74
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
75
|
+
},
|
|
76
|
+
ptmParams: function ptmParams() {
|
|
77
|
+
return {
|
|
78
|
+
context: {
|
|
79
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
80
|
+
}
|
|
81
|
+
};
|
|
75
82
|
}
|
|
76
83
|
}
|
|
77
84
|
};
|
|
@@ -84,7 +91,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
84
91
|
onInput: _cache[0] || (_cache[0] = function () {
|
|
85
92
|
return $options.onInput && $options.onInput.apply($options, arguments);
|
|
86
93
|
})
|
|
87
|
-
}, _ctx.ptm('root'), {
|
|
94
|
+
}, _ctx.ptm('root', $options.ptmParams), {
|
|
88
95
|
"data-pc-name": "textarea"
|
|
89
96
|
}), null, 16, _hoisted_1);
|
|
90
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/basecomponent";import{useStyle as t}from"primevue/usestyle";import{openBlock as
|
|
1
|
+
import e from"primevue/basecomponent";import{useStyle as t}from"primevue/usestyle";import{openBlock as a,createElementBlock as n,mergeProps as i}from"vue";var o=t("\n.p-inputtextarea-resizable {\n overflow: hidden;\n resize: none;\n}\n\n.p-fluid .p-inputtextarea {\n width: 100%;\n}\n",{name:"textarea",manual:!0}),s={name:"Textarea",extends:{name:"BaseTextarea",extends:e,props:{modelValue:null,autoResize:Boolean},css:{classes:{root:function(e){return["p-inputtextarea p-inputtext p-component",{"p-filled":e.instance.filled,"p-inputtextarea-resizable ":e.props.autoResize}]}},loadStyle:o.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],mounted:function(){this.$el.offsetParent&&this.autoResize&&this.resize()},updated:function(){this.$el.offsetParent&&this.autoResize&&this.resize()},methods:{resize:function(){var e=window.getComputedStyle(this.$el);this.$el.style.height="auto",this.$el.style.height="calc(".concat(e.borderTopWidth," + ").concat(e.borderBottomWidth," + ").concat(this.$el.scrollHeight,"px)"),parseFloat(this.$el.style.height)>=parseFloat(this.$el.style.maxHeight)?(this.$el.style.overflowY="scroll",this.$el.style.height=this.$el.style.maxHeight):this.$el.style.overflow="hidden"},onInput:function(e){this.autoResize&&this.resize(),this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},l=["value"];s.render=function(e,t,o,s,r,u){return a(),n("textarea",i({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return u.onInput&&u.onInput.apply(u,arguments)})},e.ptm("root",u.ptmParams),{"data-pc-name":"textarea"}),null,16,l)};export{s as default};
|
package/textarea/textarea.js
CHANGED
|
@@ -76,6 +76,13 @@ this.primevue.textarea = (function (BaseComponent, usestyle, vue) {
|
|
|
76
76
|
computed: {
|
|
77
77
|
filled: function filled() {
|
|
78
78
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
79
|
+
},
|
|
80
|
+
ptmParams: function ptmParams() {
|
|
81
|
+
return {
|
|
82
|
+
context: {
|
|
83
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
84
|
+
}
|
|
85
|
+
};
|
|
79
86
|
}
|
|
80
87
|
}
|
|
81
88
|
};
|
|
@@ -88,7 +95,7 @@ this.primevue.textarea = (function (BaseComponent, usestyle, vue) {
|
|
|
88
95
|
onInput: _cache[0] || (_cache[0] = function () {
|
|
89
96
|
return $options.onInput && $options.onInput.apply($options, arguments);
|
|
90
97
|
})
|
|
91
|
-
}, _ctx.ptm('root'), {
|
|
98
|
+
}, _ctx.ptm('root', $options.ptmParams), {
|
|
92
99
|
"data-pc-name": "textarea"
|
|
93
100
|
}), null, 16, _hoisted_1);
|
|
94
101
|
}
|
package/textarea/textarea.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.textarea=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.textarea=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),s=t.useStyle("\n.p-inputtextarea-resizable {\n overflow: hidden;\n resize: none;\n}\n\n.p-fluid .p-inputtextarea {\n width: 100%;\n}\n",{name:"textarea",manual:!0}),l={name:"Textarea",extends:{name:"BaseTextarea",extends:a.default,props:{modelValue:null,autoResize:Boolean},css:{classes:{root:function(e){return["p-inputtextarea p-inputtext p-component",{"p-filled":e.instance.filled,"p-inputtextarea-resizable ":e.props.autoResize}]}},loadStyle:s.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],mounted:function(){this.$el.offsetParent&&this.autoResize&&this.resize()},updated:function(){this.$el.offsetParent&&this.autoResize&&this.resize()},methods:{resize:function(){var e=window.getComputedStyle(this.$el);this.$el.style.height="auto",this.$el.style.height="calc(".concat(e.borderTopWidth," + ").concat(e.borderBottomWidth," + ").concat(this.$el.scrollHeight,"px)"),parseFloat(this.$el.style.height)>=parseFloat(this.$el.style.maxHeight)?(this.$el.style.overflowY="scroll",this.$el.style.height=this.$el.style.maxHeight):this.$el.style.overflow="hidden"},onInput:function(e){this.autoResize&&this.resize(),this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{disabled:this.$attrs.disabled||""===this.$attrs.disabled}}}}},o=["value"];return l.render=function(e,t,i,a,s,l){return n.openBlock(),n.createElementBlock("textarea",n.mergeProps({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return l.onInput&&l.onInput.apply(l,arguments)})},e.ptm("root",l.ptmParams),{"data-pc-name":"textarea"}),null,16,o)},l}(primevue.basecomponent,primevue.usestyle,Vue);
|
|
@@ -12,7 +12,7 @@ import { ComponentHooks } from '../basecomponent';
|
|
|
12
12
|
import { MenuItem } from '../menuitem';
|
|
13
13
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
14
14
|
|
|
15
|
-
export declare type TieredMenuPassThroughOptionType = TieredMenuPassThroughAttributes | ((options: TieredMenuPassThroughMethodOptions) => TieredMenuPassThroughAttributes) | null | undefined;
|
|
15
|
+
export declare type TieredMenuPassThroughOptionType = TieredMenuPassThroughAttributes | ((options: TieredMenuPassThroughMethodOptions) => TieredMenuPassThroughAttributes | string) | string | null | undefined;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Custom passthrough(pt) option method.
|
package/timeline/Timeline.d.ts
CHANGED
|
@@ -10,7 +10,16 @@ import { VNode } from 'vue';
|
|
|
10
10
|
import { ComponentHooks } from '../basecomponent';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
-
export declare type TimelinePassThroughOptionType = TimelinePassThroughAttributes | null | undefined;
|
|
13
|
+
export declare type TimelinePassThroughOptionType = TimelinePassThroughAttributes | ((options: TimelinePassThroughMethodOptions) => TimelinePassThroughAttributes | string) | string | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface TimelinePassThroughMethodOptions {
|
|
19
|
+
instance: any;
|
|
20
|
+
props: TimelineProps;
|
|
21
|
+
context: TimelineContext;
|
|
22
|
+
}
|
|
14
23
|
|
|
15
24
|
/**
|
|
16
25
|
* Custom passthrough(pt) options.
|
|
@@ -59,6 +68,16 @@ export interface TimelinePassThroughAttributes {
|
|
|
59
68
|
[key: string]: any;
|
|
60
69
|
}
|
|
61
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Defines current options in Timeline component.
|
|
73
|
+
*/
|
|
74
|
+
export interface TimelineContext {
|
|
75
|
+
/**
|
|
76
|
+
* Current index of the item as a number.
|
|
77
|
+
*/
|
|
78
|
+
index: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
62
81
|
/**
|
|
63
82
|
* Defines valid properties in Timeline component.
|
|
64
83
|
*/
|
package/timeline/Timeline.vue
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="timeline">
|
|
3
|
-
<div v-for="(item, index) of value" :key="getKey(item, index)" :class="cx('event')" v-bind="
|
|
4
|
-
<div :class="cx('opposite')" v-bind="
|
|
3
|
+
<div v-for="(item, index) of value" :key="getKey(item, index)" :class="cx('event')" v-bind="getPTOptions('event', index)">
|
|
4
|
+
<div :class="cx('opposite', { index })" v-bind="getPTOptions('opposite', index)">
|
|
5
5
|
<slot name="opposite" :item="item" :index="index"></slot>
|
|
6
6
|
</div>
|
|
7
|
-
<div :class="cx('separator')" v-bind="
|
|
7
|
+
<div :class="cx('separator')" v-bind="getPTOptions('separator', index)">
|
|
8
8
|
<slot name="marker" :item="item" :index="index">
|
|
9
|
-
<div :class="cx('marker')" v-bind="
|
|
9
|
+
<div :class="cx('marker')" v-bind="getPTOptions('marker', index)"></div>
|
|
10
10
|
</slot>
|
|
11
11
|
<slot v-if="index !== value.length - 1" name="connector" :item="item" :index="index">
|
|
12
|
-
<div :class="cx('connector')" v-bind="
|
|
12
|
+
<div :class="cx('connector')" v-bind="getPTOptions('connector', index)"></div>
|
|
13
13
|
</slot>
|
|
14
14
|
</div>
|
|
15
|
-
<div :class="cx('content')" v-bind="
|
|
15
|
+
<div :class="cx('content')" v-bind="getPTOptions('content', index)">
|
|
16
16
|
<slot name="content" :item="item" :index="index"></slot>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
@@ -29,6 +29,14 @@ export default {
|
|
|
29
29
|
methods: {
|
|
30
30
|
getKey(item, index) {
|
|
31
31
|
return this.dataKey ? ObjectUtils.resolveFieldData(item, this.dataKey) : index;
|
|
32
|
+
},
|
|
33
|
+
getPTOptions(key, index) {
|
|
34
|
+
return this.ptm(key, {
|
|
35
|
+
context: {
|
|
36
|
+
index,
|
|
37
|
+
count: this.value.length
|
|
38
|
+
}
|
|
39
|
+
});
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
42
|
};
|
package/timeline/timeline.cjs.js
CHANGED
|
@@ -59,6 +59,14 @@ var script = {
|
|
|
59
59
|
methods: {
|
|
60
60
|
getKey: function getKey(item, index) {
|
|
61
61
|
return this.dataKey ? utils.ObjectUtils.resolveFieldData(item, this.dataKey) : index;
|
|
62
|
+
},
|
|
63
|
+
getPTOptions: function getPTOptions(key, index) {
|
|
64
|
+
return this.ptm(key, {
|
|
65
|
+
context: {
|
|
66
|
+
index: index,
|
|
67
|
+
count: this.value.length
|
|
68
|
+
}
|
|
69
|
+
});
|
|
62
70
|
}
|
|
63
71
|
}
|
|
64
72
|
};
|
|
@@ -72,20 +80,22 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
72
80
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
73
81
|
key: $options.getKey(item, index),
|
|
74
82
|
"class": _ctx.cx('event')
|
|
75
|
-
},
|
|
76
|
-
"class": _ctx.cx('opposite'
|
|
77
|
-
|
|
83
|
+
}, $options.getPTOptions('event', index)), [vue.createElementVNode("div", vue.mergeProps({
|
|
84
|
+
"class": _ctx.cx('opposite', {
|
|
85
|
+
index: index
|
|
86
|
+
})
|
|
87
|
+
}, $options.getPTOptions('opposite', index)), [vue.renderSlot(_ctx.$slots, "opposite", {
|
|
78
88
|
item: item,
|
|
79
89
|
index: index
|
|
80
90
|
})], 16), vue.createElementVNode("div", vue.mergeProps({
|
|
81
91
|
"class": _ctx.cx('separator')
|
|
82
|
-
},
|
|
92
|
+
}, $options.getPTOptions('separator', index)), [vue.renderSlot(_ctx.$slots, "marker", {
|
|
83
93
|
item: item,
|
|
84
94
|
index: index
|
|
85
95
|
}, function () {
|
|
86
96
|
return [vue.createElementVNode("div", vue.mergeProps({
|
|
87
97
|
"class": _ctx.cx('marker')
|
|
88
|
-
},
|
|
98
|
+
}, $options.getPTOptions('marker', index)), null, 16)];
|
|
89
99
|
}), index !== _ctx.value.length - 1 ? vue.renderSlot(_ctx.$slots, "connector", {
|
|
90
100
|
key: 0,
|
|
91
101
|
item: item,
|
|
@@ -93,10 +103,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
93
103
|
}, function () {
|
|
94
104
|
return [vue.createElementVNode("div", vue.mergeProps({
|
|
95
105
|
"class": _ctx.cx('connector')
|
|
96
|
-
},
|
|
106
|
+
}, $options.getPTOptions('connector', index)), null, 16)];
|
|
97
107
|
}) : vue.createCommentVNode("", true)], 16), vue.createElementVNode("div", vue.mergeProps({
|
|
98
108
|
"class": _ctx.cx('content')
|
|
99
|
-
},
|
|
109
|
+
}, $options.getPTOptions('content', index)), [vue.renderSlot(_ctx.$slots, "content", {
|
|
100
110
|
item: item,
|
|
101
111
|
index: index
|
|
102
112
|
})], 16)], 16);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),n=require("primevue/basecomponent"),t=require("primevue/usestyle"),i=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(n),o=t.useStyle("\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n\n.p-timeline-event:last-child {\n min-height: 0;\n}\n\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n\n.p-timeline-horizontal {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n",{name:"timeline",manual:!0}),p={name:"Timeline",extends:{name:"BaseTimeline",extends:r.default,props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},css:{classes:{root:function(e){var n=e.props;return["p-timeline p-component","p-timeline-"+n.align,"p-timeline-"+n.layout]},event:"p-timeline-event",opposite:"p-timeline-event-opposite",separator:"p-timeline-event-separator",marker:"p-timeline-event-marker",connector:"p-timeline-event-connector",content:"p-timeline-event-content"},loadStyle:o.load},provide:function(){return{$parentInstance:this}}},methods:{getKey:function(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t}}};p.render=function(e,n,t,l,r,o){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"timeline"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.value,(function(n,t){return i.openBlock(),i.createElementBlock("div",i.mergeProps({key:o.getKey(n,t),class:e.cx("event")},
|
|
1
|
+
"use strict";var e=require("primevue/utils"),n=require("primevue/basecomponent"),t=require("primevue/usestyle"),i=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(n),o=t.useStyle("\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n\n.p-timeline-event:last-child {\n min-height: 0;\n}\n\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n\n.p-timeline-horizontal {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n",{name:"timeline",manual:!0}),p={name:"Timeline",extends:{name:"BaseTimeline",extends:r.default,props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},css:{classes:{root:function(e){var n=e.props;return["p-timeline p-component","p-timeline-"+n.align,"p-timeline-"+n.layout]},event:"p-timeline-event",opposite:"p-timeline-event-opposite",separator:"p-timeline-event-separator",marker:"p-timeline-event-marker",connector:"p-timeline-event-connector",content:"p-timeline-event-content"},loadStyle:o.load},provide:function(){return{$parentInstance:this}}},methods:{getKey:function(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t},getPTOptions:function(e,n){return this.ptm(e,{context:{index:n,count:this.value.length}})}}};p.render=function(e,n,t,l,r,o){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"timeline"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.value,(function(n,t){return i.openBlock(),i.createElementBlock("div",i.mergeProps({key:o.getKey(n,t),class:e.cx("event")},o.getPTOptions("event",t)),[i.createElementVNode("div",i.mergeProps({class:e.cx("opposite",{index:t})},o.getPTOptions("opposite",t)),[i.renderSlot(e.$slots,"opposite",{item:n,index:t})],16),i.createElementVNode("div",i.mergeProps({class:e.cx("separator")},o.getPTOptions("separator",t)),[i.renderSlot(e.$slots,"marker",{item:n,index:t},(function(){return[i.createElementVNode("div",i.mergeProps({class:e.cx("marker")},o.getPTOptions("marker",t)),null,16)]})),t!==e.value.length-1?i.renderSlot(e.$slots,"connector",{key:0,item:n,index:t},(function(){return[i.createElementVNode("div",i.mergeProps({class:e.cx("connector")},o.getPTOptions("connector",t)),null,16)]})):i.createCommentVNode("",!0)],16),i.createElementVNode("div",i.mergeProps({class:e.cx("content")},o.getPTOptions("content",t)),[i.renderSlot(e.$slots,"content",{item:n,index:t})],16)],16)})),128))],16)},module.exports=p;
|
package/timeline/timeline.esm.js
CHANGED
|
@@ -53,6 +53,14 @@ var script = {
|
|
|
53
53
|
methods: {
|
|
54
54
|
getKey: function getKey(item, index) {
|
|
55
55
|
return this.dataKey ? ObjectUtils.resolveFieldData(item, this.dataKey) : index;
|
|
56
|
+
},
|
|
57
|
+
getPTOptions: function getPTOptions(key, index) {
|
|
58
|
+
return this.ptm(key, {
|
|
59
|
+
context: {
|
|
60
|
+
index: index,
|
|
61
|
+
count: this.value.length
|
|
62
|
+
}
|
|
63
|
+
});
|
|
56
64
|
}
|
|
57
65
|
}
|
|
58
66
|
};
|
|
@@ -66,20 +74,22 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
66
74
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
67
75
|
key: $options.getKey(item, index),
|
|
68
76
|
"class": _ctx.cx('event')
|
|
69
|
-
},
|
|
70
|
-
"class": _ctx.cx('opposite'
|
|
71
|
-
|
|
77
|
+
}, $options.getPTOptions('event', index)), [createElementVNode("div", mergeProps({
|
|
78
|
+
"class": _ctx.cx('opposite', {
|
|
79
|
+
index: index
|
|
80
|
+
})
|
|
81
|
+
}, $options.getPTOptions('opposite', index)), [renderSlot(_ctx.$slots, "opposite", {
|
|
72
82
|
item: item,
|
|
73
83
|
index: index
|
|
74
84
|
})], 16), createElementVNode("div", mergeProps({
|
|
75
85
|
"class": _ctx.cx('separator')
|
|
76
|
-
},
|
|
86
|
+
}, $options.getPTOptions('separator', index)), [renderSlot(_ctx.$slots, "marker", {
|
|
77
87
|
item: item,
|
|
78
88
|
index: index
|
|
79
89
|
}, function () {
|
|
80
90
|
return [createElementVNode("div", mergeProps({
|
|
81
91
|
"class": _ctx.cx('marker')
|
|
82
|
-
},
|
|
92
|
+
}, $options.getPTOptions('marker', index)), null, 16)];
|
|
83
93
|
}), index !== _ctx.value.length - 1 ? renderSlot(_ctx.$slots, "connector", {
|
|
84
94
|
key: 0,
|
|
85
95
|
item: item,
|
|
@@ -87,10 +97,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
87
97
|
}, function () {
|
|
88
98
|
return [createElementVNode("div", mergeProps({
|
|
89
99
|
"class": _ctx.cx('connector')
|
|
90
|
-
},
|
|
100
|
+
}, $options.getPTOptions('connector', index)), null, 16)];
|
|
91
101
|
}) : createCommentVNode("", true)], 16), createElementVNode("div", mergeProps({
|
|
92
102
|
"class": _ctx.cx('content')
|
|
93
|
-
},
|
|
103
|
+
}, $options.getPTOptions('content', index)), [renderSlot(_ctx.$slots, "content", {
|
|
94
104
|
item: item,
|
|
95
105
|
index: index
|
|
96
106
|
})], 16)], 16);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ObjectUtils as e}from"primevue/utils";import n from"primevue/basecomponent";import{useStyle as t}from"primevue/usestyle";import{openBlock as i,createElementBlock as l,mergeProps as o,Fragment as r,renderList as p,createElementVNode as m,renderSlot as a,createCommentVNode as c}from"vue";var s=t("\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n\n.p-timeline-event:last-child {\n min-height: 0;\n}\n\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n\n.p-timeline-horizontal {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n",{name:"timeline",manual:!0}),v={name:"Timeline",extends:{name:"BaseTimeline",extends:n,props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},css:{classes:{root:function(e){var n=e.props;return["p-timeline p-component","p-timeline-"+n.align,"p-timeline-"+n.layout]},event:"p-timeline-event",opposite:"p-timeline-event-opposite",separator:"p-timeline-event-separator",marker:"p-timeline-event-marker",connector:"p-timeline-event-connector",content:"p-timeline-event-content"},loadStyle:s.load},provide:function(){return{$parentInstance:this}}},methods:{getKey:function(n,t){return this.dataKey?e.resolveFieldData(n,this.dataKey):t}}};v.render=function(e,n,t,s,v,d){return i(),l("div",o({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"timeline"}),[(i(!0),l(r,null,p(e.value,(function(n,t){return i(),l("div",o({key:d.getKey(n,t),class:e.cx("event")},
|
|
1
|
+
import{ObjectUtils as e}from"primevue/utils";import n from"primevue/basecomponent";import{useStyle as t}from"primevue/usestyle";import{openBlock as i,createElementBlock as l,mergeProps as o,Fragment as r,renderList as p,createElementVNode as m,renderSlot as a,createCommentVNode as c}from"vue";var s=t("\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n\n.p-timeline-event:last-child {\n min-height: 0;\n}\n\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n\n.p-timeline-horizontal {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n",{name:"timeline",manual:!0}),v={name:"Timeline",extends:{name:"BaseTimeline",extends:n,props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},css:{classes:{root:function(e){var n=e.props;return["p-timeline p-component","p-timeline-"+n.align,"p-timeline-"+n.layout]},event:"p-timeline-event",opposite:"p-timeline-event-opposite",separator:"p-timeline-event-separator",marker:"p-timeline-event-marker",connector:"p-timeline-event-connector",content:"p-timeline-event-content"},loadStyle:s.load},provide:function(){return{$parentInstance:this}}},methods:{getKey:function(n,t){return this.dataKey?e.resolveFieldData(n,this.dataKey):t},getPTOptions:function(e,n){return this.ptm(e,{context:{index:n,count:this.value.length}})}}};v.render=function(e,n,t,s,v,d){return i(),l("div",o({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"timeline"}),[(i(!0),l(r,null,p(e.value,(function(n,t){return i(),l("div",o({key:d.getKey(n,t),class:e.cx("event")},d.getPTOptions("event",t)),[m("div",o({class:e.cx("opposite",{index:t})},d.getPTOptions("opposite",t)),[a(e.$slots,"opposite",{item:n,index:t})],16),m("div",o({class:e.cx("separator")},d.getPTOptions("separator",t)),[a(e.$slots,"marker",{item:n,index:t},(function(){return[m("div",o({class:e.cx("marker")},d.getPTOptions("marker",t)),null,16)]})),t!==e.value.length-1?a(e.$slots,"connector",{key:0,item:n,index:t},(function(){return[m("div",o({class:e.cx("connector")},d.getPTOptions("connector",t)),null,16)]})):c("",!0)],16),m("div",o({class:e.cx("content")},d.getPTOptions("content",t)),[a(e.$slots,"content",{item:n,index:t})],16)],16)})),128))],16)};export{v as default};
|
package/timeline/timeline.js
CHANGED
|
@@ -56,6 +56,14 @@ this.primevue.timeline = (function (utils, BaseComponent, usestyle, vue) {
|
|
|
56
56
|
methods: {
|
|
57
57
|
getKey: function getKey(item, index) {
|
|
58
58
|
return this.dataKey ? utils.ObjectUtils.resolveFieldData(item, this.dataKey) : index;
|
|
59
|
+
},
|
|
60
|
+
getPTOptions: function getPTOptions(key, index) {
|
|
61
|
+
return this.ptm(key, {
|
|
62
|
+
context: {
|
|
63
|
+
index: index,
|
|
64
|
+
count: this.value.length
|
|
65
|
+
}
|
|
66
|
+
});
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
69
|
};
|
|
@@ -69,20 +77,22 @@ this.primevue.timeline = (function (utils, BaseComponent, usestyle, vue) {
|
|
|
69
77
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
70
78
|
key: $options.getKey(item, index),
|
|
71
79
|
"class": _ctx.cx('event')
|
|
72
|
-
},
|
|
73
|
-
"class": _ctx.cx('opposite'
|
|
74
|
-
|
|
80
|
+
}, $options.getPTOptions('event', index)), [vue.createElementVNode("div", vue.mergeProps({
|
|
81
|
+
"class": _ctx.cx('opposite', {
|
|
82
|
+
index: index
|
|
83
|
+
})
|
|
84
|
+
}, $options.getPTOptions('opposite', index)), [vue.renderSlot(_ctx.$slots, "opposite", {
|
|
75
85
|
item: item,
|
|
76
86
|
index: index
|
|
77
87
|
})], 16), vue.createElementVNode("div", vue.mergeProps({
|
|
78
88
|
"class": _ctx.cx('separator')
|
|
79
|
-
},
|
|
89
|
+
}, $options.getPTOptions('separator', index)), [vue.renderSlot(_ctx.$slots, "marker", {
|
|
80
90
|
item: item,
|
|
81
91
|
index: index
|
|
82
92
|
}, function () {
|
|
83
93
|
return [vue.createElementVNode("div", vue.mergeProps({
|
|
84
94
|
"class": _ctx.cx('marker')
|
|
85
|
-
},
|
|
95
|
+
}, $options.getPTOptions('marker', index)), null, 16)];
|
|
86
96
|
}), index !== _ctx.value.length - 1 ? vue.renderSlot(_ctx.$slots, "connector", {
|
|
87
97
|
key: 0,
|
|
88
98
|
item: item,
|
|
@@ -90,10 +100,10 @@ this.primevue.timeline = (function (utils, BaseComponent, usestyle, vue) {
|
|
|
90
100
|
}, function () {
|
|
91
101
|
return [vue.createElementVNode("div", vue.mergeProps({
|
|
92
102
|
"class": _ctx.cx('connector')
|
|
93
|
-
},
|
|
103
|
+
}, $options.getPTOptions('connector', index)), null, 16)];
|
|
94
104
|
}) : vue.createCommentVNode("", true)], 16), vue.createElementVNode("div", vue.mergeProps({
|
|
95
105
|
"class": _ctx.cx('content')
|
|
96
|
-
},
|
|
106
|
+
}, $options.getPTOptions('content', index)), [vue.renderSlot(_ctx.$slots, "content", {
|
|
97
107
|
item: item,
|
|
98
108
|
index: index
|
|
99
109
|
})], 16)], 16);
|
package/timeline/timeline.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.timeline=function(e,n,t,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.timeline=function(e,n,t,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(n),r=t.useStyle("\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n\n.p-timeline-event:last-child {\n min-height: 0;\n}\n\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n\n.p-timeline-horizontal {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n",{name:"timeline",manual:!0}),p={name:"Timeline",extends:{name:"BaseTimeline",extends:o.default,props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},css:{classes:{root:function(e){var n=e.props;return["p-timeline p-component","p-timeline-"+n.align,"p-timeline-"+n.layout]},event:"p-timeline-event",opposite:"p-timeline-event-opposite",separator:"p-timeline-event-separator",marker:"p-timeline-event-marker",connector:"p-timeline-event-connector",content:"p-timeline-event-content"},loadStyle:r.load},provide:function(){return{$parentInstance:this}}},methods:{getKey:function(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t},getPTOptions:function(e,n){return this.ptm(e,{context:{index:n,count:this.value.length}})}}};return p.render=function(e,n,t,l,o,r){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"timeline"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.value,(function(n,t){return i.openBlock(),i.createElementBlock("div",i.mergeProps({key:r.getKey(n,t),class:e.cx("event")},r.getPTOptions("event",t)),[i.createElementVNode("div",i.mergeProps({class:e.cx("opposite",{index:t})},r.getPTOptions("opposite",t)),[i.renderSlot(e.$slots,"opposite",{item:n,index:t})],16),i.createElementVNode("div",i.mergeProps({class:e.cx("separator")},r.getPTOptions("separator",t)),[i.renderSlot(e.$slots,"marker",{item:n,index:t},(function(){return[i.createElementVNode("div",i.mergeProps({class:e.cx("marker")},r.getPTOptions("marker",t)),null,16)]})),t!==e.value.length-1?i.renderSlot(e.$slots,"connector",{key:0,item:n,index:t},(function(){return[i.createElementVNode("div",i.mergeProps({class:e.cx("connector")},r.getPTOptions("connector",t)),null,16)]})):i.createCommentVNode("",!0)],16),i.createElementVNode("div",i.mergeProps({class:e.cx("content")},r.getPTOptions("content",t)),[i.renderSlot(e.$slots,"content",{item:n,index:t})],16)],16)})),128))],16)},p}(primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
package/toast/BaseToast.vue
CHANGED
|
@@ -112,8 +112,8 @@ const classes = {
|
|
|
112
112
|
text: 'p-toast-message-text',
|
|
113
113
|
summary: 'p-toast-summary',
|
|
114
114
|
detail: 'p-toast-detail',
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
closeButton: 'p-toast-icon-close p-link',
|
|
116
|
+
closeIcon: 'p-toast-icon-close-icon'
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
const { load: loadStyle } = useStyle(styles, { name: 'toast', manual: true });
|