primevue 3.41.0 → 3.41.1
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/button/BaseButton.vue +4 -0
- package/button/Button.d.ts +4 -0
- package/button/Button.vue +1 -1
- package/button/button.cjs.js +6 -1
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +6 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +6 -1
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +18 -0
- package/calendar/Calendar.vue +34 -10
- package/calendar/calendar.cjs.js +53 -26
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +53 -26
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +53 -26
- package/calendar/calendar.min.js +1 -1
- package/column/Column.d.ts +4 -0
- package/core/core.js +7 -2
- package/core/core.min.js +2 -2
- package/datatable/DataTable.vue +4 -7
- package/datatable/HeaderCell.vue +1 -1
- package/datatable/datatable.cjs.js +6 -9
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +6 -9
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +6 -9
- package/datatable/datatable.min.js +1 -1
- package/dock/Dock.vue +27 -5
- package/dock/dock.cjs.js +27 -6
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +27 -6
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +27 -6
- package/dock/dock.min.js +1 -1
- package/listbox/BaseListbox.vue +12 -3
- package/listbox/Listbox.d.ts +1 -1
- package/listbox/listbox.cjs.js +12 -3
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +12 -3
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +12 -3
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +23 -0
- package/megamenu/MegaMenu.vue +45 -26
- package/megamenu/megamenu.cjs.js +63 -39
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +63 -39
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +63 -39
- package/megamenu/megamenu.min.js +1 -1
- package/menubar/Menubar.d.ts +27 -3
- package/menubar/Menubar.vue +48 -29
- package/menubar/menubar.cjs.js +68 -44
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +68 -44
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +68 -44
- package/menubar/menubar.min.js +1 -1
- package/package.json +1 -1
- package/panelmenu/style/panelmenustyle.cjs.js +1 -1
- package/panelmenu/style/panelmenustyle.cjs.min.js +1 -1
- package/panelmenu/style/panelmenustyle.esm.js +1 -1
- package/panelmenu/style/panelmenustyle.esm.min.js +1 -1
- package/panelmenu/style/panelmenustyle.js +1 -1
- package/panelmenu/style/panelmenustyle.min.js +1 -1
- package/styleclass/StyleClass.d.ts +10 -0
- package/styleclass/styleclass.cjs.js +18 -0
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +18 -0
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +18 -0
- package/styleclass/styleclass.min.js +1 -1
- package/web-types.json +1 -1
package/button/BaseButton.vue
CHANGED
package/button/Button.d.ts
CHANGED
|
@@ -116,6 +116,10 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
|
|
116
116
|
* Style class of the badge.
|
|
117
117
|
*/
|
|
118
118
|
badgeClass?: string | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Severity type of the badge.
|
|
121
|
+
*/
|
|
122
|
+
badgeSeverity?: 'info' | 'success' | 'warning' | 'danger' | string | null | undefined;
|
|
119
123
|
/**
|
|
120
124
|
* Whether the button is in loading state.
|
|
121
125
|
* @defaultValue false
|
package/button/Button.vue
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<span v-if="icon" :class="[cx('icon'), icon, iconClass]" v-bind="ptm('icon')"></span>
|
|
10
10
|
</slot>
|
|
11
11
|
<span :class="cx('label')" v-bind="ptm('label')">{{ label || ' ' }}</span>
|
|
12
|
-
<Badge v-if="badge" :value="badge" :class="badgeClass" :unstyled="unstyled" v-bind="ptm('badge')"></Badge>
|
|
12
|
+
<Badge v-if="badge" :value="badge" :class="badgeClass" :severity="badgeSeverity" :unstyled="unstyled" v-bind="ptm('badge')"></Badge>
|
|
13
13
|
</slot>
|
|
14
14
|
</button>
|
|
15
15
|
</template>
|
package/button/button.cjs.js
CHANGED
|
@@ -43,6 +43,10 @@ var script$1 = {
|
|
|
43
43
|
type: String,
|
|
44
44
|
"default": null
|
|
45
45
|
},
|
|
46
|
+
badgeSeverity: {
|
|
47
|
+
type: String,
|
|
48
|
+
"default": null
|
|
49
|
+
},
|
|
46
50
|
loading: {
|
|
47
51
|
type: Boolean,
|
|
48
52
|
"default": false
|
|
@@ -169,8 +173,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
169
173
|
key: 2,
|
|
170
174
|
value: _ctx.badge,
|
|
171
175
|
"class": _ctx.badgeClass,
|
|
176
|
+
severity: _ctx.badgeSeverity,
|
|
172
177
|
unstyled: _ctx.unstyled
|
|
173
|
-
}, _ctx.ptm('badge')), null, 16, ["value", "class", "unstyled"])) : vue.createCommentVNode("", true)];
|
|
178
|
+
}, _ctx.ptm('badge')), null, 16, ["value", "class", "severity", "unstyled"])) : vue.createCommentVNode("", true)];
|
|
174
179
|
})], 16, _hoisted_1)), [[_directive_ripple]]);
|
|
175
180
|
}
|
|
176
181
|
|
package/button/button.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/badge"),t=require("primevue/icons/spinner"),n=require("primevue/ripple"),l=require("primevue/basecomponent"),a=require("primevue/button/style"),o=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(e),s=i(t),d=i(n),c={name:"Button",extends:{name:"BaseButton",extends:i(l).default,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:i(a).default,provide:function(){return{$parentInstance:this}}},methods:{getPTOptions:function(e){var t,n;return this.ptm(e,{parent:{props:null===(t=this.$parent)||void 0===t?void 0:t.$props,state:null===(n=this.$parent)||void 0===n?void 0:n.$data},context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||""===this.$attrs.disabled||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs["aria-label"]},hasIcon:function(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:s.default,Badge:r.default},directives:{ripple:d.default}},u=["aria-label","disabled","data-pc-severity"];c.render=function(e,t,n,l,a,i){var r=o.resolveComponent("SpinnerIcon"),s=o.resolveComponent("Badge"),d=o.resolveDirective("ripple");return o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({class:e.cx("root"),type:"button","aria-label":i.defaultAriaLabel,disabled:i.disabled},i.getPTOptions("root"),{"data-pc-name":"button","data-pc-severity":e.severity}),[o.renderSlot(e.$slots,"default",{},(function(){return[e.loading?o.renderSlot(e.$slots,"loadingicon",{key:0,class:o.normalizeClass([e.cx("loadingIcon"),e.cx("icon")])},(function(){return[e.loadingIcon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("loadingIcon"),e.cx("icon"),e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(o.openBlock(),o.createBlock(r,o.mergeProps({key:1,class:[e.cx("loadingIcon"),e.cx("icon")],spin:""},e.ptm("loadingIcon")),null,16,["class"]))]})):o.renderSlot(e.$slots,"icon",{key:1,class:o.normalizeClass([e.cx("icon")])},(function(){return[e.icon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("icon"),e.icon,e.iconClass]},e.ptm("icon")),null,16)):o.createCommentVNode("",!0)]})),o.createElementVNode("span",o.mergeProps({class:e.cx("label")},e.ptm("label")),o.toDisplayString(e.label||" "),17),e.badge?(o.openBlock(),o.createBlock(s,o.mergeProps({key:2,value:e.badge,class:e.badgeClass,unstyled:e.unstyled},e.ptm("badge")),null,16,["value","class","unstyled"])):o.createCommentVNode("",!0)]}))],16,u)),[[d]])},module.exports=c;
|
|
1
|
+
"use strict";var e=require("primevue/badge"),t=require("primevue/icons/spinner"),n=require("primevue/ripple"),l=require("primevue/basecomponent"),a=require("primevue/button/style"),o=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(e),s=i(t),d=i(n),c={name:"Button",extends:{name:"BaseButton",extends:i(l).default,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},badgeSeverity:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:i(a).default,provide:function(){return{$parentInstance:this}}},methods:{getPTOptions:function(e){var t,n;return this.ptm(e,{parent:{props:null===(t=this.$parent)||void 0===t?void 0:t.$props,state:null===(n=this.$parent)||void 0===n?void 0:n.$data},context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||""===this.$attrs.disabled||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs["aria-label"]},hasIcon:function(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:s.default,Badge:r.default},directives:{ripple:d.default}},u=["aria-label","disabled","data-pc-severity"];c.render=function(e,t,n,l,a,i){var r=o.resolveComponent("SpinnerIcon"),s=o.resolveComponent("Badge"),d=o.resolveDirective("ripple");return o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({class:e.cx("root"),type:"button","aria-label":i.defaultAriaLabel,disabled:i.disabled},i.getPTOptions("root"),{"data-pc-name":"button","data-pc-severity":e.severity}),[o.renderSlot(e.$slots,"default",{},(function(){return[e.loading?o.renderSlot(e.$slots,"loadingicon",{key:0,class:o.normalizeClass([e.cx("loadingIcon"),e.cx("icon")])},(function(){return[e.loadingIcon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("loadingIcon"),e.cx("icon"),e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(o.openBlock(),o.createBlock(r,o.mergeProps({key:1,class:[e.cx("loadingIcon"),e.cx("icon")],spin:""},e.ptm("loadingIcon")),null,16,["class"]))]})):o.renderSlot(e.$slots,"icon",{key:1,class:o.normalizeClass([e.cx("icon")])},(function(){return[e.icon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("icon"),e.icon,e.iconClass]},e.ptm("icon")),null,16)):o.createCommentVNode("",!0)]})),o.createElementVNode("span",o.mergeProps({class:e.cx("label")},e.ptm("label")),o.toDisplayString(e.label||" "),17),e.badge?(o.openBlock(),o.createBlock(s,o.mergeProps({key:2,value:e.badge,class:e.badgeClass,severity:e.badgeSeverity,unstyled:e.unstyled},e.ptm("badge")),null,16,["value","class","severity","unstyled"])):o.createCommentVNode("",!0)]}))],16,u)),[[d]])},module.exports=c;
|
package/button/button.esm.js
CHANGED
|
@@ -33,6 +33,10 @@ var script$1 = {
|
|
|
33
33
|
type: String,
|
|
34
34
|
"default": null
|
|
35
35
|
},
|
|
36
|
+
badgeSeverity: {
|
|
37
|
+
type: String,
|
|
38
|
+
"default": null
|
|
39
|
+
},
|
|
36
40
|
loading: {
|
|
37
41
|
type: Boolean,
|
|
38
42
|
"default": false
|
|
@@ -159,8 +163,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
159
163
|
key: 2,
|
|
160
164
|
value: _ctx.badge,
|
|
161
165
|
"class": _ctx.badgeClass,
|
|
166
|
+
severity: _ctx.badgeSeverity,
|
|
162
167
|
unstyled: _ctx.unstyled
|
|
163
|
-
}, _ctx.ptm('badge')), null, 16, ["value", "class", "unstyled"])) : createCommentVNode("", true)];
|
|
168
|
+
}, _ctx.ptm('badge')), null, 16, ["value", "class", "severity", "unstyled"])) : createCommentVNode("", true)];
|
|
164
169
|
})], 16, _hoisted_1)), [[_directive_ripple]]);
|
|
165
170
|
}
|
|
166
171
|
|
package/button/button.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/badge";import t from"primevue/icons/spinner";import n from"primevue/ripple";import a from"primevue/basecomponent";import l from"primevue/button/style";import{resolveComponent as i,resolveDirective as o,withDirectives as s,openBlock as
|
|
1
|
+
import e from"primevue/badge";import t from"primevue/icons/spinner";import n from"primevue/ripple";import a from"primevue/basecomponent";import l from"primevue/button/style";import{resolveComponent as i,resolveDirective as o,withDirectives as s,openBlock as r,createElementBlock as d,mergeProps as u,renderSlot as p,normalizeClass as c,createBlock as f,createCommentVNode as g,createElementVNode as y,toDisplayString as b}from"vue";var m={name:"Button",extends:{name:"BaseButton",extends:a,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},badgeSeverity:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:l,provide:function(){return{$parentInstance:this}}},methods:{getPTOptions:function(e){var t,n;return this.ptm(e,{parent:{props:null===(t=this.$parent)||void 0===t?void 0:t.$props,state:null===(n=this.$parent)||void 0===n?void 0:n.$data},context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||""===this.$attrs.disabled||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs["aria-label"]},hasIcon:function(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:t,Badge:e},directives:{ripple:n}},v=["aria-label","disabled","data-pc-severity"];m.render=function(e,t,n,a,l,m){var h=i("SpinnerIcon"),x=i("Badge"),S=o("ripple");return s((r(),d("button",u({class:e.cx("root"),type:"button","aria-label":m.defaultAriaLabel,disabled:m.disabled},m.getPTOptions("root"),{"data-pc-name":"button","data-pc-severity":e.severity}),[p(e.$slots,"default",{},(function(){return[e.loading?p(e.$slots,"loadingicon",{key:0,class:c([e.cx("loadingIcon"),e.cx("icon")])},(function(){return[e.loadingIcon?(r(),d("span",u({key:0,class:[e.cx("loadingIcon"),e.cx("icon"),e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(r(),f(h,u({key:1,class:[e.cx("loadingIcon"),e.cx("icon")],spin:""},e.ptm("loadingIcon")),null,16,["class"]))]})):p(e.$slots,"icon",{key:1,class:c([e.cx("icon")])},(function(){return[e.icon?(r(),d("span",u({key:0,class:[e.cx("icon"),e.icon,e.iconClass]},e.ptm("icon")),null,16)):g("",!0)]})),y("span",u({class:e.cx("label")},e.ptm("label")),b(e.label||" "),17),e.badge?(r(),f(x,u({key:2,value:e.badge,class:e.badgeClass,severity:e.badgeSeverity,unstyled:e.unstyled},e.ptm("badge")),null,16,["value","class","severity","unstyled"])):g("",!0)]}))],16,v)),[[S]])};export{m as default};
|
package/button/button.js
CHANGED
|
@@ -38,6 +38,10 @@ this.primevue.button = (function (Badge, SpinnerIcon, Ripple, BaseComponent, But
|
|
|
38
38
|
type: String,
|
|
39
39
|
"default": null
|
|
40
40
|
},
|
|
41
|
+
badgeSeverity: {
|
|
42
|
+
type: String,
|
|
43
|
+
"default": null
|
|
44
|
+
},
|
|
41
45
|
loading: {
|
|
42
46
|
type: Boolean,
|
|
43
47
|
"default": false
|
|
@@ -164,8 +168,9 @@ this.primevue.button = (function (Badge, SpinnerIcon, Ripple, BaseComponent, But
|
|
|
164
168
|
key: 2,
|
|
165
169
|
value: _ctx.badge,
|
|
166
170
|
"class": _ctx.badgeClass,
|
|
171
|
+
severity: _ctx.badgeSeverity,
|
|
167
172
|
unstyled: _ctx.unstyled
|
|
168
|
-
}, _ctx.ptm('badge')), null, 16, ["value", "class", "unstyled"])) : vue.createCommentVNode("", true)];
|
|
173
|
+
}, _ctx.ptm('badge')), null, 16, ["value", "class", "severity", "unstyled"])) : vue.createCommentVNode("", true)];
|
|
169
174
|
})], 16, _hoisted_1)), [[_directive_ripple]]);
|
|
170
175
|
}
|
|
171
176
|
|
package/button/button.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.button=function(e,t,n,l,a,o){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(e),r=i(t),d=i(n),c={name:"Button",extends:{name:"BaseButton",extends:i(l).default,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:i(a).default,provide:function(){return{$parentInstance:this}}},methods:{getPTOptions:function(e){var t,n;return this.ptm(e,{parent:{props:null===(t=this.$parent)||void 0===t?void 0:t.$props,state:null===(n=this.$parent)||void 0===n?void 0:n.$data},context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||""===this.$attrs.disabled||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs["aria-label"]},hasIcon:function(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:r.default,Badge:s.default},directives:{ripple:d.default}},u=["aria-label","disabled","data-pc-severity"];return c.render=function(e,t,n,l,a,i){var s=o.resolveComponent("SpinnerIcon"),r=o.resolveComponent("Badge"),d=o.resolveDirective("ripple");return o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({class:e.cx("root"),type:"button","aria-label":i.defaultAriaLabel,disabled:i.disabled},i.getPTOptions("root"),{"data-pc-name":"button","data-pc-severity":e.severity}),[o.renderSlot(e.$slots,"default",{},(function(){return[e.loading?o.renderSlot(e.$slots,"loadingicon",{key:0,class:o.normalizeClass([e.cx("loadingIcon"),e.cx("icon")])},(function(){return[e.loadingIcon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("loadingIcon"),e.cx("icon"),e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(o.openBlock(),o.createBlock(s,o.mergeProps({key:1,class:[e.cx("loadingIcon"),e.cx("icon")],spin:""},e.ptm("loadingIcon")),null,16,["class"]))]})):o.renderSlot(e.$slots,"icon",{key:1,class:o.normalizeClass([e.cx("icon")])},(function(){return[e.icon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("icon"),e.icon,e.iconClass]},e.ptm("icon")),null,16)):o.createCommentVNode("",!0)]})),o.createElementVNode("span",o.mergeProps({class:e.cx("label")},e.ptm("label")),o.toDisplayString(e.label||" "),17),e.badge?(o.openBlock(),o.createBlock(r,o.mergeProps({key:2,value:e.badge,class:e.badgeClass,unstyled:e.unstyled},e.ptm("badge")),null,16,["value","class","unstyled"])):o.createCommentVNode("",!0)]}))],16,u)),[[d]])},c}(primevue.badge,primevue.icons.spinner,primevue.ripple,primevue.basecomponent,primevue.button.style,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.button=function(e,t,n,l,a,o){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(e),r=i(t),d=i(n),c={name:"Button",extends:{name:"BaseButton",extends:i(l).default,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},badgeSeverity:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:i(a).default,provide:function(){return{$parentInstance:this}}},methods:{getPTOptions:function(e){var t,n;return this.ptm(e,{parent:{props:null===(t=this.$parent)||void 0===t?void 0:t.$props,state:null===(n=this.$parent)||void 0===n?void 0:n.$data},context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||""===this.$attrs.disabled||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs["aria-label"]},hasIcon:function(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:r.default,Badge:s.default},directives:{ripple:d.default}},u=["aria-label","disabled","data-pc-severity"];return c.render=function(e,t,n,l,a,i){var s=o.resolveComponent("SpinnerIcon"),r=o.resolveComponent("Badge"),d=o.resolveDirective("ripple");return o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({class:e.cx("root"),type:"button","aria-label":i.defaultAriaLabel,disabled:i.disabled},i.getPTOptions("root"),{"data-pc-name":"button","data-pc-severity":e.severity}),[o.renderSlot(e.$slots,"default",{},(function(){return[e.loading?o.renderSlot(e.$slots,"loadingicon",{key:0,class:o.normalizeClass([e.cx("loadingIcon"),e.cx("icon")])},(function(){return[e.loadingIcon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("loadingIcon"),e.cx("icon"),e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(o.openBlock(),o.createBlock(s,o.mergeProps({key:1,class:[e.cx("loadingIcon"),e.cx("icon")],spin:""},e.ptm("loadingIcon")),null,16,["class"]))]})):o.renderSlot(e.$slots,"icon",{key:1,class:o.normalizeClass([e.cx("icon")])},(function(){return[e.icon?(o.openBlock(),o.createElementBlock("span",o.mergeProps({key:0,class:[e.cx("icon"),e.icon,e.iconClass]},e.ptm("icon")),null,16)):o.createCommentVNode("",!0)]})),o.createElementVNode("span",o.mergeProps({class:e.cx("label")},e.ptm("label")),o.toDisplayString(e.label||" "),17),e.badge?(o.openBlock(),o.createBlock(r,o.mergeProps({key:2,value:e.badge,class:e.badgeClass,severity:e.badgeSeverity,unstyled:e.unstyled},e.ptm("badge")),null,16,["value","class","severity","unstyled"])):o.createCommentVNode("",!0)]}))],16,u)),[[d]])},c}(primevue.badge,primevue.icons.spinner,primevue.ripple,primevue.basecomponent,primevue.button.style,Vue);
|
package/calendar/Calendar.d.ts
CHANGED
|
@@ -182,6 +182,10 @@ export interface CalendarPassThroughOptions {
|
|
|
182
182
|
* Used to pass attributes to the week header's DOM element.
|
|
183
183
|
*/
|
|
184
184
|
weekHeader?: CalendarPassThroughOptionType;
|
|
185
|
+
/**
|
|
186
|
+
* Used to pass attributes to the week header label's DOM element.
|
|
187
|
+
*/
|
|
188
|
+
weekHeaderLabel?: CalendarPassThroughOptionType;
|
|
185
189
|
/**
|
|
186
190
|
* Used to pass attributes to the table header cell's DOM element.
|
|
187
191
|
*/
|
|
@@ -756,6 +760,20 @@ export interface CalendarSlots {
|
|
|
756
760
|
*/
|
|
757
761
|
years: string[] | undefined;
|
|
758
762
|
}): VNode[];
|
|
763
|
+
/**
|
|
764
|
+
* Custom week header label template.
|
|
765
|
+
*/
|
|
766
|
+
weekheaderlabel(): VNode[];
|
|
767
|
+
/**
|
|
768
|
+
* Custom week label template.
|
|
769
|
+
* @param {Object} scope - weeklabel slot's params.
|
|
770
|
+
*/
|
|
771
|
+
weeklabel(scope: {
|
|
772
|
+
/**
|
|
773
|
+
* Number of the week
|
|
774
|
+
*/
|
|
775
|
+
weekNumber: number;
|
|
776
|
+
}): VNode[];
|
|
759
777
|
/**
|
|
760
778
|
* Custom dropdown icon template.
|
|
761
779
|
* @param {Object} scope - dropdown icon slot's params.
|
package/calendar/Calendar.vue
CHANGED
|
@@ -169,7 +169,11 @@
|
|
|
169
169
|
<thead v-bind="ptm('tableHeader')">
|
|
170
170
|
<tr v-bind="ptm('tableHeaderRow')">
|
|
171
171
|
<th v-if="showWeek" scope="col" :class="cx('weekHeader')" v-bind="ptm('weekHeader', { context: { disabled: showWeek } })" :data-p-disabled="showWeek" data-pc-group-section="tableheadercell">
|
|
172
|
-
<
|
|
172
|
+
<slot name="weekheaderlabel">
|
|
173
|
+
<span v-bind="ptm('weekHeaderLabel', { context: { disabled: showWeek } })" data-pc-group-section="tableheadercelllabel">
|
|
174
|
+
{{ weekHeaderLabel }}
|
|
175
|
+
</span>
|
|
176
|
+
</slot>
|
|
173
177
|
</th>
|
|
174
178
|
<th v-for="weekDay of weekDays" :key="weekDay" scope="col" :abbr="weekDay" v-bind="ptm('tableHeaderCell')" data-pc-group-section="tableheadercell">
|
|
175
179
|
<span v-bind="ptm('weekDay')" data-pc-group-section="tableheadercelllabel">{{ weekDay }}</span>
|
|
@@ -180,8 +184,10 @@
|
|
|
180
184
|
<tr v-for="(week, i) of month.dates" :key="week[0].day + '' + week[0].month" v-bind="ptm('tableBodyRow')">
|
|
181
185
|
<td v-if="showWeek" :class="cx('weekNumber')" v-bind="ptm('weekNumber')" data-pc-group-section="tablebodycell">
|
|
182
186
|
<span :class="cx('weekLabelContainer')" v-bind="ptm('weekLabelContainer', { context: { disabled: showWeek } })" :data-p-disabled="showWeek" data-pc-group-section="tablebodycelllabel">
|
|
183
|
-
<
|
|
184
|
-
|
|
187
|
+
<slot name="weeklabel" :weekNumber="month.weekNumbers[i]">
|
|
188
|
+
<span v-if="month.weekNumbers[i] < 10" style="visibility: hidden" v-bind="ptm('weekLabel')">0</span>
|
|
189
|
+
{{ month.weekNumbers[i] }}
|
|
190
|
+
</slot>
|
|
185
191
|
</span>
|
|
186
192
|
</td>
|
|
187
193
|
<td
|
|
@@ -520,6 +526,7 @@ export default {
|
|
|
520
526
|
outsideClickListener: null,
|
|
521
527
|
maskClickListener: null,
|
|
522
528
|
resizeListener: null,
|
|
529
|
+
matchMediaListener: null,
|
|
523
530
|
overlay: null,
|
|
524
531
|
input: null,
|
|
525
532
|
mask: null,
|
|
@@ -539,6 +546,7 @@ export default {
|
|
|
539
546
|
focused: false,
|
|
540
547
|
overlayVisible: false,
|
|
541
548
|
currentView: this.view,
|
|
549
|
+
query: null,
|
|
542
550
|
queryMatches: false
|
|
543
551
|
};
|
|
544
552
|
},
|
|
@@ -589,13 +597,7 @@ export default {
|
|
|
589
597
|
},
|
|
590
598
|
mounted() {
|
|
591
599
|
this.createResponsiveStyle();
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
this.queryMatches = query.matches;
|
|
595
|
-
|
|
596
|
-
query.addEventListener('change', () => {
|
|
597
|
-
this.queryMatches = query.matches;
|
|
598
|
-
});
|
|
600
|
+
this.bindMatchMediaListener();
|
|
599
601
|
|
|
600
602
|
if (this.inline) {
|
|
601
603
|
this.overlay && this.overlay.setAttribute(this.attributeSelector, '');
|
|
@@ -638,6 +640,7 @@ export default {
|
|
|
638
640
|
|
|
639
641
|
this.unbindOutsideClickListener();
|
|
640
642
|
this.unbindResizeListener();
|
|
643
|
+
this.unbindMatchMediaListener();
|
|
641
644
|
|
|
642
645
|
if (this.scrollHandler) {
|
|
643
646
|
this.scrollHandler.destroy();
|
|
@@ -1022,6 +1025,27 @@ export default {
|
|
|
1022
1025
|
this.resizeListener = null;
|
|
1023
1026
|
}
|
|
1024
1027
|
},
|
|
1028
|
+
bindMatchMediaListener() {
|
|
1029
|
+
if (!this.matchMediaListener) {
|
|
1030
|
+
const query = matchMedia(`(max-width: ${this.breakpoint})`);
|
|
1031
|
+
|
|
1032
|
+
this.query = query;
|
|
1033
|
+
this.queryMatches = query.matches;
|
|
1034
|
+
|
|
1035
|
+
this.matchMediaListener = () => {
|
|
1036
|
+
this.queryMatches = query.matches;
|
|
1037
|
+
this.mobileActive = false;
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
this.query.addEventListener('change', this.matchMediaListener);
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
unbindMatchMediaListener() {
|
|
1044
|
+
if (this.matchMediaListener) {
|
|
1045
|
+
this.query.removeEventListener('change', this.matchMediaListener);
|
|
1046
|
+
this.matchMediaListener = null;
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1025
1049
|
isOutsideClicked(event) {
|
|
1026
1050
|
return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) || this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
|
|
1027
1051
|
},
|
package/calendar/calendar.cjs.js
CHANGED
|
@@ -277,6 +277,7 @@ var script = {
|
|
|
277
277
|
outsideClickListener: null,
|
|
278
278
|
maskClickListener: null,
|
|
279
279
|
resizeListener: null,
|
|
280
|
+
matchMediaListener: null,
|
|
280
281
|
overlay: null,
|
|
281
282
|
input: null,
|
|
282
283
|
mask: null,
|
|
@@ -296,6 +297,7 @@ var script = {
|
|
|
296
297
|
focused: false,
|
|
297
298
|
overlayVisible: false,
|
|
298
299
|
currentView: this.view,
|
|
300
|
+
query: null,
|
|
299
301
|
queryMatches: false
|
|
300
302
|
};
|
|
301
303
|
},
|
|
@@ -345,13 +347,8 @@ var script = {
|
|
|
345
347
|
this.updateCurrentMetaData();
|
|
346
348
|
},
|
|
347
349
|
mounted: function mounted() {
|
|
348
|
-
var _this2 = this;
|
|
349
350
|
this.createResponsiveStyle();
|
|
350
|
-
|
|
351
|
-
this.queryMatches = query.matches;
|
|
352
|
-
query.addEventListener('change', function () {
|
|
353
|
-
_this2.queryMatches = query.matches;
|
|
354
|
-
});
|
|
351
|
+
this.bindMatchMediaListener();
|
|
355
352
|
if (this.inline) {
|
|
356
353
|
this.overlay && this.overlay.setAttribute(this.attributeSelector, '');
|
|
357
354
|
if (!this.disabled) {
|
|
@@ -387,6 +384,7 @@ var script = {
|
|
|
387
384
|
this.destroyResponsiveStyleElement();
|
|
388
385
|
this.unbindOutsideClickListener();
|
|
389
386
|
this.unbindResizeListener();
|
|
387
|
+
this.unbindMatchMediaListener();
|
|
390
388
|
if (this.scrollHandler) {
|
|
391
389
|
this.scrollHandler.destroy();
|
|
392
390
|
this.scrollHandler = null;
|
|
@@ -434,12 +432,12 @@ var script = {
|
|
|
434
432
|
return false;
|
|
435
433
|
},
|
|
436
434
|
isMonthSelected: function isMonthSelected(month) {
|
|
437
|
-
var
|
|
435
|
+
var _this2 = this;
|
|
438
436
|
if (this.isComparable()) {
|
|
439
437
|
var value = this.isRangeSelection() ? this.modelValue[0] : this.modelValue;
|
|
440
438
|
if (this.isMultipleSelection()) {
|
|
441
439
|
return value.some(function (currentValue) {
|
|
442
|
-
return currentValue.getMonth() === month && currentValue.getFullYear() ===
|
|
440
|
+
return currentValue.getMonth() === month && currentValue.getFullYear() === _this2.currentYear;
|
|
443
441
|
});
|
|
444
442
|
} else {
|
|
445
443
|
return value.getMonth() === month && value.getFullYear() === this.currentYear;
|
|
@@ -720,11 +718,11 @@ var script = {
|
|
|
720
718
|
this.currentSecond = Math.floor(date.getSeconds() / this.stepSecond) * this.stepSecond;
|
|
721
719
|
},
|
|
722
720
|
bindOutsideClickListener: function bindOutsideClickListener() {
|
|
723
|
-
var
|
|
721
|
+
var _this3 = this;
|
|
724
722
|
if (!this.outsideClickListener) {
|
|
725
723
|
this.outsideClickListener = function (event) {
|
|
726
|
-
if (
|
|
727
|
-
|
|
724
|
+
if (_this3.overlayVisible && _this3.isOutsideClicked(event)) {
|
|
725
|
+
_this3.overlayVisible = false;
|
|
728
726
|
}
|
|
729
727
|
};
|
|
730
728
|
document.addEventListener('mousedown', this.outsideClickListener);
|
|
@@ -737,11 +735,11 @@ var script = {
|
|
|
737
735
|
}
|
|
738
736
|
},
|
|
739
737
|
bindScrollListener: function bindScrollListener() {
|
|
740
|
-
var
|
|
738
|
+
var _this4 = this;
|
|
741
739
|
if (!this.scrollHandler) {
|
|
742
740
|
this.scrollHandler = new utils.ConnectedOverlayScrollHandler(this.$refs.container, function () {
|
|
743
|
-
if (
|
|
744
|
-
|
|
741
|
+
if (_this4.overlayVisible) {
|
|
742
|
+
_this4.overlayVisible = false;
|
|
745
743
|
}
|
|
746
744
|
});
|
|
747
745
|
}
|
|
@@ -753,11 +751,11 @@ var script = {
|
|
|
753
751
|
}
|
|
754
752
|
},
|
|
755
753
|
bindResizeListener: function bindResizeListener() {
|
|
756
|
-
var
|
|
754
|
+
var _this5 = this;
|
|
757
755
|
if (!this.resizeListener) {
|
|
758
756
|
this.resizeListener = function () {
|
|
759
|
-
if (
|
|
760
|
-
|
|
757
|
+
if (_this5.overlayVisible && !utils.DomHandler.isTouchDevice()) {
|
|
758
|
+
_this5.overlayVisible = false;
|
|
761
759
|
}
|
|
762
760
|
};
|
|
763
761
|
window.addEventListener('resize', this.resizeListener);
|
|
@@ -769,6 +767,25 @@ var script = {
|
|
|
769
767
|
this.resizeListener = null;
|
|
770
768
|
}
|
|
771
769
|
},
|
|
770
|
+
bindMatchMediaListener: function bindMatchMediaListener() {
|
|
771
|
+
var _this6 = this;
|
|
772
|
+
if (!this.matchMediaListener) {
|
|
773
|
+
var query = matchMedia("(max-width: ".concat(this.breakpoint, ")"));
|
|
774
|
+
this.query = query;
|
|
775
|
+
this.queryMatches = query.matches;
|
|
776
|
+
this.matchMediaListener = function () {
|
|
777
|
+
_this6.queryMatches = query.matches;
|
|
778
|
+
_this6.mobileActive = false;
|
|
779
|
+
};
|
|
780
|
+
this.query.addEventListener('change', this.matchMediaListener);
|
|
781
|
+
}
|
|
782
|
+
},
|
|
783
|
+
unbindMatchMediaListener: function unbindMatchMediaListener() {
|
|
784
|
+
if (this.matchMediaListener) {
|
|
785
|
+
this.query.removeEventListener('change', this.matchMediaListener);
|
|
786
|
+
this.matchMediaListener = null;
|
|
787
|
+
}
|
|
788
|
+
},
|
|
772
789
|
isOutsideClicked: function isOutsideClicked(event) {
|
|
773
790
|
return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) || this.$el.contains(event.target) || this.overlay && this.overlay.contains(event.target));
|
|
774
791
|
},
|
|
@@ -2806,9 +2823,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2806
2823
|
}), {
|
|
2807
2824
|
"data-p-disabled": _ctx.showWeek,
|
|
2808
2825
|
"data-pc-group-section": "tableheadercell"
|
|
2809
|
-
}), [vue.
|
|
2810
|
-
"
|
|
2811
|
-
|
|
2826
|
+
}), [vue.renderSlot(_ctx.$slots, "weekheaderlabel", {}, function () {
|
|
2827
|
+
return [vue.createElementVNode("span", vue.mergeProps(_ctx.ptm('weekHeaderLabel', {
|
|
2828
|
+
context: {
|
|
2829
|
+
disabled: _ctx.showWeek
|
|
2830
|
+
}
|
|
2831
|
+
}), {
|
|
2832
|
+
"data-pc-group-section": "tableheadercelllabel"
|
|
2833
|
+
}), vue.toDisplayString($options.weekHeaderLabel), 17)];
|
|
2834
|
+
})], 16, _hoisted_10)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.weekDays, function (weekDay) {
|
|
2812
2835
|
return vue.openBlock(), vue.createElementBlock("th", vue.mergeProps({
|
|
2813
2836
|
key: weekDay,
|
|
2814
2837
|
scope: "col",
|
|
@@ -2835,12 +2858,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2835
2858
|
}), {
|
|
2836
2859
|
"data-p-disabled": _ctx.showWeek,
|
|
2837
2860
|
"data-pc-group-section": "tablebodycelllabel"
|
|
2838
|
-
}), [
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2861
|
+
}), [vue.renderSlot(_ctx.$slots, "weeklabel", {
|
|
2862
|
+
weekNumber: month.weekNumbers[i]
|
|
2863
|
+
}, function () {
|
|
2864
|
+
return [month.weekNumbers[i] < 10 ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
2865
|
+
key: 0,
|
|
2866
|
+
style: {
|
|
2867
|
+
"visibility": "hidden"
|
|
2868
|
+
}
|
|
2869
|
+
}, _ctx.ptm('weekLabel')), "0", 16)) : vue.createCommentVNode("", true), vue.createTextVNode(" " + vue.toDisplayString(month.weekNumbers[i]), 1)];
|
|
2870
|
+
})], 16, _hoisted_12)], 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(week, function (date) {
|
|
2844
2871
|
return vue.openBlock(), vue.createElementBlock("td", vue.mergeProps({
|
|
2845
2872
|
key: date.day + '' + date.month,
|
|
2846
2873
|
"aria-label": date.day,
|