@dialpad/dialtone 9.126.5 → 9.127.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/tokens/doc.json +29906 -29906
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +7 -7
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +5 -5
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
- package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker.js +10 -10
- package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.js +24 -26
- package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.js +1 -0
- package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +3 -3
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +65 -65
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/toast/toast.cjs.map +1 -1
- package/dist/vue2/lib/toast/toast.js.map +1 -1
- package/dist/vue2/localization/de-DE.cjs +1 -13
- package/dist/vue2/localization/de-DE.cjs.map +1 -1
- package/dist/vue2/localization/de-DE.js +1 -13
- package/dist/vue2/localization/de-DE.js.map +1 -1
- package/dist/vue2/localization/es-LA.cjs +1 -13
- package/dist/vue2/localization/es-LA.cjs.map +1 -1
- package/dist/vue2/localization/es-LA.js +1 -13
- package/dist/vue2/localization/es-LA.js.map +1 -1
- package/dist/vue2/localization/fr-FR.cjs +1 -13
- package/dist/vue2/localization/fr-FR.cjs.map +1 -1
- package/dist/vue2/localization/fr-FR.js +1 -13
- package/dist/vue2/localization/fr-FR.js.map +1 -1
- package/dist/vue2/localization/it-IT.cjs +1 -13
- package/dist/vue2/localization/it-IT.cjs.map +1 -1
- package/dist/vue2/localization/it-IT.js +1 -13
- package/dist/vue2/localization/it-IT.js.map +1 -1
- package/dist/vue2/localization/ja-JP.cjs +1 -8
- package/dist/vue2/localization/ja-JP.cjs.map +1 -1
- package/dist/vue2/localization/ja-JP.js +1 -8
- package/dist/vue2/localization/ja-JP.js.map +1 -1
- package/dist/vue2/localization/nl-NL.cjs +1 -13
- package/dist/vue2/localization/nl-NL.cjs.map +1 -1
- package/dist/vue2/localization/nl-NL.js +1 -13
- package/dist/vue2/localization/nl-NL.js.map +1 -1
- package/dist/vue2/localization/pt-BR.cjs +1 -13
- package/dist/vue2/localization/pt-BR.cjs.map +1 -1
- package/dist/vue2/localization/pt-BR.js +1 -13
- package/dist/vue2/localization/pt-BR.js.map +1 -1
- package/dist/vue2/localization/ru-RU.cjs +1 -23
- package/dist/vue2/localization/ru-RU.cjs.map +1 -1
- package/dist/vue2/localization/ru-RU.js +1 -23
- package/dist/vue2/localization/ru-RU.js.map +1 -1
- package/dist/vue2/localization/zh-CN.cjs +1 -8
- package/dist/vue2/localization/zh-CN.cjs.map +1 -1
- package/dist/vue2/localization/zh-CN.js +1 -8
- package/dist/vue2/localization/zh-CN.js.map +1 -1
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/common/mixins/index.cjs +1 -1
- package/dist/vue3/common/mixins/index.js +8 -10
- package/dist/vue3/common/mixins/index.js.map +1 -1
- package/dist/vue3/common/utils/index.cjs +1 -1
- package/dist/vue3/common/utils/index.cjs.map +1 -1
- package/dist/vue3/common/utils/index.js +42 -38
- package/dist/vue3/common/utils/index.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +298 -299
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +86 -110
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.js.map +1 -1
- package/dist/vue3/lib/banner/banner.cjs +2 -2
- package/dist/vue3/lib/banner/banner.cjs.map +1 -1
- package/dist/vue3/lib/banner/banner.js +27 -38
- package/dist/vue3/lib/banner/banner.js.map +1 -1
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.js +20 -18
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/vue3/lib/button/button.cjs +1 -1
- package/dist/vue3/lib/button/button.cjs.map +1 -1
- package/dist/vue3/lib/button/button.js +26 -24
- package/dist/vue3/lib/button/button.js.map +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +36 -41
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js +35 -37
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue3/lib/chip/chip.cjs +1 -1
- package/dist/vue3/lib/chip/chip.cjs.map +1 -1
- package/dist/vue3/lib/chip/chip.js +54 -57
- package/dist/vue3/lib/chip/chip.js.map +1 -1
- package/dist/vue3/lib/combobox/combobox-constants.cjs +1 -1
- package/dist/vue3/lib/combobox/combobox-constants.cjs.map +1 -1
- package/dist/vue3/lib/combobox/combobox-constants.js +2 -2
- package/dist/vue3/lib/combobox/combobox-constants.js.map +1 -1
- package/dist/vue3/lib/combobox/combobox-empty-list.cjs.map +1 -1
- package/dist/vue3/lib/combobox/combobox-empty-list.js.map +1 -1
- package/dist/vue3/lib/combobox/combobox-loading-list.cjs.map +1 -1
- package/dist/vue3/lib/combobox/combobox-loading-list.js.map +1 -1
- package/dist/vue3/lib/combobox/combobox.cjs +2 -2
- package/dist/vue3/lib/combobox/combobox.cjs.map +1 -1
- package/dist/vue3/lib/combobox/combobox.js +20 -20
- package/dist/vue3/lib/combobox/combobox.js.map +1 -1
- package/dist/vue3/lib/combobox/index.cjs +1 -1
- package/dist/vue3/lib/combobox/index.js +3 -3
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +119 -124
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js +76 -80
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs +1 -1
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.js +68 -63
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.js.map +1 -1
- package/dist/vue3/lib/contact-row/contact-row.cjs +1 -1
- package/dist/vue3/lib/contact-row/contact-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-row/contact-row.js +32 -48
- package/dist/vue3/lib/contact-row/contact-row.js.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker-constants.cjs +1 -1
- package/dist/vue3/lib/datepicker/datepicker-constants.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker-constants.js +2 -3
- package/dist/vue3/lib/datepicker/datepicker-constants.js.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
- package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker.js +264 -349
- package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue3/lib/datepicker/formatUtils.cjs +1 -1
- package/dist/vue3/lib/datepicker/formatUtils.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/formatUtils.js +21 -20
- package/dist/vue3/lib/datepicker/formatUtils.js.map +1 -1
- package/dist/vue3/lib/datepicker/utils.cjs +1 -1
- package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/utils.js +12 -11
- package/dist/vue3/lib/datepicker/utils.js.map +1 -1
- package/dist/vue3/lib/description-list/description-list.cjs +1 -1
- package/dist/vue3/lib/description-list/description-list.cjs.map +1 -1
- package/dist/vue3/lib/description-list/description-list.js +10 -10
- package/dist/vue3/lib/description-list/description-list.js.map +1 -1
- package/dist/vue3/lib/dropdown/dropdown.cjs +1 -1
- package/dist/vue3/lib/dropdown/dropdown.cjs.map +1 -1
- package/dist/vue3/lib/dropdown/dropdown.js +36 -46
- package/dist/vue3/lib/dropdown/dropdown.js.map +1 -1
- package/dist/vue3/lib/editor/editor.cjs +1 -1
- package/dist/vue3/lib/editor/editor.cjs.map +1 -1
- package/dist/vue3/lib/editor/editor.js +169 -186
- package/dist/vue3/lib/editor/editor.js.map +1 -1
- package/dist/vue3/lib/editor/index.cjs +1 -1
- package/dist/vue3/lib/editor/index.js +2 -2
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +7 -20
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.js +419 -477
- package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue3/lib/emoji-picker/index.cjs +1 -1
- package/dist/vue3/lib/emoji-picker/index.js +3 -4
- package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row-constants.js +6 -7
- package/dist/vue3/lib/emoji-row/emoji-row-constants.js.map +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row.cjs +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row.cjs.map +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row.js +53 -43
- package/dist/vue3/lib/emoji-row/emoji-row.js.map +1 -1
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs +1 -1
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.js +52 -53
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/vue3/lib/general-row/general-row.cjs +1 -1
- package/dist/vue3/lib/general-row/general-row.cjs.map +1 -1
- package/dist/vue3/lib/general-row/general-row.js +133 -118
- package/dist/vue3/lib/general-row/general-row.js.map +1 -1
- package/dist/vue3/lib/group-row/group-row.cjs +1 -1
- package/dist/vue3/lib/group-row/group-row.cjs.map +1 -1
- package/dist/vue3/lib/group-row/group-row.js +53 -39
- package/dist/vue3/lib/group-row/group-row.js.map +1 -1
- package/dist/vue3/lib/icon/icon-constants.cjs.map +1 -1
- package/dist/vue3/lib/icon/icon-constants.js.map +1 -1
- package/dist/vue3/lib/icon/icon.cjs +1 -1
- package/dist/vue3/lib/icon/icon.cjs.map +1 -1
- package/dist/vue3/lib/icon/icon.js +15 -11
- package/dist/vue3/lib/icon/icon.js.map +1 -1
- package/dist/vue3/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/vue3/lib/image-viewer/image-viewer.cjs.map +1 -1
- package/dist/vue3/lib/image-viewer/image-viewer.js +51 -47
- package/dist/vue3/lib/image-viewer/image-viewer.js.map +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node-constants.js +24 -24
- package/dist/vue3/lib/ivr-node/ivr-node-constants.js.map +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node.cjs +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node.cjs.map +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node.js +80 -76
- package/dist/vue3/lib/ivr-node/ivr-node.js.map +1 -1
- package/dist/vue3/lib/message-input/message-input-link.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input-link.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input-link.js +100 -77
- package/dist/vue3/lib/message-input/message-input-link.js.map +1 -1
- package/dist/vue3/lib/message-input/message-input-topbar.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input-topbar.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input-topbar.js +126 -94
- package/dist/vue3/lib/message-input/message-input-topbar.js.map +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input.js +272 -296
- package/dist/vue3/lib/message-input/message-input.js.map +1 -1
- package/dist/vue3/lib/modal/modal.cjs +1 -2
- package/dist/vue3/lib/modal/modal.cjs.map +1 -1
- package/dist/vue3/lib/modal/modal.js +64 -79
- package/dist/vue3/lib/modal/modal.js.map +1 -1
- package/dist/vue3/lib/notice/notice-action.cjs +1 -1
- package/dist/vue3/lib/notice/notice-action.cjs.map +1 -1
- package/dist/vue3/lib/notice/notice-action.js +38 -39
- package/dist/vue3/lib/notice/notice-action.js.map +1 -1
- package/dist/vue3/lib/notice/notice.cjs +1 -1
- package/dist/vue3/lib/notice/notice.cjs.map +1 -1
- package/dist/vue3/lib/notice/notice.js +37 -49
- package/dist/vue3/lib/notice/notice.js.map +1 -1
- package/dist/vue3/lib/pagination/pagination.cjs +1 -1
- package/dist/vue3/lib/pagination/pagination.cjs.map +1 -1
- package/dist/vue3/lib/pagination/pagination.js +72 -81
- package/dist/vue3/lib/pagination/pagination.js.map +1 -1
- package/dist/vue3/lib/popover/popover-header-footer.cjs +1 -1
- package/dist/vue3/lib/popover/popover-header-footer.cjs.map +1 -1
- package/dist/vue3/lib/popover/popover-header-footer.js +44 -45
- package/dist/vue3/lib/popover/popover-header-footer.js.map +1 -1
- package/dist/vue3/lib/popover/popover.cjs +1 -1
- package/dist/vue3/lib/popover/popover.cjs.map +1 -1
- package/dist/vue3/lib/popover/popover.js +26 -37
- package/dist/vue3/lib/popover/popover.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +4 -4
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +187 -185
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
- package/dist/vue3/lib/settings-menu-button/settings-menu-button.js.map +1 -1
- package/dist/vue3/lib/time-pill/time-pill.cjs.map +1 -1
- package/dist/vue3/lib/time-pill/time-pill.js.map +1 -1
- package/dist/vue3/lib/toast/toast.cjs +1 -1
- package/dist/vue3/lib/toast/toast.cjs.map +1 -1
- package/dist/vue3/lib/toast/toast.js +83 -127
- package/dist/vue3/lib/toast/toast.js.map +1 -1
- package/dist/vue3/lib/unread-pill/unread-pill.cjs +1 -1
- package/dist/vue3/lib/unread-pill/unread-pill.cjs.map +1 -1
- package/dist/vue3/lib/unread-pill/unread-pill.js +25 -14
- package/dist/vue3/lib/unread-pill/unread-pill.js.map +1 -1
- package/dist/vue3/localization/de-DE.cjs +157 -0
- package/dist/vue3/localization/de-DE.cjs.map +1 -0
- package/dist/vue3/localization/de-DE.js +160 -0
- package/dist/vue3/localization/de-DE.js.map +1 -0
- package/dist/vue3/localization/en-US.cjs +175 -0
- package/dist/vue3/localization/en-US.cjs.map +1 -0
- package/dist/vue3/localization/en-US.js +178 -0
- package/dist/vue3/localization/en-US.js.map +1 -0
- package/dist/vue3/localization/es-LA.cjs +157 -0
- package/dist/vue3/localization/es-LA.cjs.map +1 -0
- package/dist/vue3/localization/es-LA.js +160 -0
- package/dist/vue3/localization/es-LA.js.map +1 -0
- package/dist/vue3/localization/fr-FR.cjs +157 -0
- package/dist/vue3/localization/fr-FR.cjs.map +1 -0
- package/dist/vue3/localization/fr-FR.js +160 -0
- package/dist/vue3/localization/fr-FR.js.map +1 -0
- package/dist/vue3/localization/index.cjs +2 -0
- package/dist/vue3/localization/index.cjs.map +1 -0
- package/dist/vue3/localization/index.js +82 -0
- package/dist/vue3/localization/index.js.map +1 -0
- package/dist/vue3/localization/it-IT.cjs +157 -0
- package/dist/vue3/localization/it-IT.cjs.map +1 -0
- package/dist/vue3/localization/it-IT.js +160 -0
- package/dist/vue3/localization/it-IT.js.map +1 -0
- package/dist/vue3/localization/ja-JP.cjs +157 -0
- package/dist/vue3/localization/ja-JP.cjs.map +1 -0
- package/dist/vue3/localization/ja-JP.js +160 -0
- package/dist/vue3/localization/ja-JP.js.map +1 -0
- package/dist/vue3/localization/nl-NL.cjs +157 -0
- package/dist/vue3/localization/nl-NL.cjs.map +1 -0
- package/dist/vue3/localization/nl-NL.js +160 -0
- package/dist/vue3/localization/nl-NL.js.map +1 -0
- package/dist/vue3/localization/pt-BR.cjs +157 -0
- package/dist/vue3/localization/pt-BR.cjs.map +1 -0
- package/dist/vue3/localization/pt-BR.js +160 -0
- package/dist/vue3/localization/pt-BR.js.map +1 -0
- package/dist/vue3/localization/ru-RU.cjs +157 -0
- package/dist/vue3/localization/ru-RU.cjs.map +1 -0
- package/dist/vue3/localization/ru-RU.js +160 -0
- package/dist/vue3/localization/ru-RU.js.map +1 -0
- package/dist/vue3/localization/zh-CN.cjs +157 -0
- package/dist/vue3/localization/zh-CN.cjs.map +1 -0
- package/dist/vue3/localization/zh-CN.js +160 -0
- package/dist/vue3/localization/zh-CN.js.map +1 -0
- package/dist/vue3/shared/sr_only_close_button.cjs +1 -1
- package/dist/vue3/shared/sr_only_close_button.cjs.map +1 -1
- package/dist/vue3/shared/sr_only_close_button.js +27 -25
- package/dist/vue3/shared/sr_only_close_button.js.map +1 -1
- package/dist/vue3/types/common/mixins/index.d.ts +0 -1
- package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +8 -15
- package/dist/vue3/types/common/sr_only_close_button.vue.d.ts.map +1 -1
- package/dist/vue3/types/common/utils/index.d.ts +1 -0
- package/dist/vue3/types/common/utils/index.d.ts.map +1 -1
- package/dist/vue3/types/components/banner/banner.vue.d.ts +0 -33
- package/dist/vue3/types/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +2 -0
- package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/button/button.vue.d.ts +2 -0
- package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts +3 -15
- package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/combobox/combobox.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/combobox/combobox_constants.d.ts +2 -2
- package/dist/vue3/types/components/combobox/index.d.ts +1 -1
- package/dist/vue3/types/components/datepicker/composables/useCalendar.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts +5 -1
- package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts +0 -1
- package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/formatUtils.d.ts +5 -5
- package/dist/vue3/types/components/datepicker/formatUtils.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts +0 -4
- package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +0 -12
- package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/utils.d.ts +1 -0
- package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
- package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +0 -24
- package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
- package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/icon/icon.vue.d.ts +1 -0
- package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +3 -8
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/modal/modal.vue.d.ts +3 -35
- package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -34
- package/dist/vue3/types/components/notice/notice.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts +7 -35
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts +5 -24
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/popover/popover.vue.d.ts +0 -33
- package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +5 -10
- package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -0
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +2 -46
- package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
- package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toast/toast.vue.d.ts +4 -115
- package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/vue3/types/index.d.ts +1 -0
- package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +3 -11
- package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +3 -10
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +4 -8
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
- package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +3 -41
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +6 -25
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +6 -49
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/index.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -2
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +3 -8
- package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +6 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +12 -88
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +11 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +13 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +5 -8
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +9 -27
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +11 -21
- package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +6 -2
- package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/vue3/common/mixins/sr-only-close-button.cjs +0 -3
- package/dist/vue3/common/mixins/sr-only-close-button.cjs.map +0 -1
- package/dist/vue3/common/mixins/sr-only-close-button.js +0 -44
- package/dist/vue3/common/mixins/sr-only-close-button.js.map +0 -1
- package/dist/vue3/lib/contact-row/contact-row-constants.cjs +0 -2
- package/dist/vue3/lib/contact-row/contact-row-constants.cjs.map +0 -1
- package/dist/vue3/lib/contact-row/contact-row-constants.js +0 -5
- package/dist/vue3/lib/contact-row/contact-row-constants.js.map +0 -1
- package/dist/vue3/lib/emoji/emoji-constants.cjs +0 -2
- package/dist/vue3/lib/emoji/emoji-constants.cjs.map +0 -1
- package/dist/vue3/lib/emoji/emoji-constants.js +0 -5
- package/dist/vue3/lib/emoji/emoji-constants.js.map +0 -1
- package/dist/vue3/lib/group-row/group-row-constants.cjs +0 -2
- package/dist/vue3/lib/group-row/group-row-constants.cjs.map +0 -1
- package/dist/vue3/lib/group-row/group-row-constants.js +0 -8
- package/dist/vue3/lib/group-row/group-row-constants.js.map +0 -1
- package/dist/vue3/lib/time-pill/time-pill-constants.cjs +0 -2
- package/dist/vue3/lib/time-pill/time-pill-constants.cjs.map +0 -1
- package/dist/vue3/lib/time-pill/time-pill-constants.js +0 -8
- package/dist/vue3/lib/time-pill/time-pill-constants.js.map +0 -1
- package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts +0 -30
- package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
- package/dist/vue3/types/components/emoji/emoji_constants.d.ts +0 -3
- package/dist/vue3/types/components/emoji/emoji_constants.d.ts.map +0 -1
- package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
- package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
- package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
- package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import u from "./notice-icon.js";
|
|
2
2
|
import m from "./notice-content.js";
|
|
3
|
-
import
|
|
4
|
-
import { NOTICE_ROLES as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const b = {
|
|
3
|
+
import _ from "./notice-action.js";
|
|
4
|
+
import { NOTICE_ROLES as p, NOTICE_KINDS as h } from "./notice-constants.js";
|
|
5
|
+
import { resolveComponent as i, openBlock as d, createElementBlock as C, normalizeClass as y, createBlock as k, withCtx as n, renderSlot as o, createCommentVNode as I, createVNode as l } from "vue";
|
|
6
|
+
import { _ as N } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const g = {
|
|
9
8
|
compatConfig: { MODE: 3 },
|
|
10
9
|
name: "DtNotice",
|
|
11
10
|
components: {
|
|
12
|
-
DtNoticeIcon:
|
|
11
|
+
DtNoticeIcon: u,
|
|
13
12
|
DtNoticeContent: m,
|
|
14
|
-
DtNoticeAction:
|
|
13
|
+
DtNoticeAction: _
|
|
15
14
|
},
|
|
16
|
-
mixins: [_],
|
|
17
15
|
props: {
|
|
18
16
|
/**
|
|
19
17
|
* Sets an ID on the title element of the component. Useful for aria-describedby
|
|
@@ -47,8 +45,8 @@ const b = {
|
|
|
47
45
|
role: {
|
|
48
46
|
type: String,
|
|
49
47
|
default: "status",
|
|
50
|
-
validate(
|
|
51
|
-
return
|
|
48
|
+
validate(t) {
|
|
49
|
+
return p.includes(t);
|
|
52
50
|
}
|
|
53
51
|
},
|
|
54
52
|
/**
|
|
@@ -67,17 +65,10 @@ const b = {
|
|
|
67
65
|
kind: {
|
|
68
66
|
type: String,
|
|
69
67
|
default: "base",
|
|
70
|
-
validate(
|
|
71
|
-
return h.includes(
|
|
68
|
+
validate(t) {
|
|
69
|
+
return h.includes(t);
|
|
72
70
|
}
|
|
73
71
|
},
|
|
74
|
-
/**
|
|
75
|
-
* Props for the notice close button.
|
|
76
|
-
*/
|
|
77
|
-
closeButtonProps: {
|
|
78
|
-
type: Object,
|
|
79
|
-
default: () => ({})
|
|
80
|
-
},
|
|
81
72
|
/**
|
|
82
73
|
* Hides the close button from the notice
|
|
83
74
|
* @values true, false
|
|
@@ -143,52 +134,49 @@ const b = {
|
|
|
143
134
|
}
|
|
144
135
|
}
|
|
145
136
|
};
|
|
146
|
-
function
|
|
147
|
-
const
|
|
137
|
+
function B(t, c, e, S, v, a) {
|
|
138
|
+
const r = i("dt-notice-icon"), s = i("dt-notice-content"), f = i("dt-notice-action");
|
|
148
139
|
return d(), C("aside", {
|
|
149
|
-
class:
|
|
140
|
+
class: y(a.noticeClass),
|
|
150
141
|
"data-qa": "notice"
|
|
151
142
|
}, [
|
|
152
|
-
|
|
143
|
+
e.hideIcon ? I("", !0) : (d(), k(r, {
|
|
153
144
|
key: 0,
|
|
154
|
-
kind:
|
|
145
|
+
kind: e.kind
|
|
155
146
|
}, {
|
|
156
|
-
default:
|
|
157
|
-
|
|
147
|
+
default: n(() => [
|
|
148
|
+
o(t.$slots, "icon")
|
|
158
149
|
]),
|
|
159
150
|
_: 3
|
|
160
151
|
}, 8, ["kind"])),
|
|
161
|
-
|
|
162
|
-
"title-id":
|
|
163
|
-
"content-id":
|
|
164
|
-
title:
|
|
165
|
-
role:
|
|
152
|
+
l(s, {
|
|
153
|
+
"title-id": e.titleId,
|
|
154
|
+
"content-id": e.contentId,
|
|
155
|
+
title: e.title,
|
|
156
|
+
role: e.role
|
|
166
157
|
}, {
|
|
167
|
-
titleOverride:
|
|
168
|
-
|
|
158
|
+
titleOverride: n(() => [
|
|
159
|
+
o(t.$slots, "titleOverride")
|
|
169
160
|
]),
|
|
170
|
-
default:
|
|
171
|
-
|
|
161
|
+
default: n(() => [
|
|
162
|
+
o(t.$slots, "default")
|
|
172
163
|
]),
|
|
173
164
|
_: 3
|
|
174
165
|
}, 8, ["title-id", "content-id", "title", "role"]),
|
|
175
|
-
|
|
176
|
-
"hide-action":
|
|
177
|
-
"hide-close":
|
|
178
|
-
"close
|
|
179
|
-
"visually-hidden-close": e.visuallyHiddenClose,
|
|
180
|
-
"visually-hidden-close-label": e.visuallyHiddenCloseLabel,
|
|
181
|
-
onClose: l[0] || (l[0] = (O) => e.$emit("close"))
|
|
166
|
+
l(f, {
|
|
167
|
+
"hide-action": e.hideAction,
|
|
168
|
+
"hide-close": e.hideClose,
|
|
169
|
+
onClose: c[0] || (c[0] = (D) => t.$emit("close"))
|
|
182
170
|
}, {
|
|
183
|
-
default:
|
|
184
|
-
|
|
171
|
+
default: n(() => [
|
|
172
|
+
o(t.$slots, "action")
|
|
185
173
|
]),
|
|
186
174
|
_: 3
|
|
187
|
-
}, 8, ["hide-action", "hide-close"
|
|
175
|
+
}, 8, ["hide-action", "hide-close"])
|
|
188
176
|
], 2);
|
|
189
177
|
}
|
|
190
|
-
const
|
|
178
|
+
const K = /* @__PURE__ */ N(g, [["render", B]]);
|
|
191
179
|
export {
|
|
192
|
-
|
|
180
|
+
K as default
|
|
193
181
|
};
|
|
194
182
|
//# sourceMappingURL=notice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice.js","sources":["../../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n
|
|
1
|
+
{"version":3,"file":"notice.js","sources":["../../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtNotice',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Truncates the content instead of wrapping.\n * Used when the notice needs to have a fixed height.\n * @values true, false\n */\n truncateText: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important, 'd-notice--truncate': this.truncateText },\n ];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","role","NOTICE_ROLES","kind","NOTICE_KINDS","_createElementBlock","_normalizeClass","$options","$props","_createCommentVNode","_createBlock","_component_dt_notice_icon","_withCtx","_renderSlot","_ctx","_createVNode","_component_dt_notice_content","_component_dt_notice_action"],"mappings":";;;;;;AA+CA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAUC,GAAM;AACd,eAAOC,EAAa,SAASD,CAAI;AAAA,MAClC;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAUE,GAAM;AACd,eAAOC,EAAa,SAASD,CAAI;AAAA,MAClC;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;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BE,GAAA;AAAA,MANhB,eAAaT,EAAU;AAAA,MACvB,cAAYA,EAAS;AAAA,MACrB,gCAAOM,EAAK,MAAA,OAAA;AAAA;MA7BnB,SAAAF,EAgCM,MAAsB;AAAA,QAAtBC,EAAsBC,EAAA,QAAA,QAAA;AAAA;MAhC5B,GAAA;AAAA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("@dialpad/dialtone-icons/vue3"),e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("@dialpad/dialtone-icons/vue3"),_=require("../../localization/index.cjs"),e=require("vue"),P=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),b=require("../button/button.cjs"),m={compatConfig:{MODE:3},name:"DtPagination",components:{DtButton:b.default,DtIconChevronLeft:u.DtIconChevronLeft,DtIconChevronRight:u.DtIconChevronRight,DtIconMoreHorizontal:u.DtIconMoreHorizontal},props:{ariaLabel:{type:String,required:!0},totalPages:{type:Number,required:!0},activePage:{type:Number,default:1},maxVisible:{type:Number,default:5},hideEdges:{type:Boolean,default:!1}},emits:["change"],data(){return{currentPage:this.activePage,i18n:new _.DialtoneLocalization}},computed:{isFirstPage(){return this.currentPage===1},isLastPage(){return this.currentPage===this.totalPages},pages(){if(this.maxVisible===0)return[];if(this.totalPages<=this.maxVisible)return this.range(1,this.totalPages);let t=this.maxVisible-1,i=this.totalPages-t+1;if(this.hideEdges&&(t=t+1,i=i-1),this.currentPage<t){const r=[...this.range(1,t),"..."];return this.hideEdges||r.push(this.totalPages),r}if(this.currentPage>i){const r=["...",...this.range(i,this.totalPages)];return this.hideEdges||r.unshift(1),r}const l=this.maxVisible-(3-this.maxVisible%2),s=Math.floor(l/2);let o=this.currentPage-s,a=this.currentPage+s;this.hideEdges&&(o=o-1,a=a+1);const c=["...",...this.range(o,a),"..."];return this.hideEdges?c:[1,...c,this.totalPages]},prevAriaLabel(){return this.isFirstPage?this.i18n.$t("DIALTONE_PAGINATION_FIRST_PAGE"):this.i18n.$t("DIALTONE_PAGINATION_PREVIOUS_PAGE")},nextAriaLabel(){return this.isLastPage?this.i18n.$t("DIALTONE_PAGINATION_LAST_PAGE"):this.i18n.$t("DIALTONE_PAGINATION_NEXT_PAGE")},pageNumberAriaLabel(){return t=>t===this.totalPages?`${this.i18n.$t("DIALTONE_PAGINATION_LAST_PAGE")} ${t}`:`${this.i18n.$t("DIALTONE_PAGINATION_PAGE_NUMBER",{page:t})}`}},watch:{activePage(){this.currentPage=this.activePage}},methods:{range(t,i){const l=[];t=t>0?t:1;for(let s=t;s<=i;s++)l.push(s);return l},changePage(t){this.currentPage=t,this.$emit("change",this.currentPage)}}},p=["aria-label"],N={key:0,class:"d-pagination__separator-icon","data-qa":"dt-pagination-separator"};function A(t,i,l,s,o,a){const c=e.resolveComponent("dt-icon-chevron-left"),r=e.resolveComponent("dt-button"),h=e.resolveComponent("dt-icon-more-horizontal"),g=e.resolveComponent("dt-icon-chevron-right");return e.openBlock(),e.createElementBlock("nav",{"aria-label":l.ariaLabel,class:"d-pagination"},[e.createVNode(r,{class:"d-pagination__button","data-qa":"dt-pagination-prev","aria-label":a.prevAriaLabel,kind:"muted",importance:"clear",disabled:a.isFirstPage,onClick:i[0]||(i[0]=n=>a.changePage(o.currentPage-1))},{icon:e.withCtx(()=>[e.createVNode(c,{size:"300"})]),_:1},8,["aria-label","disabled"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pages,(n,d)=>(e.openBlock(),e.createElementBlock("div",{key:`page-${n}-${d}`,class:e.normalizeClass({"d-pagination__separator":isNaN(Number(n))})},[isNaN(Number(n))?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(h,{size:"300"})])):(e.openBlock(),e.createBlock(r,{key:1,"aria-label":a.pageNumberAriaLabel(n),kind:o.currentPage===n?"default":"muted",importance:o.currentPage===n?"primary":"clear","label-class":"",onClick:f=>a.changePage(n)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n),1)]),_:2},1032,["aria-label","kind","importance","onClick"]))],2))),128)),e.createVNode(r,{class:"d-pagination__button","data-qa":"dt-pagination-next","aria-label":a.nextAriaLabel,disabled:a.isLastPage,kind:"muted",importance:"clear",onClick:i[1]||(i[1]=n=>a.changePage(o.currentPage+1))},{icon:e.withCtx(()=>[e.createVNode(g,{size:"300"})]),_:1},8,["aria-label","disabled"])],8,p)}const v=P._(m,[["render",A]]);exports.default=v;
|
|
2
2
|
//# sourceMappingURL=pagination.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.cjs","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue3';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","start","end","pages","total","centerIndex","left","right","from","to","range","i","page","_hoisted_1","_createElementBlock","$props","_createVNode","_component_dt_button","$options","_cache","$event","$data","_component_dt_icon_chevron_left","_openBlock","_Fragment","_renderList","index","_normalizeClass","_hoisted_2","_component_dt_icon_more_horizontal","_createBlock","_withCtx","_createTextVNode","_toDisplayString","_component_dt_icon_chevron_right"],"mappings":"yQA0EKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,eAEN,WAAY,CACV,SAAAC,EAAQ,QACR,kBAAAC,EAAiB,kBACjB,mBAAAC,EAAkB,mBAClB,qBAAAC,EAAoB,oBACrB,EAED,MAAO,CAIL,UAAW,CACT,KAAM,OACN,SAAU,EACX,EAKD,WAAY,CACV,KAAM,OACN,SAAU,EACX,EAKD,cAAe,CACb,KAAM,OACN,SAAU,EACX,EAKD,cAAe,CACb,KAAM,OACN,SAAU,EACX,EAKD,oBAAqB,CACnB,KAAM,SACN,SAAU,EACX,EAKD,WAAY,CACV,KAAM,OACN,QAAS,CACV,EAOD,WAAY,CACV,KAAM,OACN,QAAS,CACV,EAOD,UAAW,CACT,KAAM,QACN,QAAS,EACV,CACF,EAED,MAAO,CAOL,QACD,EAED,MAAQ,CACN,MAAO,CACL,YAAa,KAAK,WAErB,EAED,SAAU,CACR,aAAe,CACb,OAAO,KAAK,cAAgB,CAC7B,EAED,YAAc,CACZ,OAAO,KAAK,cAAgB,KAAK,UAClC,EAED,OAAS,CACP,GAAI,KAAK,aAAe,EACtB,MAAO,GAET,GAAI,KAAK,YAAc,KAAK,WAC1B,OAAO,KAAK,MAAM,EAAG,KAAK,UAAU,EAGtC,IAAIC,EAAQ,KAAK,WAAa,EAC1BC,EAAM,KAAK,WAAaD,EAAQ,EASpC,GALI,KAAK,YACPA,EAAQA,EAAQ,EAChBC,EAAMA,EAAM,GAGV,KAAK,YAAcD,EAAO,CAC5B,MAAME,EAAQ,CAAC,GAAG,KAAK,MAAM,EAAGF,CAAK,EAAG,KAAK,EAC7C,OAAK,KAAK,WAERE,EAAM,KAAK,KAAK,UAAU,EAErBA,CACT,CAEA,GAAI,KAAK,YAAcD,EAAK,CAC1B,MAAMC,EAAQ,CAAC,MAAO,GAAG,KAAK,MAAMD,EAAK,KAAK,U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C,EAqB8B,WAAAP,EAAA,MArB9B,CAqBcN,EAAMc,mBADhBZ,EA2BM,mBAAA,MAAA,CAzBH,IAAG,QAAUF,CAAI,IAAIc,CAAK,GAC1B,MAvBPC,EAuB2C,eAAA,CAAA,0BAAA,MAAM,OAAOf,CAAI,CAAA,EAAA,IAI9C,MAAM,OAAOA,CAAI,CAAA,GADzBW,EAAAA,YAAAT,EAAAA,mBASM,MATNc,EASM,CAJJZ,EAAAA,YAEEa,EAAA,CADA,KAAK,KAAK,CAAA,oBAKdC,EASY,YAAAb,EAAA,CA9ClB,IAAA,EAuCS,aAAYF,EAAmB,oBAACH,CAAI,EACpC,KAAMS,EAAW,cAAKT,EAAI,UAAA,QAC1B,WAAYS,EAAW,cAAKT,EAAI,UAAA,QACjC,cAAY,GACX,QAAKQ,GAAEF,EAAU,WAACN,CAAI,IA3C/B,QAAAmB,EAAA,QA6CQ,IAAU,CA7ClBC,EAAAA,gBAAAC,EAAA,gBA6CWrB,CAAI,EAAA,CAAA,IA7Cf,EAAA,mEAgDII,EAAAA,YAcYC,EAAA,CAbV,MAAM,uBACN,UAAQ,qBACP,aAAYF,EAAa,cACzB,SAAUG,EAAU,WACrB,KAAK,QACL,WAAW,QACV,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEF,EAAU,WAACG,EAAW,YAAA,CAAA,KAEnB,eACT,IAEE,CAFFL,EAAAA,YAEEkB,EAAA,CADA,KAAK,KAAK,CAAA,IA3DpB,EAAA,+BAAA,EAAA,EAAArB,CAAA"}
|
|
1
|
+
{"version":3,"file":"pagination.cjs","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue3';\nimport { DialtoneLocalization } from '@/localization';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n // eslint-disable-next-line complexity\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n\n prevAriaLabel () {\n return this.isFirstPage ? this.i18n.$t('DIALTONE_PAGINATION_FIRST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_PREVIOUS_PAGE');\n },\n\n nextAriaLabel () {\n return this.isLastPage ? this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_NEXT_PAGE');\n },\n\n pageNumberAriaLabel () {\n return (page) => {\n return page === this.totalPages ? `${this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE')} ${page}` : `${this.i18n.$t('DIALTONE_PAGINATION_PAGE_NUMBER', { page })}`;\n };\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","DialtoneLocalization","start","end","pages","total","centerIndex","left","right","page","from","to","range","i","_hoisted_1","_createElementBlock","$props","_createVNode","_component_dt_button","$options","_cache","$event","$data","_component_dt_icon_chevron_left","_openBlock","_Fragment","_renderList","index","_normalizeClass","_hoisted_2","_component_dt_icon_more_horizontal","_createBlock","_withCtx","_createTextVNode","_toDisplayString","_component_dt_icon_chevron_right"],"mappings":"mTA0EKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,eAEN,WAAY,CACV,SAAAC,EAAQ,QACR,kBAAAC,EAAiB,kBACjB,mBAAAC,EAAkB,mBAClB,qBAAAC,EAAoB,oBACrB,EAED,MAAO,CAIL,UAAW,CACT,KAAM,OACN,SAAU,EACX,EAKD,WAAY,CACV,KAAM,OACN,SAAU,EACX,EAKD,WAAY,CACV,KAAM,OACN,QAAS,CACV,EAOD,WAAY,CACV,KAAM,OACN,QAAS,CACV,EAOD,UAAW,CACT,KAAM,QACN,QAAS,EACV,CACF,EAED,MAA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AOnB,CAAI,CAAA,EAAA,IAI9C,MAAM,OAAOA,CAAI,CAAA,GADzBe,EAAAA,YAAAT,EAAAA,mBASM,MATNc,EASM,CAJJZ,EAAAA,YAEEa,EAAA,CADA,KAAK,KAAK,CAAA,oBAIdC,EASY,YAAAb,EAAA,CA7ClB,IAAA,EAsCS,aAAYC,EAAmB,oBAACV,CAAI,EACpC,KAAMa,EAAW,cAAKb,EAAI,UAAA,QAC1B,WAAYa,EAAW,cAAKb,EAAI,UAAA,QACjC,cAAY,GACX,QAAKY,GAAEF,EAAU,WAACV,CAAI,IA1C/B,QAAAuB,EAAA,QA4CQ,IAAU,CA5ClBC,EAAAA,gBAAAC,EAAA,gBA4CWzB,CAAI,EAAA,CAAA,IA5Cf,EAAA,mEA+CIQ,EAAAA,YAcYC,EAAA,CAbV,MAAM,uBACN,UAAQ,qBACP,aAAYC,EAAa,cACzB,SAAUA,EAAU,WACrB,KAAK,QACL,WAAW,QACV,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEF,EAAU,WAACG,EAAW,YAAA,CAAA,KAEnB,eACT,IAEE,CAFFL,EAAAA,YAEEkB,EAAA,CADA,KAAK,KAAK,CAAA,IA1DpB,EAAA,+BAAA,EAAA,EAAArB,CAAA"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { DtIconChevronLeft as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { DtIconChevronLeft as b, DtIconChevronRight as p, DtIconMoreHorizontal as N } from "@dialpad/dialtone-icons/vue3";
|
|
2
|
+
import { DialtoneLocalization as A } from "../../localization/index.js";
|
|
3
|
+
import { resolveComponent as h, openBlock as l, createElementBlock as d, createVNode as c, withCtx as u, Fragment as f, renderList as I, normalizeClass as E, createBlock as L, createTextVNode as v, toDisplayString as T } from "vue";
|
|
4
|
+
import { _ as x } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import k from "../button/button.js";
|
|
6
|
+
const D = {
|
|
6
7
|
compatConfig: { MODE: 3 },
|
|
7
8
|
name: "DtPagination",
|
|
8
9
|
components: {
|
|
9
|
-
DtButton:
|
|
10
|
-
DtIconChevronLeft:
|
|
11
|
-
DtIconChevronRight:
|
|
12
|
-
DtIconMoreHorizontal:
|
|
10
|
+
DtButton: k,
|
|
11
|
+
DtIconChevronLeft: b,
|
|
12
|
+
DtIconChevronRight: p,
|
|
13
|
+
DtIconMoreHorizontal: N
|
|
13
14
|
},
|
|
14
15
|
props: {
|
|
15
16
|
/**
|
|
@@ -26,27 +27,6 @@ const E = {
|
|
|
26
27
|
type: Number,
|
|
27
28
|
required: !0
|
|
28
29
|
},
|
|
29
|
-
/**
|
|
30
|
-
* Descriptive label for the previous button.
|
|
31
|
-
*/
|
|
32
|
-
prevAriaLabel: {
|
|
33
|
-
type: String,
|
|
34
|
-
required: !0
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* Descriptive label for the next button.
|
|
38
|
-
*/
|
|
39
|
-
nextAriaLabel: {
|
|
40
|
-
type: String,
|
|
41
|
-
required: !0
|
|
42
|
-
},
|
|
43
|
-
/**
|
|
44
|
-
* A method that will be called to get the aria label of each page.
|
|
45
|
-
*/
|
|
46
|
-
pageNumberAriaLabel: {
|
|
47
|
-
type: Function,
|
|
48
|
-
required: !0
|
|
49
|
-
},
|
|
50
30
|
/**
|
|
51
31
|
* The active current page in the list of pages, defaults to the first page
|
|
52
32
|
*/
|
|
@@ -84,7 +64,8 @@ const E = {
|
|
|
84
64
|
],
|
|
85
65
|
data() {
|
|
86
66
|
return {
|
|
87
|
-
currentPage: this.activePage
|
|
67
|
+
currentPage: this.activePage,
|
|
68
|
+
i18n: new A()
|
|
88
69
|
};
|
|
89
70
|
},
|
|
90
71
|
computed: {
|
|
@@ -94,25 +75,35 @@ const E = {
|
|
|
94
75
|
isLastPage() {
|
|
95
76
|
return this.currentPage === this.totalPages;
|
|
96
77
|
},
|
|
78
|
+
// eslint-disable-next-line complexity
|
|
97
79
|
pages() {
|
|
98
80
|
if (this.maxVisible === 0)
|
|
99
81
|
return [];
|
|
100
82
|
if (this.totalPages <= this.maxVisible)
|
|
101
83
|
return this.range(1, this.totalPages);
|
|
102
|
-
let
|
|
103
|
-
if (this.hideEdges && (
|
|
104
|
-
const
|
|
105
|
-
return this.hideEdges ||
|
|
84
|
+
let t = this.maxVisible - 1, a = this.totalPages - t + 1;
|
|
85
|
+
if (this.hideEdges && (t = t + 1, a = a - 1), this.currentPage < t) {
|
|
86
|
+
const r = [...this.range(1, t), "..."];
|
|
87
|
+
return this.hideEdges || r.push(this.totalPages), r;
|
|
106
88
|
}
|
|
107
|
-
if (this.currentPage >
|
|
108
|
-
const
|
|
109
|
-
return this.hideEdges ||
|
|
89
|
+
if (this.currentPage > a) {
|
|
90
|
+
const r = ["...", ...this.range(a, this.totalPages)];
|
|
91
|
+
return this.hideEdges || r.unshift(1), r;
|
|
110
92
|
}
|
|
111
|
-
const
|
|
112
|
-
let
|
|
113
|
-
this.hideEdges && (
|
|
114
|
-
const g = ["...", ...this.range(
|
|
93
|
+
const o = this.maxVisible - (3 - this.maxVisible % 2), s = Math.floor(o / 2);
|
|
94
|
+
let n = this.currentPage - s, e = this.currentPage + s;
|
|
95
|
+
this.hideEdges && (n = n - 1, e = e + 1);
|
|
96
|
+
const g = ["...", ...this.range(n, e), "..."];
|
|
115
97
|
return this.hideEdges ? g : [1, ...g, this.totalPages];
|
|
98
|
+
},
|
|
99
|
+
prevAriaLabel() {
|
|
100
|
+
return this.isFirstPage ? this.i18n.$t("DIALTONE_PAGINATION_FIRST_PAGE") : this.i18n.$t("DIALTONE_PAGINATION_PREVIOUS_PAGE");
|
|
101
|
+
},
|
|
102
|
+
nextAriaLabel() {
|
|
103
|
+
return this.isLastPage ? this.i18n.$t("DIALTONE_PAGINATION_LAST_PAGE") : this.i18n.$t("DIALTONE_PAGINATION_NEXT_PAGE");
|
|
104
|
+
},
|
|
105
|
+
pageNumberAriaLabel() {
|
|
106
|
+
return (t) => t === this.totalPages ? `${this.i18n.$t("DIALTONE_PAGINATION_LAST_PAGE")} ${t}` : `${this.i18n.$t("DIALTONE_PAGINATION_PAGE_NUMBER", { page: t })}`;
|
|
116
107
|
}
|
|
117
108
|
},
|
|
118
109
|
watch: {
|
|
@@ -121,80 +112,80 @@ const E = {
|
|
|
121
112
|
}
|
|
122
113
|
},
|
|
123
114
|
methods: {
|
|
124
|
-
range(
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
for (let
|
|
128
|
-
|
|
129
|
-
return
|
|
115
|
+
range(t, a) {
|
|
116
|
+
const o = [];
|
|
117
|
+
t = t > 0 ? t : 1;
|
|
118
|
+
for (let s = t; s <= a; s++)
|
|
119
|
+
o.push(s);
|
|
120
|
+
return o;
|
|
130
121
|
},
|
|
131
|
-
changePage(
|
|
132
|
-
this.currentPage =
|
|
122
|
+
changePage(t) {
|
|
123
|
+
this.currentPage = t, this.$emit("change", this.currentPage);
|
|
133
124
|
}
|
|
134
125
|
}
|
|
135
|
-
},
|
|
126
|
+
}, O = ["aria-label"], G = {
|
|
136
127
|
key: 0,
|
|
137
128
|
class: "d-pagination__separator-icon",
|
|
138
129
|
"data-qa": "dt-pagination-separator"
|
|
139
130
|
};
|
|
140
|
-
function
|
|
141
|
-
const g =
|
|
142
|
-
return l(),
|
|
143
|
-
"aria-label":
|
|
131
|
+
function y(t, a, o, s, n, e) {
|
|
132
|
+
const g = h("dt-icon-chevron-left"), r = h("dt-button"), _ = h("dt-icon-more-horizontal"), P = h("dt-icon-chevron-right");
|
|
133
|
+
return l(), d("nav", {
|
|
134
|
+
"aria-label": o.ariaLabel,
|
|
144
135
|
class: "d-pagination"
|
|
145
136
|
}, [
|
|
146
|
-
c(
|
|
137
|
+
c(r, {
|
|
147
138
|
class: "d-pagination__button",
|
|
148
139
|
"data-qa": "dt-pagination-prev",
|
|
149
|
-
"aria-label":
|
|
140
|
+
"aria-label": e.prevAriaLabel,
|
|
150
141
|
kind: "muted",
|
|
151
142
|
importance: "clear",
|
|
152
|
-
disabled:
|
|
153
|
-
onClick:
|
|
143
|
+
disabled: e.isFirstPage,
|
|
144
|
+
onClick: a[0] || (a[0] = (i) => e.changePage(n.currentPage - 1))
|
|
154
145
|
}, {
|
|
155
|
-
icon:
|
|
146
|
+
icon: u(() => [
|
|
156
147
|
c(g, { size: "300" })
|
|
157
148
|
]),
|
|
158
149
|
_: 1
|
|
159
150
|
}, 8, ["aria-label", "disabled"]),
|
|
160
|
-
(l(!0),
|
|
161
|
-
key: `page-${i}-${
|
|
162
|
-
class:
|
|
151
|
+
(l(!0), d(f, null, I(e.pages, (i, m) => (l(), d("div", {
|
|
152
|
+
key: `page-${i}-${m}`,
|
|
153
|
+
class: E({ "d-pagination__separator": isNaN(Number(i)) })
|
|
163
154
|
}, [
|
|
164
|
-
isNaN(Number(i)) ? (l(),
|
|
165
|
-
c(
|
|
166
|
-
])) : (l(),
|
|
155
|
+
isNaN(Number(i)) ? (l(), d("div", G, [
|
|
156
|
+
c(_, { size: "300" })
|
|
157
|
+
])) : (l(), L(r, {
|
|
167
158
|
key: 1,
|
|
168
|
-
"aria-label":
|
|
169
|
-
kind:
|
|
170
|
-
importance:
|
|
159
|
+
"aria-label": e.pageNumberAriaLabel(i),
|
|
160
|
+
kind: n.currentPage === i ? "default" : "muted",
|
|
161
|
+
importance: n.currentPage === i ? "primary" : "clear",
|
|
171
162
|
"label-class": "",
|
|
172
|
-
onClick: (
|
|
163
|
+
onClick: (C) => e.changePage(i)
|
|
173
164
|
}, {
|
|
174
|
-
default:
|
|
175
|
-
|
|
165
|
+
default: u(() => [
|
|
166
|
+
v(T(i), 1)
|
|
176
167
|
]),
|
|
177
168
|
_: 2
|
|
178
169
|
}, 1032, ["aria-label", "kind", "importance", "onClick"]))
|
|
179
170
|
], 2))), 128)),
|
|
180
|
-
c(
|
|
171
|
+
c(r, {
|
|
181
172
|
class: "d-pagination__button",
|
|
182
173
|
"data-qa": "dt-pagination-next",
|
|
183
|
-
"aria-label":
|
|
184
|
-
disabled:
|
|
174
|
+
"aria-label": e.nextAriaLabel,
|
|
175
|
+
disabled: e.isLastPage,
|
|
185
176
|
kind: "muted",
|
|
186
177
|
importance: "clear",
|
|
187
|
-
onClick:
|
|
178
|
+
onClick: a[1] || (a[1] = (i) => e.changePage(n.currentPage + 1))
|
|
188
179
|
}, {
|
|
189
|
-
icon:
|
|
190
|
-
c(
|
|
180
|
+
icon: u(() => [
|
|
181
|
+
c(P, { size: "300" })
|
|
191
182
|
]),
|
|
192
183
|
_: 1
|
|
193
184
|
}, 8, ["aria-label", "disabled"])
|
|
194
|
-
], 8,
|
|
185
|
+
], 8, O);
|
|
195
186
|
}
|
|
196
|
-
const
|
|
187
|
+
const F = /* @__PURE__ */ x(D, [["render", y]]);
|
|
197
188
|
export {
|
|
198
|
-
|
|
189
|
+
F as default
|
|
199
190
|
};
|
|
200
191
|
//# sourceMappingURL=pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue3';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","start","end","pages","total","centerIndex","left","right","from","to","range","i","page","_hoisted_1","_createElementBlock","$props","_createVNode","_component_dt_button","$options","_cache","$event","$data","_component_dt_icon_chevron_left","_openBlock","_Fragment","_renderList","index","_normalizeClass","_hoisted_2","_component_dt_icon_more_horizontal","_createBlock","_withCtx","_createTextVNode","_toDisplayString","_component_dt_icon_chevron_right"],"mappings":";;;;AA0EA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EAC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AYF,EAAmB,oBAACH,CAAI;AAAA,QACpC,MAAMS,EAAW,gBAAKT,IAAI,YAAA;AAAA,QAC1B,YAAYS,EAAW,gBAAKT,IAAI,YAAA;AAAA,QACjC,eAAY;AAAA,QACX,SAAK,CAAAQ,MAAEF,EAAU,WAACN,CAAI;AAAA;QA3C/B,SAAAmB,EA6CQ,MAAU;AAAA,UA7ClBC,EAAAC,EA6CWrB,CAAI,GAAA,CAAA;AAAA;QA7Cf,GAAA;AAAA;;IAgDII,EAcYC,GAAA;AAAA,MAbV,OAAM;AAAA,MACN,WAAQ;AAAA,MACP,cAAYF,EAAa;AAAA,MACzB,UAAUG,EAAU;AAAA,MACrB,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAKC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEF,EAAU,WAACG,EAAW,cAAA,CAAA;AAAA;MAEnB,QACT,MAEE;AAAA,QAFFL,EAEEkB,GAAA,EADA,MAAK,MAAK,CAAA;AAAA;MA3DpB,GAAA;AAAA;EAAA,GAAA,GAAArB,CAAA;;;"}
|
|
1
|
+
{"version":3,"file":"pagination.js","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue3';\nimport { DialtoneLocalization } from '@/localization';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n // eslint-disable-next-line complexity\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n\n prevAriaLabel () {\n return this.isFirstPage ? this.i18n.$t('DIALTONE_PAGINATION_FIRST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_PREVIOUS_PAGE');\n },\n\n nextAriaLabel () {\n return this.isLastPage ? this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_NEXT_PAGE');\n },\n\n pageNumberAriaLabel () {\n return (page) => {\n return page === this.totalPages ? `${this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE')} ${page}` : `${this.i18n.$t('DIALTONE_PAGINATION_PAGE_NUMBER', { page })}`;\n };\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","DialtoneLocalization","start","end","pages","total","centerIndex","left","right","page","from","to","range","i","_hoisted_1","_createElementBlock","$props","_createVNode","_component_dt_button","$options","_cache","$event","$data","_component_dt_icon_chevron_left","_openBlock","_Fragment","_renderList","index","_normalizeClass","_hoisted_2","_component_dt_icon_more_horizontal","_createBlock","_withCtx","_createTextVNode","_toDisplayString","_component_dt_icon_chevron_right"],"mappings":";;;;;AA0EA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO;AAAA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ict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("@dialpad/dialtone-icons/vue3"),l=require("../../common/utils/index.cjs"),d=require("../../localization/index.cjs"),e=require("vue"),u=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),_=require("../button/button.cjs"),p={compatConfig:{MODE:3},name:"PopoverHeaderFooter",components:{DtButton:_.default,DtIconClose:i.DtIconClose},props:{type:{type:String,validator:function(t){return["header","footer"].includes(t)}},contentClass:{type:[String,Array,Object],default:""},showCloseButton:{type:Boolean,default:!1}},emits:["close"],data(){return{hasSlotContent:l.hasSlotContent,i18n:new d.DialtoneLocalization}},computed:{closeButtonTitle(){return this.i18n.$t("DIALTONE_CLOSE_BUTTON")}},methods:{focusCloseButton(){var n;const t=l.returnFirstEl((n=this.$refs["popover__close-button"])==null?void 0:n.$el);t==null||t.focus()}}};function m(t,n,o,v,a,r){const s=e.resolveComponent("dt-icon-close"),c=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("div",{"data-qa":"dt-popover-header-footer",class:e.normalizeClass({"d-popover__header":o.type==="header","d-popover__footer":o.type==="footer"})},[a.hasSlotContent(t.$slots.content)?(e.openBlock(),e.createElementBlock("div",{key:0,"data-qa":"dt-popover-header-footer-content",class:e.normalizeClass([{"d-popover__header__content":o.type==="header","d-popover__footer__content":o.type==="footer"},o.contentClass])},[e.renderSlot(t.$slots,"content")],2)):e.createCommentVNode("",!0),o.showCloseButton?(e.openBlock(),e.createBlock(c,{key:1,ref:"popover__close-button","data-qa":"dt-popover-close",class:e.normalizeClass({"d-popover__header__close-button":o.type==="header","d-popover__footer__close-button":o.type==="footer"}),importance:"outlined",kind:"muted",circle:"","aria-label":r.closeButtonTitle,title:r.closeButtonTitle,onClick:n[0]||(n[0]=C=>t.$emit("close"))},{icon:e.withCtx(()=>[e.createVNode(s,{size:"300"})]),_:1},8,["class","aria-label","title"])):e.createCommentVNode("",!0)],2)}const f=u._(p,[["render",m]]);exports.default=f;
|
|
2
2
|
//# sourceMappingURL=popover-header-footer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-header-footer.cjs","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"hasSlotContent($slots.content)\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n
|
|
1
|
+
{"version":3,"file":"popover-header-footer.cjs","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"hasSlotContent($slots.content)\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport { hasSlotContent, returnFirstEl } from '@/common/utils';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n data () {\n return {\n hasSlotContent,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n methods: {\n focusCloseButton () {\n const closeButton = returnFirstEl(this.$refs['popover__close-button']?.$el);\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconClose","value","hasSlotContent","DialtoneLocalization","closeButton","returnFirstEl","_a","_createElementBlock","_normalizeClass","$props","$data","_ctx","_renderSlot","_createCommentVNode","_createBlock","_component_dt_button","$options","_createVNode","_component_dt_icon_close"],"mappings":"6VAiDKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,sBACN,WAAY,CACV,SAAAC,EAAQ,oBACRC,EAAW,WACZ,EAED,MAAO,CAEL,KAAM,CACJ,KAAM,OACN,UAAW,SAAUC,EAAO,CAC1B,MAAO,CAAC,SAAU,QAAQ,EAAE,SAASA,CAAK,CAC3C,CACF,EAKD,aAAc,CACZ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