@dialpad/dialtone 9.126.6 → 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 +23168 -23168
- 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 +2 -2
- 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 +33 -29
- 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 +3 -3
- 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 -181
- 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 +4 -4
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-with-popover.cjs","sources":["../../../recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-bind=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n v-model:open=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n @opened=\"opened\"\n >\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[\n 'd-recipe-combobox-with-popover__list',\n DROPDOWN_PADDING_CLASSES[padding],\n listClass,\n ]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n hasSlotContent,\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$attrs,\n\n onSelect: this.onSelect,\n\n onEscape: this.onEscape,\n\n onHighlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtCombobox","DtPopover","ComboboxLoadingList","ComboboxEmptyList","SrOnlyCloseButtonMixin","t","LABEL_SIZES","getUniqueString","padding","DROPDOWN_PADDING_CLASSES","item","contentWidth","POPOVER_CONTENT_WIDTHS","appendTo","POPOVER_APPEND_TO_VALUES","hasSlotContent","show","val","value","highlightIndex","opened","_a","popoverEl","_b","comboboxEl","_c","el","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_openBlock","_createBlock","_component_dt_combobox","_mergeProps","$props","$data","$options","_withCtx","inputProps","_createElementVNode","args","_withKeys","$event","_renderSlot","_ctx","listProps","clearHighlightIndex","_createVNode","_component_dt_popover","_cache","_createSlots","_normalizeClass","_component_combobox_loading_list","_normalizeProps","_component_combobox_empty_list"],"mappings":"6lBA6HKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,8BAEN,WAAY,YACVC,EAAU,QACV,UAAAC,EAAS,QACT,oBAAAC,EAAmB,QACnB,kBAAAC,EAAiB,OAClB,EAED,OAAQ,CAACC,EAAAA,OAAsB,EAE/B,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,EACX,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAMD,KAAM,CACJ,KAAM,OACN,QAAS,KACT,UAAYC,GAAM,OAAO,OAAOC,aAAW,EAAE,SAASD,CAAC,CACxD,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAQD,SAAU,CACR,KAAM,QACN,QAAS,IACV,EAMD,OAAQ,CACN,KAAM,OACN,SAAW,CAAE,OAAOE,EAAe,gBAAA,CAAK,CACzC,EAKD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,kBAAmB,CACjB,KAAM,SACN,QAAS,IACV,EAKD,YAAa,CACX,KAAM,SACN,QAAS,IACV,EAMD,UAAW,CACT,KAAM,OACN,QAAS,EACV,EAMD,SAAU,CACR,KAAM,OACN,QAAS,EACV,EAKD,Q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cAAA,CAwEmB,kBAET,IAwBM,CAxBNX,EAAAA,mBAwBM,MAAA,CAvBJ,IAAI,cACH,MA5EbY,EAAAA,eAAA,wCA4E0FhB,EAAA,yBAAyBD,EAAO,OAAA,EAAiBA,EAAS,YAKvI,aAAYY,EACZ,WAAUA,IAGHZ,EAAO,SADfJ,EAAAA,UAAA,EAAAC,EAAA,YAGEqB,EAvFdC,EAAAA,eAAApB,EAAAA,WAAA,CAAA,IAAA,GAsFsBY,CAAS,CAAA,EAAA,KAAA,EAAA,GAGNX,EAAA,WAAaA,EAAiB,iCAD3CH,EAAAA,YAIEuB,EAJFrB,aAIE,CA5Fd,IAAA,GA0FsBY,EAAS,CAChB,QAASX,EAAiB,iBAAA,CAAA,EAAA,KAAA,GAAA,CAAA,SAAA,CAAA,GAE7BS,aAIEC,EAAA,OAAA,OAAA,CAjGd,IAAA,EAgGe,UAAYC,GAhG3B,EAAA,GAAAjB,CAAA,IAAA,EAAA,IA8DgBO,EAAc,eAACS,EAAM,OAAC,MAAM,GA9D5C,KA+DW,gBA/DX,GAAAP,EAAA,QAiEU,IAIM,CAJNE,EAAA,mBAIM,MAJNZ,EAIM,CADJgB,aAAsBC,EAAA,OAAA,QAAA,UApElC,IAAA,KAAA,OAsGgBT,EAAc,eAACS,EAAM,OAAC,MAAM,GAtG5C,KAuGW,gBAvGX,GAAAP,EAAA,QAyGU,IAIM,CAJNE,EAAA,mBAIM,MAJNV,EAIM,CADJc,aAAsBC,EAAA,OAAA,QAAA,UA5GlC,IAAA,KAAA,iMAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"combobox-with-popover.cjs","sources":["../../../recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-bind=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n v-model:open=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @opened=\"opened\"\n >\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[\n 'd-recipe-combobox-with-popover__list',\n DROPDOWN_PADDING_CLASSES[padding],\n listClass,\n ]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, COMBOBOX_LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(COMBOBOX_LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n hasSlotContent,\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$attrs,\n\n onSelect: this.onSelect,\n\n onEscape: this.onEscape,\n\n onHighlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtCombobox","DtPopover","ComboboxLoadingList","ComboboxEmptyList","t","COMBOBOX_LABEL_SIZES","getUniqueString","padding","DROPDOWN_PADDING_CLASSES","item","contentWidth","POPOVER_CONTENT_WIDTHS","appendTo","POPOVER_APPEND_TO_VALUES","hasSlotContent","show","val","value","highlightIndex","opened","_a","popoverEl","_b","comboboxEl","_c","el","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_openBlock","_createBlock","_component_dt_combobox","_mergeProps","$props","$data","$options","_withCtx","inputProps","_createElementVNode","args","_withKeys","$event","_renderSlot","_ctx","listProps","clearHighlightIndex","_createVNode","_component_dt_popover","_cache","_createSlots","_normalizeClass","_component_combobox_loading_list","_normalizeProps","_component_combobox_empty_list"],"mappings":"miBA0HKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,8BAEN,WAAY,YACVC,EAAU,QACV,UAAAC,EAAS,QACT,oBAAAC,EAAmB,QACnB,kBAAAC,EAAiB,OAClB,EAED,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,EACX,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAMD,KAAM,CACJ,KAAM,OACN,QAAS,KACT,UAAYC,GAAM,OAAO,OAAOC,sBAAoB,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IM,MAJNV,EAIM,CADJc,aAAsBC,EAAA,OAAA,QAAA,UA1GlC,IAAA,KAAA,2IAAA,EAAA"}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { getUniqueString as g, hasSlotContent as
|
|
4
|
-
import E from "
|
|
5
|
-
import { resolveComponent as a, openBlock as f, createBlock as p, mergeProps as c, withCtx as l, createElementVNode as r, withKeys as y, renderSlot as d, createVNode as P, createSlots as A, normalizeClass as D, normalizeProps as k } from "vue";
|
|
1
|
+
import _ from "../combobox/combobox-loading-list.js";
|
|
2
|
+
import C from "../combobox/combobox-empty-list.js";
|
|
3
|
+
import { getUniqueString as g, hasSlotContent as v } from "../../common/utils/index.js";
|
|
4
|
+
import { resolveComponent as r, openBlock as f, createBlock as p, mergeProps as c, withCtx as l, createElementVNode as a, withKeys as y, renderSlot as d, createVNode as E, createSlots as P, normalizeClass as A, normalizeProps as D } from "vue";
|
|
6
5
|
import { _ as B } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
6
|
+
import k from "../combobox/combobox.js";
|
|
7
|
+
import F from "../popover/popover.js";
|
|
8
|
+
import { COMBOBOX_LABEL_SIZES as W } from "../combobox/combobox-constants.js";
|
|
10
9
|
import { DROPDOWN_PADDING_CLASSES as S } from "../dropdown/dropdown-constants.js";
|
|
11
|
-
import { POPOVER_CONTENT_WIDTHS as
|
|
10
|
+
import { POPOVER_CONTENT_WIDTHS as I, POPOVER_APPEND_TO_VALUES as M } from "../popover/popover-constants.js";
|
|
12
11
|
const N = {
|
|
13
12
|
compatConfig: { MODE: 3 },
|
|
14
13
|
name: "DtRecipeComboboxWithPopover",
|
|
15
14
|
components: {
|
|
16
|
-
DtCombobox:
|
|
17
|
-
DtPopover:
|
|
18
|
-
ComboboxLoadingList:
|
|
19
|
-
ComboboxEmptyList:
|
|
15
|
+
DtCombobox: k,
|
|
16
|
+
DtPopover: F,
|
|
17
|
+
ComboboxLoadingList: _,
|
|
18
|
+
ComboboxEmptyList: C
|
|
20
19
|
},
|
|
21
|
-
mixins: [E],
|
|
22
20
|
props: {
|
|
23
21
|
/**
|
|
24
22
|
* String to use for the input label.
|
|
@@ -42,7 +40,7 @@ const N = {
|
|
|
42
40
|
size: {
|
|
43
41
|
type: String,
|
|
44
42
|
default: null,
|
|
45
|
-
validator: (
|
|
43
|
+
validator: (t) => Object.values(W).includes(t)
|
|
46
44
|
},
|
|
47
45
|
/**
|
|
48
46
|
* Description for the input
|
|
@@ -114,7 +112,7 @@ const N = {
|
|
|
114
112
|
padding: {
|
|
115
113
|
type: String,
|
|
116
114
|
default: "small",
|
|
117
|
-
validator: (
|
|
115
|
+
validator: (t) => Object.keys(S).some((o) => o === t)
|
|
118
116
|
},
|
|
119
117
|
/**
|
|
120
118
|
* Width configuration for the popover content. When its value is 'anchor',
|
|
@@ -123,7 +121,7 @@ const N = {
|
|
|
123
121
|
contentWidth: {
|
|
124
122
|
type: String,
|
|
125
123
|
default: null,
|
|
126
|
-
validator: (
|
|
124
|
+
validator: (t) => I.includes(t)
|
|
127
125
|
},
|
|
128
126
|
/**
|
|
129
127
|
* If the list should be shown by pressing up or down arrow key on the input element.
|
|
@@ -185,7 +183,7 @@ const N = {
|
|
|
185
183
|
appendTo: {
|
|
186
184
|
type: [HTMLElement, String],
|
|
187
185
|
default: "body",
|
|
188
|
-
validator: (
|
|
186
|
+
validator: (t) => M.includes(t) || t instanceof HTMLElement
|
|
189
187
|
},
|
|
190
188
|
/**
|
|
191
189
|
* Named transition when the content display is toggled.
|
|
@@ -232,7 +230,7 @@ const N = {
|
|
|
232
230
|
isInputFocused: !1,
|
|
233
231
|
isListFocused: !1,
|
|
234
232
|
externalAnchor: g(),
|
|
235
|
-
hasSlotContent:
|
|
233
|
+
hasSlotContent: v
|
|
236
234
|
};
|
|
237
235
|
},
|
|
238
236
|
computed: {
|
|
@@ -247,18 +245,18 @@ const N = {
|
|
|
247
245
|
},
|
|
248
246
|
watch: {
|
|
249
247
|
showList: {
|
|
250
|
-
handler: function(
|
|
251
|
-
|
|
248
|
+
handler: function(t) {
|
|
249
|
+
t !== null && (this.isListShown = t);
|
|
252
250
|
},
|
|
253
251
|
immediate: !0
|
|
254
252
|
},
|
|
255
|
-
isListShown(
|
|
256
|
-
|
|
253
|
+
isListShown(t) {
|
|
254
|
+
t ? window.addEventListener("mousedown", this.onFocusOut) : window.removeEventListener("mousedown", this.onFocusOut), this.onOpened(t);
|
|
257
255
|
}
|
|
258
256
|
},
|
|
259
257
|
methods: {
|
|
260
|
-
handleDisplayList(
|
|
261
|
-
!this.hasSuggestionList &&
|
|
258
|
+
handleDisplayList(t) {
|
|
259
|
+
!this.hasSuggestionList && t && this.showComboboxList(), !this.hasSuggestionList && !t && this.closeComboboxList();
|
|
262
260
|
},
|
|
263
261
|
showComboboxList() {
|
|
264
262
|
this.showList == null && (this.isListShown = !0);
|
|
@@ -266,52 +264,52 @@ const N = {
|
|
|
266
264
|
closeComboboxList() {
|
|
267
265
|
this.showList == null && (this.isListShown = !1);
|
|
268
266
|
},
|
|
269
|
-
onSelect(
|
|
270
|
-
this.loading || (this.$emit("select",
|
|
267
|
+
onSelect(t) {
|
|
268
|
+
this.loading || (this.$emit("select", t), this.hasSuggestionList || this.closeComboboxList());
|
|
271
269
|
},
|
|
272
270
|
onEscape() {
|
|
273
271
|
this.$emit("escape"), this.closeComboboxList();
|
|
274
272
|
},
|
|
275
|
-
onHighlight(
|
|
276
|
-
this.loading || this.$emit("highlight",
|
|
273
|
+
onHighlight(t) {
|
|
274
|
+
this.loading || this.$emit("highlight", t);
|
|
277
275
|
},
|
|
278
|
-
onOpened(
|
|
279
|
-
this.$emit("opened",
|
|
276
|
+
onOpened(t) {
|
|
277
|
+
this.$emit("opened", t);
|
|
280
278
|
},
|
|
281
|
-
onFocusIn(
|
|
279
|
+
onFocusIn(t) {
|
|
282
280
|
var o;
|
|
283
|
-
this.hasSuggestionList &&
|
|
281
|
+
this.hasSuggestionList && t && ((o = this.$refs.input) == null ? void 0 : o.querySelector("input")) === t.target && this.showComboboxList();
|
|
284
282
|
},
|
|
285
|
-
onFocusOut(
|
|
286
|
-
var
|
|
287
|
-
const o = (i = (
|
|
288
|
-
(n =
|
|
283
|
+
onFocusOut(t) {
|
|
284
|
+
var m, i, n;
|
|
285
|
+
const o = (i = (m = this.$refs.popover) == null ? void 0 : m.tip) == null ? void 0 : i.popper, e = this.$refs.input;
|
|
286
|
+
(n = t.composedPath()) != null && n.some((u) => [o, e].includes(u)) || this.closeComboboxList();
|
|
289
287
|
},
|
|
290
288
|
openOnArrowKeyPress() {
|
|
291
289
|
this.showList !== null || this.isListShown || !this.openWithArrowKeys || this.showComboboxList();
|
|
292
290
|
}
|
|
293
291
|
}
|
|
294
|
-
},
|
|
295
|
-
function
|
|
296
|
-
const
|
|
292
|
+
}, H = ["id"], K = { ref: "header" }, T = ["onMouseleave", "onFocusout"], V = { ref: "footer" };
|
|
293
|
+
function z(t, o, e, m, i, n) {
|
|
294
|
+
const u = r("combobox-loading-list"), L = r("combobox-empty-list"), w = r("dt-popover"), x = r("dt-combobox");
|
|
297
295
|
return f(), p(x, c({
|
|
298
296
|
ref: "combobox",
|
|
299
|
-
loading:
|
|
300
|
-
label:
|
|
301
|
-
"label-visible":
|
|
302
|
-
size:
|
|
303
|
-
description:
|
|
304
|
-
"empty-list":
|
|
305
|
-
"empty-state-message":
|
|
297
|
+
loading: e.loading,
|
|
298
|
+
label: e.label,
|
|
299
|
+
"label-visible": e.labelVisible,
|
|
300
|
+
size: e.size,
|
|
301
|
+
description: e.description,
|
|
302
|
+
"empty-list": e.emptyList,
|
|
303
|
+
"empty-state-message": e.emptyStateMessage,
|
|
306
304
|
"show-list": i.isListShown,
|
|
307
|
-
"on-beginning-of-list":
|
|
308
|
-
"on-end-of-list":
|
|
305
|
+
"on-beginning-of-list": e.onBeginningOfList,
|
|
306
|
+
"on-end-of-list": e.onEndOfList,
|
|
309
307
|
"list-rendered-outside": !0,
|
|
310
|
-
"list-id":
|
|
308
|
+
"list-id": e.listId,
|
|
311
309
|
"data-qa": "dt-combobox"
|
|
312
310
|
}, n.comboboxListeners), {
|
|
313
311
|
input: l(({ inputProps: h }) => [
|
|
314
|
-
|
|
312
|
+
a("div", {
|
|
315
313
|
id: i.externalAnchor,
|
|
316
314
|
ref: "input",
|
|
317
315
|
onFocusin: o[0] || (o[0] = (...s) => n.onFocusIn && n.onFocusIn(...s)),
|
|
@@ -320,82 +318,80 @@ function R(e, o, t, u, i, n) {
|
|
|
320
318
|
o[2] || (o[2] = y((s) => n.openOnArrowKeyPress(s), ["down"]))
|
|
321
319
|
]
|
|
322
320
|
}, [
|
|
323
|
-
d(
|
|
321
|
+
d(t.$slots, "input", {
|
|
324
322
|
inputProps: h,
|
|
325
323
|
onInput: n.handleDisplayList
|
|
326
324
|
})
|
|
327
|
-
], 40,
|
|
325
|
+
], 40, H)
|
|
328
326
|
]),
|
|
329
327
|
list: l(({ opened: h, listProps: s, clearHighlightIndex: b }) => [
|
|
330
|
-
|
|
328
|
+
E(w, {
|
|
331
329
|
ref: "popover",
|
|
332
330
|
open: i.isListShown,
|
|
333
|
-
"onUpdate:open": o[3] || (o[3] = (
|
|
331
|
+
"onUpdate:open": o[3] || (o[3] = (O) => i.isListShown = O),
|
|
334
332
|
"hide-on-click": !1,
|
|
335
|
-
"max-height":
|
|
336
|
-
"max-width":
|
|
337
|
-
offset:
|
|
338
|
-
sticky:
|
|
333
|
+
"max-height": e.maxHeight,
|
|
334
|
+
"max-width": e.maxWidth,
|
|
335
|
+
offset: e.popoverOffset,
|
|
336
|
+
sticky: e.popoverSticky,
|
|
339
337
|
placement: "bottom-start",
|
|
340
338
|
"initial-focus-element": "none",
|
|
341
339
|
padding: "none",
|
|
342
340
|
role: "listbox",
|
|
343
341
|
"external-anchor": i.externalAnchor,
|
|
344
|
-
"content-width":
|
|
342
|
+
"content-width": e.contentWidth,
|
|
345
343
|
"content-appear": !0,
|
|
346
344
|
"content-tabindex": null,
|
|
347
345
|
modal: !1,
|
|
348
346
|
"auto-focus": !1,
|
|
349
|
-
"append-to":
|
|
350
|
-
transition:
|
|
351
|
-
"visually-hidden-close-label": e.visuallyHiddenCloseLabel,
|
|
352
|
-
"visually-hidden-close": e.visuallyHiddenClose,
|
|
347
|
+
"append-to": e.appendTo,
|
|
348
|
+
transition: e.transition,
|
|
353
349
|
onOpened: h
|
|
354
|
-
},
|
|
350
|
+
}, P({
|
|
355
351
|
content: l(() => [
|
|
356
|
-
|
|
352
|
+
a("div", {
|
|
357
353
|
ref: "listWrapper",
|
|
358
|
-
class:
|
|
354
|
+
class: A([
|
|
359
355
|
"d-recipe-combobox-with-popover__list",
|
|
360
|
-
i.DROPDOWN_PADDING_CLASSES[
|
|
361
|
-
|
|
356
|
+
i.DROPDOWN_PADDING_CLASSES[e.padding],
|
|
357
|
+
e.listClass
|
|
362
358
|
]),
|
|
363
359
|
onMouseleave: b,
|
|
364
360
|
onFocusout: b
|
|
365
361
|
}, [
|
|
366
|
-
|
|
362
|
+
e.loading ? (f(), p(u, D(c({ key: 0 }, s)), null, 16)) : e.emptyList && e.emptyStateMessage ? (f(), p(L, c({ key: 1 }, s, { message: e.emptyStateMessage }), null, 16, ["message"])) : d(t.$slots, "list", {
|
|
367
363
|
key: 2,
|
|
368
364
|
listProps: s
|
|
369
365
|
})
|
|
370
|
-
], 42,
|
|
366
|
+
], 42, T)
|
|
371
367
|
]),
|
|
372
368
|
_: 2
|
|
373
369
|
}, [
|
|
374
|
-
i.hasSlotContent(
|
|
370
|
+
i.hasSlotContent(t.$slots.header) ? {
|
|
375
371
|
name: "headerContent",
|
|
376
372
|
fn: l(() => [
|
|
377
|
-
|
|
378
|
-
d(
|
|
373
|
+
a("div", K, [
|
|
374
|
+
d(t.$slots, "header")
|
|
379
375
|
], 512)
|
|
380
376
|
]),
|
|
381
377
|
key: "0"
|
|
382
378
|
} : void 0,
|
|
383
|
-
i.hasSlotContent(
|
|
379
|
+
i.hasSlotContent(t.$slots.footer) ? {
|
|
384
380
|
name: "footerContent",
|
|
385
381
|
fn: l(() => [
|
|
386
|
-
|
|
387
|
-
d(
|
|
382
|
+
a("div", V, [
|
|
383
|
+
d(t.$slots, "footer")
|
|
388
384
|
], 512)
|
|
389
385
|
]),
|
|
390
386
|
key: "1"
|
|
391
387
|
} : void 0
|
|
392
|
-
]), 1032, ["open", "max-height", "max-width", "offset", "sticky", "external-anchor", "content-width", "append-to", "transition", "
|
|
388
|
+
]), 1032, ["open", "max-height", "max-width", "offset", "sticky", "external-anchor", "content-width", "append-to", "transition", "onOpened"])
|
|
393
389
|
]),
|
|
394
390
|
_: 3
|
|
395
391
|
}, 16, ["loading", "label", "label-visible", "size", "description", "empty-list", "empty-state-message", "show-list", "on-beginning-of-list", "on-end-of-list", "list-id"]);
|
|
396
392
|
}
|
|
397
|
-
const
|
|
393
|
+
const $ = /* @__PURE__ */ B(N, [["render", z]]);
|
|
398
394
|
export {
|
|
399
|
-
|
|
395
|
+
$ as default
|
|
400
396
|
};
|
|
401
397
|
//# sourceMappingURL=combobox-with-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-with-popover.js","sources":["../../../recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-bind=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n v-model:open=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n @opened=\"opened\"\n >\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[\n 'd-recipe-combobox-with-popover__list',\n DROPDOWN_PADDING_CLASSES[padding],\n listClass,\n ]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n hasSlotContent,\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$attrs,\n\n onSelect: this.onSelect,\n\n onEscape: this.onEscape,\n\n onHighlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtCombobox","DtPopover","ComboboxLoadingList","ComboboxEmptyList","SrOnlyCloseButtonMixin","t","LABEL_SIZES","getUniqueString","padding","DROPDOWN_PADDING_CLASSES","item","contentWidth","POPOVER_CONTENT_WIDTHS","appendTo","POPOVER_APPEND_TO_VALUES","hasSlotContent","show","val","value","highlightIndex","opened","_a","popoverEl","_b","comboboxEl","_c","el","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_openBlock","_createBlock","_component_dt_combobox","_mergeProps","$props","$data","$options","_withCtx","inputProps","_createElementVNode","args","_withKeys","$event","_renderSlot","_ctx","listProps","clearHighlightIndex","_createVNode","_component_dt_popover","_cache","_createSlots","_normalizeClass","_component_combobox_loading_list","_normalizeProps","_component_combobox_empty_list"],"mappings":";;;;;;;;;;;AA6HA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EAED,QAAQ,CAACC,CAAsB;AAAA,EAE/B,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;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UA;AAAA;YAGHZ,EAAO,WADfJ,EAAA,GAAAC,EAGEqB,GAvFdC,EAAApB,EAAA,EAAA,KAAA,KAsFsBY,CAAS,CAAA,GAAA,MAAA,EAAA,KAGNX,EAAA,aAAaA,EAAiB,0BAD3CH,EAIEuB,GAJFrB,EAIE,EA5Fd,KAAA,KA0FsBY,GAAS,EAChB,SAASX,EAAiB,kBAAA,CAAA,GAAA,MAAA,IAAA,CAAA,SAAA,CAAA,KAE7BS,EAIEC,EAAA,QAAA,QAAA;AAAA,cAjGd,KAAA;AAAA,cAgGe,WAAYC;AAAA;UAhG3B,GAAA,IAAAjB,CAAA;AAAA;QAAA,GAAA;AAAA;QA8DgBO,EAAc,eAACS,EAAM,OAAC,MAAM;UA9D5C,MA+DW;AAAA,UA/DX,IAAAP,EAiEU,MAIM;AAAA,YAJNE,EAIM,OAJNZ,GAIM;AAAA,cADJgB,EAAsBC,EAAA,QAAA,QAAA;AAAA;;UApElC,KAAA;AAAA,YAAA;AAAA,QAsGgBT,EAAc,eAACS,EAAM,OAAC,MAAM;UAtG5C,MAuGW;AAAA,UAvGX,IAAAP,EAyGU,MAIM;AAAA,YAJNE,EAIM,OAJNV,GAIM;AAAA,cADJc,EAAsBC,EAAA,QAAA,QAAA;AAAA;;UA5GlC,KAAA;AAAA,YAAA;AAAA;;IAAA,GAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"combobox-with-popover.js","sources":["../../../recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-bind=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n v-model:open=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @opened=\"opened\"\n >\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[\n 'd-recipe-combobox-with-popover__list',\n DROPDOWN_PADDING_CLASSES[padding],\n listClass,\n ]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, COMBOBOX_LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(COMBOBOX_LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n hasSlotContent,\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$attrs,\n\n onSelect: this.onSelect,\n\n onEscape: this.onEscape,\n\n onHighlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtCombobox","DtPopover","ComboboxLoadingList","ComboboxEmptyList","COMBOBOX_LABEL_SIZES","getUniqueString","padding","DROPDOWN_PADDING_CLASSES","item","contentWidth","POPOVER_CONTENT_WIDTHS","appendTo","POPOVER_APPEND_TO_VALUES","hasSlotContent","show","val","value","highlightIndex","opened","e","_a","popoverEl","_b","comboboxEl","_c","el","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_openBlock","_createBlock","_component_dt_combobox","_mergeProps","$props","$data","$options","_withCtx","inputProps","_createElementVNode","args","_withKeys","$event","_renderSlot","_ctx","listProps","clearHighlightIndex","_createVNode","_component_dt_popover","_cache","_createSlots","_normalizeClass","_component_combobox_loading_list","_normalizeProps","_component_combobox_empty_list"],"mappings":";;;;;;;;;;AA0HA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;A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AAA,MAAA,EAAA,KAGNX,EAAA,aAAaA,EAAiB,0BAD3CH,EAIEuB,GAJFrB,EAIE,EA1Fd,KAAA,KAwFsBY,GAAS,EAChB,SAASX,EAAiB,kBAAA,CAAA,GAAA,MAAA,IAAA,CAAA,SAAA,CAAA,KAE7BS,EAIEC,EAAA,QAAA,QAAA;AAAA,cA/Fd,KAAA;AAAA,cA8Fe,WAAYC;AAAA;UA9F3B,GAAA,IAAAjB,CAAA;AAAA;QAAA,GAAA;AAAA;QA4DgBO,EAAc,eAACS,EAAM,OAAC,MAAM;UA5D5C,MA6DW;AAAA,UA7DX,IAAAP,EA+DU,MAIM;AAAA,YAJNE,EAIM,OAJNZ,GAIM;AAAA,cADJgB,EAAsBC,EAAA,QAAA,QAAA;AAAA;;UAlElC,KAAA;AAAA,YAAA;AAAA,QAoGgBT,EAAc,eAACS,EAAM,OAAC,MAAM;UApG5C,MAqGW;AAAA,UArGX,IAAAP,EAuGU,MAIM;AAAA,YAJNE,EAIM,OAJNV,GAIM;AAAA,cADJc,EAAsBC,EAAA,QAAA,QAAA;AAAA;;UA1GlC,KAAA;AAAA,YAAA;AAAA;;IAAA,GAAA;AAAA;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../common/utils/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../common/utils/index.cjs"),p=require("@dialpad/dialtone-icons/vue3"),h=require("../../localization/index.cjs"),e=require("vue"),m=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),f=require("../button/button.cjs"),w=require("../badge/badge.cjs"),C=require("../emoji-text-wrapper/emoji-text-wrapper.cjs"),v={compatConfig:{MODE:3},name:"DtRecipeContactCentersRow",components:{DtButton:f.default,DtBadge:w.default,DtEmojiTextWrapper:C.default,DtIconHeadphones:p.DtIconHeadphones,DtIconChevronDown:p.DtIconChevronDown},inheritAttrs:!1,props:{ariaLabel:{type:String,default:""},description:{type:String,required:!0},selected:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unreadCount:{type:String,default:null,validator(t){return t?/^\d+\+?$/.test(t):!0}}},emits:["click","click-menu"],data(){return{labelWidth:"auto",i18n:new h.DialtoneLocalization}},computed:{leftbarContactCentersRowClasses(){return["d-recipe-leftbar-row","d-recipe-leftbar-row--contact-centers",{"d-recipe-leftbar-row__unread-count":this.showUnreadCount,"d-recipe-leftbar-row--selected":this.selected}]},getAriaLabel(){const t=isNaN(this.unreadCount)?this.unreadCount:Number(this.unreadCount);return this.ariaLabel?this.ariaLabel:a.safeConcatStrings([this.description,this.i18n.$t("DIALTONE_UNREAD_MESSAGE_COUNT_TEXT",{unreadCount:t})])},contactRowListeners(){return a.extractVueListeners(this.$attrs)},showUnreadCount(){return!!this.unreadCount},menuButtonLabel(){return this.i18n.$t("DIALTONE_CONTACT_CENTERS_ROW_MENU_BUTTON_LABEL")}},watch:{$props:{deep:!0,async handler(){await this.$nextTick(),this.adjustLabelWidth()}}},mounted(){this.resizeObserver=new ResizeObserver(this.adjustLabelWidth),this.resizeObserver.observe(a.returnFirstEl(this.$el)),this.adjustLabelWidth()},beforeUnmount:function(){this.resizeObserver.disconnect()},methods:{removeClassStyleAttrs:a.removeClassStyleAttrs,addClassStyleAttrs:a.addClassStyleAttrs,adjustLabelWidth(){var i,r,s,l,d,c;const t=((r=(i=a.returnFirstEl(this.$el))==null?void 0:i.querySelector(".d-recipe-leftbar-row__primary"))==null?void 0:r.clientWidth)||0,o=((l=(s=a.returnFirstEl(this.$el))==null?void 0:s.querySelector(".d-recipe-leftbar-row__omega"))==null?void 0:l.clientWidth)||0,n=((c=(d=a.returnFirstEl(this.$el))==null?void 0:d.querySelector(".d-recipe-leftbar-row__alpha"))==null?void 0:c.clientWidth)||0,_=12;this.labelWidth=t-(o+n+_)+"px"}}},g=["data-qa","aria-label","title","href"],y={class:"d-recipe-leftbar-row__alpha"},N={key:0,class:"d-recipe-leftbar-row__omega"},E={class:"d-recipe-leftbar-row__action-container"},S={class:"d-recipe-leftbar-row__bottom"};function q(t,o,n,_,i,r){const s=e.resolveComponent("dt-icon-headphones"),l=e.resolveComponent("dt-emoji-text-wrapper"),d=e.resolveComponent("dt-badge"),c=e.resolveComponent("dt-icon-chevron-down"),b=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["d-recipe-leftbar-row__container",{"d-recipe-leftbar-row__container--off-duty":t.$slots.timer}]},r.addClassStyleAttrs(t.$attrs)),[e.createElementVNode("div",{class:e.normalizeClass(r.leftbarContactCentersRowClasses),"data-qa":"dt-recipe-contact-centers-row"},[e.createElementVNode("a",e.mergeProps({class:"d-recipe-leftbar-row__primary","data-qa":t.$attrs["data-qa"]??"d-recipe-leftbar-row-link","aria-label":r.getAriaLabel,title:n.description,href:t.$attrs.href??"javascript:void(0)"},r.removeClassStyleAttrs(t.$attrs),e.toHandlers(r.contactRowListeners,!0),{onClick:o[0]||(o[0]=u=>t.$emit("click",u))}),[e.createElementVNode("div",y,[e.createVNode(s,{size:"300","data-qa":"dt-recipe-leftbar-row-icon"})]),e.createElementVNode("div",{class:"d-recipe-leftbar-row__label",style:e.normalizeStyle(`flex-basis: ${i.labelWidth}`)},[e.createVNode(l,{class:"d-recipe-leftbar-row__description","data-qa":"dt-recipe-leftbar-row-description",size:"200"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.description),1)]),_:1})],4)],16,g),n.hideActions?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",N,[e.renderSlot(t.$slots,"right"),e.createElementVNode("div",E,[r.showUnreadCount?(e.openBlock(),e.createBlock(d,{key:0,class:"d-recipe-leftbar-row__unread-badge","data-qa":"dt-recipe-leftbar-row-unread-badge",kind:"count",type:"bulletin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.unreadCount),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(b,{class:"d-recipe-leftbar-row__action","data-qa":"dt-recipe-leftbar-row-action-button","aria-label":r.menuButtonLabel,title:r.menuButtonLabel,importance:"clear",size:"xs",circle:"",onClick:o[1]||(o[1]=e.withModifiers(u=>t.$emit("click-menu",u),["stop"]))},{icon:e.withCtx(()=>[e.createVNode(c,{size:"100"})]),_:1},8,["aria-label","title"])])]))],2),e.createElementVNode("div",S,[e.renderSlot(t.$slots,"timer")])],16)}const L=m._(v,[["render",q]]);exports.default=L;
|
|
2
2
|
//# sourceMappingURL=contact-centers-row.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-centers-row.cjs","sources":["../../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'd-recipe-leftbar-row__container',\n { 'd-recipe-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"d-recipe-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'd-recipe-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"contactRowListeners\"\n @click=\"$emit('click', $event)\"\n >\n <div class=\"d-recipe-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-recipe-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"d-recipe-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div\n v-if=\"!hideActions\"\n class=\"d-recipe-leftbar-row__omega\"\n >\n <slot name=\"right\" />\n <div class=\"d-recipe-leftbar-row__action-container\">\n <dt-badge\n v-if=\"showUnreadCount\"\n class=\"d-recipe-leftbar-row__unread-badge\"\n data-qa=\"dt-recipe-leftbar-row-unread-badge\"\n kind=\"count\"\n type=\"bulletin\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-button\n class=\"d-recipe-leftbar-row__action\"\n data-qa=\"dt-recipe-leftbar-row-action-button\"\n :aria-label=\"menuButtonAriaLabel\"\n importance=\"clear\"\n size=\"xs\"\n circle\n @click.stop=\"$emit('click-menu', $event)\"\n >\n <template #icon>\n <dt-icon-chevron-down size=\"100\" />\n </template>\n </dt-button>\n </div>\n </div>\n </div>\n <div class=\"d-recipe-leftbar-row__bottom\">\n <slot name=\"timer\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { extractVueListeners, safeConcatStrings, removeClassStyleAttrs, returnFirstEl, addClassStyleAttrs } from '@/common/utils';\nimport { DtBadge } from '@/components/badge';\nimport { DtButton } from '@/components/button';\nimport DtEmojiTextWrapper from '@/components/emoji_text_wrapper/emoji_text_wrapper.vue';\nimport DtIconChevronDown from '@dialpad/dialtone-icons/vue3/chevron-down';\nimport DtIconHeadphones from '@dialpad/dialtone-icons/vue3/headphones';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeContactCentersRow',\n\n components: {\n DtButton,\n DtBadge,\n DtEmojiTextWrapper,\n DtIconHeadphones,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Making this true will hide the unread count badge, the chevron button, and the right slot\n */\n hideActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages, could be a string to support '99+'\n */\n unreadCount: {\n type: String,\n default: null,\n },\n\n /**\n * Aria label for the menu button.\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Menu button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click-menu',\n ],\n\n data () {\n return {\n labelWidth: 'auto',\n };\n },\n\n computed: {\n leftbarContactCentersRowClasses () {\n return [\n 'd-recipe-leftbar-row',\n 'd-recipe-leftbar-row--contact-centers',\n {\n 'd-recipe-leftbar-row__unread-count': this.showUnreadCount,\n 'd-recipe-leftbar-row--selected': this.selected,\n },\n ];\n },\n\n getAriaLabel () {\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([this.description, this.unreadCountTooltip]);\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n\n showUnreadCount () {\n return !!this.unreadCount;\n },\n },\n\n watch: {\n $props: {\n deep: true,\n async handler () {\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(returnFirstEl(this.$el));\n this.adjustLabelWidth();\n },\n\n beforeUnmount: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n\n adjustLabelWidth () {\n const labelWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 12;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtBadge","DtEmojiTextWrapper","DtIconHeadphones","DtIconChevronDown","safeConcatStrings","extractVueListeners","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","labelWidth","omegaWidth","alphaWidth","paddings","_hoisted_1","_hoisted_2","_hoisted_4","_hoisted_5","_openBlock","_createElementBlock","_mergeProps","_ctx","$options","_createElementVNode","_normalizeClass","$props","_toHandlers","_cache","$event","_createVNode","_component_dt_icon_headphones","_normalizeStyle","$data","_component_dt_emoji_text_wrapper","_withCtx","_createTextVNode","_toDisplayString","_createCommentVNode","_hoisted_3","_renderSlot","_createBlock","_component_dt_badge","_component_dt_button","_withModifiers","_component_dt_icon_chevron_down"],"mappings":"+cAsFKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,4BAEN,WAAY,CACV,SAAAC,EAAQ,QACR,QAAAC,EAAO,QACP,mBAAAC,EAAkB,QAClB,iBAAAC,EACA,kBAAAC,CACD,EAED,aAAc,GAEd,MAAO,CAIL,UAAW,CACT,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,SAAU,EACX,EAKD,SAAU,CACR,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,IACV,EAKD,oBAAqB,CACnB,KAAM,OACN,SAAU,EACX,CACF,EAED,MAAO,CAOL,QAQA,YACD,EAED,MAAQ,CACN,MAAO,CACL,WAAY,OAEf,EAED,SAAU,CACR,iCAAmC,CACjC,MAAO,CACL,uBACA,wCACA,CACE,qCAAsC,KAAK,gBAC3C,iCAAkC,KAAK,QACxC,EAEJ,EAED,cAAgB,CACd,OAAO,KAAK,UACR,KAAK,UACLC,EAAiB,kBAAC,CAAC,KAAK,YAAa,KAAK,kBAAkB,CAAC,CAClE,EAED,qBAAuB,CACrB,OAAOC,EAAmB,oBAAC,KAAK,MAAM,CACvC,EAED,iBAAmB,CACjB,MAAO,CAAC,CAAC,KAAK,WACf,CACF,EAED,MA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AAAA,EAAA,CAAA,EAAAgB,gBAAAf,GA+DyBP,EAAK,MAAA,aAAeO,CAAM,EAAA,CAAA,MAAA,CAAA,KAE5B,eACT,IAAmC,CAAnCC,EAAAA,YAAmCe,EAAA,CAAb,KAAK,KAAK,CAAA,IAlE9C,EAAA,8BAwEIrB,EAAA,mBAEM,MAFNN,EAEM,CADJsB,aAAqBlB,EAAA,OAAA,OAAA"}
|
|
1
|
+
{"version":3,"file":"contact-centers-row.cjs","sources":["../../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'd-recipe-leftbar-row__container',\n { 'd-recipe-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"d-recipe-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'd-recipe-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"contactRowListeners\"\n @click=\"$emit('click', $event)\"\n >\n <div class=\"d-recipe-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-recipe-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"d-recipe-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div\n v-if=\"!hideActions\"\n class=\"d-recipe-leftbar-row__omega\"\n >\n <slot name=\"right\" />\n <div class=\"d-recipe-leftbar-row__action-container\">\n <dt-badge\n v-if=\"showUnreadCount\"\n class=\"d-recipe-leftbar-row__unread-badge\"\n data-qa=\"dt-recipe-leftbar-row-unread-badge\"\n kind=\"count\"\n type=\"bulletin\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-button\n class=\"d-recipe-leftbar-row__action\"\n data-qa=\"dt-recipe-leftbar-row-action-button\"\n :aria-label=\"menuButtonLabel\"\n :title=\"menuButtonLabel\"\n importance=\"clear\"\n size=\"xs\"\n circle\n @click.stop=\"$emit('click-menu', $event)\"\n >\n <template #icon>\n <dt-icon-chevron-down size=\"100\" />\n </template>\n </dt-button>\n </div>\n </div>\n </div>\n <div class=\"d-recipe-leftbar-row__bottom\">\n <slot name=\"timer\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { extractVueListeners, safeConcatStrings, removeClassStyleAttrs, returnFirstEl, addClassStyleAttrs } from '@/common/utils';\nimport { DtBadge } from '@/components/badge';\nimport { DtButton } from '@/components/button';\nimport { DtEmojiTextWrapper } from '@/components/emoji_text_wrapper';\nimport { DtIconChevronDown, DtIconHeadphones } from '@dialpad/dialtone-icons/vue3';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeContactCentersRow',\n\n components: {\n DtButton,\n DtBadge,\n DtEmojiTextWrapper,\n DtIconHeadphones,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Making this true will hide the unread count badge, the chevron button, and the right slot\n */\n hideActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages, could be a string to support '99+'\n */\n unreadCount: {\n type: String,\n default: null,\n validator (value) {\n if (!value) return true;\n return /^\\d+\\+?$/.test(value);\n },\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Menu button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click-menu',\n ],\n\n data () {\n return {\n labelWidth: 'auto',\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n leftbarContactCentersRowClasses () {\n return [\n 'd-recipe-leftbar-row',\n 'd-recipe-leftbar-row--contact-centers',\n {\n 'd-recipe-leftbar-row__unread-count': this.showUnreadCount,\n 'd-recipe-leftbar-row--selected': this.selected,\n },\n ];\n },\n\n getAriaLabel () {\n const count = isNaN(this.unreadCount) ? this.unreadCount : Number(this.unreadCount);\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([\n this.description,\n this.i18n.$t('DIALTONE_UNREAD_MESSAGE_COUNT_TEXT', { unreadCount: count }),\n ]);\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n\n showUnreadCount () {\n return !!this.unreadCount;\n },\n\n menuButtonLabel () {\n return this.i18n.$t('DIALTONE_CONTACT_CENTERS_ROW_MENU_BUTTON_LABEL');\n },\n },\n\n watch: {\n $props: {\n deep: true,\n async handler () {\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(returnFirstEl(this.$el));\n this.adjustLabelWidth();\n },\n\n beforeUnmount: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n\n adjustLabelWidth () {\n const labelWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 12;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtBadge","DtEmojiTextWrapper","DtIconHeadphones","DtIconChevronDown","value","DialtoneLocalization","count","safeConcatStrings","extractVueListeners","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","labelWidth","omegaWidth","alphaWidth","paddings","_hoisted_1","_hoisted_2","_hoisted_4","_hoisted_5","_openBlock","_createElementBlock","_mergeProps","_ctx","$options","_createElementVNode","_normalizeClass","$props","_toHandlers","_cache","$event","_createVNode","_component_dt_icon_headphones","_normalizeStyle","$data","_component_dt_emoji_text_wrapper","_withCtx","_createTextVNode","_toDisplayString","_createCommentVNode","_hoisted_3","_renderSlot","_createBlock","_component_dt_badge","_component_dt_button","_withModifiers","_component_dt_icon_chevron_down"],"mappings":"ubAuFKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,4BAEN,WAAY,CACV,SAAAC,EAAQ,QACR,QAAAC,EAAO,QACP,mBAAAC,EAAkB,QAClB,iBAAAC,EAAgB,iBAChB,kBAAAC,EAAiB,iBAClB,EAED,aAAc,GAEd,MAAO,CAIL,UAAW,CACT,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,SAAU,EACX,EAKD,SAAU,CACR,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,KACT,UAAWC,EAAO,CAChB,OAAKA,EACE,WAAW,KAAKA,CAAK,EADT,EAEpB,CACF,CACF,EAED,MAAO,CAOL,QAQA,YACD,EAED,MAAQ,CACN,MAAO,CACL,WAAY,OACZ,KAAM,IAAIC,EAAAA,qBAEb,EAED,SAAU,CACR,iCAAmC,CACjC,MAAO,CACL,uBACA,wCACA,CACE,qCAAsC,KAAK,gBAC3C,iCAAkC,KAAK,QACxC,EAEJ,EAED,cAAgB,CACd,MAAMC,EAAQ,MAAM,KAAK,WAAW,EAAI,KAAK,YAAc,OAAO,KAAK,WAAW,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