@nova-design-system/nova-webcomponents 3.26.0 → 3.27.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/dist/cjs/{index-BQjqJTJB.js → index-Cfkoz1kc.js} +5 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/native.cjs.js +2 -2
- package/dist/cjs/nv-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/nv-accordion.cjs.entry.js +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-buttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +16 -3
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-drawer.cjs.entry.js +1 -1
- package/dist/cjs/nv-drawerfooter_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-notification-bullet.cjs.entry.js +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +1 -1
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
- package/dist/cjs/nv-pagination-nav.cjs.entry.js +198 -0
- package/dist/cjs/nv-paginationtable.cjs.entry.js +2 -2
- package/dist/cjs/nv-popover.cjs.entry.js +2 -2
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarcontent.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebardivider.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarfooter.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebargroup.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarheader.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarlogo.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarnavitem.cjs.entry.js +12 -5
- package/dist/cjs/nv-sidebarnavsubitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-split.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-tableheader.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-togglebutton.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/nv-dialog/nv-dialog.js +15 -2
- package/dist/collection/components/nv-pagination-nav/nv-pagination-nav.css +37 -0
- package/dist/collection/components/nv-pagination-nav/nv-pagination-nav.docs.js +278 -0
- package/dist/collection/components/nv-pagination-nav/nv-pagination-nav.js +359 -0
- package/dist/collection/components/nv-pagination-nav/nv-pagination-nav.utils.js +70 -0
- package/dist/collection/components/nv-pagination-nav/test/nv-pagination-nav.utils.test.js +66 -0
- package/dist/collection/components/nv-paginationtable/nv-paginationtable.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-sidebar/nv-sidebar.js +1 -1
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.js +1 -1
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.js +1 -1
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.js +1 -1
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.js +1 -1
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.js +1 -1
- package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.js +3 -1
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.js +11 -4
- package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.js +1 -1
- package/dist/collection/components/nv-split/nv-split.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +1 -1
- package/dist/collection/components/nv-tableheader/nv-tableheader.js +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +1 -1
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-buttongroup.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +1 -1
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-dialog.js +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-drawer.js +1 -1
- package/dist/components/nv-drawerfooter.js +1 -1
- package/dist/components/nv-drawerheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +1 -1
- package/dist/components/nv-fielddaterange.js +1 -1
- package/dist/components/nv-fielddropdown.js +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +1 -1
- package/dist/components/nv-fieldradio.js +1 -1
- package/dist/components/nv-fieldselect.js +1 -1
- package/dist/components/nv-fieldslider.js +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +1 -1
- package/dist/components/nv-fieldtime.js +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification-bullet.js +1 -1
- package/dist/components/nv-notification.js +1 -1
- package/dist/components/nv-notificationcontainer.js +1 -1
- package/dist/components/nv-pagination-nav.d.ts +11 -0
- package/dist/components/nv-pagination-nav.js +1 -0
- package/dist/components/nv-paginationtable.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-sidebar.js +1 -1
- package/dist/components/nv-sidebarcontent.js +1 -1
- package/dist/components/nv-sidebardivider.js +1 -1
- package/dist/components/nv-sidebarfooter.js +1 -1
- package/dist/components/nv-sidebargroup.js +1 -1
- package/dist/components/nv-sidebarheader.js +1 -1
- package/dist/components/nv-sidebarlogo.js +1 -1
- package/dist/components/nv-sidebarnavitem.js +1 -1
- package/dist/components/nv-sidebarnavsubitem.js +1 -1
- package/dist/components/nv-split.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +1 -1
- package/dist/components/nv-tableheader.js +1 -1
- package/dist/components/nv-toggle.js +1 -1
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-iXsbKJzR.js → p-6nAIGZFL.js} +1 -1
- package/dist/components/{p-DhDxhFz-.js → p-BBy1Mdgv.js} +1 -1
- package/dist/components/{p-BAlaMmS4.js → p-BMpkyzCW.js} +1 -1
- package/dist/components/{p-DqU-wS_x.js → p-Ba1zVklG.js} +1 -1
- package/dist/components/{p-nmQOuX7R.js → p-BvxuoODv.js} +1 -1
- package/dist/components/{p-yHGZRC6Q.js → p-BwYt1BAb.js} +1 -1
- package/dist/components/{p-CEI7jWvn.js → p-CAGzfU3O.js} +1 -1
- package/dist/components/{p-jZF_Ggmx.js → p-CV12ukSl.js} +1 -1
- package/dist/components/{p-D15RdWEG.js → p-CZkFkVd8.js} +1 -1
- package/dist/components/{p-FSPz8FER.js → p-CcmfuwSa.js} +1 -1
- package/dist/components/{p-BPufjY85.js → p-CqJqzGJS.js} +1 -1
- package/dist/components/{p-RUeDcouW.js → p-D-MnI-R8.js} +1 -1
- package/dist/components/{p-Bh6WGsHA.js → p-D0bGRzSN.js} +1 -1
- package/dist/components/{p-laRga5dw.js → p-DC_2597n.js} +1 -1
- package/dist/components/{p-DDqZBSGn.js → p-Db4JZxyy.js} +1 -1
- package/dist/components/{p-BfaMgLx7.js → p-DlOgBZa8.js} +2 -2
- package/dist/components/{p-DHNSuxz-.js → p-DrgqO3gF.js} +1 -1
- package/dist/components/{p-C9p4yTS2.js → p-Ho_7-x5W.js} +1 -1
- package/dist/components/{p-C2J7j_fw.js → p-IzPWk8zx.js} +1 -1
- package/dist/components/{p-B5KLppep.js → p-S18SgvAW.js} +1 -1
- package/dist/components/{p-CAKTe96z.js → p-T-bBxAoT.js} +1 -1
- package/dist/components/{p-CZcMM7Lh.js → p-kMTGXpRx.js} +1 -1
- package/dist/components/{p-Ce1IBFTa.js → p-uAXqRBhx.js} +1 -1
- package/dist/esm/{index-S-IZ4AN_.js → index-BCjiE1MF.js} +5 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/native.js +3 -3
- package/dist/esm/nv-accordion-item.entry.js +1 -1
- package/dist/esm/nv-accordion.entry.js +1 -1
- package/dist/esm/nv-alert.entry.js +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-buttongroup.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +16 -3
- package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
- package/dist/esm/nv-drawer.entry.js +1 -1
- package/dist/esm/nv-drawerfooter_2.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +1 -1
- package/dist/esm/nv-fieldradio.entry.js +1 -1
- package/dist/esm/nv-fieldselect.entry.js +1 -1
- package/dist/esm/nv-fieldslider.entry.js +1 -1
- package/dist/esm/nv-fieldtext.entry.js +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +1 -1
- package/dist/esm/nv-fieldtime.entry.js +1 -1
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-iconbutton_2.entry.js +1 -1
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-notification-bullet.entry.js +1 -1
- package/dist/esm/nv-notification.entry.js +1 -1
- package/dist/esm/nv-notificationcontainer.entry.js +1 -1
- package/dist/esm/nv-pagination-nav.entry.js +196 -0
- package/dist/esm/nv-paginationtable.entry.js +2 -2
- package/dist/esm/nv-popover.entry.js +2 -2
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-sidebar.entry.js +2 -2
- package/dist/esm/nv-sidebarcontent.entry.js +2 -2
- package/dist/esm/nv-sidebardivider.entry.js +2 -2
- package/dist/esm/nv-sidebarfooter.entry.js +2 -2
- package/dist/esm/nv-sidebargroup.entry.js +2 -2
- package/dist/esm/nv-sidebarheader.entry.js +2 -2
- package/dist/esm/nv-sidebarlogo.entry.js +2 -2
- package/dist/esm/nv-sidebarnavitem.entry.js +12 -5
- package/dist/esm/nv-sidebarnavsubitem.entry.js +2 -2
- package/dist/esm/nv-split.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-tableheader.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +3 -3
- package/dist/esm/nv-togglebutton.entry.js +2 -2
- package/dist/esm/nv-togglebuttongroup.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +2 -2
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/{p-7c413f8b.entry.js → p-03cc1f2c.entry.js} +1 -1
- package/dist/native/{p-1bf1a213.entry.js → p-0fe84123.entry.js} +1 -1
- package/dist/native/{p-bdaab534.entry.js → p-148c1d3e.entry.js} +1 -1
- package/dist/native/{p-fba55e2f.entry.js → p-157c5ac8.entry.js} +1 -1
- package/dist/native/{p-1a5db5e9.entry.js → p-18bdc07a.entry.js} +1 -1
- package/dist/native/{p-945ca1db.entry.js → p-1aea6fe0.entry.js} +1 -1
- package/dist/native/{p-79d8c26b.entry.js → p-1c97c353.entry.js} +1 -1
- package/dist/native/p-1e0ca4df.entry.js +1 -0
- package/dist/native/{p-3a04a563.entry.js → p-1f8cc03a.entry.js} +1 -1
- package/dist/native/p-23f0ca96.entry.js +1 -0
- package/dist/native/{p-bd143e7b.entry.js → p-24ce0c8d.entry.js} +1 -1
- package/dist/native/{p-7a8e2ef3.entry.js → p-24f69387.entry.js} +1 -1
- package/dist/native/{p-d46ea49a.entry.js → p-25ef7329.entry.js} +1 -1
- package/dist/native/{p-3fb1a188.entry.js → p-31ba86b3.entry.js} +1 -1
- package/dist/native/{p-c3ea1eca.entry.js → p-34e19b6e.entry.js} +1 -1
- package/dist/native/{p-0e8b544b.entry.js → p-39366f18.entry.js} +1 -1
- package/dist/native/{p-bef3d325.entry.js → p-3a35cf46.entry.js} +1 -1
- package/dist/native/{p-31301f1e.entry.js → p-46267895.entry.js} +1 -1
- package/dist/native/{p-043d500e.entry.js → p-539c04ad.entry.js} +1 -1
- package/dist/native/{p-e937d495.entry.js → p-56593bf0.entry.js} +1 -1
- package/dist/native/{p-70abbe4f.entry.js → p-591f3dcc.entry.js} +1 -1
- package/dist/native/p-597cac0f.entry.js +1 -0
- package/dist/native/{p-dc0d1690.entry.js → p-5a7e46ad.entry.js} +1 -1
- package/dist/native/{p-e1021e2c.entry.js → p-5c003e50.entry.js} +1 -1
- package/dist/native/{p-1dd3da3b.entry.js → p-5ce3d30b.entry.js} +1 -1
- package/dist/native/p-5f42a7f1.entry.js +1 -0
- package/dist/native/{p-a9a20f37.entry.js → p-6742f88f.entry.js} +1 -1
- package/dist/native/{p-5cbf5973.entry.js → p-67e0680e.entry.js} +1 -1
- package/dist/native/{p-6a9363a6.entry.js → p-6f3c3e2a.entry.js} +1 -1
- package/dist/native/{p-17f2525a.entry.js → p-7aac0b1a.entry.js} +1 -1
- package/dist/native/{p-f22d2ad9.entry.js → p-7d49e88d.entry.js} +1 -1
- package/dist/native/{p-06a17aba.entry.js → p-7ec28d5d.entry.js} +1 -1
- package/dist/native/{p-89f7d483.entry.js → p-855f7be1.entry.js} +1 -1
- package/dist/native/{p-04956305.entry.js → p-87758615.entry.js} +1 -1
- package/dist/native/{p-11eb959b.entry.js → p-8a0dc37b.entry.js} +1 -1
- package/dist/native/{p-6b655545.entry.js → p-8f76e030.entry.js} +1 -1
- package/dist/native/{p-b0d97496.entry.js → p-90b8b889.entry.js} +1 -1
- package/dist/native/{p-a8bc3b92.entry.js → p-927b655d.entry.js} +1 -1
- package/dist/native/{p-a9a07a8d.entry.js → p-9709c7d5.entry.js} +1 -1
- package/dist/native/{p-97a5f8d5.entry.js → p-99726dd4.entry.js} +1 -1
- package/dist/native/{p-0ec34d19.entry.js → p-9fda1976.entry.js} +1 -1
- package/dist/native/{p-S-IZ4AN_.js → p-BCjiE1MF.js} +1 -1
- package/dist/native/{p-aa232a20.entry.js → p-a16f8a14.entry.js} +1 -1
- package/dist/native/{p-bdbc92d9.entry.js → p-a6b3256b.entry.js} +1 -1
- package/dist/native/{p-702a6646.entry.js → p-b3964a1c.entry.js} +1 -1
- package/dist/native/{p-85c8be32.entry.js → p-bb43a3b4.entry.js} +1 -1
- package/dist/native/{p-e05b6008.entry.js → p-c0b05d6f.entry.js} +1 -1
- package/dist/native/p-c214e4af.entry.js +1 -0
- package/dist/native/{p-8dadc0c9.entry.js → p-c29dc907.entry.js} +1 -1
- package/dist/native/{p-48e7b457.entry.js → p-d12a2841.entry.js} +1 -1
- package/dist/native/p-d46bd21a.entry.js +1 -0
- package/dist/native/p-d6e2e120.entry.js +1 -0
- package/dist/native/p-ddedc9c1.entry.js +1 -0
- package/dist/native/{p-8ce17efd.entry.js → p-eb8ba7a2.entry.js} +1 -1
- package/dist/native/{p-0819a7b1.entry.js → p-ebff7ddb.entry.js} +1 -1
- package/dist/native/p-ecce3e66.entry.js +1 -0
- package/dist/native/{p-64104dbd.entry.js → p-f9612edf.entry.js} +1 -1
- package/dist/native/{p-a92e2ad8.entry.js → p-f9e4daf7.entry.js} +1 -1
- package/dist/native/{p-2106dfbd.entry.js → p-fb34fc7d.entry.js} +1 -1
- package/dist/native/{p-98ea927d.entry.js → p-fd5e27ae.entry.js} +1 -1
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +9 -0
- package/dist/types/components/nv-pagination-nav/nv-pagination-nav.d.ts +82 -0
- package/dist/types/components/nv-pagination-nav/nv-pagination-nav.docs.d.ts +4 -0
- package/dist/types/components/nv-pagination-nav/nv-pagination-nav.utils.d.ts +26 -0
- package/dist/types/components/nv-pagination-nav/test/nv-pagination-nav.utils.test.d.ts +1 -0
- package/dist/types/components/nv-sidebarlogo/nv-sidebarlogo.d.ts +2 -0
- package/dist/types/components.d.ts +149 -0
- package/dist/vscode-data.json +49 -0
- package/hydrate/index.js +268 -29
- package/hydrate/index.mjs +268 -29
- package/package.json +5 -1
- package/dist/native/p-0bfd188c.entry.js +0 -1
- package/dist/native/p-87a1b06c.entry.js +0 -1
- package/dist/native/p-ae4fc02a.entry.js +0 -1
- package/dist/native/p-c825c542.entry.js +0 -1
- package/dist/native/p-ce2c17dc.entry.js +0 -1
- package/dist/native/p-f2a32774.entry.js +0 -1
- package/dist/native/p-f5eff2b2.entry.js +0 -1
- package/dist/native/p-f64f1bea.entry.js +0 -1
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import { calculatePaginationRange } from "./nv-pagination-nav.utils";
|
|
3
|
+
/**
|
|
4
|
+
* A pagination navigation component that displays page numbers with Previous/Next controls.
|
|
5
|
+
* Use the isOnlyIcon prop to display Previous/Next as icon buttons for compact layouts.
|
|
6
|
+
*/
|
|
7
|
+
export class NvPaginationNav {
|
|
8
|
+
constructor() {
|
|
9
|
+
/****************************************************************************/
|
|
10
|
+
//#region PROPERTIES
|
|
11
|
+
/**
|
|
12
|
+
* Label for the previous button.
|
|
13
|
+
*/
|
|
14
|
+
this.previousButtonLabel = 'Previous';
|
|
15
|
+
/**
|
|
16
|
+
* Label for the next button.
|
|
17
|
+
*/
|
|
18
|
+
this.nextButtonLabel = 'Next';
|
|
19
|
+
/**
|
|
20
|
+
* Number of page buttons to show at the start of the pagination range.
|
|
21
|
+
*/
|
|
22
|
+
this.numStartZoneButtons = 2;
|
|
23
|
+
/**
|
|
24
|
+
* Number of page buttons to show at the end of the pagination range.
|
|
25
|
+
*/
|
|
26
|
+
this.numEndZoneButtons = 2;
|
|
27
|
+
/**
|
|
28
|
+
* Number of page buttons to show in the middle zone around the current page.
|
|
29
|
+
*/
|
|
30
|
+
this.numMiddleButtons = 1;
|
|
31
|
+
/**
|
|
32
|
+
* Current page number (1-based index).
|
|
33
|
+
*/
|
|
34
|
+
this.currentPage = 1;
|
|
35
|
+
/**
|
|
36
|
+
* Total number of items to paginate.
|
|
37
|
+
*/
|
|
38
|
+
this.totalCount = 100;
|
|
39
|
+
/**
|
|
40
|
+
* Number of items per page.
|
|
41
|
+
*/
|
|
42
|
+
this.pageSize = 10;
|
|
43
|
+
/**
|
|
44
|
+
* If true, the Previous/Next navigation buttons will be displayed as icon buttons.
|
|
45
|
+
* Page number buttons always use regular buttons.
|
|
46
|
+
*/
|
|
47
|
+
this.isOnlyIcon = false;
|
|
48
|
+
/**
|
|
49
|
+
* If true, shows the middle zone with the current page when it's not in start/end zones.
|
|
50
|
+
* If false (default), only shows one ellipsis between start and end zones (simpler pagination).
|
|
51
|
+
*/
|
|
52
|
+
this.showMiddleZone = false;
|
|
53
|
+
/**
|
|
54
|
+
* Handles page change events.
|
|
55
|
+
* @param {number} pageNumber The page number to navigate to.
|
|
56
|
+
*/
|
|
57
|
+
this.handlePageChange = (pageNumber) => {
|
|
58
|
+
if (pageNumber < 1 ||
|
|
59
|
+
pageNumber > this.totalPages ||
|
|
60
|
+
pageNumber === this.currentPage) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.currentPage = pageNumber;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//#endregion PROPERTIES
|
|
67
|
+
/****************************************************************************/
|
|
68
|
+
//#region METHODS
|
|
69
|
+
/**
|
|
70
|
+
* Calculates the total number of pages based on totalCount and pageSize.
|
|
71
|
+
* @returns {number} The total number of pages.
|
|
72
|
+
*/
|
|
73
|
+
get totalPages() {
|
|
74
|
+
return Math.ceil(this.totalCount / this.pageSize);
|
|
75
|
+
}
|
|
76
|
+
//#endregion METHODS
|
|
77
|
+
/****************************************************************************/
|
|
78
|
+
//#region WATCHERS
|
|
79
|
+
/**
|
|
80
|
+
* Watches for changes to currentPage and emits the currentPageChanged event.
|
|
81
|
+
* @param {number} newValue The new current page value.
|
|
82
|
+
*/
|
|
83
|
+
onCurrentPageChange(newValue) {
|
|
84
|
+
// Validate and constrain currentPage
|
|
85
|
+
const constrainedValue = Math.max(1, Math.min(newValue, this.totalPages));
|
|
86
|
+
if (constrainedValue !== newValue) {
|
|
87
|
+
this.currentPage = constrainedValue;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.currentPageChanged.emit(newValue);
|
|
91
|
+
}
|
|
92
|
+
//#endregion EVENTS
|
|
93
|
+
/****************************************************************************/
|
|
94
|
+
//#region RENDER
|
|
95
|
+
/**
|
|
96
|
+
* Renders a single page button.
|
|
97
|
+
* @param {number} pageNumber The page number to render.
|
|
98
|
+
* @returns {JSX.Element} The rendered page button element.
|
|
99
|
+
*/
|
|
100
|
+
renderPageButton(pageNumber) {
|
|
101
|
+
const isCurrentPage = pageNumber === this.currentPage;
|
|
102
|
+
return (h("li", { key: pageNumber, "data-scope": "page-button" }, h("nv-button", { size: "md", emphasis: "lower", active: isCurrentPage, onClick: () => this.handlePageChange(pageNumber), "data-page": pageNumber, "data-current": isCurrentPage ? 'true' : undefined }, pageNumber)));
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
const isFirstPage = this.currentPage === 1;
|
|
106
|
+
const isLastPage = this.currentPage === this.totalPages;
|
|
107
|
+
return (h(Host, { key: '536c7d2fd28a365ae3d637f7e67512832ffce284' }, h("nav", { key: 'ad98b2592c2702e9592316e03a0b0119d9da601c', "data-scope": "pagination-nav", "aria-label": "Pagination navigation" }, this.isOnlyIcon ? (h("nv-iconbutton", { name: "chevron-left", size: "md", emphasis: "lower", disabled: isFirstPage, onClick: () => this.handlePageChange(this.currentPage - 1), "data-scope": "previous-iconbutton", "aria-label": this.previousButtonLabel })) : (h("nv-button", { size: "md", emphasis: "lower", disabled: isFirstPage, onClick: () => this.handlePageChange(this.currentPage - 1), "data-scope": "previous-button" }, h("nv-icon", { slot: "leading-icon", name: "chevron-left" }), this.previousButtonLabel)), h("ol", { key: 'd52f16484737c5ea06c8bd1512e367beb4cd35b1', "data-scope": "page-list" }, calculatePaginationRange({
|
|
108
|
+
currentPage: this.currentPage,
|
|
109
|
+
totalCount: this.totalCount,
|
|
110
|
+
pageSize: this.pageSize,
|
|
111
|
+
numStartZoneButtons: this.numStartZoneButtons,
|
|
112
|
+
numEndZoneButtons: this.numEndZoneButtons,
|
|
113
|
+
numMiddleButtons: this.numMiddleButtons,
|
|
114
|
+
showMiddleZone: this.showMiddleZone,
|
|
115
|
+
}).map(item => typeof item === 'number' ? (this.renderPageButton(item)) : (h("li", { key: `ellipsis-${item}`, "data-scope": "ellipsis", "aria-hidden": "true" }, h("span", null, item))))), this.isOnlyIcon ? (h("nv-iconbutton", { name: "chevron-right", size: "md", emphasis: "lower", disabled: isLastPage, onClick: () => this.handlePageChange(this.currentPage + 1), "data-scope": "next-iconbutton", "aria-label": this.nextButtonLabel })) : (h("nv-button", { size: "md", emphasis: "lower", disabled: isLastPage, onClick: () => this.handlePageChange(this.currentPage + 1), "data-scope": "next-button" }, this.nextButtonLabel, h("nv-icon", { slot: "trailing-icon", name: "chevron-right" }))))));
|
|
116
|
+
}
|
|
117
|
+
static get is() { return "nv-pagination-nav"; }
|
|
118
|
+
static get originalStyleUrls() {
|
|
119
|
+
return {
|
|
120
|
+
"$": ["nv-pagination-nav.scss"]
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
static get styleUrls() {
|
|
124
|
+
return {
|
|
125
|
+
"$": ["nv-pagination-nav.css"]
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
static get properties() {
|
|
129
|
+
return {
|
|
130
|
+
"previousButtonLabel": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "string",
|
|
135
|
+
"resolved": "string",
|
|
136
|
+
"references": {}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": "Label for the previous button."
|
|
143
|
+
},
|
|
144
|
+
"getter": false,
|
|
145
|
+
"setter": false,
|
|
146
|
+
"reflect": true,
|
|
147
|
+
"attribute": "previous-button-label",
|
|
148
|
+
"defaultValue": "'Previous'"
|
|
149
|
+
},
|
|
150
|
+
"nextButtonLabel": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "string",
|
|
155
|
+
"resolved": "string",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "Label for the next button."
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"reflect": true,
|
|
167
|
+
"attribute": "next-button-label",
|
|
168
|
+
"defaultValue": "'Next'"
|
|
169
|
+
},
|
|
170
|
+
"numStartZoneButtons": {
|
|
171
|
+
"type": "number",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "number",
|
|
175
|
+
"resolved": "number",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Number of page buttons to show at the start of the pagination range."
|
|
183
|
+
},
|
|
184
|
+
"getter": false,
|
|
185
|
+
"setter": false,
|
|
186
|
+
"reflect": true,
|
|
187
|
+
"attribute": "num-start-zone-buttons",
|
|
188
|
+
"defaultValue": "2"
|
|
189
|
+
},
|
|
190
|
+
"numEndZoneButtons": {
|
|
191
|
+
"type": "number",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "number",
|
|
195
|
+
"resolved": "number",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": "Number of page buttons to show at the end of the pagination range."
|
|
203
|
+
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
206
|
+
"reflect": true,
|
|
207
|
+
"attribute": "num-end-zone-buttons",
|
|
208
|
+
"defaultValue": "2"
|
|
209
|
+
},
|
|
210
|
+
"numMiddleButtons": {
|
|
211
|
+
"type": "number",
|
|
212
|
+
"mutable": false,
|
|
213
|
+
"complexType": {
|
|
214
|
+
"original": "number",
|
|
215
|
+
"resolved": "number",
|
|
216
|
+
"references": {}
|
|
217
|
+
},
|
|
218
|
+
"required": false,
|
|
219
|
+
"optional": false,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": "Number of page buttons to show in the middle zone around the current page."
|
|
223
|
+
},
|
|
224
|
+
"getter": false,
|
|
225
|
+
"setter": false,
|
|
226
|
+
"reflect": true,
|
|
227
|
+
"attribute": "num-middle-buttons",
|
|
228
|
+
"defaultValue": "1"
|
|
229
|
+
},
|
|
230
|
+
"currentPage": {
|
|
231
|
+
"type": "number",
|
|
232
|
+
"mutable": true,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "number",
|
|
235
|
+
"resolved": "number",
|
|
236
|
+
"references": {}
|
|
237
|
+
},
|
|
238
|
+
"required": false,
|
|
239
|
+
"optional": false,
|
|
240
|
+
"docs": {
|
|
241
|
+
"tags": [],
|
|
242
|
+
"text": "Current page number (1-based index)."
|
|
243
|
+
},
|
|
244
|
+
"getter": false,
|
|
245
|
+
"setter": false,
|
|
246
|
+
"reflect": true,
|
|
247
|
+
"attribute": "current-page",
|
|
248
|
+
"defaultValue": "1"
|
|
249
|
+
},
|
|
250
|
+
"totalCount": {
|
|
251
|
+
"type": "number",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "number",
|
|
255
|
+
"resolved": "number",
|
|
256
|
+
"references": {}
|
|
257
|
+
},
|
|
258
|
+
"required": false,
|
|
259
|
+
"optional": false,
|
|
260
|
+
"docs": {
|
|
261
|
+
"tags": [],
|
|
262
|
+
"text": "Total number of items to paginate."
|
|
263
|
+
},
|
|
264
|
+
"getter": false,
|
|
265
|
+
"setter": false,
|
|
266
|
+
"reflect": true,
|
|
267
|
+
"attribute": "total-count",
|
|
268
|
+
"defaultValue": "100"
|
|
269
|
+
},
|
|
270
|
+
"pageSize": {
|
|
271
|
+
"type": "number",
|
|
272
|
+
"mutable": false,
|
|
273
|
+
"complexType": {
|
|
274
|
+
"original": "number",
|
|
275
|
+
"resolved": "number",
|
|
276
|
+
"references": {}
|
|
277
|
+
},
|
|
278
|
+
"required": false,
|
|
279
|
+
"optional": false,
|
|
280
|
+
"docs": {
|
|
281
|
+
"tags": [],
|
|
282
|
+
"text": "Number of items per page."
|
|
283
|
+
},
|
|
284
|
+
"getter": false,
|
|
285
|
+
"setter": false,
|
|
286
|
+
"reflect": true,
|
|
287
|
+
"attribute": "page-size",
|
|
288
|
+
"defaultValue": "10"
|
|
289
|
+
},
|
|
290
|
+
"isOnlyIcon": {
|
|
291
|
+
"type": "boolean",
|
|
292
|
+
"mutable": false,
|
|
293
|
+
"complexType": {
|
|
294
|
+
"original": "boolean",
|
|
295
|
+
"resolved": "boolean",
|
|
296
|
+
"references": {}
|
|
297
|
+
},
|
|
298
|
+
"required": false,
|
|
299
|
+
"optional": false,
|
|
300
|
+
"docs": {
|
|
301
|
+
"tags": [],
|
|
302
|
+
"text": "If true, the Previous/Next navigation buttons will be displayed as icon buttons.\nPage number buttons always use regular buttons."
|
|
303
|
+
},
|
|
304
|
+
"getter": false,
|
|
305
|
+
"setter": false,
|
|
306
|
+
"reflect": true,
|
|
307
|
+
"attribute": "is-only-icon",
|
|
308
|
+
"defaultValue": "false"
|
|
309
|
+
},
|
|
310
|
+
"showMiddleZone": {
|
|
311
|
+
"type": "boolean",
|
|
312
|
+
"mutable": false,
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "boolean",
|
|
315
|
+
"resolved": "boolean",
|
|
316
|
+
"references": {}
|
|
317
|
+
},
|
|
318
|
+
"required": false,
|
|
319
|
+
"optional": false,
|
|
320
|
+
"docs": {
|
|
321
|
+
"tags": [],
|
|
322
|
+
"text": "If true, shows the middle zone with the current page when it's not in start/end zones.\nIf false (default), only shows one ellipsis between start and end zones (simpler pagination)."
|
|
323
|
+
},
|
|
324
|
+
"getter": false,
|
|
325
|
+
"setter": false,
|
|
326
|
+
"reflect": true,
|
|
327
|
+
"attribute": "show-middle-zone",
|
|
328
|
+
"defaultValue": "false"
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
static get events() {
|
|
333
|
+
return [{
|
|
334
|
+
"method": "currentPageChanged",
|
|
335
|
+
"name": "currentPageChanged",
|
|
336
|
+
"bubbles": false,
|
|
337
|
+
"cancelable": true,
|
|
338
|
+
"composed": true,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [{
|
|
341
|
+
"name": "bind",
|
|
342
|
+
"text": "currentPage"
|
|
343
|
+
}],
|
|
344
|
+
"text": "Emitted when the current page changes."
|
|
345
|
+
},
|
|
346
|
+
"complexType": {
|
|
347
|
+
"original": "number",
|
|
348
|
+
"resolved": "number",
|
|
349
|
+
"references": {}
|
|
350
|
+
}
|
|
351
|
+
}];
|
|
352
|
+
}
|
|
353
|
+
static get watchers() {
|
|
354
|
+
return [{
|
|
355
|
+
"propName": "currentPage",
|
|
356
|
+
"methodName": "onCurrentPageChange"
|
|
357
|
+
}];
|
|
358
|
+
}
|
|
359
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a pagination range with page numbers and ellipsis items.
|
|
3
|
+
* @param {PaginationRangeConfig} config Pagination configuration.
|
|
4
|
+
* @returns {PaginationRangeItem[]} Ordered range items.
|
|
5
|
+
*/
|
|
6
|
+
export function calculatePaginationRange({ currentPage, totalCount, pageSize, numStartZoneButtons, numEndZoneButtons, numMiddleButtons, showMiddleZone, }) {
|
|
7
|
+
const totalPageCount = Math.ceil(totalCount / pageSize);
|
|
8
|
+
const paginationRange = [];
|
|
9
|
+
const totalVisibleButtons = numStartZoneButtons + numEndZoneButtons;
|
|
10
|
+
if (totalPageCount <= totalVisibleButtons) {
|
|
11
|
+
for (let i = 1; i <= totalPageCount; i++) {
|
|
12
|
+
paginationRange.push(i);
|
|
13
|
+
}
|
|
14
|
+
return paginationRange;
|
|
15
|
+
}
|
|
16
|
+
const startZoneEnd = numStartZoneButtons;
|
|
17
|
+
const endZoneStart = totalPageCount - numEndZoneButtons + 1;
|
|
18
|
+
if (!showMiddleZone) {
|
|
19
|
+
const isInNaturalStartZone = currentPage <= numStartZoneButtons;
|
|
20
|
+
const isInNaturalEndZone = currentPage >= totalPageCount - numEndZoneButtons + 1;
|
|
21
|
+
if (!isInNaturalStartZone && !isInNaturalEndZone) {
|
|
22
|
+
const middlePoint = Math.floor(totalPageCount / 2);
|
|
23
|
+
if (currentPage <= middlePoint) {
|
|
24
|
+
const startIndex = currentPage - numStartZoneButtons + 1;
|
|
25
|
+
for (let i = startIndex; i <= currentPage; i++) {
|
|
26
|
+
paginationRange.push(i);
|
|
27
|
+
}
|
|
28
|
+
paginationRange.push('...');
|
|
29
|
+
for (let i = endZoneStart; i <= totalPageCount; i++) {
|
|
30
|
+
paginationRange.push(i);
|
|
31
|
+
}
|
|
32
|
+
return paginationRange;
|
|
33
|
+
}
|
|
34
|
+
for (let i = 1; i <= numStartZoneButtons; i++) {
|
|
35
|
+
paginationRange.push(i);
|
|
36
|
+
}
|
|
37
|
+
paginationRange.push('...');
|
|
38
|
+
const endIndex = Math.min(currentPage + numEndZoneButtons - 1, totalPageCount);
|
|
39
|
+
for (let i = currentPage; i <= endIndex; i++) {
|
|
40
|
+
paginationRange.push(i);
|
|
41
|
+
}
|
|
42
|
+
return paginationRange;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const isInStartZone = currentPage <= startZoneEnd;
|
|
46
|
+
const isInEndZone = currentPage >= endZoneStart;
|
|
47
|
+
for (let i = 1; i <= startZoneEnd; i++) {
|
|
48
|
+
paginationRange.push(i);
|
|
49
|
+
}
|
|
50
|
+
if (showMiddleZone &&
|
|
51
|
+
!isInStartZone &&
|
|
52
|
+
!isInEndZone &&
|
|
53
|
+
endZoneStart > startZoneEnd + 1) {
|
|
54
|
+
paginationRange.push('...');
|
|
55
|
+
const halfMiddle = Math.floor(numMiddleButtons / 2);
|
|
56
|
+
const middleStart = Math.max(startZoneEnd + 1, currentPage - halfMiddle);
|
|
57
|
+
const middleEnd = Math.min(endZoneStart - 1, currentPage + halfMiddle);
|
|
58
|
+
for (let i = middleStart; i <= middleEnd; i++) {
|
|
59
|
+
paginationRange.push(i);
|
|
60
|
+
}
|
|
61
|
+
paginationRange.push('...');
|
|
62
|
+
}
|
|
63
|
+
else if (endZoneStart > startZoneEnd + 1) {
|
|
64
|
+
paginationRange.push('...');
|
|
65
|
+
}
|
|
66
|
+
for (let i = endZoneStart; i <= totalPageCount; i++) {
|
|
67
|
+
paginationRange.push(i);
|
|
68
|
+
}
|
|
69
|
+
return paginationRange;
|
|
70
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { calculatePaginationRange } from "../nv-pagination-nav.utils";
|
|
3
|
+
describe('nv-pagination-nav -> utils', () => {
|
|
4
|
+
describe('calculatePaginationRange', () => {
|
|
5
|
+
const baseConfig = {
|
|
6
|
+
pageSize: 10,
|
|
7
|
+
numStartZoneButtons: 2,
|
|
8
|
+
numEndZoneButtons: 2,
|
|
9
|
+
numMiddleButtons: 3,
|
|
10
|
+
};
|
|
11
|
+
it('returns all pages when total pages are less than or equal to visible buttons', () => {
|
|
12
|
+
const range = calculatePaginationRange({
|
|
13
|
+
...baseConfig,
|
|
14
|
+
currentPage: 2,
|
|
15
|
+
totalCount: 40,
|
|
16
|
+
showMiddleZone: false,
|
|
17
|
+
});
|
|
18
|
+
expect(range).toEqual([1, 2, 3, 4]);
|
|
19
|
+
});
|
|
20
|
+
it('returns one ellipsis when current page is in natural start zone', () => {
|
|
21
|
+
const range = calculatePaginationRange({
|
|
22
|
+
...baseConfig,
|
|
23
|
+
currentPage: 1,
|
|
24
|
+
totalCount: 100,
|
|
25
|
+
showMiddleZone: false,
|
|
26
|
+
});
|
|
27
|
+
expect(range).toEqual([1, 2, '...', 9, 10]);
|
|
28
|
+
});
|
|
29
|
+
it('slides start zone to include current page in first half when middle zone is disabled', () => {
|
|
30
|
+
const range = calculatePaginationRange({
|
|
31
|
+
...baseConfig,
|
|
32
|
+
currentPage: 5,
|
|
33
|
+
totalCount: 200,
|
|
34
|
+
showMiddleZone: false,
|
|
35
|
+
});
|
|
36
|
+
expect(range).toEqual([4, 5, '...', 19, 20]);
|
|
37
|
+
});
|
|
38
|
+
it('slides end zone to include current page in second half when middle zone is disabled', () => {
|
|
39
|
+
const range = calculatePaginationRange({
|
|
40
|
+
...baseConfig,
|
|
41
|
+
currentPage: 15,
|
|
42
|
+
totalCount: 200,
|
|
43
|
+
showMiddleZone: false,
|
|
44
|
+
});
|
|
45
|
+
expect(range).toEqual([1, 2, '...', 15, 16]);
|
|
46
|
+
});
|
|
47
|
+
it('shows middle zone with two ellipses when enabled', () => {
|
|
48
|
+
const range = calculatePaginationRange({
|
|
49
|
+
...baseConfig,
|
|
50
|
+
currentPage: 10,
|
|
51
|
+
totalCount: 200,
|
|
52
|
+
showMiddleZone: true,
|
|
53
|
+
});
|
|
54
|
+
expect(range).toEqual([1, 2, '...', 9, 10, 11, '...', 19, 20]);
|
|
55
|
+
});
|
|
56
|
+
it('keeps one ellipsis when middle zone is enabled but current page is in end zone', () => {
|
|
57
|
+
const range = calculatePaginationRange({
|
|
58
|
+
...baseConfig,
|
|
59
|
+
currentPage: 20,
|
|
60
|
+
totalCount: 200,
|
|
61
|
+
showMiddleZone: true,
|
|
62
|
+
});
|
|
63
|
+
expect(range).toEqual([1, 2, '...', 19, 20]);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -143,7 +143,7 @@ export class NvPaginationtable {
|
|
|
143
143
|
const pageLabel = interpolate(this.labelPage, { pageIndex: this.pageIndex + 1, pageCount: this.pageCount }, 'Page {pageIndex} of {pageCount}');
|
|
144
144
|
const totalLabel = interpolate(this.labelTotal, { rowCount: this.rowCount }, 'Total: {rowCount} rows');
|
|
145
145
|
const pageSizeOptions = generatePageSizeOptions(this.labelPageSizeOption ?? '{pageSize} per page');
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: 'c4410c8e459e488c7e6dfab19baa0dace783bed7' }, !this.hideControls && (h("div", { key: 'd17f9712b070ce79ab367406ef58e251f9fd8ef1', "data-scope": "controls" }, !this.hideFirstLast && (h("nv-iconbutton", { key: '8326bd2a9bffaddfa5ab0f1bf385ef2d435d1304', name: "chevrons-left", emphasis: "lower", size: "sm", disabled: atFirstPage, onClick: () => this.firstPage() })), !this.hidePrevNext && (h("nv-iconbutton", { key: 'e05379b57d34060934946098fdc1790afc7060f5', name: "chevron-left", emphasis: "lower", size: "sm", disabled: atFirstPage, onClick: () => this.previousPage() })), !this.hidePrevNext && (h("nv-iconbutton", { key: '9be2a29cc9bdca82b5214ce9f3802a4c397702f8', name: "chevron-right", emphasis: "lower", size: "sm", disabled: atLastPage, onClick: () => this.nextPage() })), !this.hideFirstLast && (h("nv-iconbutton", { key: '39e9bac5ebc85c1956295a4213777fd769cab5c9', name: "chevrons-right", emphasis: "lower", size: "sm", disabled: atLastPage, onClick: () => this.lastPage() })))), h("span", { key: 'bef5172038e7bec7a56ffe2d75697641227c5bbc', "data-scope": "page-label" }, pageLabel), h("span", { key: '4711e8fa8ae6814a6b90cef6906f58475ab48317', "data-scope": "total" }, totalLabel), h("div", { key: '46244978c8c8be83195a0a96b8fd9879b3d087fa', "data-scope": "per-page" }, h("nv-fieldselect", { key: '8c194d51d13839825f34f2b004468472ba652064', value: String(this.pageSize), onValueChanged: this.handlePageSizeChange, options: pageSizeOptions })), h("slot", { key: 'ff066bce5da6b738f2d7954fb4ae393824f69f34' })));
|
|
147
147
|
}
|
|
148
148
|
static get is() { return "nv-paginationtable"; }
|
|
149
149
|
static get originalStyleUrls() {
|
|
@@ -311,7 +311,7 @@ export class NvPopover {
|
|
|
311
311
|
/****************************************************************************/
|
|
312
312
|
//#region RENDER
|
|
313
313
|
render() {
|
|
314
|
-
return (h(Host, { key: '
|
|
314
|
+
return (h(Host, { key: 'f45908c500d83bbc4cc2e2bfa71d08297bb353e0' }, h("slot", { key: 'b0d692a8f25dca9d400b4ebac81bbcff895abe58', name: "trigger" }), h("div", { key: '500fdf54d35104a48936b1c31643c04ca92be8b5', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (h("div", { key: '9d3e96672c6e904ded03bb6338f5e70a18f8bf0c', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), h("slot", { key: 'ce8436ba395b75b42facc362503d272b8852308a', name: "content" }))));
|
|
315
315
|
}
|
|
316
316
|
static get is() { return "nv-popover"; }
|
|
317
317
|
static get originalStyleUrls() {
|
|
@@ -6,7 +6,7 @@ export class NvRow {
|
|
|
6
6
|
/****************************************************************************/
|
|
7
7
|
//#region RENDER
|
|
8
8
|
render() {
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: '07ad630aa3951fe325d4c767bec1d1008b8efa65' }, h("slot", { key: '50fafeac8db8bd0a34ad61196aa259dab2528b18' })));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "nv-row"; }
|
|
12
12
|
static get originalStyleUrls() {
|
|
@@ -156,7 +156,7 @@ export class NvSidebar {
|
|
|
156
156
|
//#region RENDER
|
|
157
157
|
render() {
|
|
158
158
|
const isCollapsed = this.type === 'collapsible' && !this.open;
|
|
159
|
-
return (h(Host, { key: '
|
|
159
|
+
return (h(Host, { key: '51a4f51b720a97eb58cad32cb2c92c3afe5e7a04', role: "navigation", collapsed: isCollapsed ? true : undefined, "notification-intention": this.notificationIntention, "notification-emphasis": this.notificationEmphasis, "aria-expanded": this.type === 'collapsible' ? String(this.open) : undefined }, h("div", { key: '30f2aa66cbdfc7bdc8c5d494dfe41debee565fac', class: "nv-sidebar-container" }, h("slot", { key: '519d25d1d5d8c4a5820f5b6c7655430004be542a' })), this.type === 'collapsible' && (h("button", { key: '70abdc10fed5b87dba34e7ff8cacfa44c00044b0', class: "nv-sidebar-toggle", onClick: this.handleToggle, "aria-label": this.open ? 'Collapse sidebar' : 'Expand sidebar' }, h("nv-icon", { key: 'ad693d6d1f95f41eb86d0f4cdf1ff04190cd5288', name: this.open
|
|
160
160
|
? 'layout-sidebar-left-collapse'
|
|
161
161
|
: 'layout-sidebar-right-collapse', size: "sm" })))));
|
|
162
162
|
}
|
|
@@ -7,7 +7,7 @@ export class NvSidebarcontent {
|
|
|
7
7
|
/****************************************************************************/
|
|
8
8
|
//#region RENDER
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'ad8dd37a6bce098af0ce3350c1a3035f62241d19', role: "list" }, h("slot", { key: 'c9cf80529ea060e8345929cacad2313fbb3daa17' })));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "nv-sidebarcontent"; }
|
|
13
13
|
static get originalStyleUrls() {
|
|
@@ -6,7 +6,7 @@ export class NvSidebardivider {
|
|
|
6
6
|
/****************************************************************************/
|
|
7
7
|
//#region RENDER
|
|
8
8
|
render() {
|
|
9
|
-
return h(Host, { key: '
|
|
9
|
+
return h(Host, { key: '8fd03ba4a4d6a6bb876a0f0eea367fe5f70e4a6d', role: "separator", "aria-orientation": "horizontal" });
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "nv-sidebardivider"; }
|
|
12
12
|
static get originalStyleUrls() {
|
|
@@ -8,7 +8,7 @@ export class NvSidebarfooter {
|
|
|
8
8
|
/****************************************************************************/
|
|
9
9
|
//#region RENDER
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '073019b05fc2bd13af8db145b4d7bcb8d7b20d34' }, h("slot", { key: '41905c616f7e74dcd9c578a68693b4e95cd4ccd7' })));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "nv-sidebarfooter"; }
|
|
14
14
|
static get originalStyleUrls() {
|
|
@@ -8,7 +8,7 @@ export class NvSidebargroup {
|
|
|
8
8
|
/****************************************************************************/
|
|
9
9
|
//#region RENDER
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: 'e599aa76d560f3e30b6a45b75500372bea3b6be0', role: "group", "aria-label": this.label }, this.label && h("div", { key: 'c918bdde6cb461dad11977a29f6e5385505bbbcb', class: "nv-sidebargroup-label" }, this.label), h("slot", { key: '7980eeada701c3b87be062e9728bacc0f9fc502c' })));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "nv-sidebargroup"; }
|
|
14
14
|
static get originalStyleUrls() {
|
|
@@ -8,7 +8,7 @@ export class NvSidebarheader {
|
|
|
8
8
|
/****************************************************************************/
|
|
9
9
|
//#region RENDER
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '8aff0fd7b73d0762cd8861f8d9043f494104ddfd' }, h("slot", { key: 'f9d643f352a36bf7397d5c2d81be4620641dead4' })));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "nv-sidebarheader"; }
|
|
14
14
|
static get originalStyleUrls() {
|
|
@@ -2,6 +2,8 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
/**
|
|
3
3
|
* Displays the logo and title at the top of the sidebar.
|
|
4
4
|
* Automatically switches between full and collapsed logos based on the sidebar state.
|
|
5
|
+
*
|
|
6
|
+
* @slot label - The label/name to display next to the logo. Make sure to add the class nv-sidebarlogo-title to the slot.
|
|
5
7
|
*/
|
|
6
8
|
export class NvSidebarlogo {
|
|
7
9
|
constructor() {
|
|
@@ -19,7 +21,7 @@ export class NvSidebarlogo {
|
|
|
19
21
|
render() {
|
|
20
22
|
const logoSrc = this.logo || this.defaultLogo;
|
|
21
23
|
const collapsedLogoSrc = this.collapsedLogo || this.defaultCollapsedLogo;
|
|
22
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'f4e0fe830c5fa5ef90d279c19336bd51e2e7e586' }, h("div", { key: '85d9516e1b140aa9a7bf16ca0722f35081702d19', class: "nv-sidebarlogo-container" }, h("img", { key: '82c1e3e9e47cd570a4f9aa64d120a5239c9e487c', src: logoSrc, alt: this.label || 'Logo', class: "nv-sidebarlogo-full" }), h("img", { key: '113d60ca21ec36c9f8106276f8d7abb85753c1a9', src: collapsedLogoSrc, alt: this.label || 'Logo', class: "nv-sidebarlogo-collapsed" }), h("slot", { key: '6c164d8f46d994980a4061e0a5df41fef11929b6', name: "label" }), this.label && h("span", { key: '12a5bb8deff9b73dc4c41c27aa1e5839beb46f32', class: "nv-sidebarlogo-title" }, this.label))));
|
|
23
25
|
}
|
|
24
26
|
static get is() { return "nv-sidebarlogo"; }
|
|
25
27
|
static get originalStyleUrls() {
|