primevue 3.32.0 → 3.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/Accordion.d.ts +2 -2
- package/accordiontab/AccordionTab.d.ts +4 -3
- package/autocomplete/AutoComplete.d.ts +17 -7
- package/autocomplete/AutoComplete.vue +2 -2
- package/autocomplete/autocomplete.cjs.js +3 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +3 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +3 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +2 -2
- package/avatargroup/AvatarGroup.d.ts +2 -2
- package/badge/Badge.d.ts +2 -2
- package/badgedirective/BadgeDirective.d.ts +2 -1
- package/basecomponent/BaseComponent.vue +67 -12
- package/basecomponent/basecomponent.cjs.js +76 -22
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +76 -22
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +76 -22
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +47 -7
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +47 -7
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +47 -7
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +44 -32
- package/baseicon/baseicon.cjs.js +19 -30
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +19 -30
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +20 -32
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.d.ts +2 -2
- package/breadcrumb/Breadcrumb.d.ts +2 -2
- package/button/Button.d.ts +2 -2
- package/button/Button.vue +2 -2
- package/button/button.cjs.js +2 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +2 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -2
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +30 -6
- package/calendar/Calendar.vue +9 -8
- package/calendar/calendar.cjs.js +19 -10
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +19 -10
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +19 -10
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +2 -2
- package/carousel/Carousel.d.ts +2 -2
- package/carousel/Carousel.vue +2 -1
- package/carousel/carousel.cjs.js +4 -3
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +4 -3
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +2 -2
- package/chart/Chart.d.ts +2 -2
- package/checkbox/Checkbox.d.ts +2 -2
- package/chip/Chip.d.ts +6 -4
- package/chips/Chips.d.ts +13 -4
- package/chips/Chips.vue +1 -1
- package/chips/chips.cjs.js +1 -0
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -0
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -0
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +2 -2
- package/colorpicker/ColorPicker.vue +1 -40
- package/colorpicker/colorpicker.cjs.js +8 -47
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +8 -47
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +8 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +13 -10
- package/columngroup/ColumnGroup.d.ts +2 -2
- package/config/PrimeVue.d.ts +2 -2
- package/confirmdialog/ConfirmDialog.d.ts +3 -2
- package/confirmpopup/ConfirmPopup.d.ts +3 -2
- package/contextmenu/ContextMenu.d.ts +3 -2
- package/core/core.js +551 -489
- package/core/core.min.js +10 -10
- package/datatable/BodyCell.vue +2 -0
- package/datatable/DataTable.d.ts +4 -2
- package/datatable/DataTable.vue +45 -15
- package/datatable/TableBody.vue +1 -1
- package/datatable/datatable.cjs.js +119 -74
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +119 -74
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +119 -74
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +2 -2
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +4 -3
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +4 -3
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
- package/deferredcontent/DeferredContent.d.ts +2 -2
- package/dialog/Dialog.d.ts +13 -3
- package/dialog/Dialog.vue +10 -7
- package/dialog/dialog.cjs.js +13 -7
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +14 -8
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +13 -7
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +2 -2
- package/dock/Dock.d.ts +2 -2
- package/dropdown/Dropdown.d.ts +21 -10
- package/dropdown/Dropdown.vue +9 -0
- package/dropdown/dropdown.cjs.js +8 -0
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +8 -0
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +8 -0
- package/dropdown/dropdown.min.js +1 -1
- package/editor/BaseEditor.vue +8 -6
- package/editor/Editor.d.ts +2 -2
- package/editor/editor.cjs.js +8 -6
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +8 -6
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +8 -6
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +2 -2
- package/fileupload/FileUpload.d.ts +12 -7
- package/fileupload/FileUpload.vue +4 -0
- package/fileupload/fileupload.cjs.js +4 -0
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -0
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +5 -2
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +2 -1
- package/galleria/Galleria.d.ts +2 -2
- package/galleria/GalleriaItem.vue +2 -2
- package/galleria/GalleriaThumbnails.vue +5 -1
- package/galleria/galleria.cjs.js +16 -7
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +16 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +16 -7
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +6 -4
- package/image/Image.vue +8 -6
- package/image/image.cjs.js +18 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +19 -6
- package/image/image.esm.min.js +1 -1
- package/image/image.js +18 -5
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +2 -2
- package/inplace/Inplace.d.ts +2 -2
- package/inputmask/InputMask.d.ts +2 -2
- package/inputnumber/InputNumber.d.ts +2 -2
- package/inputnumber/InputNumber.vue +1 -0
- package/inputnumber/inputnumber.cjs.js +1 -0
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +1 -0
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +1 -0
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +2 -2
- package/inputtext/InputText.d.ts +2 -2
- package/knob/Knob.d.ts +2 -2
- package/listbox/Listbox.d.ts +11 -5
- package/megamenu/MegaMenu.d.ts +3 -2
- package/menu/Menu.d.ts +2 -2
- package/menubar/Menubar.d.ts +3 -2
- package/message/BaseMessage.vue +5 -0
- package/message/Message.d.ts +4 -2
- package/message/message.cjs.js +1 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +1 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +1 -1
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +16 -6
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +1 -0
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -0
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -0
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +2 -2
- package/organizationchart/OrganizationChart.d.ts +2 -2
- package/overlaypanel/OverlayPanel.d.ts +2 -2
- package/package.json +9 -4
- package/paginator/Paginator.d.ts +2 -2
- package/panel/Panel.d.ts +3 -2
- package/panelmenu/PanelMenu.d.ts +3 -2
- package/passthrough/index.cjs.js +16 -60
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +0 -9
- package/passthrough/index.esm.js +16 -60
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +18 -59
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +365 -359
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.d.ts +1 -2
- package/passthrough/tailwind/index.esm.js +365 -359
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +365 -359
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +6 -4
- package/password/Password.vue +1 -0
- package/password/password.cjs.js +2 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -1
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +2 -2
- package/picklist/PickList.vue +9 -7
- package/picklist/picklist.cjs.js +27 -9
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +27 -9
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +27 -9
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +2 -2
- package/progressspinner/ProgressSpinner.d.ts +2 -2
- package/radiobutton/RadioButton.d.ts +2 -2
- package/rating/Rating.d.ts +3 -2
- package/resources/themes/arya-blue/theme.css +4 -4
- package/resources/themes/arya-green/theme.css +4 -4
- package/resources/themes/arya-orange/theme.css +4 -4
- package/resources/themes/arya-purple/theme.css +4 -4
- package/resources/themes/bootstrap4-dark-blue/theme.css +8 -11
- package/resources/themes/bootstrap4-dark-purple/theme.css +8 -11
- package/resources/themes/bootstrap4-light-blue/theme.css +8 -11
- package/resources/themes/bootstrap4-light-purple/theme.css +8 -11
- package/resources/themes/fluent-light/theme.css +4 -4
- package/resources/themes/lara-dark-blue/theme.css +4 -4
- package/resources/themes/lara-dark-indigo/theme.css +4 -4
- package/resources/themes/lara-dark-purple/theme.css +4 -4
- package/resources/themes/lara-dark-teal/theme.css +4 -4
- package/resources/themes/lara-light-blue/theme.css +4 -4
- package/resources/themes/lara-light-indigo/theme.css +4 -4
- package/resources/themes/lara-light-purple/theme.css +4 -4
- package/resources/themes/lara-light-teal/theme.css +4 -4
- package/resources/themes/luna-amber/theme.css +4 -4
- package/resources/themes/luna-blue/theme.css +4 -4
- package/resources/themes/luna-green/theme.css +4 -4
- package/resources/themes/luna-pink/theme.css +4 -4
- package/resources/themes/md-dark-deeppurple/theme.css +4 -4
- package/resources/themes/md-dark-indigo/theme.css +4 -4
- package/resources/themes/md-light-deeppurple/theme.css +4 -4
- package/resources/themes/md-light-indigo/theme.css +4 -4
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-dark-indigo/theme.css +4 -4
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-light-indigo/theme.css +4 -4
- package/resources/themes/mira/theme.css +4 -4
- package/resources/themes/nano/theme.css +4 -4
- package/resources/themes/nova/theme.css +4 -4
- package/resources/themes/nova-accent/theme.css +4 -4
- package/resources/themes/nova-alt/theme.css +4 -4
- package/resources/themes/nova-vue/theme.css +4 -4
- package/resources/themes/rhea/theme.css +4 -4
- package/resources/themes/saga-blue/theme.css +4 -4
- package/resources/themes/saga-green/theme.css +4 -4
- package/resources/themes/saga-orange/theme.css +4 -4
- package/resources/themes/saga-purple/theme.css +4 -4
- package/resources/themes/soho-dark/theme.css +4 -4
- package/resources/themes/soho-light/theme.css +4 -4
- package/resources/themes/tailwind-light/theme.css +4 -4
- package/resources/themes/vela-blue/theme.css +4 -4
- package/resources/themes/vela-green/theme.css +4 -4
- package/resources/themes/vela-orange/theme.css +4 -4
- package/resources/themes/vela-purple/theme.css +4 -4
- package/resources/themes/viva-dark/theme.css +4 -4
- package/resources/themes/viva-light/theme.css +4 -4
- package/ripple/Ripple.d.ts +2 -1
- package/scrollpanel/ScrollPanel.d.ts +2 -2
- package/scrolltop/ScrollTop.d.ts +2 -2
- package/selectbutton/SelectButton.d.ts +6 -2
- package/selectbutton/SelectButton.vue +2 -1
- package/selectbutton/selectbutton.cjs.js +2 -1
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +2 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -1
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +10 -4
- package/sidebar/Sidebar.vue +2 -2
- package/sidebar/sidebar.cjs.js +4 -2
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +5 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +4 -2
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +2 -2
- package/slider/Slider.d.ts +2 -2
- package/speeddial/SpeedDial.d.ts +9 -7
- package/speeddial/SpeedDial.vue +1 -1
- package/speeddial/speeddial.cjs.js +1 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +4 -2
- package/splitter/Splitter.d.ts +2 -2
- package/splitterpanel/SplitterPanel.d.ts +2 -2
- package/steps/Steps.d.ts +2 -2
- package/styleclass/StyleClass.d.ts +2 -1
- package/tabmenu/TabMenu.d.ts +2 -2
- package/tabpanel/TabPanel.d.ts +2 -2
- package/tabview/TabView.d.ts +2 -2
- package/tag/Tag.d.ts +2 -2
- package/terminal/Terminal.d.ts +2 -2
- package/textarea/Textarea.d.ts +2 -2
- package/tieredmenu/TieredMenu.d.ts +3 -2
- package/timeline/Timeline.d.ts +2 -2
- package/toast/BaseToast.vue +2 -0
- package/toast/Toast.d.ts +16 -4
- package/toast/toast.cjs.js +1 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +1 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +3 -2
- package/toolbar/Toolbar.d.ts +2 -2
- package/tooltip/Tooltip.d.ts +2 -1
- package/tree/Tree.d.ts +6 -2
- package/treeselect/TreeSelect.d.ts +3 -2
- package/treetable/TreeTable.d.ts +3 -2
- package/treetable/TreeTable.vue +4 -2
- package/treetable/treetable.cjs.js +6 -5
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +6 -5
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +6 -5
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +5 -2
- package/ts-helpers.d.ts +2 -0
- package/virtualscroller/VirtualScroller.d.ts +8 -6
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.colorpicker=function(e,t,n,i,o,r){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(e),a=l(t),u=l(i),c=o.useStyle("\n.p-colorpicker-panel .p-colorpicker-color {\n background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%), linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%)\n}\n\n.p-colorpicker-panel .p-colorpicker-hue {\n background: linear-gradient(0deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red)\n}\n",{name:"colorpicker",manual:!0}),d={name:"ColorPicker",extends:{name:"BaseColorPicker",extends:u.default,props:{modelValue:{type:null,default:null},defaultColor:{type:null,default:"ff0000"},inline:{type:Boolean,default:!1},format:{type:String,default:"hex"},disabled:{type:Boolean,default:!1},tabindex:{type:String,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},panelClass:null},css:{classes:{root:function(e){return["p-colorpicker p-component",{"p-colorpicker-overlay":!e.props.inline}]},input:function(e){return["p-colorpicker-preview p-inputtext",{"p-disabled":e.props.disabled}]},panel:function(e){var t=e.instance,n=e.props;return["p-colorpicker-panel",{"p-colorpicker-overlay-panel":!n.inline,"p-disabled":n.disabled,"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},content:"p-colorpicker-content",selector:"p-colorpicker-color-selector",color:"p-colorpicker-color",colorHandle:"p-colorpicker-color-handle",hue:"p-colorpicker-hue",hueHandle:"p-colorpicker-hue-handle"},loadStyle:c.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","show","hide"],props:{modelValue:{type:null,default:null},defaultColor:{type:null,default:"ff0000"},inline:{type:Boolean,default:!1},format:{type:String,default:"hex"},disabled:{type:Boolean,default:!1},tabindex:{type:String,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},panelClass:null},data:function(){return{overlayVisible:!1}},hsbValue:null,outsideClickListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,scrollHandler:null,resizeListener:null,hueDragging:null,colorDragging:null,selfUpdate:null,picker:null,colorSelector:null,colorHandle:null,hueView:null,hueHandle:null,watch:{modelValue:{immediate:!0,handler:function(e){this.hsbValue=this.toHSB(e),this.selfUpdate?this.selfUpdate=!1:this.updateUI()}}},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindDragListeners(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.picker&&this.autoZIndex&&n.ZIndexUtils.clear(this.picker),this.clearRefs()},mounted:function(){this.updateUI()},methods:{pickColor:function(e){var t=this.colorSelector.getBoundingClientRect(),n=t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),i=t.left+document.body.scrollLeft,o=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-i))/150),r=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-n)))/150);this.hsbValue=this.validateHSB({h:this.hsbValue.h,s:o,b:r}),this.selfUpdate=!0,this.updateColorHandle(),this.updateInput(),this.updateModel(),this.$emit("change",{event:e,value:this.modelValue})},pickHue:function(e){var t=this.hueView.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);this.hsbValue=this.validateHSB({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150),s:100,b:100}),this.selfUpdate=!0,this.updateColorSelector(),this.updateHue(),this.updateModel(),this.updateInput(),this.$emit("change",{event:e,value:this.modelValue})},updateModel:function(){switch(this.format){case"hex":this.$emit("update:modelValue",this.HSBtoHEX(this.hsbValue));break;case"rgb":this.$emit("update:modelValue",this.HSBtoRGB(this.hsbValue));break;case"hsb":this.$emit("update:modelValue",this.hsbValue)}},updateColorSelector:function(){if(this.colorSelector){var e=this.validateHSB({h:this.hsbValue.h,s:100,b:100});this.colorSelector.style.backgroundColor="#"+this.HSBtoHEX(e)}},updateColorHandle:function(){this.colorHandle&&(this.colorHandle.style.left=Math.floor(150*this.hsbValue.s/100)+"px",this.colorHandle.style.top=Math.floor(150*(100-this.hsbValue.b)/100)+"px")},updateHue:function(){this.hueHandle&&(this.hueHandle.style.top=Math.floor(150-150*this.hsbValue.h/360)+"px")},updateInput:function(){this.$refs.input&&(this.$refs.input.style.backgroundColor="#"+this.HSBtoHEX(this.hsbValue))},updateUI:function(){this.updateHue(),this.updateColorHandle(),this.updateInput(),this.updateColorSelector()},validateHSB:function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}},validateRGB:function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}},validateHEX:function(e){var t=6-e.length;if(t>0){for(var n=[],i=0;i<t;i++)n.push("0");n.push(e),e=n.join("")}return e},HEXtoRGB:function(e){var t=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:t>>16,g:(65280&t)>>8,b:255&t}},HEXtoHSB:function(e){return this.RGBtoHSB(this.HEXtoRGB(e))},RGBtoHSB:function(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),i=Math.max(e.r,e.g,e.b),o=i-n;return t.b=i,t.s=0!==i?255*o/i:0,t.h=0!==t.s?e.r===i?(e.g-e.b)/o:e.g===i?2+(e.b-e.r)/o:4+(e.r-e.g)/o:-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t},HSBtoRGB:function(e){var t={r:null,g:null,b:null},n=Math.round(e.h),i=Math.round(255*e.s/100),o=Math.round(255*e.b/100);if(0===i)t={r:o,g:o,b:o};else{var r=o,l=(255-i)*o/255,s=n%60*(r-l)/60;360===n&&(n=0),n<60?(t.r=r,t.b=l,t.g=l+s):n<120?(t.g=r,t.b=l,t.r=r-s):n<180?(t.g=r,t.r=l,t.b=l+s):n<240?(t.b=r,t.r=l,t.g=r-s):n<300?(t.b=r,t.g=l,t.r=l+s):n<360?(t.r=r,t.g=l,t.b=r-s):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}},RGBtoHEX:function(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var n in t)1===t[n].length&&(t[n]="0"+t[n]);return t.join("")},HSBtoHEX:function(e){return this.RGBtoHEX(this.HSBtoRGB(e))},toHSB:function(e){var t;if(e)switch(this.format){case"hex":t=this.HEXtoHSB(e);break;case"rgb":t=this.RGBtoHSB(e);break;case"hsb":t=e}else t=this.HEXtoHSB(this.defaultColor);return t},onOverlayEnter:function(e){this.updateUI(),this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.autoZIndex&&n.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.clearRefs(),this.$emit("hide")},onOverlayAfterLeave:function(e){this.autoZIndex&&n.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?n.DomHandler.relativePosition(this.picker,this.$refs.input):n.DomHandler.absolutePosition(this.picker,this.$refs.input)},onInputClick:function(){this.disabled||(this.overlayVisible=!this.overlayVisible)},onInputKeydown:function(e){switch(e.code){case"Space":this.overlayVisible=!this.overlayVisible,e.preventDefault();break;case"Escape":case"Tab":this.overlayVisible=!1}},onColorMousedown:function(e){this.disabled||(this.bindDragListeners(),this.onColorDragStart(e))},onColorDragStart:function(e){this.disabled||(this.colorDragging=!0,this.pickColor(e),this.$el.setAttribute("p-colorpicker-dragging","true"),!this.isUnstyled&&n.DomHandler.addClass(this.$el,"p-colorpicker-dragging"),e.preventDefault())},onDrag:function(e){this.colorDragging&&(this.pickColor(e),e.preventDefault()),this.hueDragging&&(this.pickHue(e),e.preventDefault())},onDragEnd:function(){this.colorDragging=!1,this.hueDragging=!1,this.$el.setAttribute("p-colorpicker-dragging","false"),!this.isUnstyled&&n.DomHandler.removeClass(this.$el,"p-colorpicker-dragging"),this.unbindDragListeners()},onHueMousedown:function(e){this.disabled||(this.bindDragListeners(),this.onHueDragStart(e))},onHueDragStart:function(e){this.disabled||(this.hueDragging=!0,this.pickHue(e),!this.isUnstyled&&n.DomHandler.addClass(this.$el,"p-colorpicker-dragging"))},isInputClicked:function(e){return this.$refs.input&&this.$refs.input.isSameNode(e.target)},bindDragListeners:function(){this.bindDocumentMouseMoveListener(),this.bindDocumentMouseUpListener()},unbindDragListeners:function(){this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.picker&&!e.picker.contains(t.target)&&!e.isInputClicked(t)&&(e.overlayVisible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new n.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!n.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentMouseMoveListener:function(){this.documentMouseMoveListener||(this.documentMouseMoveListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.documentMouseMoveListener))},unbindDocumentMouseMoveListener:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null)},bindDocumentMouseUpListener:function(){this.documentMouseUpListener||(this.documentMouseUpListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.documentMouseUpListener))},unbindDocumentMouseUpListener:function(){this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},pickerRef:function(e){this.picker=e},colorSelectorRef:function(e){this.colorSelector=e},colorHandleRef:function(e){this.colorHandle=e},hueViewRef:function(e){this.hueView=e},hueHandleRef:function(e){this.hueHandle=e},clearRefs:function(){this.picker=null,this.colorSelector=null,this.colorHandle=null,this.hueView=null,this.hueHandle=null},onOverlayClick:function(e){s.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},components:{Portal:a.default}},p=["tabindex","disabled"];return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-colorpicker {\n display: inline-block;\n}\n.p-colorpicker-dragging {\n cursor: pointer;\n}\n.p-colorpicker-overlay {\n position: relative;\n}\n.p-colorpicker-panel {\n position: relative;\n width: 193px;\n height: 166px;\n}\n.p-colorpicker-overlay-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-colorpicker-preview {\n cursor: pointer;\n}\n.p-colorpicker-panel .p-colorpicker-content {\n position: relative;\n}\n.p-colorpicker-panel .p-colorpicker-color-selector {\n width: 150px;\n height: 150px;\n top: 8px;\n left: 8px;\n position: absolute;\n}\n.p-colorpicker-panel .p-colorpicker-color {\n width: 150px;\n height: 150px;\n}\n.p-colorpicker-panel .p-colorpicker-color-handle {\n position: absolute;\n top: 0px;\n left: 150px;\n border-radius: 100%;\n width: 10px;\n height: 10px;\n border-width: 1px;\n border-style: solid;\n margin: -5px 0 0 -5px;\n cursor: pointer;\n opacity: 0.85;\n}\n.p-colorpicker-panel .p-colorpicker-hue {\n width: 17px;\n height: 150px;\n top: 8px;\n left: 167px;\n position: absolute;\n opacity: 0.85;\n}\n.p-colorpicker-panel .p-colorpicker-hue-handle {\n position: absolute;\n top: 150px;\n left: 0px;\n width: 21px;\n margin-left: -2px;\n margin-top: -5px;\n height: 10px;\n border-width: 2px;\n border-style: solid;\n opacity: 0.85;\n cursor: pointer;\n}\n"),d.render=function(e,t,n,i,o,l){var s=r.resolveComponent("Portal");return r.openBlock(),r.createElementBlock("div",r.mergeProps({ref:"container",class:e.cx("root")},e.ptm("root")),[n.inline?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("input",r.mergeProps({key:0,ref:"input",type:"text",class:e.cx("input"),readonly:"readonly",tabindex:n.tabindex,disabled:n.disabled,onClick:t[0]||(t[0]=function(){return l.onInputClick&&l.onInputClick.apply(l,arguments)}),onKeydown:t[1]||(t[1]=function(){return l.onInputKeydown&&l.onInputKeydown.apply(l,arguments)})},e.ptm("input")),null,16,p)),r.createVNode(s,{appendTo:n.appendTo,disabled:n.inline},{default:r.withCtx((function(){return[r.createVNode(r.Transition,r.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:r.withCtx((function(){return[n.inline||o.overlayVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:l.pickerRef,class:[e.cx("panel"),n.panelClass],onClick:t[10]||(t[10]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)})},e.ptm("panel")),[r.createElementVNode("div",r.mergeProps({class:e.cx("panel")},e.ptm("content")),[r.createElementVNode("div",r.mergeProps({ref:l.colorSelectorRef,class:e.cx("selector"),onMousedown:t[2]||(t[2]=function(e){return l.onColorMousedown(e)}),onTouchstart:t[3]||(t[3]=function(e){return l.onColorDragStart(e)}),onTouchmove:t[4]||(t[4]=function(e){return l.onDrag(e)}),onTouchend:t[5]||(t[5]=function(e){return l.onDragEnd()})},e.ptm("selector")),[r.createElementVNode("div",r.mergeProps({class:e.cx("color")},e.ptm("color")),[r.createElementVNode("div",r.mergeProps({ref:l.colorHandleRef,class:e.cx("colorHandle")},e.ptm("colorHandle")),null,16)],16)],16),r.createElementVNode("div",r.mergeProps({ref:l.hueViewRef,class:e.cx("hue"),onMousedown:t[6]||(t[6]=function(e){return l.onHueMousedown(e)}),onTouchstart:t[7]||(t[7]=function(e){return l.onHueDragStart(e)}),onTouchmove:t[8]||(t[8]=function(e){return l.onDrag(e)}),onTouchend:t[9]||(t[9]=function(e){return l.onDragEnd()})},e.ptm("hue")),[r.createElementVNode("div",r.mergeProps({ref:l.hueHandleRef,class:e.cx("hueHandle")},e.ptm("hueHandle")),null,16)],16)],16)],16)):r.createCommentVNode("",!0)]})),_:1},16,["onEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo","disabled"])],16)},d}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.colorpicker=function(e,t,n,i,o,r){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(e),a=l(t),u=l(i),c=o.useStyle("\n.p-colorpicker-panel .p-colorpicker-color {\n background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%), linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%)\n}\n\n.p-colorpicker-panel .p-colorpicker-hue {\n background: linear-gradient(0deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red)\n}\n",{name:"colorpicker",manual:!0}),d={name:"ColorPicker",extends:{name:"BaseColorPicker",extends:u.default,props:{modelValue:{type:null,default:null},defaultColor:{type:null,default:"ff0000"},inline:{type:Boolean,default:!1},format:{type:String,default:"hex"},disabled:{type:Boolean,default:!1},tabindex:{type:String,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},panelClass:null},css:{classes:{root:function(e){return["p-colorpicker p-component",{"p-colorpicker-overlay":!e.props.inline}]},input:function(e){return["p-colorpicker-preview p-inputtext",{"p-disabled":e.props.disabled}]},panel:function(e){var t=e.instance,n=e.props;return["p-colorpicker-panel",{"p-colorpicker-overlay-panel":!n.inline,"p-disabled":n.disabled,"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},content:"p-colorpicker-content",selector:"p-colorpicker-color-selector",color:"p-colorpicker-color",colorHandle:"p-colorpicker-color-handle",hue:"p-colorpicker-hue",hueHandle:"p-colorpicker-hue-handle"},loadStyle:c.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","show","hide"],data:function(){return{overlayVisible:!1}},hsbValue:null,outsideClickListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,scrollHandler:null,resizeListener:null,hueDragging:null,colorDragging:null,selfUpdate:null,picker:null,colorSelector:null,colorHandle:null,hueView:null,hueHandle:null,watch:{modelValue:{immediate:!0,handler:function(e){this.hsbValue=this.toHSB(e),this.selfUpdate?this.selfUpdate=!1:this.updateUI()}}},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindDragListeners(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.picker&&this.autoZIndex&&n.ZIndexUtils.clear(this.picker),this.clearRefs()},mounted:function(){this.updateUI()},methods:{pickColor:function(e){var t=this.colorSelector.getBoundingClientRect(),n=t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),i=t.left+document.body.scrollLeft,o=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-i))/150),r=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-n)))/150);this.hsbValue=this.validateHSB({h:this.hsbValue.h,s:o,b:r}),this.selfUpdate=!0,this.updateColorHandle(),this.updateInput(),this.updateModel(),this.$emit("change",{event:e,value:this.modelValue})},pickHue:function(e){var t=this.hueView.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);this.hsbValue=this.validateHSB({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150),s:100,b:100}),this.selfUpdate=!0,this.updateColorSelector(),this.updateHue(),this.updateModel(),this.updateInput(),this.$emit("change",{event:e,value:this.modelValue})},updateModel:function(){switch(this.format){case"hex":this.$emit("update:modelValue",this.HSBtoHEX(this.hsbValue));break;case"rgb":this.$emit("update:modelValue",this.HSBtoRGB(this.hsbValue));break;case"hsb":this.$emit("update:modelValue",this.hsbValue)}},updateColorSelector:function(){if(this.colorSelector){var e=this.validateHSB({h:this.hsbValue.h,s:100,b:100});this.colorSelector.style.backgroundColor="#"+this.HSBtoHEX(e)}},updateColorHandle:function(){this.colorHandle&&(this.colorHandle.style.left=Math.floor(150*this.hsbValue.s/100)+"px",this.colorHandle.style.top=Math.floor(150*(100-this.hsbValue.b)/100)+"px")},updateHue:function(){this.hueHandle&&(this.hueHandle.style.top=Math.floor(150-150*this.hsbValue.h/360)+"px")},updateInput:function(){this.$refs.input&&(this.$refs.input.style.backgroundColor="#"+this.HSBtoHEX(this.hsbValue))},updateUI:function(){this.updateHue(),this.updateColorHandle(),this.updateInput(),this.updateColorSelector()},validateHSB:function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}},validateRGB:function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}},validateHEX:function(e){var t=6-e.length;if(t>0){for(var n=[],i=0;i<t;i++)n.push("0");n.push(e),e=n.join("")}return e},HEXtoRGB:function(e){var t=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:t>>16,g:(65280&t)>>8,b:255&t}},HEXtoHSB:function(e){return this.RGBtoHSB(this.HEXtoRGB(e))},RGBtoHSB:function(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),i=Math.max(e.r,e.g,e.b),o=i-n;return t.b=i,t.s=0!==i?255*o/i:0,t.h=0!==t.s?e.r===i?(e.g-e.b)/o:e.g===i?2+(e.b-e.r)/o:4+(e.r-e.g)/o:-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t},HSBtoRGB:function(e){var t={r:null,g:null,b:null},n=Math.round(e.h),i=Math.round(255*e.s/100),o=Math.round(255*e.b/100);if(0===i)t={r:o,g:o,b:o};else{var r=o,l=(255-i)*o/255,s=n%60*(r-l)/60;360===n&&(n=0),n<60?(t.r=r,t.b=l,t.g=l+s):n<120?(t.g=r,t.b=l,t.r=r-s):n<180?(t.g=r,t.r=l,t.b=l+s):n<240?(t.b=r,t.r=l,t.g=r-s):n<300?(t.b=r,t.g=l,t.r=l+s):n<360?(t.r=r,t.g=l,t.b=r-s):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}},RGBtoHEX:function(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var n in t)1===t[n].length&&(t[n]="0"+t[n]);return t.join("")},HSBtoHEX:function(e){return this.RGBtoHEX(this.HSBtoRGB(e))},toHSB:function(e){var t;if(e)switch(this.format){case"hex":t=this.HEXtoHSB(e);break;case"rgb":t=this.RGBtoHSB(e);break;case"hsb":t=e}else t=this.HEXtoHSB(this.defaultColor);return t},onOverlayEnter:function(e){this.updateUI(),this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.autoZIndex&&n.ZIndexUtils.set("overlay",e,this.baseZIndex,this.$primevue.config.zIndex.overlay),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.clearRefs(),this.$emit("hide")},onOverlayAfterLeave:function(e){this.autoZIndex&&n.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?n.DomHandler.relativePosition(this.picker,this.$refs.input):n.DomHandler.absolutePosition(this.picker,this.$refs.input)},onInputClick:function(){this.disabled||(this.overlayVisible=!this.overlayVisible)},onInputKeydown:function(e){switch(e.code){case"Space":this.overlayVisible=!this.overlayVisible,e.preventDefault();break;case"Escape":case"Tab":this.overlayVisible=!1}},onColorMousedown:function(e){this.disabled||(this.bindDragListeners(),this.onColorDragStart(e))},onColorDragStart:function(e){this.disabled||(this.colorDragging=!0,this.pickColor(e),this.$el.setAttribute("p-colorpicker-dragging","true"),!this.isUnstyled&&n.DomHandler.addClass(this.$el,"p-colorpicker-dragging"),e.preventDefault())},onDrag:function(e){this.colorDragging&&(this.pickColor(e),e.preventDefault()),this.hueDragging&&(this.pickHue(e),e.preventDefault())},onDragEnd:function(){this.colorDragging=!1,this.hueDragging=!1,this.$el.setAttribute("p-colorpicker-dragging","false"),!this.isUnstyled&&n.DomHandler.removeClass(this.$el,"p-colorpicker-dragging"),this.unbindDragListeners()},onHueMousedown:function(e){this.disabled||(this.bindDragListeners(),this.onHueDragStart(e))},onHueDragStart:function(e){this.disabled||(this.hueDragging=!0,this.pickHue(e),!this.isUnstyled&&n.DomHandler.addClass(this.$el,"p-colorpicker-dragging"))},isInputClicked:function(e){return this.$refs.input&&this.$refs.input.isSameNode(e.target)},bindDragListeners:function(){this.bindDocumentMouseMoveListener(),this.bindDocumentMouseUpListener()},unbindDragListeners:function(){this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.picker&&!e.picker.contains(t.target)&&!e.isInputClicked(t)&&(e.overlayVisible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new n.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!n.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentMouseMoveListener:function(){this.documentMouseMoveListener||(this.documentMouseMoveListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.documentMouseMoveListener))},unbindDocumentMouseMoveListener:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null)},bindDocumentMouseUpListener:function(){this.documentMouseUpListener||(this.documentMouseUpListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.documentMouseUpListener))},unbindDocumentMouseUpListener:function(){this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},pickerRef:function(e){this.picker=e},colorSelectorRef:function(e){this.colorSelector=e},colorHandleRef:function(e){this.colorHandle=e},hueViewRef:function(e){this.hueView=e},hueHandleRef:function(e){this.hueHandle=e},clearRefs:function(){this.picker=null,this.colorSelector=null,this.colorHandle=null,this.hueView=null,this.hueHandle=null},onOverlayClick:function(e){s.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},components:{Portal:a.default}},p=["tabindex","disabled"];return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-colorpicker {\n display: inline-block;\n}\n.p-colorpicker-dragging {\n cursor: pointer;\n}\n.p-colorpicker-overlay {\n position: relative;\n}\n.p-colorpicker-panel {\n position: relative;\n width: 193px;\n height: 166px;\n}\n.p-colorpicker-overlay-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-colorpicker-preview {\n cursor: pointer;\n}\n.p-colorpicker-panel .p-colorpicker-content {\n position: relative;\n}\n.p-colorpicker-panel .p-colorpicker-color-selector {\n width: 150px;\n height: 150px;\n top: 8px;\n left: 8px;\n position: absolute;\n}\n.p-colorpicker-panel .p-colorpicker-color {\n width: 150px;\n height: 150px;\n}\n.p-colorpicker-panel .p-colorpicker-color-handle {\n position: absolute;\n top: 0px;\n left: 150px;\n border-radius: 100%;\n width: 10px;\n height: 10px;\n border-width: 1px;\n border-style: solid;\n margin: -5px 0 0 -5px;\n cursor: pointer;\n opacity: 0.85;\n}\n.p-colorpicker-panel .p-colorpicker-hue {\n width: 17px;\n height: 150px;\n top: 8px;\n left: 167px;\n position: absolute;\n opacity: 0.85;\n}\n.p-colorpicker-panel .p-colorpicker-hue-handle {\n position: absolute;\n top: 150px;\n left: 0px;\n width: 21px;\n margin-left: -2px;\n margin-top: -5px;\n height: 10px;\n border-width: 2px;\n border-style: solid;\n opacity: 0.85;\n cursor: pointer;\n}\n"),d.render=function(e,t,n,i,o,l){var s=r.resolveComponent("Portal");return r.openBlock(),r.createElementBlock("div",r.mergeProps({ref:"container",class:e.cx("root")},e.ptm("root")),[e.inline?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("input",r.mergeProps({key:0,ref:"input",type:"text",class:e.cx("input"),readonly:"readonly",tabindex:e.tabindex,disabled:e.disabled,onClick:t[0]||(t[0]=function(){return l.onInputClick&&l.onInputClick.apply(l,arguments)}),onKeydown:t[1]||(t[1]=function(){return l.onInputKeydown&&l.onInputKeydown.apply(l,arguments)})},e.ptm("input")),null,16,p)),r.createVNode(s,{appendTo:e.appendTo,disabled:e.inline},{default:r.withCtx((function(){return[r.createVNode(r.Transition,r.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:r.withCtx((function(){return[e.inline||o.overlayVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:l.pickerRef,class:[e.cx("panel"),e.panelClass],onClick:t[10]||(t[10]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)})},e.ptm("panel")),[r.createElementVNode("div",r.mergeProps({class:e.cx("panel")},e.ptm("content")),[r.createElementVNode("div",r.mergeProps({ref:l.colorSelectorRef,class:e.cx("selector"),onMousedown:t[2]||(t[2]=function(e){return l.onColorMousedown(e)}),onTouchstart:t[3]||(t[3]=function(e){return l.onColorDragStart(e)}),onTouchmove:t[4]||(t[4]=function(e){return l.onDrag(e)}),onTouchend:t[5]||(t[5]=function(e){return l.onDragEnd()})},e.ptm("selector")),[r.createElementVNode("div",r.mergeProps({class:e.cx("color")},e.ptm("color")),[r.createElementVNode("div",r.mergeProps({ref:l.colorHandleRef,class:e.cx("colorHandle")},e.ptm("colorHandle")),null,16)],16)],16),r.createElementVNode("div",r.mergeProps({ref:l.hueViewRef,class:e.cx("hue"),onMousedown:t[6]||(t[6]=function(e){return l.onHueMousedown(e)}),onTouchstart:t[7]||(t[7]=function(e){return l.onHueDragStart(e)}),onTouchmove:t[8]||(t[8]=function(e){return l.onDrag(e)}),onTouchend:t[9]||(t[9]=function(e){return l.onDragEnd()})},e.ptm("hue")),[r.createElementVNode("div",r.mergeProps({ref:l.hueHandleRef,class:e.cx("hueHandle")},e.ptm("hueHandle")),null,16)],16)],16)],16)):r.createCommentVNode("",!0)]})),_:1},16,["onEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo","disabled"])],16)},d}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
package/column/Column.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { ComponentHooks } from '../basecomponent';
|
|
|
14
14
|
import { ButtonPassThroughOptionType } from '../button';
|
|
15
15
|
import { DataTablePassThroughOptions } from '../datatable';
|
|
16
16
|
import { DropdownPassThroughOptionType } from '../dropdown';
|
|
17
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
17
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
18
18
|
import { VirtualScrollerLoaderOptions } from '../virtualscroller';
|
|
19
19
|
|
|
20
20
|
export declare type ColumnPassThroughOptionType = ColumnPassThroughAttributes | ((options: ColumnPassThroughMethodOptions) => ColumnPassThroughAttributes | string) | string | null | undefined;
|
|
@@ -567,7 +567,7 @@ export interface ColumnProps {
|
|
|
567
567
|
* Used to pass attributes to DOM elements inside the component.
|
|
568
568
|
* @type {ColumnPassThroughOptions}
|
|
569
569
|
*/
|
|
570
|
-
pt?: ColumnPassThroughOptions
|
|
570
|
+
pt?: PTOptions<ColumnPassThroughOptions>;
|
|
571
571
|
/**
|
|
572
572
|
* When enabled, it removes component related styles in the core.
|
|
573
573
|
* @defaultValue false
|
|
@@ -679,8 +679,9 @@ export interface ColumnSlots {
|
|
|
679
679
|
frozenRow: boolean;
|
|
680
680
|
/**
|
|
681
681
|
* Callback function
|
|
682
|
+
* @param {Event} event - Browser event
|
|
682
683
|
*/
|
|
683
|
-
editorInitCallback(
|
|
684
|
+
editorInitCallback: (event: Event) => void;
|
|
684
685
|
}): VNode[];
|
|
685
686
|
/**
|
|
686
687
|
* Custom header template.
|
|
@@ -729,12 +730,14 @@ export interface ColumnSlots {
|
|
|
729
730
|
frozenRow: boolean;
|
|
730
731
|
/**
|
|
731
732
|
* Callback function
|
|
733
|
+
* @param {Event} event - Browser event
|
|
732
734
|
*/
|
|
733
|
-
editorSaveCallback(
|
|
735
|
+
editorSaveCallback: (event: Event) => void;
|
|
734
736
|
/**
|
|
735
737
|
* Callback function
|
|
738
|
+
* @param {Event} event - Browser event
|
|
736
739
|
*/
|
|
737
|
-
editorCancelCallback(
|
|
740
|
+
editorCancelCallback: (event: Event) => void;
|
|
738
741
|
}): VNode[];
|
|
739
742
|
/**
|
|
740
743
|
* Custom filter template.
|
|
@@ -753,7 +756,7 @@ export interface ColumnSlots {
|
|
|
753
756
|
/**
|
|
754
757
|
* Callback function
|
|
755
758
|
*/
|
|
756
|
-
filterCallback()
|
|
759
|
+
filterCallback: () => void;
|
|
757
760
|
}): VNode[];
|
|
758
761
|
/**
|
|
759
762
|
* Custom filter header template.
|
|
@@ -772,7 +775,7 @@ export interface ColumnSlots {
|
|
|
772
775
|
/**
|
|
773
776
|
* Callback function
|
|
774
777
|
*/
|
|
775
|
-
filterCallback()
|
|
778
|
+
filterCallback: () => void;
|
|
776
779
|
}): VNode[];
|
|
777
780
|
/**
|
|
778
781
|
* Custom filter footer template.
|
|
@@ -791,7 +794,7 @@ export interface ColumnSlots {
|
|
|
791
794
|
/**
|
|
792
795
|
* Callback function
|
|
793
796
|
*/
|
|
794
|
-
filterCallback()
|
|
797
|
+
filterCallback: () => void;
|
|
795
798
|
}): VNode[];
|
|
796
799
|
/**
|
|
797
800
|
* Custom filter clear template.
|
|
@@ -810,7 +813,7 @@ export interface ColumnSlots {
|
|
|
810
813
|
/**
|
|
811
814
|
* Callback function
|
|
812
815
|
*/
|
|
813
|
-
filterCallback()
|
|
816
|
+
filterCallback: () => void;
|
|
814
817
|
}): VNode[];
|
|
815
818
|
/**
|
|
816
819
|
* Custom filter apply template.
|
|
@@ -829,7 +832,7 @@ export interface ColumnSlots {
|
|
|
829
832
|
/**
|
|
830
833
|
* Callback function
|
|
831
834
|
*/
|
|
832
|
-
filterCallback()
|
|
835
|
+
filterCallback: () => void;
|
|
833
836
|
}): VNode[];
|
|
834
837
|
/**
|
|
835
838
|
* Custom loading template.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { ComponentHooks } from '../basecomponent';
|
|
9
9
|
import { DataTablePassThroughOptions } from '../datatable';
|
|
10
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
10
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
11
11
|
|
|
12
12
|
export declare type ColumnGroupPassThroughOptionType = ColumnGroupPassThroughAttributes | ((options: ColumnGroupPassThroughMethodOptions) => ColumnGroupPassThroughAttributes | string) | string | null | undefined;
|
|
13
13
|
|
|
@@ -56,7 +56,7 @@ export interface ColumnGroupProps {
|
|
|
56
56
|
* Used to pass attributes to DOM elements inside the component.
|
|
57
57
|
* @type {ColumnGroupPassThroughOptions}
|
|
58
58
|
*/
|
|
59
|
-
pt?: ColumnGroupPassThroughOptions
|
|
59
|
+
pt?: PTOptions<ColumnGroupPassThroughOptions>;
|
|
60
60
|
/**
|
|
61
61
|
* When enabled, it removes component related styles in the core.
|
|
62
62
|
* @defaultValue false
|
package/config/PrimeVue.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ import { TreePassThroughOptions } from '../tree';
|
|
|
92
92
|
import { TreeSelectPassThroughOptions } from '../treeselect';
|
|
93
93
|
import { TreeTablePassThroughOptions } from '../treetable';
|
|
94
94
|
import { TriStateCheckboxPassThroughOptions } from '../tristatecheckbox';
|
|
95
|
-
import { DefaultPTOptions } from '../ts-helpers';
|
|
95
|
+
import { DefaultPTOptions, PTOptions } from '../ts-helpers';
|
|
96
96
|
import { VirtualScrollerPassThroughOptions } from '../virtualscroller';
|
|
97
97
|
|
|
98
98
|
export interface PrimeVueConfiguration {
|
|
@@ -101,7 +101,7 @@ export interface PrimeVueConfiguration {
|
|
|
101
101
|
locale?: PrimeVueLocaleOptions;
|
|
102
102
|
filterMatchModeOptions?: any;
|
|
103
103
|
zIndex?: PrimeVueZIndexOptions;
|
|
104
|
-
pt?: PrimeVuePTOptions
|
|
104
|
+
pt?: PTOptions<PrimeVuePTOptions>;
|
|
105
105
|
unstyled?: boolean;
|
|
106
106
|
csp?: PrimeVueCSPOptions;
|
|
107
107
|
}
|
|
@@ -11,7 +11,7 @@ import { VNode } from 'vue';
|
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ButtonPassThroughOptions } from '../button';
|
|
13
13
|
import { ConfirmationOptions } from '../confirmationoptions';
|
|
14
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
14
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
15
15
|
|
|
16
16
|
export declare type ConfirmDialogPassThroughOptionType = ConfirmDialogPassThroughAttributes | ((options: ConfirmDialogPassThroughMethodOptions) => ConfirmDialogPassThroughAttributes | string) | string | null | undefined;
|
|
17
17
|
|
|
@@ -152,7 +152,7 @@ export interface ConfirmDialogProps {
|
|
|
152
152
|
* Used to pass attributes to DOM elements inside the component.
|
|
153
153
|
* @type {ConfirmDialogPassThroughOptions}
|
|
154
154
|
*/
|
|
155
|
-
pt?: ConfirmDialogPassThroughOptions
|
|
155
|
+
pt?: PTOptions<ConfirmDialogPassThroughOptions>;
|
|
156
156
|
/**
|
|
157
157
|
* When enabled, it removes component related styles in the core.
|
|
158
158
|
* @defaultValue false
|
|
@@ -176,6 +176,7 @@ export interface ConfirmDialogSlots {
|
|
|
176
176
|
}): VNode[];
|
|
177
177
|
/**
|
|
178
178
|
* Custom icon template.
|
|
179
|
+
* @param {Object} scope - icon slot's params.
|
|
179
180
|
*/
|
|
180
181
|
icon(scope: {
|
|
181
182
|
/**
|
|
@@ -11,7 +11,7 @@ import { TransitionProps, VNode } from 'vue';
|
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ButtonPassThroughOptions } from '../button';
|
|
13
13
|
import { ConfirmationOptions } from '../confirmationoptions';
|
|
14
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
14
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
15
15
|
|
|
16
16
|
export declare type ConfirmPopupPassThroughOptionType = ConfirmPopupPassThroughAttributes | ((options: ConfirmPopupPassThroughMethodOptions) => ConfirmPopupPassThroughAttributes | string) | string | null | undefined;
|
|
17
17
|
|
|
@@ -106,7 +106,7 @@ export interface ConfirmPopupProps {
|
|
|
106
106
|
* Used to pass attributes to DOM elements inside the component.
|
|
107
107
|
* @type {ConfirmPopupPassThroughOptions}
|
|
108
108
|
*/
|
|
109
|
-
pt?: ConfirmPopupPassThroughOptions
|
|
109
|
+
pt?: PTOptions<ConfirmPopupPassThroughOptions>;
|
|
110
110
|
/**
|
|
111
111
|
* When enabled, it removes component related styles in the core.
|
|
112
112
|
* @defaultValue false
|
|
@@ -130,6 +130,7 @@ export interface ConfirmPopupSlots {
|
|
|
130
130
|
}): VNode[];
|
|
131
131
|
/**
|
|
132
132
|
* Custom icon template.
|
|
133
|
+
* @param {Object} scope - icon slot's params.
|
|
133
134
|
*/
|
|
134
135
|
icon(scope: {
|
|
135
136
|
/**
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { TransitionProps, VNode } from 'vue';
|
|
12
12
|
import { ComponentHooks } from '../basecomponent';
|
|
13
13
|
import { MenuItem } from '../menuitem';
|
|
14
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
14
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
15
15
|
|
|
16
16
|
export declare type ContextMenuPassThroughOptionType = ContextMenuPassThroughAttributes | ((options: ContextMenuPassThroughMethodOptions) => ContextMenuPassThroughAttributes | string) | string | null | undefined;
|
|
17
17
|
|
|
@@ -216,7 +216,7 @@ export interface ContextMenuProps {
|
|
|
216
216
|
* Used to pass attributes to DOM elements inside the component.
|
|
217
217
|
* @type {ContextMenuPassThroughOptions}
|
|
218
218
|
*/
|
|
219
|
-
pt?: ContextMenuPassThroughOptions
|
|
219
|
+
pt?: PTOptions<ContextMenuPassThroughOptions>;
|
|
220
220
|
/**
|
|
221
221
|
* When enabled, it removes component related styles in the core.
|
|
222
222
|
* @defaultValue false
|
|
@@ -254,6 +254,7 @@ export interface ContextMenuSlots {
|
|
|
254
254
|
}): VNode[];
|
|
255
255
|
/**
|
|
256
256
|
* Custom submenu icon template.
|
|
257
|
+
* @param {Object} scope - submenuicon slot's params.
|
|
257
258
|
*/
|
|
258
259
|
submenuicon(scope: {
|
|
259
260
|
/**
|