primevue 3.17.0 → 3.18.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/LICENSE.md +1 -1
- package/accordion/Accordion.vue +4 -4
- package/accordion/accordion.cjs.js +4 -4
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +4 -4
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +5 -5
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +24 -2
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +24 -2
- package/api/api.esm.min.js +1 -1
- package/api/api.js +24 -2
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +10 -0
- package/autocomplete/AutoComplete.vue +14 -6
- package/autocomplete/autocomplete.cjs.js +18 -10
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +16 -8
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +17 -9
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +9 -1
- package/breadcrumb/Breadcrumb.vue +14 -5
- package/breadcrumb/BreadcrumbItem.vue +9 -3
- package/breadcrumb/breadcrumb.cjs.js +25 -14
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +25 -14
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +25 -14
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.vue +6 -3
- package/button/button.cjs.js +6 -3
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +6 -3
- package/button/button.esm.min.js +1 -1
- package/button/button.js +6 -3
- package/button/button.min.js +1 -1
- package/calendar/Calendar.vue +71 -26
- package/calendar/calendar.cjs.js +140 -95
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +138 -93
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +139 -94
- package/calendar/calendar.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +10 -0
- package/cascadeselect/CascadeSelect.vue +13 -4
- package/cascadeselect/CascadeSelectSub.vue +18 -13
- package/cascadeselect/cascadeselect.cjs.js +39 -26
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +38 -25
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +39 -26
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/config/PrimeVue.d.ts +4 -1
- package/config/config.cjs.js +5 -2
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +5 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +6 -3
- package/config/config.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +41 -2
- package/contextmenu/ContextMenu.vue +440 -33
- package/contextmenu/ContextMenuSub.vue +119 -98
- package/contextmenu/contextmenu.cjs.js +619 -194
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +620 -195
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +620 -195
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1369 -675
- package/core/core.min.js +10 -10
- package/datatable/DataTable.d.ts +1 -2
- package/datatable/DataTable.vue +3 -3
- package/datatable/datatable.cjs.js +2334 -2334
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +2319 -2319
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +2319 -2319
- package/datatable/datatable.min.js +1 -1
- package/dock/Dock.d.ts +33 -2
- package/dock/Dock.vue +18 -2
- package/dock/DockSub.vue +206 -53
- package/dock/dock.cjs.js +261 -90
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +261 -90
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +262 -92
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +15 -0
- package/dropdown/Dropdown.vue +19 -7
- package/dropdown/dropdown.cjs.js +37 -24
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +36 -23
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +36 -23
- package/dropdown/dropdown.min.js +1 -1
- package/fileupload/FileContent.vue +51 -0
- package/fileupload/FileUpload.d.ts +21 -1
- package/fileupload/FileUpload.vue +62 -48
- package/fileupload/fileupload.cjs.js +214 -115
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +214 -115
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +214 -115
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/GalleriaThumbnails.vue +2 -2
- package/galleria/galleria.cjs.js +1 -1
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +1 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +1 -1
- package/galleria/galleria.min.js +1 -1
- package/inlinemessage/inlinemessage.cjs.js +1 -2
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +1 -2
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +1 -2
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inputnumber/InputNumber.vue +11 -4
- package/inputnumber/inputnumber.cjs.js +12 -5
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +11 -4
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +12 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/listbox/Listbox.d.ts +5 -0
- package/listbox/Listbox.vue +5 -1
- package/listbox/listbox.cjs.js +25 -20
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +25 -20
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +25 -20
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +29 -2
- package/megamenu/MegaMenu.vue +486 -228
- package/megamenu/MegaMenuSub.vue +231 -0
- package/megamenu/megamenu.cjs.js +818 -377
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +820 -379
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +818 -377
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +25 -2
- package/menu/Menu.vue +182 -18
- package/menu/Menuitem.vue +35 -28
- package/menu/menu.cjs.js +293 -114
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +293 -114
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +293 -114
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +14 -2
- package/menubar/Menubar.vue +526 -15
- package/menubar/MenubarSub.vue +105 -238
- package/menubar/menubar.cjs.js +691 -316
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +693 -318
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +691 -316
- package/menubar/menubar.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +25 -0
- package/multiselect/MultiSelect.vue +31 -11
- package/multiselect/multiselect.cjs.js +58 -37
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +57 -36
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +57 -36
- package/multiselect/multiselect.min.js +1 -1
- package/package.json +3 -3
- package/paginator/Paginator.d.ts +2 -2
- package/paginator/Paginator.vue +118 -23
- package/paginator/paginator.cjs.js +277 -182
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +278 -183
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +278 -184
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +32 -1
- package/panelmenu/PanelMenu.vue +189 -83
- package/panelmenu/PanelMenuList.vue +335 -0
- package/panelmenu/PanelMenuSub.vue +124 -85
- package/panelmenu/panelmenu.cjs.js +1383 -285
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1380 -286
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1383 -286
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.vue +5 -4
- package/password/password.cjs.js +6 -5
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +5 -4
- package/password/password.esm.min.js +1 -1
- package/password/password.js +6 -5
- package/password/password.min.js +1 -1
- package/resources/primevue.css +21 -2
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +317 -270
- package/resources/themes/arya-green/theme.css +317 -270
- package/resources/themes/arya-orange/theme.css +317 -270
- package/resources/themes/arya-purple/theme.css +317 -270
- package/resources/themes/bootstrap4-dark-blue/theme.css +332 -285
- package/resources/themes/bootstrap4-dark-purple/theme.css +332 -285
- package/resources/themes/bootstrap4-light-blue/theme.css +345 -298
- package/resources/themes/bootstrap4-light-purple/theme.css +345 -298
- package/resources/themes/fluent-light/theme.css +327 -280
- package/resources/themes/lara-dark-blue/theme.css +320 -273
- package/resources/themes/lara-dark-indigo/theme.css +320 -273
- package/resources/themes/lara-dark-purple/theme.css +320 -273
- package/resources/themes/lara-dark-teal/theme.css +320 -273
- package/resources/themes/lara-light-blue/theme.css +344 -297
- package/resources/themes/lara-light-indigo/theme.css +344 -297
- package/resources/themes/lara-light-purple/theme.css +344 -297
- package/resources/themes/lara-light-teal/theme.css +344 -297
- package/resources/themes/luna-amber/theme.css +348 -301
- package/resources/themes/luna-blue/theme.css +348 -301
- package/resources/themes/luna-green/theme.css +348 -301
- package/resources/themes/luna-pink/theme.css +348 -301
- package/resources/themes/md-dark-deeppurple/theme.css +367 -298
- package/resources/themes/md-dark-indigo/theme.css +367 -298
- package/resources/themes/md-light-deeppurple/theme.css +367 -298
- package/resources/themes/md-light-indigo/theme.css +367 -298
- package/resources/themes/mdc-dark-deeppurple/theme.css +367 -298
- package/resources/themes/mdc-dark-indigo/theme.css +367 -298
- package/resources/themes/mdc-light-deeppurple/theme.css +367 -298
- package/resources/themes/mdc-light-indigo/theme.css +367 -298
- package/resources/themes/nova/theme.css +312 -265
- package/resources/themes/nova-accent/theme.css +312 -265
- package/resources/themes/nova-alt/theme.css +312 -265
- package/resources/themes/nova-vue/theme.css +312 -265
- package/resources/themes/rhea/theme.css +312 -265
- package/resources/themes/saga-blue/theme.css +324 -277
- package/resources/themes/saga-green/theme.css +324 -277
- package/resources/themes/saga-orange/theme.css +324 -277
- package/resources/themes/saga-purple/theme.css +324 -277
- package/resources/themes/tailwind-light/theme.css +336 -289
- package/resources/themes/vela-blue/theme.css +324 -277
- package/resources/themes/vela-green/theme.css +324 -277
- package/resources/themes/vela-orange/theme.css +324 -277
- package/resources/themes/vela-purple/theme.css +324 -277
- package/ripple/ripple.cjs.js +12 -0
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +12 -0
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +12 -0
- package/ripple/ripple.min.js +1 -1
- package/speeddial/SpeedDial.vue +21 -16
- package/speeddial/speeddial.cjs.js +34 -27
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +34 -27
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +34 -27
- package/speeddial/speeddial.min.js +1 -1
- package/steps/Steps.vue +108 -9
- package/steps/steps.cjs.js +111 -20
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +112 -21
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +111 -20
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +1 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +1 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +1 -1
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/TabMenu.d.ts +9 -1
- package/tabmenu/TabMenu.vue +135 -6
- package/tabmenu/tabmenu.cjs.js +137 -17
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +137 -17
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +138 -18
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/TabView.vue +2 -2
- package/tabview/tabview.cjs.js +2 -2
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +2 -2
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +3 -3
- package/tabview/tabview.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +46 -3
- package/tieredmenu/TieredMenu.vue +482 -48
- package/tieredmenu/TieredMenuSub.vue +111 -204
- package/tieredmenu/tieredmenu.cjs.js +656 -320
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +657 -321
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +657 -321
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/Toast.vue +5 -3
- package/toast/ToastMessage.vue +5 -3
- package/toast/toast.cjs.js +19 -15
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +18 -14
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +19 -15
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.vue +42 -7
- package/togglebutton/togglebutton.cjs.js +42 -6
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +42 -6
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +42 -6
- package/togglebutton/togglebutton.min.js +1 -1
- package/tree/Tree.d.ts +8 -0
- package/utils/Utils.d.ts +3 -0
- package/utils/utils.cjs.js +26 -0
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +26 -0
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +26 -0
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +175 -3
- package/vetur-tags.json +54 -11
- package/web-types.json +675 -51
package/core/core.js
CHANGED
|
@@ -452,6 +452,14 @@ this.primevue.utils = (function (exports) {
|
|
|
452
452
|
}
|
|
453
453
|
},
|
|
454
454
|
|
|
455
|
+
getSelection() {
|
|
456
|
+
if (window.getSelection) return window.getSelection().toString();
|
|
457
|
+
else if (document.getSelection) return document.getSelection().toString();
|
|
458
|
+
else if (document['selection']) return document['selection'].createRange().text;
|
|
459
|
+
|
|
460
|
+
return null;
|
|
461
|
+
},
|
|
462
|
+
|
|
455
463
|
calculateScrollbarWidth() {
|
|
456
464
|
if (this.calculatedScrollbarWidth != null) return this.calculatedScrollbarWidth;
|
|
457
465
|
|
|
@@ -866,6 +874,24 @@ this.primevue.utils = (function (exports) {
|
|
|
866
874
|
return this.isNotEmpty(char) && char.length === 1 && char.match(/\S| /);
|
|
867
875
|
},
|
|
868
876
|
|
|
877
|
+
/**
|
|
878
|
+
* Firefox-v103 does not currently support the "findLast" method. It is stated that this method will be supported with Firefox-v104.
|
|
879
|
+
* https://caniuse.com/mdn-javascript_builtins_array_findlast
|
|
880
|
+
*/
|
|
881
|
+
findLast(arr, callback) {
|
|
882
|
+
let item;
|
|
883
|
+
|
|
884
|
+
if (this.isNotEmpty(arr)) {
|
|
885
|
+
try {
|
|
886
|
+
item = arr.findLast(callback);
|
|
887
|
+
} catch {
|
|
888
|
+
item = [...arr].reverse().find(callback);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
return item;
|
|
893
|
+
},
|
|
894
|
+
|
|
869
895
|
/**
|
|
870
896
|
* Firefox-v103 does not currently support the "findLastIndex" method. It is stated that this method will be supported with Firefox-v104.
|
|
871
897
|
* https://caniuse.com/mdn-javascript_builtins_array_findlastindex
|
|
@@ -1258,16 +1284,19 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1258
1284
|
ARROW_DOWN_RIGHT: 'pi pi-arrow-down-right',
|
|
1259
1285
|
ARROW_LEFT: 'pi pi-arrow-left',
|
|
1260
1286
|
ARROW_RIGHT: 'pi pi-arrow-right',
|
|
1287
|
+
ARROW_RIGHT_ARROW_LEFT: 'pi pi-arrow-right-arrow-left',
|
|
1261
1288
|
ARROW_UP: 'pi pi-arrow-up',
|
|
1262
1289
|
ARROW_UP_LEFT: 'pi pi-arrow-up-left',
|
|
1263
1290
|
ARROW_UP_RIGHT: 'pi pi-arrow-up-right',
|
|
1264
|
-
ARROW_H: 'pi pi-
|
|
1265
|
-
ARROW_V: 'pi pi-
|
|
1291
|
+
ARROW_H: 'pi pi-arrows-h',
|
|
1292
|
+
ARROW_V: 'pi pi-arrows-v',
|
|
1293
|
+
ARROW_A: 'pi pi-arrows-alt',
|
|
1266
1294
|
AT: 'pi pi-at',
|
|
1267
1295
|
BACKWARD: 'pi pi-backward',
|
|
1268
1296
|
BAN: 'pi pi-ban',
|
|
1269
1297
|
BARS: 'pi pi-bars',
|
|
1270
1298
|
BELL: 'pi pi-bell',
|
|
1299
|
+
BITCOIN: 'pi pi-bitcoin',
|
|
1271
1300
|
BOLT: 'pi pi-bolt',
|
|
1272
1301
|
BOOK: 'pi pi-book',
|
|
1273
1302
|
BOOKMARK: 'pi pi-bookmark',
|
|
@@ -1279,12 +1308,14 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1279
1308
|
CALENDAR_MINUS: 'pi pi-calendar-minus',
|
|
1280
1309
|
CALENDAR_PLUS: 'pi pi-calendar-plus',
|
|
1281
1310
|
CALENDAR_TIMES: 'pi pi-calendar-times',
|
|
1311
|
+
CALCULATOR: 'pi pi-calculator',
|
|
1282
1312
|
CAMERA: 'pi pi-camera',
|
|
1283
1313
|
CAR: 'pi pi-car',
|
|
1284
1314
|
CARET_DOWN: 'pi pi-caret-down',
|
|
1285
1315
|
CARET_LEFT: 'pi pi-caret-left',
|
|
1286
1316
|
CARET_RIGHT: 'pi pi-caret-right',
|
|
1287
1317
|
CARET_UP: 'pi pi-caret-up',
|
|
1318
|
+
CART_PLUS: 'pi pi-cart-plus',
|
|
1288
1319
|
CHART_BAR: 'pi pi-chart-bar',
|
|
1289
1320
|
CHART_LINE: 'pi pi-chart-line',
|
|
1290
1321
|
CHART_PIE: 'pi pi-chart-pie',
|
|
@@ -1314,6 +1345,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1314
1345
|
COPY: 'pi pi-copy',
|
|
1315
1346
|
CREDIT_CARD: 'pi pi-credit-card',
|
|
1316
1347
|
DATABASE: 'pi pi-database',
|
|
1348
|
+
DELETELEFT: 'pi pi-delete-left',
|
|
1317
1349
|
DESKTOP: 'pi pi-desktop',
|
|
1318
1350
|
DIRECTIONS: 'pi pi-directions',
|
|
1319
1351
|
DIRECTIONS_ALT: 'pi pi-directions-alt',
|
|
@@ -1324,6 +1356,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1324
1356
|
ELLIPSIS_H: 'pi pi-ellipsis-h',
|
|
1325
1357
|
ELLIPSIS_V: 'pi pi-ellipsis-v',
|
|
1326
1358
|
ENVELOPE: 'pi pi-envelope',
|
|
1359
|
+
ERASER: 'pi pi-eraser',
|
|
1327
1360
|
EURO: 'pi pi-euro',
|
|
1328
1361
|
EXCLAMATION_CIRCLE: 'pi pi-exclamation-circle',
|
|
1329
1362
|
EXCLAMATION_TRIANGLE: 'pi pi-exclamation-triangle',
|
|
@@ -1334,8 +1367,12 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1334
1367
|
FAST_BACKWARD: 'pi pi-fast-backward',
|
|
1335
1368
|
FAST_FORWARD: 'pi pi-fast-forward',
|
|
1336
1369
|
FILE: 'pi pi-file',
|
|
1370
|
+
FILE_EDIT: 'pi pi-file-edit',
|
|
1337
1371
|
FILE_EXCEL: 'pi pi-file-excel',
|
|
1372
|
+
FILE_EXPORT: 'pi pi-file-export',
|
|
1373
|
+
FILE_IMPORT: 'pi pi-file-import',
|
|
1338
1374
|
FILE_PDF: 'pi pi-file-pdf',
|
|
1375
|
+
FILE_WORD: 'pi pi-file-word',
|
|
1339
1376
|
FILTER: 'pi pi-filter',
|
|
1340
1377
|
FILTER_FILL: 'pi pi-filter-fill',
|
|
1341
1378
|
FILTER_SLASH: 'pi pi-filter-slash',
|
|
@@ -1344,6 +1381,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1344
1381
|
FOLDER: 'pi pi-folder',
|
|
1345
1382
|
FOLDER_OPEN: 'pi pi-folder-open',
|
|
1346
1383
|
FORWARD: 'pi pi-forward',
|
|
1384
|
+
GIFT: 'pi pi-gift',
|
|
1347
1385
|
GITHUB: 'pi pi-github',
|
|
1348
1386
|
GLOBE: 'pi pi-globe',
|
|
1349
1387
|
GOOGLE: 'pi pi-google',
|
|
@@ -1351,6 +1389,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1351
1389
|
HEART: 'pi pi-heart',
|
|
1352
1390
|
HEART_FILL: 'pi pi-heart-fill',
|
|
1353
1391
|
HISTORY: 'pi pi-history',
|
|
1392
|
+
HOURGLASS: 'pi pi-hourglass',
|
|
1354
1393
|
HOME: 'pi pi-home',
|
|
1355
1394
|
ID_CARD: 'pi pi-id-card',
|
|
1356
1395
|
IMAGE: 'pi pi-image',
|
|
@@ -1360,6 +1399,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1360
1399
|
INFO_CIRCLE: 'pi pi-info-circle',
|
|
1361
1400
|
INSTAGRAM: 'pi pi-instagram',
|
|
1362
1401
|
KEY: 'pi pi-key',
|
|
1402
|
+
LANGUAGE: 'pi pi-language',
|
|
1363
1403
|
LINK: 'pi pi-link',
|
|
1364
1404
|
LINKEDIN: 'pi pi-linkedin',
|
|
1365
1405
|
LIST: 'pi pi-list',
|
|
@@ -1367,6 +1407,8 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1367
1407
|
LOCK_OPEN: 'pi pi-lock-open',
|
|
1368
1408
|
MAP: 'pi pi-map',
|
|
1369
1409
|
MAP_MARKER: 'pi pi-map-marker',
|
|
1410
|
+
MEGAPHONE: 'pi pi-megaphone',
|
|
1411
|
+
MICREPHONE: 'pi pi-microphone',
|
|
1370
1412
|
MICROSOFT: 'pi pi-microsoft',
|
|
1371
1413
|
MINUS: 'pi pi-minus',
|
|
1372
1414
|
MINUS_CIRCLE: 'pi pi-minus-circle',
|
|
@@ -1435,6 +1477,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1435
1477
|
STEP_FORWARD: 'pi pi-step-forward',
|
|
1436
1478
|
STEP_FORWARD_ALT: 'pi pi-step-forward-alt',
|
|
1437
1479
|
STOP: 'pi pi-stop',
|
|
1480
|
+
STOPWATCH: 'pi pi-stop-watch',
|
|
1438
1481
|
STOP_CIRCLE: 'pi pi-stop-circle',
|
|
1439
1482
|
SUN: 'pi pi-sun',
|
|
1440
1483
|
SYNC: 'pi pi-sync',
|
|
@@ -1445,11 +1488,14 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1445
1488
|
TELEGRAM: 'pi pi-telegram',
|
|
1446
1489
|
TH_LARGE: 'pi pi-th-large',
|
|
1447
1490
|
THUMBS_DOWN: 'pi pi-thumbs-down',
|
|
1491
|
+
THUMBS_DOWN_FILL: 'pi pi-thumbs-down-fill',
|
|
1448
1492
|
THUMBS_UP: 'pi pi-thumbs-up',
|
|
1493
|
+
THUMBS_UP_FILL: 'pi pi-thumbs-up-fill',
|
|
1449
1494
|
TICKET: 'pi pi-ticket',
|
|
1450
1495
|
TIMES: 'pi pi-times',
|
|
1451
1496
|
TIMES_CIRCLE: 'pi pi-times-circle',
|
|
1452
1497
|
TRASH: 'pi pi-trash',
|
|
1498
|
+
TRUCK: 'pi pi-truck',
|
|
1453
1499
|
TWITTER: 'pi pi-twitter',
|
|
1454
1500
|
UNDO: 'pi pi-undo',
|
|
1455
1501
|
UNLOCK: 'pi pi-unlock',
|
|
@@ -1459,6 +1505,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1459
1505
|
USER_MINUS: 'pi pi-user-minus',
|
|
1460
1506
|
USER_PLUS: 'pi pi-user-plus',
|
|
1461
1507
|
USERS: 'pi pi-users',
|
|
1508
|
+
VERIFIED: 'pi pi-verified',
|
|
1462
1509
|
VIDEO: 'pi pi-video',
|
|
1463
1510
|
VIMEO: 'pi pi-vimeo',
|
|
1464
1511
|
VOLUME_DOWN: 'pi pi-volume-down',
|
|
@@ -1469,6 +1516,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1469
1516
|
WIFI: 'pi pi-wifi',
|
|
1470
1517
|
WINDOW_MAXIMIZE: 'pi pi-window-maximize',
|
|
1471
1518
|
WINDOW_MINIMIZE: 'pi pi-window-minimize',
|
|
1519
|
+
WRENCH: 'pi pi-wrench',
|
|
1472
1520
|
YOUTUBE: 'pi pi-youtube'
|
|
1473
1521
|
};
|
|
1474
1522
|
|
|
@@ -1492,7 +1540,7 @@ this.primevue.api = (function (exports, utils) {
|
|
|
1492
1540
|
})({}, primevue.utils);
|
|
1493
1541
|
|
|
1494
1542
|
this.primevue = this.primevue || {};
|
|
1495
|
-
this.primevue.config = (function (exports,
|
|
1543
|
+
this.primevue.config = (function (exports, api, vue) {
|
|
1496
1544
|
'use strict';
|
|
1497
1545
|
|
|
1498
1546
|
const defaultOptions = {
|
|
@@ -1525,6 +1573,8 @@ this.primevue.config = (function (exports, vue, api) {
|
|
|
1525
1573
|
choose: 'Choose',
|
|
1526
1574
|
upload: 'Upload',
|
|
1527
1575
|
cancel: 'Cancel',
|
|
1576
|
+
completed: 'Completed',
|
|
1577
|
+
pending: 'Pending',
|
|
1528
1578
|
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
1529
1579
|
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
1530
1580
|
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
@@ -1571,7 +1621,8 @@ this.primevue.config = (function (exports, vue, api) {
|
|
|
1571
1621
|
unselectAll: 'All items unselected',
|
|
1572
1622
|
close: 'Close',
|
|
1573
1623
|
previous: 'Previous',
|
|
1574
|
-
next: 'Next'
|
|
1624
|
+
next: 'Next',
|
|
1625
|
+
navigation: 'Navigation'
|
|
1575
1626
|
}
|
|
1576
1627
|
},
|
|
1577
1628
|
filterMatchModeOptions: {
|
|
@@ -1618,12 +1669,14 @@ this.primevue.config = (function (exports, vue, api) {
|
|
|
1618
1669
|
|
|
1619
1670
|
return exports;
|
|
1620
1671
|
|
|
1621
|
-
})({},
|
|
1672
|
+
})({}, primevue.api, Vue);
|
|
1622
1673
|
|
|
1623
1674
|
this.primevue = this.primevue || {};
|
|
1624
1675
|
this.primevue.ripple = (function (utils) {
|
|
1625
1676
|
'use strict';
|
|
1626
1677
|
|
|
1678
|
+
let timeout;
|
|
1679
|
+
|
|
1627
1680
|
function bindEvents(el) {
|
|
1628
1681
|
el.addEventListener('mousedown', onMouseDown);
|
|
1629
1682
|
}
|
|
@@ -1676,9 +1729,19 @@ this.primevue.ripple = (function (utils) {
|
|
|
1676
1729
|
ink.style.top = y + 'px';
|
|
1677
1730
|
ink.style.left = x + 'px';
|
|
1678
1731
|
utils.DomHandler.addClass(ink, 'p-ink-active');
|
|
1732
|
+
|
|
1733
|
+
timeout = setTimeout(() => {
|
|
1734
|
+
if (ink) {
|
|
1735
|
+
utils.DomHandler.removeClass(ink, 'p-ink-active');
|
|
1736
|
+
}
|
|
1737
|
+
}, 401);
|
|
1679
1738
|
}
|
|
1680
1739
|
|
|
1681
1740
|
function onAnimationEnd(event) {
|
|
1741
|
+
if (timeout) {
|
|
1742
|
+
clearTimeout(timeout);
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1682
1745
|
utils.DomHandler.removeClass(event.currentTarget, 'p-ink-active');
|
|
1683
1746
|
}
|
|
1684
1747
|
|
|
@@ -2925,10 +2988,12 @@ this.primevue.button = (function (Ripple, vue) {
|
|
|
2925
2988
|
name: 'Button',
|
|
2926
2989
|
props: {
|
|
2927
2990
|
label: {
|
|
2928
|
-
type: String
|
|
2991
|
+
type: String,
|
|
2992
|
+
default: null
|
|
2929
2993
|
},
|
|
2930
2994
|
icon: {
|
|
2931
|
-
type: String
|
|
2995
|
+
type: String,
|
|
2996
|
+
default: null
|
|
2932
2997
|
},
|
|
2933
2998
|
iconPos: {
|
|
2934
2999
|
type: String,
|
|
@@ -2939,7 +3004,8 @@ this.primevue.button = (function (Ripple, vue) {
|
|
|
2939
3004
|
default: null
|
|
2940
3005
|
},
|
|
2941
3006
|
badge: {
|
|
2942
|
-
type: String
|
|
3007
|
+
type: String,
|
|
3008
|
+
default: null
|
|
2943
3009
|
},
|
|
2944
3010
|
badgeClass: {
|
|
2945
3011
|
type: String,
|
|
@@ -3082,13 +3148,13 @@ this.primevue.inputtext = (function (vue) {
|
|
|
3082
3148
|
})(Vue);
|
|
3083
3149
|
|
|
3084
3150
|
this.primevue = this.primevue || {};
|
|
3085
|
-
this.primevue.inputnumber = (function (InputText,
|
|
3151
|
+
this.primevue.inputnumber = (function (Button, InputText, utils, vue) {
|
|
3086
3152
|
'use strict';
|
|
3087
3153
|
|
|
3088
3154
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
3089
3155
|
|
|
3090
|
-
var InputText__default = /*#__PURE__*/_interopDefaultLegacy(InputText);
|
|
3091
3156
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
3157
|
+
var InputText__default = /*#__PURE__*/_interopDefaultLegacy(InputText);
|
|
3092
3158
|
|
|
3093
3159
|
var script = {
|
|
3094
3160
|
name: 'InputNumber',
|
|
@@ -3885,7 +3951,9 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3885
3951
|
return index || 0;
|
|
3886
3952
|
},
|
|
3887
3953
|
onInputClick() {
|
|
3888
|
-
|
|
3954
|
+
const currentValue = this.$refs.input.$el.value;
|
|
3955
|
+
|
|
3956
|
+
if (!this.readonly && currentValue !== utils.DomHandler.getSelection()) {
|
|
3889
3957
|
this.initCursor();
|
|
3890
3958
|
}
|
|
3891
3959
|
},
|
|
@@ -3918,7 +3986,7 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3918
3986
|
},
|
|
3919
3987
|
handleOnInput(event, currentValue, newValue) {
|
|
3920
3988
|
if (this.isValueChanged(currentValue, newValue)) {
|
|
3921
|
-
this.$emit('input', { originalEvent: event, value: newValue });
|
|
3989
|
+
this.$emit('input', { originalEvent: event, value: newValue, formattedValue: currentValue });
|
|
3922
3990
|
}
|
|
3923
3991
|
},
|
|
3924
3992
|
isValueChanged(currentValue, newValue) {
|
|
@@ -4027,7 +4095,11 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
4027
4095
|
|
|
4028
4096
|
this._decimal.lastIndex = 0;
|
|
4029
4097
|
|
|
4030
|
-
|
|
4098
|
+
if (this.suffixChar) {
|
|
4099
|
+
return val1.replace(this.suffixChar, '').split(this._decimal)[0] + val2.replace(this.suffixChar, '').slice(decimalCharIndex) + this.suffixChar;
|
|
4100
|
+
} else {
|
|
4101
|
+
return decimalCharIndex !== -1 ? val1.split(this._decimal)[0] + val2.slice(decimalCharIndex) : val1;
|
|
4102
|
+
}
|
|
4031
4103
|
}
|
|
4032
4104
|
|
|
4033
4105
|
return val1;
|
|
@@ -4257,7 +4329,7 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
4257
4329
|
|
|
4258
4330
|
return script;
|
|
4259
4331
|
|
|
4260
|
-
})(primevue.inputtext, primevue.
|
|
4332
|
+
})(primevue.button, primevue.inputtext, primevue.utils, Vue);
|
|
4261
4333
|
|
|
4262
4334
|
this.primevue = this.primevue || {};
|
|
4263
4335
|
this.primevue.message = (function (Ripple, vue) {
|
|
@@ -4540,15 +4612,15 @@ this.primevue.progressbar = (function (vue) {
|
|
|
4540
4612
|
})(Vue);
|
|
4541
4613
|
|
|
4542
4614
|
this.primevue = this.primevue || {};
|
|
4543
|
-
this.primevue.dropdown = (function (
|
|
4615
|
+
this.primevue.dropdown = (function (api, OverlayEventBus, Portal, Ripple, utils, VirtualScroller, vue) {
|
|
4544
4616
|
'use strict';
|
|
4545
4617
|
|
|
4546
4618
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
4547
4619
|
|
|
4548
4620
|
var OverlayEventBus__default = /*#__PURE__*/_interopDefaultLegacy(OverlayEventBus);
|
|
4621
|
+
var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
|
|
4549
4622
|
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
4550
4623
|
var VirtualScroller__default = /*#__PURE__*/_interopDefaultLegacy(VirtualScroller);
|
|
4551
|
-
var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
|
|
4552
4624
|
|
|
4553
4625
|
var script = {
|
|
4554
4626
|
name: 'Dropdown',
|
|
@@ -4634,6 +4706,18 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4634
4706
|
type: Boolean,
|
|
4635
4707
|
default: false
|
|
4636
4708
|
},
|
|
4709
|
+
clearIcon: {
|
|
4710
|
+
type: String,
|
|
4711
|
+
default: 'pi pi-times'
|
|
4712
|
+
},
|
|
4713
|
+
dropdownIcon: {
|
|
4714
|
+
type: String,
|
|
4715
|
+
default: 'pi pi-chevron-down'
|
|
4716
|
+
},
|
|
4717
|
+
filterIcon: {
|
|
4718
|
+
type: String,
|
|
4719
|
+
default: 'pi pi-search'
|
|
4720
|
+
},
|
|
4637
4721
|
loadingIcon: {
|
|
4638
4722
|
type: String,
|
|
4639
4723
|
default: 'pi pi-spinner pi-spin'
|
|
@@ -4793,7 +4877,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4793
4877
|
},
|
|
4794
4878
|
onFocus(event) {
|
|
4795
4879
|
this.focused = true;
|
|
4796
|
-
this.focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
4880
|
+
this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
4797
4881
|
this.overlayVisible && this.scrollInView(this.focusedOptionIndex);
|
|
4798
4882
|
this.$emit('focus', event);
|
|
4799
4883
|
},
|
|
@@ -5340,7 +5424,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5340
5424
|
];
|
|
5341
5425
|
},
|
|
5342
5426
|
dropdownIconClass() {
|
|
5343
|
-
return ['p-dropdown-trigger-icon', this.loading ? this.loadingIcon :
|
|
5427
|
+
return ['p-dropdown-trigger-icon', this.loading ? this.loadingIcon : this.dropdownIcon];
|
|
5344
5428
|
},
|
|
5345
5429
|
visibleOptions() {
|
|
5346
5430
|
const options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
|
|
@@ -5419,32 +5503,31 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5419
5503
|
};
|
|
5420
5504
|
const _hoisted_6 = { class: "p-dropdown-filter-container" };
|
|
5421
5505
|
const _hoisted_7 = ["value", "placeholder", "aria-owns", "aria-activedescendant"];
|
|
5422
|
-
const _hoisted_8 =
|
|
5423
|
-
const _hoisted_9 = {
|
|
5506
|
+
const _hoisted_8 = {
|
|
5424
5507
|
role: "status",
|
|
5425
5508
|
"aria-live": "polite",
|
|
5426
5509
|
class: "p-hidden-accessible"
|
|
5427
5510
|
};
|
|
5511
|
+
const _hoisted_9 = ["id"];
|
|
5428
5512
|
const _hoisted_10 = ["id"];
|
|
5429
|
-
const _hoisted_11 = ["id"];
|
|
5430
|
-
const _hoisted_12 =
|
|
5431
|
-
const _hoisted_13 = {
|
|
5513
|
+
const _hoisted_11 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove"];
|
|
5514
|
+
const _hoisted_12 = {
|
|
5432
5515
|
key: 0,
|
|
5433
5516
|
class: "p-dropdown-empty-message",
|
|
5434
5517
|
role: "option"
|
|
5435
5518
|
};
|
|
5436
|
-
const
|
|
5519
|
+
const _hoisted_13 = {
|
|
5437
5520
|
key: 1,
|
|
5438
5521
|
class: "p-dropdown-empty-message",
|
|
5439
5522
|
role: "option"
|
|
5440
5523
|
};
|
|
5441
|
-
const
|
|
5524
|
+
const _hoisted_14 = {
|
|
5442
5525
|
key: 0,
|
|
5443
5526
|
role: "status",
|
|
5444
5527
|
"aria-live": "polite",
|
|
5445
5528
|
class: "p-hidden-accessible"
|
|
5446
5529
|
};
|
|
5447
|
-
const
|
|
5530
|
+
const _hoisted_15 = {
|
|
5448
5531
|
role: "status",
|
|
5449
5532
|
"aria-live": "polite",
|
|
5450
5533
|
class: "p-hidden-accessible"
|
|
@@ -5515,7 +5598,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5515
5598
|
($props.showClear && $props.modelValue != null)
|
|
5516
5599
|
? (vue.openBlock(), vue.createElementBlock("i", vue.mergeProps({
|
|
5517
5600
|
key: 2,
|
|
5518
|
-
class:
|
|
5601
|
+
class: ['p-dropdown-clear-icon', $props.clearIcon],
|
|
5519
5602
|
onClick: _cache[7] || (_cache[7] = (...args) => ($options.onClearClick && $options.onClearClick(...args)))
|
|
5520
5603
|
}, $props.clearIconProps), null, 16))
|
|
5521
5604
|
: vue.createCommentVNode("", true),
|
|
@@ -5576,9 +5659,11 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5576
5659
|
onBlur: _cache[11] || (_cache[11] = (...args) => ($options.onFilterBlur && $options.onFilterBlur(...args))),
|
|
5577
5660
|
onInput: _cache[12] || (_cache[12] = (...args) => ($options.onFilterChange && $options.onFilterChange(...args)))
|
|
5578
5661
|
}, $props.filterInputProps), null, 16, _hoisted_7),
|
|
5579
|
-
|
|
5662
|
+
vue.createElementVNode("span", {
|
|
5663
|
+
class: vue.normalizeClass(['p-dropdown-filter-icon', $props.filterIcon])
|
|
5664
|
+
}, null, 2)
|
|
5580
5665
|
]),
|
|
5581
|
-
vue.createElementVNode("span",
|
|
5666
|
+
vue.createElementVNode("span", _hoisted_8, vue.toDisplayString($options.filterResultMessageText), 1)
|
|
5582
5667
|
]))
|
|
5583
5668
|
: vue.createCommentVNode("", true),
|
|
5584
5669
|
vue.createElementVNode("div", {
|
|
@@ -5617,7 +5702,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5617
5702
|
}, () => [
|
|
5618
5703
|
vue.createTextVNode(vue.toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 1)
|
|
5619
5704
|
])
|
|
5620
|
-
], 12,
|
|
5705
|
+
], 12, _hoisted_10))
|
|
5621
5706
|
: vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
|
|
5622
5707
|
key: 1,
|
|
5623
5708
|
id: $options.id + '_' + $options.getOptionIndex(i, getItemOptions),
|
|
@@ -5638,29 +5723,29 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5638
5723
|
}, () => [
|
|
5639
5724
|
vue.createTextVNode(vue.toDisplayString($options.getOptionLabel(option)), 1)
|
|
5640
5725
|
])
|
|
5641
|
-
], 46,
|
|
5726
|
+
], 46, _hoisted_11)), [
|
|
5642
5727
|
[_directive_ripple]
|
|
5643
5728
|
])
|
|
5644
5729
|
], 64))
|
|
5645
5730
|
}), 128)),
|
|
5646
5731
|
($data.filterValue && (!items || (items && items.length === 0)))
|
|
5647
|
-
? (vue.openBlock(), vue.createElementBlock("li",
|
|
5732
|
+
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_12, [
|
|
5648
5733
|
vue.renderSlot(_ctx.$slots, "emptyfilter", {}, () => [
|
|
5649
5734
|
vue.createTextVNode(vue.toDisplayString($options.emptyFilterMessageText), 1)
|
|
5650
5735
|
])
|
|
5651
5736
|
]))
|
|
5652
5737
|
: (!$props.options || ($props.options && $props.options.length === 0))
|
|
5653
|
-
? (vue.openBlock(), vue.createElementBlock("li",
|
|
5738
|
+
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_13, [
|
|
5654
5739
|
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
5655
5740
|
vue.createTextVNode(vue.toDisplayString($options.emptyMessageText), 1)
|
|
5656
5741
|
])
|
|
5657
5742
|
]))
|
|
5658
5743
|
: vue.createCommentVNode("", true)
|
|
5659
|
-
], 14,
|
|
5744
|
+
], 14, _hoisted_9),
|
|
5660
5745
|
(!$props.options || ($props.options && $props.options.length === 0))
|
|
5661
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5746
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14, vue.toDisplayString($options.emptyMessageText), 1))
|
|
5662
5747
|
: vue.createCommentVNode("", true),
|
|
5663
|
-
vue.createElementVNode("span",
|
|
5748
|
+
vue.createElementVNode("span", _hoisted_15, vue.toDisplayString($options.selectedMessageText), 1)
|
|
5664
5749
|
]),
|
|
5665
5750
|
_: 2
|
|
5666
5751
|
}, [
|
|
@@ -5732,7 +5817,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5732
5817
|
|
|
5733
5818
|
return script;
|
|
5734
5819
|
|
|
5735
|
-
})(primevue.
|
|
5820
|
+
})(primevue.api, primevue.overlayeventbus, primevue.portal, primevue.ripple, primevue.utils, primevue.virtualscroller, Vue);
|
|
5736
5821
|
|
|
5737
5822
|
this.primevue = this.primevue || {};
|
|
5738
5823
|
this.primevue.dialog = (function (vue, utils, Ripple, Portal) {
|
|
@@ -6286,7 +6371,7 @@ this.primevue.dialog = (function (vue, utils, Ripple, Portal) {
|
|
|
6286
6371
|
})(Vue, primevue.utils, primevue.ripple, primevue.portal);
|
|
6287
6372
|
|
|
6288
6373
|
this.primevue = this.primevue || {};
|
|
6289
|
-
this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
6374
|
+
this.primevue.paginator = (function (utils, vue, Ripple, Dropdown, InputNumber) {
|
|
6290
6375
|
'use strict';
|
|
6291
6376
|
|
|
6292
6377
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -6387,6 +6472,84 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6387
6472
|
script$8.render = render$8;
|
|
6388
6473
|
|
|
6389
6474
|
var script$7 = {
|
|
6475
|
+
name: 'JumpToPageDropdown',
|
|
6476
|
+
inheritAttrs: false,
|
|
6477
|
+
emits: ['page-change'],
|
|
6478
|
+
props: {
|
|
6479
|
+
page: Number,
|
|
6480
|
+
pageCount: Number,
|
|
6481
|
+
disabled: Boolean
|
|
6482
|
+
},
|
|
6483
|
+
methods: {
|
|
6484
|
+
onChange(value) {
|
|
6485
|
+
this.$emit('page-change', value);
|
|
6486
|
+
}
|
|
6487
|
+
},
|
|
6488
|
+
computed: {
|
|
6489
|
+
pageOptions() {
|
|
6490
|
+
let opts = [];
|
|
6491
|
+
|
|
6492
|
+
for (let i = 0; i < this.pageCount; i++) {
|
|
6493
|
+
opts.push({ label: String(i + 1), value: i });
|
|
6494
|
+
}
|
|
6495
|
+
|
|
6496
|
+
return opts;
|
|
6497
|
+
}
|
|
6498
|
+
},
|
|
6499
|
+
components: {
|
|
6500
|
+
JTPDropdown: Dropdown__default["default"]
|
|
6501
|
+
}
|
|
6502
|
+
};
|
|
6503
|
+
|
|
6504
|
+
function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6505
|
+
const _component_JTPDropdown = vue.resolveComponent("JTPDropdown");
|
|
6506
|
+
|
|
6507
|
+
return (vue.openBlock(), vue.createBlock(_component_JTPDropdown, {
|
|
6508
|
+
modelValue: $props.page,
|
|
6509
|
+
options: $options.pageOptions,
|
|
6510
|
+
optionLabel: "label",
|
|
6511
|
+
optionValue: "value",
|
|
6512
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ($options.onChange($event))),
|
|
6513
|
+
class: "p-paginator-page-options",
|
|
6514
|
+
disabled: $props.disabled
|
|
6515
|
+
}, null, 8, ["modelValue", "options", "disabled"]))
|
|
6516
|
+
}
|
|
6517
|
+
|
|
6518
|
+
script$7.render = render$7;
|
|
6519
|
+
|
|
6520
|
+
var script$6 = {
|
|
6521
|
+
name: 'JumpToPageInput',
|
|
6522
|
+
inheritAttrs: false,
|
|
6523
|
+
emits: ['page-change'],
|
|
6524
|
+
props: {
|
|
6525
|
+
page: Number,
|
|
6526
|
+
pageCount: Number,
|
|
6527
|
+
disabled: Boolean
|
|
6528
|
+
},
|
|
6529
|
+
methods: {
|
|
6530
|
+
onChange(value) {
|
|
6531
|
+
this.$emit('page-change', value - 1);
|
|
6532
|
+
}
|
|
6533
|
+
},
|
|
6534
|
+
components: {
|
|
6535
|
+
JTPInput: InputNumber__default["default"]
|
|
6536
|
+
}
|
|
6537
|
+
};
|
|
6538
|
+
|
|
6539
|
+
function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6540
|
+
const _component_JTPInput = vue.resolveComponent("JTPInput");
|
|
6541
|
+
|
|
6542
|
+
return (vue.openBlock(), vue.createBlock(_component_JTPInput, {
|
|
6543
|
+
modelValue: $props.page,
|
|
6544
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ($options.onChange($event))),
|
|
6545
|
+
class: "p-paginator-page-input",
|
|
6546
|
+
disabled: $props.disabled
|
|
6547
|
+
}, null, 8, ["modelValue", "disabled"]))
|
|
6548
|
+
}
|
|
6549
|
+
|
|
6550
|
+
script$6.render = render$6;
|
|
6551
|
+
|
|
6552
|
+
var script$5 = {
|
|
6390
6553
|
name: 'LastPageLink',
|
|
6391
6554
|
computed: {
|
|
6392
6555
|
containerClass() {
|
|
@@ -6408,7 +6571,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6408
6571
|
_hoisted_1$4
|
|
6409
6572
|
];
|
|
6410
6573
|
|
|
6411
|
-
function render$
|
|
6574
|
+
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6412
6575
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
6413
6576
|
|
|
6414
6577
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -6419,9 +6582,9 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6419
6582
|
])
|
|
6420
6583
|
}
|
|
6421
6584
|
|
|
6422
|
-
script$
|
|
6585
|
+
script$5.render = render$5;
|
|
6423
6586
|
|
|
6424
|
-
var script$
|
|
6587
|
+
var script$4 = {
|
|
6425
6588
|
name: 'NextPageLink',
|
|
6426
6589
|
computed: {
|
|
6427
6590
|
containerClass() {
|
|
@@ -6443,7 +6606,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6443
6606
|
_hoisted_1$3
|
|
6444
6607
|
];
|
|
6445
6608
|
|
|
6446
|
-
function render$
|
|
6609
|
+
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6447
6610
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
6448
6611
|
|
|
6449
6612
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -6454,9 +6617,9 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6454
6617
|
])
|
|
6455
6618
|
}
|
|
6456
6619
|
|
|
6457
|
-
script$
|
|
6620
|
+
script$4.render = render$4;
|
|
6458
6621
|
|
|
6459
|
-
var script$
|
|
6622
|
+
var script$3 = {
|
|
6460
6623
|
name: 'PageLinks',
|
|
6461
6624
|
inheritAttrs: false,
|
|
6462
6625
|
emits: ['click'],
|
|
@@ -6480,7 +6643,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6480
6643
|
const _hoisted_1$2 = { class: "p-paginator-pages" };
|
|
6481
6644
|
const _hoisted_2$2 = ["onClick"];
|
|
6482
6645
|
|
|
6483
|
-
function render$
|
|
6646
|
+
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6484
6647
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
6485
6648
|
|
|
6486
6649
|
return (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$2, [
|
|
@@ -6499,9 +6662,9 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6499
6662
|
]))
|
|
6500
6663
|
}
|
|
6501
6664
|
|
|
6502
|
-
script$
|
|
6665
|
+
script$3.render = render$3;
|
|
6503
6666
|
|
|
6504
|
-
var script$
|
|
6667
|
+
var script$2 = {
|
|
6505
6668
|
name: 'PrevPageLink',
|
|
6506
6669
|
computed: {
|
|
6507
6670
|
containerClass() {
|
|
@@ -6523,7 +6686,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6523
6686
|
_hoisted_1$1
|
|
6524
6687
|
];
|
|
6525
6688
|
|
|
6526
|
-
function render$
|
|
6689
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6527
6690
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
6528
6691
|
|
|
6529
6692
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -6534,9 +6697,9 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6534
6697
|
])
|
|
6535
6698
|
}
|
|
6536
6699
|
|
|
6537
|
-
script$
|
|
6700
|
+
script$2.render = render$2;
|
|
6538
6701
|
|
|
6539
|
-
var script$
|
|
6702
|
+
var script$1 = {
|
|
6540
6703
|
name: 'RowsPerPageDropdown',
|
|
6541
6704
|
inheritAttrs: false,
|
|
6542
6705
|
emits: ['rows-change'],
|
|
@@ -6568,7 +6731,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6568
6731
|
}
|
|
6569
6732
|
};
|
|
6570
6733
|
|
|
6571
|
-
function render$
|
|
6734
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6572
6735
|
const _component_RPPDropdown = vue.resolveComponent("RPPDropdown");
|
|
6573
6736
|
|
|
6574
6737
|
return (vue.openBlock(), vue.createBlock(_component_RPPDropdown, {
|
|
@@ -6582,84 +6745,6 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6582
6745
|
}, null, 8, ["modelValue", "options", "disabled"]))
|
|
6583
6746
|
}
|
|
6584
6747
|
|
|
6585
|
-
script$3.render = render$3;
|
|
6586
|
-
|
|
6587
|
-
var script$2 = {
|
|
6588
|
-
name: 'JumpToPageDropdown',
|
|
6589
|
-
inheritAttrs: false,
|
|
6590
|
-
emits: ['page-change'],
|
|
6591
|
-
props: {
|
|
6592
|
-
page: Number,
|
|
6593
|
-
pageCount: Number,
|
|
6594
|
-
disabled: Boolean
|
|
6595
|
-
},
|
|
6596
|
-
methods: {
|
|
6597
|
-
onChange(value) {
|
|
6598
|
-
this.$emit('page-change', value);
|
|
6599
|
-
}
|
|
6600
|
-
},
|
|
6601
|
-
computed: {
|
|
6602
|
-
pageOptions() {
|
|
6603
|
-
let opts = [];
|
|
6604
|
-
|
|
6605
|
-
for (let i = 0; i < this.pageCount; i++) {
|
|
6606
|
-
opts.push({ label: String(i + 1), value: i });
|
|
6607
|
-
}
|
|
6608
|
-
|
|
6609
|
-
return opts;
|
|
6610
|
-
}
|
|
6611
|
-
},
|
|
6612
|
-
components: {
|
|
6613
|
-
JTPDropdown: Dropdown__default["default"]
|
|
6614
|
-
}
|
|
6615
|
-
};
|
|
6616
|
-
|
|
6617
|
-
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6618
|
-
const _component_JTPDropdown = vue.resolveComponent("JTPDropdown");
|
|
6619
|
-
|
|
6620
|
-
return (vue.openBlock(), vue.createBlock(_component_JTPDropdown, {
|
|
6621
|
-
modelValue: $props.page,
|
|
6622
|
-
options: $options.pageOptions,
|
|
6623
|
-
optionLabel: "label",
|
|
6624
|
-
optionValue: "value",
|
|
6625
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ($options.onChange($event))),
|
|
6626
|
-
class: "p-paginator-page-options",
|
|
6627
|
-
disabled: $props.disabled
|
|
6628
|
-
}, null, 8, ["modelValue", "options", "disabled"]))
|
|
6629
|
-
}
|
|
6630
|
-
|
|
6631
|
-
script$2.render = render$2;
|
|
6632
|
-
|
|
6633
|
-
var script$1 = {
|
|
6634
|
-
name: 'JumpToPageInput',
|
|
6635
|
-
inheritAttrs: false,
|
|
6636
|
-
emits: ['page-change'],
|
|
6637
|
-
props: {
|
|
6638
|
-
page: Number,
|
|
6639
|
-
pageCount: Number,
|
|
6640
|
-
disabled: Boolean
|
|
6641
|
-
},
|
|
6642
|
-
methods: {
|
|
6643
|
-
onChange(value) {
|
|
6644
|
-
this.$emit('page-change', value - 1);
|
|
6645
|
-
}
|
|
6646
|
-
},
|
|
6647
|
-
components: {
|
|
6648
|
-
JTPInput: InputNumber__default["default"]
|
|
6649
|
-
}
|
|
6650
|
-
};
|
|
6651
|
-
|
|
6652
|
-
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6653
|
-
const _component_JTPInput = vue.resolveComponent("JTPInput");
|
|
6654
|
-
|
|
6655
|
-
return (vue.openBlock(), vue.createBlock(_component_JTPInput, {
|
|
6656
|
-
modelValue: $props.page,
|
|
6657
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ($options.onChange($event))),
|
|
6658
|
-
class: "p-paginator-page-input",
|
|
6659
|
-
disabled: $props.disabled
|
|
6660
|
-
}, null, 8, ["modelValue", "disabled"]))
|
|
6661
|
-
}
|
|
6662
|
-
|
|
6663
6748
|
script$1.render = render$1;
|
|
6664
6749
|
|
|
6665
6750
|
var script = {
|
|
@@ -6687,7 +6772,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6687
6772
|
default: null
|
|
6688
6773
|
},
|
|
6689
6774
|
template: {
|
|
6690
|
-
type: String,
|
|
6775
|
+
type: [Object, String],
|
|
6691
6776
|
default: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown'
|
|
6692
6777
|
},
|
|
6693
6778
|
currentPageReportTemplate: {
|
|
@@ -6718,6 +6803,10 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6718
6803
|
}
|
|
6719
6804
|
}
|
|
6720
6805
|
},
|
|
6806
|
+
mounted() {
|
|
6807
|
+
this.setPaginatorAttribute();
|
|
6808
|
+
this.createStyle();
|
|
6809
|
+
},
|
|
6721
6810
|
methods: {
|
|
6722
6811
|
changePage(p) {
|
|
6723
6812
|
const pc = this.pageCount;
|
|
@@ -6736,6 +6825,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6736
6825
|
this.$emit('page', state);
|
|
6737
6826
|
}
|
|
6738
6827
|
},
|
|
6828
|
+
|
|
6739
6829
|
changePageToFirst(event) {
|
|
6740
6830
|
if (!this.isFirstPage) {
|
|
6741
6831
|
this.changePage(0);
|
|
@@ -6765,30 +6855,110 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6765
6855
|
onRowChange(value) {
|
|
6766
6856
|
this.d_rows = value;
|
|
6767
6857
|
this.changePage(this.page);
|
|
6768
|
-
}
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6858
|
+
},
|
|
6859
|
+
createStyle() {
|
|
6860
|
+
if (this.hasBreakpoints()) {
|
|
6861
|
+
this.styleElement = document.createElement('style');
|
|
6862
|
+
this.styleElement.type = 'text/css';
|
|
6863
|
+
document.head.appendChild(this.styleElement);
|
|
6773
6864
|
|
|
6774
|
-
|
|
6775
|
-
keys.push(value.trim());
|
|
6776
|
-
});
|
|
6865
|
+
let innerHTML = '';
|
|
6777
6866
|
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6867
|
+
const keys = Object.keys(this.template);
|
|
6868
|
+
const sortedBreakpoints = {};
|
|
6869
|
+
|
|
6870
|
+
keys.sort((a, b) => parseInt(a) - parseInt(b)).forEach((key) => {
|
|
6871
|
+
sortedBreakpoints[key] = this.template[key];
|
|
6872
|
+
});
|
|
6873
|
+
|
|
6874
|
+
for (const [index, [key]] of Object.entries(Object.entries(sortedBreakpoints))) {
|
|
6875
|
+
const minValue = Object.entries(sortedBreakpoints)[index - 1] ? `and (min-width:${Object.keys(sortedBreakpoints)[index - 1]})` : '';
|
|
6876
|
+
|
|
6877
|
+
if (key === 'default') {
|
|
6878
|
+
innerHTML += `
|
|
6879
|
+
@media screen ${minValue} {
|
|
6880
|
+
.paginator[${this.attributeSelector}],
|
|
6881
|
+
.p-paginator-default{
|
|
6882
|
+
display: flex !important;
|
|
6883
|
+
}
|
|
6884
|
+
}
|
|
6885
|
+
`;
|
|
6886
|
+
} else {
|
|
6887
|
+
innerHTML += `
|
|
6888
|
+
.paginator[${this.attributeSelector}], .p-paginator-${key} {
|
|
6889
|
+
display: none !important;
|
|
6890
|
+
}
|
|
6891
|
+
@media screen ${minValue} and (max-width: ${key}) {
|
|
6892
|
+
.paginator[${this.attributeSelector}], .p-paginator-${key} {
|
|
6893
|
+
display: flex !important;
|
|
6894
|
+
}
|
|
6895
|
+
.paginator[${this.attributeSelector}],
|
|
6896
|
+
.p-paginator-default{
|
|
6897
|
+
display: none !important;
|
|
6898
|
+
}
|
|
6899
|
+
}
|
|
6900
|
+
`;
|
|
6901
|
+
}
|
|
6902
|
+
}
|
|
6903
|
+
|
|
6904
|
+
this.styleElement.innerHTML = innerHTML;
|
|
6905
|
+
}
|
|
6906
|
+
},
|
|
6907
|
+
hasBreakpoints() {
|
|
6908
|
+
return typeof this.template === 'object';
|
|
6909
|
+
},
|
|
6910
|
+
getPaginatorClasses(key) {
|
|
6911
|
+
return [
|
|
6912
|
+
{
|
|
6913
|
+
'p-paginator-default': !this.hasBreakpoints(),
|
|
6914
|
+
[`p-paginator-${key}`]: this.hasBreakpoints()
|
|
6915
|
+
}
|
|
6916
|
+
];
|
|
6917
|
+
},
|
|
6918
|
+
setPaginatorAttribute() {
|
|
6919
|
+
[...this.$refs.paginator].forEach((el) => {
|
|
6920
|
+
el.setAttribute(this.attributeSelector, '');
|
|
6921
|
+
});
|
|
6922
|
+
}
|
|
6923
|
+
},
|
|
6924
|
+
computed: {
|
|
6925
|
+
templateItems() {
|
|
6926
|
+
let keys = {};
|
|
6927
|
+
|
|
6928
|
+
if (this.hasBreakpoints()) {
|
|
6929
|
+
keys = this.template;
|
|
6930
|
+
|
|
6931
|
+
if (!keys.default) {
|
|
6932
|
+
keys.default = 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown';
|
|
6933
|
+
}
|
|
6934
|
+
|
|
6935
|
+
for (const item in keys) {
|
|
6936
|
+
keys[item] = this.template[item].split(' ').map((value) => {
|
|
6937
|
+
return value.trim();
|
|
6938
|
+
});
|
|
6939
|
+
}
|
|
6940
|
+
|
|
6941
|
+
return keys;
|
|
6942
|
+
}
|
|
6943
|
+
|
|
6944
|
+
keys['default'] = this.template.split(' ').map((value) => {
|
|
6945
|
+
return value.trim();
|
|
6946
|
+
});
|
|
6947
|
+
|
|
6948
|
+
return keys;
|
|
6949
|
+
},
|
|
6950
|
+
page() {
|
|
6951
|
+
return Math.floor(this.d_first / this.d_rows);
|
|
6952
|
+
},
|
|
6953
|
+
pageCount() {
|
|
6954
|
+
return Math.ceil(this.totalRecords / this.d_rows);
|
|
6955
|
+
},
|
|
6956
|
+
isFirstPage() {
|
|
6957
|
+
return this.page === 0;
|
|
6958
|
+
},
|
|
6959
|
+
isLastPage() {
|
|
6960
|
+
return this.page === this.pageCount - 1;
|
|
6961
|
+
},
|
|
6792
6962
|
calculatePageLinkBoundaries() {
|
|
6793
6963
|
const numberOfPages = this.pageCount;
|
|
6794
6964
|
const visiblePages = Math.min(this.pageLinkSize, numberOfPages);
|
|
@@ -6828,25 +6998,25 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6828
6998
|
},
|
|
6829
6999
|
currentPage() {
|
|
6830
7000
|
return this.pageCount > 0 ? this.page + 1 : 0;
|
|
7001
|
+
},
|
|
7002
|
+
attributeSelector() {
|
|
7003
|
+
return utils.UniqueComponentId();
|
|
6831
7004
|
}
|
|
6832
7005
|
},
|
|
6833
7006
|
components: {
|
|
6834
7007
|
CurrentPageReport: script$9,
|
|
6835
7008
|
FirstPageLink: script$8,
|
|
6836
|
-
LastPageLink: script$
|
|
6837
|
-
NextPageLink: script$
|
|
6838
|
-
PageLinks: script$
|
|
6839
|
-
PrevPageLink: script$
|
|
6840
|
-
RowsPerPageDropdown: script$
|
|
6841
|
-
JumpToPageDropdown: script$
|
|
6842
|
-
JumpToPageInput: script$
|
|
7009
|
+
LastPageLink: script$5,
|
|
7010
|
+
NextPageLink: script$4,
|
|
7011
|
+
PageLinks: script$3,
|
|
7012
|
+
PrevPageLink: script$2,
|
|
7013
|
+
RowsPerPageDropdown: script$1,
|
|
7014
|
+
JumpToPageDropdown: script$7,
|
|
7015
|
+
JumpToPageInput: script$6
|
|
6843
7016
|
}
|
|
6844
7017
|
};
|
|
6845
7018
|
|
|
6846
|
-
const _hoisted_1 = {
|
|
6847
|
-
key: 0,
|
|
6848
|
-
class: "p-paginator p-component"
|
|
6849
|
-
};
|
|
7019
|
+
const _hoisted_1 = { key: 0 };
|
|
6850
7020
|
const _hoisted_2 = {
|
|
6851
7021
|
key: 0,
|
|
6852
7022
|
class: "p-paginator-left-content"
|
|
@@ -6869,86 +7039,95 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6869
7039
|
|
|
6870
7040
|
return ($props.alwaysShow ? true : $options.pageLinks && $options.pageLinks.length > 1)
|
|
6871
7041
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
6872
|
-
(
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
(
|
|
6880
|
-
? (vue.openBlock(), vue.
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
:
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
: (item === 'NextPageLink')
|
|
6892
|
-
? (vue.openBlock(), vue.createBlock(_component_NextPageLink, {
|
|
6893
|
-
key: 2,
|
|
6894
|
-
onClick: _cache[2] || (_cache[2] = $event => ($options.changePageToNext($event))),
|
|
6895
|
-
disabled: $options.isLastPage || $options.empty
|
|
7042
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.templateItems, (value, key) => {
|
|
7043
|
+
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
7044
|
+
key: key,
|
|
7045
|
+
ref_for: true,
|
|
7046
|
+
ref: "paginator",
|
|
7047
|
+
class: vue.normalizeClass(["p-paginator p-component", $options.getPaginatorClasses(key)])
|
|
7048
|
+
}, [
|
|
7049
|
+
(_ctx.$slots.start)
|
|
7050
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
7051
|
+
vue.renderSlot(_ctx.$slots, "start", { state: $options.currentState })
|
|
7052
|
+
]))
|
|
7053
|
+
: vue.createCommentVNode("", true),
|
|
7054
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(value, (item) => {
|
|
7055
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: item }, [
|
|
7056
|
+
(item === 'FirstPageLink')
|
|
7057
|
+
? (vue.openBlock(), vue.createBlock(_component_FirstPageLink, {
|
|
7058
|
+
key: 0,
|
|
7059
|
+
onClick: _cache[0] || (_cache[0] = $event => ($options.changePageToFirst($event))),
|
|
7060
|
+
disabled: $options.isFirstPage || $options.empty
|
|
6896
7061
|
}, null, 8, ["disabled"]))
|
|
6897
|
-
: (item === '
|
|
6898
|
-
? (vue.openBlock(), vue.createBlock(
|
|
6899
|
-
key:
|
|
6900
|
-
onClick: _cache[
|
|
6901
|
-
disabled: $options.
|
|
7062
|
+
: (item === 'PrevPageLink')
|
|
7063
|
+
? (vue.openBlock(), vue.createBlock(_component_PrevPageLink, {
|
|
7064
|
+
key: 1,
|
|
7065
|
+
onClick: _cache[1] || (_cache[1] = $event => ($options.changePageToPrev($event))),
|
|
7066
|
+
disabled: $options.isFirstPage || $options.empty
|
|
6902
7067
|
}, null, 8, ["disabled"]))
|
|
6903
|
-
: (item === '
|
|
6904
|
-
? (vue.openBlock(), vue.createBlock(
|
|
6905
|
-
key:
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
disabled: $options.empty
|
|
6928
|
-
}, null, 8, ["rows", "options", "disabled"]))
|
|
6929
|
-
: (item === 'JumpToPageDropdown')
|
|
6930
|
-
? (vue.openBlock(), vue.createBlock(_component_JumpToPageDropdown, {
|
|
6931
|
-
key: 7,
|
|
7068
|
+
: (item === 'NextPageLink')
|
|
7069
|
+
? (vue.openBlock(), vue.createBlock(_component_NextPageLink, {
|
|
7070
|
+
key: 2,
|
|
7071
|
+
onClick: _cache[2] || (_cache[2] = $event => ($options.changePageToNext($event))),
|
|
7072
|
+
disabled: $options.isLastPage || $options.empty
|
|
7073
|
+
}, null, 8, ["disabled"]))
|
|
7074
|
+
: (item === 'LastPageLink')
|
|
7075
|
+
? (vue.openBlock(), vue.createBlock(_component_LastPageLink, {
|
|
7076
|
+
key: 3,
|
|
7077
|
+
onClick: _cache[3] || (_cache[3] = $event => ($options.changePageToLast($event))),
|
|
7078
|
+
disabled: $options.isLastPage || $options.empty
|
|
7079
|
+
}, null, 8, ["disabled"]))
|
|
7080
|
+
: (item === 'PageLinks')
|
|
7081
|
+
? (vue.openBlock(), vue.createBlock(_component_PageLinks, {
|
|
7082
|
+
key: 4,
|
|
7083
|
+
value: $options.pageLinks,
|
|
7084
|
+
page: $options.page,
|
|
7085
|
+
onClick: _cache[4] || (_cache[4] = $event => ($options.changePageLink($event)))
|
|
7086
|
+
}, null, 8, ["value", "page"]))
|
|
7087
|
+
: (item === 'CurrentPageReport')
|
|
7088
|
+
? (vue.openBlock(), vue.createBlock(_component_CurrentPageReport, {
|
|
7089
|
+
key: 5,
|
|
7090
|
+
template: $props.currentPageReportTemplate,
|
|
7091
|
+
currentPage: $options.currentPage,
|
|
6932
7092
|
page: $options.page,
|
|
6933
7093
|
pageCount: $options.pageCount,
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
7094
|
+
first: $data.d_first,
|
|
7095
|
+
rows: $data.d_rows,
|
|
7096
|
+
totalRecords: $props.totalRecords
|
|
7097
|
+
}, null, 8, ["template", "currentPage", "page", "pageCount", "first", "rows", "totalRecords"]))
|
|
7098
|
+
: (item === 'RowsPerPageDropdown' && $props.rowsPerPageOptions)
|
|
7099
|
+
? (vue.openBlock(), vue.createBlock(_component_RowsPerPageDropdown, {
|
|
7100
|
+
key: 6,
|
|
7101
|
+
rows: $data.d_rows,
|
|
7102
|
+
options: $props.rowsPerPageOptions,
|
|
7103
|
+
onRowsChange: _cache[5] || (_cache[5] = $event => ($options.onRowChange($event))),
|
|
6942
7104
|
disabled: $options.empty
|
|
6943
|
-
}, null, 8, ["
|
|
6944
|
-
:
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
7105
|
+
}, null, 8, ["rows", "options", "disabled"]))
|
|
7106
|
+
: (item === 'JumpToPageDropdown')
|
|
7107
|
+
? (vue.openBlock(), vue.createBlock(_component_JumpToPageDropdown, {
|
|
7108
|
+
key: 7,
|
|
7109
|
+
page: $options.page,
|
|
7110
|
+
pageCount: $options.pageCount,
|
|
7111
|
+
onPageChange: _cache[6] || (_cache[6] = $event => ($options.changePage($event))),
|
|
7112
|
+
disabled: $options.empty
|
|
7113
|
+
}, null, 8, ["page", "pageCount", "disabled"]))
|
|
7114
|
+
: (item === 'JumpToPageInput')
|
|
7115
|
+
? (vue.openBlock(), vue.createBlock(_component_JumpToPageInput, {
|
|
7116
|
+
key: 8,
|
|
7117
|
+
page: $options.currentPage,
|
|
7118
|
+
onPageChange: _cache[7] || (_cache[7] = $event => ($options.changePage($event))),
|
|
7119
|
+
disabled: $options.empty
|
|
7120
|
+
}, null, 8, ["page", "disabled"]))
|
|
7121
|
+
: vue.createCommentVNode("", true)
|
|
7122
|
+
], 64))
|
|
7123
|
+
}), 128)),
|
|
7124
|
+
(_ctx.$slots.end)
|
|
7125
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
7126
|
+
vue.renderSlot(_ctx.$slots, "end", { state: $options.currentState })
|
|
7127
|
+
]))
|
|
7128
|
+
: vue.createCommentVNode("", true)
|
|
7129
|
+
], 2))
|
|
7130
|
+
}), 128))
|
|
6952
7131
|
]))
|
|
6953
7132
|
: vue.createCommentVNode("", true)
|
|
6954
7133
|
}
|
|
@@ -6980,14 +7159,14 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
6980
7159
|
}
|
|
6981
7160
|
}
|
|
6982
7161
|
|
|
6983
|
-
var css_248z = "\n.p-paginator {\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 -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n margin-right: auto;\n}\n.p-paginator-right-content {\n margin-left: auto;\n}\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev,\n.p-paginator-current {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-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 line-height: 1;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n position: relative;\n}\n.p-paginator-element:focus {\n z-index: 1;\n position: relative;\n}\n";
|
|
7162
|
+
var css_248z = "\n.p-paginator-default {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-paginator {\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 -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n margin-right: auto;\n}\n.p-paginator-right-content {\n margin-left: auto;\n}\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev,\n.p-paginator-current {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-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 line-height: 1;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n position: relative;\n}\n.p-paginator-element:focus {\n z-index: 1;\n position: relative;\n}\n";
|
|
6984
7163
|
styleInject(css_248z);
|
|
6985
7164
|
|
|
6986
7165
|
script.render = render;
|
|
6987
7166
|
|
|
6988
7167
|
return script;
|
|
6989
7168
|
|
|
6990
|
-
})(Vue, primevue.ripple, primevue.dropdown, primevue.inputnumber);
|
|
7169
|
+
})(primevue.utils, Vue, primevue.ripple, primevue.dropdown, primevue.inputnumber);
|
|
6991
7170
|
|
|
6992
7171
|
this.primevue = this.primevue || {};
|
|
6993
7172
|
this.primevue.tree = (function (utils, Ripple, vue) {
|
|
@@ -7728,37 +7907,46 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
7728
7907
|
})(primevue.utils, primevue.ripple, Vue);
|
|
7729
7908
|
|
|
7730
7909
|
this.primevue = this.primevue || {};
|
|
7731
|
-
this.primevue.menu = (function (
|
|
7910
|
+
this.primevue.menu = (function (OverlayEventBus, Portal, utils, Ripple, vue) {
|
|
7732
7911
|
'use strict';
|
|
7733
7912
|
|
|
7734
7913
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7735
7914
|
|
|
7736
7915
|
var OverlayEventBus__default = /*#__PURE__*/_interopDefaultLegacy(OverlayEventBus);
|
|
7737
|
-
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
7738
7916
|
var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
|
|
7917
|
+
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
7739
7918
|
|
|
7740
7919
|
var script$1 = {
|
|
7741
7920
|
name: 'Menuitem',
|
|
7742
7921
|
inheritAttrs: false,
|
|
7743
|
-
emits: ['click'],
|
|
7922
|
+
emits: ['item-click'],
|
|
7744
7923
|
props: {
|
|
7745
7924
|
item: null,
|
|
7746
7925
|
template: null,
|
|
7747
|
-
exact: null
|
|
7926
|
+
exact: null,
|
|
7927
|
+
id: null,
|
|
7928
|
+
focusedOptionId: null
|
|
7748
7929
|
},
|
|
7749
7930
|
methods: {
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7931
|
+
getItemProp(processedItem, name) {
|
|
7932
|
+
return processedItem && processedItem.item ? utils.ObjectUtils.getItemValue(processedItem.item[name]) : undefined;
|
|
7933
|
+
},
|
|
7934
|
+
onItemActionClick(event, navigate) {
|
|
7935
|
+
navigate && navigate(event);
|
|
7936
|
+
},
|
|
7937
|
+
onItemClick(event) {
|
|
7938
|
+
const command = this.getItemProp(this.item, 'command');
|
|
7939
|
+
|
|
7940
|
+
command && command({ originalEvent: event, item: this.item.item });
|
|
7941
|
+
this.$emit('item-click', { originalEvent: event, item: this.item, id: this.id });
|
|
7942
|
+
},
|
|
7943
|
+
containerClass() {
|
|
7944
|
+
return ['p-menuitem', this.item.class, { 'p-focus': this.id === this.focusedOptionId, 'p-disabled': this.disabled() }];
|
|
7756
7945
|
},
|
|
7757
|
-
linkClass(
|
|
7946
|
+
linkClass(routerProps) {
|
|
7758
7947
|
return [
|
|
7759
7948
|
'p-menuitem-link',
|
|
7760
7949
|
{
|
|
7761
|
-
'p-disabled': this.disabled(item),
|
|
7762
7950
|
'router-link-active': routerProps && routerProps.isActive,
|
|
7763
7951
|
'router-link-active-exact': this.exact && routerProps && routerProps.isExactActive
|
|
7764
7952
|
}
|
|
@@ -7767,27 +7955,23 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7767
7955
|
visible() {
|
|
7768
7956
|
return typeof this.item.visible === 'function' ? this.item.visible() : this.item.visible !== false;
|
|
7769
7957
|
},
|
|
7770
|
-
disabled(
|
|
7771
|
-
return typeof item.disabled === 'function' ? item.disabled() : item.disabled;
|
|
7958
|
+
disabled() {
|
|
7959
|
+
return typeof this.item.disabled === 'function' ? this.item.disabled() : this.item.disabled;
|
|
7772
7960
|
},
|
|
7773
7961
|
label() {
|
|
7774
7962
|
return typeof this.item.label === 'function' ? this.item.label() : this.item.label;
|
|
7775
7963
|
}
|
|
7776
7964
|
},
|
|
7777
|
-
computed: {
|
|
7778
|
-
containerClass() {
|
|
7779
|
-
return ['p-menuitem', this.item.class];
|
|
7780
|
-
}
|
|
7781
|
-
},
|
|
7782
7965
|
directives: {
|
|
7783
7966
|
ripple: Ripple__default["default"]
|
|
7784
7967
|
}
|
|
7785
7968
|
};
|
|
7786
7969
|
|
|
7787
|
-
const _hoisted_1$1 = ["
|
|
7788
|
-
const _hoisted_2$1 =
|
|
7789
|
-
const _hoisted_3 =
|
|
7790
|
-
const _hoisted_4 =
|
|
7970
|
+
const _hoisted_1$1 = ["id", "aria-label", "aria-disabled"];
|
|
7971
|
+
const _hoisted_2$1 = ["href", "onClick"];
|
|
7972
|
+
const _hoisted_3$1 = { class: "p-menuitem-text" };
|
|
7973
|
+
const _hoisted_4 = ["href", "target"];
|
|
7974
|
+
const _hoisted_5 = { class: "p-menuitem-text" };
|
|
7791
7975
|
|
|
7792
7976
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7793
7977
|
const _component_router_link = vue.resolveComponent("router-link");
|
|
@@ -7796,63 +7980,71 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7796
7980
|
return ($options.visible())
|
|
7797
7981
|
? (vue.openBlock(), vue.createElementBlock("li", {
|
|
7798
7982
|
key: 0,
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7983
|
+
id: $props.id,
|
|
7984
|
+
class: vue.normalizeClass($options.containerClass()),
|
|
7985
|
+
role: "menuitem",
|
|
7986
|
+
style: vue.normalizeStyle($props.item.style),
|
|
7987
|
+
"aria-label": $options.label(),
|
|
7988
|
+
"aria-disabled": $options.disabled()
|
|
7802
7989
|
}, [
|
|
7803
|
-
(
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7990
|
+
vue.createElementVNode("div", {
|
|
7991
|
+
class: "p-menuitem-content",
|
|
7992
|
+
onClick: _cache[0] || (_cache[0] = $event => ($options.onItemClick($event)))
|
|
7993
|
+
}, [
|
|
7994
|
+
(!$props.template)
|
|
7995
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
7996
|
+
($props.item.to && !$options.disabled())
|
|
7997
|
+
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
7998
|
+
key: 0,
|
|
7999
|
+
to: $props.item.to,
|
|
8000
|
+
custom: ""
|
|
8001
|
+
}, {
|
|
8002
|
+
default: vue.withCtx(({ navigate, href, isActive, isExactActive }) => [
|
|
8003
|
+
vue.withDirectives((vue.openBlock(), vue.createElementBlock("a", {
|
|
8004
|
+
href: href,
|
|
8005
|
+
class: vue.normalizeClass($options.linkClass({ isActive, isExactActive })),
|
|
8006
|
+
tabindex: "-1",
|
|
8007
|
+
"aria-hidden": "true",
|
|
8008
|
+
onClick: $event => ($options.onItemActionClick($event, navigate))
|
|
8009
|
+
}, [
|
|
8010
|
+
($props.item.icon)
|
|
8011
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
8012
|
+
key: 0,
|
|
8013
|
+
class: vue.normalizeClass(['p-menuitem-icon', $props.item.icon])
|
|
8014
|
+
}, null, 2))
|
|
8015
|
+
: vue.createCommentVNode("", true),
|
|
8016
|
+
vue.createElementVNode("span", _hoisted_3$1, vue.toDisplayString($options.label()), 1)
|
|
8017
|
+
], 10, _hoisted_2$1)), [
|
|
8018
|
+
[_directive_ripple]
|
|
8019
|
+
])
|
|
8020
|
+
]),
|
|
8021
|
+
_: 1
|
|
8022
|
+
}, 8, ["to"]))
|
|
8023
|
+
: vue.withDirectives((vue.openBlock(), vue.createElementBlock("a", {
|
|
8024
|
+
key: 1,
|
|
8025
|
+
href: $props.item.url,
|
|
8026
|
+
class: vue.normalizeClass($options.linkClass()),
|
|
8027
|
+
target: $props.item.target,
|
|
8028
|
+
tabindex: "-1",
|
|
8029
|
+
"aria-hidden": "true"
|
|
8030
|
+
}, [
|
|
8031
|
+
($props.item.icon)
|
|
8032
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
8033
|
+
key: 0,
|
|
8034
|
+
class: vue.normalizeClass(['p-menuitem-icon', $props.item.icon])
|
|
8035
|
+
}, null, 2))
|
|
8036
|
+
: vue.createCommentVNode("", true),
|
|
8037
|
+
vue.createElementVNode("span", _hoisted_5, vue.toDisplayString($options.label()), 1)
|
|
8038
|
+
], 10, _hoisted_4)), [
|
|
8039
|
+
[_directive_ripple]
|
|
8040
|
+
])
|
|
8041
|
+
], 64))
|
|
8042
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.template), {
|
|
8043
|
+
key: 1,
|
|
8044
|
+
item: $props.item
|
|
8045
|
+
}, null, 8, ["item"]))
|
|
8046
|
+
])
|
|
8047
|
+
], 14, _hoisted_1$1))
|
|
7856
8048
|
: vue.createCommentVNode("", true)
|
|
7857
8049
|
}
|
|
7858
8050
|
|
|
@@ -7861,7 +8053,7 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7861
8053
|
var script = {
|
|
7862
8054
|
name: 'Menu',
|
|
7863
8055
|
inheritAttrs: false,
|
|
7864
|
-
emits: ['show', 'hide'],
|
|
8056
|
+
emits: ['show', 'hide', 'focus', 'blur'],
|
|
7865
8057
|
props: {
|
|
7866
8058
|
popup: {
|
|
7867
8059
|
type: Boolean,
|
|
@@ -7886,11 +8078,26 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7886
8078
|
exact: {
|
|
7887
8079
|
type: Boolean,
|
|
7888
8080
|
default: true
|
|
8081
|
+
},
|
|
8082
|
+
tabindex: {
|
|
8083
|
+
type: Number,
|
|
8084
|
+
default: 0
|
|
8085
|
+
},
|
|
8086
|
+
'aria-label': {
|
|
8087
|
+
type: String,
|
|
8088
|
+
default: null
|
|
8089
|
+
},
|
|
8090
|
+
'aria-labelledby': {
|
|
8091
|
+
type: String,
|
|
8092
|
+
default: null
|
|
7889
8093
|
}
|
|
7890
8094
|
},
|
|
7891
8095
|
data() {
|
|
7892
8096
|
return {
|
|
7893
|
-
overlayVisible: false
|
|
8097
|
+
overlayVisible: false,
|
|
8098
|
+
focused: false,
|
|
8099
|
+
focusedOptionIndex: -1,
|
|
8100
|
+
selectedOptionIndex: -1
|
|
7894
8101
|
};
|
|
7895
8102
|
},
|
|
7896
8103
|
target: null,
|
|
@@ -7898,6 +8105,13 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7898
8105
|
scrollHandler: null,
|
|
7899
8106
|
resizeListener: null,
|
|
7900
8107
|
container: null,
|
|
8108
|
+
list: null,
|
|
8109
|
+
mounted() {
|
|
8110
|
+
if (!this.popup) {
|
|
8111
|
+
this.bindResizeListener();
|
|
8112
|
+
this.bindOutsideClickListener();
|
|
8113
|
+
}
|
|
8114
|
+
},
|
|
7901
8115
|
beforeUnmount() {
|
|
7902
8116
|
this.unbindResizeListener();
|
|
7903
8117
|
this.unbindOutsideClickListener();
|
|
@@ -7931,7 +8145,115 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7931
8145
|
event.navigate(event.originalEvent);
|
|
7932
8146
|
}
|
|
7933
8147
|
|
|
7934
|
-
this.hide();
|
|
8148
|
+
if (this.overlayVisible) this.hide();
|
|
8149
|
+
|
|
8150
|
+
if (!this.popup && this.focusedOptionIndex !== event.id) {
|
|
8151
|
+
this.focusedOptionIndex = event.id;
|
|
8152
|
+
}
|
|
8153
|
+
},
|
|
8154
|
+
onListFocus(event) {
|
|
8155
|
+
this.focused = true;
|
|
8156
|
+
|
|
8157
|
+
if (!this.popup) {
|
|
8158
|
+
if (this.selectedOptionIndex !== -1) {
|
|
8159
|
+
this.changeFocusedOptionIndex(this.selectedOptionIndex);
|
|
8160
|
+
this.selectedOptionIndex = -1;
|
|
8161
|
+
} else this.changeFocusedOptionIndex(0);
|
|
8162
|
+
}
|
|
8163
|
+
|
|
8164
|
+
this.$emit('focus', event);
|
|
8165
|
+
},
|
|
8166
|
+
onListBlur(event) {
|
|
8167
|
+
this.focused = false;
|
|
8168
|
+
this.focusedOptionIndex = -1;
|
|
8169
|
+
this.$emit('blur', event);
|
|
8170
|
+
},
|
|
8171
|
+
onListKeyDown(event) {
|
|
8172
|
+
switch (event.code) {
|
|
8173
|
+
case 'ArrowDown':
|
|
8174
|
+
this.onArrowDownKey(event);
|
|
8175
|
+
break;
|
|
8176
|
+
|
|
8177
|
+
case 'ArrowUp':
|
|
8178
|
+
this.onArrowUpKey(event);
|
|
8179
|
+
break;
|
|
8180
|
+
|
|
8181
|
+
case 'Home':
|
|
8182
|
+
this.onHomeKey(event);
|
|
8183
|
+
break;
|
|
8184
|
+
|
|
8185
|
+
case 'End':
|
|
8186
|
+
this.onEndKey(event);
|
|
8187
|
+
break;
|
|
8188
|
+
|
|
8189
|
+
case 'Enter':
|
|
8190
|
+
this.onEnterKey(event);
|
|
8191
|
+
break;
|
|
8192
|
+
|
|
8193
|
+
case 'Space':
|
|
8194
|
+
this.onSpaceKey(event);
|
|
8195
|
+
break;
|
|
8196
|
+
|
|
8197
|
+
case 'Tab':
|
|
8198
|
+
this.overlayVisible && this.hide();
|
|
8199
|
+
break;
|
|
8200
|
+
}
|
|
8201
|
+
},
|
|
8202
|
+
onArrowDownKey(event) {
|
|
8203
|
+
const optionIndex = this.findNextOptionIndex(this.focusedOptionIndex);
|
|
8204
|
+
|
|
8205
|
+
this.changeFocusedOptionIndex(optionIndex);
|
|
8206
|
+
event.preventDefault();
|
|
8207
|
+
},
|
|
8208
|
+
onArrowUpKey(event) {
|
|
8209
|
+
if (event.altKey && this.popup) {
|
|
8210
|
+
utils.DomHandler.focus(this.target);
|
|
8211
|
+
this.hide();
|
|
8212
|
+
event.preventDefault();
|
|
8213
|
+
} else {
|
|
8214
|
+
const optionIndex = this.findPrevOptionIndex(this.focusedOptionIndex);
|
|
8215
|
+
|
|
8216
|
+
this.changeFocusedOptionIndex(optionIndex);
|
|
8217
|
+
event.preventDefault();
|
|
8218
|
+
}
|
|
8219
|
+
},
|
|
8220
|
+
onHomeKey(event) {
|
|
8221
|
+
this.changeFocusedOptionIndex(0);
|
|
8222
|
+
event.preventDefault();
|
|
8223
|
+
},
|
|
8224
|
+
onEndKey(event) {
|
|
8225
|
+
this.changeFocusedOptionIndex(utils.DomHandler.find(this.container, 'li.p-menuitem:not(.p-disabled)').length - 1);
|
|
8226
|
+
event.preventDefault();
|
|
8227
|
+
},
|
|
8228
|
+
onEnterKey(event) {
|
|
8229
|
+
const element = utils.DomHandler.findSingle(this.list, `li[id="${`${this.focusedOptionIndex}`}"]`);
|
|
8230
|
+
const anchorElement = element && utils.DomHandler.findSingle(element, '.p-menuitem-link');
|
|
8231
|
+
|
|
8232
|
+
this.popup && utils.DomHandler.focus(this.target);
|
|
8233
|
+
anchorElement ? anchorElement.click() : element && element.click();
|
|
8234
|
+
|
|
8235
|
+
event.preventDefault();
|
|
8236
|
+
},
|
|
8237
|
+
onSpaceKey(event) {
|
|
8238
|
+
this.onEnterKey(event);
|
|
8239
|
+
},
|
|
8240
|
+
findNextOptionIndex(index) {
|
|
8241
|
+
const links = utils.DomHandler.find(this.container, 'li.p-menuitem:not(.p-disabled)');
|
|
8242
|
+
const matchedOptionIndex = [...links].findIndex((link) => link.id === index);
|
|
8243
|
+
|
|
8244
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0;
|
|
8245
|
+
},
|
|
8246
|
+
findPrevOptionIndex(index) {
|
|
8247
|
+
const links = utils.DomHandler.find(this.container, 'li.p-menuitem:not(.p-disabled)');
|
|
8248
|
+
const matchedOptionIndex = [...links].findIndex((link) => link.id === index);
|
|
8249
|
+
|
|
8250
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0;
|
|
8251
|
+
},
|
|
8252
|
+
changeFocusedOptionIndex(index) {
|
|
8253
|
+
const links = utils.DomHandler.find(this.container, 'li.p-menuitem:not(.p-disabled)');
|
|
8254
|
+
let order = index >= links.length ? links.length - 1 : index < 0 ? 0 : index;
|
|
8255
|
+
|
|
8256
|
+
this.focusedOptionIndex = links[order].getAttribute('id');
|
|
7935
8257
|
},
|
|
7936
8258
|
toggle(event) {
|
|
7937
8259
|
if (this.overlayVisible) this.hide();
|
|
@@ -7955,6 +8277,11 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7955
8277
|
utils.ZIndexUtils.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu);
|
|
7956
8278
|
}
|
|
7957
8279
|
|
|
8280
|
+
if (this.popup) {
|
|
8281
|
+
utils.DomHandler.focus(this.list);
|
|
8282
|
+
this.changeFocusedOptionIndex(0);
|
|
8283
|
+
}
|
|
8284
|
+
|
|
7958
8285
|
this.$emit('show');
|
|
7959
8286
|
},
|
|
7960
8287
|
onLeave() {
|
|
@@ -7975,8 +8302,13 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7975
8302
|
bindOutsideClickListener() {
|
|
7976
8303
|
if (!this.outsideClickListener) {
|
|
7977
8304
|
this.outsideClickListener = (event) => {
|
|
7978
|
-
|
|
8305
|
+
const isOutsideContainer = this.container && !this.container.contains(event.target);
|
|
8306
|
+
const isOutsideTarget = !(this.target && (this.target === event.target || this.target.contains(event.target)));
|
|
8307
|
+
|
|
8308
|
+
if (this.overlayVisible && isOutsideContainer && isOutsideTarget) {
|
|
7979
8309
|
this.hide();
|
|
8310
|
+
} else if (!this.popup && isOutsideContainer && isOutsideTarget) {
|
|
8311
|
+
this.focusedOptionIndex = -1;
|
|
7980
8312
|
}
|
|
7981
8313
|
};
|
|
7982
8314
|
|
|
@@ -8022,9 +8354,6 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
8022
8354
|
this.resizeListener = null;
|
|
8023
8355
|
}
|
|
8024
8356
|
},
|
|
8025
|
-
isTargetClicked(event) {
|
|
8026
|
-
return this.target && (this.target === event.target || this.target.contains(event.target));
|
|
8027
|
-
},
|
|
8028
8357
|
visible(item) {
|
|
8029
8358
|
return typeof item.visible === 'function' ? item.visible() : item.visible !== false;
|
|
8030
8359
|
},
|
|
@@ -8042,6 +8371,9 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
8042
8371
|
originalEvent: event,
|
|
8043
8372
|
target: this.target
|
|
8044
8373
|
});
|
|
8374
|
+
},
|
|
8375
|
+
listRef(el) {
|
|
8376
|
+
this.list = el;
|
|
8045
8377
|
}
|
|
8046
8378
|
},
|
|
8047
8379
|
computed: {
|
|
@@ -8054,25 +8386,29 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
8054
8386
|
'p-ripple-disabled': this.$primevue.config.ripple === false
|
|
8055
8387
|
}
|
|
8056
8388
|
];
|
|
8389
|
+
},
|
|
8390
|
+
separatorClass(item) {
|
|
8391
|
+
return ['p-menu-separator p-menuitem-separator', item.class]; // TODO: the 'p-menu-separator' class is deprecated since v3.18.0.
|
|
8392
|
+
},
|
|
8393
|
+
id() {
|
|
8394
|
+
return this.$attrs.id || utils.UniqueComponentId();
|
|
8395
|
+
},
|
|
8396
|
+
focusedOptionId() {
|
|
8397
|
+
return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null;
|
|
8057
8398
|
}
|
|
8058
8399
|
},
|
|
8059
8400
|
components: {
|
|
8060
|
-
|
|
8401
|
+
PVMenuitem: script$1,
|
|
8061
8402
|
Portal: Portal__default["default"]
|
|
8062
8403
|
}
|
|
8063
8404
|
};
|
|
8064
8405
|
|
|
8065
|
-
const _hoisted_1 =
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
};
|
|
8069
|
-
const _hoisted_2 = {
|
|
8070
|
-
key: 0,
|
|
8071
|
-
class: "p-submenu-header"
|
|
8072
|
-
};
|
|
8406
|
+
const _hoisted_1 = ["id"];
|
|
8407
|
+
const _hoisted_2 = ["id", "tabindex", "aria-activedescendant", "aria-label", "aria-labelledby"];
|
|
8408
|
+
const _hoisted_3 = ["id"];
|
|
8073
8409
|
|
|
8074
8410
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8075
|
-
const
|
|
8411
|
+
const _component_PVMenuitem = vue.resolveComponent("PVMenuitem");
|
|
8076
8412
|
const _component_Portal = vue.resolveComponent("Portal");
|
|
8077
8413
|
|
|
8078
8414
|
return (vue.openBlock(), vue.createBlock(_component_Portal, {
|
|
@@ -8091,11 +8427,24 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
8091
8427
|
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
8092
8428
|
key: 0,
|
|
8093
8429
|
ref: $options.containerRef,
|
|
8430
|
+
id: $options.id,
|
|
8094
8431
|
class: $options.containerClass
|
|
8095
8432
|
}, _ctx.$attrs, {
|
|
8096
|
-
onClick: _cache[
|
|
8433
|
+
onClick: _cache[3] || (_cache[3] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
|
|
8097
8434
|
}), [
|
|
8098
|
-
vue.createElementVNode("ul",
|
|
8435
|
+
vue.createElementVNode("ul", {
|
|
8436
|
+
ref: $options.listRef,
|
|
8437
|
+
id: $options.id + '_list',
|
|
8438
|
+
class: "p-menu-list p-reset",
|
|
8439
|
+
role: "menu",
|
|
8440
|
+
tabindex: $props.tabindex,
|
|
8441
|
+
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
8442
|
+
"aria-label": _ctx.ariaLabel,
|
|
8443
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
8444
|
+
onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onListFocus && $options.onListFocus(...args))),
|
|
8445
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onListBlur && $options.onListBlur(...args))),
|
|
8446
|
+
onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onListKeyDown && $options.onListKeyDown(...args)))
|
|
8447
|
+
}, [
|
|
8099
8448
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
|
|
8100
8449
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
8101
8450
|
key: $options.label(item) + i.toString()
|
|
@@ -8103,28 +8452,35 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
8103
8452
|
(item.items && $options.visible(item) && !item.separator)
|
|
8104
8453
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
8105
8454
|
(item.items)
|
|
8106
|
-
? (vue.openBlock(), vue.createElementBlock("li",
|
|
8455
|
+
? (vue.openBlock(), vue.createElementBlock("li", {
|
|
8456
|
+
key: 0,
|
|
8457
|
+
id: $options.id + '_' + i,
|
|
8458
|
+
class: "p-submenu-header",
|
|
8459
|
+
role: "none"
|
|
8460
|
+
}, [
|
|
8107
8461
|
vue.renderSlot(_ctx.$slots, "item", { item: item }, () => [
|
|
8108
8462
|
vue.createTextVNode(vue.toDisplayString($options.label(item)), 1)
|
|
8109
8463
|
])
|
|
8110
|
-
]))
|
|
8464
|
+
], 8, _hoisted_3))
|
|
8111
8465
|
: vue.createCommentVNode("", true),
|
|
8112
8466
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.items, (child, j) => {
|
|
8113
8467
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
8114
|
-
key: child.label + i + j
|
|
8468
|
+
key: child.label + i + '_' + j
|
|
8115
8469
|
}, [
|
|
8116
8470
|
($options.visible(child) && !child.separator)
|
|
8117
|
-
? (vue.openBlock(), vue.createBlock(
|
|
8471
|
+
? (vue.openBlock(), vue.createBlock(_component_PVMenuitem, {
|
|
8118
8472
|
key: 0,
|
|
8473
|
+
id: $options.id + '_' + i + '_' + j,
|
|
8119
8474
|
item: child,
|
|
8120
|
-
onClick: $options.itemClick,
|
|
8121
8475
|
template: _ctx.$slots.item,
|
|
8122
|
-
exact: $props.exact
|
|
8123
|
-
|
|
8476
|
+
exact: $props.exact,
|
|
8477
|
+
focusedOptionId: $options.focusedOptionId,
|
|
8478
|
+
onItemClick: $options.itemClick
|
|
8479
|
+
}, null, 8, ["id", "item", "template", "exact", "focusedOptionId", "onItemClick"]))
|
|
8124
8480
|
: ($options.visible(child) && child.separator)
|
|
8125
8481
|
? (vue.openBlock(), vue.createElementBlock("li", {
|
|
8126
8482
|
key: 'separator' + i + j,
|
|
8127
|
-
class: vue.normalizeClass(
|
|
8483
|
+
class: vue.normalizeClass($options.separatorClass(item)),
|
|
8128
8484
|
style: vue.normalizeStyle(child.style),
|
|
8129
8485
|
role: "separator"
|
|
8130
8486
|
}, null, 6))
|
|
@@ -8135,21 +8491,23 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
8135
8491
|
: ($options.visible(item) && item.separator)
|
|
8136
8492
|
? (vue.openBlock(), vue.createElementBlock("li", {
|
|
8137
8493
|
key: 'separator' + i.toString(),
|
|
8138
|
-
class: vue.normalizeClass(
|
|
8494
|
+
class: vue.normalizeClass($options.separatorClass(item)),
|
|
8139
8495
|
style: vue.normalizeStyle(item.style),
|
|
8140
8496
|
role: "separator"
|
|
8141
8497
|
}, null, 6))
|
|
8142
|
-
: (vue.openBlock(), vue.createBlock(
|
|
8498
|
+
: (vue.openBlock(), vue.createBlock(_component_PVMenuitem, {
|
|
8143
8499
|
key: $options.label(item) + i.toString(),
|
|
8500
|
+
id: $options.id + '_' + i,
|
|
8144
8501
|
item: item,
|
|
8145
|
-
onClick: $options.itemClick,
|
|
8146
8502
|
template: _ctx.$slots.item,
|
|
8147
|
-
exact: $props.exact
|
|
8148
|
-
|
|
8503
|
+
exact: $props.exact,
|
|
8504
|
+
focusedOptionId: $options.focusedOptionId,
|
|
8505
|
+
onItemClick: $options.itemClick
|
|
8506
|
+
}, null, 8, ["id", "item", "template", "exact", "focusedOptionId", "onItemClick"]))
|
|
8149
8507
|
], 64))
|
|
8150
8508
|
}), 128))
|
|
8151
|
-
])
|
|
8152
|
-
], 16))
|
|
8509
|
+
], 40, _hoisted_2)
|
|
8510
|
+
], 16, _hoisted_1))
|
|
8153
8511
|
: vue.createCommentVNode("", true)
|
|
8154
8512
|
]),
|
|
8155
8513
|
_: 3
|
|
@@ -8193,10 +8551,10 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
8193
8551
|
|
|
8194
8552
|
return script;
|
|
8195
8553
|
|
|
8196
|
-
})(primevue.
|
|
8554
|
+
})(primevue.overlayeventbus, primevue.portal, primevue.utils, primevue.ripple, Vue);
|
|
8197
8555
|
|
|
8198
8556
|
this.primevue = this.primevue || {};
|
|
8199
|
-
this.primevue.tieredmenu = (function (
|
|
8557
|
+
this.primevue.tieredmenu = (function (OverlayEventBus, Portal, utils, Ripple, vue) {
|
|
8200
8558
|
'use strict';
|
|
8201
8559
|
|
|
8202
8560
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -8207,215 +8565,108 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8207
8565
|
|
|
8208
8566
|
var script$1 = {
|
|
8209
8567
|
name: 'TieredMenuSub',
|
|
8210
|
-
emits: ['
|
|
8568
|
+
emits: ['item-click', 'item-mouseenter'],
|
|
8211
8569
|
props: {
|
|
8212
|
-
|
|
8213
|
-
type:
|
|
8570
|
+
menuId: {
|
|
8571
|
+
type: String,
|
|
8214
8572
|
default: null
|
|
8215
8573
|
},
|
|
8216
|
-
|
|
8217
|
-
type:
|
|
8218
|
-
default:
|
|
8574
|
+
focusedItemId: {
|
|
8575
|
+
type: String,
|
|
8576
|
+
default: null
|
|
8219
8577
|
},
|
|
8220
|
-
|
|
8221
|
-
type:
|
|
8222
|
-
default:
|
|
8578
|
+
items: {
|
|
8579
|
+
type: Array,
|
|
8580
|
+
default: null
|
|
8223
8581
|
},
|
|
8224
|
-
|
|
8225
|
-
type:
|
|
8226
|
-
default:
|
|
8582
|
+
level: {
|
|
8583
|
+
type: Number,
|
|
8584
|
+
default: 0
|
|
8227
8585
|
},
|
|
8228
8586
|
template: {
|
|
8229
8587
|
type: Function,
|
|
8230
8588
|
default: null
|
|
8231
8589
|
},
|
|
8590
|
+
activeItemPath: {
|
|
8591
|
+
type: Object,
|
|
8592
|
+
default: null
|
|
8593
|
+
},
|
|
8232
8594
|
exact: {
|
|
8233
8595
|
type: Boolean,
|
|
8234
8596
|
default: true
|
|
8235
8597
|
}
|
|
8236
8598
|
},
|
|
8237
|
-
documentClickListener: null,
|
|
8238
|
-
data() {
|
|
8239
|
-
return {
|
|
8240
|
-
activeItem: null
|
|
8241
|
-
};
|
|
8242
|
-
},
|
|
8243
|
-
watch: {
|
|
8244
|
-
parentActive(newValue) {
|
|
8245
|
-
if (!newValue) {
|
|
8246
|
-
this.activeItem = null;
|
|
8247
|
-
}
|
|
8248
|
-
}
|
|
8249
|
-
},
|
|
8250
|
-
updated() {
|
|
8251
|
-
if (this.root && this.activeItem) {
|
|
8252
|
-
this.bindDocumentClickListener();
|
|
8253
|
-
}
|
|
8254
|
-
},
|
|
8255
|
-
beforeUnmount() {
|
|
8256
|
-
this.unbindDocumentClickListener();
|
|
8257
|
-
},
|
|
8258
8599
|
methods: {
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
event.preventDefault();
|
|
8262
|
-
|
|
8263
|
-
return;
|
|
8264
|
-
}
|
|
8265
|
-
|
|
8266
|
-
if (this.root) {
|
|
8267
|
-
if (this.activeItem || this.popup) {
|
|
8268
|
-
this.activeItem = item;
|
|
8269
|
-
}
|
|
8270
|
-
} else {
|
|
8271
|
-
this.activeItem = item;
|
|
8272
|
-
}
|
|
8600
|
+
getItemId(processedItem) {
|
|
8601
|
+
return `${this.menuId}_${processedItem.key}`;
|
|
8273
8602
|
},
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
event.preventDefault();
|
|
8277
|
-
|
|
8278
|
-
return;
|
|
8279
|
-
}
|
|
8280
|
-
|
|
8281
|
-
if (item.command) {
|
|
8282
|
-
item.command({
|
|
8283
|
-
originalEvent: event,
|
|
8284
|
-
item: item
|
|
8285
|
-
});
|
|
8286
|
-
}
|
|
8287
|
-
|
|
8288
|
-
if (item.items) {
|
|
8289
|
-
if (this.activeItem && item === this.activeItem) this.activeItem = null;
|
|
8290
|
-
else this.activeItem = item;
|
|
8291
|
-
}
|
|
8292
|
-
|
|
8293
|
-
if (!item.items) {
|
|
8294
|
-
this.onLeafClick();
|
|
8295
|
-
}
|
|
8296
|
-
|
|
8297
|
-
if (item.to && navigate) {
|
|
8298
|
-
navigate(event);
|
|
8299
|
-
}
|
|
8603
|
+
getItemKey(processedItem) {
|
|
8604
|
+
return this.getItemId(processedItem);
|
|
8300
8605
|
},
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
this.$emit('leaf-click');
|
|
8606
|
+
getItemProp(processedItem, name) {
|
|
8607
|
+
return processedItem && processedItem.item ? utils.ObjectUtils.getItemValue(processedItem.item[name]) : undefined;
|
|
8304
8608
|
},
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
switch (event.which) {
|
|
8309
|
-
//down
|
|
8310
|
-
case 40:
|
|
8311
|
-
var nextItem = this.findNextItem(listItem);
|
|
8312
|
-
|
|
8313
|
-
if (nextItem) {
|
|
8314
|
-
nextItem.children[0].focus();
|
|
8315
|
-
}
|
|
8316
|
-
|
|
8317
|
-
event.preventDefault();
|
|
8318
|
-
break;
|
|
8319
|
-
|
|
8320
|
-
//up
|
|
8321
|
-
case 38:
|
|
8322
|
-
var prevItem = this.findPrevItem(listItem);
|
|
8323
|
-
|
|
8324
|
-
if (prevItem) {
|
|
8325
|
-
prevItem.children[0].focus();
|
|
8326
|
-
}
|
|
8327
|
-
|
|
8328
|
-
event.preventDefault();
|
|
8329
|
-
break;
|
|
8330
|
-
|
|
8331
|
-
//right
|
|
8332
|
-
case 39:
|
|
8333
|
-
if (item.items) {
|
|
8334
|
-
this.activeItem = item;
|
|
8335
|
-
|
|
8336
|
-
setTimeout(() => {
|
|
8337
|
-
listItem.children[1].children[0].children[0].focus();
|
|
8338
|
-
}, 50);
|
|
8339
|
-
}
|
|
8340
|
-
|
|
8341
|
-
event.preventDefault();
|
|
8342
|
-
break;
|
|
8343
|
-
}
|
|
8344
|
-
|
|
8345
|
-
this.$emit('keydown-item', {
|
|
8346
|
-
originalEvent: event,
|
|
8347
|
-
element: listItem
|
|
8348
|
-
});
|
|
8609
|
+
getItemLabel(processedItem) {
|
|
8610
|
+
return this.getItemProp(processedItem, 'label');
|
|
8349
8611
|
},
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
if (event.originalEvent.which === 37) {
|
|
8353
|
-
this.activeItem = null;
|
|
8354
|
-
event.element.parentElement.previousElementSibling.focus();
|
|
8355
|
-
}
|
|
8612
|
+
isItemActive(processedItem) {
|
|
8613
|
+
return this.activeItemPath.some((path) => path.key === processedItem.key);
|
|
8356
8614
|
},
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8615
|
+
isItemVisible(processedItem) {
|
|
8616
|
+
return this.getItemProp(processedItem, 'visible') !== false;
|
|
8617
|
+
},
|
|
8618
|
+
isItemDisabled(processedItem) {
|
|
8619
|
+
return this.getItemProp(processedItem, 'disabled');
|
|
8620
|
+
},
|
|
8621
|
+
isItemFocused(processedItem) {
|
|
8622
|
+
return this.focusedItemId === this.getItemId(processedItem);
|
|
8623
|
+
},
|
|
8624
|
+
isItemGroup(processedItem) {
|
|
8625
|
+
return utils.ObjectUtils.isNotEmpty(processedItem.items);
|
|
8362
8626
|
},
|
|
8363
|
-
|
|
8364
|
-
|
|
8627
|
+
onItemClick(event, processedItem) {
|
|
8628
|
+
const command = this.getItemProp(processedItem, 'command');
|
|
8365
8629
|
|
|
8366
|
-
|
|
8367
|
-
|
|
8630
|
+
command && command({ originalEvent: event, item: processedItem.item });
|
|
8631
|
+
this.$emit('item-click', { originalEvent: event, processedItem, isFocus: true });
|
|
8368
8632
|
},
|
|
8369
|
-
|
|
8633
|
+
onItemMouseEnter(event, processedItem) {
|
|
8634
|
+
this.$emit('item-mouseenter', { originalEvent: event, processedItem });
|
|
8635
|
+
},
|
|
8636
|
+
onItemActionClick(event, navigate) {
|
|
8637
|
+
navigate && navigate(event);
|
|
8638
|
+
},
|
|
8639
|
+
getAriaSetSize() {
|
|
8640
|
+
return this.items.filter((processedItem) => this.isItemVisible(processedItem) && !this.getItemProp(processedItem, 'separator')).length;
|
|
8641
|
+
},
|
|
8642
|
+
getAriaPosInset(index) {
|
|
8643
|
+
return index - this.items.slice(0, index).filter((processedItem) => this.isItemVisible(processedItem) && this.getItemProp(processedItem, 'separator')).length + 1;
|
|
8644
|
+
},
|
|
8645
|
+
getItemClass(processedItem) {
|
|
8370
8646
|
return [
|
|
8371
8647
|
'p-menuitem',
|
|
8372
|
-
|
|
8648
|
+
this.getItemProp(processedItem, 'class'),
|
|
8373
8649
|
{
|
|
8374
|
-
'p-menuitem-active': this.
|
|
8650
|
+
'p-menuitem-active p-highlight': this.isItemActive(processedItem),
|
|
8651
|
+
'p-focus': this.isItemFocused(processedItem),
|
|
8652
|
+
'p-disabled': this.isItemDisabled(processedItem)
|
|
8375
8653
|
}
|
|
8376
8654
|
];
|
|
8377
8655
|
},
|
|
8378
|
-
|
|
8656
|
+
getItemActionClass(processedItem, routerProps) {
|
|
8379
8657
|
return [
|
|
8380
8658
|
'p-menuitem-link',
|
|
8381
8659
|
{
|
|
8382
|
-
'p-disabled': this.disabled(item),
|
|
8383
8660
|
'router-link-active': routerProps && routerProps.isActive,
|
|
8384
8661
|
'router-link-active-exact': this.exact && routerProps && routerProps.isExactActive
|
|
8385
8662
|
}
|
|
8386
8663
|
];
|
|
8387
8664
|
},
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
this.documentClickListener = (event) => {
|
|
8391
|
-
if (this.$el && !this.$el.contains(event.target)) {
|
|
8392
|
-
this.activeItem = null;
|
|
8393
|
-
this.unbindDocumentClickListener();
|
|
8394
|
-
}
|
|
8395
|
-
};
|
|
8396
|
-
|
|
8397
|
-
document.addEventListener('click', this.documentClickListener);
|
|
8398
|
-
}
|
|
8399
|
-
},
|
|
8400
|
-
unbindDocumentClickListener() {
|
|
8401
|
-
if (this.documentClickListener) {
|
|
8402
|
-
document.removeEventListener('click', this.documentClickListener);
|
|
8403
|
-
this.documentClickListener = null;
|
|
8404
|
-
}
|
|
8665
|
+
getItemIconClass(processedItem) {
|
|
8666
|
+
return ['p-menuitem-icon', this.getItemProp(processedItem, 'icon')];
|
|
8405
8667
|
},
|
|
8406
|
-
|
|
8407
|
-
return
|
|
8408
|
-
},
|
|
8409
|
-
disabled(item) {
|
|
8410
|
-
return typeof item.disabled === 'function' ? item.disabled() : item.disabled;
|
|
8411
|
-
},
|
|
8412
|
-
label(item) {
|
|
8413
|
-
return typeof item.label === 'function' ? item.label() : item.label;
|
|
8414
|
-
}
|
|
8415
|
-
},
|
|
8416
|
-
computed: {
|
|
8417
|
-
containerClass() {
|
|
8418
|
-
return { 'p-submenu-list': !this.root };
|
|
8668
|
+
getSeparatorItemClass(processedItem) {
|
|
8669
|
+
return ['p-menuitem-separator', this.getItemProp(processedItem, 'class')];
|
|
8419
8670
|
}
|
|
8420
8671
|
},
|
|
8421
8672
|
directives: {
|
|
@@ -8423,122 +8674,135 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8423
8674
|
}
|
|
8424
8675
|
};
|
|
8425
8676
|
|
|
8426
|
-
const _hoisted_1 = ["
|
|
8427
|
-
const _hoisted_2 = ["
|
|
8428
|
-
const _hoisted_3 =
|
|
8429
|
-
const _hoisted_4 =
|
|
8430
|
-
const _hoisted_5 =
|
|
8431
|
-
const _hoisted_6 = {
|
|
8677
|
+
const _hoisted_1$1 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset"];
|
|
8678
|
+
const _hoisted_2 = ["onClick", "onMouseenter"];
|
|
8679
|
+
const _hoisted_3 = ["href", "onClick"];
|
|
8680
|
+
const _hoisted_4 = { class: "p-menuitem-text" };
|
|
8681
|
+
const _hoisted_5 = ["href", "target"];
|
|
8682
|
+
const _hoisted_6 = { class: "p-menuitem-text" };
|
|
8683
|
+
const _hoisted_7 = {
|
|
8432
8684
|
key: 1,
|
|
8433
8685
|
class: "p-submenu-icon pi pi-angle-right"
|
|
8434
8686
|
};
|
|
8687
|
+
const _hoisted_8 = ["id"];
|
|
8435
8688
|
|
|
8436
8689
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8437
8690
|
const _component_router_link = vue.resolveComponent("router-link");
|
|
8438
8691
|
const _component_TieredMenuSub = vue.resolveComponent("TieredMenuSub", true);
|
|
8439
8692
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
8440
8693
|
|
|
8441
|
-
return (vue.openBlock(), vue.createElementBlock("ul",
|
|
8442
|
-
|
|
8443
|
-
class: vue.normalizeClass($options.containerClass),
|
|
8444
|
-
role: "'menubar' : 'menu'",
|
|
8445
|
-
"aria-orientation": "horizontal"
|
|
8446
|
-
}, [
|
|
8447
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
|
|
8694
|
+
return (vue.openBlock(), vue.createElementBlock("ul", null, [
|
|
8695
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.items, (processedItem, index) => {
|
|
8448
8696
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
8449
|
-
key: $options.
|
|
8697
|
+
key: $options.getItemKey(processedItem)
|
|
8450
8698
|
}, [
|
|
8451
|
-
($options.
|
|
8699
|
+
($options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, 'separator'))
|
|
8452
8700
|
? (vue.openBlock(), vue.createElementBlock("li", {
|
|
8453
8701
|
key: 0,
|
|
8454
|
-
|
|
8455
|
-
style: vue.normalizeStyle(
|
|
8456
|
-
|
|
8457
|
-
role: "
|
|
8702
|
+
id: $options.getItemId(processedItem),
|
|
8703
|
+
style: vue.normalizeStyle($options.getItemProp(processedItem, 'style')),
|
|
8704
|
+
class: vue.normalizeClass($options.getItemClass(processedItem)),
|
|
8705
|
+
role: "menuitem",
|
|
8706
|
+
"aria-label": $options.getItemLabel(processedItem),
|
|
8707
|
+
"aria-disabled": $options.isItemDisabled(processedItem) || undefined,
|
|
8708
|
+
"aria-expanded": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : undefined,
|
|
8709
|
+
"aria-haspopup": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, 'to') ? 'menu' : undefined,
|
|
8710
|
+
"aria-level": $props.level + 1,
|
|
8711
|
+
"aria-setsize": $options.getAriaSetSize(),
|
|
8712
|
+
"aria-posinset": $options.getAriaPosInset(index)
|
|
8458
8713
|
}, [
|
|
8459
|
-
(
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
[
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8714
|
+
vue.createElementVNode("div", {
|
|
8715
|
+
class: "p-menuitem-content",
|
|
8716
|
+
onClick: $event => ($options.onItemClick($event, processedItem)),
|
|
8717
|
+
onMouseenter: $event => ($options.onItemMouseEnter($event, processedItem))
|
|
8718
|
+
}, [
|
|
8719
|
+
(!$props.template)
|
|
8720
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
8721
|
+
($options.getItemProp(processedItem, 'to') && !$options.isItemDisabled(processedItem))
|
|
8722
|
+
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
8723
|
+
key: 0,
|
|
8724
|
+
to: $options.getItemProp(processedItem, 'to'),
|
|
8725
|
+
custom: ""
|
|
8726
|
+
}, {
|
|
8727
|
+
default: vue.withCtx(({ navigate, href, isActive, isExactActive }) => [
|
|
8728
|
+
vue.withDirectives((vue.openBlock(), vue.createElementBlock("a", {
|
|
8729
|
+
href: href,
|
|
8730
|
+
class: vue.normalizeClass($options.getItemActionClass(processedItem, { isActive, isExactActive })),
|
|
8731
|
+
tabindex: "-1",
|
|
8732
|
+
"aria-hidden": "true",
|
|
8733
|
+
onClick: $event => ($options.onItemActionClick($event, navigate))
|
|
8734
|
+
}, [
|
|
8735
|
+
($options.getItemProp(processedItem, 'icon'))
|
|
8736
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
8737
|
+
key: 0,
|
|
8738
|
+
class: vue.normalizeClass($options.getItemIconClass(processedItem))
|
|
8739
|
+
}, null, 2))
|
|
8740
|
+
: vue.createCommentVNode("", true),
|
|
8741
|
+
vue.createElementVNode("span", _hoisted_4, vue.toDisplayString($options.getItemLabel(processedItem)), 1)
|
|
8742
|
+
], 10, _hoisted_3)), [
|
|
8743
|
+
[_directive_ripple]
|
|
8744
|
+
])
|
|
8745
|
+
]),
|
|
8746
|
+
_: 2
|
|
8747
|
+
}, 1032, ["to"]))
|
|
8748
|
+
: vue.withDirectives((vue.openBlock(), vue.createElementBlock("a", {
|
|
8749
|
+
key: 1,
|
|
8750
|
+
href: $options.getItemProp(processedItem, 'url'),
|
|
8751
|
+
class: vue.normalizeClass($options.getItemActionClass(processedItem)),
|
|
8752
|
+
target: $options.getItemProp(processedItem, 'target'),
|
|
8753
|
+
tabindex: "-1",
|
|
8754
|
+
"aria-hidden": "true"
|
|
8755
|
+
}, [
|
|
8756
|
+
($options.getItemProp(processedItem, 'icon'))
|
|
8757
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
8758
|
+
key: 0,
|
|
8759
|
+
class: vue.normalizeClass($options.getItemIconClass(processedItem))
|
|
8760
|
+
}, null, 2))
|
|
8761
|
+
: vue.createCommentVNode("", true),
|
|
8762
|
+
vue.createElementVNode("span", _hoisted_6, vue.toDisplayString($options.getItemLabel(processedItem)), 1),
|
|
8763
|
+
($options.isItemGroup(processedItem))
|
|
8764
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7))
|
|
8765
|
+
: vue.createCommentVNode("", true)
|
|
8766
|
+
], 10, _hoisted_5)), [
|
|
8767
|
+
[_directive_ripple]
|
|
8768
|
+
])
|
|
8769
|
+
], 64))
|
|
8770
|
+
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.template), {
|
|
8771
|
+
key: 1,
|
|
8772
|
+
item: processedItem.item
|
|
8773
|
+
}, null, 8, ["item"]))
|
|
8774
|
+
], 40, _hoisted_2),
|
|
8775
|
+
($options.isItemVisible(processedItem) && $options.isItemGroup(processedItem))
|
|
8519
8776
|
? (vue.openBlock(), vue.createBlock(_component_TieredMenuSub, {
|
|
8520
|
-
key:
|
|
8521
|
-
|
|
8777
|
+
key: 0,
|
|
8778
|
+
id: $options.getItemId(processedItem) + '_list',
|
|
8779
|
+
role: "menu",
|
|
8780
|
+
class: "p-submenu-list",
|
|
8781
|
+
menuId: $props.menuId,
|
|
8782
|
+
focusedItemId: $props.focusedItemId,
|
|
8783
|
+
items: processedItem.items,
|
|
8522
8784
|
template: $props.template,
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8785
|
+
activeItemPath: $props.activeItemPath,
|
|
8786
|
+
exact: $props.exact,
|
|
8787
|
+
level: $props.level + 1,
|
|
8788
|
+
onItemClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('item-click', $event))),
|
|
8789
|
+
onItemMouseenter: _cache[1] || (_cache[1] = $event => (_ctx.$emit('item-mouseenter', $event)))
|
|
8790
|
+
}, null, 8, ["id", "menuId", "focusedItemId", "items", "template", "activeItemPath", "exact", "level"]))
|
|
8528
8791
|
: vue.createCommentVNode("", true)
|
|
8529
|
-
],
|
|
8792
|
+
], 14, _hoisted_1$1))
|
|
8530
8793
|
: vue.createCommentVNode("", true),
|
|
8531
|
-
($options.
|
|
8794
|
+
($options.isItemVisible(processedItem) && $options.getItemProp(processedItem, 'separator'))
|
|
8532
8795
|
? (vue.openBlock(), vue.createElementBlock("li", {
|
|
8533
|
-
key:
|
|
8534
|
-
|
|
8535
|
-
style: vue.normalizeStyle(
|
|
8796
|
+
key: 1,
|
|
8797
|
+
id: $options.getItemId(processedItem),
|
|
8798
|
+
style: vue.normalizeStyle($options.getItemProp(processedItem, 'style')),
|
|
8799
|
+
class: vue.normalizeClass($options.getSeparatorItemClass(processedItem)),
|
|
8536
8800
|
role: "separator"
|
|
8537
|
-
}, null,
|
|
8801
|
+
}, null, 14, _hoisted_8))
|
|
8538
8802
|
: vue.createCommentVNode("", true)
|
|
8539
8803
|
], 64))
|
|
8540
8804
|
}), 128))
|
|
8541
|
-
]
|
|
8805
|
+
]))
|
|
8542
8806
|
}
|
|
8543
8807
|
|
|
8544
8808
|
script$1.render = render$1;
|
|
@@ -8546,6 +8810,7 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8546
8810
|
var script = {
|
|
8547
8811
|
name: 'TieredMenu',
|
|
8548
8812
|
inheritAttrs: false,
|
|
8813
|
+
emits: ['focus', 'blur', 'before-show', 'before-hide', 'hide', 'show'],
|
|
8549
8814
|
props: {
|
|
8550
8815
|
popup: {
|
|
8551
8816
|
type: Boolean,
|
|
@@ -8570,71 +8835,365 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8570
8835
|
exact: {
|
|
8571
8836
|
type: Boolean,
|
|
8572
8837
|
default: true
|
|
8838
|
+
},
|
|
8839
|
+
disabled: {
|
|
8840
|
+
type: Boolean,
|
|
8841
|
+
default: false
|
|
8842
|
+
},
|
|
8843
|
+
tabindex: {
|
|
8844
|
+
type: Number,
|
|
8845
|
+
default: 0
|
|
8846
|
+
},
|
|
8847
|
+
'aria-labelledby': {
|
|
8848
|
+
type: String,
|
|
8849
|
+
default: null
|
|
8850
|
+
},
|
|
8851
|
+
'aria-label': {
|
|
8852
|
+
type: String,
|
|
8853
|
+
default: null
|
|
8573
8854
|
}
|
|
8574
8855
|
},
|
|
8575
|
-
target: null,
|
|
8576
|
-
container: null,
|
|
8577
8856
|
outsideClickListener: null,
|
|
8578
8857
|
scrollHandler: null,
|
|
8579
8858
|
resizeListener: null,
|
|
8859
|
+
target: null,
|
|
8860
|
+
container: null,
|
|
8861
|
+
menubar: null,
|
|
8862
|
+
searchTimeout: null,
|
|
8863
|
+
searchValue: null,
|
|
8580
8864
|
data() {
|
|
8581
8865
|
return {
|
|
8582
|
-
|
|
8866
|
+
focused: false,
|
|
8867
|
+
focusedItemInfo: { index: -1, level: 0, parentKey: '' },
|
|
8868
|
+
activeItemPath: [],
|
|
8869
|
+
visible: !this.popup,
|
|
8870
|
+
dirty: false
|
|
8583
8871
|
};
|
|
8584
8872
|
},
|
|
8873
|
+
watch: {
|
|
8874
|
+
activeItemPath(newPath) {
|
|
8875
|
+
if (!this.popup) {
|
|
8876
|
+
if (utils.ObjectUtils.isNotEmpty(newPath)) {
|
|
8877
|
+
this.bindOutsideClickListener();
|
|
8878
|
+
this.bindResizeListener();
|
|
8879
|
+
} else {
|
|
8880
|
+
this.unbindOutsideClickListener();
|
|
8881
|
+
this.unbindResizeListener();
|
|
8882
|
+
}
|
|
8883
|
+
}
|
|
8884
|
+
}
|
|
8885
|
+
},
|
|
8585
8886
|
beforeUnmount() {
|
|
8586
|
-
this.unbindResizeListener();
|
|
8587
8887
|
this.unbindOutsideClickListener();
|
|
8888
|
+
this.unbindResizeListener();
|
|
8588
8889
|
|
|
8589
8890
|
if (this.scrollHandler) {
|
|
8590
8891
|
this.scrollHandler.destroy();
|
|
8591
8892
|
this.scrollHandler = null;
|
|
8592
8893
|
}
|
|
8593
8894
|
|
|
8594
|
-
this.target = null;
|
|
8595
|
-
|
|
8596
8895
|
if (this.container && this.autoZIndex) {
|
|
8597
8896
|
utils.ZIndexUtils.clear(this.container);
|
|
8598
8897
|
}
|
|
8599
8898
|
|
|
8899
|
+
this.target = null;
|
|
8600
8900
|
this.container = null;
|
|
8601
8901
|
},
|
|
8602
8902
|
methods: {
|
|
8603
|
-
|
|
8604
|
-
|
|
8903
|
+
getItemProp(item, name) {
|
|
8904
|
+
return item ? utils.ObjectUtils.getItemValue(item[name]) : undefined;
|
|
8905
|
+
},
|
|
8906
|
+
getItemLabel(item) {
|
|
8907
|
+
return this.getItemProp(item, 'label');
|
|
8908
|
+
},
|
|
8909
|
+
isItemDisabled(item) {
|
|
8910
|
+
return this.getItemProp(item, 'disabled');
|
|
8911
|
+
},
|
|
8912
|
+
isItemGroup(item) {
|
|
8913
|
+
return utils.ObjectUtils.isNotEmpty(this.getItemProp(item, 'items'));
|
|
8914
|
+
},
|
|
8915
|
+
isItemSeparator(item) {
|
|
8916
|
+
return this.getItemProp(item, 'separator');
|
|
8917
|
+
},
|
|
8918
|
+
getProccessedItemLabel(processedItem) {
|
|
8919
|
+
return processedItem ? this.getItemLabel(processedItem.item) : undefined;
|
|
8920
|
+
},
|
|
8921
|
+
isProccessedItemGroup(processedItem) {
|
|
8922
|
+
return processedItem && utils.ObjectUtils.isNotEmpty(processedItem.items);
|
|
8923
|
+
},
|
|
8924
|
+
toggle(event) {
|
|
8925
|
+
this.visible ? this.hide(event) : this.show(event);
|
|
8926
|
+
},
|
|
8927
|
+
show(event, isFocus) {
|
|
8928
|
+
if (this.popup) {
|
|
8929
|
+
this.$emit('before-show');
|
|
8930
|
+
this.visible = true;
|
|
8931
|
+
this.target = this.target || event.currentTarget;
|
|
8932
|
+
}
|
|
8605
8933
|
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8934
|
+
this.focusedItemInfo = { index: this.findFirstFocusedItemIndex(), level: 0, parentKey: '' };
|
|
8935
|
+
|
|
8936
|
+
isFocus && utils.DomHandler.focus(this.menubar);
|
|
8937
|
+
},
|
|
8938
|
+
hide(event, isFocus) {
|
|
8939
|
+
if (this.popup) {
|
|
8940
|
+
this.$emit('before-hide');
|
|
8941
|
+
this.visible = false;
|
|
8609
8942
|
}
|
|
8610
8943
|
|
|
8611
|
-
this.
|
|
8944
|
+
this.activeItemPath = [];
|
|
8945
|
+
this.focusedItemInfo = { index: -1, level: 0, parentKey: '' };
|
|
8946
|
+
|
|
8947
|
+
isFocus && utils.DomHandler.focus(this.target || this.menubar);
|
|
8948
|
+
this.dirty = false;
|
|
8612
8949
|
},
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8950
|
+
onFocus(event) {
|
|
8951
|
+
this.focused = true;
|
|
8952
|
+
this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : { index: this.findFirstFocusedItemIndex(), level: 0, parentKey: '' };
|
|
8953
|
+
|
|
8954
|
+
this.$emit('focus', event);
|
|
8616
8955
|
},
|
|
8617
|
-
|
|
8618
|
-
this.
|
|
8619
|
-
this.
|
|
8956
|
+
onBlur(event) {
|
|
8957
|
+
this.focused = false;
|
|
8958
|
+
this.focusedItemInfo = { index: -1, level: 0, parentKey: '' };
|
|
8959
|
+
this.searchValue = '';
|
|
8960
|
+
this.dirty = false;
|
|
8961
|
+
this.$emit('blur', event);
|
|
8620
8962
|
},
|
|
8621
|
-
|
|
8622
|
-
this.
|
|
8963
|
+
onKeyDown(event) {
|
|
8964
|
+
if (this.disabled) {
|
|
8965
|
+
event.preventDefault();
|
|
8966
|
+
|
|
8967
|
+
return;
|
|
8968
|
+
}
|
|
8969
|
+
|
|
8970
|
+
const metaKey = event.metaKey || event.ctrlKey;
|
|
8971
|
+
|
|
8972
|
+
switch (event.code) {
|
|
8973
|
+
case 'ArrowDown':
|
|
8974
|
+
this.onArrowDownKey(event);
|
|
8975
|
+
break;
|
|
8976
|
+
|
|
8977
|
+
case 'ArrowUp':
|
|
8978
|
+
this.onArrowUpKey(event);
|
|
8979
|
+
break;
|
|
8980
|
+
|
|
8981
|
+
case 'ArrowLeft':
|
|
8982
|
+
this.onArrowLeftKey(event);
|
|
8983
|
+
break;
|
|
8984
|
+
|
|
8985
|
+
case 'ArrowRight':
|
|
8986
|
+
this.onArrowRightKey(event);
|
|
8987
|
+
break;
|
|
8988
|
+
|
|
8989
|
+
case 'Home':
|
|
8990
|
+
this.onHomeKey(event);
|
|
8991
|
+
break;
|
|
8992
|
+
|
|
8993
|
+
case 'End':
|
|
8994
|
+
this.onEndKey(event);
|
|
8995
|
+
break;
|
|
8996
|
+
|
|
8997
|
+
case 'Space':
|
|
8998
|
+
this.onSpaceKey(event);
|
|
8999
|
+
break;
|
|
9000
|
+
|
|
9001
|
+
case 'Enter':
|
|
9002
|
+
this.onEnterKey(event);
|
|
9003
|
+
break;
|
|
9004
|
+
|
|
9005
|
+
case 'Escape':
|
|
9006
|
+
this.onEscapeKey(event);
|
|
9007
|
+
break;
|
|
9008
|
+
|
|
9009
|
+
case 'Tab':
|
|
9010
|
+
this.onTabKey(event);
|
|
9011
|
+
break;
|
|
9012
|
+
|
|
9013
|
+
case 'PageDown':
|
|
9014
|
+
case 'PageUp':
|
|
9015
|
+
case 'Backspace':
|
|
9016
|
+
case 'ShiftLeft':
|
|
9017
|
+
case 'ShiftRight':
|
|
9018
|
+
//NOOP
|
|
9019
|
+
break;
|
|
9020
|
+
|
|
9021
|
+
default:
|
|
9022
|
+
if (!metaKey && utils.ObjectUtils.isPrintableCharacter(event.key)) {
|
|
9023
|
+
this.searchItems(event, event.key);
|
|
9024
|
+
}
|
|
9025
|
+
|
|
9026
|
+
break;
|
|
9027
|
+
}
|
|
9028
|
+
},
|
|
9029
|
+
onItemChange(event) {
|
|
9030
|
+
const { processedItem, isFocus } = event;
|
|
9031
|
+
|
|
9032
|
+
if (utils.ObjectUtils.isEmpty(processedItem)) return;
|
|
9033
|
+
|
|
9034
|
+
const { index, key, level, parentKey, items } = processedItem;
|
|
9035
|
+
const grouped = utils.ObjectUtils.isNotEmpty(items);
|
|
9036
|
+
|
|
9037
|
+
const activeItemPath = this.activeItemPath.filter((p) => p.parentKey !== parentKey && p.parentKey !== key);
|
|
9038
|
+
|
|
9039
|
+
grouped && activeItemPath.push(processedItem);
|
|
9040
|
+
|
|
9041
|
+
this.focusedItemInfo = { index, level, parentKey };
|
|
9042
|
+
this.activeItemPath = activeItemPath;
|
|
9043
|
+
|
|
9044
|
+
grouped && (this.dirty = true);
|
|
9045
|
+
isFocus && utils.DomHandler.focus(this.menubar);
|
|
9046
|
+
},
|
|
9047
|
+
onOverlayClick(event) {
|
|
9048
|
+
OverlayEventBus__default["default"].emit('overlay-click', {
|
|
9049
|
+
originalEvent: event,
|
|
9050
|
+
target: this.target
|
|
9051
|
+
});
|
|
9052
|
+
},
|
|
9053
|
+
onItemClick(event) {
|
|
9054
|
+
const { originalEvent, processedItem } = event;
|
|
9055
|
+
const grouped = this.isProccessedItemGroup(processedItem);
|
|
9056
|
+
const root = utils.ObjectUtils.isEmpty(processedItem.parent);
|
|
9057
|
+
const selected = this.isSelected(processedItem);
|
|
9058
|
+
|
|
9059
|
+
if (selected) {
|
|
9060
|
+
const { index, key, level, parentKey } = processedItem;
|
|
9061
|
+
|
|
9062
|
+
this.activeItemPath = this.activeItemPath.filter((p) => key !== p.key && key.startsWith(p.key));
|
|
9063
|
+
this.focusedItemInfo = { index, level, parentKey };
|
|
9064
|
+
|
|
9065
|
+
this.dirty = !root;
|
|
9066
|
+
utils.DomHandler.focus(this.menubar);
|
|
9067
|
+
} else {
|
|
9068
|
+
grouped ? this.onItemChange(event) : this.hide(originalEvent, !root);
|
|
9069
|
+
}
|
|
9070
|
+
},
|
|
9071
|
+
onItemMouseEnter(event) {
|
|
9072
|
+
if (this.dirty) {
|
|
9073
|
+
this.onItemChange(event);
|
|
9074
|
+
}
|
|
9075
|
+
},
|
|
9076
|
+
onArrowDownKey(event) {
|
|
9077
|
+
const itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();
|
|
9078
|
+
|
|
9079
|
+
this.changeFocusedItemIndex(event, itemIndex);
|
|
9080
|
+
event.preventDefault();
|
|
9081
|
+
},
|
|
9082
|
+
onArrowUpKey(event) {
|
|
9083
|
+
if (event.altKey) {
|
|
9084
|
+
if (this.focusedItemInfo.index !== -1) {
|
|
9085
|
+
const processedItem = this.visibleItems[this.focusedItemInfo.index];
|
|
9086
|
+
const grouped = this.isProccessedItemGroup(processedItem);
|
|
9087
|
+
|
|
9088
|
+
!grouped && this.onItemChange({ originalEvent: event, processedItem });
|
|
9089
|
+
}
|
|
9090
|
+
|
|
9091
|
+
this.popup && this.hide(event, true);
|
|
9092
|
+
event.preventDefault();
|
|
9093
|
+
} else {
|
|
9094
|
+
const itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex();
|
|
9095
|
+
|
|
9096
|
+
this.changeFocusedItemIndex(event, itemIndex);
|
|
9097
|
+
event.preventDefault();
|
|
9098
|
+
}
|
|
9099
|
+
},
|
|
9100
|
+
onArrowLeftKey(event) {
|
|
9101
|
+
const processedItem = this.visibleItems[this.focusedItemInfo.index];
|
|
9102
|
+
const parentItem = this.activeItemPath.find((p) => p.key === processedItem.parentKey);
|
|
9103
|
+
const root = utils.ObjectUtils.isEmpty(processedItem.parent);
|
|
9104
|
+
|
|
9105
|
+
if (!root) {
|
|
9106
|
+
this.focusedItemInfo = { index: -1, parentKey: parentItem ? parentItem.parentKey : '' };
|
|
9107
|
+
this.searchValue = '';
|
|
9108
|
+
this.onArrowDownKey(event);
|
|
9109
|
+
}
|
|
9110
|
+
|
|
9111
|
+
this.activeItemPath = this.activeItemPath.filter((p) => p.parentKey !== this.focusedItemInfo.parentKey);
|
|
9112
|
+
|
|
9113
|
+
event.preventDefault();
|
|
9114
|
+
},
|
|
9115
|
+
onArrowRightKey(event) {
|
|
9116
|
+
const processedItem = this.visibleItems[this.focusedItemInfo.index];
|
|
9117
|
+
const grouped = this.isProccessedItemGroup(processedItem);
|
|
9118
|
+
|
|
9119
|
+
if (grouped) {
|
|
9120
|
+
this.onItemChange({ originalEvent: event, processedItem });
|
|
9121
|
+
this.focusedItemInfo = { index: -1, parentKey: processedItem.key };
|
|
9122
|
+
this.searchValue = '';
|
|
9123
|
+
this.onArrowDownKey(event);
|
|
9124
|
+
}
|
|
9125
|
+
|
|
9126
|
+
event.preventDefault();
|
|
9127
|
+
},
|
|
9128
|
+
onHomeKey(event) {
|
|
9129
|
+
this.changeFocusedItemIndex(event, this.findFirstItemIndex());
|
|
9130
|
+
event.preventDefault();
|
|
9131
|
+
},
|
|
9132
|
+
onEndKey(event) {
|
|
9133
|
+
this.changeFocusedItemIndex(event, this.findLastItemIndex());
|
|
9134
|
+
event.preventDefault();
|
|
9135
|
+
},
|
|
9136
|
+
onEnterKey(event) {
|
|
9137
|
+
if (this.focusedItemInfo.index !== -1) {
|
|
9138
|
+
const element = utils.DomHandler.findSingle(this.menubar, `li[id="${`${this.focusedItemId}`}"]`);
|
|
9139
|
+
const anchorElement = element && utils.DomHandler.findSingle(element, '.p-menuitem-link');
|
|
9140
|
+
|
|
9141
|
+
anchorElement ? anchorElement.click() : element && element.click();
|
|
9142
|
+
|
|
9143
|
+
if (!this.popup) {
|
|
9144
|
+
const processedItem = this.visibleItems[this.focusedItemInfo.index];
|
|
9145
|
+
const grouped = this.isProccessedItemGroup(processedItem);
|
|
9146
|
+
|
|
9147
|
+
!grouped && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());
|
|
9148
|
+
}
|
|
9149
|
+
}
|
|
9150
|
+
|
|
9151
|
+
event.preventDefault();
|
|
9152
|
+
},
|
|
9153
|
+
onSpaceKey(event) {
|
|
9154
|
+
this.onEnterKey(event);
|
|
9155
|
+
},
|
|
9156
|
+
onEscapeKey(event) {
|
|
9157
|
+
this.hide(event, true);
|
|
9158
|
+
!this.popup && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());
|
|
9159
|
+
|
|
9160
|
+
event.preventDefault();
|
|
9161
|
+
},
|
|
9162
|
+
onTabKey(event) {
|
|
9163
|
+
if (this.focusedItemInfo.index !== -1) {
|
|
9164
|
+
const processedItem = this.visibleItems[this.focusedItemInfo.index];
|
|
9165
|
+
const grouped = this.isProccessedItemGroup(processedItem);
|
|
9166
|
+
|
|
9167
|
+
!grouped && this.onItemChange({ originalEvent: event, processedItem });
|
|
9168
|
+
}
|
|
9169
|
+
|
|
9170
|
+
this.hide();
|
|
8623
9171
|
},
|
|
8624
9172
|
onEnter(el) {
|
|
9173
|
+
if (this.autoZIndex) {
|
|
9174
|
+
utils.ZIndexUtils.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu);
|
|
9175
|
+
}
|
|
9176
|
+
|
|
9177
|
+
utils.DomHandler.focus(this.menubar);
|
|
9178
|
+
|
|
8625
9179
|
this.alignOverlay();
|
|
9180
|
+
this.scrollInView();
|
|
9181
|
+
},
|
|
9182
|
+
onAfterEnter() {
|
|
8626
9183
|
this.bindOutsideClickListener();
|
|
8627
|
-
this.bindResizeListener();
|
|
8628
9184
|
this.bindScrollListener();
|
|
9185
|
+
this.bindResizeListener();
|
|
8629
9186
|
|
|
8630
|
-
|
|
8631
|
-
utils.ZIndexUtils.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu);
|
|
8632
|
-
}
|
|
9187
|
+
this.$emit('show');
|
|
8633
9188
|
},
|
|
8634
9189
|
onLeave() {
|
|
8635
9190
|
this.unbindOutsideClickListener();
|
|
8636
|
-
this.unbindResizeListener();
|
|
8637
9191
|
this.unbindScrollListener();
|
|
9192
|
+
this.unbindResizeListener();
|
|
9193
|
+
|
|
9194
|
+
this.$emit('hide');
|
|
9195
|
+
this.container = null;
|
|
9196
|
+
this.dirty = false;
|
|
8638
9197
|
},
|
|
8639
9198
|
onAfterLeave(el) {
|
|
8640
9199
|
if (this.autoZIndex) {
|
|
@@ -8642,13 +9201,16 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8642
9201
|
}
|
|
8643
9202
|
},
|
|
8644
9203
|
alignOverlay() {
|
|
8645
|
-
utils.DomHandler.absolutePosition(this.container, this.target);
|
|
8646
9204
|
this.container.style.minWidth = utils.DomHandler.getOuterWidth(this.target) + 'px';
|
|
9205
|
+
utils.DomHandler.absolutePosition(this.container, this.target);
|
|
8647
9206
|
},
|
|
8648
9207
|
bindOutsideClickListener() {
|
|
8649
9208
|
if (!this.outsideClickListener) {
|
|
8650
9209
|
this.outsideClickListener = (event) => {
|
|
8651
|
-
|
|
9210
|
+
const isOutsideContainer = this.container && !this.container.contains(event.target);
|
|
9211
|
+
const isOutsideTarget = this.popup ? !(this.target && (this.target === event.target || this.target.contains(event.target))) : true;
|
|
9212
|
+
|
|
9213
|
+
if (isOutsideContainer && isOutsideTarget) {
|
|
8652
9214
|
this.hide();
|
|
8653
9215
|
}
|
|
8654
9216
|
};
|
|
@@ -8664,10 +9226,8 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8664
9226
|
},
|
|
8665
9227
|
bindScrollListener() {
|
|
8666
9228
|
if (!this.scrollHandler) {
|
|
8667
|
-
this.scrollHandler = new utils.ConnectedOverlayScrollHandler(this.target, () => {
|
|
8668
|
-
|
|
8669
|
-
this.hide();
|
|
8670
|
-
}
|
|
9229
|
+
this.scrollHandler = new utils.ConnectedOverlayScrollHandler(this.target, (event) => {
|
|
9230
|
+
this.hide(event, true);
|
|
8671
9231
|
});
|
|
8672
9232
|
}
|
|
8673
9233
|
|
|
@@ -8680,9 +9240,9 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8680
9240
|
},
|
|
8681
9241
|
bindResizeListener() {
|
|
8682
9242
|
if (!this.resizeListener) {
|
|
8683
|
-
this.resizeListener = () => {
|
|
8684
|
-
if (
|
|
8685
|
-
this.hide();
|
|
9243
|
+
this.resizeListener = (event) => {
|
|
9244
|
+
if (!utils.DomHandler.isTouchDevice()) {
|
|
9245
|
+
this.hide(event, true);
|
|
8686
9246
|
}
|
|
8687
9247
|
};
|
|
8688
9248
|
|
|
@@ -8695,22 +9255,123 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8695
9255
|
this.resizeListener = null;
|
|
8696
9256
|
}
|
|
8697
9257
|
},
|
|
8698
|
-
|
|
8699
|
-
return this.
|
|
9258
|
+
isItemMatched(processedItem) {
|
|
9259
|
+
return this.isValidItem(processedItem) && this.getProccessedItemLabel(processedItem).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase());
|
|
8700
9260
|
},
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
9261
|
+
isValidItem(processedItem) {
|
|
9262
|
+
return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item);
|
|
9263
|
+
},
|
|
9264
|
+
isValidSelectedItem(processedItem) {
|
|
9265
|
+
return this.isValidItem(processedItem) && this.isSelected(processedItem);
|
|
9266
|
+
},
|
|
9267
|
+
isSelected(processedItem) {
|
|
9268
|
+
return this.activeItemPath.some((p) => p.key === processedItem.key);
|
|
9269
|
+
},
|
|
9270
|
+
findFirstItemIndex() {
|
|
9271
|
+
return this.visibleItems.findIndex((processedItem) => this.isValidItem(processedItem));
|
|
9272
|
+
},
|
|
9273
|
+
findLastItemIndex() {
|
|
9274
|
+
return utils.ObjectUtils.findLastIndex(this.visibleItems, (processedItem) => this.isValidItem(processedItem));
|
|
9275
|
+
},
|
|
9276
|
+
findNextItemIndex(index) {
|
|
9277
|
+
const matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex((processedItem) => this.isValidItem(processedItem)) : -1;
|
|
9278
|
+
|
|
9279
|
+
return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index;
|
|
9280
|
+
},
|
|
9281
|
+
findPrevItemIndex(index) {
|
|
9282
|
+
const matchedItemIndex = index > 0 ? utils.ObjectUtils.findLastIndex(this.visibleItems.slice(0, index), (processedItem) => this.isValidItem(processedItem)) : -1;
|
|
9283
|
+
|
|
9284
|
+
return matchedItemIndex > -1 ? matchedItemIndex : index;
|
|
9285
|
+
},
|
|
9286
|
+
findSelectedItemIndex() {
|
|
9287
|
+
return this.visibleItems.findIndex((processedItem) => this.isValidSelectedItem(processedItem));
|
|
9288
|
+
},
|
|
9289
|
+
findFirstFocusedItemIndex() {
|
|
9290
|
+
const selectedIndex = this.findSelectedItemIndex();
|
|
9291
|
+
|
|
9292
|
+
return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex;
|
|
9293
|
+
},
|
|
9294
|
+
findLastFocusedItemIndex() {
|
|
9295
|
+
const selectedIndex = this.findSelectedItemIndex();
|
|
9296
|
+
|
|
9297
|
+
return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex;
|
|
9298
|
+
},
|
|
9299
|
+
searchItems(event, char) {
|
|
9300
|
+
this.searchValue = (this.searchValue || '') + char;
|
|
9301
|
+
|
|
9302
|
+
let itemIndex = -1;
|
|
9303
|
+
let matched = false;
|
|
9304
|
+
|
|
9305
|
+
if (this.focusedItemInfo.index !== -1) {
|
|
9306
|
+
itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex((processedItem) => this.isItemMatched(processedItem));
|
|
9307
|
+
itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex((processedItem) => this.isItemMatched(processedItem)) : itemIndex + this.focusedItemInfo.index;
|
|
9308
|
+
} else {
|
|
9309
|
+
itemIndex = this.visibleItems.findIndex((processedItem) => this.isItemMatched(processedItem));
|
|
8704
9310
|
}
|
|
9311
|
+
|
|
9312
|
+
if (itemIndex !== -1) {
|
|
9313
|
+
matched = true;
|
|
9314
|
+
}
|
|
9315
|
+
|
|
9316
|
+
if (itemIndex === -1 && this.focusedItemInfo.index === -1) {
|
|
9317
|
+
itemIndex = this.findFirstFocusedItemIndex();
|
|
9318
|
+
}
|
|
9319
|
+
|
|
9320
|
+
if (itemIndex !== -1) {
|
|
9321
|
+
this.changeFocusedItemIndex(event, itemIndex);
|
|
9322
|
+
}
|
|
9323
|
+
|
|
9324
|
+
if (this.searchTimeout) {
|
|
9325
|
+
clearTimeout(this.searchTimeout);
|
|
9326
|
+
}
|
|
9327
|
+
|
|
9328
|
+
this.searchTimeout = setTimeout(() => {
|
|
9329
|
+
this.searchValue = '';
|
|
9330
|
+
this.searchTimeout = null;
|
|
9331
|
+
}, 500);
|
|
9332
|
+
|
|
9333
|
+
return matched;
|
|
9334
|
+
},
|
|
9335
|
+
changeFocusedItemIndex(event, index) {
|
|
9336
|
+
if (this.focusedItemInfo.index !== index) {
|
|
9337
|
+
this.focusedItemInfo.index = index;
|
|
9338
|
+
this.scrollInView();
|
|
9339
|
+
}
|
|
9340
|
+
},
|
|
9341
|
+
scrollInView(index = -1) {
|
|
9342
|
+
const id = index !== -1 ? `${this.id}_${index}` : this.focusedItemId;
|
|
9343
|
+
const element = utils.DomHandler.findSingle(this.menubar, `li[id="${id}"]`);
|
|
9344
|
+
|
|
9345
|
+
if (element) {
|
|
9346
|
+
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' });
|
|
9347
|
+
}
|
|
9348
|
+
},
|
|
9349
|
+
createProcessedItems(items, level = 0, parent = {}, parentKey = '') {
|
|
9350
|
+
const processedItems = [];
|
|
9351
|
+
|
|
9352
|
+
items &&
|
|
9353
|
+
items.forEach((item, index) => {
|
|
9354
|
+
const key = (parentKey !== '' ? parentKey + '_' : '') + index;
|
|
9355
|
+
const newItem = {
|
|
9356
|
+
item,
|
|
9357
|
+
index,
|
|
9358
|
+
level,
|
|
9359
|
+
key,
|
|
9360
|
+
parent,
|
|
9361
|
+
parentKey
|
|
9362
|
+
};
|
|
9363
|
+
|
|
9364
|
+
newItem['items'] = this.createProcessedItems(item.items, level + 1, newItem, key);
|
|
9365
|
+
processedItems.push(newItem);
|
|
9366
|
+
});
|
|
9367
|
+
|
|
9368
|
+
return processedItems;
|
|
8705
9369
|
},
|
|
8706
9370
|
containerRef(el) {
|
|
8707
9371
|
this.container = el;
|
|
8708
9372
|
},
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
originalEvent: event,
|
|
8712
|
-
target: this.target
|
|
8713
|
-
});
|
|
9373
|
+
menubarRef(el) {
|
|
9374
|
+
this.menubar = el ? el.$el : undefined;
|
|
8714
9375
|
}
|
|
8715
9376
|
},
|
|
8716
9377
|
computed: {
|
|
@@ -8723,6 +9384,20 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8723
9384
|
'p-ripple-disabled': this.$primevue.config.ripple === false
|
|
8724
9385
|
}
|
|
8725
9386
|
];
|
|
9387
|
+
},
|
|
9388
|
+
processedItems() {
|
|
9389
|
+
return this.createProcessedItems(this.model || []);
|
|
9390
|
+
},
|
|
9391
|
+
visibleItems() {
|
|
9392
|
+
const processedItem = this.activeItemPath.find((p) => p.key === this.focusedItemInfo.parentKey);
|
|
9393
|
+
|
|
9394
|
+
return processedItem ? processedItem.items : this.processedItems;
|
|
9395
|
+
},
|
|
9396
|
+
id() {
|
|
9397
|
+
return this.$attrs.id || utils.UniqueComponentId();
|
|
9398
|
+
},
|
|
9399
|
+
focusedItemId() {
|
|
9400
|
+
return this.focusedItemInfo.index !== -1 ? `${this.id}${utils.ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : ''}_${this.focusedItemInfo.index}` : null;
|
|
8726
9401
|
}
|
|
8727
9402
|
},
|
|
8728
9403
|
components: {
|
|
@@ -8731,6 +9406,8 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8731
9406
|
}
|
|
8732
9407
|
};
|
|
8733
9408
|
|
|
9409
|
+
const _hoisted_1 = ["id"];
|
|
9410
|
+
|
|
8734
9411
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8735
9412
|
const _component_TieredMenuSub = vue.resolveComponent("TieredMenuSub");
|
|
8736
9413
|
const _component_Portal = vue.resolveComponent("Portal");
|
|
@@ -8743,31 +9420,48 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8743
9420
|
vue.createVNode(vue.Transition, {
|
|
8744
9421
|
name: "p-connected-overlay",
|
|
8745
9422
|
onEnter: $options.onEnter,
|
|
9423
|
+
onAfterEnter: $options.onAfterEnter,
|
|
8746
9424
|
onLeave: $options.onLeave,
|
|
8747
9425
|
onAfterLeave: $options.onAfterLeave
|
|
8748
9426
|
}, {
|
|
8749
9427
|
default: vue.withCtx(() => [
|
|
8750
|
-
($
|
|
9428
|
+
($data.visible)
|
|
8751
9429
|
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
8752
9430
|
key: 0,
|
|
8753
9431
|
ref: $options.containerRef,
|
|
8754
|
-
|
|
8755
|
-
|
|
9432
|
+
id: $options.id,
|
|
9433
|
+
class: $options.containerClass,
|
|
8756
9434
|
onClick: _cache[0] || (_cache[0] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
|
|
8757
|
-
}), [
|
|
9435
|
+
}, _ctx.$attrs), [
|
|
8758
9436
|
vue.createVNode(_component_TieredMenuSub, {
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
9437
|
+
ref: $options.menubarRef,
|
|
9438
|
+
id: $options.id + '_list',
|
|
9439
|
+
class: "p-tieredmenu-root-list",
|
|
9440
|
+
tabindex: !$props.disabled ? $props.tabindex : -1,
|
|
9441
|
+
role: "menubar",
|
|
9442
|
+
"aria-label": _ctx.ariaLabel,
|
|
9443
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
9444
|
+
"aria-disabled": $props.disabled || undefined,
|
|
9445
|
+
"aria-orientation": "vertical",
|
|
9446
|
+
"aria-activedescendant": $data.focused ? $options.focusedItemId : undefined,
|
|
9447
|
+
menuId: $options.id,
|
|
9448
|
+
focusedItemId: $data.focused ? $options.focusedItemId : undefined,
|
|
9449
|
+
items: $options.processedItems,
|
|
8763
9450
|
template: _ctx.$slots.item,
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
9451
|
+
activeItemPath: $data.activeItemPath,
|
|
9452
|
+
exact: $props.exact,
|
|
9453
|
+
level: 0,
|
|
9454
|
+
onFocus: $options.onFocus,
|
|
9455
|
+
onBlur: $options.onBlur,
|
|
9456
|
+
onKeydown: $options.onKeyDown,
|
|
9457
|
+
onItemClick: $options.onItemClick,
|
|
9458
|
+
onItemMouseenter: $options.onItemMouseEnter
|
|
9459
|
+
}, null, 8, ["id", "tabindex", "aria-label", "aria-labelledby", "aria-disabled", "aria-activedescendant", "menuId", "focusedItemId", "items", "template", "activeItemPath", "exact", "onFocus", "onBlur", "onKeydown", "onItemClick", "onItemMouseenter"])
|
|
9460
|
+
], 16, _hoisted_1))
|
|
8767
9461
|
: vue.createCommentVNode("", true)
|
|
8768
9462
|
]),
|
|
8769
9463
|
_: 1
|
|
8770
|
-
}, 8, ["onEnter", "onLeave", "onAfterLeave"])
|
|
9464
|
+
}, 8, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])
|
|
8771
9465
|
]),
|
|
8772
9466
|
_: 1
|
|
8773
9467
|
}, 8, ["appendTo", "disabled"]))
|
|
@@ -8807,5 +9501,5 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
8807
9501
|
|
|
8808
9502
|
return script;
|
|
8809
9503
|
|
|
8810
|
-
})(primevue.
|
|
9504
|
+
})(primevue.overlayeventbus, primevue.portal, primevue.utils, primevue.ripple, Vue);
|
|
8811
9505
|
|