@dialpad/dialtone 9.126.6 → 9.127.1
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 +25670 -25670
- package/dist/vue2/common/mixins/index.cjs +1 -1
- package/dist/vue2/common/mixins/index.js +2 -4
- package/dist/vue2/common/mixins/index.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +1 -1
- package/dist/vue2/dialtone-vue.js +345 -347
- package/dist/vue2/dialtone-vue.js.map +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +16 -12
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +6 -6
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/vue2/lib/button/button.cjs +1 -1
- package/dist/vue2/lib/button/button.cjs.map +1 -1
- package/dist/vue2/lib/button/button.js +6 -6
- package/dist/vue2/lib/button/button.js.map +1 -1
- 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 +18 -18
- 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 +14 -14
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue2/lib/chip/chip.cjs +1 -1
- package/dist/vue2/lib/chip/chip.cjs.map +1 -1
- package/dist/vue2/lib/chip/chip.js +7 -7
- package/dist/vue2/lib/chip/chip.js.map +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +13 -13
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.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 +26 -26
- package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue2/lib/datepicker/formatUtils.cjs +1 -1
- package/dist/vue2/lib/datepicker/formatUtils.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/formatUtils.js +21 -20
- package/dist/vue2/lib/datepicker/formatUtils.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/editor/editor.cjs +1 -1
- package/dist/vue2/lib/editor/editor.cjs.map +1 -1
- package/dist/vue2/lib/editor/editor.js +17 -17
- package/dist/vue2/lib/editor/editor.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.js +7 -6
- package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.js +24 -20
- package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +8 -8
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs.map +1 -1
- package/dist/vue2/lib/general-row/general-row.js +17 -17
- package/dist/vue2/lib/general-row/general-row.js.map +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs.map +1 -1
- package/dist/vue2/lib/group-row/group-row.js +11 -7
- package/dist/vue2/lib/group-row/group-row.js.map +1 -1
- package/dist/vue2/lib/icon/icon.cjs +1 -1
- package/dist/vue2/lib/icon/icon.cjs.map +1 -1
- package/dist/vue2/lib/icon/icon.js +10 -6
- package/dist/vue2/lib/icon/icon.js.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.js +8 -7
- package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.js +17 -17
- package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
- package/dist/vue2/lib/loader/loader.cjs +1 -1
- package/dist/vue2/lib/loader/loader.cjs.map +1 -1
- package/dist/vue2/lib/loader/loader.js +12 -8
- package/dist/vue2/lib/loader/loader.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-link.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input-link.js +15 -15
- package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.js +14 -10
- package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input.js +14 -10
- package/dist/vue2/lib/message-input/message-input.js.map +1 -1
- package/dist/vue2/lib/modal/modal.cjs +1 -1
- package/dist/vue2/lib/modal/modal.cjs.map +1 -1
- package/dist/vue2/lib/modal/modal.js +12 -11
- package/dist/vue2/lib/modal/modal.js.map +1 -1
- package/dist/vue2/lib/notice/notice-action.cjs +1 -1
- package/dist/vue2/lib/notice/notice-action.cjs.map +1 -1
- package/dist/vue2/lib/notice/notice-action.js +10 -6
- package/dist/vue2/lib/notice/notice-action.js.map +1 -1
- package/dist/vue2/lib/pagination/pagination.cjs +1 -1
- package/dist/vue2/lib/pagination/pagination.cjs.map +1 -1
- package/dist/vue2/lib/pagination/pagination.js +7 -7
- package/dist/vue2/lib/pagination/pagination.js.map +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.cjs.map +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.js +13 -9
- package/dist/vue2/lib/popover/popover-header-footer.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 +61 -57
- 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/lib/unread-pill/unread-pill.cjs +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.cjs.map +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.js +15 -11
- package/dist/vue2/lib/unread-pill/unread-pill.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/index.cjs +1 -1
- package/dist/vue2/localization/index.cjs.map +1 -1
- package/dist/vue2/localization/index.js +59 -53
- package/dist/vue2/localization/index.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/shared/sr_only_close_button.cjs +1 -1
- package/dist/vue2/shared/sr_only_close_button.cjs.map +1 -1
- package/dist/vue2/shared/sr_only_close_button.js +14 -10
- package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
- package/dist/vue2/types/common/mixins/index.d.ts +0 -1
- package/dist/vue2/types/common/sr_only_close_button.vue.d.ts +5 -8
- package/dist/vue2/types/common/sr_only_close_button.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts +3 -5
- package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/button/button.vue.d.ts +4 -6
- package/dist/vue2/types/components/button/button.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/chip/chip.vue.d.ts +6 -8
- package/dist/vue2/types/components/chip/chip.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/formatUtils.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts +3 -5
- package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts +3 -5
- package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts +1 -5
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +2 -4
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/loader/loader.vue.d.ts +5 -6
- package/dist/vue2/types/components/loader/loader.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/modal/modal.vue.d.ts +2 -4
- package/dist/vue2/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts +5 -6
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts +4 -6
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +5 -6
- package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +5 -7
- 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 +5 -7
- 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 +5 -7
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +4 -6
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +3 -5
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +5 -6
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +14 -16
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +5 -6
- package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +6 -8
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +5 -6
- package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +5 -7
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +3 -5
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +5 -6
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +5 -7
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +17 -19
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts +8 -9
- package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +5 -6
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.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 +16 -13
- 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 +2 -3
- 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/vue2/common/mixins/localization.cjs +0 -2
- package/dist/vue2/common/mixins/localization.cjs.map +0 -1
- package/dist/vue2/common/mixins/localization.js +0 -10
- package/dist/vue2/common/mixins/localization.js.map +0 -1
- package/dist/vue2/types/common/mixins/localization.d.ts +0 -8
- package/dist/vue2/types/common/mixins/localization.d.ts.map +0 -1
- 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-loading-list.js","sources":["../../../components/combobox/combobox_loading-list.vue"],"sourcesContent":["<template>\n <ol\n class=\"d-combobox__loading-list\"\n aria-busy=\"true\"\n >\n <dt-list-item\n v-for=\"index in 7\"\n :key=\"index\"\n role=\"option\"\n navigation-type=\"none\"\n >\n <dt-skeleton\n :text-option=\"{ type: 'body' }\"\n :offset=\"0\"\n />\n </dt-list-item>\n </ol>\n</template>\n\n<script>\nimport { DtListItem } from '
|
|
1
|
+
{"version":3,"file":"combobox-loading-list.js","sources":["../../../components/combobox/combobox_loading-list.vue"],"sourcesContent":["<template>\n <ol\n class=\"d-combobox__loading-list\"\n aria-busy=\"true\"\n >\n <dt-list-item\n v-for=\"index in 7\"\n :key=\"index\"\n role=\"option\"\n navigation-type=\"none\"\n >\n <dt-skeleton\n :text-option=\"{ type: 'body' }\"\n :offset=\"0\"\n />\n </dt-list-item>\n </ol>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\nimport { DtSkeleton } from '@/components/skeleton';\n\nexport default {\n name: 'ComboboxLoadingList',\n\n components: { DtListItem, DtSkeleton },\n};\n</script>\n"],"names":["_sfc_main","DtListItem","DtSkeleton","_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","index","_createVNode","_component_dt_list_item","_withCtx","_component_dt_skeleton"],"mappings":";;;;AAuBA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,YAAAC,GAAY,YAAAC,EAAY;AACxC;EAzBI,OAAM;AAAA,EACN,aAAU;;;;AAFZ,SAAAC,EAAA,GAAAC,EAeK,MAfLC,GAeK;AAAA,KAXHF,EAAA,GAAAC,EAUeE,GAfnB,MAAAC,EAMsB,GANtB,CAMaC,MADTC,EAUeC,GAAA;AAAA,MARZ,KAAKF;AAAA,MACN,MAAK;AAAA,MACL,mBAAgB;AAAA;MATtB,SAAAG,EAWM,MAGE;AAAA,QAHFF,EAGEG,GAAA;AAAA,UAFC,eAAa,EAAgB,MAAA,OAAA;AAAA,UAC7B,QAAQ;AAAA;;MAbjB,GAAA;AAAA;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("
|
|
2
|
-
empty message.`)}}},f={"data-qa":"dt-combobox-input-wrapper"};function c(i,t,n,L,r,s){const d=e.resolveComponent("combobox-loading-list"),h=e.resolveComponent("combobox-empty-list");return e.openBlock(),e.createElementBlock("div",{onKeydown:[t[3]||(t[3]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEscapeKey"),["stop"]),["esc"])),t[4]||(t[4]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEnterKey"),["exact"]),["enter"])),t[5]||(t[5]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onUpKey"),["stop","prevent"]),["up"])),t[6]||(t[6]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onDownKey"),["stop","prevent"]),["down"])),t[7]||(t[7]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onHomeKey"),["stop","prevent"]),["home"])),t[8]||(t[8]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEndKey"),["stop","prevent"]),["end"]))]},[e.createElementVNode("div",f,[e.renderSlot(i.$slots,"input",{inputProps:s.inputProps})]),n.showList?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"listWrapper","data-qa":"dt-combobox-list-wrapper",onMouseleave:t[0]||(t[0]=(...o)=>s.clearHighlightIndex&&s.clearHighlightIndex(...o)),onFocusout:t[1]||(t[1]=(...o)=>s.clearHighlightIndex&&s.clearHighlightIndex(...o)),onMousemoveCapture:t[2]||(t[2]=(...o)=>s.onMouseHighlight&&s.onMouseHighlight(...o))},[n.loading&&!n.listRenderedOutside?(e.openBlock(),e.createBlock(d,e.normalizeProps(e.mergeProps({key:0},s.listProps)),null,16)):n.emptyList&&(n.emptyStateMessage||r.hasSlotContent(i.$slots.emptyListItem))&&!n.listRenderedOutside?(e.openBlock(),e.createBlock(h,e.mergeProps({key:1},s.listProps,{message:n.emptyStateMessage,"item-class":n.emptyStateClass}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"emptyListItem")]),_:3},16,["message","item-class"])):e.renderSlot(i.$slots,"list",{key:2,listProps:s.listProps,opened:s.onOpen,clearHighlightIndex:s.clearHighlightIndex})],544)):e.createCommentVNode("",!0)],32)}const b=
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./combobox-loading-list.cjs"),g=require("./combobox-empty-list.cjs"),l=require("../../common/utils/index.cjs"),e=require("vue"),u=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),m=require("../../common/mixins/keyboard-list-navigation.cjs"),p=require("./combobox-constants.cjs"),y={compatConfig:{MODE:3},name:"DtCombobox",components:{ComboboxLoadingList:a.default,ComboboxEmptyList:g.default},mixins:[m.default({indexKey:"highlightIndex",idKey:"highlightId",listElementKey:"getListElement",afterHighlightMethod:"afterHighlight",beginningOfListMethod:"beginningOfListMethod",endOfListMethod:"endOfListMethod",activeItemKey:"activeItemEl"})],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:i=>Object.values(p.COMBOBOX_LABEL_SIZES).includes(i)},description:{type:String,default:""},listId:{type:String,default(){return l.getUniqueString()}},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},showList:{type:Boolean,default:!1},listRenderedOutside:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},emptyStateClass:{type:[String,Object,Array],default:""},clickOnSelect:{type:Boolean,default:!1}},emits:["select","escape","highlight","opened"],data(){return{outsideRenderedListRef:null,hasSlotContent:l.hasSlotContent}},computed:{inputProps(){return{label:this.label,labelVisible:this.labelVisible,size:this.size,description:this.description,role:"combobox","aria-label":this.label,"aria-expanded":this.showList.toString(),"aria-owns":this.listId,"aria-haspopup":"listbox","aria-activedescendant":this.activeItemId,"aria-controls":this.listId}},listProps(){return{role:"listbox",id:this.listId,class:"d-ps-relative","aria-label":this.label}},beginningOfListMethod(){return this.onBeginningOfList||this.jumpToEnd},endOfListMethod(){return this.onEndOfList||this.jumpToBeginning},activeItemId(){if(!(!this.showList||this.highlightIndex<0||this.loading))return this.highlightId},activeItemEl(){return this.highlightId?this.getListElement().querySelector("#"+this.highlightId):""}},watch:{showList(i){this.listRenderedOutside||(this.setInitialHighlightIndex(),this.$emit("opened",i)),!i&&this.outsideRenderedListRef&&(this.outsideRenderedListRef.removeEventListener("mousemove",this.onMouseHighlight),this.outsideRenderedListRef=null)},loading(i){this.$nextTick(()=>{this.setInitialHighlightIndex()})},$props:{deep:!0,immediate:!0,handler(){this.validateEmptyListProps()}}},created(){this.validateEmptyListProps()},methods:{onMouseHighlight(i){if(this.loading)return;const t=i.target.closest("li");t&&this.highlightId!==t.id&&this.setHighlightId(t.id)},getListElement(){var i;return this.outsideRenderedListRef??((i=this.$refs.listWrapper)==null?void 0:i.querySelector(`#${this.listId}`))},clearHighlightIndex(){this.showList&&this.setHighlightIndex(-1)},afterHighlight(){this.loading||this.$emit("highlight",this.highlightIndex)},onEnterKey(){var i;this.loading||this.emptyList||this.highlightIndex>=0&&(this.$emit("select",this.highlightIndex),this.clickOnSelect&&((i=this.activeItemEl)==null||i.click()))},onEscapeKey(){this.$emit("escape")},onOpen(i,t){var n;this.outsideRenderedListRef=t,(n=this.outsideRenderedListRef)==null||n.addEventListener("mousemove",this.onMouseHighlight),this.$emit("opened",i),i&&this.setInitialHighlightIndex()},onKeyValidation(i,t){!this.showList||!this.getListElement()||this[t](i)},setInitialHighlightIndex(){this.showList&&this.$nextTick(()=>{this.setHighlightIndex(this.loading?-1:0)})},validateEmptyListProps(){this.$slots.emptyListItem||this.emptyList&&!this.emptyStateMessage&&console.error(`Invalid props: you must pass both props emptyList and emptyStateMessage to show the
|
|
2
|
+
empty message.`)}}},f={"data-qa":"dt-combobox-input-wrapper"};function c(i,t,n,L,r,s){const d=e.resolveComponent("combobox-loading-list"),h=e.resolveComponent("combobox-empty-list");return e.openBlock(),e.createElementBlock("div",{onKeydown:[t[3]||(t[3]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEscapeKey"),["stop"]),["esc"])),t[4]||(t[4]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEnterKey"),["exact"]),["enter"])),t[5]||(t[5]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onUpKey"),["stop","prevent"]),["up"])),t[6]||(t[6]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onDownKey"),["stop","prevent"]),["down"])),t[7]||(t[7]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onHomeKey"),["stop","prevent"]),["home"])),t[8]||(t[8]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEndKey"),["stop","prevent"]),["end"]))]},[e.createElementVNode("div",f,[e.renderSlot(i.$slots,"input",{inputProps:s.inputProps})]),n.showList?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"listWrapper","data-qa":"dt-combobox-list-wrapper",onMouseleave:t[0]||(t[0]=(...o)=>s.clearHighlightIndex&&s.clearHighlightIndex(...o)),onFocusout:t[1]||(t[1]=(...o)=>s.clearHighlightIndex&&s.clearHighlightIndex(...o)),onMousemoveCapture:t[2]||(t[2]=(...o)=>s.onMouseHighlight&&s.onMouseHighlight(...o))},[n.loading&&!n.listRenderedOutside?(e.openBlock(),e.createBlock(d,e.normalizeProps(e.mergeProps({key:0},s.listProps)),null,16)):n.emptyList&&(n.emptyStateMessage||r.hasSlotContent(i.$slots.emptyListItem))&&!n.listRenderedOutside?(e.openBlock(),e.createBlock(h,e.mergeProps({key:1},s.listProps,{message:n.emptyStateMessage,"item-class":n.emptyStateClass}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"emptyListItem")]),_:3},16,["message","item-class"])):e.renderSlot(i.$slots,"list",{key:2,listProps:s.listProps,opened:s.onOpen,clearHighlightIndex:s.clearHighlightIndex})],544)):e.createCommentVNode("",!0)],32)}const b=u._(y,[["render",c]]);exports.default=b;
|
|
3
3
|
//# sourceMappingURL=combobox.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.cjs","sources":["../../../components/combobox/combobox.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/no-static-element-interactions -->\n<template>\n <div\n @keydown.esc.stop=\"onKeyValidation($event, 'onEscapeKey')\"\n @keydown.enter.exact=\"onKeyValidation($event, 'onEnterKey')\"\n @keydown.up.stop.prevent=\"onKeyValidation($event, 'onUpKey')\"\n @keydown.down.stop.prevent=\"onKeyValidation($event, 'onDownKey')\"\n @keydown.home.stop.prevent=\"onKeyValidation($event, 'onHomeKey')\"\n @keydown.end.stop.prevent=\"onKeyValidation($event, 'onEndKey')\"\n >\n <div data-qa=\"dt-combobox-input-wrapper\">\n <!-- @slot Slot for the combobox input element -->\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n />\n </div>\n\n <div\n v-if=\"showList\"\n ref=\"listWrapper\"\n data-qa=\"dt-combobox-list-wrapper\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n @mousemove.capture=\"onMouseHighlight\"\n >\n <combobox-loading-list\n v-if=\"loading && !listRenderedOutside\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && (emptyStateMessage || hasSlotContent($slots.emptyListItem)) && !listRenderedOutside\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n :item-class=\"emptyStateClass\"\n >\n <slot name=\"emptyListItem\" />\n </combobox-empty-list>\n <!-- @slot Slot for the combobox list element -->\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n :opened=\"onOpen\"\n :clear-highlight-index=\"clearHighlightIndex\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport KeyboardNavigation from '@/common/mixins/keyboard_list_navigation';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport ComboboxLoadingList from './combobox_loading-list.vue';\nimport ComboboxEmptyList from './combobox_empty-list.vue';\nimport { LABEL_SIZES } from '@/components/combobox/combobox_constants';\n\n/**\n * A combobox is a semantic component that displays an input element combined with a listbox,\n * which enables the user to select items from the list.\n * @see https://dialtone.dialpad.com/components/combobox.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtCombobox',\n\n components: {\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n mixins: [\n KeyboardNavigation({\n indexKey: 'highlightIndex',\n idKey: 'highlightId',\n listElementKey: 'getListElement',\n afterHighlightMethod: 'afterHighlight',\n beginningOfListMethod: 'beginningOfListMethod',\n endOfListMethod: 'endOfListMethod',\n activeItemKey: 'activeItemEl',\n }),\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(LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\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 * 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 when to show the list element and also controls the aria-expanded attribute.\n * @values true, false\n */\n showList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the list is rendered outside the component, like when using popover as the list wrapper.\n * @values true, false\n */\n listRenderedOutside: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n * @values true, false\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 * @values true, false\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 * Additional class name for the empty list element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n emptyStateClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Programmatically click on the active list item element when a selection\n * comes from keyboard navigation, i.e. pressing the \"Enter\" key.\n * @values true, false\n */\n clickOnSelect: {\n type: Boolean,\n default: false,\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 pressing escape\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when the highlight changes\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Event fired when list is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n // If the list is rendered at the root, rather than as a child\n // of this component, this is the ref to that dom element. Set\n // by the onOpen method.\n outsideRenderedListRef: null,\n hasSlotContent,\n };\n },\n\n computed: {\n inputProps () {\n return {\n label: this.label,\n labelVisible: this.labelVisible,\n size: this.size,\n description: this.description,\n role: 'combobox',\n 'aria-label': this.label,\n 'aria-expanded': this.showList.toString(),\n 'aria-owns': this.listId,\n 'aria-haspopup': 'listbox',\n 'aria-activedescendant': this.activeItemId,\n 'aria-controls': this.listId,\n };\n },\n\n listProps () {\n return {\n role: 'listbox',\n id: this.listId,\n // The list has to be positioned relatively so that the auto-scroll can\n // calculate the correct offset for the list items.\n class: 'd-ps-relative',\n 'aria-label': this.label,\n };\n },\n\n beginningOfListMethod () {\n return this.onBeginningOfList || this.jumpToEnd;\n },\n\n endOfListMethod () {\n return this.onEndOfList || this.jumpToBeginning;\n },\n\n activeItemId () {\n if (!this.showList || this.highlightIndex < 0 || this.loading) {\n return;\n }\n return this.highlightId;\n },\n\n activeItemEl () {\n if (!this.highlightId) return '';\n return this.getListElement().querySelector('#' + this.highlightId);\n },\n },\n\n watch: {\n showList (showList) {\n // When the list's visibility changes reset the highlight index.\n\n if (!this.listRenderedOutside) {\n this.setInitialHighlightIndex();\n this.$emit('opened', showList);\n }\n\n if (!showList && this.outsideRenderedListRef) {\n this.outsideRenderedListRef.removeEventListener('mousemove', this.onMouseHighlight);\n this.outsideRenderedListRef = null;\n }\n },\n\n loading (loading) {\n this.$nextTick(() => {\n this.setInitialHighlightIndex();\n });\n },\n\n $props: {\n deep: true,\n immediate: true,\n handler () {\n this.validateEmptyListProps();\n },\n },\n },\n\n created () {\n this.validateEmptyListProps();\n },\n\n methods: {\n onMouseHighlight (e) {\n if (this.loading) return;\n\n const liElement = e.target.closest('li');\n\n if (liElement && this.highlightId !== liElement.id) {\n this.setHighlightId(liElement.id);\n }\n },\n\n getListElement () {\n return this.outsideRenderedListRef ?? this.$refs.listWrapper?.querySelector(`#${this.listId}`);\n },\n\n clearHighlightIndex () {\n if (this.showList) {\n this.setHighlightIndex(-1);\n }\n },\n\n afterHighlight () {\n if (this.loading) return;\n this.$emit('highlight', this.highlightIndex);\n },\n\n onEnterKey () {\n if (this.loading || this.emptyList) return;\n\n if (this.highlightIndex >= 0) {\n this.$emit('select', this.highlightIndex);\n\n if (this.clickOnSelect) {\n this.activeItemEl?.click();\n }\n }\n },\n\n onEscapeKey () {\n this.$emit('escape');\n },\n\n onOpen (open, contentRef) {\n this.outsideRenderedListRef = contentRef;\n this.outsideRenderedListRef?.addEventListener('mousemove', this.onMouseHighlight);\n this.$emit('opened', open);\n\n if (open) {\n this.setInitialHighlightIndex();\n }\n },\n\n onKeyValidation (e, eventHandler) {\n if (!this.showList || !this.getListElement()) return;\n\n this[eventHandler](e);\n },\n\n setInitialHighlightIndex () {\n if (!this.showList) return;\n this.$nextTick(() => {\n // When the list's is shown, reset the highlight index.\n // If the list is loading, set to -1\n this.setHighlightIndex(this.loading ? -1 : 0);\n });\n },\n\n validateEmptyListProps () {\n if (this.$slots.emptyListItem) { return; }\n\n if (this.emptyList && !this.emptyStateMessage) {\n console.error(`Invalid props: you must pass both props emptyList and emptyStateMessage to show the\n empty message.`);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","ComboboxLoadingList","ComboboxEmptyList","KeyboardNavigation","t","LABEL_SIZES","getUniqueString","hasSlotContent","showList","loading","e","liElement","_a","open","contentRef","eventHandler","_hoisted_1","_createElementBlock","_withKeys","_withModifiers","$event","$options","_createElementVNode","_renderSlot","_ctx","$props","args","_cache","_openBlock","_createBlock","_component_combobox_loading_list","_normalizeProps","_mergeProps","$data","_component_combobox_empty_list","_withCtx","_createCommentVNode"],"mappings":"2ZA8DKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,aAEN,WAAY,CACV,oBAAAC,EAAmB,QACnB,kBAAAC,EAAiB,OAClB,EAED,OAAQ,CACNC,UAAmB,CACjB,SAAU,iBACV,MAAO,cACP,eAAgB,iBAChB,qBAAsB,iBACtB,sBAAuB,wBACvB,gBAAiB,kBACjB,cAAe,cACjB,CAAC,CACF,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,aAAW,EAAE,SAASD,CAAC,CACxD,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAMD,OAAQ,CACN,KAAM,OACN,SAAW,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EAAmB,qBAAAA,EAAA,oBAAA,GAAAK,CAAA,GAvBpC,mBAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,IAAAD,IAwB0BL,EAAgB,kBAAAA,EAAA,iBAAA,GAAAK,CAAA,KAG5BD,EAAA,UAAYA,EAAmB,qBADvCG,EAAAA,UAAA,EAAAC,EAAA,YAGEC,EA7BRC,EAAA,eAAAC,EAAA,WAAA,CAAA,IAAA,GA4BgBX,EAAS,SAAA,CAAA,EAAA,KAAA,EAAA,GAGNI,EAAS,YAAKA,qBAAqBQ,EAAA,eAAeT,EAAM,OAAC,aAAa,IAAA,CAAOC,EAAmB,qBAD7GG,YAAA,EAAAC,cAOsBK,EAPtBF,EAAA,WAOsB,CArC5B,IAAA,GAgCgBX,EAAS,UAAA,CAChB,QAASI,EAAiB,kBAC1B,aAAYA,EAAe,mBAlCpC,QAAAU,EAAA,QAoCQ,IAA6B,CAA7BZ,aAA6BC,EAAA,OAAA,eAAA,IApCrC,EAAA,iCAuCMD,aAMEC,EAAA,OAAA,OAAA,CA7CR,IAAA,EA0CS,UAAYH,EAAS,UACrB,OAAQA,EAAM,OACd,oBAAuBA,EAAmB,6BA5CnDe,EAAA,mBAAA,GAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"combobox.cjs","sources":["../../../components/combobox/combobox.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/no-static-element-interactions -->\n<template>\n <div\n @keydown.esc.stop=\"onKeyValidation($event, 'onEscapeKey')\"\n @keydown.enter.exact=\"onKeyValidation($event, 'onEnterKey')\"\n @keydown.up.stop.prevent=\"onKeyValidation($event, 'onUpKey')\"\n @keydown.down.stop.prevent=\"onKeyValidation($event, 'onDownKey')\"\n @keydown.home.stop.prevent=\"onKeyValidation($event, 'onHomeKey')\"\n @keydown.end.stop.prevent=\"onKeyValidation($event, 'onEndKey')\"\n >\n <div data-qa=\"dt-combobox-input-wrapper\">\n <!-- @slot Slot for the combobox input element -->\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n />\n </div>\n\n <div\n v-if=\"showList\"\n ref=\"listWrapper\"\n data-qa=\"dt-combobox-list-wrapper\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n @mousemove.capture=\"onMouseHighlight\"\n >\n <combobox-loading-list\n v-if=\"loading && !listRenderedOutside\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && (emptyStateMessage || hasSlotContent($slots.emptyListItem)) && !listRenderedOutside\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n :item-class=\"emptyStateClass\"\n >\n <slot name=\"emptyListItem\" />\n </combobox-empty-list>\n <!-- @slot Slot for the combobox list element -->\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n :opened=\"onOpen\"\n :clear-highlight-index=\"clearHighlightIndex\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport ComboboxLoadingList from './combobox_loading-list.vue';\nimport ComboboxEmptyList from './combobox_empty-list.vue';\nimport { DtKeyboardListNavigationMixin } from '@/common/mixins';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { COMBOBOX_LABEL_SIZES } from '@/components/combobox';\n\n/**\n * A combobox is a semantic component that displays an input element combined with a listbox,\n * which enables the user to select items from the list.\n * @see https://dialtone.dialpad.com/components/combobox.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtCombobox',\n\n components: {\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n mixins: [\n DtKeyboardListNavigationMixin({\n indexKey: 'highlightIndex',\n idKey: 'highlightId',\n listElementKey: 'getListElement',\n afterHighlightMethod: 'afterHighlight',\n beginningOfListMethod: 'beginningOfListMethod',\n endOfListMethod: 'endOfListMethod',\n activeItemKey: 'activeItemEl',\n }),\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 * 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 * 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 when to show the list element and also controls the aria-expanded attribute.\n * @values true, false\n */\n showList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the list is rendered outside the component, like when using popover as the list wrapper.\n * @values true, false\n */\n listRenderedOutside: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n * @values true, false\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 * @values true, false\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 * Additional class name for the empty list element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n emptyStateClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Programmatically click on the active list item element when a selection\n * comes from keyboard navigation, i.e. pressing the \"Enter\" key.\n * @values true, false\n */\n clickOnSelect: {\n type: Boolean,\n default: false,\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 pressing escape\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when the highlight changes\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Event fired when list is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n // If the list is rendered at the root, rather than as a child\n // of this component, this is the ref to that dom element. Set\n // by the onOpen method.\n outsideRenderedListRef: null,\n hasSlotContent,\n };\n },\n\n computed: {\n inputProps () {\n return {\n label: this.label,\n labelVisible: this.labelVisible,\n size: this.size,\n description: this.description,\n role: 'combobox',\n 'aria-label': this.label,\n 'aria-expanded': this.showList.toString(),\n 'aria-owns': this.listId,\n 'aria-haspopup': 'listbox',\n 'aria-activedescendant': this.activeItemId,\n 'aria-controls': this.listId,\n };\n },\n\n listProps () {\n return {\n role: 'listbox',\n id: this.listId,\n // The list has to be positioned relatively so that the auto-scroll can\n // calculate the correct offset for the list items.\n class: 'd-ps-relative',\n 'aria-label': this.label,\n };\n },\n\n beginningOfListMethod () {\n return this.onBeginningOfList || this.jumpToEnd;\n },\n\n endOfListMethod () {\n return this.onEndOfList || this.jumpToBeginning;\n },\n\n activeItemId () {\n if (!this.showList || this.highlightIndex < 0 || this.loading) {\n return;\n }\n return this.highlightId;\n },\n\n activeItemEl () {\n if (!this.highlightId) return '';\n return this.getListElement().querySelector('#' + this.highlightId);\n },\n },\n\n watch: {\n showList (showList) {\n // When the list's visibility changes reset the highlight index.\n\n if (!this.listRenderedOutside) {\n this.setInitialHighlightIndex();\n this.$emit('opened', showList);\n }\n\n if (!showList && this.outsideRenderedListRef) {\n this.outsideRenderedListRef.removeEventListener('mousemove', this.onMouseHighlight);\n this.outsideRenderedListRef = null;\n }\n },\n\n loading (loading) {\n this.$nextTick(() => {\n this.setInitialHighlightIndex();\n });\n },\n\n $props: {\n deep: true,\n immediate: true,\n handler () {\n this.validateEmptyListProps();\n },\n },\n },\n\n created () {\n this.validateEmptyListProps();\n },\n\n methods: {\n onMouseHighlight (e) {\n if (this.loading) return;\n\n const liElement = e.target.closest('li');\n\n if (liElement && this.highlightId !== liElement.id) {\n this.setHighlightId(liElement.id);\n }\n },\n\n getListElement () {\n return this.outsideRenderedListRef ?? this.$refs.listWrapper?.querySelector(`#${this.listId}`);\n },\n\n clearHighlightIndex () {\n if (this.showList) {\n this.setHighlightIndex(-1);\n }\n },\n\n afterHighlight () {\n if (this.loading) return;\n this.$emit('highlight', this.highlightIndex);\n },\n\n onEnterKey () {\n if (this.loading || this.emptyList) return;\n\n if (this.highlightIndex >= 0) {\n this.$emit('select', this.highlightIndex);\n\n if (this.clickOnSelect) {\n this.activeItemEl?.click();\n }\n }\n },\n\n onEscapeKey () {\n this.$emit('escape');\n },\n\n onOpen (open, contentRef) {\n this.outsideRenderedListRef = contentRef;\n this.outsideRenderedListRef?.addEventListener('mousemove', this.onMouseHighlight);\n this.$emit('opened', open);\n\n if (open) {\n this.setInitialHighlightIndex();\n }\n },\n\n onKeyValidation (e, eventHandler) {\n if (!this.showList || !this.getListElement()) return;\n\n this[eventHandler](e);\n },\n\n setInitialHighlightIndex () {\n if (!this.showList) return;\n this.$nextTick(() => {\n // When the list's is shown, reset the highlight index.\n // If the list is loading, set to -1\n this.setHighlightIndex(this.loading ? -1 : 0);\n });\n },\n\n validateEmptyListProps () {\n if (this.$slots.emptyListItem) { return; }\n\n if (this.emptyList && !this.emptyStateMessage) {\n console.error(`Invalid props: you must pass both props emptyList and emptyStateMessage to show the\n empty message.`);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","ComboboxLoadingList","ComboboxEmptyList","DtKeyboardListNavigationMixin","t","COMBOBOX_LABEL_SIZES","getUniqueString","hasSlotContent","showList","loading","e","liElement","_a","open","contentRef","eventHandler","_hoisted_1","_createElementBlock","_withKeys","_withModifiers","$event","$options","_createElementVNode","_renderSlot","_ctx","$props","args","_cache","_openBlock","_createBlock","_component_combobox_loading_list","_normalizeProps","_mergeProps","$data","_component_combobox_empty_list","_withCtx","_createCommentVNode"],"mappings":"2ZA8DKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,aAEN,WA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+1,19 @@
|
|
|
1
|
-
import y from "
|
|
2
|
-
import
|
|
3
|
-
import b from "
|
|
4
|
-
import c from "
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
1
|
+
import y from "./combobox-loading-list.js";
|
|
2
|
+
import I from "./combobox-empty-list.js";
|
|
3
|
+
import { getUniqueString as L, hasSlotContent as b } from "../../common/utils/index.js";
|
|
4
|
+
import { resolveComponent as h, openBlock as d, createElementBlock as a, withKeys as l, withModifiers as o, createElementVNode as c, renderSlot as r, createBlock as g, normalizeProps as x, mergeProps as m, withCtx as v, createCommentVNode as E } from "vue";
|
|
5
|
+
import { _ as O } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import S from "../../common/mixins/keyboard-list-navigation.js";
|
|
7
|
+
import { COMBOBOX_LABEL_SIZES as H } from "./combobox-constants.js";
|
|
8
|
+
const K = {
|
|
9
9
|
compatConfig: { MODE: 3 },
|
|
10
10
|
name: "DtCombobox",
|
|
11
11
|
components: {
|
|
12
|
-
ComboboxLoadingList:
|
|
13
|
-
ComboboxEmptyList:
|
|
12
|
+
ComboboxLoadingList: y,
|
|
13
|
+
ComboboxEmptyList: I
|
|
14
14
|
},
|
|
15
15
|
mixins: [
|
|
16
|
-
|
|
16
|
+
S({
|
|
17
17
|
indexKey: "highlightIndex",
|
|
18
18
|
idKey: "highlightId",
|
|
19
19
|
listElementKey: "getListElement",
|
|
@@ -46,7 +46,7 @@ const M = {
|
|
|
46
46
|
size: {
|
|
47
47
|
type: String,
|
|
48
48
|
default: null,
|
|
49
|
-
validator: (e) => Object.values(
|
|
49
|
+
validator: (e) => Object.values(H).includes(e)
|
|
50
50
|
},
|
|
51
51
|
/**
|
|
52
52
|
* Description for the input
|
|
@@ -62,7 +62,7 @@ const M = {
|
|
|
62
62
|
listId: {
|
|
63
63
|
type: String,
|
|
64
64
|
default() {
|
|
65
|
-
return
|
|
65
|
+
return L();
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
/**
|
|
@@ -172,7 +172,7 @@ const M = {
|
|
|
172
172
|
// of this component, this is the ref to that dom element. Set
|
|
173
173
|
// by the onOpen method.
|
|
174
174
|
outsideRenderedListRef: null,
|
|
175
|
-
hasSlotContent:
|
|
175
|
+
hasSlotContent: b
|
|
176
176
|
};
|
|
177
177
|
},
|
|
178
178
|
computed: {
|
|
@@ -275,7 +275,7 @@ const M = {
|
|
|
275
275
|
empty message.`);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
},
|
|
278
|
+
}, M = { "data-qa": "dt-combobox-input-wrapper" };
|
|
279
279
|
function w(e, t, n, R, p, i) {
|
|
280
280
|
const u = h("combobox-loading-list"), f = h("combobox-empty-list");
|
|
281
281
|
return d(), a("div", {
|
|
@@ -288,7 +288,7 @@ function w(e, t, n, R, p, i) {
|
|
|
288
288
|
t[8] || (t[8] = l(o((s) => i.onKeyValidation(s, "onEndKey"), ["stop", "prevent"]), ["end"]))
|
|
289
289
|
]
|
|
290
290
|
}, [
|
|
291
|
-
|
|
291
|
+
c("div", M, [
|
|
292
292
|
r(e.$slots, "input", { inputProps: i.inputProps })
|
|
293
293
|
]),
|
|
294
294
|
n.showList ? (d(), a("div", {
|
|
@@ -299,11 +299,11 @@ function w(e, t, n, R, p, i) {
|
|
|
299
299
|
onFocusout: t[1] || (t[1] = (...s) => i.clearHighlightIndex && i.clearHighlightIndex(...s)),
|
|
300
300
|
onMousemoveCapture: t[2] || (t[2] = (...s) => i.onMouseHighlight && i.onMouseHighlight(...s))
|
|
301
301
|
}, [
|
|
302
|
-
n.loading && !n.listRenderedOutside ? (d(), g(u,
|
|
302
|
+
n.loading && !n.listRenderedOutside ? (d(), g(u, x(m({ key: 0 }, i.listProps)), null, 16)) : n.emptyList && (n.emptyStateMessage || p.hasSlotContent(e.$slots.emptyListItem)) && !n.listRenderedOutside ? (d(), g(f, m({ key: 1 }, i.listProps, {
|
|
303
303
|
message: n.emptyStateMessage,
|
|
304
304
|
"item-class": n.emptyStateClass
|
|
305
305
|
}), {
|
|
306
|
-
default:
|
|
306
|
+
default: v(() => [
|
|
307
307
|
r(e.$slots, "emptyListItem")
|
|
308
308
|
]),
|
|
309
309
|
_: 3
|
|
@@ -313,10 +313,10 @@ function w(e, t, n, R, p, i) {
|
|
|
313
313
|
opened: i.onOpen,
|
|
314
314
|
clearHighlightIndex: i.clearHighlightIndex
|
|
315
315
|
})
|
|
316
|
-
], 544)) :
|
|
316
|
+
], 544)) : E("", !0)
|
|
317
317
|
], 32);
|
|
318
318
|
}
|
|
319
|
-
const z = /* @__PURE__ */ K
|
|
319
|
+
const z = /* @__PURE__ */ O(K, [["render", w]]);
|
|
320
320
|
export {
|
|
321
321
|
z as default
|
|
322
322
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","sources":["../../../components/combobox/combobox.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/no-static-element-interactions -->\n<template>\n <div\n @keydown.esc.stop=\"onKeyValidation($event, 'onEscapeKey')\"\n @keydown.enter.exact=\"onKeyValidation($event, 'onEnterKey')\"\n @keydown.up.stop.prevent=\"onKeyValidation($event, 'onUpKey')\"\n @keydown.down.stop.prevent=\"onKeyValidation($event, 'onDownKey')\"\n @keydown.home.stop.prevent=\"onKeyValidation($event, 'onHomeKey')\"\n @keydown.end.stop.prevent=\"onKeyValidation($event, 'onEndKey')\"\n >\n <div data-qa=\"dt-combobox-input-wrapper\">\n <!-- @slot Slot for the combobox input element -->\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n />\n </div>\n\n <div\n v-if=\"showList\"\n ref=\"listWrapper\"\n data-qa=\"dt-combobox-list-wrapper\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n @mousemove.capture=\"onMouseHighlight\"\n >\n <combobox-loading-list\n v-if=\"loading && !listRenderedOutside\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && (emptyStateMessage || hasSlotContent($slots.emptyListItem)) && !listRenderedOutside\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n :item-class=\"emptyStateClass\"\n >\n <slot name=\"emptyListItem\" />\n </combobox-empty-list>\n <!-- @slot Slot for the combobox list element -->\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n :opened=\"onOpen\"\n :clear-highlight-index=\"clearHighlightIndex\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport KeyboardNavigation from '@/common/mixins/keyboard_list_navigation';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport ComboboxLoadingList from './combobox_loading-list.vue';\nimport ComboboxEmptyList from './combobox_empty-list.vue';\nimport { LABEL_SIZES } from '@/components/combobox/combobox_constants';\n\n/**\n * A combobox is a semantic component that displays an input element combined with a listbox,\n * which enables the user to select items from the list.\n * @see https://dialtone.dialpad.com/components/combobox.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtCombobox',\n\n components: {\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n mixins: [\n KeyboardNavigation({\n indexKey: 'highlightIndex',\n idKey: 'highlightId',\n listElementKey: 'getListElement',\n afterHighlightMethod: 'afterHighlight',\n beginningOfListMethod: 'beginningOfListMethod',\n endOfListMethod: 'endOfListMethod',\n activeItemKey: 'activeItemEl',\n }),\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(LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\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 * 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 when to show the list element and also controls the aria-expanded attribute.\n * @values true, false\n */\n showList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the list is rendered outside the component, like when using popover as the list wrapper.\n * @values true, false\n */\n listRenderedOutside: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n * @values true, false\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 * @values true, false\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 * Additional class name for the empty list element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n emptyStateClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Programmatically click on the active list item element when a selection\n * comes from keyboard navigation, i.e. pressing the \"Enter\" key.\n * @values true, false\n */\n clickOnSelect: {\n type: Boolean,\n default: false,\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 pressing escape\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when the highlight changes\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Event fired when list is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n // If the list is rendered at the root, rather than as a child\n // of this component, this is the ref to that dom element. Set\n // by the onOpen method.\n outsideRenderedListRef: null,\n hasSlotContent,\n };\n },\n\n computed: {\n inputProps () {\n return {\n label: this.label,\n labelVisible: this.labelVisible,\n size: this.size,\n description: this.description,\n role: 'combobox',\n 'aria-label': this.label,\n 'aria-expanded': this.showList.toString(),\n 'aria-owns': this.listId,\n 'aria-haspopup': 'listbox',\n 'aria-activedescendant': this.activeItemId,\n 'aria-controls': this.listId,\n };\n },\n\n listProps () {\n return {\n role: 'listbox',\n id: this.listId,\n // The list has to be positioned relatively so that the auto-scroll can\n // calculate the correct offset for the list items.\n class: 'd-ps-relative',\n 'aria-label': this.label,\n };\n },\n\n beginningOfListMethod () {\n return this.onBeginningOfList || this.jumpToEnd;\n },\n\n endOfListMethod () {\n return this.onEndOfList || this.jumpToBeginning;\n },\n\n activeItemId () {\n if (!this.showList || this.highlightIndex < 0 || this.loading) {\n return;\n }\n return this.highlightId;\n },\n\n activeItemEl () {\n if (!this.highlightId) return '';\n return this.getListElement().querySelector('#' + this.highlightId);\n },\n },\n\n watch: {\n showList (showList) {\n // When the list's visibility changes reset the highlight index.\n\n if (!this.listRenderedOutside) {\n this.setInitialHighlightIndex();\n this.$emit('opened', showList);\n }\n\n if (!showList && this.outsideRenderedListRef) {\n this.outsideRenderedListRef.removeEventListener('mousemove', this.onMouseHighlight);\n this.outsideRenderedListRef = null;\n }\n },\n\n loading (loading) {\n this.$nextTick(() => {\n this.setInitialHighlightIndex();\n });\n },\n\n $props: {\n deep: true,\n immediate: true,\n handler () {\n this.validateEmptyListProps();\n },\n },\n },\n\n created () {\n this.validateEmptyListProps();\n },\n\n methods: {\n onMouseHighlight (e) {\n if (this.loading) return;\n\n const liElement = e.target.closest('li');\n\n if (liElement && this.highlightId !== liElement.id) {\n this.setHighlightId(liElement.id);\n }\n },\n\n getListElement () {\n return this.outsideRenderedListRef ?? this.$refs.listWrapper?.querySelector(`#${this.listId}`);\n },\n\n clearHighlightIndex () {\n if (this.showList) {\n this.setHighlightIndex(-1);\n }\n },\n\n afterHighlight () {\n if (this.loading) return;\n this.$emit('highlight', this.highlightIndex);\n },\n\n onEnterKey () {\n if (this.loading || this.emptyList) return;\n\n if (this.highlightIndex >= 0) {\n this.$emit('select', this.highlightIndex);\n\n if (this.clickOnSelect) {\n this.activeItemEl?.click();\n }\n }\n },\n\n onEscapeKey () {\n this.$emit('escape');\n },\n\n onOpen (open, contentRef) {\n this.outsideRenderedListRef = contentRef;\n this.outsideRenderedListRef?.addEventListener('mousemove', this.onMouseHighlight);\n this.$emit('opened', open);\n\n if (open) {\n this.setInitialHighlightIndex();\n }\n },\n\n onKeyValidation (e, eventHandler) {\n if (!this.showList || !this.getListElement()) return;\n\n this[eventHandler](e);\n },\n\n setInitialHighlightIndex () {\n if (!this.showList) return;\n this.$nextTick(() => {\n // When the list's is shown, reset the highlight index.\n // If the list is loading, set to -1\n this.setHighlightIndex(this.loading ? -1 : 0);\n });\n },\n\n validateEmptyListProps () {\n if (this.$slots.emptyListItem) { return; }\n\n if (this.emptyList && !this.emptyStateMessage) {\n console.error(`Invalid props: you must pass both props emptyList and emptyStateMessage to show the\n empty message.`);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","ComboboxLoadingList","ComboboxEmptyList","KeyboardNavigation","t","LABEL_SIZES","getUniqueString","hasSlotContent","showList","loading","liElement","_a","open","contentRef","eventHandler","_hoisted_1","_createElementBlock","_withKeys","_withModifiers","$event","$options","_createElementVNode","_renderSlot","_ctx","$props","args","_cache","_openBlock","_createBlock","_component_combobox_loading_list","_normalizeProps","_mergeProps","$data","_component_combobox_empty_list","_withCtx","_createCommentVNode"],"mappings":";;;;;;;AA8DA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,qBAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EAED,QAAQ;AAAA,IACNC,EAAmB;AAAA,MACjB,UAAU;AAAA,MACV,OAAO;AAAA,MACP,gBAAgB;AAAA,MAChB,sBAAsB;AAAA,MACtB,uBAAuB;AAAA,MACvB,iBAAiB;AAAA,MACjB,eAAe;AAAA,IACjB,CAAC;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AA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"version":3,"file":"combobox.js","sources":["../../../components/combobox/combobox.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/no-static-element-interactions -->\n<template>\n <div\n @keydown.esc.stop=\"onKeyValidation($event, 'onEscapeKey')\"\n @keydown.enter.exact=\"onKeyValidation($event, 'onEnterKey')\"\n @keydown.up.stop.prevent=\"onKeyValidation($event, 'onUpKey')\"\n @keydown.down.stop.prevent=\"onKeyValidation($event, 'onDownKey')\"\n @keydown.home.stop.prevent=\"onKeyValidation($event, 'onHomeKey')\"\n @keydown.end.stop.prevent=\"onKeyValidation($event, 'onEndKey')\"\n >\n <div data-qa=\"dt-combobox-input-wrapper\">\n <!-- @slot Slot for the combobox input element -->\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n />\n </div>\n\n <div\n v-if=\"showList\"\n ref=\"listWrapper\"\n data-qa=\"dt-combobox-list-wrapper\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n @mousemove.capture=\"onMouseHighlight\"\n >\n <combobox-loading-list\n v-if=\"loading && !listRenderedOutside\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && (emptyStateMessage || hasSlotContent($slots.emptyListItem)) && !listRenderedOutside\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n :item-class=\"emptyStateClass\"\n >\n <slot name=\"emptyListItem\" />\n </combobox-empty-list>\n <!-- @slot Slot for the combobox list element -->\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n :opened=\"onOpen\"\n :clear-highlight-index=\"clearHighlightIndex\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport ComboboxLoadingList from './combobox_loading-list.vue';\nimport ComboboxEmptyList from './combobox_empty-list.vue';\nimport { DtKeyboardListNavigationMixin } from '@/common/mixins';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { COMBOBOX_LABEL_SIZES } from '@/components/combobox';\n\n/**\n * A combobox is a semantic component that displays an input element combined with a listbox,\n * which enables the user to select items from the list.\n * @see https://dialtone.dialpad.com/components/combobox.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtCombobox',\n\n components: {\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n mixins: [\n DtKeyboardListNavigationMixin({\n indexKey: 'highlightIndex',\n idKey: 'highlightId',\n listElementKey: 'getListElement',\n afterHighlightMethod: 'afterHighlight',\n beginningOfListMethod: 'beginningOfListMethod',\n endOfListMethod: 'endOfListMethod',\n activeItemKey: 'activeItemEl',\n }),\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 * 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 * 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 when to show the list element and also controls the aria-expanded attribute.\n * @values true, false\n */\n showList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the list is rendered outside the component, like when using popover as the list wrapper.\n * @values true, false\n */\n listRenderedOutside: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n * @values true, false\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 * @values true, false\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 * Additional class name for the empty list element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n emptyStateClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Programmatically click on the active list item element when a selection\n * comes from keyboard navigation, i.e. pressing the \"Enter\" key.\n * @values true, false\n */\n clickOnSelect: {\n type: Boolean,\n default: false,\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 pressing escape\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when the highlight changes\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Event fired when list is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n // If the list is rendered at the root, rather than as a child\n // of this component, this is the ref to that dom element. Set\n // by the onOpen method.\n outsideRenderedListRef: null,\n hasSlotContent,\n };\n },\n\n computed: {\n inputProps () {\n return {\n label: this.label,\n labelVisible: this.labelVisible,\n size: this.size,\n description: this.description,\n role: 'combobox',\n 'aria-label': this.label,\n 'aria-expanded': this.showList.toString(),\n 'aria-owns': this.listId,\n 'aria-haspopup': 'listbox',\n 'aria-activedescendant': this.activeItemId,\n 'aria-controls': this.listId,\n };\n },\n\n listProps () {\n return {\n role: 'listbox',\n id: this.listId,\n // The list has to be positioned relatively so that the auto-scroll can\n // calculate the correct offset for the list items.\n class: 'd-ps-relative',\n 'aria-label': this.label,\n };\n },\n\n beginningOfListMethod () {\n return this.onBeginningOfList || this.jumpToEnd;\n },\n\n endOfListMethod () {\n return this.onEndOfList || this.jumpToBeginning;\n },\n\n activeItemId () {\n if (!this.showList || this.highlightIndex < 0 || this.loading) {\n return;\n }\n return this.highlightId;\n },\n\n activeItemEl () {\n if (!this.highlightId) return '';\n return this.getListElement().querySelector('#' + this.highlightId);\n },\n },\n\n watch: {\n showList (showList) {\n // When the list's visibility changes reset the highlight index.\n\n if (!this.listRenderedOutside) {\n this.setInitialHighlightIndex();\n this.$emit('opened', showList);\n }\n\n if (!showList && this.outsideRenderedListRef) {\n this.outsideRenderedListRef.removeEventListener('mousemove', this.onMouseHighlight);\n this.outsideRenderedListRef = null;\n }\n },\n\n loading (loading) {\n this.$nextTick(() => {\n this.setInitialHighlightIndex();\n });\n },\n\n $props: {\n deep: true,\n immediate: true,\n handler () {\n this.validateEmptyListProps();\n },\n },\n },\n\n created () {\n this.validateEmptyListProps();\n },\n\n methods: {\n onMouseHighlight (e) {\n if (this.loading) return;\n\n const liElement = e.target.closest('li');\n\n if (liElement && this.highlightId !== liElement.id) {\n this.setHighlightId(liElement.id);\n }\n },\n\n getListElement () {\n return this.outsideRenderedListRef ?? this.$refs.listWrapper?.querySelector(`#${this.listId}`);\n },\n\n clearHighlightIndex () {\n if (this.showList) {\n this.setHighlightIndex(-1);\n }\n },\n\n afterHighlight () {\n if (this.loading) return;\n this.$emit('highlight', this.highlightIndex);\n },\n\n onEnterKey () {\n if (this.loading || this.emptyList) return;\n\n if (this.highlightIndex >= 0) {\n this.$emit('select', this.highlightIndex);\n\n if (this.clickOnSelect) {\n this.activeItemEl?.click();\n }\n }\n },\n\n onEscapeKey () {\n this.$emit('escape');\n },\n\n onOpen (open, contentRef) {\n this.outsideRenderedListRef = contentRef;\n this.outsideRenderedListRef?.addEventListener('mousemove', this.onMouseHighlight);\n this.$emit('opened', open);\n\n if (open) {\n this.setInitialHighlightIndex();\n }\n },\n\n onKeyValidation (e, eventHandler) {\n if (!this.showList || !this.getListElement()) return;\n\n this[eventHandler](e);\n },\n\n setInitialHighlightIndex () {\n if (!this.showList) return;\n this.$nextTick(() => {\n // When the list's is shown, reset the highlight index.\n // If the list is loading, set to -1\n this.setHighlightIndex(this.loading ? -1 : 0);\n });\n },\n\n validateEmptyListProps () {\n if (this.$slots.emptyListItem) { return; }\n\n if (this.emptyList && !this.emptyStateMessage) {\n console.error(`Invalid props: you must pass both props emptyList and emptyStateMessage to show the\n empty message.`);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","ComboboxLoadingList","ComboboxEmptyList","DtKeyboardListNavigationMixin","t","COMBOBOX_LABEL_SIZES","getUniqueString","hasSlotContent","showList","loading","liElement","_a","open","contentRef","eventHandler","_hoisted_1","_createElementBlock","_withKeys","_withModifiers","$event","$options","_createElementVNode","_renderSlot","_ctx","$props","args","_cache","_openBlock","_createBlock","_component_combobox_loading_list","_normalizeProps","_mergeProps","$data","_component_combobox_empty_list","_withCtx","_createCommentVNode"],"mappings":";;;;;;;AA8DA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,qBAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EAED,QAAQ;AAAA,IACNC,EAA8B;AAAA,MAC5B,UAAU;AAAA,MACV,OAAO;AAAA,MACP,gBAAgB;AAAA,MAChB,sBAAsB;AAAA,MACtB,uBAAuB;AAAA,MACvB,iBAAiB;AAAA,MACjB,eAAe;AAAA,IACjB,CAAC;AAAA,EACF;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;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAACC,MAAM,OAAO,OAAOC,CAAoB,EAAE,SAASD,CAAC;AAAA,IACjE;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,UAAW;A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AAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAD,MAwB0BL,EAAgB,oBAAAA,EAAA,iBAAA,GAAAK,CAAA;AAAA;MAG5BD,EAAA,YAAYA,EAAmB,uBADvCG,EAAA,GAAAC,EAGEC,GA7BRC,EAAAC,EAAA,EAAA,KAAA,KA4BgBX,EAAS,SAAA,CAAA,GAAA,MAAA,EAAA,KAGNI,EAAS,cAAKA,uBAAqBQ,EAAA,eAAeT,EAAM,OAAC,aAAa,MAAA,CAAOC,EAAmB,uBAD7GG,EAAA,GAAAC,EAOsBK,GAPtBF,EAOsB,EArC5B,KAAA,KAgCgBX,EAAS,WAAA;AAAA,QAChB,SAASI,EAAiB;AAAA,QAC1B,cAAYA,EAAe;AAAA;QAlCpC,SAAAU,EAoCQ,MAA6B;AAAA,UAA7BZ,EAA6BC,EAAA,QAAA,eAAA;AAAA;QApCrC,GAAA;AAAA,2CAuCMD,EAMEC,EAAA,QAAA,QAAA;AAAA,QA7CR,KAAA;AAAA,QA0CS,WAAYH,EAAS;AAAA,QACrB,QAAQA,EAAM;AAAA,QACd,qBAAuBA,EAAmB;AAAA;eA5CnDe,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./combobox.cjs"),b=require("./combobox-constants.cjs");exports.DtCombobox=o.default;exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./combobox.cjs"),b=require("./combobox-constants.cjs");exports.DtCombobox=o.default;exports.COMBOBOX_LABEL_SIZES=b.COMBOBOX_LABEL_SIZES;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as t } from "./combobox.js";
|
|
2
|
-
import {
|
|
2
|
+
import { COMBOBOX_LABEL_SIZES as f } from "./combobox-constants.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
f as COMBOBOX_LABEL_SIZES,
|
|
5
|
+
t as DtCombobox
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../combobox-with-popover/combobox-with-popover.cjs"),b=require("../input/input.cjs"),C=require("../chip/chip.cjs"),y=require("../validation-messages/validation-messages.cjs"),x=require("../../common/validators/index.cjs"),u=require("../../common/utils/index.cjs"),v=require("../popover/popover-constants.cjs"),p=require("./combobox-multi-select-constants.cjs"),I=require("../../common/mixins/sr-only-close-button.cjs"),t=require("vue"),_=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),S={compatConfig:{MODE:3},name:"DtRecipeComboboxMultiSelect",components:{DtRecipeComboboxWithPopover:f.default,DtInput:b.default,DtChip:C.default,DtValidationMessages:y.default},mixins:[I.default],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},placeholder:{type:String,default:"Select one or start typing"},inputMessages:{type:Array,default:()=>[],validator:e=>x.validationMessageValidator(e)},showInputMessages:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingMessage:{type:String,default:"loading..."},showList:{type:Boolean,default:null},listMaxHeight:{type:String,default:"300px"},selectedItems:{type:Array,default:function(){return[]}},maxSelected:{type:Number,default:0},maxSelectedMessage:{type:Array,default:function(){return[]}},hasSuggestionList:{type:Boolean,default:!0},size:{type:String,default:"md",validator:e=>Object.values(p.MULTI_SELECT_SIZES).includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>v.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"},collapseOnFocusOut:{type:Boolean,default:!1},listMaxWidth:{type:String,default:""},reservedRightSpace:{type:Number,default:64},chipMaxWidth:{type:String,default:""},inputClass:{type:[String,Object,Array],default:""},inputWrapperClass:{type:[String,Object,Array],default:""}},emits:["input","select","remove","max-selected","keyup","combobox-highlight"],data(){return{value:"",popoverOffset:[0,4],showValidationMessages:!1,resizeWindowObserver:null,initialInputHeight:null,CHIP_SIZES:p.CHIP_SIZES,hasSlotContent:u.hasSlotContent,inputFocused:!1,hideInputText:!1}},computed:{inputPlaceHolder(){var e;return((e=this.selectedItems)==null?void 0:e.length)>0?"":this.placeholder},chipListeners(){return{keyup:e=>{this.onChipKeyup(e),this.$emit("keyup",e)}}},inputListeners(){return{input:e=>{this.$emit("input",e),this.hasSuggestionList&&this.showComboboxList()},keyup:e=>{this.onInputKeyup(e),this.$emit("keyup",e)},click:e=>{this.hasSuggestionList&&this.showComboboxList()}}},chipWrapperClass(){return{[`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]:!this.inputFocused&&this.collapseOnFocusOut}}},watch:{selectedItems:{deep:!0,handler:async function(){this.initSelectedItems()}},chipMaxWidth:{async handler(){this.initSelectedItems()}},async label(){await this.$nextTick(),this.setChipsTopPosition()},async description(){await this.$nextTick(),this.setChipsTopPosition()},size:{async handler(){await this.$nextTick();const e=this.getInput();this.revertInputPadding(e),this.initialInputHeight=e.getBoundingClientRect().height,this.setInputPadding(),this.setChipsTopPosition()}}},mounted(){this.setInitialInputHeight(),this.resizeWindowObserver=new ResizeObserver(async()=>{this.setChipsTopPosition(),this.setInputPadding()}),this.resizeWindowObserver.observe(document.body),this.initSelectedItems()},beforeUnmount(){var e;(e=this.resizeWindowObserver)==null||e.unobserve(document.body)},methods:{comboboxHighlight(e){this.$emit("combobox-highlight",e)},async initSelectedItems(){await this.$nextTick(),this.setInputPadding(),this.setChipsTopPosition(),this.setInputMinWidth(),this.checkMaxSelected()},onChipRemove(e){var s;this.$emit("remove",e),(s=this.$refs.input)==null||s.focus()},onComboboxSelect(e){this.loading||(this.value="",this.$emit("select",e))},showComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.showComboboxList())},closeComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.closeComboboxList())},getChipButtons(){return this.$refs.chips&&this.$refs.chips.map(e=>u.returnFirstEl(e.$el).querySelector("button"))},getChips(){return this.$refs.chips&&this.$refs.chips.map(e=>u.returnFirstEl(e.$el))},getLastChipButton(){return this.$refs.chips&&this.getChipButtons()[this.getChipButtons().length-1]},getLastChip(){return this.$refs.chips&&this.getChips()[this.getChips().length-1]},getFirstChip(){return this.$refs.chips&&this.getChips()[0]},getInput(){var e;return(e=this.$refs.input)==null?void 0:e.$refs.input},onChipKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();s==="arrowleft"?this.navigateBetweenChips(e.target,!0):s==="arrowright"&&(e.target.id===this.getLastChipButton().id?this.moveFromChipToInput():this.navigateBetweenChips(e.target,!1))},onInputKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();this.selectedItems.length>0&&e.target.selectionStart===0&&(s==="backspace"||s==="arrowleft")&&this.moveFromInputToChip()},moveFromInputToChip(){var e;this.getLastChipButton().focus(),(e=this.$refs.input)==null||e.blur(),this.closeComboboxList()},moveFromChipToInput(){var e;this.getLastChipButton().blur(),(e=this.$refs.input)==null||e.focus(),this.showComboboxList()},navigateBetweenChips(e,s){var o;const i=this.getChipButtons().indexOf(e),a=s?i-1:i+1;a<0||a>=((o=this.$refs.chips)==null?void 0:o.length)||(this.getChipButtons()[i].blur(),this.getChipButtons()[a].focus(),this.closeComboboxList())},setChipsTopPosition(){const e=this.getInput();if(!e)return;const s=this.$refs.inputSlotWrapper,i=e.getBoundingClientRect().top-s.getBoundingClientRect().top,a=this.$refs.chipsWrapper;a.style.top=i-p.CHIP_TOP_POSITION[this.size]+"px"},setInputPadding(){const e=this.getLastChip(),s=this.getInput(),i=this.$refs.chipsWrapper;if(!s||(this.revertInputPadding(s),this.popoverOffset=[0,4],!e)||this.collapseOnFocusOut&&!this.inputFocused)return;const a=e.offsetLeft+this.getFullWidth(e),o=s.getBoundingClientRect().width-a;o>this.reservedRightSpace?s.style.paddingLeft=a+"px":s.style.paddingLeft="4px";const n=i.getBoundingClientRect().height-4,r=e.getBoundingClientRect().height-4,h=o>this.reservedRightSpace?e.offsetTop+2:n+r-9;s.style.paddingTop=`${h}px`},revertInputPadding(e){e.style.paddingLeft="",e.style.paddingTop="",e.style.paddingBottom=""},getFullWidth(e){const s=window.getComputedStyle(e);return e.offsetWidth+parseInt(s.marginLeft)+parseInt(s.marginRight)},setInputMinWidth(){const e=this.getFirstChip(),s=this.getInput();s&&(e?s.style.minWidth=this.getFullWidth(e)+4+"px":s.style.minWidth="")},checkMaxSelected(){this.maxSelected!==0&&(this.selectedItems.length>this.maxSelected?(this.showValidationMessages=!0,this.$emit("max-selected")):this.showValidationMessages=!1)},setInitialInputHeight(){const e=this.getInput();e&&(this.initialInputHeight=e.getBoundingClientRect().height)},async handleInputFocusIn(){this.inputFocused=!0,this.collapseOnFocusOut&&(this.hideInputText=!1,await this.$nextTick(),this.setInputPadding())},async handleInputFocusOut(){if(this.inputFocused=!1,this.collapseOnFocusOut){this.hideInputText=!0;const e=this.getInput();if(!e||!e.style.paddingTop)return;this.revertInputPadding(e)}}}},w={ref:"header"},L={key:1,class:"d-recipe-combobox-multi-select__list--loading"},M={ref:"footer"};function W(e,s,i,a,o,n){const r=t.resolveComponent("dt-chip"),h=t.resolveComponent("dt-input"),c=t.resolveComponent("dt-validation-messages"),d=t.resolveComponent("dt-recipe-combobox-with-popover");return t.openBlock(),t.createBlock(d,{ref:"comboboxWithPopover",label:i.label,"show-list":i.showList,"max-height":i.listMaxHeight,"max-width":i.listMaxWidth,"popover-offset":o.popoverOffset,"has-suggestion-list":i.hasSuggestionList,"visually-hidden-close-label":e.visuallyHiddenCloseLabel,"visually-hidden-close":e.visuallyHiddenClose,"content-width":"anchor","append-to":i.appendTo,transition:i.transition,onSelect:n.onComboboxSelect,onHighlight:n.comboboxHighlight},t.createSlots({input:t.withCtx(({onInput:g})=>[t.createElementVNode("span",{ref:"inputSlotWrapper",class:"d-recipe-combobox-multi-select__input-wrapper",onFocusin:s[1]||(s[1]=(...l)=>n.handleInputFocusIn&&n.handleInputFocusIn(...l)),onFocusout:s[2]||(s[2]=(...l)=>n.handleInputFocusOut&&n.handleInputFocusOut(...l))},[t.createElementVNode("span",{ref:"chipsWrapper",class:t.normalizeClass(["d-recipe-combobox-multi-select__chip-wrapper",n.chipWrapperClass])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.selectedItems,l=>(t.openBlock(),t.createBlock(r,t.mergeProps({ref_for:!0,ref:"chips",key:l,"label-class":["d-chip__label"],class:["d-recipe-combobox-multi-select__chip",{"d-recipe-combobox-multi-select__chip--truncate":!!i.chipMaxWidth}],style:{maxWidth:i.chipMaxWidth},"close-button-props":{ariaLabel:"close"},size:o.CHIP_SIZES[i.size]},t.toHandlers(n.chipListeners),{onKeyup:t.withKeys(m=>n.onChipRemove(l),["backspace"]),onClose:m=>n.onChipRemove(l)}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l),1)]),_:2},1040,["class","style","size","onKeyup","onClose"]))),128))],2),t.createVNode(h,t.mergeProps({ref:"input",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),class:"d-recipe-combobox-multi-select__input","input-class":[i.inputClass,{"d-recipe-combobox-multi-select__input--hidden":o.hideInputText}],"input-wrapper-class":i.inputWrapperClass,"aria-label":i.label,label:i.labelVisible?i.label:"",description:i.description,placeholder:n.inputPlaceHolder,"show-messages":i.showInputMessages,messages:i.inputMessages,size:i.size},t.toHandlers(n.inputListeners),{onInput:g}),null,16,["modelValue","input-class","input-wrapper-class","aria-label","label","description","placeholder","show-messages","messages","size","onInput"]),t.createVNode(c,{"validation-messages":i.maxSelectedMessage,"show-messages":o.showValidationMessages},null,8,["validation-messages","show-messages"])],544)]),list:t.withCtx(()=>[t.createElementVNode("div",{ref:"list",class:"d-recipe-combobox-multi-select__list",onMousedown:s[3]||(s[3]=t.withModifiers(()=>{},["prevent"]))},[i.loading?(t.openBlock(),t.createElementBlock("div",L,t.toDisplayString(i.loadingMessage),1)):t.renderSlot(e.$slots,"list",{key:0})],544)]),_:2},[o.hasSlotContent(e.$slots.header)?{name:"header",fn:t.withCtx(()=>[t.createElementVNode("div",w,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,o.hasSlotContent(e.$slots.footer)?{name:"footer",fn:t.withCtx(()=>[t.createElementVNode("div",M,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["label","show-list","max-height","max-width","popover-offset","has-suggestion-list","visually-hidden-close-label","visually-hidden-close","append-to","transition","onSelect","onHighlight"])}const B=_._(S,[["render",W]]);exports.default=B;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../combobox-with-popover/combobox-with-popover.cjs"),b=require("../input/input.cjs"),C=require("../chip/chip.cjs"),x=require("../validation-messages/validation-messages.cjs"),y=require("../../common/validators/index.cjs"),p=require("../../common/utils/index.cjs"),I=require("../popover/popover-constants.cjs"),u=require("./combobox-multi-select-constants.cjs"),t=require("vue"),_=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),S={compatConfig:{MODE:3},name:"DtRecipeComboboxMultiSelect",components:{DtRecipeComboboxWithPopover:f.default,DtInput:b.default,DtChip:C.default,DtValidationMessages:x.default},props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},placeholder:{type:String,default:"Select one or start typing"},inputMessages:{type:Array,default:()=>[],validator:e=>y.validationMessageValidator(e)},showInputMessages:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingMessage:{type:String,default:"loading..."},showList:{type:Boolean,default:null},listMaxHeight:{type:String,default:"300px"},selectedItems:{type:Array,default:function(){return[]}},maxSelected:{type:Number,default:0},maxSelectedMessage:{type:Array,default:function(){return[]}},hasSuggestionList:{type:Boolean,default:!0},size:{type:String,default:"md",validator:e=>Object.values(u.MULTI_SELECT_SIZES).includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>I.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"},collapseOnFocusOut:{type:Boolean,default:!1},listMaxWidth:{type:String,default:""},reservedRightSpace:{type:Number,default:64},chipMaxWidth:{type:String,default:""},inputClass:{type:[String,Object,Array],default:""},inputWrapperClass:{type:[String,Object,Array],default:""}},emits:["input","select","remove","max-selected","keyup","combobox-highlight"],data(){return{value:"",popoverOffset:[0,4],showValidationMessages:!1,resizeWindowObserver:null,initialInputHeight:null,CHIP_SIZES:u.CHIP_SIZES,hasSlotContent:p.hasSlotContent,inputFocused:!1,hideInputText:!1}},computed:{inputPlaceHolder(){var e;return((e=this.selectedItems)==null?void 0:e.length)>0?"":this.placeholder},chipListeners(){return{keyup:e=>{this.onChipKeyup(e),this.$emit("keyup",e)}}},inputListeners(){return{input:e=>{this.$emit("input",e),this.hasSuggestionList&&this.showComboboxList()},keyup:e=>{this.onInputKeyup(e),this.$emit("keyup",e)},click:e=>{this.hasSuggestionList&&this.showComboboxList()}}},chipWrapperClass(){return{[`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]:!this.inputFocused&&this.collapseOnFocusOut}}},watch:{selectedItems:{deep:!0,handler:async function(){this.initSelectedItems()}},chipMaxWidth:{async handler(){this.initSelectedItems()}},async label(){await this.$nextTick(),this.setChipsTopPosition()},async description(){await this.$nextTick(),this.setChipsTopPosition()},size:{async handler(){await this.$nextTick();const e=this.getInput();this.revertInputPadding(e),this.initialInputHeight=e.getBoundingClientRect().height,this.setInputPadding(),this.setChipsTopPosition()}}},mounted(){this.setInitialInputHeight(),this.resizeWindowObserver=new ResizeObserver(async()=>{this.setChipsTopPosition(),this.setInputPadding()}),this.resizeWindowObserver.observe(document.body),this.initSelectedItems()},beforeUnmount(){var e;(e=this.resizeWindowObserver)==null||e.unobserve(document.body)},methods:{comboboxHighlight(e){this.$emit("combobox-highlight",e)},async initSelectedItems(){await this.$nextTick(),this.setInputPadding(),this.setChipsTopPosition(),this.setInputMinWidth(),this.checkMaxSelected()},onChipRemove(e){var s;this.$emit("remove",e),(s=this.$refs.input)==null||s.focus()},onComboboxSelect(e){this.loading||(this.value="",this.$emit("select",e))},showComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.showComboboxList())},closeComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.closeComboboxList())},getChipButtons(){return this.$refs.chips&&this.$refs.chips.map(e=>p.returnFirstEl(e.$el).querySelector("button"))},getChips(){return this.$refs.chips&&this.$refs.chips.map(e=>p.returnFirstEl(e.$el))},getLastChipButton(){return this.$refs.chips&&this.getChipButtons()[this.getChipButtons().length-1]},getLastChip(){return this.$refs.chips&&this.getChips()[this.getChips().length-1]},getFirstChip(){return this.$refs.chips&&this.getChips()[0]},getInput(){var e;return(e=this.$refs.input)==null?void 0:e.$refs.input},onChipKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();s==="arrowleft"?this.navigateBetweenChips(e.target,!0):s==="arrowright"&&(e.target.id===this.getLastChipButton().id?this.moveFromChipToInput():this.navigateBetweenChips(e.target,!1))},onInputKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();this.selectedItems.length>0&&e.target.selectionStart===0&&(s==="backspace"||s==="arrowleft")&&this.moveFromInputToChip()},moveFromInputToChip(){var e;this.getLastChipButton().focus(),(e=this.$refs.input)==null||e.blur(),this.closeComboboxList()},moveFromChipToInput(){var e;this.getLastChipButton().blur(),(e=this.$refs.input)==null||e.focus(),this.showComboboxList()},navigateBetweenChips(e,s){var o;const i=this.getChipButtons().indexOf(e),r=s?i-1:i+1;r<0||r>=((o=this.$refs.chips)==null?void 0:o.length)||(this.getChipButtons()[i].blur(),this.getChipButtons()[r].focus(),this.closeComboboxList())},setChipsTopPosition(){const e=this.getInput();if(!e)return;const s=this.$refs.inputSlotWrapper,i=e.getBoundingClientRect().top-s.getBoundingClientRect().top,r=this.$refs.chipsWrapper;r.style.top=i-u.CHIP_TOP_POSITION[this.size]+"px"},setInputPadding(){const e=this.getLastChip(),s=this.getInput(),i=this.$refs.chipsWrapper;if(!s||(this.revertInputPadding(s),this.popoverOffset=[0,4],!e)||this.collapseOnFocusOut&&!this.inputFocused)return;const r=e.offsetLeft+this.getFullWidth(e),o=s.getBoundingClientRect().width-r;o>this.reservedRightSpace?s.style.paddingLeft=r+"px":s.style.paddingLeft="4px";const n=i.getBoundingClientRect().height-4,a=e.getBoundingClientRect().height-4,h=o>this.reservedRightSpace?e.offsetTop+2:n+a-9;s.style.paddingTop=`${h}px`},revertInputPadding(e){e.style.paddingLeft="",e.style.paddingTop="",e.style.paddingBottom=""},getFullWidth(e){const s=window.getComputedStyle(e);return e.offsetWidth+parseInt(s.marginLeft)+parseInt(s.marginRight)},setInputMinWidth(){const e=this.getFirstChip(),s=this.getInput();s&&(e?s.style.minWidth=this.getFullWidth(e)+4+"px":s.style.minWidth="")},checkMaxSelected(){this.maxSelected!==0&&(this.selectedItems.length>this.maxSelected?(this.showValidationMessages=!0,this.$emit("max-selected")):this.showValidationMessages=!1)},setInitialInputHeight(){const e=this.getInput();e&&(this.initialInputHeight=e.getBoundingClientRect().height)},async handleInputFocusIn(){this.inputFocused=!0,this.collapseOnFocusOut&&(this.hideInputText=!1,await this.$nextTick(),this.setInputPadding())},async handleInputFocusOut(){if(this.inputFocused=!1,this.collapseOnFocusOut){this.hideInputText=!0;const e=this.getInput();if(!e||!e.style.paddingTop)return;this.revertInputPadding(e)}}}},v={ref:"header"},w={key:1,class:"d-recipe-combobox-multi-select__list--loading"},L={ref:"footer"};function M(e,s,i,r,o,n){const a=t.resolveComponent("dt-chip"),h=t.resolveComponent("dt-input"),c=t.resolveComponent("dt-validation-messages"),d=t.resolveComponent("dt-recipe-combobox-with-popover");return t.openBlock(),t.createBlock(d,{ref:"comboboxWithPopover",label:i.label,"show-list":i.showList,"max-height":i.listMaxHeight,"max-width":i.listMaxWidth,"popover-offset":o.popoverOffset,"has-suggestion-list":i.hasSuggestionList,"content-width":"anchor","append-to":i.appendTo,transition:i.transition,onSelect:n.onComboboxSelect,onHighlight:n.comboboxHighlight},t.createSlots({input:t.withCtx(({onInput:g})=>[t.createElementVNode("span",{ref:"inputSlotWrapper",class:"d-recipe-combobox-multi-select__input-wrapper",onFocusin:s[1]||(s[1]=(...l)=>n.handleInputFocusIn&&n.handleInputFocusIn(...l)),onFocusout:s[2]||(s[2]=(...l)=>n.handleInputFocusOut&&n.handleInputFocusOut(...l))},[t.createElementVNode("span",{ref:"chipsWrapper",class:t.normalizeClass(["d-recipe-combobox-multi-select__chip-wrapper",n.chipWrapperClass])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.selectedItems,l=>(t.openBlock(),t.createBlock(a,t.mergeProps({ref_for:!0,ref:"chips",key:l,"label-class":["d-chip__label"],class:["d-recipe-combobox-multi-select__chip",{"d-recipe-combobox-multi-select__chip--truncate":!!i.chipMaxWidth}],style:{maxWidth:i.chipMaxWidth},size:o.CHIP_SIZES[i.size]},t.toHandlers(n.chipListeners),{onKeyup:t.withKeys(m=>n.onChipRemove(l),["backspace"]),onClose:m=>n.onChipRemove(l)}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l),1)]),_:2},1040,["class","style","size","onKeyup","onClose"]))),128))],2),t.createVNode(h,t.mergeProps({ref:"input",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),class:"d-recipe-combobox-multi-select__input","input-class":[i.inputClass,{"d-recipe-combobox-multi-select__input--hidden":o.hideInputText}],"input-wrapper-class":i.inputWrapperClass,"aria-label":i.label,label:i.labelVisible?i.label:"",description:i.description,placeholder:n.inputPlaceHolder,"show-messages":i.showInputMessages,messages:i.inputMessages,size:i.size},t.toHandlers(n.inputListeners),{onInput:g}),null,16,["modelValue","input-class","input-wrapper-class","aria-label","label","description","placeholder","show-messages","messages","size","onInput"]),t.createVNode(c,{"validation-messages":i.maxSelectedMessage,"show-messages":o.showValidationMessages},null,8,["validation-messages","show-messages"])],544)]),list:t.withCtx(()=>[t.createElementVNode("div",{ref:"list",class:"d-recipe-combobox-multi-select__list",onMousedown:s[3]||(s[3]=t.withModifiers(()=>{},["prevent"]))},[i.loading?(t.openBlock(),t.createElementBlock("div",w,t.toDisplayString(i.loadingMessage),1)):t.renderSlot(e.$slots,"list",{key:0})],544)]),_:2},[o.hasSlotContent(e.$slots.header)?{name:"header",fn:t.withCtx(()=>[t.createElementVNode("div",v,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,o.hasSlotContent(e.$slots.footer)?{name:"footer",fn:t.withCtx(()=>[t.createElementVNode("div",L,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["label","show-list","max-height","max-width","popover-offset","has-suggestion-list","append-to","transition","onSelect","onHighlight"])}const W=_._(S,[["render",M]]);exports.default=W;
|
|
2
2
|
//# sourceMappingURL=combobox-multi-select.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-multi-select.cjs","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :close-button-props=\"{ ariaLabel: 'close' }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keyup.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-on=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-recipe-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtRecipeComboboxWithPopover from '@/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\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 * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\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 * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\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 * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\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 * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', event);\n },\n };\n },\n\n inputListeners () {\n return {\n input: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n keyup: event => {\n this.onInputKeyup(event);\n this.$emit('keyup', event);\n },\n\n click: event => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChipButtons () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el).querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el));\n },\n\n getLastChipButton () {\n return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];\n },\n\n getLastChip () {\n return this.$refs.chips && this.getChips()[this.getChips().length - 1];\n },\n\n getFirstChip () {\n return this.$refs.chips && this.getChips()[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyup (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyup (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","SrOnlyCloseButtonMixin","inputMessages","validationMessageValidator","t","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","input","highlightIndex","item","i","chip","returnFirstEl","key","target","toLeft","from","to","inputSlotWrapper","top","chipsWrapper","CHIP_TOP_POSITION","lastChip","left","spaceLeft","chipsWrapperHeight","lastChipHeight","el","styles","firstChip","_hoisted_1","_hoisted_3","_createBlock","_component_dt_recipe_combobox_with_popover","$props","$data","_ctx","$options","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_openBlock","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_mergeProps","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot"],"mappings":"2mBAwIKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,8BAEN,WAAY,6BACVC,EAA2B,QAC3B,QAAAC,EAAO,QACP,OAAAC,EAAM,QACN,qBAAAC,EAAoB,OACrB,EAED,OAAQ,CAACC,EAAAA,OAAsB,EAE/B,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,EACX,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,4BACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,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kB,CAAA,EAAA,CAAA,SAAA,CAAA,KAGTzB,EAAO,uBAGhBW,qBAKM,MALNe,EAKMN,EAAA,gBADDpB,EAAc,cAAA,EAAA,CAAA,GARnB2B,EAAA,WAGEzB,iBAhGV,IAAA,EAAA,UAAA,EAAA,IA8EYD,EAAc,eAACC,EAAM,OAAC,MAAM,GA9ExC,KA+EO,SA/EP,GAAAG,EAAA,QAiFM,IAEM,CAFNE,EAAA,mBAEM,MAFNX,EAEM,CADJ+B,aAAsBzB,EAAA,OAAA,QAAA,UAlF9B,IAAA,KAAA,OA4GYD,EAAc,eAACC,EAAM,OAAC,MAAM,GA5GxC,KA6GO,SA7GP,GAAAG,EAAA,QA+GM,IAEM,CAFNE,EAAA,mBAEM,MAFNV,EAEM,CADJ8B,aAAsBzB,EAAA,OAAA,QAAA,UAhH9B,IAAA,KAAA"}
|
|
1
|
+
{"version":3,"file":"combobox-multi-select.cjs","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keyup.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-on=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-recipe-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtRecipeComboboxWithPopover from '@/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\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 * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\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 * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\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 * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\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 * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', event);\n },\n };\n },\n\n inputListeners () {\n return {\n input: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n keyup: event => {\n this.onInputKeyup(event);\n this.$emit('keyup', event);\n },\n\n click: event => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChipButtons () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el).querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el));\n },\n\n getLastChipButton () {\n return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];\n },\n\n getLastChip () {\n return this.$refs.chips && this.getChips()[this.getChips().length - 1];\n },\n\n getFirstChip () {\n return this.$refs.chips && this.getChips()[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyup (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyup (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","inputMessages","validationMessageValidator","t","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","input","highlightIndex","item","i","chip","returnFirstEl","key","target","toLeft","from","to","inputSlotWrapper","top","chipsWrapper","CHIP_TOP_POSITION","lastChip","left","spaceLeft","chipsWrapperHeight","lastChipHeight","el","styles","firstChip","_hoisted_1","_hoisted_3","_createBlock","_component_dt_recipe_combobox_with_popover","$props","$data","$options","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_openBlock","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_mergeProps","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot","_ctx"],"mappings":"ijBAoIKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,8BAEN,WAAY,6BACVC,EAA2B,QAC3B,QAAAC,EAAO,QACP,OAAAC,EAAM,QACN,qBAAAC,EAAoB,OACrB,EAED,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,EACX,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,4BACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,GACFC,EAAAA,2BAA2BD,CAAa,CAElD,EAKD,kBAAmB,CACjB,KAAM,QACN,QAAS,EACV,EAYD,QAAS,CACP,KAAM,QACN,QAAS,EACV,EAKD,eAAgB,CACd,KAAM,OACN,QAAS,YACV,EAQD,SAAU,CACR,KAAM,QACN,QAAS,IACV,EAMD,cAAe,CACb,KAAM,OACN,QAAS,OACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,UAAY,CAAE,MAAO,CAAA,CAAK,CACpC,EAKD,YAAa,CACX,KAAM,OACN,QAAS,CACV,EAMD,mBAAoB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