primevue 3.8.0 → 3.8.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/core/core.js +1 -1
- package/core/core.min.js +4 -0
- package/datatable/DataTable.vue +1 -1
- package/datatable/TableBody.vue +1 -1
- package/datatable/TableFooter.vue +2 -1
- package/datatable/TableHeader.vue +2 -1
- package/datatable/datatable.cjs.js +4 -4
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +4 -4
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4 -4
- package/datatable/datatable.min.js +1 -1
- package/dock/Dock.d.ts +1 -0
- package/dock/Dock.vue +1 -1
- package/dock/DockSub.vue +13 -8
- package/dock/dock.cjs.js +24 -10
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +20 -10
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +25 -12
- package/dock/dock.min.js +1 -1
- package/inplace/Inplace.d.ts +1 -0
- package/inplace/Inplace.vue +12 -1
- package/inplace/inplace.cjs.js +13 -2
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +13 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +13 -2
- package/inplace/inplace.min.js +1 -1
- package/package.json +1 -1
- package/treetable/TreeTable.vue +2 -2
- package/treetable/TreeTableRow.vue +2 -2
- package/treetable/treetable.cjs.js +3 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +3 -3
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +3 -3
- package/treetable/treetable.min.js +1 -1
- package/vetur-attributes.json +4 -0
- package/vetur-tags.json +2 -1
- package/virtualscroller/VirtualScroller.vue +1 -1
- package/virtualscroller/virtualscroller.cjs.js +1 -1
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +1 -1
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +16 -1
package/dock/Dock.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="containerClass" :style="style">
|
|
3
|
-
<DockSub :model="model" :
|
|
3
|
+
<DockSub :model="model" :templates="$slots" :exact="exact" :tooltipOptions="tooltipOptions"></DockSub>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
package/dock/DockSub.vue
CHANGED
|
@@ -2,31 +2,33 @@
|
|
|
2
2
|
<div class="p-dock-list-container">
|
|
3
3
|
<ul ref="list" class="p-dock-list" role="menu" @mouseleave="onListMouseLeave">
|
|
4
4
|
<li v-for="(item, index) of model" :class="itemClass(index)" :key="index" role="none" @mouseenter="onItemMouseEnter(index)">
|
|
5
|
-
<template v-if="!
|
|
5
|
+
<template v-if="!templates['item']">
|
|
6
6
|
<router-link v-if="item.to && !disabled(item)" :to="item.to" custom v-slot="{navigate, href, isActive, isExactActive}">
|
|
7
7
|
<a :href="href" role="menuitem" :class="linkClass(item, {isActive, isExactActive})" :target="item.target"
|
|
8
8
|
v-tooltip:[tooltipOptions]="{value: item.label, disabled: !tooltipOptions}" @click="onItemClick($event, item, navigate)">
|
|
9
|
-
<template v-if="
|
|
9
|
+
<template v-if="!templates['icon']">
|
|
10
10
|
<span :class="['p-dock-action-icon', item.icon]" v-ripple></span>
|
|
11
11
|
</template>
|
|
12
|
-
<component v-else :is="
|
|
12
|
+
<component v-else :is="templates['icon']" :item="item"></component>
|
|
13
13
|
</a>
|
|
14
14
|
</router-link>
|
|
15
15
|
<a v-else :href="item.url" role="menuitem" :class="linkClass(item)" :target="item.target"
|
|
16
16
|
v-tooltip:[tooltipOptions]="{value: item.label, disabled: !tooltipOptions}" @click="onItemClick($event, item)" :tabindex="disabled(item) ? null : '0'">
|
|
17
|
-
<template v-if="
|
|
17
|
+
<template v-if="!templates['icon']">
|
|
18
18
|
<span :class="['p-dock-action-icon', item.icon]" v-ripple></span>
|
|
19
19
|
</template>
|
|
20
|
-
<component v-else :is="
|
|
20
|
+
<component v-else :is="templates['icon']" :item="item"></component>
|
|
21
21
|
</a>
|
|
22
22
|
</template>
|
|
23
|
-
<component v-else :is="
|
|
23
|
+
<component v-else :is="templates['item']" :item="item"></component>
|
|
24
24
|
</li>
|
|
25
25
|
</ul>
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
|
+
import Ripple from 'primevue/ripple';
|
|
31
|
+
|
|
30
32
|
export default {
|
|
31
33
|
name: 'DockSub',
|
|
32
34
|
props: {
|
|
@@ -34,8 +36,8 @@ export default {
|
|
|
34
36
|
type: Array,
|
|
35
37
|
default: null
|
|
36
38
|
},
|
|
37
|
-
|
|
38
|
-
type:
|
|
39
|
+
templates: {
|
|
40
|
+
type: null,
|
|
39
41
|
default: null
|
|
40
42
|
},
|
|
41
43
|
exact: {
|
|
@@ -92,6 +94,9 @@ export default {
|
|
|
92
94
|
disabled(item) {
|
|
93
95
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
94
96
|
}
|
|
97
|
+
},
|
|
98
|
+
directives: {
|
|
99
|
+
'ripple': Ripple
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
102
|
</script>
|
package/dock/dock.cjs.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var Ripple = require('primevue/ripple');
|
|
3
4
|
var vue = require('vue');
|
|
4
5
|
|
|
6
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
|
+
|
|
8
|
+
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
9
|
+
|
|
5
10
|
var script$1 = {
|
|
6
11
|
name: 'DockSub',
|
|
7
12
|
props: {
|
|
@@ -9,8 +14,8 @@ var script$1 = {
|
|
|
9
14
|
type: Array,
|
|
10
15
|
default: null
|
|
11
16
|
},
|
|
12
|
-
|
|
13
|
-
type:
|
|
17
|
+
templates: {
|
|
18
|
+
type: null,
|
|
14
19
|
default: null
|
|
15
20
|
},
|
|
16
21
|
exact: {
|
|
@@ -67,6 +72,9 @@ var script$1 = {
|
|
|
67
72
|
disabled(item) {
|
|
68
73
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
69
74
|
}
|
|
75
|
+
},
|
|
76
|
+
directives: {
|
|
77
|
+
'ripple': Ripple__default['default']
|
|
70
78
|
}
|
|
71
79
|
};
|
|
72
80
|
|
|
@@ -91,7 +99,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
91
99
|
role: "none",
|
|
92
100
|
onMouseenter: $event => ($options.onItemMouseEnter(index))
|
|
93
101
|
}, [
|
|
94
|
-
(!$props.
|
|
102
|
+
(!$props.templates['item'])
|
|
95
103
|
? (vue.openBlock(), vue.createBlock(vue.Fragment, { key: 0 }, [
|
|
96
104
|
(item.to && !$options.disabled(item))
|
|
97
105
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
@@ -107,14 +115,17 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
115
|
target: item.target,
|
|
108
116
|
onClick: $event => ($options.onItemClick($event, item, navigate))
|
|
109
117
|
}, [
|
|
110
|
-
(
|
|
118
|
+
(!$props.templates['icon'])
|
|
111
119
|
? vue.withDirectives((vue.openBlock(), vue.createBlock("span", {
|
|
112
120
|
key: 0,
|
|
113
121
|
class: ['p-dock-action-icon', item.icon]
|
|
114
122
|
}, null, 2)), [
|
|
115
123
|
[_directive_ripple]
|
|
116
124
|
])
|
|
117
|
-
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(
|
|
125
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['icon']), {
|
|
126
|
+
key: 1,
|
|
127
|
+
item: item
|
|
128
|
+
}, null, 8, ["item"]))
|
|
118
129
|
], 10, ["href", "target", "onClick"]), [
|
|
119
130
|
[_directive_tooltip, {value: item.label, disabled: !$props.tooltipOptions}, $props.tooltipOptions]
|
|
120
131
|
])
|
|
@@ -130,19 +141,22 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
130
141
|
onClick: $event => ($options.onItemClick($event, item)),
|
|
131
142
|
tabindex: $options.disabled(item) ? null : '0'
|
|
132
143
|
}, [
|
|
133
|
-
(
|
|
144
|
+
(!$props.templates['icon'])
|
|
134
145
|
? vue.withDirectives((vue.openBlock(), vue.createBlock("span", {
|
|
135
146
|
key: 0,
|
|
136
147
|
class: ['p-dock-action-icon', item.icon]
|
|
137
148
|
}, null, 2)), [
|
|
138
149
|
[_directive_ripple]
|
|
139
150
|
])
|
|
140
|
-
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(
|
|
151
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['icon']), {
|
|
152
|
+
key: 1,
|
|
153
|
+
item: item
|
|
154
|
+
}, null, 8, ["item"]))
|
|
141
155
|
], 10, ["href", "target", "onClick", "tabindex"])), [
|
|
142
156
|
[_directive_tooltip, {value: item.label, disabled: !$props.tooltipOptions}, $props.tooltipOptions]
|
|
143
157
|
])
|
|
144
158
|
], 64))
|
|
145
|
-
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.
|
|
159
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['item']), {
|
|
146
160
|
key: 1,
|
|
147
161
|
item: item
|
|
148
162
|
}, null, 8, ["item"]))
|
|
@@ -189,10 +203,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
189
203
|
}, [
|
|
190
204
|
vue.createVNode(_component_DockSub, {
|
|
191
205
|
model: $props.model,
|
|
192
|
-
|
|
206
|
+
templates: _ctx.$slots,
|
|
193
207
|
exact: $props.exact,
|
|
194
208
|
tooltipOptions: $props.tooltipOptions
|
|
195
|
-
}, null, 8, ["model", "
|
|
209
|
+
}, null, 8, ["model", "templates", "exact", "tooltipOptions"])
|
|
196
210
|
], 6))
|
|
197
211
|
}
|
|
198
212
|
|
package/dock/dock.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("vue")
|
|
1
|
+
"use strict";var e=require("primevue/ripple"),t=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o={name:"DockSub",props:{model:{type:Array,default:null},templates:{type:null,default:null},exact:{type:Boolean,default:!0},tooltipOptions:null},data:()=>({currentIndex:-3}),methods:{onListMouseLeave(){this.currentIndex=-3},onItemMouseEnter(e){this.currentIndex=e},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},itemClass(e){return["p-dock-item",{"p-dock-item-second-prev":this.currentIndex-2===e,"p-dock-item-prev":this.currentIndex-1===e,"p-dock-item-current":this.currentIndex===e,"p-dock-item-next":this.currentIndex+1===e,"p-dock-item-second-next":this.currentIndex+2===e}]},linkClass(e,t){return["p-dock-action",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},directives:{ripple:n(e).default}};const i={class:"p-dock-list-container"};o.render=function(e,n,o,l,c,r){const s=t.resolveComponent("router-link"),a=t.resolveDirective("ripple"),p=t.resolveDirective("tooltip");return t.openBlock(),t.createBlock("div",i,[t.createVNode("ul",{ref:"list",class:"p-dock-list",role:"menu",onMouseleave:n[1]||(n[1]=(...e)=>r.onListMouseLeave&&r.onListMouseLeave(...e))},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(o.model,((e,n)=>(t.openBlock(),t.createBlock("li",{class:r.itemClass(n),key:n,role:"none",onMouseenter:e=>r.onItemMouseEnter(n)},[o.templates.item?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.templates.item),{key:1,item:e},null,8,["item"])):(t.openBlock(),t.createBlock(t.Fragment,{key:0},[e.to&&!r.disabled(e)?(t.openBlock(),t.createBlock(s,{key:0,to:e.to,custom:""},{default:t.withCtx((({navigate:n,href:i,isActive:l,isExactActive:c})=>[t.withDirectives(t.createVNode("a",{href:i,role:"menuitem",class:r.linkClass(e,{isActive:l,isExactActive:c}),target:e.target,onClick:t=>r.onItemClick(t,e,n)},[o.templates.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.templates.icon),{key:1,item:e},null,8,["item"])):t.withDirectives((t.openBlock(),t.createBlock("span",{key:0,class:["p-dock-action-icon",e.icon]},null,2)),[[a]])],10,["href","target","onClick"]),[[p,{value:e.label,disabled:!o.tooltipOptions},o.tooltipOptions]])])),_:2},1032,["to"])):t.withDirectives((t.openBlock(),t.createBlock("a",{key:1,href:e.url,role:"menuitem",class:r.linkClass(e),target:e.target,onClick:t=>r.onItemClick(t,e),tabindex:r.disabled(e)?null:"0"},[o.templates.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.templates.icon),{key:1,item:e},null,8,["item"])):t.withDirectives((t.openBlock(),t.createBlock("span",{key:0,class:["p-dock-action-icon",e.icon]},null,2)),[[a]])],10,["href","target","onClick","tabindex"])),[[p,{value:e.label,disabled:!o.tooltipOptions},o.tooltipOptions]])],64))],42,["onMouseenter"])))),128))],544)])};var l={name:"Dock",props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,exact:{type:Boolean,default:!0}},computed:{containerClass(){return["p-dock p-component",`p-dock-${this.position}`,this.class]}},components:{DockSub:o}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-dock {\n position: absolute;\n z-index: 1;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n pointer-events: none;\n}\n.p-dock-list-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n pointer-events: auto;\n}\n.p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-dock-item {\n -webkit-transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n}\n.p-dock-action {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n}\n.p-dock-item-second-prev,\n.p-dock-item-second-next {\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n}\n.p-dock-item-prev,\n.p-dock-item-next {\n -webkit-transform: scale(1.4);\n transform: scale(1.4);\n}\n.p-dock-item-current {\n -webkit-transform: scale(1.6);\n transform: scale(1.6);\n z-index: 1;\n}\n\n/* Position */\n/* top */\n.p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n}\n.p-dock-top .p-dock-item {\n -webkit-transform-origin: center top;\n transform-origin: center top;\n}\n\n/* bottom */\n.p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.p-dock-bottom .p-dock-item {\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n}\n\n/* right */\n.p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n}\n.p-dock-right .p-dock-item {\n -webkit-transform-origin: center right;\n transform-origin: center right;\n}\n.p-dock-right .p-dock-list {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n/* left */\n.p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n}\n.p-dock-left .p-dock-item {\n -webkit-transform-origin: center left;\n transform-origin: center left;\n}\n.p-dock-left .p-dock-list {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n"),l.render=function(e,n,o,i,l,c){const r=t.resolveComponent("DockSub");return t.openBlock(),t.createBlock("div",{class:c.containerClass,style:o.style},[t.createVNode(r,{model:o.model,templates:e.$slots,exact:o.exact,tooltipOptions:o.tooltipOptions},null,8,["model","templates","exact","tooltipOptions"])],6)},module.exports=l;
|
package/dock/dock.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Ripple from 'primevue/ripple';
|
|
1
2
|
import { resolveComponent, resolveDirective, openBlock, createBlock, createVNode, Fragment, renderList, withCtx, withDirectives, resolveDynamicComponent } from 'vue';
|
|
2
3
|
|
|
3
4
|
var script$1 = {
|
|
@@ -7,8 +8,8 @@ var script$1 = {
|
|
|
7
8
|
type: Array,
|
|
8
9
|
default: null
|
|
9
10
|
},
|
|
10
|
-
|
|
11
|
-
type:
|
|
11
|
+
templates: {
|
|
12
|
+
type: null,
|
|
12
13
|
default: null
|
|
13
14
|
},
|
|
14
15
|
exact: {
|
|
@@ -65,6 +66,9 @@ var script$1 = {
|
|
|
65
66
|
disabled(item) {
|
|
66
67
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
67
68
|
}
|
|
69
|
+
},
|
|
70
|
+
directives: {
|
|
71
|
+
'ripple': Ripple
|
|
68
72
|
}
|
|
69
73
|
};
|
|
70
74
|
|
|
@@ -89,7 +93,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
89
93
|
role: "none",
|
|
90
94
|
onMouseenter: $event => ($options.onItemMouseEnter(index))
|
|
91
95
|
}, [
|
|
92
|
-
(!$props.
|
|
96
|
+
(!$props.templates['item'])
|
|
93
97
|
? (openBlock(), createBlock(Fragment, { key: 0 }, [
|
|
94
98
|
(item.to && !$options.disabled(item))
|
|
95
99
|
? (openBlock(), createBlock(_component_router_link, {
|
|
@@ -105,14 +109,17 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
105
109
|
target: item.target,
|
|
106
110
|
onClick: $event => ($options.onItemClick($event, item, navigate))
|
|
107
111
|
}, [
|
|
108
|
-
(
|
|
112
|
+
(!$props.templates['icon'])
|
|
109
113
|
? withDirectives((openBlock(), createBlock("span", {
|
|
110
114
|
key: 0,
|
|
111
115
|
class: ['p-dock-action-icon', item.icon]
|
|
112
116
|
}, null, 2)), [
|
|
113
117
|
[_directive_ripple]
|
|
114
118
|
])
|
|
115
|
-
: (openBlock(), createBlock(resolveDynamicComponent(
|
|
119
|
+
: (openBlock(), createBlock(resolveDynamicComponent($props.templates['icon']), {
|
|
120
|
+
key: 1,
|
|
121
|
+
item: item
|
|
122
|
+
}, null, 8, ["item"]))
|
|
116
123
|
], 10, ["href", "target", "onClick"]), [
|
|
117
124
|
[_directive_tooltip, {value: item.label, disabled: !$props.tooltipOptions}, $props.tooltipOptions]
|
|
118
125
|
])
|
|
@@ -128,19 +135,22 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
128
135
|
onClick: $event => ($options.onItemClick($event, item)),
|
|
129
136
|
tabindex: $options.disabled(item) ? null : '0'
|
|
130
137
|
}, [
|
|
131
|
-
(
|
|
138
|
+
(!$props.templates['icon'])
|
|
132
139
|
? withDirectives((openBlock(), createBlock("span", {
|
|
133
140
|
key: 0,
|
|
134
141
|
class: ['p-dock-action-icon', item.icon]
|
|
135
142
|
}, null, 2)), [
|
|
136
143
|
[_directive_ripple]
|
|
137
144
|
])
|
|
138
|
-
: (openBlock(), createBlock(resolveDynamicComponent(
|
|
145
|
+
: (openBlock(), createBlock(resolveDynamicComponent($props.templates['icon']), {
|
|
146
|
+
key: 1,
|
|
147
|
+
item: item
|
|
148
|
+
}, null, 8, ["item"]))
|
|
139
149
|
], 10, ["href", "target", "onClick", "tabindex"])), [
|
|
140
150
|
[_directive_tooltip, {value: item.label, disabled: !$props.tooltipOptions}, $props.tooltipOptions]
|
|
141
151
|
])
|
|
142
152
|
], 64))
|
|
143
|
-
: (openBlock(), createBlock(resolveDynamicComponent($props.
|
|
153
|
+
: (openBlock(), createBlock(resolveDynamicComponent($props.templates['item']), {
|
|
144
154
|
key: 1,
|
|
145
155
|
item: item
|
|
146
156
|
}, null, 8, ["item"]))
|
|
@@ -187,10 +197,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
187
197
|
}, [
|
|
188
198
|
createVNode(_component_DockSub, {
|
|
189
199
|
model: $props.model,
|
|
190
|
-
|
|
200
|
+
templates: _ctx.$slots,
|
|
191
201
|
exact: $props.exact,
|
|
192
202
|
tooltipOptions: $props.tooltipOptions
|
|
193
|
-
}, null, 8, ["model", "
|
|
203
|
+
}, null, 8, ["model", "templates", "exact", "tooltipOptions"])
|
|
194
204
|
], 6))
|
|
195
205
|
}
|
|
196
206
|
|
package/dock/dock.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveComponent as
|
|
1
|
+
import e from"primevue/ripple";import{resolveComponent as t,resolveDirective as n,openBlock as i,createBlock as o,createVNode as l,Fragment as s,renderList as r,withCtx as c,withDirectives as a,resolveDynamicComponent as d}from"vue";var p={name:"DockSub",props:{model:{type:Array,default:null},templates:{type:null,default:null},exact:{type:Boolean,default:!0},tooltipOptions:null},data:()=>({currentIndex:-3}),methods:{onListMouseLeave(){this.currentIndex=-3},onItemMouseEnter(e){this.currentIndex=e},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},itemClass(e){return["p-dock-item",{"p-dock-item-second-prev":this.currentIndex-2===e,"p-dock-item-prev":this.currentIndex-1===e,"p-dock-item-current":this.currentIndex===e,"p-dock-item-next":this.currentIndex+1===e,"p-dock-item-second-next":this.currentIndex+2===e}]},linkClass(e,t){return["p-dock-action",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},directives:{ripple:e}};const m={class:"p-dock-list-container"};p.render=function(e,p,k,u,f,b){const x=t("router-link"),h=n("ripple"),y=n("tooltip");return i(),o("div",m,[l("ul",{ref:"list",class:"p-dock-list",role:"menu",onMouseleave:p[1]||(p[1]=(...e)=>b.onListMouseLeave&&b.onListMouseLeave(...e))},[(i(!0),o(s,null,r(k.model,((e,t)=>(i(),o("li",{class:b.itemClass(t),key:t,role:"none",onMouseenter:e=>b.onItemMouseEnter(t)},[k.templates.item?(i(),o(d(k.templates.item),{key:1,item:e},null,8,["item"])):(i(),o(s,{key:0},[e.to&&!b.disabled(e)?(i(),o(x,{key:0,to:e.to,custom:""},{default:c((({navigate:t,href:n,isActive:s,isExactActive:r})=>[a(l("a",{href:n,role:"menuitem",class:b.linkClass(e,{isActive:s,isExactActive:r}),target:e.target,onClick:n=>b.onItemClick(n,e,t)},[k.templates.icon?(i(),o(d(k.templates.icon),{key:1,item:e},null,8,["item"])):a((i(),o("span",{key:0,class:["p-dock-action-icon",e.icon]},null,2)),[[h]])],10,["href","target","onClick"]),[[y,{value:e.label,disabled:!k.tooltipOptions},k.tooltipOptions]])])),_:2},1032,["to"])):a((i(),o("a",{key:1,href:e.url,role:"menuitem",class:b.linkClass(e),target:e.target,onClick:t=>b.onItemClick(t,e),tabindex:b.disabled(e)?null:"0"},[k.templates.icon?(i(),o(d(k.templates.icon),{key:1,item:e},null,8,["item"])):a((i(),o("span",{key:0,class:["p-dock-action-icon",e.icon]},null,2)),[[h]])],10,["href","target","onClick","tabindex"])),[[y,{value:e.label,disabled:!k.tooltipOptions},k.tooltipOptions]])],64))],42,["onMouseenter"])))),128))],544)])};var k={name:"Dock",props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,exact:{type:Boolean,default:!0}},computed:{containerClass(){return["p-dock p-component",`p-dock-${this.position}`,this.class]}},components:{DockSub:p}};!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-dock {\n position: absolute;\n z-index: 1;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n pointer-events: none;\n}\n.p-dock-list-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n pointer-events: auto;\n}\n.p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-dock-item {\n -webkit-transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n}\n.p-dock-action {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n}\n.p-dock-item-second-prev,\n.p-dock-item-second-next {\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n}\n.p-dock-item-prev,\n.p-dock-item-next {\n -webkit-transform: scale(1.4);\n transform: scale(1.4);\n}\n.p-dock-item-current {\n -webkit-transform: scale(1.6);\n transform: scale(1.6);\n z-index: 1;\n}\n\n/* Position */\n/* top */\n.p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n}\n.p-dock-top .p-dock-item {\n -webkit-transform-origin: center top;\n transform-origin: center top;\n}\n\n/* bottom */\n.p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.p-dock-bottom .p-dock-item {\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n}\n\n/* right */\n.p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n}\n.p-dock-right .p-dock-item {\n -webkit-transform-origin: center right;\n transform-origin: center right;\n}\n.p-dock-right .p-dock-list {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n/* left */\n.p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n}\n.p-dock-left .p-dock-item {\n -webkit-transform-origin: center left;\n transform-origin: center left;\n}\n.p-dock-left .p-dock-list {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n"),k.render=function(e,n,s,r,c,a){const d=t("DockSub");return i(),o("div",{class:a.containerClass,style:s.style},[l(d,{model:s.model,templates:e.$slots,exact:s.exact,tooltipOptions:s.tooltipOptions},null,8,["model","templates","exact","tooltipOptions"])],6)};export default k;
|
package/dock/dock.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.dock = (function (vue) {
|
|
2
|
+
this.primevue.dock = (function (Ripple, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
8
|
+
|
|
5
9
|
var script$1 = {
|
|
6
10
|
name: 'DockSub',
|
|
7
11
|
props: {
|
|
@@ -9,8 +13,8 @@ this.primevue.dock = (function (vue) {
|
|
|
9
13
|
type: Array,
|
|
10
14
|
default: null
|
|
11
15
|
},
|
|
12
|
-
|
|
13
|
-
type:
|
|
16
|
+
templates: {
|
|
17
|
+
type: null,
|
|
14
18
|
default: null
|
|
15
19
|
},
|
|
16
20
|
exact: {
|
|
@@ -67,6 +71,9 @@ this.primevue.dock = (function (vue) {
|
|
|
67
71
|
disabled(item) {
|
|
68
72
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
69
73
|
}
|
|
74
|
+
},
|
|
75
|
+
directives: {
|
|
76
|
+
'ripple': Ripple__default['default']
|
|
70
77
|
}
|
|
71
78
|
};
|
|
72
79
|
|
|
@@ -91,7 +98,7 @@ this.primevue.dock = (function (vue) {
|
|
|
91
98
|
role: "none",
|
|
92
99
|
onMouseenter: $event => ($options.onItemMouseEnter(index))
|
|
93
100
|
}, [
|
|
94
|
-
(!$props.
|
|
101
|
+
(!$props.templates['item'])
|
|
95
102
|
? (vue.openBlock(), vue.createBlock(vue.Fragment, { key: 0 }, [
|
|
96
103
|
(item.to && !$options.disabled(item))
|
|
97
104
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
@@ -107,14 +114,17 @@ this.primevue.dock = (function (vue) {
|
|
|
107
114
|
target: item.target,
|
|
108
115
|
onClick: $event => ($options.onItemClick($event, item, navigate))
|
|
109
116
|
}, [
|
|
110
|
-
(
|
|
117
|
+
(!$props.templates['icon'])
|
|
111
118
|
? vue.withDirectives((vue.openBlock(), vue.createBlock("span", {
|
|
112
119
|
key: 0,
|
|
113
120
|
class: ['p-dock-action-icon', item.icon]
|
|
114
121
|
}, null, 2)), [
|
|
115
122
|
[_directive_ripple]
|
|
116
123
|
])
|
|
117
|
-
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(
|
|
124
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['icon']), {
|
|
125
|
+
key: 1,
|
|
126
|
+
item: item
|
|
127
|
+
}, null, 8, ["item"]))
|
|
118
128
|
], 10, ["href", "target", "onClick"]), [
|
|
119
129
|
[_directive_tooltip, {value: item.label, disabled: !$props.tooltipOptions}, $props.tooltipOptions]
|
|
120
130
|
])
|
|
@@ -130,19 +140,22 @@ this.primevue.dock = (function (vue) {
|
|
|
130
140
|
onClick: $event => ($options.onItemClick($event, item)),
|
|
131
141
|
tabindex: $options.disabled(item) ? null : '0'
|
|
132
142
|
}, [
|
|
133
|
-
(
|
|
143
|
+
(!$props.templates['icon'])
|
|
134
144
|
? vue.withDirectives((vue.openBlock(), vue.createBlock("span", {
|
|
135
145
|
key: 0,
|
|
136
146
|
class: ['p-dock-action-icon', item.icon]
|
|
137
147
|
}, null, 2)), [
|
|
138
148
|
[_directive_ripple]
|
|
139
149
|
])
|
|
140
|
-
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(
|
|
150
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['icon']), {
|
|
151
|
+
key: 1,
|
|
152
|
+
item: item
|
|
153
|
+
}, null, 8, ["item"]))
|
|
141
154
|
], 10, ["href", "target", "onClick", "tabindex"])), [
|
|
142
155
|
[_directive_tooltip, {value: item.label, disabled: !$props.tooltipOptions}, $props.tooltipOptions]
|
|
143
156
|
])
|
|
144
157
|
], 64))
|
|
145
|
-
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.
|
|
158
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['item']), {
|
|
146
159
|
key: 1,
|
|
147
160
|
item: item
|
|
148
161
|
}, null, 8, ["item"]))
|
|
@@ -189,10 +202,10 @@ this.primevue.dock = (function (vue) {
|
|
|
189
202
|
}, [
|
|
190
203
|
vue.createVNode(_component_DockSub, {
|
|
191
204
|
model: $props.model,
|
|
192
|
-
|
|
205
|
+
templates: _ctx.$slots,
|
|
193
206
|
exact: $props.exact,
|
|
194
207
|
tooltipOptions: $props.tooltipOptions
|
|
195
|
-
}, null, 8, ["model", "
|
|
208
|
+
}, null, 8, ["model", "templates", "exact", "tooltipOptions"])
|
|
196
209
|
], 6))
|
|
197
210
|
}
|
|
198
211
|
|
|
@@ -230,4 +243,4 @@ this.primevue.dock = (function (vue) {
|
|
|
230
243
|
|
|
231
244
|
return script;
|
|
232
245
|
|
|
233
|
-
}(Vue));
|
|
246
|
+
}(primevue.ripple, Vue));
|
package/dock/dock.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dock=function(e){"use strict";var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dock=function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o={name:"DockSub",props:{model:{type:Array,default:null},templates:{type:null,default:null},exact:{type:Boolean,default:!0},tooltipOptions:null},data:()=>({currentIndex:-3}),methods:{onListMouseLeave(){this.currentIndex=-3},onItemMouseEnter(e){this.currentIndex=e},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},itemClass(e){return["p-dock-item",{"p-dock-item-second-prev":this.currentIndex-2===e,"p-dock-item-prev":this.currentIndex-1===e,"p-dock-item-current":this.currentIndex===e,"p-dock-item-next":this.currentIndex+1===e,"p-dock-item-second-next":this.currentIndex+2===e}]},linkClass(e,t){return["p-dock-action",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},directives:{ripple:n(e).default}};const i={class:"p-dock-list-container"};o.render=function(e,n,o,l,c,r){const s=t.resolveComponent("router-link"),a=t.resolveDirective("ripple"),p=t.resolveDirective("tooltip");return t.openBlock(),t.createBlock("div",i,[t.createVNode("ul",{ref:"list",class:"p-dock-list",role:"menu",onMouseleave:n[1]||(n[1]=(...e)=>r.onListMouseLeave&&r.onListMouseLeave(...e))},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(o.model,((e,n)=>(t.openBlock(),t.createBlock("li",{class:r.itemClass(n),key:n,role:"none",onMouseenter:e=>r.onItemMouseEnter(n)},[o.templates.item?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.templates.item),{key:1,item:e},null,8,["item"])):(t.openBlock(),t.createBlock(t.Fragment,{key:0},[e.to&&!r.disabled(e)?(t.openBlock(),t.createBlock(s,{key:0,to:e.to,custom:""},{default:t.withCtx((({navigate:n,href:i,isActive:l,isExactActive:c})=>[t.withDirectives(t.createVNode("a",{href:i,role:"menuitem",class:r.linkClass(e,{isActive:l,isExactActive:c}),target:e.target,onClick:t=>r.onItemClick(t,e,n)},[o.templates.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.templates.icon),{key:1,item:e},null,8,["item"])):t.withDirectives((t.openBlock(),t.createBlock("span",{key:0,class:["p-dock-action-icon",e.icon]},null,2)),[[a]])],10,["href","target","onClick"]),[[p,{value:e.label,disabled:!o.tooltipOptions},o.tooltipOptions]])])),_:2},1032,["to"])):t.withDirectives((t.openBlock(),t.createBlock("a",{key:1,href:e.url,role:"menuitem",class:r.linkClass(e),target:e.target,onClick:t=>r.onItemClick(t,e),tabindex:r.disabled(e)?null:"0"},[o.templates.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.templates.icon),{key:1,item:e},null,8,["item"])):t.withDirectives((t.openBlock(),t.createBlock("span",{key:0,class:["p-dock-action-icon",e.icon]},null,2)),[[a]])],10,["href","target","onClick","tabindex"])),[[p,{value:e.label,disabled:!o.tooltipOptions},o.tooltipOptions]])],64))],42,["onMouseenter"])))),128))],544)])};var l={name:"Dock",props:{position:{type:String,default:"bottom"},model:null,class:null,style:null,tooltipOptions:null,exact:{type:Boolean,default:!0}},computed:{containerClass(){return["p-dock p-component",`p-dock-${this.position}`,this.class]}},components:{DockSub:o}};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-dock {\n position: absolute;\n z-index: 1;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n pointer-events: none;\n}\n.p-dock-list-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n pointer-events: auto;\n}\n.p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-dock-item {\n -webkit-transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n}\n.p-dock-action {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n}\n.p-dock-item-second-prev,\n.p-dock-item-second-next {\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n}\n.p-dock-item-prev,\n.p-dock-item-next {\n -webkit-transform: scale(1.4);\n transform: scale(1.4);\n}\n.p-dock-item-current {\n -webkit-transform: scale(1.6);\n transform: scale(1.6);\n z-index: 1;\n}\n\n/* Position */\n/* top */\n.p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n}\n.p-dock-top .p-dock-item {\n -webkit-transform-origin: center top;\n transform-origin: center top;\n}\n\n/* bottom */\n.p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.p-dock-bottom .p-dock-item {\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n}\n\n/* right */\n.p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n}\n.p-dock-right .p-dock-item {\n -webkit-transform-origin: center right;\n transform-origin: center right;\n}\n.p-dock-right .p-dock-list {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n/* left */\n.p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n}\n.p-dock-left .p-dock-item {\n -webkit-transform-origin: center left;\n transform-origin: center left;\n}\n.p-dock-left .p-dock-list {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n"),l.render=function(e,n,o,i,l,c){const r=t.resolveComponent("DockSub");return t.openBlock(),t.createBlock("div",{class:c.containerClass,style:o.style},[t.createVNode(r,{model:o.model,templates:e.$slots,exact:o.exact,tooltipOptions:o.tooltipOptions},null,8,["model","templates","exact","tooltipOptions"])],6)},l}(primevue.ripple,Vue);
|
package/inplace/Inplace.d.ts
CHANGED
package/inplace/Inplace.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="containerClass">
|
|
3
|
-
<div class="
|
|
3
|
+
<div :class="displayClass" :tabindex="$attrs.tabindex||'0'" v-if="!d_active" @click="open" @keydown.enter="open">
|
|
4
4
|
<slot name="display"></slot>
|
|
5
5
|
</div>
|
|
6
6
|
<div class="p-inplace-content" v-else>
|
|
@@ -24,6 +24,10 @@ export default {
|
|
|
24
24
|
active: {
|
|
25
25
|
type: Boolean,
|
|
26
26
|
default: false
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
33
|
watch: {
|
|
@@ -38,6 +42,10 @@ export default {
|
|
|
38
42
|
},
|
|
39
43
|
methods: {
|
|
40
44
|
open(event) {
|
|
45
|
+
if (this.disabled) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
41
49
|
this.$emit('open', event);
|
|
42
50
|
this.d_active = true;
|
|
43
51
|
this.$emit('update:active', true);
|
|
@@ -51,6 +59,9 @@ export default {
|
|
|
51
59
|
computed: {
|
|
52
60
|
containerClass() {
|
|
53
61
|
return ['p-inplace p-component', {'p-inplace-closable': this.closable}];
|
|
62
|
+
},
|
|
63
|
+
displayClass() {
|
|
64
|
+
return ['p-inplace-display', {'p-disabled': this.disabled}];
|
|
54
65
|
}
|
|
55
66
|
},
|
|
56
67
|
components: {
|
package/inplace/inplace.cjs.js
CHANGED
|
@@ -18,6 +18,10 @@ var script = {
|
|
|
18
18
|
active: {
|
|
19
19
|
type: Boolean,
|
|
20
20
|
default: false
|
|
21
|
+
},
|
|
22
|
+
disabled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
watch: {
|
|
@@ -32,6 +36,10 @@ var script = {
|
|
|
32
36
|
},
|
|
33
37
|
methods: {
|
|
34
38
|
open(event) {
|
|
39
|
+
if (this.disabled) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
35
43
|
this.$emit('open', event);
|
|
36
44
|
this.d_active = true;
|
|
37
45
|
this.$emit('update:active', true);
|
|
@@ -45,6 +53,9 @@ var script = {
|
|
|
45
53
|
computed: {
|
|
46
54
|
containerClass() {
|
|
47
55
|
return ['p-inplace p-component', {'p-inplace-closable': this.closable}];
|
|
56
|
+
},
|
|
57
|
+
displayClass() {
|
|
58
|
+
return ['p-inplace-display', {'p-disabled': this.disabled}];
|
|
48
59
|
}
|
|
49
60
|
},
|
|
50
61
|
components: {
|
|
@@ -64,13 +75,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
64
75
|
(!$data.d_active)
|
|
65
76
|
? (vue.openBlock(), vue.createBlock("div", {
|
|
66
77
|
key: 0,
|
|
67
|
-
class:
|
|
78
|
+
class: $options.displayClass,
|
|
68
79
|
tabindex: _ctx.$attrs.tabindex||'0',
|
|
69
80
|
onClick: _cache[1] || (_cache[1] = (...args) => ($options.open && $options.open(...args))),
|
|
70
81
|
onKeydown: _cache[2] || (_cache[2] = vue.withKeys((...args) => ($options.open && $options.open(...args)), ["enter"]))
|
|
71
82
|
}, [
|
|
72
83
|
vue.renderSlot(_ctx.$slots, "display")
|
|
73
|
-
],
|
|
84
|
+
], 42, ["tabindex"]))
|
|
74
85
|
: (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
|
|
75
86
|
vue.renderSlot(_ctx.$slots, "content"),
|
|
76
87
|
($props.closable)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/button"),t=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"Inplace",emits:["open","close","update:active"],props:{closable:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},watch:{active(e){this.d_active=e}},data(){return{d_active:this.active}},methods:{open(e){this.$emit("open",e),this.d_active=!0,this.$emit("update:active",!0)},close(e){this.$emit("close",e),this.d_active=!1,this.$emit("update:active",!1)}},computed:{containerClass(){return["p-inplace p-component",{"p-inplace-closable":this.closable}]}},components:{IPButton:n(e).default}};const
|
|
1
|
+
"use strict";var e=require("primevue/button"),t=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"Inplace",emits:["open","close","update:active"],props:{closable:{type:Boolean,default:!1},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},watch:{active(e){this.d_active=e}},data(){return{d_active:this.active}},methods:{open(e){this.disabled||(this.$emit("open",e),this.d_active=!0,this.$emit("update:active",!0))},close(e){this.$emit("close",e),this.d_active=!1,this.$emit("update:active",!1)}},computed:{containerClass(){return["p-inplace p-component",{"p-inplace-closable":this.closable}]},displayClass(){return["p-inplace-display",{"p-disabled":this.disabled}]}},components:{IPButton:n(e).default}};const l={key:1,class:"p-inplace-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-inplace .p-inplace-display {\n display: inline;\n cursor: pointer;\n}\n.p-inplace .p-inplace-content {\n display: inline;\n}\n.p-fluid .p-inplace.p-inplace-closable .p-inplace-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-fluid .p-inplace.p-inplace-closable .p-inplace-content > .p-inputtext {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n}\n"),i.render=function(e,n,i,a,o,c){const p=t.resolveComponent("IPButton");return t.openBlock(),t.createBlock("div",{class:c.containerClass},[o.d_active?(t.openBlock(),t.createBlock("div",l,[t.renderSlot(e.$slots,"content"),i.closable?(t.openBlock(),t.createBlock(p,{key:0,icon:"pi pi-times",onClick:c.close},null,8,["onClick"])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock("div",{key:0,class:c.displayClass,tabindex:e.$attrs.tabindex||"0",onClick:n[1]||(n[1]=(...e)=>c.open&&c.open(...e)),onKeydown:n[2]||(n[2]=t.withKeys(((...e)=>c.open&&c.open(...e)),["enter"]))},[t.renderSlot(e.$slots,"display")],42,["tabindex"]))],2)},module.exports=i;
|