primevue 3.7.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/autocomplete/AutoComplete.d.ts +1 -0
- package/autocomplete/AutoComplete.vue +8 -1
- package/autocomplete/autocomplete.cjs.js +8 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +8 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +8 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/BlockUI.vue +1 -1
- package/blockui/blockui.cjs.js +1 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +1 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +1 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.vue +4 -0
- package/breadcrumb/breadcrumb.cjs.js +1 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +1 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/confirmationservice/ConfirmationService.d.ts +3 -2
- package/core/core.js +7574 -0
- package/core/core.min.js +47 -0
- package/datatable/BodyCell.vue +36 -17
- package/datatable/ColumnFilter.vue +3 -3
- package/datatable/DataTable.d.ts +1 -1
- package/datatable/DataTable.vue +109 -69
- package/datatable/FooterCell.vue +2 -2
- package/datatable/HeaderCell.vue +2 -2
- package/datatable/TableBody.vue +10 -5
- package/datatable/TableFooter.vue +2 -1
- package/datatable/TableHeader.vue +3 -2
- package/datatable/datatable.cjs.js +192 -122
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +192 -122
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +192 -122
- 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/dropdown/Dropdown.vue +9 -8
- package/dropdown/dropdown.cjs.js +13 -11
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +13 -11
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +13 -11
- package/dropdown/dropdown.min.js +1 -1
- package/galleria/Galleria.vue +1 -0
- package/galleria/GalleriaContent.vue +10 -1
- package/galleria/galleria.cjs.js +11 -2
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +11 -2
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +11 -2
- package/galleria/galleria.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/inputnumber/InputNumber.d.ts +2 -0
- package/inputnumber/InputNumber.vue +84 -35
- package/inputnumber/inputnumber.cjs.js +84 -35
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +84 -35
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +84 -35
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.vue +6 -3
- package/inputswitch/inputswitch.cjs.js +6 -3
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +6 -3
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +6 -3
- package/inputswitch/inputswitch.min.js +1 -1
- package/knob/Knob.vue +1 -1
- package/knob/knob.cjs.js +1 -1
- package/knob/knob.esm.js +1 -1
- package/knob/knob.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +2 -0
- package/overlaypanel/OverlayPanel.vue +4 -1
- package/overlaypanel/overlaypanel.cjs.js +7 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +7 -3
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +7 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/CurrentPageReport.vue +5 -1
- package/paginator/JumpToPageInput.vue +1 -1
- package/paginator/Paginator.vue +6 -3
- package/paginator/paginator.cjs.js +12 -4
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +12 -4
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +12 -4
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/PanelMenuSub.vue +4 -4
- package/panelmenu/panelmenu.cjs.js +4 -4
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +4 -4
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +4 -4
- package/panelmenu/panelmenu.min.js +1 -1
- package/resources/primevue.css +3 -0
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +6 -1
- package/resources/themes/arya-green/theme.css +6 -1
- package/resources/themes/arya-orange/theme.css +6 -1
- package/resources/themes/arya-purple/theme.css +6 -1
- package/resources/themes/bootstrap4-dark-blue/theme.css +6 -1
- package/resources/themes/bootstrap4-dark-purple/theme.css +6 -1
- package/resources/themes/bootstrap4-light-blue/theme.css +6 -1
- package/resources/themes/bootstrap4-light-purple/theme.css +6 -1
- package/resources/themes/fluent-light/theme.css +6 -1
- package/resources/themes/luna-amber/theme.css +6 -1
- package/resources/themes/luna-blue/theme.css +6 -1
- package/resources/themes/luna-green/theme.css +6 -1
- package/resources/themes/luna-pink/theme.css +6 -1
- package/resources/themes/md-dark-deeppurple/theme.css +6 -1
- package/resources/themes/md-dark-indigo/theme.css +6 -1
- package/resources/themes/md-light-deeppurple/theme.css +6 -1
- package/resources/themes/md-light-indigo/theme.css +6 -1
- package/resources/themes/mdc-dark-deeppurple/theme.css +6 -1
- package/resources/themes/mdc-dark-indigo/theme.css +6 -1
- package/resources/themes/mdc-light-deeppurple/theme.css +6 -1
- package/resources/themes/mdc-light-indigo/theme.css +6 -1
- package/resources/themes/nova/theme.css +6 -1
- package/resources/themes/nova-accent/theme.css +6 -1
- package/resources/themes/nova-alt/theme.css +6 -1
- package/resources/themes/nova-vue/theme.css +6 -1
- package/resources/themes/rhea/theme.css +6 -1
- package/resources/themes/saga-blue/theme.css +6 -1
- package/resources/themes/saga-green/theme.css +6 -1
- package/resources/themes/saga-orange/theme.css +6 -1
- package/resources/themes/saga-purple/theme.css +6 -1
- package/resources/themes/tailwind-light/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Light.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/tailwind-light/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/tailwind-light/theme.css +5440 -0
- package/resources/themes/vela-blue/theme.css +6 -1
- package/resources/themes/vela-green/theme.css +6 -1
- package/resources/themes/vela-orange/theme.css +6 -1
- package/resources/themes/vela-purple/theme.css +6 -1
- package/speeddial/SpeedDial.vue +2 -1
- package/speeddial/speeddial.cjs.js +2 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitter/Splitter.vue +5 -3
- package/splitter/splitter.cjs.js +4 -2
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +5 -3
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +4 -2
- package/splitter/splitter.min.js +1 -1
- package/tabmenu/TabMenu.vue +4 -0
- package/tabmenu/tabmenu.cjs.js +1 -1
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +1 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +1 -1
- package/tabmenu/tabmenu.min.js +1 -1
- package/terminal/terminal.js +1 -1
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/TieredMenuSub.vue +1 -1
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toastservice/ToastService.d.ts +3 -2
- package/tooltip/tooltip.cjs.js +10 -3
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +10 -3
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +10 -3
- package/tooltip/tooltip.min.js +1 -1
- package/treetable/BodyCell.vue +2 -3
- package/treetable/FooterCell.vue +2 -2
- package/treetable/HeaderCell.vue +2 -2
- package/treetable/TreeTable.vue +2 -2
- package/treetable/TreeTableRow.vue +2 -2
- package/treetable/treetable.cjs.js +6 -6
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +7 -7
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +6 -6
- package/treetable/treetable.min.js +1 -1
- package/utils/Utils.d.ts +80 -0
- package/utils/package.json +3 -2
- package/utils/utils.cjs.js +126 -108
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +126 -108
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +126 -108
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +12 -0
- package/vetur-tags.json +4 -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 +88 -5
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/dropdown/Dropdown.vue
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<slot name="header" :value="modelValue" :options="visibleOptions"></slot>
|
|
22
22
|
<div class="p-dropdown-header" v-if="filter">
|
|
23
23
|
<div class="p-dropdown-filter-container">
|
|
24
|
-
<input type="text" ref="filterInput" v-model="filterValue" autoComplete="off" class="p-dropdown-filter p-inputtext p-component" :placeholder="filterPlaceholder" @keydown="onFilterKeyDown" @input="onFilterChange"/>
|
|
24
|
+
<input type="text" ref="filterInput" v-model="filterValue" @vnode-updated="onFilterUpdated" autoComplete="off" class="p-dropdown-filter p-inputtext p-component" :placeholder="filterPlaceholder" @keydown="onFilterKeyDown" @input="onFilterChange"/>
|
|
25
25
|
<span class="p-dropdown-filter-icon pi pi-search"></span>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
@@ -206,20 +206,20 @@ export default {
|
|
|
206
206
|
},
|
|
207
207
|
getSelectedOption() {
|
|
208
208
|
let index = this.getSelectedOptionIndex();
|
|
209
|
-
return index !== -1 ? (this.optionGroupLabel ? this.getOptionGroupChildren(this.
|
|
209
|
+
return index !== -1 ? (this.optionGroupLabel ? this.getOptionGroupChildren(this.visibleOptions[index.group])[index.option]: this.visibleOptions[index]) : null;
|
|
210
210
|
},
|
|
211
211
|
getSelectedOptionIndex() {
|
|
212
|
-
if (this.modelValue != null && this.
|
|
212
|
+
if (this.modelValue != null && this.visibleOptions) {
|
|
213
213
|
if (this.optionGroupLabel) {
|
|
214
|
-
for (let i = 0; i < this.
|
|
215
|
-
let selectedOptionIndex = this.findOptionIndexInList(this.modelValue, this.getOptionGroupChildren(this.
|
|
214
|
+
for (let i = 0; i < this.visibleOptions.length; i++) {
|
|
215
|
+
let selectedOptionIndex = this.findOptionIndexInList(this.modelValue, this.getOptionGroupChildren(this.visibleOptions[i]));
|
|
216
216
|
if (selectedOptionIndex !== -1) {
|
|
217
217
|
return {group: i, option: selectedOptionIndex};
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
else {
|
|
222
|
-
return this.findOptionIndexInList(this.modelValue, this.
|
|
222
|
+
return this.findOptionIndexInList(this.modelValue, this.visibleOptions);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
@@ -436,7 +436,6 @@ export default {
|
|
|
436
436
|
},
|
|
437
437
|
onOverlayEnter(el) {
|
|
438
438
|
ZIndexUtils.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
439
|
-
this.scrollValueInView();
|
|
440
439
|
this.alignOverlay();
|
|
441
440
|
this.bindOutsideClickListener();
|
|
442
441
|
this.bindScrollListener();
|
|
@@ -609,6 +608,8 @@ export default {
|
|
|
609
608
|
},
|
|
610
609
|
onFilterChange(event) {
|
|
611
610
|
this.$emit('filter', {originalEvent: event, value: event.target.value});
|
|
611
|
+
},
|
|
612
|
+
onFilterUpdated() {
|
|
612
613
|
if (this.overlayVisible) {
|
|
613
614
|
this.alignOverlay();
|
|
614
615
|
}
|
|
@@ -653,7 +654,7 @@ export default {
|
|
|
653
654
|
return filteredGroups
|
|
654
655
|
}
|
|
655
656
|
else {
|
|
656
|
-
return FilterService.filter(this.options, this.searchFields, this.filterValue,
|
|
657
|
+
return FilterService.filter(this.options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
657
658
|
}
|
|
658
659
|
}
|
|
659
660
|
else {
|
package/dropdown/dropdown.cjs.js
CHANGED
|
@@ -146,20 +146,20 @@ var script = {
|
|
|
146
146
|
},
|
|
147
147
|
getSelectedOption() {
|
|
148
148
|
let index = this.getSelectedOptionIndex();
|
|
149
|
-
return index !== -1 ? (this.optionGroupLabel ? this.getOptionGroupChildren(this.
|
|
149
|
+
return index !== -1 ? (this.optionGroupLabel ? this.getOptionGroupChildren(this.visibleOptions[index.group])[index.option]: this.visibleOptions[index]) : null;
|
|
150
150
|
},
|
|
151
151
|
getSelectedOptionIndex() {
|
|
152
|
-
if (this.modelValue != null && this.
|
|
152
|
+
if (this.modelValue != null && this.visibleOptions) {
|
|
153
153
|
if (this.optionGroupLabel) {
|
|
154
|
-
for (let i = 0; i < this.
|
|
155
|
-
let selectedOptionIndex = this.findOptionIndexInList(this.modelValue, this.getOptionGroupChildren(this.
|
|
154
|
+
for (let i = 0; i < this.visibleOptions.length; i++) {
|
|
155
|
+
let selectedOptionIndex = this.findOptionIndexInList(this.modelValue, this.getOptionGroupChildren(this.visibleOptions[i]));
|
|
156
156
|
if (selectedOptionIndex !== -1) {
|
|
157
157
|
return {group: i, option: selectedOptionIndex};
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
else {
|
|
162
|
-
return this.findOptionIndexInList(this.modelValue, this.
|
|
162
|
+
return this.findOptionIndexInList(this.modelValue, this.visibleOptions);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -373,7 +373,6 @@ var script = {
|
|
|
373
373
|
},
|
|
374
374
|
onOverlayEnter(el) {
|
|
375
375
|
utils.ZIndexUtils.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
376
|
-
this.scrollValueInView();
|
|
377
376
|
this.alignOverlay();
|
|
378
377
|
this.bindOutsideClickListener();
|
|
379
378
|
this.bindScrollListener();
|
|
@@ -546,6 +545,8 @@ var script = {
|
|
|
546
545
|
},
|
|
547
546
|
onFilterChange(event) {
|
|
548
547
|
this.$emit('filter', {originalEvent: event, value: event.target.value});
|
|
548
|
+
},
|
|
549
|
+
onFilterUpdated() {
|
|
549
550
|
if (this.overlayVisible) {
|
|
550
551
|
this.alignOverlay();
|
|
551
552
|
}
|
|
@@ -590,7 +591,7 @@ var script = {
|
|
|
590
591
|
return filteredGroups
|
|
591
592
|
}
|
|
592
593
|
else {
|
|
593
|
-
return api.FilterService.filter(this.options, this.searchFields, this.filterValue,
|
|
594
|
+
return api.FilterService.filter(this.options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
594
595
|
}
|
|
595
596
|
}
|
|
596
597
|
else {
|
|
@@ -695,7 +696,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
695
696
|
return (vue.openBlock(), vue.createBlock("div", {
|
|
696
697
|
ref: "container",
|
|
697
698
|
class: $options.containerClass,
|
|
698
|
-
onClick: _cache[
|
|
699
|
+
onClick: _cache[13] || (_cache[13] = $event => ($options.onClick($event)))
|
|
699
700
|
}, [
|
|
700
701
|
vue.createVNode("div", _hoisted_1, [
|
|
701
702
|
vue.createVNode("input", {
|
|
@@ -774,7 +775,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
774
775
|
key: 0,
|
|
775
776
|
ref: $options.overlayRef,
|
|
776
777
|
class: $options.panelStyleClass,
|
|
777
|
-
onClick: _cache[
|
|
778
|
+
onClick: _cache[12] || (_cache[12] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
|
|
778
779
|
}, [
|
|
779
780
|
vue.renderSlot(_ctx.$slots, "header", {
|
|
780
781
|
value: $props.modelValue,
|
|
@@ -787,11 +788,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
787
788
|
type: "text",
|
|
788
789
|
ref: "filterInput",
|
|
789
790
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ($data.filterValue = $event)),
|
|
791
|
+
onVnodeUpdated: _cache[9] || (_cache[9] = (...args) => ($options.onFilterUpdated && $options.onFilterUpdated(...args))),
|
|
790
792
|
autoComplete: "off",
|
|
791
793
|
class: "p-dropdown-filter p-inputtext p-component",
|
|
792
794
|
placeholder: $props.filterPlaceholder,
|
|
793
|
-
onKeydown: _cache[
|
|
794
|
-
onInput: _cache[
|
|
795
|
+
onKeydown: _cache[10] || (_cache[10] = (...args) => ($options.onFilterKeyDown && $options.onFilterKeyDown(...args))),
|
|
796
|
+
onInput: _cache[11] || (_cache[11] = (...args) => ($options.onFilterChange && $options.onFilterChange(...args)))
|
|
795
797
|
}, null, 40, ["placeholder"]), [
|
|
796
798
|
[vue.vModelText, $data.filterValue]
|
|
797
799
|
]),
|