primevue 3.40.0 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -20
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +1 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +1 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/baseicon/BaseIcon.vue +3 -0
- package/baseicon/baseicon.cjs.js +4 -0
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +3 -0
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +5 -2
- package/baseicon/baseicon.min.js +1 -1
- package/breadcrumb/BreadcrumbItem.vue +1 -1
- 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/calendar/BaseCalendar.vue +4 -0
- package/calendar/Calendar.d.ts +6 -1
- package/calendar/Calendar.vue +9 -1
- package/calendar/calendar.cjs.js +54 -43
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +54 -43
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +54 -43
- package/calendar/calendar.min.js +1 -1
- package/calendar/style/calendarstyle.cjs.js +1 -0
- package/calendar/style/calendarstyle.cjs.min.js +1 -1
- package/calendar/style/calendarstyle.esm.js +1 -0
- package/calendar/style/calendarstyle.esm.min.js +1 -1
- package/calendar/style/calendarstyle.js +1 -0
- package/calendar/style/calendarstyle.min.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +5 -1
- package/confirmdialog/ConfirmDialog.d.ts +2 -2
- package/core/core.js +65 -50
- package/core/core.min.js +17 -17
- package/datatable/DataTable.vue +3 -2
- package/datatable/datatable.cjs.js +3 -2
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +3 -2
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +3 -2
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +9 -19
- package/dataview/DataView.vue +11 -10
- package/dataview/dataview.cjs.js +18 -18
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +19 -19
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +18 -18
- package/dataview/dataview.min.js +1 -1
- package/dataview/style/dataviewstyle.cjs.js +0 -2
- package/dataview/style/dataviewstyle.cjs.min.js +1 -1
- package/dataview/style/dataviewstyle.esm.js +0 -2
- package/dataview/style/dataviewstyle.esm.min.js +1 -1
- package/dataview/style/dataviewstyle.js +0 -2
- package/dataview/style/dataviewstyle.min.js +1 -1
- package/dialog/Dialog.d.ts +2 -2
- package/dialog/Dialog.vue +4 -4
- package/dialog/dialog.cjs.js +6 -6
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +6 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -6
- package/dialog/dialog.min.js +1 -1
- package/dialog/style/dialogstyle.cjs.js +2 -2
- package/dialog/style/dialogstyle.cjs.min.js +1 -1
- package/dialog/style/dialogstyle.esm.js +2 -2
- package/dialog/style/dialogstyle.esm.min.js +1 -1
- package/dialog/style/dialogstyle.js +2 -2
- package/dialog/style/dialogstyle.min.js +1 -1
- package/dock/BaseDock.vue +4 -0
- package/dock/Dock.d.ts +5 -0
- package/dock/Dock.vue +14 -0
- package/dock/dock.cjs.js +17 -0
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +17 -0
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +17 -0
- package/dock/dock.min.js +1 -1
- package/dock/style/dockstyle.cjs.js +5 -2
- package/dock/style/dockstyle.cjs.min.js +1 -1
- package/dock/style/dockstyle.esm.js +5 -2
- package/dock/style/dockstyle.esm.min.js +1 -1
- package/dock/style/dockstyle.js +5 -2
- package/dock/style/dockstyle.min.js +1 -1
- package/fileupload/FileContent.vue +1 -1
- package/fileupload/FileUpload.vue +1 -1
- package/fileupload/fileupload.cjs.js +2 -2
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +2 -2
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +2 -2
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/focustrap.cjs.js +1 -1
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +1 -1
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +1 -1
- package/focustrap/focustrap.min.js +1 -1
- package/inputgroupaddon/package.json +1 -1
- package/inputnumber/style/inputnumberstyle.cjs.js +1 -1
- package/inputnumber/style/inputnumberstyle.cjs.min.js +1 -1
- package/inputnumber/style/inputnumberstyle.esm.js +1 -1
- package/inputnumber/style/inputnumberstyle.esm.min.js +1 -1
- package/inputnumber/style/inputnumberstyle.js +1 -1
- package/inputnumber/style/inputnumberstyle.min.js +1 -1
- package/megamenu/BaseMegaMenu.vue +4 -0
- package/megamenu/MegaMenu.d.ts +9 -0
- package/megamenu/MegaMenu.vue +74 -6
- package/megamenu/MegaMenuSub.vue +6 -1
- package/megamenu/megamenu.cjs.js +118 -35
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +119 -37
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +119 -37
- package/megamenu/megamenu.min.js +1 -1
- package/megamenu/style/megamenustyle.cjs.js +22 -17
- package/megamenu/style/megamenustyle.cjs.min.js +1 -1
- package/megamenu/style/megamenustyle.esm.js +22 -17
- package/megamenu/style/megamenustyle.esm.min.js +1 -1
- package/megamenu/style/megamenustyle.js +22 -17
- package/megamenu/style/megamenustyle.min.js +1 -1
- package/menu/Menu.d.ts +1 -1
- package/menu/Menuitem.vue +0 -1
- package/menubar/BaseMenubar.vue +4 -0
- package/menubar/Menubar.d.ts +5 -0
- package/menubar/Menubar.vue +10 -1
- package/menubar/menubar.cjs.js +48 -36
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +48 -36
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +48 -36
- package/menubar/menubar.min.js +1 -1
- package/menubar/style/menubarstyle.cjs.js +2 -1
- package/menubar/style/menubarstyle.cjs.min.js +1 -1
- package/menubar/style/menubarstyle.esm.js +2 -1
- package/menubar/style/menubarstyle.esm.min.js +1 -1
- package/menubar/style/menubarstyle.js +2 -1
- package/menubar/style/menubarstyle.min.js +1 -1
- package/orderlist/OrderList.vue +18 -2
- package/orderlist/orderlist.cjs.js +16 -2
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +16 -2
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +16 -2
- package/orderlist/orderlist.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +14 -14
- package/package.json +1 -1
- package/paginator/Paginator.vue +21 -13
- package/paginator/paginator.cjs.js +9 -2
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +9 -2
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +9 -2
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/BasePanelMenu.vue +4 -0
- package/panelmenu/PanelMenu.d.ts +5 -0
- package/panelmenu/PanelMenu.vue +13 -2
- package/panelmenu/panelmenu.cjs.js +21 -2
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +21 -2
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +21 -2
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +4 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +4 -4
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +4 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/picklist/PickList.vue +16 -2
- package/picklist/picklist.cjs.js +15 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +15 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +15 -2
- package/picklist/picklist.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +133 -117
- package/resources/themes/arya-green/theme.css +133 -117
- package/resources/themes/arya-orange/theme.css +133 -117
- package/resources/themes/arya-purple/theme.css +133 -117
- package/resources/themes/bootstrap4-dark-blue/theme.css +133 -117
- package/resources/themes/bootstrap4-dark-purple/theme.css +133 -117
- package/resources/themes/bootstrap4-light-blue/theme.css +133 -117
- package/resources/themes/bootstrap4-light-purple/theme.css +133 -117
- package/resources/themes/fluent-light/theme.css +133 -117
- package/resources/themes/lara-dark-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-amber/theme.css +5757 -0
- package/resources/themes/lara-dark-blue/theme.css +337 -321
- package/resources/themes/lara-dark-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-cyan/theme.css +5757 -0
- package/resources/themes/lara-dark-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-green/theme.css +5757 -0
- package/resources/themes/lara-dark-indigo/theme.css +337 -321
- package/resources/themes/lara-dark-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-pink/theme.css +5757 -0
- package/resources/themes/lara-dark-purple/theme.css +337 -321
- package/resources/themes/lara-dark-teal/theme.css +577 -561
- package/resources/themes/lara-light-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-amber/theme.css +5749 -0
- package/resources/themes/lara-light-blue/theme.css +192 -176
- package/resources/themes/lara-light-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-cyan/theme.css +5749 -0
- package/resources/themes/lara-light-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-green/theme.css +5749 -0
- package/resources/themes/lara-light-indigo/theme.css +192 -176
- package/resources/themes/lara-light-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-pink/theme.css +5749 -0
- package/resources/themes/lara-light-purple/theme.css +192 -176
- package/resources/themes/lara-light-teal/theme.css +483 -467
- package/resources/themes/luna-amber/theme.css +133 -117
- package/resources/themes/luna-blue/theme.css +133 -117
- package/resources/themes/luna-green/theme.css +133 -117
- package/resources/themes/luna-pink/theme.css +133 -117
- package/resources/themes/md-dark-deeppurple/theme.css +133 -117
- package/resources/themes/md-dark-indigo/theme.css +133 -117
- package/resources/themes/md-light-deeppurple/theme.css +133 -117
- package/resources/themes/md-light-indigo/theme.css +133 -117
- package/resources/themes/mdc-dark-deeppurple/theme.css +133 -117
- package/resources/themes/mdc-dark-indigo/theme.css +133 -117
- package/resources/themes/mdc-light-deeppurple/theme.css +133 -117
- package/resources/themes/mdc-light-indigo/theme.css +133 -117
- package/resources/themes/mira/theme.css +133 -117
- package/resources/themes/nano/theme.css +133 -117
- package/resources/themes/nova/theme.css +133 -117
- package/resources/themes/nova-accent/theme.css +133 -117
- package/resources/themes/nova-alt/theme.css +133 -117
- package/resources/themes/nova-vue/theme.css +133 -117
- package/resources/themes/rhea/theme.css +133 -117
- package/resources/themes/saga-blue/theme.css +133 -117
- package/resources/themes/saga-green/theme.css +133 -117
- package/resources/themes/saga-orange/theme.css +133 -117
- package/resources/themes/saga-purple/theme.css +133 -117
- package/resources/themes/soho-dark/theme.css +133 -117
- package/resources/themes/soho-light/theme.css +133 -117
- package/resources/themes/tailwind-light/theme.css +133 -117
- package/resources/themes/vela-blue/theme.css +133 -117
- package/resources/themes/vela-green/theme.css +133 -117
- package/resources/themes/vela-orange/theme.css +133 -117
- package/resources/themes/vela-purple/theme.css +133 -117
- package/resources/themes/viva-dark/theme.css +133 -117
- package/resources/themes/viva-light/theme.css +133 -117
- package/sidebar/BaseSidebar.vue +4 -0
- package/sidebar/Sidebar.d.ts +12 -2
- package/sidebar/Sidebar.vue +3 -3
- package/sidebar/sidebar.cjs.js +12 -4
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +13 -5
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +12 -4
- package/sidebar/sidebar.min.js +1 -1
- package/sidebar/style/sidebarstyle.cjs.js +2 -2
- package/sidebar/style/sidebarstyle.cjs.min.js +1 -1
- package/sidebar/style/sidebarstyle.esm.js +2 -2
- package/sidebar/style/sidebarstyle.esm.min.js +1 -1
- package/sidebar/style/sidebarstyle.js +2 -2
- package/sidebar/style/sidebarstyle.min.js +1 -1
- package/speeddial/style/speeddialstyle.cjs.js +2 -2
- package/speeddial/style/speeddialstyle.cjs.min.js +1 -1
- package/speeddial/style/speeddialstyle.esm.js +2 -2
- package/speeddial/style/speeddialstyle.esm.min.js +1 -1
- package/speeddial/style/speeddialstyle.js +2 -2
- package/speeddial/style/speeddialstyle.min.js +1 -1
- package/splitter/Splitter.vue +3 -1
- package/splitter/splitter.cjs.js +3 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +3 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +3 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.cjs.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.cjs.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.esm.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.esm.min.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.js +1 -1
- package/splitterpanel/style/splitterpanelstyle.min.js +1 -1
- package/tree/TreeNode.vue +1 -1
- package/tree/style/treestyle.cjs.js +1 -4
- package/tree/style/treestyle.cjs.min.js +1 -1
- package/tree/style/treestyle.esm.js +1 -4
- package/tree/style/treestyle.esm.min.js +1 -1
- package/tree/style/treestyle.js +1 -4
- package/tree/style/treestyle.min.js +1 -1
- package/tree/tree.cjs.js +1 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +1 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +1 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.vue +67 -2
- package/treeselect/treeselect.cjs.js +73 -9
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +73 -9
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +73 -9
- package/treeselect/treeselect.min.js +1 -1
- package/web-types.json +1 -1
- /package/dynamicdialog/style/{AccordionStyle.d.ts → DynamicDialogStyle.d.ts} +0 -0
package/dataview/DataView.d.ts
CHANGED
|
@@ -81,14 +81,6 @@ export interface DataViewPassThroughOptions {
|
|
|
81
81
|
* Used to pass attributes to the content's DOM element.
|
|
82
82
|
*/
|
|
83
83
|
content?: DataViewPassThroughOptionType;
|
|
84
|
-
/**
|
|
85
|
-
* Used to pass attributes to the grid's DOM element.
|
|
86
|
-
*/
|
|
87
|
-
grid?: DataViewPassThroughOptionType;
|
|
88
|
-
/**
|
|
89
|
-
* Used to pass attributes to the column's DOM element.
|
|
90
|
-
*/
|
|
91
|
-
column?: DataViewPassThroughOptionType;
|
|
92
84
|
/**
|
|
93
85
|
* Used to pass attributes to the empty message's DOM element.
|
|
94
86
|
*/
|
|
@@ -253,8 +245,14 @@ export interface DataViewSlots {
|
|
|
253
245
|
footer(): VNode[];
|
|
254
246
|
/**
|
|
255
247
|
* Custom empty template.
|
|
248
|
+
* @param {Object} scope - empty slot's params.
|
|
256
249
|
*/
|
|
257
|
-
empty(
|
|
250
|
+
empty(scope: {
|
|
251
|
+
/**
|
|
252
|
+
* Layout of the items.
|
|
253
|
+
*/
|
|
254
|
+
layout?: string | undefined;
|
|
255
|
+
}): VNode[];
|
|
258
256
|
/**
|
|
259
257
|
* Custom paginator start template.
|
|
260
258
|
*/
|
|
@@ -271,11 +269,7 @@ export interface DataViewSlots {
|
|
|
271
269
|
/**
|
|
272
270
|
* Value of the component
|
|
273
271
|
*/
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Index of the grid
|
|
277
|
-
*/
|
|
278
|
-
index: number;
|
|
272
|
+
items: any;
|
|
279
273
|
}): VNode[];
|
|
280
274
|
/**
|
|
281
275
|
* Custom list template.
|
|
@@ -285,11 +279,7 @@ export interface DataViewSlots {
|
|
|
285
279
|
/**
|
|
286
280
|
* Value of the component
|
|
287
281
|
*/
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Index of the grid
|
|
291
|
-
*/
|
|
292
|
-
index: number;
|
|
282
|
+
items: any;
|
|
293
283
|
}): VNode[];
|
|
294
284
|
}
|
|
295
285
|
|
package/dataview/DataView.vue
CHANGED
|
@@ -26,16 +26,14 @@
|
|
|
26
26
|
</template>
|
|
27
27
|
</DVPaginator>
|
|
28
28
|
<div :class="cx('content')" v-bind="ptm('content')">
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
29
|
+
<template v-if="!empty">
|
|
30
|
+
<slot v-if="$slots.list && layout === 'list'" name="list" :items="items"></slot>
|
|
31
|
+
<slot v-if="$slots.grid && layout === 'grid'" name="grid" :items="items"></slot>
|
|
32
|
+
</template>
|
|
33
|
+
<div v-else :class="cx('emptyMessage')" v-bind="ptm('emptyMessage')">
|
|
34
|
+
<slot name="empty" :layout="layout">
|
|
35
|
+
{{ emptyMessageText }}
|
|
36
|
+
</slot>
|
|
39
37
|
</div>
|
|
40
38
|
</div>
|
|
41
39
|
<DVPaginator
|
|
@@ -137,6 +135,9 @@ export default {
|
|
|
137
135
|
empty() {
|
|
138
136
|
return !this.value || this.value.length === 0;
|
|
139
137
|
},
|
|
138
|
+
emptyMessageText() {
|
|
139
|
+
return this.$primevue.config?.locale?.emptyMessage || '';
|
|
140
|
+
},
|
|
140
141
|
paginatorTop() {
|
|
141
142
|
return this.paginator && (this.paginatorPosition !== 'bottom' || this.paginatorPosition === 'both');
|
|
142
143
|
},
|
package/dataview/dataview.cjs.js
CHANGED
|
@@ -157,6 +157,10 @@ var script = {
|
|
|
157
157
|
empty: function empty() {
|
|
158
158
|
return !this.value || this.value.length === 0;
|
|
159
159
|
},
|
|
160
|
+
emptyMessageText: function emptyMessageText() {
|
|
161
|
+
var _this$$primevue$confi;
|
|
162
|
+
return ((_this$$primevue$confi = this.$primevue.config) === null || _this$$primevue$confi === void 0 || (_this$$primevue$confi = _this$$primevue$confi.locale) === null || _this$$primevue$confi === void 0 ? void 0 : _this$$primevue$confi.emptyMessage) || '';
|
|
163
|
+
},
|
|
160
164
|
paginatorTop: function paginatorTop() {
|
|
161
165
|
return this.paginator && (this.paginatorPosition !== 'bottom' || this.paginatorPosition === 'both');
|
|
162
166
|
},
|
|
@@ -226,26 +230,22 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
226
230
|
key: "1"
|
|
227
231
|
} : undefined]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
228
232
|
"class": _ctx.cx('content')
|
|
229
|
-
}, _ctx.ptm('content')), [vue.
|
|
230
|
-
|
|
231
|
-
}, _ctx.
|
|
232
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
233
|
-
key: $options.getKey(item, index)
|
|
234
|
-
}, [_ctx.$slots.list && _ctx.layout === 'list' ? vue.renderSlot(_ctx.$slots, "list", {
|
|
235
|
-
key: 0,
|
|
236
|
-
data: item,
|
|
237
|
-
index: index
|
|
238
|
-
}) : vue.createCommentVNode("", true), _ctx.$slots.grid && _ctx.layout === 'grid' ? vue.renderSlot(_ctx.$slots, "grid", {
|
|
239
|
-
key: 1,
|
|
240
|
-
data: item,
|
|
241
|
-
index: index
|
|
242
|
-
}) : vue.createCommentVNode("", true)], 64);
|
|
243
|
-
}), 128)), $options.empty ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
233
|
+
}, _ctx.ptm('content')), [!$options.empty ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
234
|
+
key: 0
|
|
235
|
+
}, [_ctx.$slots.list && _ctx.layout === 'list' ? vue.renderSlot(_ctx.$slots, "list", {
|
|
244
236
|
key: 0,
|
|
245
|
-
|
|
246
|
-
}, _ctx.
|
|
237
|
+
items: $options.items
|
|
238
|
+
}) : vue.createCommentVNode("", true), _ctx.$slots.grid && _ctx.layout === 'grid' ? vue.renderSlot(_ctx.$slots, "grid", {
|
|
239
|
+
key: 1,
|
|
240
|
+
items: $options.items
|
|
241
|
+
}) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
242
|
+
key: 1,
|
|
247
243
|
"class": _ctx.cx('emptyMessage')
|
|
248
|
-
}, _ctx.ptm('emptyMessage')), [vue.renderSlot(_ctx.$slots, "empty"
|
|
244
|
+
}, _ctx.ptm('emptyMessage')), [vue.renderSlot(_ctx.$slots, "empty", {
|
|
245
|
+
layout: _ctx.layout
|
|
246
|
+
}, function () {
|
|
247
|
+
return [vue.createTextVNode(vue.toDisplayString($options.emptyMessageText), 1)];
|
|
248
|
+
})], 16))], 16), $options.paginatorBottom ? (vue.openBlock(), vue.createBlock(_component_DVPaginator, {
|
|
249
249
|
key: 2,
|
|
250
250
|
rows: $data.d_rows,
|
|
251
251
|
first: $data.d_first,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("primevue/paginator"),e=require("primevue/utils"),r=require("primevue/basecomponent"),o=require("primevue/dataview/style"),a=require("vue");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=n(t);function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function
|
|
1
|
+
"use strict";var t=require("primevue/paginator"),e=require("primevue/utils"),r=require("primevue/basecomponent"),o=require("primevue/dataview/style"),a=require("vue");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=n(t);function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function u(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t){if(Array.isArray(t))return d(t)}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}var c={name:"DataView",extends:{name:"BaseDataView",extends:n(r).default,props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1},dataKey:{type:String,default:null}},style:n(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:first","update:rows","page"],data:function(){return{d_first:this.first,d_rows:this.rows}},watch:{first:function(t){this.d_first=t},rows:function(t){this.d_rows=t},sortField:function(){this.resetPage()},sortOrder:function(){this.resetPage()}},methods:{getKey:function(t,r){return this.dataKey?e.ObjectUtils.resolveFieldData(t,this.dataKey):r},onPage:function(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort:function(){var t,r=this;if(this.value){var o=p(t=this.value)||u(t)||l(t)||i(),a=e.ObjectUtils.localeComparator();return o.sort((function(t,o){var n=e.ObjectUtils.resolveFieldData(t,r.sortField),s=e.ObjectUtils.resolveFieldData(o,r.sortField);return e.ObjectUtils.sort(n,s,r.sortOrder,a)})),o}return null},resetPage:function(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{getTotalRecords:function(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty:function(){return!this.value||0===this.value.length},emptyMessageText:function(){var t;return(null===(t=this.$primevue.config)||void 0===t||null===(t=t.locale)||void 0===t?void 0:t.emptyMessage)||""},paginatorTop:function(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom:function(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items:function(){if(this.value&&this.value.length){var t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){var e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:s.default}};c.render=function(t,e,r,o,n,s){var i=a.resolveComponent("DVPaginator");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:t.cx("root")},t.ptm("root"),{"data-pc-name":"dataview"}),[t.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[a.renderSlot(t.$slots,"header")],16)):a.createCommentVNode("",!0),s.paginatorTop?(a.openBlock(),a.createBlock(i,{key:1,rows:n.d_rows,first:n.d_first,totalRecords:s.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:a.normalizeClass(t.cx("paginator")),alwaysShow:t.alwaysShowPaginator,onPage:e[0]||(e[0]=function(t){return s.onPage(t)}),unstyled:t.unstyled,pt:t.ptm("paginator")},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorstart")]})),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorend")]})),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({class:t.cx("content")},t.ptm("content")),[s.empty?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,class:t.cx("emptyMessage")},t.ptm("emptyMessage")),[a.renderSlot(t.$slots,"empty",{layout:t.layout},(function(){return[a.createTextVNode(a.toDisplayString(s.emptyMessageText),1)]}))],16)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[t.$slots.list&&"list"===t.layout?a.renderSlot(t.$slots,"list",{key:0,items:s.items}):a.createCommentVNode("",!0),t.$slots.grid&&"grid"===t.layout?a.renderSlot(t.$slots,"grid",{key:1,items:s.items}):a.createCommentVNode("",!0)],64))],16),s.paginatorBottom?(a.openBlock(),a.createBlock(i,{key:2,rows:n.d_rows,first:n.d_first,totalRecords:s.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:a.normalizeClass(t.cx("paginator")),alwaysShow:t.alwaysShowPaginator,onPage:e[1]||(e[1]=function(t){return s.onPage(t)}),unstyled:t.unstyled,pt:t.ptm("paginator")},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorstart")]})),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorend")]})),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):a.createCommentVNode("",!0),t.$slots.footer?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:3,class:t.cx("footer")},t.ptm("footer")),[a.renderSlot(t.$slots,"footer")],16)):a.createCommentVNode("",!0)],16)},module.exports=c;
|
package/dataview/dataview.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import Paginator from 'primevue/paginator';
|
|
|
2
2
|
import { ObjectUtils } from 'primevue/utils';
|
|
3
3
|
import BaseComponent from 'primevue/basecomponent';
|
|
4
4
|
import DataViewStyle from 'primevue/dataview/style';
|
|
5
|
-
import { resolveComponent, openBlock, createElementBlock, mergeProps, renderSlot, createCommentVNode, createBlock, normalizeClass, createSlots, withCtx, createElementVNode, Fragment,
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, renderSlot, createCommentVNode, createBlock, normalizeClass, createSlots, withCtx, createElementVNode, Fragment, createTextVNode, toDisplayString } from 'vue';
|
|
6
6
|
|
|
7
7
|
var script$1 = {
|
|
8
8
|
name: 'BaseDataView',
|
|
@@ -149,6 +149,10 @@ var script = {
|
|
|
149
149
|
empty: function empty() {
|
|
150
150
|
return !this.value || this.value.length === 0;
|
|
151
151
|
},
|
|
152
|
+
emptyMessageText: function emptyMessageText() {
|
|
153
|
+
var _this$$primevue$confi;
|
|
154
|
+
return ((_this$$primevue$confi = this.$primevue.config) === null || _this$$primevue$confi === void 0 || (_this$$primevue$confi = _this$$primevue$confi.locale) === null || _this$$primevue$confi === void 0 ? void 0 : _this$$primevue$confi.emptyMessage) || '';
|
|
155
|
+
},
|
|
152
156
|
paginatorTop: function paginatorTop() {
|
|
153
157
|
return this.paginator && (this.paginatorPosition !== 'bottom' || this.paginatorPosition === 'both');
|
|
154
158
|
},
|
|
@@ -218,26 +222,22 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
218
222
|
key: "1"
|
|
219
223
|
} : undefined]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), createElementVNode("div", mergeProps({
|
|
220
224
|
"class": _ctx.cx('content')
|
|
221
|
-
}, _ctx.ptm('content')), [
|
|
222
|
-
|
|
223
|
-
}, _ctx.
|
|
224
|
-
return openBlock(), createElementBlock(Fragment, {
|
|
225
|
-
key: $options.getKey(item, index)
|
|
226
|
-
}, [_ctx.$slots.list && _ctx.layout === 'list' ? renderSlot(_ctx.$slots, "list", {
|
|
227
|
-
key: 0,
|
|
228
|
-
data: item,
|
|
229
|
-
index: index
|
|
230
|
-
}) : createCommentVNode("", true), _ctx.$slots.grid && _ctx.layout === 'grid' ? renderSlot(_ctx.$slots, "grid", {
|
|
231
|
-
key: 1,
|
|
232
|
-
data: item,
|
|
233
|
-
index: index
|
|
234
|
-
}) : createCommentVNode("", true)], 64);
|
|
235
|
-
}), 128)), $options.empty ? (openBlock(), createElementBlock("div", mergeProps({
|
|
225
|
+
}, _ctx.ptm('content')), [!$options.empty ? (openBlock(), createElementBlock(Fragment, {
|
|
226
|
+
key: 0
|
|
227
|
+
}, [_ctx.$slots.list && _ctx.layout === 'list' ? renderSlot(_ctx.$slots, "list", {
|
|
236
228
|
key: 0,
|
|
237
|
-
|
|
238
|
-
}, _ctx.
|
|
229
|
+
items: $options.items
|
|
230
|
+
}) : createCommentVNode("", true), _ctx.$slots.grid && _ctx.layout === 'grid' ? renderSlot(_ctx.$slots, "grid", {
|
|
231
|
+
key: 1,
|
|
232
|
+
items: $options.items
|
|
233
|
+
}) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
234
|
+
key: 1,
|
|
239
235
|
"class": _ctx.cx('emptyMessage')
|
|
240
|
-
}, _ctx.ptm('emptyMessage')), [renderSlot(_ctx.$slots, "empty"
|
|
236
|
+
}, _ctx.ptm('emptyMessage')), [renderSlot(_ctx.$slots, "empty", {
|
|
237
|
+
layout: _ctx.layout
|
|
238
|
+
}, function () {
|
|
239
|
+
return [createTextVNode(toDisplayString($options.emptyMessageText), 1)];
|
|
240
|
+
})], 16))], 16), $options.paginatorBottom ? (openBlock(), createBlock(_component_DVPaginator, {
|
|
241
241
|
key: 2,
|
|
242
242
|
rows: $data.d_rows,
|
|
243
243
|
first: $data.d_first,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/paginator";import{ObjectUtils as e}from"primevue/utils";import r from"primevue/basecomponent";import a from"primevue/dataview/style";import{resolveComponent as o,openBlock as
|
|
1
|
+
import t from"primevue/paginator";import{ObjectUtils as e}from"primevue/utils";import r from"primevue/basecomponent";import a from"primevue/dataview/style";import{resolveComponent as o,openBlock as i,createElementBlock as s,mergeProps as n,renderSlot as l,createCommentVNode as p,createBlock as u,normalizeClass as d,createSlots as g,withCtx as f,createElementVNode as c,Fragment as m,createTextVNode as y,toDisplayString as h}from"vue";function P(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(t,e){if(t){if("string"==typeof t)return k(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(t,e):void 0}}function w(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function S(t){if(Array.isArray(t))return k(t)}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}var $={name:"DataView",extends:{name:"BaseDataView",extends:r,props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1},dataKey:{type:String,default:null}},style:a,provide:function(){return{$parentInstance:this}}},emits:["update:first","update:rows","page"],data:function(){return{d_first:this.first,d_rows:this.rows}},watch:{first:function(t){this.d_first=t},rows:function(t){this.d_rows=t},sortField:function(){this.resetPage()},sortOrder:function(){this.resetPage()}},methods:{getKey:function(t,r){return this.dataKey?e.resolveFieldData(t,this.dataKey):r},onPage:function(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort:function(){var t,r=this;if(this.value){var a=S(t=this.value)||w(t)||v(t)||P(),o=e.localeComparator();return a.sort((function(t,a){var i=e.resolveFieldData(t,r.sortField),s=e.resolveFieldData(a,r.sortField);return e.sort(i,s,r.sortOrder,o)})),a}return null},resetPage:function(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{getTotalRecords:function(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty:function(){return!this.value||0===this.value.length},emptyMessageText:function(){var t;return(null===(t=this.$primevue.config)||void 0===t||null===(t=t.locale)||void 0===t?void 0:t.emptyMessage)||""},paginatorTop:function(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom:function(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items:function(){if(this.value&&this.value.length){var t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){var e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:t}};$.render=function(t,e,r,a,P,v){var w=o("DVPaginator");return i(),s("div",n({class:t.cx("root")},t.ptm("root"),{"data-pc-name":"dataview"}),[t.$slots.header?(i(),s("div",n({key:0,class:t.cx("header")},t.ptm("header")),[l(t.$slots,"header")],16)):p("",!0),v.paginatorTop?(i(),u(w,{key:1,rows:P.d_rows,first:P.d_first,totalRecords:v.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:d(t.cx("paginator")),alwaysShow:t.alwaysShowPaginator,onPage:e[0]||(e[0]=function(t){return v.onPage(t)}),unstyled:t.unstyled,pt:t.ptm("paginator")},g({_:2},[t.$slots.paginatorstart?{name:"start",fn:f((function(){return[l(t.$slots,"paginatorstart")]})),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:f((function(){return[l(t.$slots,"paginatorend")]})),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):p("",!0),c("div",n({class:t.cx("content")},t.ptm("content")),[v.empty?(i(),s("div",n({key:1,class:t.cx("emptyMessage")},t.ptm("emptyMessage")),[l(t.$slots,"empty",{layout:t.layout},(function(){return[y(h(v.emptyMessageText),1)]}))],16)):(i(),s(m,{key:0},[t.$slots.list&&"list"===t.layout?l(t.$slots,"list",{key:0,items:v.items}):p("",!0),t.$slots.grid&&"grid"===t.layout?l(t.$slots,"grid",{key:1,items:v.items}):p("",!0)],64))],16),v.paginatorBottom?(i(),u(w,{key:2,rows:P.d_rows,first:P.d_first,totalRecords:v.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:d(t.cx("paginator")),alwaysShow:t.alwaysShowPaginator,onPage:e[1]||(e[1]=function(t){return v.onPage(t)}),unstyled:t.unstyled,pt:t.ptm("paginator")},g({_:2},[t.$slots.paginatorstart?{name:"start",fn:f((function(){return[l(t.$slots,"paginatorstart")]})),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:f((function(){return[l(t.$slots,"paginatorend")]})),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):p("",!0),t.$slots.footer?(i(),s("div",n({key:3,class:t.cx("footer")},t.ptm("footer")),[l(t.$slots,"footer")],16)):p("",!0)],16)};export{$ as default};
|
package/dataview/dataview.js
CHANGED
|
@@ -153,6 +153,10 @@ this.primevue.dataview = (function (Paginator, utils, BaseComponent, DataViewSty
|
|
|
153
153
|
empty: function empty() {
|
|
154
154
|
return !this.value || this.value.length === 0;
|
|
155
155
|
},
|
|
156
|
+
emptyMessageText: function emptyMessageText() {
|
|
157
|
+
var _this$$primevue$confi;
|
|
158
|
+
return ((_this$$primevue$confi = this.$primevue.config) === null || _this$$primevue$confi === void 0 || (_this$$primevue$confi = _this$$primevue$confi.locale) === null || _this$$primevue$confi === void 0 ? void 0 : _this$$primevue$confi.emptyMessage) || '';
|
|
159
|
+
},
|
|
156
160
|
paginatorTop: function paginatorTop() {
|
|
157
161
|
return this.paginator && (this.paginatorPosition !== 'bottom' || this.paginatorPosition === 'both');
|
|
158
162
|
},
|
|
@@ -222,26 +226,22 @@ this.primevue.dataview = (function (Paginator, utils, BaseComponent, DataViewSty
|
|
|
222
226
|
key: "1"
|
|
223
227
|
} : undefined]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
224
228
|
"class": _ctx.cx('content')
|
|
225
|
-
}, _ctx.ptm('content')), [vue.
|
|
226
|
-
|
|
227
|
-
}, _ctx.
|
|
228
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
229
|
-
key: $options.getKey(item, index)
|
|
230
|
-
}, [_ctx.$slots.list && _ctx.layout === 'list' ? vue.renderSlot(_ctx.$slots, "list", {
|
|
231
|
-
key: 0,
|
|
232
|
-
data: item,
|
|
233
|
-
index: index
|
|
234
|
-
}) : vue.createCommentVNode("", true), _ctx.$slots.grid && _ctx.layout === 'grid' ? vue.renderSlot(_ctx.$slots, "grid", {
|
|
235
|
-
key: 1,
|
|
236
|
-
data: item,
|
|
237
|
-
index: index
|
|
238
|
-
}) : vue.createCommentVNode("", true)], 64);
|
|
239
|
-
}), 128)), $options.empty ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
229
|
+
}, _ctx.ptm('content')), [!$options.empty ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
230
|
+
key: 0
|
|
231
|
+
}, [_ctx.$slots.list && _ctx.layout === 'list' ? vue.renderSlot(_ctx.$slots, "list", {
|
|
240
232
|
key: 0,
|
|
241
|
-
|
|
242
|
-
}, _ctx.
|
|
233
|
+
items: $options.items
|
|
234
|
+
}) : vue.createCommentVNode("", true), _ctx.$slots.grid && _ctx.layout === 'grid' ? vue.renderSlot(_ctx.$slots, "grid", {
|
|
235
|
+
key: 1,
|
|
236
|
+
items: $options.items
|
|
237
|
+
}) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
238
|
+
key: 1,
|
|
243
239
|
"class": _ctx.cx('emptyMessage')
|
|
244
|
-
}, _ctx.ptm('emptyMessage')), [vue.renderSlot(_ctx.$slots, "empty"
|
|
240
|
+
}, _ctx.ptm('emptyMessage')), [vue.renderSlot(_ctx.$slots, "empty", {
|
|
241
|
+
layout: _ctx.layout
|
|
242
|
+
}, function () {
|
|
243
|
+
return [vue.createTextVNode(vue.toDisplayString($options.emptyMessageText), 1)];
|
|
244
|
+
})], 16))], 16), $options.paginatorBottom ? (vue.openBlock(), vue.createBlock(_component_DVPaginator, {
|
|
245
245
|
key: 2,
|
|
246
246
|
rows: $data.d_rows,
|
|
247
247
|
first: $data.d_first,
|
package/dataview/dataview.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dataview=function(t,e,r,o,a){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=n(t);function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function p(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t){if(Array.isArray(t))return d(t)}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}var c={name:"DataView",extends:{name:"BaseDataView",extends:n(r).default,props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1},dataKey:{type:String,default:null}},style:n(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:first","update:rows","page"],data:function(){return{d_first:this.first,d_rows:this.rows}},watch:{first:function(t){this.d_first=t},rows:function(t){this.d_rows=t},sortField:function(){this.resetPage()},sortOrder:function(){this.resetPage()}},methods:{getKey:function(t,r){return this.dataKey?e.ObjectUtils.resolveFieldData(t,this.dataKey):r},onPage:function(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort:function(){var t,r=this;if(this.value){var o=u(t=this.value)||p(t)||l(t)||i(),a=e.ObjectUtils.localeComparator();return o.sort((function(t,o){var n=e.ObjectUtils.resolveFieldData(t,r.sortField),s=e.ObjectUtils.resolveFieldData(o,r.sortField);return e.ObjectUtils.sort(n,s,r.sortOrder,a)})),o}return null},resetPage:function(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{getTotalRecords:function(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty:function(){return!this.value||0===this.value.length},paginatorTop:function(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom:function(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items:function(){if(this.value&&this.value.length){var t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){var e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:s.default}};return c.render=function(t,e,r,o,n,s){var i=a.resolveComponent("DVPaginator");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:t.cx("root")},t.ptm("root"),{"data-pc-name":"dataview"}),[t.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[a.renderSlot(t.$slots,"header")],16)):a.createCommentVNode("",!0),s.paginatorTop?(a.openBlock(),a.createBlock(i,{key:1,rows:n.d_rows,first:n.d_first,totalRecords:s.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:a.normalizeClass(t.cx("paginator")),alwaysShow:t.alwaysShowPaginator,onPage:e[0]||(e[0]=function(t){return s.onPage(t)}),unstyled:t.unstyled,pt:t.ptm("paginator")},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorstart")]})),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorend")]})),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({class:t.cx("content")},t.ptm("content")),[a.
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dataview=function(t,e,r,o,a){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=n(t);function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function p(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t){if(Array.isArray(t))return d(t)}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}var c={name:"DataView",extends:{name:"BaseDataView",extends:n(r).default,props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1},dataKey:{type:String,default:null}},style:n(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:first","update:rows","page"],data:function(){return{d_first:this.first,d_rows:this.rows}},watch:{first:function(t){this.d_first=t},rows:function(t){this.d_rows=t},sortField:function(){this.resetPage()},sortOrder:function(){this.resetPage()}},methods:{getKey:function(t,r){return this.dataKey?e.ObjectUtils.resolveFieldData(t,this.dataKey):r},onPage:function(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort:function(){var t,r=this;if(this.value){var o=u(t=this.value)||p(t)||l(t)||i(),a=e.ObjectUtils.localeComparator();return o.sort((function(t,o){var n=e.ObjectUtils.resolveFieldData(t,r.sortField),s=e.ObjectUtils.resolveFieldData(o,r.sortField);return e.ObjectUtils.sort(n,s,r.sortOrder,a)})),o}return null},resetPage:function(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{getTotalRecords:function(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty:function(){return!this.value||0===this.value.length},emptyMessageText:function(){var t;return(null===(t=this.$primevue.config)||void 0===t||null===(t=t.locale)||void 0===t?void 0:t.emptyMessage)||""},paginatorTop:function(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom:function(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items:function(){if(this.value&&this.value.length){var t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){var e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:s.default}};return c.render=function(t,e,r,o,n,s){var i=a.resolveComponent("DVPaginator");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:t.cx("root")},t.ptm("root"),{"data-pc-name":"dataview"}),[t.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[a.renderSlot(t.$slots,"header")],16)):a.createCommentVNode("",!0),s.paginatorTop?(a.openBlock(),a.createBlock(i,{key:1,rows:n.d_rows,first:n.d_first,totalRecords:s.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:a.normalizeClass(t.cx("paginator")),alwaysShow:t.alwaysShowPaginator,onPage:e[0]||(e[0]=function(t){return s.onPage(t)}),unstyled:t.unstyled,pt:t.ptm("paginator")},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorstart")]})),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorend")]})),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({class:t.cx("content")},t.ptm("content")),[s.empty?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,class:t.cx("emptyMessage")},t.ptm("emptyMessage")),[a.renderSlot(t.$slots,"empty",{layout:t.layout},(function(){return[a.createTextVNode(a.toDisplayString(s.emptyMessageText),1)]}))],16)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[t.$slots.list&&"list"===t.layout?a.renderSlot(t.$slots,"list",{key:0,items:s.items}):a.createCommentVNode("",!0),t.$slots.grid&&"grid"===t.layout?a.renderSlot(t.$slots,"grid",{key:1,items:s.items}):a.createCommentVNode("",!0)],64))],16),s.paginatorBottom?(a.openBlock(),a.createBlock(i,{key:2,rows:n.d_rows,first:n.d_first,totalRecords:s.getTotalRecords,pageLinkSize:t.pageLinkSize,template:t.paginatorTemplate,rowsPerPageOptions:t.rowsPerPageOptions,currentPageReportTemplate:t.currentPageReportTemplate,class:a.normalizeClass(t.cx("paginator")),alwaysShow:t.alwaysShowPaginator,onPage:e[1]||(e[1]=function(t){return s.onPage(t)}),unstyled:t.unstyled,pt:t.ptm("paginator")},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorstart")]})),key:"0"}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((function(){return[a.renderSlot(t.$slots,"paginatorend")]})),key:"1"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):a.createCommentVNode("",!0),t.$slots.footer?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:3,class:t.cx("footer")},t.ptm("footer")),[a.renderSlot(t.$slots,"footer")],16)):a.createCommentVNode("",!0)],16)},c}(primevue.paginator,primevue.utils,primevue.basecomponent,primevue.dataview.style,Vue);
|
|
@@ -20,8 +20,6 @@ var classes = {
|
|
|
20
20
|
return instance.paginatorTop ? 'p-paginator-top' : instance.paginatorBottom ? 'p-paginator-bottom' : '';
|
|
21
21
|
},
|
|
22
22
|
content: 'p-dataview-content',
|
|
23
|
-
grid: 'p-grid p-nogutter grid grid-nogutter',
|
|
24
|
-
column: 'p-col col',
|
|
25
23
|
emptyMessage: 'p-dataview-emptymessage',
|
|
26
24
|
footer: 'p-dataview-footer'
|
|
27
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=t(require("primevue/base/style")).default.extend({name:"dataview",classes:{root:function(t){var e=t.props;return["p-dataview p-component",{"p-dataview-list":"list"===e.layout,"p-dataview-grid":"grid"===e.layout}]},header:"p-dataview-header",paginator:function(t){var e=t.instance;return e.paginatorTop?"p-paginator-top":e.paginatorBottom?"p-paginator-bottom":""},content:"p-dataview-content",
|
|
1
|
+
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=t(require("primevue/base/style")).default.extend({name:"dataview",classes:{root:function(t){var e=t.props;return["p-dataview p-component",{"p-dataview-list":"list"===e.layout,"p-dataview-grid":"grid"===e.layout}]},header:"p-dataview-header",paginator:function(t){var e=t.instance;return e.paginatorTop?"p-paginator-top":e.paginatorBottom?"p-paginator-bottom":""},content:"p-dataview-content",emptyMessage:"p-dataview-emptymessage",footer:"p-dataview-footer"}});module.exports=e;
|
|
@@ -14,8 +14,6 @@ var classes = {
|
|
|
14
14
|
return instance.paginatorTop ? 'p-paginator-top' : instance.paginatorBottom ? 'p-paginator-bottom' : '';
|
|
15
15
|
},
|
|
16
16
|
content: 'p-dataview-content',
|
|
17
|
-
grid: 'p-grid p-nogutter grid grid-nogutter',
|
|
18
|
-
column: 'p-col col',
|
|
19
17
|
emptyMessage: 'p-dataview-emptymessage',
|
|
20
18
|
footer: 'p-dataview-footer'
|
|
21
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/base/style";var a=t.extend({name:"dataview",classes:{root:function(t){var a=t.props;return["p-dataview p-component",{"p-dataview-list":"list"===a.layout,"p-dataview-grid":"grid"===a.layout}]},header:"p-dataview-header",paginator:function(t){var a=t.instance;return a.paginatorTop?"p-paginator-top":a.paginatorBottom?"p-paginator-bottom":""},content:"p-dataview-content",
|
|
1
|
+
import t from"primevue/base/style";var a=t.extend({name:"dataview",classes:{root:function(t){var a=t.props;return["p-dataview p-component",{"p-dataview-list":"list"===a.layout,"p-dataview-grid":"grid"===a.layout}]},header:"p-dataview-header",paginator:function(t){var a=t.instance;return a.paginatorTop?"p-paginator-top":a.paginatorBottom?"p-paginator-bottom":""},content:"p-dataview-content",emptyMessage:"p-dataview-emptymessage",footer:"p-dataview-footer"}});export{a as default};
|
|
@@ -21,8 +21,6 @@ this.primevue.dataview.style = (function (BaseStyle) {
|
|
|
21
21
|
return instance.paginatorTop ? 'p-paginator-top' : instance.paginatorBottom ? 'p-paginator-bottom' : '';
|
|
22
22
|
},
|
|
23
23
|
content: 'p-dataview-content',
|
|
24
|
-
grid: 'p-grid p-nogutter grid grid-nogutter',
|
|
25
|
-
column: 'p-col col',
|
|
26
24
|
emptyMessage: 'p-dataview-emptymessage',
|
|
27
25
|
footer: 'p-dataview-footer'
|
|
28
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dataview=this.primevue.dataview||{},this.primevue.dataview.style=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}return e(primevue.base.style).default.extend({name:"dataview",classes:{root:function(t){var e=t.props;return["p-dataview p-component",{"p-dataview-list":"list"===e.layout,"p-dataview-grid":"grid"===e.layout}]},header:"p-dataview-header",paginator:function(t){var e=t.instance;return e.paginatorTop?"p-paginator-top":e.paginatorBottom?"p-paginator-bottom":""},content:"p-dataview-content",
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dataview=this.primevue.dataview||{},this.primevue.dataview.style=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}return e(primevue.base.style).default.extend({name:"dataview",classes:{root:function(t){var e=t.props;return["p-dataview p-component",{"p-dataview-list":"list"===e.layout,"p-dataview-grid":"grid"===e.layout}]},header:"p-dataview-header",paginator:function(t){var e=t.instance;return e.paginatorTop?"p-paginator-top":e.paginatorBottom?"p-paginator-bottom":""},content:"p-dataview-content",emptyMessage:"p-dataview-emptymessage",footer:"p-dataview-footer"}})}();
|
package/dialog/Dialog.d.ts
CHANGED
|
@@ -54,11 +54,11 @@ export interface DialogPassThroughOptions {
|
|
|
54
54
|
/**
|
|
55
55
|
* Used to pass attributes to the header title's DOM element.
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
title?: DialogPassThroughOptionType;
|
|
58
58
|
/**
|
|
59
59
|
* Used to pass attributes to the header icons' DOM element.
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
icons?: DialogPassThroughOptionType;
|
|
62
62
|
/**
|
|
63
63
|
* Used to pass attributes to the maximizable button's DOM element.
|
|
64
64
|
*/
|
package/dialog/Dialog.vue
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<slot v-if="$slots.container" name="container" :onClose="close" :onMaximize="(event) => maximize(event)" :closeCallback="close" :maximizeCallback="(event) => maximize(event)"></slot>
|
|
7
7
|
<template v-else>
|
|
8
8
|
<div v-if="showHeader" :ref="headerContainerRef" :class="cx('header')" @mousedown="initDrag" v-bind="ptm('header')">
|
|
9
|
-
<slot name="header" :class="cx('
|
|
10
|
-
<span v-if="header" :id="ariaLabelledById" :class="cx('
|
|
9
|
+
<slot name="header" :class="cx('title')">
|
|
10
|
+
<span v-if="header" :id="ariaLabelledById" :class="cx('title')" v-bind="ptm('title')">{{ header }}</span>
|
|
11
11
|
</slot>
|
|
12
|
-
<div :class="cx('
|
|
12
|
+
<div :class="cx('icons')" v-bind="ptm('icons')">
|
|
13
13
|
<button
|
|
14
14
|
v-if="maximizable"
|
|
15
15
|
:ref="maximizableRef"
|
|
@@ -283,7 +283,7 @@ export default {
|
|
|
283
283
|
}
|
|
284
284
|
},
|
|
285
285
|
initDrag(event) {
|
|
286
|
-
if (event.target.closest('div').getAttribute('data-pc-section') === '
|
|
286
|
+
if (event.target.closest('div').getAttribute('data-pc-section') === 'icons') {
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
|
package/dialog/dialog.cjs.js
CHANGED
|
@@ -346,7 +346,7 @@ var script = {
|
|
|
346
346
|
}
|
|
347
347
|
},
|
|
348
348
|
initDrag: function initDrag(event) {
|
|
349
|
-
if (event.target.closest('div').getAttribute('data-pc-section') === '
|
|
349
|
+
if (event.target.closest('div').getAttribute('data-pc-section') === 'icons') {
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
352
|
if (this.draggable) {
|
|
@@ -526,16 +526,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
526
526
|
return $options.initDrag && $options.initDrag.apply($options, arguments);
|
|
527
527
|
})
|
|
528
528
|
}, _ctx.ptm('header')), [vue.renderSlot(_ctx.$slots, "header", {
|
|
529
|
-
"class": vue.normalizeClass(_ctx.cx('
|
|
529
|
+
"class": vue.normalizeClass(_ctx.cx('title'))
|
|
530
530
|
}, function () {
|
|
531
531
|
return [_ctx.header ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
532
532
|
key: 0,
|
|
533
533
|
id: $options.ariaLabelledById,
|
|
534
|
-
"class": _ctx.cx('
|
|
535
|
-
}, _ctx.ptm('
|
|
534
|
+
"class": _ctx.cx('title')
|
|
535
|
+
}, _ctx.ptm('title')), vue.toDisplayString(_ctx.header), 17, _hoisted_2)) : vue.createCommentVNode("", true)];
|
|
536
536
|
}), vue.createElementVNode("div", vue.mergeProps({
|
|
537
|
-
"class": _ctx.cx('
|
|
538
|
-
}, _ctx.ptm('
|
|
537
|
+
"class": _ctx.cx('icons')
|
|
538
|
+
}, _ctx.ptm('icons')), [_ctx.maximizable ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
539
539
|
key: 0,
|
|
540
540
|
ref: $options.maximizableRef,
|
|
541
541
|
autofocus: $data.focusableMax,
|
package/dialog/dialog.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/focustrap"),t=require("primevue/icons/times"),n=require("primevue/icons/windowmaximize"),o=require("primevue/icons/windowminimize"),i=require("primevue/portal"),a=require("primevue/ripple"),r=require("primevue/utils"),l=require("vue"),s=require("primevue/basecomponent"),c=require("primevue/dialog/style");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=u(e),d=u(t),p=u(n),f=u(o),h=u(i),b=u(a),y={name:"Dialog",extends:{name:"BaseDialog",extends:u(s).default,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:u(c).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:l.computed((function(){return e._instance}))}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&r.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&r.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer))||(t=this.$slots.default&&e(this.content))||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)),t&&r.DomHandler.focus(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?r.DomHandler.blockBodyScroll():r.DomHandler.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&r.DomHandler.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&r.DomHandler.unblockBodyScroll()},onKeyDown:function(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",r.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints)t+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.breakpoints[n]," !important;\n }\n }\n ");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){"headericons"!==e.target.closest("div").getAttribute("data-pc-section")&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",!this.isUnstyled&&r.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=r.DomHandler.getOuterWidth(e.container),o=r.DomHandler.getOuterHeight(e.container),i=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,l=e.container.getBoundingClientRect(),s=l.left+i,c=l.top+a,u=r.DomHandler.getViewport(),m=getComputedStyle(e.container),d=parseFloat(m.marginLeft),p=parseFloat(m.marginTop);e.container.style.position="fixed",e.keepInViewport?(s>=e.minX&&s+n<u.width&&(e.lastPageX=t.pageX,e.container.style.left=s-d+"px"),c>=e.minY&&c+o<u.height&&(e.lastPageY=t.pageY,e.container.style.top=c-p+"px")):(e.lastPageX=t.pageX,e.container.style.left=s-d+"px",e.lastPageY=t.pageY,e.container.style.top=c-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,!e.isUnstyled&&r.DomHandler.removeClass(document.body,"p-unselectable-text"),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaId:function(){return r.UniqueComponentId()},ariaLabelledById:function(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return r.UniqueComponentId()}},directives:{ripple:b.default,focustrap:m.default},components:{Portal:h.default,WindowMinimizeIcon:f.default,WindowMaximizeIcon:p.default,TimesIcon:d.default}};function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=B(e,"string");return"symbol"===g(t)?t:String(t)}function B(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=["aria-labelledby","aria-modal"],w=["id"],z=["autofocus","tabindex"],E=["autofocus","aria-label"];y.render=function(e,t,n,o,i,a){var r=l.resolveComponent("Portal"),s=l.resolveDirective("ripple"),c=l.resolveDirective("focustrap");return l.openBlock(),l.createBlock(r,{appendTo:e.appendTo},{default:l.withCtx((function(){return[i.containerVisible?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:a.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onClick:t[3]||(t[3]=function(){return a.onMaskClick&&a.onMaskClick.apply(a,arguments)})},e.ptm("mask")),[l.createVNode(l.Transition,l.mergeProps({name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},e.ptm("transition")),{default:l.withCtx((function(){return[e.visible?l.withDirectives((l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:a.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":e.modal},x(x({},e.$attrs),e.ptm("root"))),[e.$slots.container?l.renderSlot(e.$slots,"container",{key:0,onClose:a.close,onMaximize:function(e){return a.maximize(e)},closeCallback:a.close,maximizeCallback:function(e){return a.maximize(e)}}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.showHeader?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:a.headerContainerRef,class:e.cx("header"),onMousedown:t[2]||(t[2]=function(){return a.initDrag&&a.initDrag.apply(a,arguments)})},e.ptm("header")),[l.renderSlot(e.$slots,"header",{class:l.normalizeClass(e.cx("headerTitle"))},(function(){return[e.header?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:0,id:a.ariaLabelledById,class:e.cx("headerTitle")},e.ptm("headerTitle")),l.toDisplayString(e.header),17,w)):l.createCommentVNode("",!0)]})),l.createElementVNode("div",l.mergeProps({class:e.cx("headerIcons")},e.ptm("headerIcons")),[e.maximizable?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,ref:a.maximizableRef,autofocus:i.focusableMax,class:e.cx("maximizableButton"),onClick:t[0]||(t[0]=function(){return a.maximize&&a.maximize.apply(a,arguments)}),type:"button",tabindex:e.maximizable?"0":"-1"},e.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[l.renderSlot(e.$slots,"maximizeicon",{maximized:i.maximized,class:l.normalizeClass(e.cx("maximizableIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.maximizeIconComponent),l.mergeProps({class:[e.cx("maximizableIcon"),i.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("maximizableIcon")),null,16,["class"]))]}))],16,z)),[[s]]):l.createCommentVNode("",!0),e.closable?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,ref:a.closeButtonRef,autofocus:i.focusableClose,class:e.cx("closeButton"),onClick:t[1]||(t[1]=function(){return a.close&&a.close.apply(a,arguments)}),"aria-label":a.closeAriaLabel,type:"button"},x(x({},e.closeButtonProps),e.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[l.renderSlot(e.$slots,"closeicon",{class:l.normalizeClass(e.cx("closeButtonIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),l.mergeProps({class:[e.cx("closeButtonIcon"),e.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]}))],16,E)),[[s]]):l.createCommentVNode("",!0)],16)],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({ref:a.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},x(x({},e.contentProps),e.ptm("content"))),[l.renderSlot(e.$slots,"default")],16),e.footer||e.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,ref:a.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[l.renderSlot(e.$slots,"footer",{},(function(){return[l.createTextVNode(l.toDisplayString(e.footer),1)]}))],16)):l.createCommentVNode("",!0)],64))],16,L)),[[c,{disabled:!e.modal}]]):l.createCommentVNode("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):l.createCommentVNode("",!0)]})),_:3},8,["appendTo"])},module.exports=y;
|
|
1
|
+
"use strict";var e=require("primevue/focustrap"),t=require("primevue/icons/times"),n=require("primevue/icons/windowmaximize"),o=require("primevue/icons/windowminimize"),i=require("primevue/portal"),a=require("primevue/ripple"),r=require("primevue/utils"),l=require("vue"),s=require("primevue/basecomponent"),c=require("primevue/dialog/style");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=u(e),d=u(t),p=u(n),f=u(o),h=u(i),b=u(a),y={name:"Dialog",extends:{name:"BaseDialog",extends:u(s).default,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:u(c).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:l.computed((function(){return e._instance}))}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&r.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&r.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer))||(t=this.$slots.default&&e(this.content))||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)),t&&r.DomHandler.focus(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?r.DomHandler.blockBodyScroll():r.DomHandler.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&r.DomHandler.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&r.DomHandler.unblockBodyScroll()},onKeyDown:function(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",r.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints)t+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.breakpoints[n]," !important;\n }\n }\n ");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){"icons"!==e.target.closest("div").getAttribute("data-pc-section")&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",!this.isUnstyled&&r.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=r.DomHandler.getOuterWidth(e.container),o=r.DomHandler.getOuterHeight(e.container),i=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,l=e.container.getBoundingClientRect(),s=l.left+i,c=l.top+a,u=r.DomHandler.getViewport(),m=getComputedStyle(e.container),d=parseFloat(m.marginLeft),p=parseFloat(m.marginTop);e.container.style.position="fixed",e.keepInViewport?(s>=e.minX&&s+n<u.width&&(e.lastPageX=t.pageX,e.container.style.left=s-d+"px"),c>=e.minY&&c+o<u.height&&(e.lastPageY=t.pageY,e.container.style.top=c-p+"px")):(e.lastPageX=t.pageX,e.container.style.left=s-d+"px",e.lastPageY=t.pageY,e.container.style.top=c-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,!e.isUnstyled&&r.DomHandler.removeClass(document.body,"p-unselectable-text"),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaId:function(){return r.UniqueComponentId()},ariaLabelledById:function(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return r.UniqueComponentId()}},directives:{ripple:b.default,focustrap:m.default},components:{Portal:h.default,WindowMinimizeIcon:f.default,WindowMaximizeIcon:p.default,TimesIcon:d.default}};function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=B(e,"string");return"symbol"===g(t)?t:String(t)}function B(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=["aria-labelledby","aria-modal"],w=["id"],z=["autofocus","tabindex"],E=["autofocus","aria-label"];y.render=function(e,t,n,o,i,a){var r=l.resolveComponent("Portal"),s=l.resolveDirective("ripple"),c=l.resolveDirective("focustrap");return l.openBlock(),l.createBlock(r,{appendTo:e.appendTo},{default:l.withCtx((function(){return[i.containerVisible?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:a.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onClick:t[3]||(t[3]=function(){return a.onMaskClick&&a.onMaskClick.apply(a,arguments)})},e.ptm("mask")),[l.createVNode(l.Transition,l.mergeProps({name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},e.ptm("transition")),{default:l.withCtx((function(){return[e.visible?l.withDirectives((l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:a.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":e.modal},x(x({},e.$attrs),e.ptm("root"))),[e.$slots.container?l.renderSlot(e.$slots,"container",{key:0,onClose:a.close,onMaximize:function(e){return a.maximize(e)},closeCallback:a.close,maximizeCallback:function(e){return a.maximize(e)}}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.showHeader?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:a.headerContainerRef,class:e.cx("header"),onMousedown:t[2]||(t[2]=function(){return a.initDrag&&a.initDrag.apply(a,arguments)})},e.ptm("header")),[l.renderSlot(e.$slots,"header",{class:l.normalizeClass(e.cx("title"))},(function(){return[e.header?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:0,id:a.ariaLabelledById,class:e.cx("title")},e.ptm("title")),l.toDisplayString(e.header),17,w)):l.createCommentVNode("",!0)]})),l.createElementVNode("div",l.mergeProps({class:e.cx("icons")},e.ptm("icons")),[e.maximizable?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,ref:a.maximizableRef,autofocus:i.focusableMax,class:e.cx("maximizableButton"),onClick:t[0]||(t[0]=function(){return a.maximize&&a.maximize.apply(a,arguments)}),type:"button",tabindex:e.maximizable?"0":"-1"},e.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[l.renderSlot(e.$slots,"maximizeicon",{maximized:i.maximized,class:l.normalizeClass(e.cx("maximizableIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.maximizeIconComponent),l.mergeProps({class:[e.cx("maximizableIcon"),i.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("maximizableIcon")),null,16,["class"]))]}))],16,z)),[[s]]):l.createCommentVNode("",!0),e.closable?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,ref:a.closeButtonRef,autofocus:i.focusableClose,class:e.cx("closeButton"),onClick:t[1]||(t[1]=function(){return a.close&&a.close.apply(a,arguments)}),"aria-label":a.closeAriaLabel,type:"button"},x(x({},e.closeButtonProps),e.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[l.renderSlot(e.$slots,"closeicon",{class:l.normalizeClass(e.cx("closeButtonIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),l.mergeProps({class:[e.cx("closeButtonIcon"),e.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]}))],16,E)),[[s]]):l.createCommentVNode("",!0)],16)],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({ref:a.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},x(x({},e.contentProps),e.ptm("content"))),[l.renderSlot(e.$slots,"default")],16),e.footer||e.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,ref:a.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[l.renderSlot(e.$slots,"footer",{},(function(){return[l.createTextVNode(l.toDisplayString(e.footer),1)]}))],16)):l.createCommentVNode("",!0)],64))],16,L)),[[c,{disabled:!e.modal}]]):l.createCommentVNode("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):l.createCommentVNode("",!0)]})),_:3},8,["appendTo"])},module.exports=y;
|
package/dialog/dialog.esm.js
CHANGED
|
@@ -333,7 +333,7 @@ var script = {
|
|
|
333
333
|
}
|
|
334
334
|
},
|
|
335
335
|
initDrag: function initDrag(event) {
|
|
336
|
-
if (event.target.closest('div').getAttribute('data-pc-section') === '
|
|
336
|
+
if (event.target.closest('div').getAttribute('data-pc-section') === 'icons') {
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
339
|
if (this.draggable) {
|
|
@@ -513,16 +513,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
513
513
|
return $options.initDrag && $options.initDrag.apply($options, arguments);
|
|
514
514
|
})
|
|
515
515
|
}, _ctx.ptm('header')), [renderSlot(_ctx.$slots, "header", {
|
|
516
|
-
"class": normalizeClass(_ctx.cx('
|
|
516
|
+
"class": normalizeClass(_ctx.cx('title'))
|
|
517
517
|
}, function () {
|
|
518
518
|
return [_ctx.header ? (openBlock(), createElementBlock("span", mergeProps({
|
|
519
519
|
key: 0,
|
|
520
520
|
id: $options.ariaLabelledById,
|
|
521
|
-
"class": _ctx.cx('
|
|
522
|
-
}, _ctx.ptm('
|
|
521
|
+
"class": _ctx.cx('title')
|
|
522
|
+
}, _ctx.ptm('title')), toDisplayString(_ctx.header), 17, _hoisted_2)) : createCommentVNode("", true)];
|
|
523
523
|
}), createElementVNode("div", mergeProps({
|
|
524
|
-
"class": _ctx.cx('
|
|
525
|
-
}, _ctx.ptm('
|
|
524
|
+
"class": _ctx.cx('icons')
|
|
525
|
+
}, _ctx.ptm('icons')), [_ctx.maximizable ? withDirectives((openBlock(), createElementBlock("button", mergeProps({
|
|
526
526
|
key: 0,
|
|
527
527
|
ref: $options.maximizableRef,
|
|
528
528
|
autofocus: $data.focusableMax,
|