@dialpad/dialtone 9.123.2 → 9.125.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 +12 -5
- package/dist/css/dialtone-default-theme.css +414 -77
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone-docs.json +1 -1
- package/dist/css/dialtone.css +188 -68
- package/dist/css/dialtone.min.css +1 -1
- package/dist/css/svg/spot/playlist.svg +1 -0
- package/dist/css/vue/spot/SpotPlaylist.vue +3 -0
- package/dist/tokens/doc.json +24348 -24348
- package/dist/vue2/common/mixins/index.cjs +1 -1
- package/dist/vue2/common/mixins/index.js +10 -10
- package/dist/vue2/common/mixins/localization.cjs +2 -0
- package/dist/vue2/common/mixins/localization.cjs.map +1 -0
- package/dist/vue2/common/mixins/localization.js +10 -0
- package/dist/vue2/common/mixins/localization.js.map +1 -0
- package/dist/vue2/common/utils/index.cjs +1 -1
- package/dist/vue2/common/utils/index.cjs.map +1 -1
- package/dist/vue2/common/utils/index.js +43 -39
- package/dist/vue2/common/utils/index.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +1 -1
- package/dist/vue2/dialtone-vue.js +341 -340
- package/dist/vue2/dialtone-vue.js.map +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +61 -86
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
- package/dist/vue2/lib/banner/banner.cjs +2 -2
- package/dist/vue2/lib/banner/banner.cjs.map +1 -1
- package/dist/vue2/lib/banner/banner.js +25 -33
- package/dist/vue2/lib/banner/banner.js.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +14 -12
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/vue2/lib/button/button.cjs +1 -1
- package/dist/vue2/lib/button/button.cjs.map +1 -1
- package/dist/vue2/lib/button/button.js +11 -9
- package/dist/vue2/lib/button/button.js.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +19 -25
- 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 +18 -21
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue2/lib/chip/chip.cjs +1 -1
- package/dist/vue2/lib/chip/chip.cjs.map +1 -1
- package/dist/vue2/lib/chip/chip.js +24 -29
- package/dist/vue2/lib/chip/chip.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.cjs +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.js +2 -2
- package/dist/vue2/lib/combobox/combobox-constants.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-empty-list.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-loading-list.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox.cjs +2 -2
- package/dist/vue2/lib/combobox/combobox.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox.js +12 -12
- package/dist/vue2/lib/combobox/combobox.js.map +1 -1
- package/dist/vue2/lib/combobox/index.cjs +1 -1
- package/dist/vue2/lib/combobox/index.js +3 -3
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +19 -20
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +22 -24
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +40 -36
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
- package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
- package/dist/vue2/lib/contact-row/contact-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-row/contact-row.js +11 -25
- package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.cjs +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.js +2 -3
- package/dist/vue2/lib/datepicker/datepicker-constants.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 +143 -229
- package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue2/lib/datepicker/utils.cjs +1 -1
- package/dist/vue2/lib/datepicker/utils.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/utils.js +12 -11
- package/dist/vue2/lib/datepicker/utils.js.map +1 -1
- package/dist/vue2/lib/description-list/description-list.cjs +1 -1
- package/dist/vue2/lib/description-list/description-list.cjs.map +1 -1
- package/dist/vue2/lib/description-list/description-list.js +8 -8
- package/dist/vue2/lib/description-list/description-list.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 +48 -50
- package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
- package/dist/vue2/lib/editor/editor.cjs +1 -1
- package/dist/vue2/lib/editor/editor.cjs.map +1 -1
- package/dist/vue2/lib/editor/editor.js +78 -87
- package/dist/vue2/lib/editor/editor.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js +6 -19
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.js +106 -145
- package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/index.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/index.js +6 -7
- package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row-constants.js +5 -7
- package/dist/vue2/lib/emoji-row/emoji-row-constants.js.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.js +31 -22
- package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +20 -22
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs.map +1 -1
- package/dist/vue2/lib/general-row/general-row.js +63 -52
- package/dist/vue2/lib/general-row/general-row.js.map +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs.map +1 -1
- package/dist/vue2/lib/group-row/group-row.js +43 -32
- package/dist/vue2/lib/group-row/group-row.js.map +1 -1
- package/dist/vue2/lib/icon/icon-constants.cjs.map +1 -1
- package/dist/vue2/lib/icon/icon-constants.js.map +1 -1
- package/dist/vue2/lib/icon/icon.cjs +1 -1
- package/dist/vue2/lib/icon/icon.cjs.map +1 -1
- package/dist/vue2/lib/icon/icon.js +12 -8
- package/dist/vue2/lib/icon/icon.js.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.js +30 -31
- package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.js +24 -24
- package/dist/vue2/lib/ivr-node/ivr-node-constants.js.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.js +38 -36
- package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-link.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input-link.js +48 -23
- package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.js +50 -22
- package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input.js +112 -143
- package/dist/vue2/lib/message-input/message-input.js.map +1 -1
- package/dist/vue2/lib/modal/modal.cjs +1 -2
- package/dist/vue2/lib/modal/modal.cjs.map +1 -1
- package/dist/vue2/lib/modal/modal.js +25 -42
- package/dist/vue2/lib/modal/modal.js.map +1 -1
- package/dist/vue2/lib/notice/notice-action.cjs +1 -1
- package/dist/vue2/lib/notice/notice-action.cjs.map +1 -1
- package/dist/vue2/lib/notice/notice-action.js +19 -26
- package/dist/vue2/lib/notice/notice-action.js.map +1 -1
- package/dist/vue2/lib/notice/notice.cjs +1 -1
- package/dist/vue2/lib/notice/notice.cjs.map +1 -1
- package/dist/vue2/lib/notice/notice.js +18 -27
- package/dist/vue2/lib/notice/notice.js.map +1 -1
- package/dist/vue2/lib/pagination/pagination.cjs +1 -1
- package/dist/vue2/lib/pagination/pagination.cjs.map +1 -1
- package/dist/vue2/lib/pagination/pagination.js +49 -58
- package/dist/vue2/lib/pagination/pagination.js.map +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.cjs.map +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.js +24 -26
- package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
- package/dist/vue2/lib/popover/popover.cjs +1 -1
- package/dist/vue2/lib/popover/popover.cjs.map +1 -1
- package/dist/vue2/lib/popover/popover.js +26 -35
- package/dist/vue2/lib/popover/popover.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +5 -5
- 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 +330 -320
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
- package/dist/vue2/lib/time-pill/time-pill.cjs.map +1 -1
- package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
- package/dist/vue2/lib/toast/toast.cjs +1 -1
- package/dist/vue2/lib/toast/toast.cjs.map +1 -1
- package/dist/vue2/lib/toast/toast.js +64 -97
- package/dist/vue2/lib/toast/toast.js.map +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.cjs.map +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.js +27 -18
- package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
- package/dist/vue2/localization/en-US.cjs +185 -0
- package/dist/vue2/localization/en-US.cjs.map +1 -0
- package/dist/vue2/localization/en-US.js +188 -0
- package/dist/vue2/localization/en-US.js.map +1 -0
- package/dist/vue2/localization/es-LA.cjs +169 -0
- package/dist/vue2/localization/es-LA.cjs.map +1 -0
- package/dist/vue2/localization/es-LA.js +172 -0
- package/dist/vue2/localization/es-LA.js.map +1 -0
- package/dist/vue2/localization/index.cjs +1176 -0
- package/dist/vue2/localization/index.cjs.map +1 -0
- package/dist/vue2/localization/index.js +1239 -0
- package/dist/vue2/localization/index.js.map +1 -0
- package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
- package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
- package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
- package/dist/vue2/shared/sr_only_close_button.cjs.map +1 -1
- package/dist/vue2/shared/sr_only_close_button.js +19 -22
- package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
- package/dist/vue2/types/common/mixins/index.d.ts +1 -1
- package/dist/vue2/types/common/mixins/localization.d.ts +8 -0
- package/dist/vue2/types/common/mixins/localization.d.ts.map +1 -0
- package/dist/vue2/types/common/sr_only_close_button.vue.d.ts +7 -13
- package/dist/vue2/types/common/sr_only_close_button.vue.d.ts.map +1 -1
- package/dist/vue2/types/common/utils/index.d.ts +1 -0
- package/dist/vue2/types/common/utils/index.d.ts.map +1 -1
- package/dist/vue2/types/components/banner/banner.vue.d.ts +0 -33
- package/dist/vue2/types/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts +5 -1
- package/dist/vue2/types/components/button/button.vue.d.ts +6 -2
- package/dist/vue2/types/components/chip/chip.vue.d.ts +8 -18
- package/dist/vue2/types/components/combobox/combobox_constants.d.ts +2 -2
- package/dist/vue2/types/components/combobox/index.d.ts +1 -1
- package/dist/vue2/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts +0 -1
- package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts +5 -17
- package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts +8 -48
- package/dist/vue2/types/components/datepicker/utils.d.ts +1 -0
- package/dist/vue2/types/components/datepicker/utils.d.ts.map +1 -1
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts +0 -24
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts +5 -1
- package/dist/vue2/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
- package/dist/vue2/types/components/icon/icon.vue.d.ts +1 -0
- package/dist/vue2/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +5 -8
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/modal/modal.vue.d.ts +3 -33
- package/dist/vue2/types/components/notice/notice.vue.d.ts +1 -34
- package/dist/vue2/types/components/notice/notice.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts +3 -31
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts +9 -26
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/popover/popover.vue.d.ts +0 -33
- package/dist/vue2/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +8 -11
- package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +15 -2
- 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 +1 -43
- package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
- package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/toast.vue.d.ts +3 -111
- package/dist/vue2/types/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/vue2/types/index.d.ts +1 -0
- package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +7 -13
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +7 -12
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +8 -10
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -25
- package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
- package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +5 -41
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +8 -26
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +20 -61
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -1
- package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +9 -12
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +8 -2
- package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +15 -90
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +14 -2
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +14 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +10 -11
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +21 -37
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts +9 -18
- package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +7 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- 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 +3 -2
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/package.json +4 -3
- package/dist/vue2/common/mixins/sr-only-close-button.cjs +0 -3
- package/dist/vue2/common/mixins/sr-only-close-button.cjs.map +0 -1
- package/dist/vue2/common/mixins/sr-only-close-button.js +0 -44
- package/dist/vue2/common/mixins/sr-only-close-button.js.map +0 -1
- package/dist/vue2/lib/contact-row/contact-row-constants.cjs +0 -2
- package/dist/vue2/lib/contact-row/contact-row-constants.cjs.map +0 -1
- package/dist/vue2/lib/contact-row/contact-row-constants.js +0 -5
- package/dist/vue2/lib/contact-row/contact-row-constants.js.map +0 -1
- package/dist/vue2/lib/emoji/emoji-constants.cjs +0 -2
- package/dist/vue2/lib/emoji/emoji-constants.cjs.map +0 -1
- package/dist/vue2/lib/emoji/emoji-constants.js +0 -5
- package/dist/vue2/lib/emoji/emoji-constants.js.map +0 -1
- package/dist/vue2/lib/group-row/group-row-constants.cjs +0 -2
- package/dist/vue2/lib/group-row/group-row-constants.cjs.map +0 -1
- package/dist/vue2/lib/group-row/group-row-constants.js +0 -8
- package/dist/vue2/lib/group-row/group-row-constants.js.map +0 -1
- package/dist/vue2/lib/time-pill/time-pill-constants.cjs +0 -2
- package/dist/vue2/lib/time-pill/time-pill-constants.cjs.map +0 -1
- package/dist/vue2/lib/time-pill/time-pill-constants.js +0 -8
- package/dist/vue2/lib/time-pill/time-pill-constants.js.map +0 -1
- package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts +0 -30
- package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
- package/dist/vue2/types/components/emoji/emoji_constants.d.ts +0 -3
- package/dist/vue2/types/components/emoji/emoji_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
- package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
- package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { FEED_ITEM_PILL_BORDER_COLORS as
|
|
1
|
+
import { FEED_ITEM_PILL_BORDER_COLORS as r } from "./feed-item-pill-constants.js";
|
|
2
2
|
import { DtIconChevronDown as i, DtIconChevronRight as n } from "@dialpad/dialtone-icons/vue2";
|
|
3
3
|
import { n as s } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
|
|
4
4
|
import a from "../item-layout/item-layout.js";
|
|
5
|
-
import
|
|
5
|
+
import c from "../collapsible/collapsible.js";
|
|
6
|
+
import d from "../../common/mixins/localization.js";
|
|
6
7
|
const u = {
|
|
7
8
|
name: "DtRecipeFeedItemPill",
|
|
8
|
-
components: { DtItemLayout: a, DtCollapsible:
|
|
9
|
+
components: { DtItemLayout: a, DtCollapsible: c },
|
|
10
|
+
mixins: [d],
|
|
9
11
|
props: {
|
|
10
12
|
/**
|
|
11
13
|
* Bolded primary text
|
|
@@ -28,13 +30,6 @@ const u = {
|
|
|
28
30
|
type: [String, Array, Object],
|
|
29
31
|
default: ""
|
|
30
32
|
},
|
|
31
|
-
/**
|
|
32
|
-
* Aria label for feed pill
|
|
33
|
-
*/
|
|
34
|
-
ariaLabel: {
|
|
35
|
-
type: String,
|
|
36
|
-
required: !0
|
|
37
|
-
},
|
|
38
33
|
/**
|
|
39
34
|
* Sets whether the pill can be toggled (Icon changing on hover, expanding and collapsing, pointer)
|
|
40
35
|
*/
|
|
@@ -53,7 +48,7 @@ const u = {
|
|
|
53
48
|
borderColor: {
|
|
54
49
|
type: String,
|
|
55
50
|
default: "default",
|
|
56
|
-
validator: (
|
|
51
|
+
validator: (o) => Object.keys(r).includes(o)
|
|
57
52
|
}
|
|
58
53
|
},
|
|
59
54
|
data() {
|
|
@@ -73,7 +68,10 @@ const u = {
|
|
|
73
68
|
return this.toggleable ? "d-recipe-feed-item-pill--toggleable" : "";
|
|
74
69
|
},
|
|
75
70
|
borderClass() {
|
|
76
|
-
return
|
|
71
|
+
return r[this.borderColor];
|
|
72
|
+
},
|
|
73
|
+
anchorTitle() {
|
|
74
|
+
return this.i18n.$t("DIALTONE_FEED_ITEM_PILL_ARIA_LABEL");
|
|
77
75
|
}
|
|
78
76
|
},
|
|
79
77
|
methods: {
|
|
@@ -82,16 +80,16 @@ const u = {
|
|
|
82
80
|
}
|
|
83
81
|
}
|
|
84
82
|
};
|
|
85
|
-
var
|
|
83
|
+
var p = function() {
|
|
86
84
|
var e = this, t = e._self._c;
|
|
87
85
|
return t("div", { class: ["d-recipe-feed-item-pill__border", e.borderClass, e.wrapperClass] }, [t("div", { staticClass: "d-recipe-feed-item-pill__wrapper" }, [t("dt-collapsible", { attrs: { open: e.expanded }, scopedSlots: e._u([{ key: "anchor", fn: function() {
|
|
88
|
-
return [t("button", { class: ["d-recipe-feed-item-pill__button", e.toggleableClass, e.buttonClass], attrs: { "data-qa": "dt-recipe-feed-item-pill", "aria-label": e.
|
|
86
|
+
return [t("button", { class: ["d-recipe-feed-item-pill__button", e.toggleableClass, e.buttonClass], attrs: { "data-qa": "dt-recipe-feed-item-pill", "aria-label": e.anchorTitle, title: e.anchorTitle }, on: { focusin: function(l) {
|
|
89
87
|
e.hover = !0;
|
|
90
|
-
}, focusout: function(
|
|
88
|
+
}, focusout: function(l) {
|
|
91
89
|
e.hover = !1;
|
|
92
|
-
}, mouseenter: function(
|
|
90
|
+
}, mouseenter: function(l) {
|
|
93
91
|
e.hover = !0;
|
|
94
|
-
}, mouseleave: function(
|
|
92
|
+
}, mouseleave: function(l) {
|
|
95
93
|
e.hover = !1;
|
|
96
94
|
}, click: e.onClick } }, [t("dt-item-layout", { staticClass: "d-recipe-feed-item-pill__layout", attrs: { unstyled: "" }, scopedSlots: e._u([{ key: "left", fn: function() {
|
|
97
95
|
return [t("div", { staticClass: "d-recipe-feed-item-pill__icon", attrs: { "data-qa": "dt-recipe-feed-item-pill__icon" } }, [e.showChevronIcon ? t(e.toggleIcon, { tag: "component", attrs: { size: "300" } }) : e._t("leftIcon", null, { iconSize: "300" })], 2)];
|
|
@@ -107,13 +105,13 @@ var c = function() {
|
|
|
107
105
|
}, proxy: !0 }, e.$slots.content ? { key: "content", fn: function() {
|
|
108
106
|
return [t("div", { staticClass: "d-recipe-feed-item-pill__content" }, [e._t("content")], 2)];
|
|
109
107
|
}, proxy: !0 } : null], null, !0) })], 1)]);
|
|
110
|
-
},
|
|
108
|
+
}, f = [], _ = /* @__PURE__ */ s(
|
|
111
109
|
u,
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
p,
|
|
111
|
+
f
|
|
114
112
|
);
|
|
115
|
-
const
|
|
113
|
+
const y = _.exports;
|
|
116
114
|
export {
|
|
117
|
-
|
|
115
|
+
y as default
|
|
118
116
|
};
|
|
119
117
|
//# sourceMappingURL=feed-item-pill.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed-item-pill.js","sources":["../../../recipes/conversation_view/feed_item_pill/feed_item_pill.vue"],"sourcesContent":["<template>\n <div :class=\"['d-recipe-feed-item-pill__border', borderClass, wrapperClass]\">\n <div class=\"d-recipe-feed-item-pill__wrapper\">\n <dt-collapsible :open=\"expanded\">\n <template #anchor>\n <button\n data-qa=\"dt-recipe-feed-item-pill\"\n :
|
|
1
|
+
{"version":3,"file":"feed-item-pill.js","sources":["../../../recipes/conversation_view/feed_item_pill/feed_item_pill.vue"],"sourcesContent":["<template>\n <div :class=\"['d-recipe-feed-item-pill__border', borderClass, wrapperClass]\">\n <div class=\"d-recipe-feed-item-pill__wrapper\">\n <dt-collapsible :open=\"expanded\">\n <template #anchor>\n <button\n data-qa=\"dt-recipe-feed-item-pill\"\n :class=\"['d-recipe-feed-item-pill__button', toggleableClass, buttonClass]\"\n :aria-label=\"anchorTitle\"\n :title=\"anchorTitle\"\n @focusin=\"hover = true\"\n @focusout=\"hover = false\"\n @mouseenter=\"hover = true\"\n @mouseleave=\"hover = false\"\n @click=\"onClick\"\n >\n <dt-item-layout\n class=\"d-recipe-feed-item-pill__layout\"\n unstyled\n >\n <slot name=\"title\">\n <span class=\"d-recipe-feed-item-pill__title\">{{ title }}</span>\n </slot>\n <template #left>\n <div\n class=\"d-recipe-feed-item-pill__icon\"\n data-qa=\"dt-recipe-feed-item-pill__icon\"\n >\n <component\n :is=\"toggleIcon\"\n v-if=\"showChevronIcon\"\n size=\"300\"\n />\n <!-- @slot Slot for left icon, icon-size slot prop defaults to '300' -->\n <slot\n v-else\n name=\"leftIcon\"\n :icon-size=\"'300'\"\n />\n </div>\n </template>\n <template\n v-if=\"$slots.subtitle\"\n #subtitle\n >\n <div class=\"d-recipe-feed-item-pill__subtitle\">\n <slot name=\"subtitle\" />\n </div>\n </template>\n <template\n v-if=\"$slots.bottom\"\n #bottom\n >\n <div class=\"d-recipe-feed-item-pill__bottom\">\n <slot name=\"bottom\" />\n </div>\n </template>\n <template\n v-if=\"$slots.right\"\n #right\n >\n <div class=\"d-recipe-feed-item-pill__right\">\n <slot name=\"right\" />\n </div>\n </template>\n </dt-item-layout>\n </button>\n </template>\n <template\n v-if=\"$slots.content\"\n #content\n >\n <div class=\"d-recipe-feed-item-pill__content\">\n <slot name=\"content\" />\n </div>\n </template>\n </dt-collapsible>\n </div>\n </div>\n</template>\n\n<script>\nimport { FEED_ITEM_PILL_BORDER_COLORS } from './feed_item_pill_constants';\nimport { DtItemLayout } from '@/components/item_layout';\nimport { DtCollapsible } from '@/components/collapsible';\nimport { DtIconChevronDown, DtIconChevronRight } from '@dialpad/dialtone-icons/vue2';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeFeedItemPill',\n\n components: { DtItemLayout, DtCollapsible },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n /**\n * Bolded primary text\n */\n title: {\n type: String,\n default: () => '',\n },\n\n /**\n * Additional styling around the pill\n */\n wrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional styling for the pill\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Sets whether the pill can be toggled (Icon changing on hover, expanding and collapsing, pointer)\n */\n toggleable: {\n type: Boolean,\n default: () => true,\n },\n\n defaultToggled: {\n type: Boolean,\n default: () => false,\n },\n\n /**\n * Callbox border color\n * @values default, ai, critical\n */\n borderColor: {\n type: String,\n default: 'default',\n validator: (color) => Object.keys(FEED_ITEM_PILL_BORDER_COLORS).includes(color),\n },\n },\n\n data () {\n return {\n hover: false,\n expanded: this.defaultToggled,\n };\n },\n\n computed: {\n toggleIcon () {\n return this.expanded ? DtIconChevronDown : DtIconChevronRight;\n },\n\n showChevronIcon () {\n return this.toggleable && this.hover;\n },\n\n toggleableClass () {\n return this.toggleable ? 'd-recipe-feed-item-pill--toggleable' : '';\n },\n\n borderClass () {\n return FEED_ITEM_PILL_BORDER_COLORS[this.borderColor];\n },\n\n anchorTitle () {\n return this.i18n.$t('DIALTONE_FEED_ITEM_PILL_ARIA_LABEL');\n },\n },\n\n methods: {\n onClick () {\n if (!this.toggleable) return;\n\n this.expanded = !this.expanded;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtItemLayout","DtCollapsible","DtLocalizationMixin","color","FEED_ITEM_PILL_BORDER_COLORS","DtIconChevronDown","DtIconChevronRight"],"mappings":";;;;;;AAwFA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,cAAAC,GAAA,eAAAC,EAAA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAA,KAAAC,CAAA,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,aAAA;AACA,aAAA,KAAA,WAAAE,IAAAC;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAA,KAAA,cAAA,KAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAA,KAAA,aAAA,wCAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,aAAAF,EAAA,KAAA,WAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,aAAA,KAAA,KAAA,GAAA,oCAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,UAAA;AACA,MAAA,KAAA,eAEA,KAAA,WAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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 n=require("./general-row-constants.cjs"),c=require("@dialpad/dialtone-icons/vue2"),_=require("./leftbar-general-row-icon.cjs"),p=require("../../common/utils/index.cjs"),h=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),f=require("../emoji-text-wrapper/emoji-text-wrapper.cjs"),b=require("../badge/badge.cjs"),C=require("../button/button.cjs"),T=require("../tooltip/tooltip.cjs"),E=require("../../common/mixins/localization.cjs"),w={name:"DtRecipeGeneralRow",components:{DtEmojiTextWrapper:f.default,DtBadge:b.default,DtButton:C.default,DtTooltip:T.default,DtIconPhone:c.DtIconPhone,DtIconWaveform:c.DtIconWaveform,DtRecipeLeftbarGeneralRowIcon:_.default},mixins:[E.default],inheritAttrs:!1,props:{type:{type:String,default:"inbox",validator:a=>Object.values(n.LEFTBAR_GENERAL_ROW_TYPES).includes(a)},ariaLabel:{type:String,default:""},description:{type:String,required:!0},color:{type:String,default:null,validator:a=>Object.keys(n.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(a)},channelSetting:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},unreadCount:{type:String,default:null},unreadMentionCount:{type:String,default:null},selected:{type:Boolean,default:!1},muted:{type:Boolean,default:!1},activeVoiceChat:{type:Boolean,default:!1},dndText:{type:String,default:""},hasCallButton:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1},iconSize:{type:String,default:"300",validator:a=>n.LEFTBAR_GENERAL_ROW_ICON_SIZES.includes(a)}},emits:["click","call"],data(){return{actionFocused:!1,labelWidth:"100%"}},computed:{leftbarGeneralRowClasses(){return["d-recipe-leftbar-row",{"d-recipe-leftbar-row--no-action":!this.hasCallButton,"d-recipe-leftbar-row--has-unread":this.hasUnreads,"d-recipe-leftbar-row__unread-count":this.showUnreadCount||this.showUnreadMentionCount,"d-recipe-leftbar-row--selected":this.selected,"d-recipe-leftbar-row--muted":this.muted,"d-recipe-leftbar-row--action-focused":this.actionFocused}]},getIcon(){switch(this.type){case n.LEFTBAR_GENERAL_ROW_TYPES.CHANNELS:if(this.hasUnreads)return"channel unread";break;case n.LEFTBAR_GENERAL_ROW_TYPES.LOCKED_CHANNEL:if(this.hasUnreads)return"locked channel unread";break}return this.type},getAriaLabel(){return this.ariaLabel?this.ariaLabel:p.safeConcatStrings([this.typingTooltip,this.description,this.unreadCountTooltip,this.dndTextTooltip,this.activeVoiceChatTooltip])},hasActions(){return this.dndText||this.activeVoiceChat||this.showUnreadCount||this.hasCallButton||this.showUnreadMentionCount},showUnreadCount(){return!!this.unreadCount&&this.hasUnreads},showUnreadMentionCount(){return!!this.unreadMentionCount&&this.hasUnreads},hasUnreadCount(){return this.unreadCount!==null},hasUnreadMentionCount(){return this.unreadMentionCount!==null},shouldApplyCustomStyleForCountBadge(){return this.hasUnreadCount&&this.hasUnreadMentionCount},shouldApplyCustomStyleForMentionOnly(){return this.channelSetting==="always"&&!this.hasUnreadCount&&this.hasUnreadMentionCount},messageCount(){return isNaN(this.unreadCount)?this.unreadCount:Number(this.unreadCount)},mentionCount(){return isNaN(this.unreadMentionCount)?this.unreadMentionCount:Number(this.unreadMentionCount)},unreadCountTooltip(){return p.safeConcatStrings([this.unreadCount&&this.i18n.$t("DIALTONE_UNREAD_MESSAGE_COUNT_TEXT",{unreadCount:this.messageCount}),this.unreadMentionCount&&this.i18n.$t("DIALTONE_UNREAD_MENTION_COUNT_TEXT",{unreadCount:this.mentionCount})])},dndTextTooltip(){return this.dndText&&this.i18n.$t("DIALTONE_GENERAL_ROW_DND_TEXT_TOOLTIP")},activeVoiceChatTooltip(){return this.activeVoiceChat&&this.i18n.$t("DIALTONE_GENERAL_ROW_ACTIVE_VOICE_CHAT_TEXT")},callButtonTooltip(){return this.i18n.$t("DIALTONE_GENERAL_ROW_CALL_BUTTON_TOOLTIP")},typingTooltip(){return this.isTyping&&this.i18n.$t("DIALTONE_TYPING_TEXT")}},watch:{$props:{immediate:!0,deep:!0,async handler(){this.validateProps(),await this.$nextTick(),this.adjustLabelWidth()}}},mounted(){this.resizeObserver=new ResizeObserver(this.adjustLabelWidth),this.resizeObserver.observe(this.$el),this.adjustLabelWidth()},beforeDestroy:function(){this.resizeObserver.disconnect()},methods:{validateProps(){this.type===n.LEFTBAR_GENERAL_ROW_TYPES.CONTACT_CENTER&&!Object.keys(n.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(this.color)&&console.error(n.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR)},adjustLabelWidth(){var i,o,s,l,d,u;const a=((o=(i=this.$el)==null?void 0:i.querySelector(".d-recipe-leftbar-row__primary"))==null?void 0:o.clientWidth)||0,t=((l=(s=this.$el)==null?void 0:s.querySelector(".d-recipe-leftbar-row__omega"))==null?void 0:l.clientWidth)||0,e=((u=(d=this.$el)==null?void 0:d.querySelector(".d-recipe-leftbar-row__alpha"))==null?void 0:u.clientWidth)||0,r=16;this.labelWidth=a-(t+e+r)+"px"}}};var y=function(){var t=this,e=t._self._c;return e("div",{class:t.leftbarGeneralRowClasses,attrs:{"data-qa":"dt-recipe-leftbar-row"}},[e("a",t._g(t._b({staticClass:"d-recipe-leftbar-row__primary",attrs:{"data-qa":"data-qa"in t.$attrs?t.$attrs["data-qa"]:"d-recipe-leftbar-row-link","aria-label":t.getAriaLabel,title:t.description,href:"href"in t.$attrs?t.$attrs.href:"javascript:void(0)"}},"a",t.$attrs,!1),t.$listeners),[e("div",{staticClass:"d-recipe-leftbar-row__alpha"},[t.isTyping?e("div",{directives:[{name:"dt-tooltip",rawName:"v-dt-tooltip",value:t.typingTooltip,expression:"typingTooltip"}],staticClass:"d-recipe-leftbar-row__is-typing"},[e("span"),e("span"),e("span")]):t._t("left",function(){return[e("dt-recipe-leftbar-general-row-icon",{attrs:{type:t.getIcon,color:t.color,"icon-size":t.iconSize,"data-qa":"dt-recipe-leftbar-row-icon"}})]})],2),e("div",{staticClass:"d-recipe-leftbar-row__label",style:`flex-basis: ${t.labelWidth}`},[t._t("label",function(){return[e("dt-emoji-text-wrapper",{staticClass:"d-recipe-leftbar-row__description",attrs:{"data-qa":"dt-recipe-leftbar-row-description",size:"200"}},[t._v(" "+t._s(t.description)+" ")])]})],2)]),t.hasActions?e("div",{staticClass:"d-recipe-leftbar-row__omega"},[t.dndText?e("dt-tooltip",{attrs:{placement:"top",message:t.dndTextTooltip},scopedSlots:t._u([{key:"anchor",fn:function(){return[e("div",{ref:"d-recipe-leftbar-row-dnd",staticClass:"d-recipe-leftbar-row__dnd",attrs:{"data-qa":"dt-recipe-leftbar-row-dnd"}},[t._v(" "+t._s(t.dndText)+" ")])]},proxy:!0}],null,!1,3247296267)}):t._e(),t.activeVoiceChat?e("div",{directives:[{name:"dt-tooltip",rawName:"v-dt-tooltip",value:t.activeVoiceChatTooltip,expression:"activeVoiceChatTooltip"}],staticClass:"d-recipe-leftbar-row__active-voice"},[e("dt-icon-waveform",{attrs:{size:"300"}})],1):t.showUnreadCount||t.showUnreadMentionCount?e("dt-tooltip",{attrs:{message:t.unreadCountTooltip,placement:"top"},scopedSlots:t._u([{key:"anchor",fn:function(){return[t.showUnreadCount?e("dt-badge",{class:["d-recipe-leftbar-row__unread-badge",{"d-recipe-leftbar-row__unread-count-badge":t.shouldApplyCustomStyleForCountBadge}],attrs:{kind:"count",type:"bulletin","data-qa":"dt-recipe-leftbar-row-unread-badge"}},[t._v(" "+t._s(t.unreadCount)+" ")]):t._e(),t.showUnreadMentionCount?e("dt-badge",{class:["d-recipe-leftbar-row__unread-badge",{"d-recipe-leftbar-row__unread-mention-count-badge":t.shouldApplyCustomStyleForCountBadge},{"d-recipe-leftbar-row__unread-mention-only-count-badge":t.shouldApplyCustomStyleForMentionOnly}],attrs:{kind:"count",type:"bulletin","data-qa":"dt-recipe-leftbar-row-unread-mention-badge"}},[t._v(" "+t._s(t.unreadMentionCount)+" ")]):t._e()]},proxy:!0}],null,!1,715135836)}):t._e(),t.hasCallButton?e("div",{staticClass:"d-recipe-leftbar-row__action",attrs:{"data-qa":"dt-recipe-leftbar-row-action"}},[e("dt-tooltip",{attrs:{message:t.callButtonTooltip,placement:"top"},scopedSlots:t._u([{key:"anchor",fn:function(){return[e("dt-button",{staticClass:"d-recipe-leftbar-row__action-button",attrs:{"data-qa":"dt-recipe-leftbar-row-action-call-button",circle:"",size:"xs",kind:"inverted","aria-label":t.callButtonTooltip},on:{focus:function(r){t.actionFocused=!0},blur:function(r){t.actionFocused=!1},click:function(r){return r.stopPropagation(),t.$emit("call",r)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("dt-icon-phone",{attrs:{size:"200"}})]},proxy:!0}],null,!1,2193255039)})]},proxy:!0}],null,!1,3837984112)})],1):t._e()],1):t._e()])},m=[],g=h.n(w,y,m);const R=g.exports;exports.default=R;
|
|
2
2
|
//# sourceMappingURL=general-row.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general-row.cjs","sources":["../../../recipes/leftbar/general_row/general_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"leftbarGeneralRowClasses\"\n data-qa=\"dt-recipe-leftbar-row\"\n >\n <a\n class=\"d-recipe-leftbar-row__primary\"\n :data-qa=\"'data-qa' in $attrs ? $attrs['data-qa'] : 'd-recipe-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"'href' in $attrs ? $attrs.href : 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <div\n class=\"d-recipe-leftbar-row__alpha\"\n >\n <div\n v-if=\"isTyping\"\n class=\"d-recipe-leftbar-row__is-typing\"\n >\n <span /><span /><span />\n </div>\n <slot\n v-else\n name=\"left\"\n >\n <dt-recipe-leftbar-general-row-icon\n :type=\"getIcon\"\n :color=\"color\"\n :icon-size=\"iconSize\"\n data-qa=\"dt-recipe-leftbar-row-icon\"\n />\n </slot>\n </div>\n <div\n class=\"d-recipe-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <slot name=\"label\">\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </slot>\n </div>\n </a>\n <div\n v-if=\"hasActions\"\n class=\"d-recipe-leftbar-row__omega\"\n >\n <dt-tooltip\n v-if=\"dndText\"\n placement=\"top\"\n :message=\"dndTextTooltip\"\n >\n <template #anchor>\n <div\n ref=\"d-recipe-leftbar-row-dnd\"\n class=\"d-recipe-leftbar-row__dnd\"\n data-qa=\"dt-recipe-leftbar-row-dnd\"\n >\n {{ dndText }}\n </div>\n </template>\n </dt-tooltip>\n <div\n v-if=\"activeVoiceChat\"\n class=\"d-recipe-leftbar-row__active-voice\"\n >\n <dt-icon-waveform\n size=\"300\"\n />\n </div>\n <dt-tooltip\n v-else-if=\"showUnreadCount || showUnreadMentionCount\"\n :message=\"unreadCountTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-badge\n v-if=\"showUnreadCount\"\n kind=\"count\"\n type=\"bulletin\"\n data-qa=\"dt-recipe-leftbar-row-unread-badge\"\n :class=\"['d-recipe-leftbar-row__unread-badge', {\n 'd-recipe-leftbar-row__unread-count-badge':\n shouldApplyCustomStyleForCountBadge,\n }]\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-badge\n v-if=\"showUnreadMentionCount\"\n kind=\"count\"\n type=\"bulletin\"\n data-qa=\"dt-recipe-leftbar-row-unread-mention-badge\"\n :class=\"['d-recipe-leftbar-row__unread-badge',\n { 'd-recipe-leftbar-row__unread-mention-count-badge': shouldApplyCustomStyleForCountBadge },\n { 'd-recipe-leftbar-row__unread-mention-only-count-badge': shouldApplyCustomStyleForMentionOnly },\n ]\"\n >\n {{ unreadMentionCount }}\n </dt-badge>\n </template>\n </dt-tooltip>\n <div\n v-if=\"hasCallButton\"\n class=\"d-recipe-leftbar-row__action\"\n data-qa=\"dt-recipe-leftbar-row-action\"\n >\n <dt-tooltip\n :message=\"callButtonTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n class=\"d-recipe-leftbar-row__action-button\"\n data-qa=\"dt-recipe-leftbar-row-action-call-button\"\n :circle=\"true\"\n size=\"xs\"\n kind=\"inverted\"\n :aria-label=\"callButtonTooltip\"\n @focus=\"actionFocused = true\"\n @blur=\"actionFocused = false\"\n @click.stop=\"$emit('call', $event)\"\n >\n <template #icon>\n <dt-icon-phone\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n </div>\n </div>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n LEFTBAR_GENERAL_ROW_TYPES,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR,\n LEFTBAR_GENERAL_ROW_ICON_SIZES,\n} from './general_row_constants';\nimport { DtBadge } from '@/components/badge';\nimport { DtIconPhone, DtIconWaveform } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport DtEmojiTextWrapper from '@/components/emoji_text_wrapper/emoji_text_wrapper.vue';\nimport DtRecipeLeftbarGeneralRowIcon from './leftbar_general_row_icon.vue';\nimport { safeConcatStrings } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeGeneralRow',\n\n components: {\n DtEmojiTextWrapper,\n DtBadge,\n DtButton,\n DtTooltip,\n DtIconPhone,\n DtIconWaveform,\n DtRecipeLeftbarGeneralRowIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Determines the icon to show.\n * If type is contact center, the color prop must be provided and will determine the color of the icon\n */\n type: {\n type: String,\n default: 'inbox',\n validator: (type) => {\n return Object.values(LEFTBAR_GENERAL_ROW_TYPES).includes(type);\n },\n },\n\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required. Even if you are overriding this field using the label slot\n * you still must input this as it will be displayed as the \"title\" attribute for the row.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines the color of the contact center icon\n */\n color: {\n type: String,\n default: null,\n validator: (color) => {\n return Object.keys(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(color);\n },\n },\n\n /**\n * The channel setting, either 'mention' or 'always'.\n * @values 'mention', 'always', null.\n */\n channelSetting: {\n type: String,\n default: null,\n },\n\n /**\n * Styles the row with an increased font weight to convey it has unreads. This must be true to see\n * the unread count badge.\n */\n hasUnreads: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: String,\n default: null,\n },\n\n /**\n * Number of unread mention messages\n */\n unreadMentionCount: {\n type: String,\n default: null,\n },\n\n /**\n * Text shown when the unread count is hovered.\n */\n unreadCountTooltip: {\n type: String,\n default: '',\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Gives a faded style to be used when muted\n */\n muted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows styling to represent an active voice chat. This will display over unreadCount.\n */\n activeVoiceChat: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Acronym used to represent \"Do not Disturb\" state. If entered will display the entered text alongside\n * unreadCount.\n */\n dndText: {\n type: String,\n default: '',\n },\n\n /**\n * Text shown in tooltip when you hover the dndText\n */\n dndTextTooltip: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the row should have a call button. Usually only applicable to individual contact rows.\n */\n hasCallButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Text shown when the call button is hovered.\n */\n callButtonTooltip: {\n type: String,\n default: '',\n },\n\n /**\n * Shows an \"is typing\" animation over the avatar when true.\n */\n isTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the size of the icon.\n */\n iconSize: {\n type: String,\n default: '300',\n validator: (size) => {\n return LEFTBAR_GENERAL_ROW_ICON_SIZES.includes(size);\n },\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Call button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'call',\n ],\n\n data () {\n return {\n actionFocused: false,\n labelWidth: '100%',\n };\n },\n\n computed: {\n leftbarGeneralRowClasses () {\n return [\n 'd-recipe-leftbar-row',\n {\n 'd-recipe-leftbar-row--no-action': !this.hasCallButton,\n 'd-recipe-leftbar-row--has-unread': this.hasUnreads,\n 'd-recipe-leftbar-row__unread-count': this.showUnreadCount || this.showUnreadMentionCount,\n 'd-recipe-leftbar-row--selected': this.selected,\n 'd-recipe-leftbar-row--muted': this.muted,\n 'd-recipe-leftbar-row--action-focused': this.actionFocused,\n },\n ];\n },\n\n getIcon () {\n switch (this.type) {\n case LEFTBAR_GENERAL_ROW_TYPES.CHANNELS:\n if (this.hasUnreads) return 'channel unread';\n break;\n case LEFTBAR_GENERAL_ROW_TYPES.LOCKED_CHANNEL:\n if (this.hasUnreads) return 'locked channel unread';\n break;\n }\n return this.type;\n },\n\n getAriaLabel () {\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([this.description, this.unreadCountTooltip, this.dndTextTooltip]);\n },\n\n hasActions () {\n return this.dndText || this.activeVoiceChat || this.showUnreadCount || this.hasCallButton ||\n this.showUnreadMentionCount;\n },\n\n showUnreadCount () {\n return !!this.unreadCount && this.hasUnreads;\n },\n\n showUnreadMentionCount () {\n return !!this.unreadMentionCount && this.hasUnreads;\n },\n\n hasUnreadCount () {\n return this.unreadCount !== null;\n },\n\n hasUnreadMentionCount () {\n return this.unreadMentionCount !== null;\n },\n\n shouldApplyCustomStyleForCountBadge () {\n return this.hasUnreadCount && this.hasUnreadMentionCount;\n },\n\n /**\n * When a channel in 'always' setting, meaning the user should see both unread count and unread mention count,\n * if there are only mention messages, we should apply the theme design tokens var(--dt-theme-mention-color-[background||foreground]-strong).\n * @returns {boolean}\n */\n shouldApplyCustomStyleForMentionOnly () {\n return this.channelSetting === 'always' && !this.hasUnreadCount && this.hasUnreadMentionCount;\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n async handler () {\n this.validateProps();\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(this.$el);\n this.adjustLabelWidth();\n },\n\n beforeDestroy: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n validateProps () {\n if (this.type === LEFTBAR_GENERAL_ROW_TYPES.CONTACT_CENTER &&\n !Object.keys(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(this.color)) {\n console.error(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR);\n }\n },\n\n adjustLabelWidth () {\n const labelWidth = this.$el?.querySelector('.d-recipe-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.d-recipe-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.d-recipe-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 16;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtEmojiTextWrapper","DtBadge","DtButton","DtTooltip","DtIconPhone","DtIconWaveform","DtRecipeLeftbarGeneralRowIcon","type","LEFTBAR_GENERAL_ROW_TYPES","color","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS","size","LEFTBAR_GENERAL_ROW_ICON_SIZES","safeConcatStrings","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR","labelWidth","_b","_a","omegaWidth","_d","_c","alphaWidth","_f","_e","paddings"],"mappings":"mfA+JAA,EAAA,CACA,KAAA,qBAEA,WAAA,CACA,mBAAAC,EAAA,QACA,QAAAC,EAAA,QACA,SAAAC,EAAA,QACA,UAAAC,EAAA,QACA,YAAAC,EAAA,YACA,eAAAC,EAAA,eACA,8BAAAC,EAAA,OACA,EAEA,aAAA,GAEA,MAAA,CAKA,KAAA,CACA,KAAA,OACA,QAAA,QACA,UAAAC,GACA,OAAA,OAAAC,EAAAA,yBAAA,EAAA,SAAAD,CAAA,CAEA,EAKA,UAAA,CACA,KAAA,OACA,QAAA,EACA,EAMA,YAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,MAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAE,GACA,OAAA,KAAAC,EAAAA,yCAAA,EAAA,SAAAD,CAAA,CAEA,EAMA,eAAA,CACA,KAAA,OACA,QAAA,IACA,EAMA,WAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,YAAA,CACA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AA,CAAA,KAAA,oBAAA,KAAA,UACA,EAEA,gBAAA,CACA,OAAA,KAAA,cAAA,IACA,EAEA,uBAAA,CACA,OAAA,KAAA,qBAAA,IACA,EAEA,qCAAA,CACA,OAAA,KAAA,gBAAA,KAAA,qBACA,EAOA,sCAAA,CACA,OAAA,KAAA,iBAAA,UAAA,CAAA,KAAA,gBAAA,KAAA,qBACA,CACA,EAEA,MAAA,CACA,OAAA,CACA,UAAA,GACA,KAAA,GACA,MAAA,SAAA,CACA,KAAA,cAAA,EACA,MAAA,KAAA,YACA,KAAA,iBAAA,CACA,CACA,CACA,EAEA,SAAA,CACA,KAAA,eAAA,IAAA,eAAA,KAAA,gBAAA,EACA,KAAA,eAAA,QAAA,KAAA,GAAA,EACA,KAAA,iBAAA,CACA,EAEA,cAAA,UAAA,CACA,KAAA,eAAA,YACA,EAEA,QAAA,CACA,eAAA,CACA,KAAA,OAAAL,EAAAA,0BAAA,gBACA,CAAA,OAAA,KAAAE,EAAA,yCAAA,EAAA,SAAA,KAAA,KAAA,GACA,QAAA,MAAAI,EAAAA,mDAAA,CAEA,EAEA,kBAAA,iBACA,MAAAC,IAAAC,GAAAC,EAAA,KAAA,MAAA,YAAAA,EAAA,cAAA,oCAAA,YAAAD,EAAA,cAAA,EACAE,IAAAC,GAAAC,EAAA,KAAA,MAAA,YAAAA,EAAA,cAAA,kCAAA,YAAAD,EAAA,cAAA,EACAE,IAAAC,GAAAC,EAAA,KAAA,MAAA,YAAAA,EAAA,cAAA,kCAAA,YAAAD,EAAA,cAAA,EACAE,EAAA,GACA,KAAA,WAAAT,GAAAG,EAAAG,EAAAG,GAAA,IACA,CACA,CACA"}
|
|
1
|
+
{"version":3,"file":"general-row.cjs","sources":["../../../recipes/leftbar/general_row/general_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"leftbarGeneralRowClasses\"\n data-qa=\"dt-recipe-leftbar-row\"\n >\n <a\n class=\"d-recipe-leftbar-row__primary\"\n :data-qa=\"'data-qa' in $attrs ? $attrs['data-qa'] : 'd-recipe-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"'href' in $attrs ? $attrs.href : 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <div\n class=\"d-recipe-leftbar-row__alpha\"\n >\n <div\n v-if=\"isTyping\"\n v-dt-tooltip=\"typingTooltip\"\n class=\"d-recipe-leftbar-row__is-typing\"\n >\n <span /><span /><span />\n </div>\n <slot\n v-else\n name=\"left\"\n >\n <dt-recipe-leftbar-general-row-icon\n :type=\"getIcon\"\n :color=\"color\"\n :icon-size=\"iconSize\"\n data-qa=\"dt-recipe-leftbar-row-icon\"\n />\n </slot>\n </div>\n <div\n class=\"d-recipe-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <slot name=\"label\">\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </slot>\n </div>\n </a>\n <div\n v-if=\"hasActions\"\n class=\"d-recipe-leftbar-row__omega\"\n >\n <dt-tooltip\n v-if=\"dndText\"\n placement=\"top\"\n :message=\"dndTextTooltip\"\n >\n <template #anchor>\n <div\n ref=\"d-recipe-leftbar-row-dnd\"\n class=\"d-recipe-leftbar-row__dnd\"\n data-qa=\"dt-recipe-leftbar-row-dnd\"\n >\n {{ dndText }}\n </div>\n </template>\n </dt-tooltip>\n <div\n v-if=\"activeVoiceChat\"\n v-dt-tooltip=\"activeVoiceChatTooltip\"\n class=\"d-recipe-leftbar-row__active-voice\"\n >\n <dt-icon-waveform\n size=\"300\"\n />\n </div>\n <dt-tooltip\n v-else-if=\"showUnreadCount || showUnreadMentionCount\"\n :message=\"unreadCountTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-badge\n v-if=\"showUnreadCount\"\n kind=\"count\"\n type=\"bulletin\"\n data-qa=\"dt-recipe-leftbar-row-unread-badge\"\n :class=\"['d-recipe-leftbar-row__unread-badge', {\n 'd-recipe-leftbar-row__unread-count-badge':\n shouldApplyCustomStyleForCountBadge,\n }]\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-badge\n v-if=\"showUnreadMentionCount\"\n kind=\"count\"\n type=\"bulletin\"\n data-qa=\"dt-recipe-leftbar-row-unread-mention-badge\"\n :class=\"['d-recipe-leftbar-row__unread-badge',\n { 'd-recipe-leftbar-row__unread-mention-count-badge': shouldApplyCustomStyleForCountBadge },\n { 'd-recipe-leftbar-row__unread-mention-only-count-badge': shouldApplyCustomStyleForMentionOnly },\n ]\"\n >\n {{ unreadMentionCount }}\n </dt-badge>\n </template>\n </dt-tooltip>\n <div\n v-if=\"hasCallButton\"\n class=\"d-recipe-leftbar-row__action\"\n data-qa=\"dt-recipe-leftbar-row-action\"\n >\n <dt-tooltip\n :message=\"callButtonTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n class=\"d-recipe-leftbar-row__action-button\"\n data-qa=\"dt-recipe-leftbar-row-action-call-button\"\n circle\n size=\"xs\"\n kind=\"inverted\"\n :aria-label=\"callButtonTooltip\"\n @focus=\"actionFocused = true\"\n @blur=\"actionFocused = false\"\n @click.stop=\"$emit('call', $event)\"\n >\n <template #icon>\n <dt-icon-phone\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n </div>\n </div>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n LEFTBAR_GENERAL_ROW_TYPES,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR,\n LEFTBAR_GENERAL_ROW_ICON_SIZES,\n} from './general_row_constants';\nimport { DtBadge } from '@/components/badge';\nimport { DtIconPhone, DtIconWaveform } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport { DtEmojiTextWrapper } from '@/components/emoji_text_wrapper';\nimport DtRecipeLeftbarGeneralRowIcon from './leftbar_general_row_icon.vue';\nimport { safeConcatStrings } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeGeneralRow',\n\n components: {\n DtEmojiTextWrapper,\n DtBadge,\n DtButton,\n DtTooltip,\n DtIconPhone,\n DtIconWaveform,\n DtRecipeLeftbarGeneralRowIcon,\n },\n\n mixins: [DtLocalizationMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Determines the icon to show.\n * If type is contact center, the color prop must be provided and will determine the color of the icon\n */\n type: {\n type: String,\n default: 'inbox',\n validator: (type) => {\n return Object.values(LEFTBAR_GENERAL_ROW_TYPES).includes(type);\n },\n },\n\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required. Even if you are overriding this field using the label slot\n * you still must input this as it will be displayed as the \"title\" attribute for the row.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines the color of the contact center icon\n */\n color: {\n type: String,\n default: null,\n validator: (color) => {\n return Object.keys(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(color);\n },\n },\n\n /**\n * The channel setting, either 'mention' or 'always'.\n * @values 'mention', 'always', null.\n */\n channelSetting: {\n type: String,\n default: null,\n },\n\n /**\n * Styles the row with an increased font weight to convey it has unreads. This must be true to see\n * the unread count badge.\n */\n hasUnreads: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: String,\n default: null,\n },\n\n /**\n * Number of unread mention messages\n */\n unreadMentionCount: {\n type: String,\n default: null,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Gives a faded style to be used when muted\n */\n muted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows styling to represent an active voice chat. This will display over unreadCount.\n */\n activeVoiceChat: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Acronym used to represent \"Do not Disturb\" state. If entered will display the entered text alongside\n * unreadCount.\n */\n dndText: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the row should have a call button. Usually only applicable to individual contact rows.\n */\n hasCallButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows an \"is typing\" animation over the avatar when true.\n */\n isTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the size of the icon.\n */\n iconSize: {\n type: String,\n default: '300',\n validator: (size) => {\n return LEFTBAR_GENERAL_ROW_ICON_SIZES.includes(size);\n },\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Call button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'call',\n ],\n\n data () {\n return {\n actionFocused: false,\n labelWidth: '100%',\n };\n },\n\n computed: {\n leftbarGeneralRowClasses () {\n return [\n 'd-recipe-leftbar-row',\n {\n 'd-recipe-leftbar-row--no-action': !this.hasCallButton,\n 'd-recipe-leftbar-row--has-unread': this.hasUnreads,\n 'd-recipe-leftbar-row__unread-count': this.showUnreadCount || this.showUnreadMentionCount,\n 'd-recipe-leftbar-row--selected': this.selected,\n 'd-recipe-leftbar-row--muted': this.muted,\n 'd-recipe-leftbar-row--action-focused': this.actionFocused,\n },\n ];\n },\n\n getIcon () {\n switch (this.type) {\n case LEFTBAR_GENERAL_ROW_TYPES.CHANNELS:\n if (this.hasUnreads) return 'channel unread';\n break;\n case LEFTBAR_GENERAL_ROW_TYPES.LOCKED_CHANNEL:\n if (this.hasUnreads) return 'locked channel unread';\n break;\n }\n return this.type;\n },\n\n getAriaLabel () {\n if (this.ariaLabel) return this.ariaLabel;\n\n return safeConcatStrings([\n this.typingTooltip,\n this.description,\n this.unreadCountTooltip,\n this.dndTextTooltip,\n this.activeVoiceChatTooltip,\n ]);\n },\n\n hasActions () {\n return this.dndText || this.activeVoiceChat || this.showUnreadCount || this.hasCallButton ||\n this.showUnreadMentionCount;\n },\n\n showUnreadCount () {\n return !!this.unreadCount && this.hasUnreads;\n },\n\n showUnreadMentionCount () {\n return !!this.unreadMentionCount && this.hasUnreads;\n },\n\n hasUnreadCount () {\n return this.unreadCount !== null;\n },\n\n hasUnreadMentionCount () {\n return this.unreadMentionCount !== null;\n },\n\n shouldApplyCustomStyleForCountBadge () {\n return this.hasUnreadCount && this.hasUnreadMentionCount;\n },\n\n /**\n * When a channel in 'always' setting, meaning the user should see both unread count and unread mention count,\n * if there are only mention messages, we should apply the theme design tokens var(--dt-theme-mention-color-[background||foreground]-strong).\n * @returns {boolean}\n */\n shouldApplyCustomStyleForMentionOnly () {\n return this.channelSetting === 'always' && !this.hasUnreadCount && this.hasUnreadMentionCount;\n },\n\n messageCount () {\n return isNaN(this.unreadCount)\n ? this.unreadCount\n : Number(this.unreadCount);\n },\n\n mentionCount () {\n return isNaN(this.unreadMentionCount)\n ? this.unreadMentionCount\n : Number(this.unreadMentionCount);\n },\n\n unreadCountTooltip () {\n return safeConcatStrings([\n this.unreadCount && this.i18n.$t('DIALTONE_UNREAD_MESSAGE_COUNT_TEXT', { unreadCount: this.messageCount }),\n this.unreadMentionCount && this.i18n.$t('DIALTONE_UNREAD_MENTION_COUNT_TEXT', { unreadCount: this.mentionCount }),\n ]);\n },\n\n dndTextTooltip () {\n return this.dndText && this.i18n.$t('DIALTONE_GENERAL_ROW_DND_TEXT_TOOLTIP');\n },\n\n activeVoiceChatTooltip () {\n return this.activeVoiceChat && this.i18n.$t('DIALTONE_GENERAL_ROW_ACTIVE_VOICE_CHAT_TEXT');\n },\n\n callButtonTooltip () {\n return this.i18n.$t('DIALTONE_GENERAL_ROW_CALL_BUTTON_TOOLTIP');\n },\n\n typingTooltip () {\n return this.isTyping && this.i18n.$t('DIALTONE_TYPING_TEXT');\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n async handler () {\n this.validateProps();\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(this.$el);\n this.adjustLabelWidth();\n },\n\n beforeDestroy: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n validateProps () {\n if (this.type === LEFTBAR_GENERAL_ROW_TYPES.CONTACT_CENTER &&\n !Object.keys(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(this.color)) {\n console.error(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR);\n }\n },\n\n adjustLabelWidth () {\n const labelWidth = this.$el?.querySelector('.d-recipe-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.d-recipe-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.d-recipe-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 16;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtEmojiTextWrapper","DtBadge","DtButton","DtTooltip","DtIconPhone","DtIconWaveform","DtRecipeLeftbarGeneralRowIcon","DtLocalizationMixin","type","LEFTBAR_GENERAL_ROW_TYPES","color","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS","size","LEFTBAR_GENERAL_ROW_ICON_SIZES","safeConcatStrings","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR","labelWidth","_b","_a","omegaWidth","_d","_c","alphaWidth","_f","_e","paddings"],"mappings":"qiBAkKAA,EAAA,CACA,KAAA,qBAEA,WAAA,CACA,mBAAAC,EAAA,QACA,QAAAC,EAAA,QACA,SAAAC,EAAA,QACA,UAAAC,EAAA,QACA,YAAAC,EAAA,YACA,eAAAC,EAAA,eACA,8BAAAC,EAAA,OACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,aAAA,GAEA,MAAA,CAKA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A,CACA,CACA,EAEA,SAAA,CACA,KAAA,eAAA,IAAA,eAAA,KAAA,gBAAA,EACA,KAAA,eAAA,QAAA,KAAA,GAAA,EACA,KAAA,iBAAA,CACA,EAEA,cAAA,UAAA,CACA,KAAA,eAAA,YACA,EAEA,QAAA,CACA,eAAA,CACA,KAAA,OAAAL,EAAAA,0BAAA,gBACA,CAAA,OAAA,KAAAE,EAAA,yCAAA,EAAA,SAAA,KAAA,KAAA,GACA,QAAA,MAAAI,EAAAA,mDAAA,CAEA,EAEA,kBAAA,iBACA,MAAAC,IAAAC,GAAAC,EAAA,KAAA,MAAA,YAAAA,EAAA,cAAA,oCAAA,YAAAD,EAAA,cAAA,EACAE,IAAAC,GAAAC,EAAA,KAAA,MAAA,YAAAA,EAAA,cAAA,kCAAA,YAAAD,EAAA,cAAA,EACAE,IAAAC,GAAAC,EAAA,KAAA,MAAA,YAAAA,EAAA,cAAA,kCAAA,YAAAD,EAAA,cAAA,EACAE,EAAA,GACA,KAAA,WAAAT,GAAAG,EAAAG,EAAAG,GAAA,IACA,CACA,CACA"}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { LEFTBAR_GENERAL_ROW_TYPES as n, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS as
|
|
2
|
-
import { DtIconPhone as f, DtIconWaveform as
|
|
3
|
-
import b from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { LEFTBAR_GENERAL_ROW_TYPES as n, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS as c, LEFTBAR_GENERAL_ROW_ICON_SIZES as h, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR as _ } from "./general-row-constants.js";
|
|
2
|
+
import { DtIconPhone as f, DtIconWaveform as C } from "@dialpad/dialtone-icons/vue2";
|
|
3
|
+
import b from "./leftbar-general-row-icon.js";
|
|
4
|
+
import { safeConcatStrings as p } from "../../common/utils/index.js";
|
|
5
|
+
import { n as T } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
|
|
6
|
+
import m from "../emoji-text-wrapper/emoji-text-wrapper.js";
|
|
7
|
+
import y from "../badge/badge.js";
|
|
8
|
+
import w from "../button/button.js";
|
|
9
9
|
import v from "../tooltip/tooltip.js";
|
|
10
|
-
|
|
10
|
+
import g from "../../common/mixins/localization.js";
|
|
11
|
+
const E = {
|
|
11
12
|
name: "DtRecipeGeneralRow",
|
|
12
13
|
components: {
|
|
13
|
-
DtEmojiTextWrapper:
|
|
14
|
-
DtBadge:
|
|
15
|
-
DtButton:
|
|
14
|
+
DtEmojiTextWrapper: m,
|
|
15
|
+
DtBadge: y,
|
|
16
|
+
DtButton: w,
|
|
16
17
|
DtTooltip: v,
|
|
17
18
|
DtIconPhone: f,
|
|
18
|
-
DtIconWaveform:
|
|
19
|
-
DtRecipeLeftbarGeneralRowIcon:
|
|
19
|
+
DtIconWaveform: C,
|
|
20
|
+
DtRecipeLeftbarGeneralRowIcon: b
|
|
20
21
|
},
|
|
22
|
+
mixins: [g],
|
|
21
23
|
inheritAttrs: !1,
|
|
22
24
|
props: {
|
|
23
25
|
/**
|
|
@@ -50,7 +52,7 @@ const T = {
|
|
|
50
52
|
color: {
|
|
51
53
|
type: String,
|
|
52
54
|
default: null,
|
|
53
|
-
validator: (a) => Object.keys(
|
|
55
|
+
validator: (a) => Object.keys(c).includes(a)
|
|
54
56
|
},
|
|
55
57
|
/**
|
|
56
58
|
* The channel setting, either 'mention' or 'always'.
|
|
@@ -82,13 +84,6 @@ const T = {
|
|
|
82
84
|
type: String,
|
|
83
85
|
default: null
|
|
84
86
|
},
|
|
85
|
-
/**
|
|
86
|
-
* Text shown when the unread count is hovered.
|
|
87
|
-
*/
|
|
88
|
-
unreadCountTooltip: {
|
|
89
|
-
type: String,
|
|
90
|
-
default: ""
|
|
91
|
-
},
|
|
92
87
|
/**
|
|
93
88
|
* Determines if the row is selected
|
|
94
89
|
*/
|
|
@@ -118,13 +113,6 @@ const T = {
|
|
|
118
113
|
type: String,
|
|
119
114
|
default: ""
|
|
120
115
|
},
|
|
121
|
-
/**
|
|
122
|
-
* Text shown in tooltip when you hover the dndText
|
|
123
|
-
*/
|
|
124
|
-
dndTextTooltip: {
|
|
125
|
-
type: String,
|
|
126
|
-
default: ""
|
|
127
|
-
},
|
|
128
116
|
/**
|
|
129
117
|
* Whether the row should have a call button. Usually only applicable to individual contact rows.
|
|
130
118
|
*/
|
|
@@ -132,13 +120,6 @@ const T = {
|
|
|
132
120
|
type: Boolean,
|
|
133
121
|
default: !1
|
|
134
122
|
},
|
|
135
|
-
/**
|
|
136
|
-
* Text shown when the call button is hovered.
|
|
137
|
-
*/
|
|
138
|
-
callButtonTooltip: {
|
|
139
|
-
type: String,
|
|
140
|
-
default: ""
|
|
141
|
-
},
|
|
142
123
|
/**
|
|
143
124
|
* Shows an "is typing" animation over the avatar when true.
|
|
144
125
|
*/
|
|
@@ -152,7 +133,7 @@ const T = {
|
|
|
152
133
|
iconSize: {
|
|
153
134
|
type: String,
|
|
154
135
|
default: "300",
|
|
155
|
-
validator: (a) =>
|
|
136
|
+
validator: (a) => h.includes(a)
|
|
156
137
|
}
|
|
157
138
|
},
|
|
158
139
|
emits: [
|
|
@@ -203,7 +184,13 @@ const T = {
|
|
|
203
184
|
return this.type;
|
|
204
185
|
},
|
|
205
186
|
getAriaLabel() {
|
|
206
|
-
return this.ariaLabel ? this.ariaLabel :
|
|
187
|
+
return this.ariaLabel ? this.ariaLabel : p([
|
|
188
|
+
this.typingTooltip,
|
|
189
|
+
this.description,
|
|
190
|
+
this.unreadCountTooltip,
|
|
191
|
+
this.dndTextTooltip,
|
|
192
|
+
this.activeVoiceChatTooltip
|
|
193
|
+
]);
|
|
207
194
|
},
|
|
208
195
|
hasActions() {
|
|
209
196
|
return this.dndText || this.activeVoiceChat || this.showUnreadCount || this.hasCallButton || this.showUnreadMentionCount;
|
|
@@ -230,6 +217,30 @@ const T = {
|
|
|
230
217
|
*/
|
|
231
218
|
shouldApplyCustomStyleForMentionOnly() {
|
|
232
219
|
return this.channelSetting === "always" && !this.hasUnreadCount && this.hasUnreadMentionCount;
|
|
220
|
+
},
|
|
221
|
+
messageCount() {
|
|
222
|
+
return isNaN(this.unreadCount) ? this.unreadCount : Number(this.unreadCount);
|
|
223
|
+
},
|
|
224
|
+
mentionCount() {
|
|
225
|
+
return isNaN(this.unreadMentionCount) ? this.unreadMentionCount : Number(this.unreadMentionCount);
|
|
226
|
+
},
|
|
227
|
+
unreadCountTooltip() {
|
|
228
|
+
return p([
|
|
229
|
+
this.unreadCount && this.i18n.$t("DIALTONE_UNREAD_MESSAGE_COUNT_TEXT", { unreadCount: this.messageCount }),
|
|
230
|
+
this.unreadMentionCount && this.i18n.$t("DIALTONE_UNREAD_MENTION_COUNT_TEXT", { unreadCount: this.mentionCount })
|
|
231
|
+
]);
|
|
232
|
+
},
|
|
233
|
+
dndTextTooltip() {
|
|
234
|
+
return this.dndText && this.i18n.$t("DIALTONE_GENERAL_ROW_DND_TEXT_TOOLTIP");
|
|
235
|
+
},
|
|
236
|
+
activeVoiceChatTooltip() {
|
|
237
|
+
return this.activeVoiceChat && this.i18n.$t("DIALTONE_GENERAL_ROW_ACTIVE_VOICE_CHAT_TEXT");
|
|
238
|
+
},
|
|
239
|
+
callButtonTooltip() {
|
|
240
|
+
return this.i18n.$t("DIALTONE_GENERAL_ROW_CALL_BUTTON_TOOLTIP");
|
|
241
|
+
},
|
|
242
|
+
typingTooltip() {
|
|
243
|
+
return this.isTyping && this.i18n.$t("DIALTONE_TYPING_TEXT");
|
|
233
244
|
}
|
|
234
245
|
},
|
|
235
246
|
watch: {
|
|
@@ -249,24 +260,24 @@ const T = {
|
|
|
249
260
|
},
|
|
250
261
|
methods: {
|
|
251
262
|
validateProps() {
|
|
252
|
-
this.type === n.CONTACT_CENTER && !Object.keys(
|
|
263
|
+
this.type === n.CONTACT_CENTER && !Object.keys(c).includes(this.color) && console.error(_);
|
|
253
264
|
},
|
|
254
265
|
adjustLabelWidth() {
|
|
255
|
-
var
|
|
256
|
-
const a = ((
|
|
266
|
+
var i, o, s, l, d, u;
|
|
267
|
+
const a = ((o = (i = this.$el) == null ? void 0 : i.querySelector(".d-recipe-leftbar-row__primary")) == null ? void 0 : o.clientWidth) || 0, t = ((l = (s = this.$el) == null ? void 0 : s.querySelector(".d-recipe-leftbar-row__omega")) == null ? void 0 : l.clientWidth) || 0, e = ((u = (d = this.$el) == null ? void 0 : d.querySelector(".d-recipe-leftbar-row__alpha")) == null ? void 0 : u.clientWidth) || 0, r = 16;
|
|
257
268
|
this.labelWidth = a - (t + e + r) + "px";
|
|
258
269
|
}
|
|
259
270
|
}
|
|
260
271
|
};
|
|
261
|
-
var
|
|
272
|
+
var N = function() {
|
|
262
273
|
var t = this, e = t._self._c;
|
|
263
|
-
return e("div", { class: t.leftbarGeneralRowClasses, attrs: { "data-qa": "dt-recipe-leftbar-row" } }, [e("a", t._g(t._b({ staticClass: "d-recipe-leftbar-row__primary", attrs: { "data-qa": "data-qa" in t.$attrs ? t.$attrs["data-qa"] : "d-recipe-leftbar-row-link", "aria-label": t.getAriaLabel, title: t.description, href: "href" in t.$attrs ? t.$attrs.href : "javascript:void(0)" } }, "a", t.$attrs, !1), t.$listeners), [e("div", { staticClass: "d-recipe-leftbar-row__alpha" }, [t.isTyping ? e("div", { staticClass: "d-recipe-leftbar-row__is-typing" }, [e("span"), e("span"), e("span")]) : t._t("left", function() {
|
|
274
|
+
return e("div", { class: t.leftbarGeneralRowClasses, attrs: { "data-qa": "dt-recipe-leftbar-row" } }, [e("a", t._g(t._b({ staticClass: "d-recipe-leftbar-row__primary", attrs: { "data-qa": "data-qa" in t.$attrs ? t.$attrs["data-qa"] : "d-recipe-leftbar-row-link", "aria-label": t.getAriaLabel, title: t.description, href: "href" in t.$attrs ? t.$attrs.href : "javascript:void(0)" } }, "a", t.$attrs, !1), t.$listeners), [e("div", { staticClass: "d-recipe-leftbar-row__alpha" }, [t.isTyping ? e("div", { directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip", value: t.typingTooltip, expression: "typingTooltip" }], staticClass: "d-recipe-leftbar-row__is-typing" }, [e("span"), e("span"), e("span")]) : t._t("left", function() {
|
|
264
275
|
return [e("dt-recipe-leftbar-general-row-icon", { attrs: { type: t.getIcon, color: t.color, "icon-size": t.iconSize, "data-qa": "dt-recipe-leftbar-row-icon" } })];
|
|
265
276
|
})], 2), e("div", { staticClass: "d-recipe-leftbar-row__label", style: `flex-basis: ${t.labelWidth}` }, [t._t("label", function() {
|
|
266
277
|
return [e("dt-emoji-text-wrapper", { staticClass: "d-recipe-leftbar-row__description", attrs: { "data-qa": "dt-recipe-leftbar-row-description", size: "200" } }, [t._v(" " + t._s(t.description) + " ")])];
|
|
267
278
|
})], 2)]), t.hasActions ? e("div", { staticClass: "d-recipe-leftbar-row__omega" }, [t.dndText ? e("dt-tooltip", { attrs: { placement: "top", message: t.dndTextTooltip }, scopedSlots: t._u([{ key: "anchor", fn: function() {
|
|
268
279
|
return [e("div", { ref: "d-recipe-leftbar-row-dnd", staticClass: "d-recipe-leftbar-row__dnd", attrs: { "data-qa": "dt-recipe-leftbar-row-dnd" } }, [t._v(" " + t._s(t.dndText) + " ")])];
|
|
269
|
-
}, proxy: !0 }], null, !1, 3247296267) }) : t._e(), t.activeVoiceChat ? e("div", { staticClass: "d-recipe-leftbar-row__active-voice" }, [e("dt-icon-waveform", { attrs: { size: "300" } })], 1) : t.showUnreadCount || t.showUnreadMentionCount ? e("dt-tooltip", { attrs: { message: t.unreadCountTooltip, placement: "top" }, scopedSlots: t._u([{ key: "anchor", fn: function() {
|
|
280
|
+
}, proxy: !0 }], null, !1, 3247296267) }) : t._e(), t.activeVoiceChat ? e("div", { directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip", value: t.activeVoiceChatTooltip, expression: "activeVoiceChatTooltip" }], staticClass: "d-recipe-leftbar-row__active-voice" }, [e("dt-icon-waveform", { attrs: { size: "300" } })], 1) : t.showUnreadCount || t.showUnreadMentionCount ? e("dt-tooltip", { attrs: { message: t.unreadCountTooltip, placement: "top" }, scopedSlots: t._u([{ key: "anchor", fn: function() {
|
|
270
281
|
return [t.showUnreadCount ? e("dt-badge", { class: ["d-recipe-leftbar-row__unread-badge", {
|
|
271
282
|
"d-recipe-leftbar-row__unread-count-badge": t.shouldApplyCustomStyleForCountBadge
|
|
272
283
|
}], attrs: { kind: "count", type: "bulletin", "data-qa": "dt-recipe-leftbar-row-unread-badge" } }, [t._v(" " + t._s(t.unreadCount) + " ")]) : t._e(), t.showUnreadMentionCount ? e("dt-badge", { class: [
|
|
@@ -275,7 +286,7 @@ var S = function() {
|
|
|
275
286
|
{ "d-recipe-leftbar-row__unread-mention-only-count-badge": t.shouldApplyCustomStyleForMentionOnly }
|
|
276
287
|
], attrs: { kind: "count", type: "bulletin", "data-qa": "dt-recipe-leftbar-row-unread-mention-badge" } }, [t._v(" " + t._s(t.unreadMentionCount) + " ")]) : t._e()];
|
|
277
288
|
}, proxy: !0 }], null, !1, 715135836) }) : t._e(), t.hasCallButton ? e("div", { staticClass: "d-recipe-leftbar-row__action", attrs: { "data-qa": "dt-recipe-leftbar-row-action" } }, [e("dt-tooltip", { attrs: { message: t.callButtonTooltip, placement: "top" }, scopedSlots: t._u([{ key: "anchor", fn: function() {
|
|
278
|
-
return [e("dt-button", { staticClass: "d-recipe-leftbar-row__action-button", attrs: { "data-qa": "dt-recipe-leftbar-row-action-call-button", circle:
|
|
289
|
+
return [e("dt-button", { staticClass: "d-recipe-leftbar-row__action-button", attrs: { "data-qa": "dt-recipe-leftbar-row-action-call-button", circle: "", size: "xs", kind: "inverted", "aria-label": t.callButtonTooltip }, on: { focus: function(r) {
|
|
279
290
|
t.actionFocused = !0;
|
|
280
291
|
}, blur: function(r) {
|
|
281
292
|
t.actionFocused = !1;
|
|
@@ -284,14 +295,14 @@ var S = function() {
|
|
|
284
295
|
} }, scopedSlots: t._u([{ key: "icon", fn: function() {
|
|
285
296
|
return [e("dt-icon-phone", { attrs: { size: "200" } })];
|
|
286
297
|
}, proxy: !0 }], null, !1, 2193255039) })];
|
|
287
|
-
}, proxy: !0 }], null, !1,
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
298
|
+
}, proxy: !0 }], null, !1, 3837984112) })], 1) : t._e()], 1) : t._e()]);
|
|
299
|
+
}, A = [], O = /* @__PURE__ */ T(
|
|
300
|
+
E,
|
|
301
|
+
N,
|
|
302
|
+
A
|
|
292
303
|
);
|
|
293
|
-
const
|
|
304
|
+
const $ = O.exports;
|
|
294
305
|
export {
|
|
295
|
-
|
|
306
|
+
$ as default
|
|
296
307
|
};
|
|
297
308
|
//# sourceMappingURL=general-row.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general-row.js","sources":["../../../recipes/leftbar/general_row/general_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"leftbarGeneralRowClasses\"\n data-qa=\"dt-recipe-leftbar-row\"\n >\n <a\n class=\"d-recipe-leftbar-row__primary\"\n :data-qa=\"'data-qa' in $attrs ? $attrs['data-qa'] : 'd-recipe-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"'href' in $attrs ? $attrs.href : 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <div\n class=\"d-recipe-leftbar-row__alpha\"\n >\n <div\n v-if=\"isTyping\"\n class=\"d-recipe-leftbar-row__is-typing\"\n >\n <span /><span /><span />\n </div>\n <slot\n v-else\n name=\"left\"\n >\n <dt-recipe-leftbar-general-row-icon\n :type=\"getIcon\"\n :color=\"color\"\n :icon-size=\"iconSize\"\n data-qa=\"dt-recipe-leftbar-row-icon\"\n />\n </slot>\n </div>\n <div\n class=\"d-recipe-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <slot name=\"label\">\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </slot>\n </div>\n </a>\n <div\n v-if=\"hasActions\"\n class=\"d-recipe-leftbar-row__omega\"\n >\n <dt-tooltip\n v-if=\"dndText\"\n placement=\"top\"\n :message=\"dndTextTooltip\"\n >\n <template #anchor>\n <div\n ref=\"d-recipe-leftbar-row-dnd\"\n class=\"d-recipe-leftbar-row__dnd\"\n data-qa=\"dt-recipe-leftbar-row-dnd\"\n >\n {{ dndText }}\n </div>\n </template>\n </dt-tooltip>\n <div\n v-if=\"activeVoiceChat\"\n class=\"d-recipe-leftbar-row__active-voice\"\n >\n <dt-icon-waveform\n size=\"300\"\n />\n </div>\n <dt-tooltip\n v-else-if=\"showUnreadCount || showUnreadMentionCount\"\n :message=\"unreadCountTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-badge\n v-if=\"showUnreadCount\"\n kind=\"count\"\n type=\"bulletin\"\n data-qa=\"dt-recipe-leftbar-row-unread-badge\"\n :class=\"['d-recipe-leftbar-row__unread-badge', {\n 'd-recipe-leftbar-row__unread-count-badge':\n shouldApplyCustomStyleForCountBadge,\n }]\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-badge\n v-if=\"showUnreadMentionCount\"\n kind=\"count\"\n type=\"bulletin\"\n data-qa=\"dt-recipe-leftbar-row-unread-mention-badge\"\n :class=\"['d-recipe-leftbar-row__unread-badge',\n { 'd-recipe-leftbar-row__unread-mention-count-badge': shouldApplyCustomStyleForCountBadge },\n { 'd-recipe-leftbar-row__unread-mention-only-count-badge': shouldApplyCustomStyleForMentionOnly },\n ]\"\n >\n {{ unreadMentionCount }}\n </dt-badge>\n </template>\n </dt-tooltip>\n <div\n v-if=\"hasCallButton\"\n class=\"d-recipe-leftbar-row__action\"\n data-qa=\"dt-recipe-leftbar-row-action\"\n >\n <dt-tooltip\n :message=\"callButtonTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n class=\"d-recipe-leftbar-row__action-button\"\n data-qa=\"dt-recipe-leftbar-row-action-call-button\"\n :circle=\"true\"\n size=\"xs\"\n kind=\"inverted\"\n :aria-label=\"callButtonTooltip\"\n @focus=\"actionFocused = true\"\n @blur=\"actionFocused = false\"\n @click.stop=\"$emit('call', $event)\"\n >\n <template #icon>\n <dt-icon-phone\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n </div>\n </div>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n LEFTBAR_GENERAL_ROW_TYPES,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR,\n LEFTBAR_GENERAL_ROW_ICON_SIZES,\n} from './general_row_constants';\nimport { DtBadge } from '@/components/badge';\nimport { DtIconPhone, DtIconWaveform } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport DtEmojiTextWrapper from '@/components/emoji_text_wrapper/emoji_text_wrapper.vue';\nimport DtRecipeLeftbarGeneralRowIcon from './leftbar_general_row_icon.vue';\nimport { safeConcatStrings } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeGeneralRow',\n\n components: {\n DtEmojiTextWrapper,\n DtBadge,\n DtButton,\n DtTooltip,\n DtIconPhone,\n DtIconWaveform,\n DtRecipeLeftbarGeneralRowIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Determines the icon to show.\n * If type is contact center, the color prop must be provided and will determine the color of the icon\n */\n type: {\n type: String,\n default: 'inbox',\n validator: (type) => {\n return Object.values(LEFTBAR_GENERAL_ROW_TYPES).includes(type);\n },\n },\n\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required. Even if you are overriding this field using the label slot\n * you still must input this as it will be displayed as the \"title\" attribute for the row.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines the color of the contact center icon\n */\n color: {\n type: String,\n default: null,\n validator: (color) => {\n return Object.keys(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(color);\n },\n },\n\n /**\n * The channel setting, either 'mention' or 'always'.\n * @values 'mention', 'always', null.\n */\n channelSetting: {\n type: String,\n default: null,\n },\n\n /**\n * Styles the row with an increased font weight to convey it has unreads. This must be true to see\n * the unread count badge.\n */\n hasUnreads: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: String,\n default: null,\n },\n\n /**\n * Number of unread mention messages\n */\n unreadMentionCount: {\n type: String,\n default: null,\n },\n\n /**\n * Text shown when the unread count is hovered.\n */\n unreadCountTooltip: {\n type: String,\n default: '',\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Gives a faded style to be used when muted\n */\n muted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows styling to represent an active voice chat. This will display over unreadCount.\n */\n activeVoiceChat: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Acronym used to represent \"Do not Disturb\" state. If entered will display the entered text alongside\n * unreadCount.\n */\n dndText: {\n type: String,\n default: '',\n },\n\n /**\n * Text shown in tooltip when you hover the dndText\n */\n dndTextTooltip: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the row should have a call button. Usually only applicable to individual contact rows.\n */\n hasCallButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Text shown when the call button is hovered.\n */\n callButtonTooltip: {\n type: String,\n default: '',\n },\n\n /**\n * Shows an \"is typing\" animation over the avatar when true.\n */\n isTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the size of the icon.\n */\n iconSize: {\n type: String,\n default: '300',\n validator: (size) => {\n return LEFTBAR_GENERAL_ROW_ICON_SIZES.includes(size);\n },\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Call button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'call',\n ],\n\n data () {\n return {\n actionFocused: false,\n labelWidth: '100%',\n };\n },\n\n computed: {\n leftbarGeneralRowClasses () {\n return [\n 'd-recipe-leftbar-row',\n {\n 'd-recipe-leftbar-row--no-action': !this.hasCallButton,\n 'd-recipe-leftbar-row--has-unread': this.hasUnreads,\n 'd-recipe-leftbar-row__unread-count': this.showUnreadCount || this.showUnreadMentionCount,\n 'd-recipe-leftbar-row--selected': this.selected,\n 'd-recipe-leftbar-row--muted': this.muted,\n 'd-recipe-leftbar-row--action-focused': this.actionFocused,\n },\n ];\n },\n\n getIcon () {\n switch (this.type) {\n case LEFTBAR_GENERAL_ROW_TYPES.CHANNELS:\n if (this.hasUnreads) return 'channel unread';\n break;\n case LEFTBAR_GENERAL_ROW_TYPES.LOCKED_CHANNEL:\n if (this.hasUnreads) return 'locked channel unread';\n break;\n }\n return this.type;\n },\n\n getAriaLabel () {\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([this.description, this.unreadCountTooltip, this.dndTextTooltip]);\n },\n\n hasActions () {\n return this.dndText || this.activeVoiceChat || this.showUnreadCount || this.hasCallButton ||\n this.showUnreadMentionCount;\n },\n\n showUnreadCount () {\n return !!this.unreadCount && this.hasUnreads;\n },\n\n showUnreadMentionCount () {\n return !!this.unreadMentionCount && this.hasUnreads;\n },\n\n hasUnreadCount () {\n return this.unreadCount !== null;\n },\n\n hasUnreadMentionCount () {\n return this.unreadMentionCount !== null;\n },\n\n shouldApplyCustomStyleForCountBadge () {\n return this.hasUnreadCount && this.hasUnreadMentionCount;\n },\n\n /**\n * When a channel in 'always' setting, meaning the user should see both unread count and unread mention count,\n * if there are only mention messages, we should apply the theme design tokens var(--dt-theme-mention-color-[background||foreground]-strong).\n * @returns {boolean}\n */\n shouldApplyCustomStyleForMentionOnly () {\n return this.channelSetting === 'always' && !this.hasUnreadCount && this.hasUnreadMentionCount;\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n async handler () {\n this.validateProps();\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(this.$el);\n this.adjustLabelWidth();\n },\n\n beforeDestroy: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n validateProps () {\n if (this.type === LEFTBAR_GENERAL_ROW_TYPES.CONTACT_CENTER &&\n !Object.keys(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(this.color)) {\n console.error(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR);\n }\n },\n\n adjustLabelWidth () {\n const labelWidth = this.$el?.querySelector('.d-recipe-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.d-recipe-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.d-recipe-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 16;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtEmojiTextWrapper","DtBadge","DtButton","DtTooltip","DtIconPhone","DtIconWaveform","DtRecipeLeftbarGeneralRowIcon","type","LEFTBAR_GENERAL_ROW_TYPES","color","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS","size","LEFTBAR_GENERAL_ROW_ICON_SIZES","safeConcatStrings","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR","labelWidth","_b","_a","omegaWidth","_d","_c","alphaWidth","_f","_e","paddings"],"mappings":";;;;;;;;;AA+JA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC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AD,EAAA,gBAAA,GACAE,MAAAC,KAAAC,IAAA,KAAA,QAAA,gBAAAA,EAAA,cAAA,oCAAA,gBAAAD,EAAA,gBAAA,GACAE,MAAAC,KAAAC,IAAA,KAAA,QAAA,gBAAAA,EAAA,cAAA,oCAAA,gBAAAD,EAAA,gBAAA,GACAE,IAAA;AACA,WAAA,aAAAT,KAAAG,IAAAG,IAAAG,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"general-row.js","sources":["../../../recipes/leftbar/general_row/general_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"leftbarGeneralRowClasses\"\n data-qa=\"dt-recipe-leftbar-row\"\n >\n <a\n class=\"d-recipe-leftbar-row__primary\"\n :data-qa=\"'data-qa' in $attrs ? $attrs['data-qa'] : 'd-recipe-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"'href' in $attrs ? $attrs.href : 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <div\n class=\"d-recipe-leftbar-row__alpha\"\n >\n <div\n v-if=\"isTyping\"\n v-dt-tooltip=\"typingTooltip\"\n class=\"d-recipe-leftbar-row__is-typing\"\n >\n <span /><span /><span />\n </div>\n <slot\n v-else\n name=\"left\"\n >\n <dt-recipe-leftbar-general-row-icon\n :type=\"getIcon\"\n :color=\"color\"\n :icon-size=\"iconSize\"\n data-qa=\"dt-recipe-leftbar-row-icon\"\n />\n </slot>\n </div>\n <div\n class=\"d-recipe-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <slot name=\"label\">\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </slot>\n </div>\n </a>\n <div\n v-if=\"hasActions\"\n class=\"d-recipe-leftbar-row__omega\"\n >\n <dt-tooltip\n v-if=\"dndText\"\n placement=\"top\"\n :message=\"dndTextTooltip\"\n >\n <template #anchor>\n <div\n ref=\"d-recipe-leftbar-row-dnd\"\n class=\"d-recipe-leftbar-row__dnd\"\n data-qa=\"dt-recipe-leftbar-row-dnd\"\n >\n {{ dndText }}\n </div>\n </template>\n </dt-tooltip>\n <div\n v-if=\"activeVoiceChat\"\n v-dt-tooltip=\"activeVoiceChatTooltip\"\n class=\"d-recipe-leftbar-row__active-voice\"\n >\n <dt-icon-waveform\n size=\"300\"\n />\n </div>\n <dt-tooltip\n v-else-if=\"showUnreadCount || showUnreadMentionCount\"\n :message=\"unreadCountTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-badge\n v-if=\"showUnreadCount\"\n kind=\"count\"\n type=\"bulletin\"\n data-qa=\"dt-recipe-leftbar-row-unread-badge\"\n :class=\"['d-recipe-leftbar-row__unread-badge', {\n 'd-recipe-leftbar-row__unread-count-badge':\n shouldApplyCustomStyleForCountBadge,\n }]\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-badge\n v-if=\"showUnreadMentionCount\"\n kind=\"count\"\n type=\"bulletin\"\n data-qa=\"dt-recipe-leftbar-row-unread-mention-badge\"\n :class=\"['d-recipe-leftbar-row__unread-badge',\n { 'd-recipe-leftbar-row__unread-mention-count-badge': shouldApplyCustomStyleForCountBadge },\n { 'd-recipe-leftbar-row__unread-mention-only-count-badge': shouldApplyCustomStyleForMentionOnly },\n ]\"\n >\n {{ unreadMentionCount }}\n </dt-badge>\n </template>\n </dt-tooltip>\n <div\n v-if=\"hasCallButton\"\n class=\"d-recipe-leftbar-row__action\"\n data-qa=\"dt-recipe-leftbar-row-action\"\n >\n <dt-tooltip\n :message=\"callButtonTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n class=\"d-recipe-leftbar-row__action-button\"\n data-qa=\"dt-recipe-leftbar-row-action-call-button\"\n circle\n size=\"xs\"\n kind=\"inverted\"\n :aria-label=\"callButtonTooltip\"\n @focus=\"actionFocused = true\"\n @blur=\"actionFocused = false\"\n @click.stop=\"$emit('call', $event)\"\n >\n <template #icon>\n <dt-icon-phone\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n </div>\n </div>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n LEFTBAR_GENERAL_ROW_TYPES,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR,\n LEFTBAR_GENERAL_ROW_ICON_SIZES,\n} from './general_row_constants';\nimport { DtBadge } from '@/components/badge';\nimport { DtIconPhone, DtIconWaveform } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport { DtEmojiTextWrapper } from '@/components/emoji_text_wrapper';\nimport DtRecipeLeftbarGeneralRowIcon from './leftbar_general_row_icon.vue';\nimport { safeConcatStrings } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeGeneralRow',\n\n components: {\n DtEmojiTextWrapper,\n DtBadge,\n DtButton,\n DtTooltip,\n DtIconPhone,\n DtIconWaveform,\n DtRecipeLeftbarGeneralRowIcon,\n },\n\n mixins: [DtLocalizationMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Determines the icon to show.\n * If type is contact center, the color prop must be provided and will determine the color of the icon\n */\n type: {\n type: String,\n default: 'inbox',\n validator: (type) => {\n return Object.values(LEFTBAR_GENERAL_ROW_TYPES).includes(type);\n },\n },\n\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required. Even if you are overriding this field using the label slot\n * you still must input this as it will be displayed as the \"title\" attribute for the row.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines the color of the contact center icon\n */\n color: {\n type: String,\n default: null,\n validator: (color) => {\n return Object.keys(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(color);\n },\n },\n\n /**\n * The channel setting, either 'mention' or 'always'.\n * @values 'mention', 'always', null.\n */\n channelSetting: {\n type: String,\n default: null,\n },\n\n /**\n * Styles the row with an increased font weight to convey it has unreads. This must be true to see\n * the unread count badge.\n */\n hasUnreads: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: String,\n default: null,\n },\n\n /**\n * Number of unread mention messages\n */\n unreadMentionCount: {\n type: String,\n default: null,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Gives a faded style to be used when muted\n */\n muted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows styling to represent an active voice chat. This will display over unreadCount.\n */\n activeVoiceChat: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Acronym used to represent \"Do not Disturb\" state. If entered will display the entered text alongside\n * unreadCount.\n */\n dndText: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the row should have a call button. Usually only applicable to individual contact rows.\n */\n hasCallButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows an \"is typing\" animation over the avatar when true.\n */\n isTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the size of the icon.\n */\n iconSize: {\n type: String,\n default: '300',\n validator: (size) => {\n return LEFTBAR_GENERAL_ROW_ICON_SIZES.includes(size);\n },\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Call button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'call',\n ],\n\n data () {\n return {\n actionFocused: false,\n labelWidth: '100%',\n };\n },\n\n computed: {\n leftbarGeneralRowClasses () {\n return [\n 'd-recipe-leftbar-row',\n {\n 'd-recipe-leftbar-row--no-action': !this.hasCallButton,\n 'd-recipe-leftbar-row--has-unread': this.hasUnreads,\n 'd-recipe-leftbar-row__unread-count': this.showUnreadCount || this.showUnreadMentionCount,\n 'd-recipe-leftbar-row--selected': this.selected,\n 'd-recipe-leftbar-row--muted': this.muted,\n 'd-recipe-leftbar-row--action-focused': this.actionFocused,\n },\n ];\n },\n\n getIcon () {\n switch (this.type) {\n case LEFTBAR_GENERAL_ROW_TYPES.CHANNELS:\n if (this.hasUnreads) return 'channel unread';\n break;\n case LEFTBAR_GENERAL_ROW_TYPES.LOCKED_CHANNEL:\n if (this.hasUnreads) return 'locked channel unread';\n break;\n }\n return this.type;\n },\n\n getAriaLabel () {\n if (this.ariaLabel) return this.ariaLabel;\n\n return safeConcatStrings([\n this.typingTooltip,\n this.description,\n this.unreadCountTooltip,\n this.dndTextTooltip,\n this.activeVoiceChatTooltip,\n ]);\n },\n\n hasActions () {\n return this.dndText || this.activeVoiceChat || this.showUnreadCount || this.hasCallButton ||\n this.showUnreadMentionCount;\n },\n\n showUnreadCount () {\n return !!this.unreadCount && this.hasUnreads;\n },\n\n showUnreadMentionCount () {\n return !!this.unreadMentionCount && this.hasUnreads;\n },\n\n hasUnreadCount () {\n return this.unreadCount !== null;\n },\n\n hasUnreadMentionCount () {\n return this.unreadMentionCount !== null;\n },\n\n shouldApplyCustomStyleForCountBadge () {\n return this.hasUnreadCount && this.hasUnreadMentionCount;\n },\n\n /**\n * When a channel in 'always' setting, meaning the user should see both unread count and unread mention count,\n * if there are only mention messages, we should apply the theme design tokens var(--dt-theme-mention-color-[background||foreground]-strong).\n * @returns {boolean}\n */\n shouldApplyCustomStyleForMentionOnly () {\n return this.channelSetting === 'always' && !this.hasUnreadCount && this.hasUnreadMentionCount;\n },\n\n messageCount () {\n return isNaN(this.unreadCount)\n ? this.unreadCount\n : Number(this.unreadCount);\n },\n\n mentionCount () {\n return isNaN(this.unreadMentionCount)\n ? this.unreadMentionCount\n : Number(this.unreadMentionCount);\n },\n\n unreadCountTooltip () {\n return safeConcatStrings([\n this.unreadCount && this.i18n.$t('DIALTONE_UNREAD_MESSAGE_COUNT_TEXT', { unreadCount: this.messageCount }),\n this.unreadMentionCount && this.i18n.$t('DIALTONE_UNREAD_MENTION_COUNT_TEXT', { unreadCount: this.mentionCount }),\n ]);\n },\n\n dndTextTooltip () {\n return this.dndText && this.i18n.$t('DIALTONE_GENERAL_ROW_DND_TEXT_TOOLTIP');\n },\n\n activeVoiceChatTooltip () {\n return this.activeVoiceChat && this.i18n.$t('DIALTONE_GENERAL_ROW_ACTIVE_VOICE_CHAT_TEXT');\n },\n\n callButtonTooltip () {\n return this.i18n.$t('DIALTONE_GENERAL_ROW_CALL_BUTTON_TOOLTIP');\n },\n\n typingTooltip () {\n return this.isTyping && this.i18n.$t('DIALTONE_TYPING_TEXT');\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n async handler () {\n this.validateProps();\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(this.$el);\n this.adjustLabelWidth();\n },\n\n beforeDestroy: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n validateProps () {\n if (this.type === LEFTBAR_GENERAL_ROW_TYPES.CONTACT_CENTER &&\n !Object.keys(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS).includes(this.color)) {\n console.error(LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR);\n }\n },\n\n adjustLabelWidth () {\n const labelWidth = this.$el?.querySelector('.d-recipe-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.d-recipe-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.d-recipe-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 16;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtEmojiTextWrapper","DtBadge","DtButton","DtTooltip","DtIconPhone","DtIconWaveform","DtRecipeLeftbarGeneralRowIcon","DtLocalizationMixin","type","LEFTBAR_GENERAL_ROW_TYPES","color","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS","size","LEFTBAR_GENERAL_ROW_ICON_SIZES","safeConcatStrings","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR","labelWidth","_b","_a","omegaWidth","_d","_c","alphaWidth","_f","_e","paddings"],"mappings":";;;;;;;;;;AAkKA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,+BAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACA,OAAA,OAAAC,CAAA,EAAA,SAAAD,CAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAE,MACA,OAAA,KAAAC,CAAA,EAAA,SAAAD,CAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IA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AAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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 r=require("@dialpad/dialtone-icons/vue2"),n=require("../../common/utils/index.cjs"),i=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),o=require("../general-row/general-row.cjs"),s=require("../../common/mixins/localization.cjs"),u={name:"DtRecipeGroupRow",components:{DtIconUsers:r.DtIconUsers,DtRecipeGeneralRow:o.default},mixins:[s.default],inheritAttrs:!1,props:{names:{type:String,required:!0},unreadCount:{type:String,default:null},unreadMentionCount:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1}},emits:["click"],computed:{groupCount(){return this.names.split(",").length},messageCount(){return isNaN(this.unreadCount)?this.unreadCount:Number(this.unreadCount)},mentionCount(){return isNaN(this.unreadMentionCount)?this.unreadMentionCount:Number(this.unreadMentionCount)},unreadCountTooltip(){return n.safeConcatStrings([this.unreadCount&&this.i18n.$t("DIALTONE_UNREAD_MESSAGE_COUNT_TEXT",{unreadCount:this.messageCount}),this.unreadMentionCount&&this.i18n.$t("DIALTONE_UNREAD_MENTION_COUNT_TEXT",{unreadCount:this.mentionCount})])},typingTooltip(){return this.isTyping&&this.i18n.$t("DIALTONE_TYPING_TEXT")},ariaLabel(){return n.safeConcatStrings([this.typingTooltip,this.i18n.$t("DIALTONE_GROUP_ROW_GROUP_COUNT_TEXT",{count:this.groupCount}),this.names,this.unreadCountTooltip])}}};var a=function(){var e=this,t=e._self._c;return t("dt-recipe-general-row",e._g(e._b({attrs:{description:e.names,"aria-label":e.ariaLabel,"unread-count":e.unreadCount,"has-unreads":e.hasUnreads,"unread-mention-count":e.unreadMentionCount,selected:e.selected,"is-typing":e.isTyping},scopedSlots:e._u([{key:"left",fn:function(){return[t("dt-icon-users",{attrs:{size:"300"}})]},proxy:!0}])},"dt-recipe-general-row",e.$attrs,!1),e.$listeners))},l=[],d=i.n(u,a,l);const _=d.exports;exports.default=_;
|
|
2
2
|
//# sourceMappingURL=group-row.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-row.cjs","sources":["../../../recipes/leftbar/group_row/group_row.vue"],"sourcesContent":["<template>\n <dt-recipe-general-row\n :description=\"names\"\n :aria-label=\"ariaLabel\"\n :unread-count=\"unreadCount\"\n :has-unreads=\"hasUnreads\"\n :unread-
|
|
1
|
+
{"version":3,"file":"group-row.cjs","sources":["../../../recipes/leftbar/group_row/group_row.vue"],"sourcesContent":["<template>\n <dt-recipe-general-row\n :description=\"names\"\n :aria-label=\"ariaLabel\"\n :unread-count=\"unreadCount\"\n :has-unreads=\"hasUnreads\"\n :unread-mention-count=\"unreadMentionCount\"\n :selected=\"selected\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <template #left>\n <dt-icon-users\n size=\"300\"\n />\n </template>\n </dt-recipe-general-row>\n</template>\n\n<script>\nimport { DtRecipeGeneralRow } from '@/recipes/leftbar/general_row';\nimport { DtIconUsers } from '@dialpad/dialtone-icons/vue2';\nimport { safeConcatStrings } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeGroupRow',\n\n components: {\n DtIconUsers,\n DtRecipeGeneralRow,\n },\n\n mixins: [DtLocalizationMixin],\n\n inheritAttrs: false,\n\n props: {\n\n /**\n * Names of the group members\n */\n names: {\n type: String,\n required: true,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: String,\n default: null,\n },\n\n /**\n * Number of unread mention messages\n */\n unreadMentionCount: {\n type: String,\n default: null,\n },\n\n /**\n * Styles the row with an increased font weight to convey it has unreads. This must be true to see\n * the unread count badge.\n */\n hasUnreads: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows an \"is typing\" animation over the avatar when true.\n */\n isTyping: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n groupCount () {\n return this.names.split(',').length;\n },\n\n messageCount () {\n return isNaN(this.unreadCount)\n ? this.unreadCount\n : Number(this.unreadCount);\n },\n\n mentionCount () {\n return isNaN(this.unreadMentionCount)\n ? this.unreadMentionCount\n : Number(this.unreadMentionCount);\n },\n\n unreadCountTooltip () {\n return safeConcatStrings([\n this.unreadCount && this.i18n.$t('DIALTONE_UNREAD_MESSAGE_COUNT_TEXT', { unreadCount: this.messageCount }),\n this.unreadMentionCount && this.i18n.$t('DIALTONE_UNREAD_MENTION_COUNT_TEXT', { unreadCount: this.mentionCount }),\n ]);\n },\n\n typingTooltip () {\n return this.isTyping && this.i18n.$t('DIALTONE_TYPING_TEXT');\n },\n\n ariaLabel () {\n return safeConcatStrings([\n this.typingTooltip,\n this.i18n.$t('DIALTONE_GROUP_ROW_GROUP_COUNT_TEXT', { count: this.groupCount }),\n this.names,\n this.unreadCountTooltip,\n ]);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconUsers","DtRecipeGeneralRow","DtLocalizationMixin","safeConcatStrings"],"mappings":"4VA0BAA,EAAA,CACA,KAAA,mBAEA,WAAA,CACA,YAAAC,EAAA,YACA,mBAAAC,EAAA,OACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,aAAA,GAEA,MAAA,CAKA,MAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,YAAA,CACA,KAAA,OACA,QAAA,IACA,EAKA,mBAAA,CACA,KAAA,OACA,QAAA,IACA,EAMA,WAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,SAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CAOA,OACA,EAEA,SAAA,CACA,YAAA,CACA,OAAA,KAAA,MAAA,MAAA,GAAA,EAAA,MACA,EAEA,cAAA,CACA,OAAA,MAAA,KAAA,WAAA,EACA,KAAA,YACA,OAAA,KAAA,WAAA,CACA,EAEA,cAAA,CACA,OAAA,MAAA,KAAA,kBAAA,EACA,KAAA,mBACA,OAAA,KAAA,kBAAA,CACA,EAEA,oBAAA,CACA,OAAAC,oBAAA,CACA,KAAA,aAAA,KAAA,KAAA,GAAA,qCAAA,CAAA,YAAA,KAAA,aAAA,EACA,KAAA,oBAAA,KAAA,KAAA,GAAA,qCAAA,CAAA,YAAA,KAAA,aAAA,CACA,CAAA,CACA,EAEA,eAAA,CACA,OAAA,KAAA,UAAA,KAAA,KAAA,GAAA,sBAAA,CACA,EAEA,WAAA,CACA,OAAAA,oBAAA,CACA,KAAA,cACA,KAAA,KAAA,GAAA,sCAAA,CAAA,MAAA,KAAA,WAAA,EACA,KAAA,MACA,KAAA,kBACA,CAAA,CACA,CACA,CACA"}
|