@dialpad/dialtone 9.126.6 → 9.127.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/tokens/doc.json +23168 -23168
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +7 -7
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +5 -5
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
- package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker.js +10 -10
- package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.js +24 -26
- package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.js +1 -0
- package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +2 -2
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +33 -29
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/toast/toast.cjs.map +1 -1
- package/dist/vue2/lib/toast/toast.js.map +1 -1
- package/dist/vue2/localization/de-DE.cjs +1 -13
- package/dist/vue2/localization/de-DE.cjs.map +1 -1
- package/dist/vue2/localization/de-DE.js +1 -13
- package/dist/vue2/localization/de-DE.js.map +1 -1
- package/dist/vue2/localization/es-LA.cjs +1 -13
- package/dist/vue2/localization/es-LA.cjs.map +1 -1
- package/dist/vue2/localization/es-LA.js +1 -13
- package/dist/vue2/localization/es-LA.js.map +1 -1
- package/dist/vue2/localization/fr-FR.cjs +1 -13
- package/dist/vue2/localization/fr-FR.cjs.map +1 -1
- package/dist/vue2/localization/fr-FR.js +1 -13
- package/dist/vue2/localization/fr-FR.js.map +1 -1
- package/dist/vue2/localization/it-IT.cjs +1 -13
- package/dist/vue2/localization/it-IT.cjs.map +1 -1
- package/dist/vue2/localization/it-IT.js +1 -13
- package/dist/vue2/localization/it-IT.js.map +1 -1
- package/dist/vue2/localization/ja-JP.cjs +1 -8
- package/dist/vue2/localization/ja-JP.cjs.map +1 -1
- package/dist/vue2/localization/ja-JP.js +1 -8
- package/dist/vue2/localization/ja-JP.js.map +1 -1
- package/dist/vue2/localization/nl-NL.cjs +1 -13
- package/dist/vue2/localization/nl-NL.cjs.map +1 -1
- package/dist/vue2/localization/nl-NL.js +1 -13
- package/dist/vue2/localization/nl-NL.js.map +1 -1
- package/dist/vue2/localization/pt-BR.cjs +1 -13
- package/dist/vue2/localization/pt-BR.cjs.map +1 -1
- package/dist/vue2/localization/pt-BR.js +1 -13
- package/dist/vue2/localization/pt-BR.js.map +1 -1
- package/dist/vue2/localization/ru-RU.cjs +1 -23
- package/dist/vue2/localization/ru-RU.cjs.map +1 -1
- package/dist/vue2/localization/ru-RU.js +1 -23
- package/dist/vue2/localization/ru-RU.js.map +1 -1
- package/dist/vue2/localization/zh-CN.cjs +1 -8
- package/dist/vue2/localization/zh-CN.cjs.map +1 -1
- package/dist/vue2/localization/zh-CN.js +1 -8
- package/dist/vue2/localization/zh-CN.js.map +1 -1
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/common/mixins/index.cjs +1 -1
- package/dist/vue3/common/mixins/index.js +8 -10
- package/dist/vue3/common/mixins/index.js.map +1 -1
- package/dist/vue3/common/utils/index.cjs +1 -1
- package/dist/vue3/common/utils/index.cjs.map +1 -1
- package/dist/vue3/common/utils/index.js +42 -38
- package/dist/vue3/common/utils/index.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +298 -299
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +86 -110
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.js.map +1 -1
- package/dist/vue3/lib/banner/banner.cjs +2 -2
- package/dist/vue3/lib/banner/banner.cjs.map +1 -1
- package/dist/vue3/lib/banner/banner.js +27 -38
- package/dist/vue3/lib/banner/banner.js.map +1 -1
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.js +20 -18
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/vue3/lib/button/button.cjs +1 -1
- package/dist/vue3/lib/button/button.cjs.map +1 -1
- package/dist/vue3/lib/button/button.js +26 -24
- package/dist/vue3/lib/button/button.js.map +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +36 -41
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js +35 -37
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue3/lib/chip/chip.cjs +1 -1
- package/dist/vue3/lib/chip/chip.cjs.map +1 -1
- package/dist/vue3/lib/chip/chip.js +54 -57
- package/dist/vue3/lib/chip/chip.js.map +1 -1
- package/dist/vue3/lib/combobox/combobox-constants.cjs +1 -1
- package/dist/vue3/lib/combobox/combobox-constants.cjs.map +1 -1
- package/dist/vue3/lib/combobox/combobox-constants.js +2 -2
- package/dist/vue3/lib/combobox/combobox-constants.js.map +1 -1
- package/dist/vue3/lib/combobox/combobox-empty-list.cjs.map +1 -1
- package/dist/vue3/lib/combobox/combobox-empty-list.js.map +1 -1
- package/dist/vue3/lib/combobox/combobox-loading-list.cjs.map +1 -1
- package/dist/vue3/lib/combobox/combobox-loading-list.js.map +1 -1
- package/dist/vue3/lib/combobox/combobox.cjs +2 -2
- package/dist/vue3/lib/combobox/combobox.cjs.map +1 -1
- package/dist/vue3/lib/combobox/combobox.js +20 -20
- package/dist/vue3/lib/combobox/combobox.js.map +1 -1
- package/dist/vue3/lib/combobox/index.cjs +1 -1
- package/dist/vue3/lib/combobox/index.js +3 -3
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +119 -124
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js +76 -80
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs +1 -1
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.js +68 -63
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.js.map +1 -1
- package/dist/vue3/lib/contact-row/contact-row.cjs +1 -1
- package/dist/vue3/lib/contact-row/contact-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-row/contact-row.js +32 -48
- package/dist/vue3/lib/contact-row/contact-row.js.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker-constants.cjs +1 -1
- package/dist/vue3/lib/datepicker/datepicker-constants.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker-constants.js +2 -3
- package/dist/vue3/lib/datepicker/datepicker-constants.js.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
- package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker.js +264 -349
- package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue3/lib/datepicker/formatUtils.cjs +1 -1
- package/dist/vue3/lib/datepicker/formatUtils.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/formatUtils.js +21 -20
- package/dist/vue3/lib/datepicker/formatUtils.js.map +1 -1
- package/dist/vue3/lib/datepicker/utils.cjs +1 -1
- package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/utils.js +12 -11
- package/dist/vue3/lib/datepicker/utils.js.map +1 -1
- package/dist/vue3/lib/description-list/description-list.cjs +1 -1
- package/dist/vue3/lib/description-list/description-list.cjs.map +1 -1
- package/dist/vue3/lib/description-list/description-list.js +10 -10
- package/dist/vue3/lib/description-list/description-list.js.map +1 -1
- package/dist/vue3/lib/dropdown/dropdown.cjs +1 -1
- package/dist/vue3/lib/dropdown/dropdown.cjs.map +1 -1
- package/dist/vue3/lib/dropdown/dropdown.js +36 -46
- package/dist/vue3/lib/dropdown/dropdown.js.map +1 -1
- package/dist/vue3/lib/editor/editor.cjs +1 -1
- package/dist/vue3/lib/editor/editor.cjs.map +1 -1
- package/dist/vue3/lib/editor/editor.js +169 -186
- package/dist/vue3/lib/editor/editor.js.map +1 -1
- package/dist/vue3/lib/editor/index.cjs +1 -1
- package/dist/vue3/lib/editor/index.js +2 -2
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +7 -20
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.js +419 -477
- package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue3/lib/emoji-picker/index.cjs +1 -1
- package/dist/vue3/lib/emoji-picker/index.js +3 -4
- package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row-constants.js +6 -7
- package/dist/vue3/lib/emoji-row/emoji-row-constants.js.map +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row.cjs +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row.cjs.map +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row.js +53 -43
- package/dist/vue3/lib/emoji-row/emoji-row.js.map +1 -1
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs +1 -1
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.js +52 -53
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/vue3/lib/general-row/general-row.cjs +1 -1
- package/dist/vue3/lib/general-row/general-row.cjs.map +1 -1
- package/dist/vue3/lib/general-row/general-row.js +133 -118
- package/dist/vue3/lib/general-row/general-row.js.map +1 -1
- package/dist/vue3/lib/group-row/group-row.cjs +1 -1
- package/dist/vue3/lib/group-row/group-row.cjs.map +1 -1
- package/dist/vue3/lib/group-row/group-row.js +53 -39
- package/dist/vue3/lib/group-row/group-row.js.map +1 -1
- package/dist/vue3/lib/icon/icon-constants.cjs.map +1 -1
- package/dist/vue3/lib/icon/icon-constants.js.map +1 -1
- package/dist/vue3/lib/icon/icon.cjs +1 -1
- package/dist/vue3/lib/icon/icon.cjs.map +1 -1
- package/dist/vue3/lib/icon/icon.js +15 -11
- package/dist/vue3/lib/icon/icon.js.map +1 -1
- package/dist/vue3/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/vue3/lib/image-viewer/image-viewer.cjs.map +1 -1
- package/dist/vue3/lib/image-viewer/image-viewer.js +51 -47
- package/dist/vue3/lib/image-viewer/image-viewer.js.map +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node-constants.js +24 -24
- package/dist/vue3/lib/ivr-node/ivr-node-constants.js.map +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node.cjs +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node.cjs.map +1 -1
- package/dist/vue3/lib/ivr-node/ivr-node.js +80 -76
- package/dist/vue3/lib/ivr-node/ivr-node.js.map +1 -1
- package/dist/vue3/lib/message-input/message-input-link.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input-link.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input-link.js +100 -77
- package/dist/vue3/lib/message-input/message-input-link.js.map +1 -1
- package/dist/vue3/lib/message-input/message-input-topbar.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input-topbar.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input-topbar.js +126 -94
- package/dist/vue3/lib/message-input/message-input-topbar.js.map +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input.js +272 -296
- package/dist/vue3/lib/message-input/message-input.js.map +1 -1
- package/dist/vue3/lib/modal/modal.cjs +1 -2
- package/dist/vue3/lib/modal/modal.cjs.map +1 -1
- package/dist/vue3/lib/modal/modal.js +64 -79
- package/dist/vue3/lib/modal/modal.js.map +1 -1
- package/dist/vue3/lib/notice/notice-action.cjs +1 -1
- package/dist/vue3/lib/notice/notice-action.cjs.map +1 -1
- package/dist/vue3/lib/notice/notice-action.js +38 -39
- package/dist/vue3/lib/notice/notice-action.js.map +1 -1
- package/dist/vue3/lib/notice/notice.cjs +1 -1
- package/dist/vue3/lib/notice/notice.cjs.map +1 -1
- package/dist/vue3/lib/notice/notice.js +37 -49
- package/dist/vue3/lib/notice/notice.js.map +1 -1
- package/dist/vue3/lib/pagination/pagination.cjs +1 -1
- package/dist/vue3/lib/pagination/pagination.cjs.map +1 -1
- package/dist/vue3/lib/pagination/pagination.js +72 -81
- package/dist/vue3/lib/pagination/pagination.js.map +1 -1
- package/dist/vue3/lib/popover/popover-header-footer.cjs +1 -1
- package/dist/vue3/lib/popover/popover-header-footer.cjs.map +1 -1
- package/dist/vue3/lib/popover/popover-header-footer.js +44 -45
- package/dist/vue3/lib/popover/popover-header-footer.js.map +1 -1
- package/dist/vue3/lib/popover/popover.cjs +1 -1
- package/dist/vue3/lib/popover/popover.cjs.map +1 -1
- package/dist/vue3/lib/popover/popover.js +26 -37
- package/dist/vue3/lib/popover/popover.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +187 -181
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
- package/dist/vue3/lib/settings-menu-button/settings-menu-button.js.map +1 -1
- package/dist/vue3/lib/time-pill/time-pill.cjs.map +1 -1
- package/dist/vue3/lib/time-pill/time-pill.js.map +1 -1
- package/dist/vue3/lib/toast/toast.cjs +1 -1
- package/dist/vue3/lib/toast/toast.cjs.map +1 -1
- package/dist/vue3/lib/toast/toast.js +83 -127
- package/dist/vue3/lib/toast/toast.js.map +1 -1
- package/dist/vue3/lib/unread-pill/unread-pill.cjs +1 -1
- package/dist/vue3/lib/unread-pill/unread-pill.cjs.map +1 -1
- package/dist/vue3/lib/unread-pill/unread-pill.js +25 -14
- package/dist/vue3/lib/unread-pill/unread-pill.js.map +1 -1
- package/dist/vue3/localization/de-DE.cjs +157 -0
- package/dist/vue3/localization/de-DE.cjs.map +1 -0
- package/dist/vue3/localization/de-DE.js +160 -0
- package/dist/vue3/localization/de-DE.js.map +1 -0
- package/dist/vue3/localization/en-US.cjs +175 -0
- package/dist/vue3/localization/en-US.cjs.map +1 -0
- package/dist/vue3/localization/en-US.js +178 -0
- package/dist/vue3/localization/en-US.js.map +1 -0
- package/dist/vue3/localization/es-LA.cjs +157 -0
- package/dist/vue3/localization/es-LA.cjs.map +1 -0
- package/dist/vue3/localization/es-LA.js +160 -0
- package/dist/vue3/localization/es-LA.js.map +1 -0
- package/dist/vue3/localization/fr-FR.cjs +157 -0
- package/dist/vue3/localization/fr-FR.cjs.map +1 -0
- package/dist/vue3/localization/fr-FR.js +160 -0
- package/dist/vue3/localization/fr-FR.js.map +1 -0
- package/dist/vue3/localization/index.cjs +2 -0
- package/dist/vue3/localization/index.cjs.map +1 -0
- package/dist/vue3/localization/index.js +82 -0
- package/dist/vue3/localization/index.js.map +1 -0
- package/dist/vue3/localization/it-IT.cjs +157 -0
- package/dist/vue3/localization/it-IT.cjs.map +1 -0
- package/dist/vue3/localization/it-IT.js +160 -0
- package/dist/vue3/localization/it-IT.js.map +1 -0
- package/dist/vue3/localization/ja-JP.cjs +157 -0
- package/dist/vue3/localization/ja-JP.cjs.map +1 -0
- package/dist/vue3/localization/ja-JP.js +160 -0
- package/dist/vue3/localization/ja-JP.js.map +1 -0
- package/dist/vue3/localization/nl-NL.cjs +157 -0
- package/dist/vue3/localization/nl-NL.cjs.map +1 -0
- package/dist/vue3/localization/nl-NL.js +160 -0
- package/dist/vue3/localization/nl-NL.js.map +1 -0
- package/dist/vue3/localization/pt-BR.cjs +157 -0
- package/dist/vue3/localization/pt-BR.cjs.map +1 -0
- package/dist/vue3/localization/pt-BR.js +160 -0
- package/dist/vue3/localization/pt-BR.js.map +1 -0
- package/dist/vue3/localization/ru-RU.cjs +157 -0
- package/dist/vue3/localization/ru-RU.cjs.map +1 -0
- package/dist/vue3/localization/ru-RU.js +160 -0
- package/dist/vue3/localization/ru-RU.js.map +1 -0
- package/dist/vue3/localization/zh-CN.cjs +157 -0
- package/dist/vue3/localization/zh-CN.cjs.map +1 -0
- package/dist/vue3/localization/zh-CN.js +160 -0
- package/dist/vue3/localization/zh-CN.js.map +1 -0
- package/dist/vue3/shared/sr_only_close_button.cjs +1 -1
- package/dist/vue3/shared/sr_only_close_button.cjs.map +1 -1
- package/dist/vue3/shared/sr_only_close_button.js +27 -25
- package/dist/vue3/shared/sr_only_close_button.js.map +1 -1
- package/dist/vue3/types/common/mixins/index.d.ts +0 -1
- package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +8 -15
- package/dist/vue3/types/common/sr_only_close_button.vue.d.ts.map +1 -1
- package/dist/vue3/types/common/utils/index.d.ts +1 -0
- package/dist/vue3/types/common/utils/index.d.ts.map +1 -1
- package/dist/vue3/types/components/banner/banner.vue.d.ts +0 -33
- package/dist/vue3/types/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +2 -0
- package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/button/button.vue.d.ts +2 -0
- package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts +3 -15
- package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/combobox/combobox.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/combobox/combobox_constants.d.ts +2 -2
- package/dist/vue3/types/components/combobox/index.d.ts +1 -1
- package/dist/vue3/types/components/datepicker/composables/useCalendar.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts +5 -1
- package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts +0 -1
- package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/formatUtils.d.ts +5 -5
- package/dist/vue3/types/components/datepicker/formatUtils.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts +0 -4
- package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +0 -12
- package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/utils.d.ts +1 -0
- package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
- package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +0 -24
- package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
- package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/icon/icon.vue.d.ts +1 -0
- package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +3 -8
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/modal/modal.vue.d.ts +3 -35
- package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -34
- package/dist/vue3/types/components/notice/notice.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts +7 -35
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts +5 -24
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/popover/popover.vue.d.ts +0 -33
- package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +5 -10
- package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -0
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +2 -46
- package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
- package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toast/toast.vue.d.ts +4 -115
- package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/vue3/types/index.d.ts +1 -0
- package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +3 -11
- package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +3 -10
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +4 -8
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
- package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +3 -41
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +6 -25
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +6 -49
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/index.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -2
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +3 -8
- package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +6 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +12 -88
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +11 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +13 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +5 -8
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +9 -27
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +11 -21
- package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +6 -2
- package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/vue3/common/mixins/sr-only-close-button.cjs +0 -3
- package/dist/vue3/common/mixins/sr-only-close-button.cjs.map +0 -1
- package/dist/vue3/common/mixins/sr-only-close-button.js +0 -44
- package/dist/vue3/common/mixins/sr-only-close-button.js.map +0 -1
- package/dist/vue3/lib/contact-row/contact-row-constants.cjs +0 -2
- package/dist/vue3/lib/contact-row/contact-row-constants.cjs.map +0 -1
- package/dist/vue3/lib/contact-row/contact-row-constants.js +0 -5
- package/dist/vue3/lib/contact-row/contact-row-constants.js.map +0 -1
- package/dist/vue3/lib/emoji/emoji-constants.cjs +0 -2
- package/dist/vue3/lib/emoji/emoji-constants.cjs.map +0 -1
- package/dist/vue3/lib/emoji/emoji-constants.js +0 -5
- package/dist/vue3/lib/emoji/emoji-constants.js.map +0 -1
- package/dist/vue3/lib/group-row/group-row-constants.cjs +0 -2
- package/dist/vue3/lib/group-row/group-row-constants.cjs.map +0 -1
- package/dist/vue3/lib/group-row/group-row-constants.js +0 -8
- package/dist/vue3/lib/group-row/group-row-constants.js.map +0 -1
- package/dist/vue3/lib/time-pill/time-pill-constants.cjs +0 -2
- package/dist/vue3/lib/time-pill/time-pill-constants.cjs.map +0 -1
- package/dist/vue3/lib/time-pill/time-pill-constants.js +0 -8
- package/dist/vue3/lib/time-pill/time-pill-constants.js.map +0 -1
- package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts +0 -30
- package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
- package/dist/vue3/types/components/emoji/emoji_constants.d.ts +0 -3
- package/dist/vue3/types/components/emoji/emoji_constants.d.ts.map +0 -1
- package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
- package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
- package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
- package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
|
@@ -4,12 +4,11 @@ import W from "../chip/chip.js";
|
|
|
4
4
|
import M from "../validation-messages/validation-messages.js";
|
|
5
5
|
import { validationMessageValidator as O } from "../../common/validators/index.js";
|
|
6
6
|
import { hasSlotContent as T, returnFirstEl as g } from "../../common/utils/index.js";
|
|
7
|
-
import { POPOVER_APPEND_TO_VALUES as
|
|
8
|
-
import { MULTI_SELECT_SIZES as
|
|
9
|
-
import H from "
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const U = {
|
|
7
|
+
import { POPOVER_APPEND_TO_VALUES as P } from "../popover/popover-constants.js";
|
|
8
|
+
import { MULTI_SELECT_SIZES as B, CHIP_SIZES as F, CHIP_TOP_POSITION as k } from "./combobox-multi-select-constants.js";
|
|
9
|
+
import { resolveComponent as h, openBlock as p, createBlock as m, createSlots as H, withCtx as r, createElementVNode as a, normalizeClass as R, createElementBlock as f, Fragment as z, renderList as V, mergeProps as b, toHandlers as C, withKeys as E, createTextVNode as D, toDisplayString as y, createVNode as x, withModifiers as A, renderSlot as d } from "vue";
|
|
10
|
+
import { _ as K } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const N = {
|
|
13
12
|
compatConfig: { MODE: 3 },
|
|
14
13
|
name: "DtRecipeComboboxMultiSelect",
|
|
15
14
|
components: {
|
|
@@ -18,7 +17,6 @@ const U = {
|
|
|
18
17
|
DtChip: W,
|
|
19
18
|
DtValidationMessages: M
|
|
20
19
|
},
|
|
21
|
-
mixins: [H],
|
|
22
20
|
props: {
|
|
23
21
|
/**
|
|
24
22
|
* String to use for the input label.
|
|
@@ -55,7 +53,7 @@ const U = {
|
|
|
55
53
|
inputMessages: {
|
|
56
54
|
type: Array,
|
|
57
55
|
default: () => [],
|
|
58
|
-
validator: (
|
|
56
|
+
validator: (t) => O(t)
|
|
59
57
|
},
|
|
60
58
|
/**
|
|
61
59
|
* Show input validation message
|
|
@@ -142,7 +140,7 @@ const U = {
|
|
|
142
140
|
size: {
|
|
143
141
|
type: String,
|
|
144
142
|
default: "md",
|
|
145
|
-
validator: (
|
|
143
|
+
validator: (t) => Object.values(B).includes(t)
|
|
146
144
|
},
|
|
147
145
|
/**
|
|
148
146
|
* Sets the element to which the popover is going to append to.
|
|
@@ -152,7 +150,7 @@ const U = {
|
|
|
152
150
|
appendTo: {
|
|
153
151
|
type: [HTMLElement, String],
|
|
154
152
|
default: "body",
|
|
155
|
-
validator: (
|
|
153
|
+
validator: (t) => P.includes(t) || t instanceof HTMLElement
|
|
156
154
|
},
|
|
157
155
|
/**
|
|
158
156
|
* Named transition when the content display is toggled.
|
|
@@ -274,25 +272,25 @@ const U = {
|
|
|
274
272
|
},
|
|
275
273
|
computed: {
|
|
276
274
|
inputPlaceHolder() {
|
|
277
|
-
var
|
|
278
|
-
return ((
|
|
275
|
+
var t;
|
|
276
|
+
return ((t = this.selectedItems) == null ? void 0 : t.length) > 0 ? "" : this.placeholder;
|
|
279
277
|
},
|
|
280
278
|
chipListeners() {
|
|
281
279
|
return {
|
|
282
|
-
keyup: (
|
|
283
|
-
this.onChipKeyup(
|
|
280
|
+
keyup: (t) => {
|
|
281
|
+
this.onChipKeyup(t), this.$emit("keyup", t);
|
|
284
282
|
}
|
|
285
283
|
};
|
|
286
284
|
},
|
|
287
285
|
inputListeners() {
|
|
288
286
|
return {
|
|
289
|
-
input: (
|
|
290
|
-
this.$emit("input",
|
|
287
|
+
input: (t) => {
|
|
288
|
+
this.$emit("input", t), this.hasSuggestionList && this.showComboboxList();
|
|
291
289
|
},
|
|
292
|
-
keyup: (
|
|
293
|
-
this.onInputKeyup(
|
|
290
|
+
keyup: (t) => {
|
|
291
|
+
this.onInputKeyup(t), this.$emit("keyup", t);
|
|
294
292
|
},
|
|
295
|
-
click: (
|
|
293
|
+
click: (t) => {
|
|
296
294
|
this.hasSuggestionList && this.showComboboxList();
|
|
297
295
|
}
|
|
298
296
|
};
|
|
@@ -324,8 +322,8 @@ const U = {
|
|
|
324
322
|
size: {
|
|
325
323
|
async handler() {
|
|
326
324
|
await this.$nextTick();
|
|
327
|
-
const
|
|
328
|
-
this.revertInputPadding(
|
|
325
|
+
const t = this.getInput();
|
|
326
|
+
this.revertInputPadding(t), this.initialInputHeight = t.getBoundingClientRect().height, this.setInputPadding(), this.setChipsTopPosition();
|
|
329
327
|
}
|
|
330
328
|
}
|
|
331
329
|
},
|
|
@@ -335,36 +333,36 @@ const U = {
|
|
|
335
333
|
}), this.resizeWindowObserver.observe(document.body), this.initSelectedItems();
|
|
336
334
|
},
|
|
337
335
|
beforeUnmount() {
|
|
338
|
-
var
|
|
339
|
-
(
|
|
336
|
+
var t;
|
|
337
|
+
(t = this.resizeWindowObserver) == null || t.unobserve(document.body);
|
|
340
338
|
},
|
|
341
339
|
methods: {
|
|
342
|
-
comboboxHighlight(
|
|
343
|
-
this.$emit("combobox-highlight",
|
|
340
|
+
comboboxHighlight(t) {
|
|
341
|
+
this.$emit("combobox-highlight", t);
|
|
344
342
|
},
|
|
345
343
|
async initSelectedItems() {
|
|
346
344
|
await this.$nextTick(), this.setInputPadding(), this.setChipsTopPosition(), this.setInputMinWidth(), this.checkMaxSelected();
|
|
347
345
|
},
|
|
348
|
-
onChipRemove(
|
|
346
|
+
onChipRemove(t) {
|
|
349
347
|
var i;
|
|
350
|
-
this.$emit("remove",
|
|
348
|
+
this.$emit("remove", t), (i = this.$refs.input) == null || i.focus();
|
|
351
349
|
},
|
|
352
|
-
onComboboxSelect(
|
|
353
|
-
this.loading || (this.value = "", this.$emit("select",
|
|
350
|
+
onComboboxSelect(t) {
|
|
351
|
+
this.loading || (this.value = "", this.$emit("select", t));
|
|
354
352
|
},
|
|
355
353
|
showComboboxList() {
|
|
356
|
-
var
|
|
357
|
-
this.showList == null && ((
|
|
354
|
+
var t;
|
|
355
|
+
this.showList == null && ((t = this.$refs.comboboxWithPopover) == null || t.showComboboxList());
|
|
358
356
|
},
|
|
359
357
|
closeComboboxList() {
|
|
360
|
-
var
|
|
361
|
-
this.showList == null && ((
|
|
358
|
+
var t;
|
|
359
|
+
this.showList == null && ((t = this.$refs.comboboxWithPopover) == null || t.closeComboboxList());
|
|
362
360
|
},
|
|
363
361
|
getChipButtons() {
|
|
364
|
-
return this.$refs.chips && this.$refs.chips.map((
|
|
362
|
+
return this.$refs.chips && this.$refs.chips.map((t) => g(t.$el).querySelector("button"));
|
|
365
363
|
},
|
|
366
364
|
getChips() {
|
|
367
|
-
return this.$refs.chips && this.$refs.chips.map((
|
|
365
|
+
return this.$refs.chips && this.$refs.chips.map((t) => g(t.$el));
|
|
368
366
|
},
|
|
369
367
|
getLastChipButton() {
|
|
370
368
|
return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];
|
|
@@ -376,63 +374,63 @@ const U = {
|
|
|
376
374
|
return this.$refs.chips && this.getChips()[0];
|
|
377
375
|
},
|
|
378
376
|
getInput() {
|
|
379
|
-
var e;
|
|
380
|
-
return (e = this.$refs.input) == null ? void 0 : e.$refs.input;
|
|
381
|
-
},
|
|
382
|
-
onChipKeyup(e) {
|
|
383
377
|
var t;
|
|
384
|
-
|
|
385
|
-
i === "arrowleft" ? this.navigateBetweenChips(e.target, !0) : i === "arrowright" && (e.target.id === this.getLastChipButton().id ? this.moveFromChipToInput() : this.navigateBetweenChips(e.target, !1));
|
|
378
|
+
return (t = this.$refs.input) == null ? void 0 : t.$refs.input;
|
|
386
379
|
},
|
|
387
|
-
|
|
388
|
-
var
|
|
389
|
-
const i = (
|
|
390
|
-
|
|
380
|
+
onChipKeyup(t) {
|
|
381
|
+
var e;
|
|
382
|
+
const i = (e = t.code) == null ? void 0 : e.toLowerCase();
|
|
383
|
+
i === "arrowleft" ? this.navigateBetweenChips(t.target, !0) : i === "arrowright" && (t.target.id === this.getLastChipButton().id ? this.moveFromChipToInput() : this.navigateBetweenChips(t.target, !1));
|
|
391
384
|
},
|
|
392
|
-
|
|
385
|
+
onInputKeyup(t) {
|
|
393
386
|
var e;
|
|
394
|
-
|
|
387
|
+
const i = (e = t.code) == null ? void 0 : e.toLowerCase();
|
|
388
|
+
this.selectedItems.length > 0 && t.target.selectionStart === 0 && (i === "backspace" || i === "arrowleft") && this.moveFromInputToChip();
|
|
389
|
+
},
|
|
390
|
+
moveFromInputToChip() {
|
|
391
|
+
var t;
|
|
392
|
+
this.getLastChipButton().focus(), (t = this.$refs.input) == null || t.blur(), this.closeComboboxList();
|
|
395
393
|
},
|
|
396
394
|
moveFromChipToInput() {
|
|
397
|
-
var
|
|
398
|
-
this.getLastChipButton().blur(), (
|
|
395
|
+
var t;
|
|
396
|
+
this.getLastChipButton().blur(), (t = this.$refs.input) == null || t.focus(), this.showComboboxList();
|
|
399
397
|
},
|
|
400
|
-
navigateBetweenChips(
|
|
398
|
+
navigateBetweenChips(t, i) {
|
|
401
399
|
var s;
|
|
402
|
-
const
|
|
403
|
-
l < 0 || l >= ((s = this.$refs.chips) == null ? void 0 : s.length) || (this.getChipButtons()[
|
|
400
|
+
const e = this.getChipButtons().indexOf(t), l = i ? e - 1 : e + 1;
|
|
401
|
+
l < 0 || l >= ((s = this.$refs.chips) == null ? void 0 : s.length) || (this.getChipButtons()[e].blur(), this.getChipButtons()[l].focus(), this.closeComboboxList());
|
|
404
402
|
},
|
|
405
403
|
setChipsTopPosition() {
|
|
406
|
-
const
|
|
407
|
-
if (!
|
|
408
|
-
const i = this.$refs.inputSlotWrapper,
|
|
409
|
-
l.style.top =
|
|
404
|
+
const t = this.getInput();
|
|
405
|
+
if (!t) return;
|
|
406
|
+
const i = this.$refs.inputSlotWrapper, e = t.getBoundingClientRect().top - i.getBoundingClientRect().top, l = this.$refs.chipsWrapper;
|
|
407
|
+
l.style.top = e - k[this.size] + "px";
|
|
410
408
|
},
|
|
411
409
|
setInputPadding() {
|
|
412
|
-
const
|
|
413
|
-
if (!i || (this.revertInputPadding(i), this.popoverOffset = [0, 4], !
|
|
414
|
-
const l =
|
|
410
|
+
const t = this.getLastChip(), i = this.getInput(), e = this.$refs.chipsWrapper;
|
|
411
|
+
if (!i || (this.revertInputPadding(i), this.popoverOffset = [0, 4], !t) || this.collapseOnFocusOut && !this.inputFocused) return;
|
|
412
|
+
const l = t.offsetLeft + this.getFullWidth(t), s = i.getBoundingClientRect().width - l;
|
|
415
413
|
s > this.reservedRightSpace ? i.style.paddingLeft = l + "px" : i.style.paddingLeft = "4px";
|
|
416
|
-
const o =
|
|
414
|
+
const o = e.getBoundingClientRect().height - 4, u = t.getBoundingClientRect().height - 4, c = s > this.reservedRightSpace ? t.offsetTop + 2 : o + u - 9;
|
|
417
415
|
i.style.paddingTop = `${c}px`;
|
|
418
416
|
},
|
|
419
|
-
revertInputPadding(
|
|
420
|
-
|
|
417
|
+
revertInputPadding(t) {
|
|
418
|
+
t.style.paddingLeft = "", t.style.paddingTop = "", t.style.paddingBottom = "";
|
|
421
419
|
},
|
|
422
|
-
getFullWidth(
|
|
423
|
-
const i = window.getComputedStyle(
|
|
424
|
-
return
|
|
420
|
+
getFullWidth(t) {
|
|
421
|
+
const i = window.getComputedStyle(t);
|
|
422
|
+
return t.offsetWidth + parseInt(i.marginLeft) + parseInt(i.marginRight);
|
|
425
423
|
},
|
|
426
424
|
setInputMinWidth() {
|
|
427
|
-
const
|
|
428
|
-
i && (
|
|
425
|
+
const t = this.getFirstChip(), i = this.getInput();
|
|
426
|
+
i && (t ? i.style.minWidth = this.getFullWidth(t) + 4 + "px" : i.style.minWidth = "");
|
|
429
427
|
},
|
|
430
428
|
checkMaxSelected() {
|
|
431
429
|
this.maxSelected !== 0 && (this.selectedItems.length > this.maxSelected ? (this.showValidationMessages = !0, this.$emit("max-selected")) : this.showValidationMessages = !1);
|
|
432
430
|
},
|
|
433
431
|
setInitialInputHeight() {
|
|
434
|
-
const
|
|
435
|
-
|
|
432
|
+
const t = this.getInput();
|
|
433
|
+
t && (this.initialInputHeight = t.getBoundingClientRect().height);
|
|
436
434
|
},
|
|
437
435
|
async handleInputFocusIn() {
|
|
438
436
|
this.inputFocused = !0, this.collapseOnFocusOut && (this.hideInputText = !1, await this.$nextTick(), this.setInputPadding());
|
|
@@ -440,64 +438,61 @@ const U = {
|
|
|
440
438
|
async handleInputFocusOut() {
|
|
441
439
|
if (this.inputFocused = !1, this.collapseOnFocusOut) {
|
|
442
440
|
this.hideInputText = !0;
|
|
443
|
-
const
|
|
444
|
-
if (!
|
|
441
|
+
const t = this.getInput();
|
|
442
|
+
if (!t || !t.style.paddingTop)
|
|
445
443
|
return;
|
|
446
|
-
this.revertInputPadding(
|
|
444
|
+
this.revertInputPadding(t);
|
|
447
445
|
}
|
|
448
446
|
}
|
|
449
447
|
}
|
|
450
|
-
},
|
|
448
|
+
}, U = { ref: "header" }, j = {
|
|
451
449
|
key: 1,
|
|
452
450
|
class: "d-recipe-combobox-multi-select__list--loading"
|
|
453
|
-
},
|
|
454
|
-
function
|
|
455
|
-
const u = h("dt-chip"), c = h("dt-input"), I = h("dt-validation-messages"),
|
|
456
|
-
return p(), m(
|
|
451
|
+
}, Z = { ref: "footer" };
|
|
452
|
+
function q(t, i, e, l, s, o) {
|
|
453
|
+
const u = h("dt-chip"), c = h("dt-input"), I = h("dt-validation-messages"), w = h("dt-recipe-combobox-with-popover");
|
|
454
|
+
return p(), m(w, {
|
|
457
455
|
ref: "comboboxWithPopover",
|
|
458
|
-
label:
|
|
459
|
-
"show-list":
|
|
460
|
-
"max-height":
|
|
461
|
-
"max-width":
|
|
456
|
+
label: e.label,
|
|
457
|
+
"show-list": e.showList,
|
|
458
|
+
"max-height": e.listMaxHeight,
|
|
459
|
+
"max-width": e.listMaxWidth,
|
|
462
460
|
"popover-offset": s.popoverOffset,
|
|
463
|
-
"has-suggestion-list":
|
|
464
|
-
"visually-hidden-close-label": e.visuallyHiddenCloseLabel,
|
|
465
|
-
"visually-hidden-close": e.visuallyHiddenClose,
|
|
461
|
+
"has-suggestion-list": e.hasSuggestionList,
|
|
466
462
|
"content-width": "anchor",
|
|
467
|
-
"append-to":
|
|
468
|
-
transition:
|
|
463
|
+
"append-to": e.appendTo,
|
|
464
|
+
transition: e.transition,
|
|
469
465
|
onSelect: o.onComboboxSelect,
|
|
470
466
|
onHighlight: o.comboboxHighlight
|
|
471
|
-
},
|
|
472
|
-
input:
|
|
473
|
-
|
|
467
|
+
}, H({
|
|
468
|
+
input: r(({ onInput: S }) => [
|
|
469
|
+
a("span", {
|
|
474
470
|
ref: "inputSlotWrapper",
|
|
475
471
|
class: "d-recipe-combobox-multi-select__input-wrapper",
|
|
476
472
|
onFocusin: i[1] || (i[1] = (...n) => o.handleInputFocusIn && o.handleInputFocusIn(...n)),
|
|
477
473
|
onFocusout: i[2] || (i[2] = (...n) => o.handleInputFocusOut && o.handleInputFocusOut(...n))
|
|
478
474
|
}, [
|
|
479
|
-
|
|
475
|
+
a("span", {
|
|
480
476
|
ref: "chipsWrapper",
|
|
481
|
-
class:
|
|
477
|
+
class: R(["d-recipe-combobox-multi-select__chip-wrapper", o.chipWrapperClass])
|
|
482
478
|
}, [
|
|
483
|
-
(p(!0), f(
|
|
479
|
+
(p(!0), f(z, null, V(e.selectedItems, (n) => (p(), m(u, b({
|
|
484
480
|
ref_for: !0,
|
|
485
481
|
ref: "chips",
|
|
486
482
|
key: n,
|
|
487
483
|
"label-class": ["d-chip__label"],
|
|
488
484
|
class: [
|
|
489
485
|
"d-recipe-combobox-multi-select__chip",
|
|
490
|
-
{ "d-recipe-combobox-multi-select__chip--truncate": !!
|
|
486
|
+
{ "d-recipe-combobox-multi-select__chip--truncate": !!e.chipMaxWidth }
|
|
491
487
|
],
|
|
492
|
-
style: { maxWidth:
|
|
493
|
-
|
|
494
|
-
size: s.CHIP_SIZES[t.size]
|
|
488
|
+
style: { maxWidth: e.chipMaxWidth },
|
|
489
|
+
size: s.CHIP_SIZES[e.size]
|
|
495
490
|
}, C(o.chipListeners), {
|
|
496
|
-
onKeyup:
|
|
497
|
-
onClose: (
|
|
491
|
+
onKeyup: E((v) => o.onChipRemove(n), ["backspace"]),
|
|
492
|
+
onClose: (v) => o.onChipRemove(n)
|
|
498
493
|
}), {
|
|
499
|
-
default:
|
|
500
|
-
|
|
494
|
+
default: r(() => [
|
|
495
|
+
D(y(n), 1)
|
|
501
496
|
]),
|
|
502
497
|
_: 2
|
|
503
498
|
}, 1040, ["class", "style", "size", "onKeyup", "onClose"]))), 128))
|
|
@@ -508,60 +503,60 @@ function $(e, i, t, l, s, o) {
|
|
|
508
503
|
"onUpdate:modelValue": i[0] || (i[0] = (n) => s.value = n),
|
|
509
504
|
class: "d-recipe-combobox-multi-select__input",
|
|
510
505
|
"input-class": [
|
|
511
|
-
|
|
506
|
+
e.inputClass,
|
|
512
507
|
{
|
|
513
508
|
"d-recipe-combobox-multi-select__input--hidden": s.hideInputText
|
|
514
509
|
}
|
|
515
510
|
],
|
|
516
|
-
"input-wrapper-class":
|
|
517
|
-
"aria-label":
|
|
518
|
-
label:
|
|
519
|
-
description:
|
|
511
|
+
"input-wrapper-class": e.inputWrapperClass,
|
|
512
|
+
"aria-label": e.label,
|
|
513
|
+
label: e.labelVisible ? e.label : "",
|
|
514
|
+
description: e.description,
|
|
520
515
|
placeholder: o.inputPlaceHolder,
|
|
521
|
-
"show-messages":
|
|
522
|
-
messages:
|
|
523
|
-
size:
|
|
516
|
+
"show-messages": e.showInputMessages,
|
|
517
|
+
messages: e.inputMessages,
|
|
518
|
+
size: e.size
|
|
524
519
|
}, C(o.inputListeners), { onInput: S }), null, 16, ["modelValue", "input-class", "input-wrapper-class", "aria-label", "label", "description", "placeholder", "show-messages", "messages", "size", "onInput"]),
|
|
525
520
|
x(I, {
|
|
526
|
-
"validation-messages":
|
|
521
|
+
"validation-messages": e.maxSelectedMessage,
|
|
527
522
|
"show-messages": s.showValidationMessages
|
|
528
523
|
}, null, 8, ["validation-messages", "show-messages"])
|
|
529
524
|
], 544)
|
|
530
525
|
]),
|
|
531
|
-
list:
|
|
532
|
-
|
|
526
|
+
list: r(() => [
|
|
527
|
+
a("div", {
|
|
533
528
|
ref: "list",
|
|
534
529
|
class: "d-recipe-combobox-multi-select__list",
|
|
535
|
-
onMousedown: i[3] || (i[3] =
|
|
530
|
+
onMousedown: i[3] || (i[3] = A(() => {
|
|
536
531
|
}, ["prevent"]))
|
|
537
532
|
}, [
|
|
538
|
-
|
|
533
|
+
e.loading ? (p(), f("div", j, y(e.loadingMessage), 1)) : d(t.$slots, "list", { key: 0 })
|
|
539
534
|
], 544)
|
|
540
535
|
]),
|
|
541
536
|
_: 2
|
|
542
537
|
}, [
|
|
543
|
-
s.hasSlotContent(
|
|
538
|
+
s.hasSlotContent(t.$slots.header) ? {
|
|
544
539
|
name: "header",
|
|
545
|
-
fn:
|
|
546
|
-
|
|
547
|
-
d(
|
|
540
|
+
fn: r(() => [
|
|
541
|
+
a("div", U, [
|
|
542
|
+
d(t.$slots, "header")
|
|
548
543
|
], 512)
|
|
549
544
|
]),
|
|
550
545
|
key: "0"
|
|
551
546
|
} : void 0,
|
|
552
|
-
s.hasSlotContent(
|
|
547
|
+
s.hasSlotContent(t.$slots.footer) ? {
|
|
553
548
|
name: "footer",
|
|
554
|
-
fn:
|
|
555
|
-
|
|
556
|
-
d(
|
|
549
|
+
fn: r(() => [
|
|
550
|
+
a("div", Z, [
|
|
551
|
+
d(t.$slots, "footer")
|
|
557
552
|
], 512)
|
|
558
553
|
]),
|
|
559
554
|
key: "1"
|
|
560
555
|
} : void 0
|
|
561
|
-
]), 1032, ["label", "show-list", "max-height", "max-width", "popover-offset", "has-suggestion-list", "
|
|
556
|
+
]), 1032, ["label", "show-list", "max-height", "max-width", "popover-offset", "has-suggestion-list", "append-to", "transition", "onSelect", "onHighlight"]);
|
|
562
557
|
}
|
|
563
|
-
const
|
|
558
|
+
const ot = /* @__PURE__ */ K(N, [["render", q]]);
|
|
564
559
|
export {
|
|
565
|
-
|
|
560
|
+
ot as default
|
|
566
561
|
};
|
|
567
562
|
//# sourceMappingURL=combobox-multi-select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-multi-select.js","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":";;;;;;;;;;;AAwIA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,6BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,sBAAAC;AAAA,EACD;AAAA,EAED,QAAQ,CAACC,CAAsB;AAAA,EAE/B,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,CAAAC,MACFC,EAA2BD,CAAa;AAAA,IAElD;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM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,QAFNE,EAEM,OAFNX,GAEM;AAAA,UADJ+B,EAAsBzB,EAAA,QAAA,QAAA;AAAA;;MAlF9B,KAAA;AAAA,QAAA;AAAA,IA4GYD,EAAc,eAACC,EAAM,OAAC,MAAM;MA5GxC,MA6GO;AAAA,MA7GP,IAAAG,EA+GM,MAEM;AAAA,QAFNE,EAEM,OAFNV,GAEM;AAAA,UADJ8B,EAAsBzB,EAAA,QAAA,QAAA;AAAA;;MAhH9B,KAAA;AAAA,QAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"combobox-multi-select.js","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","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":";;;;;;;;;;AAoIA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,6BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,sBAAAC;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,CAAAC,MACFC,EAA2BD,CAAa;AAAA,IAElD;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;A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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("../combobox/combobox-loading-list.cjs"),y=require("../combobox/combobox-empty-list.cjs"),u=require("../../common/utils/index.cjs"),t=require("vue"),L=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),_=require("../combobox/combobox.cjs"),x=require("../popover/popover.cjs"),w=require("../combobox/combobox-constants.cjs"),h=require("../dropdown/dropdown-constants.cjs"),m=require("../popover/popover-constants.cjs"),C={compatConfig:{MODE:3},name:"DtRecipeComboboxWithPopover",components:{DtCombobox:_.default,DtPopover:x.default,ComboboxLoadingList:S.default,ComboboxEmptyList:y.default},props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:e=>Object.values(w.COMBOBOX_LABEL_SIZES).includes(e)},description:{type:String,default:""},showList:{type:Boolean,default:null},listId:{type:String,default(){return u.getUniqueString()}},listClass:{type:[String,Array,Object],default:""},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},padding:{type:String,default:"small",validator:e=>Object.keys(h.DROPDOWN_PADDING_CLASSES).some(n=>n===e)},contentWidth:{type:String,default:null,validator:e=>m.POPOVER_CONTENT_WIDTHS.includes(e)},openWithArrowKeys:{type:Boolean,default:!1},popoverOffset:{type:Array,default:()=>[0,4]},popoverSticky:{type:[Boolean,String],default:!1},hasSuggestionList:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>m.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["select","escape","highlight","opened"],data(){return{DROPDOWN_PADDING_CLASSES:h.DROPDOWN_PADDING_CLASSES,isListShown:!1,isInputFocused:!1,isListFocused:!1,externalAnchor:u.getUniqueString(),hasSlotContent:u.hasSlotContent}},computed:{comboboxListeners(){return{...this.$attrs,onSelect:this.onSelect,onEscape:this.onEscape,onHighlight:this.onHighlight}}},watch:{showList:{handler:function(e){e!==null&&(this.isListShown=e)},immediate:!0},isListShown(e){e?window.addEventListener("mousedown",this.onFocusOut):window.removeEventListener("mousedown",this.onFocusOut),this.onOpened(e)}},methods:{handleDisplayList(e){!this.hasSuggestionList&&e&&this.showComboboxList(),!this.hasSuggestionList&&!e&&this.closeComboboxList()},showComboboxList(){this.showList==null&&(this.isListShown=!0)},closeComboboxList(){this.showList==null&&(this.isListShown=!1)},onSelect(e){this.loading||(this.$emit("select",e),this.hasSuggestionList||this.closeComboboxList())},onEscape(){this.$emit("escape"),this.closeComboboxList()},onHighlight(e){this.loading||this.$emit("highlight",e)},onOpened(e){this.$emit("opened",e)},onFocusIn(e){var n;this.hasSuggestionList&&e&&((n=this.$refs.input)==null?void 0:n.querySelector("input"))===e.target&&this.showComboboxList()},onFocusOut(e){var r,i,s;const n=(i=(r=this.$refs.popover)==null?void 0:r.tip)==null?void 0:i.popper,o=this.$refs.input;(s=e.composedPath())!=null&&s.some(a=>[n,o].includes(a))||this.closeComboboxList()},openOnArrowKeyPress(){this.showList!==null||this.isListShown||!this.openWithArrowKeys||this.showComboboxList()}}},v=["id"],O={ref:"header"},E=["onMouseleave","onFocusout"],P={ref:"footer"};function D(e,n,o,r,i,s){const a=t.resolveComponent("combobox-loading-list"),p=t.resolveComponent("combobox-empty-list"),b=t.resolveComponent("dt-popover"),f=t.resolveComponent("dt-combobox");return t.openBlock(),t.createBlock(f,t.mergeProps({ref:"combobox",loading:o.loading,label:o.label,"label-visible":o.labelVisible,size:o.size,description:o.description,"empty-list":o.emptyList,"empty-state-message":o.emptyStateMessage,"show-list":i.isListShown,"on-beginning-of-list":o.onBeginningOfList,"on-end-of-list":o.onEndOfList,"list-rendered-outside":!0,"list-id":o.listId,"data-qa":"dt-combobox"},s.comboboxListeners),{input:t.withCtx(({inputProps:d})=>[t.createElementVNode("div",{id:i.externalAnchor,ref:"input",onFocusin:n[0]||(n[0]=(...l)=>s.onFocusIn&&s.onFocusIn(...l)),onKeydown:[n[1]||(n[1]=t.withKeys(l=>s.openOnArrowKeyPress(l),["up"])),n[2]||(n[2]=t.withKeys(l=>s.openOnArrowKeyPress(l),["down"]))]},[t.renderSlot(e.$slots,"input",{inputProps:d,onInput:s.handleDisplayList})],40,v)]),list:t.withCtx(({opened:d,listProps:l,clearHighlightIndex:c})=>[t.createVNode(b,{ref:"popover",open:i.isListShown,"onUpdate:open":n[3]||(n[3]=g=>i.isListShown=g),"hide-on-click":!1,"max-height":o.maxHeight,"max-width":o.maxWidth,offset:o.popoverOffset,sticky:o.popoverSticky,placement:"bottom-start","initial-focus-element":"none",padding:"none",role:"listbox","external-anchor":i.externalAnchor,"content-width":o.contentWidth,"content-appear":!0,"content-tabindex":null,modal:!1,"auto-focus":!1,"append-to":o.appendTo,transition:o.transition,onOpened:d},t.createSlots({content:t.withCtx(()=>[t.createElementVNode("div",{ref:"listWrapper",class:t.normalizeClass(["d-recipe-combobox-with-popover__list",i.DROPDOWN_PADDING_CLASSES[o.padding],o.listClass]),onMouseleave:c,onFocusout:c},[o.loading?(t.openBlock(),t.createBlock(a,t.normalizeProps(t.mergeProps({key:0},l)),null,16)):o.emptyList&&o.emptyStateMessage?(t.openBlock(),t.createBlock(p,t.mergeProps({key:1},l,{message:o.emptyStateMessage}),null,16,["message"])):t.renderSlot(e.$slots,"list",{key:2,listProps:l})],42,E)]),_:2},[i.hasSlotContent(e.$slots.header)?{name:"headerContent",fn:t.withCtx(()=>[t.createElementVNode("div",O,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,i.hasSlotContent(e.$slots.footer)?{name:"footerContent",fn:t.withCtx(()=>[t.createElementVNode("div",P,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["open","max-height","max-width","offset","sticky","external-anchor","content-width","append-to","transition","onOpened"])]),_:3},16,["loading","label","label-visible","size","description","empty-list","empty-state-message","show-list","on-beginning-of-list","on-end-of-list","list-id"])}const A=L._(C,[["render",D]]);exports.default=A;
|
|
2
2
|
//# sourceMappingURL=combobox-with-popover.cjs.map
|