@dialpad/dialtone 9.71.0-beta.2 → 9.71.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/dist/tokens/doc.json +9757 -9757
- package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
- package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
- package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
- package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
- package/dist/vue3/common/storybook_utils.cjs +8 -0
- package/dist/vue3/common/storybook_utils.cjs.map +1 -0
- package/dist/vue3/common/storybook_utils.js +8 -0
- package/dist/vue3/common/storybook_utils.js.map +1 -0
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/avatar/avatar.vue.cjs +41 -30
- package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
- package/dist/vue3/components/avatar/avatar.vue.js +43 -32
- package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
- package/dist/vue3/components/chip/chip.vue.cjs +7 -4
- package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
- package/dist/vue3/components/chip/chip.vue.js +7 -4
- package/dist/vue3/components/chip/chip.vue.js.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.cjs +6 -12
- package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.js +6 -12
- package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +17 -5
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +17 -5
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +9 -3
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +9 -3
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +5 -4
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/vue3/components/image_viewer/image_viewer.vue.js +5 -4
- package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.cjs +5 -4
- package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.js +5 -4
- package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue3/components/modal/modal.vue.cjs +7 -4
- package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
- package/dist/vue3/components/modal/modal.vue.js +7 -4
- package/dist/vue3/components/modal/modal.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.cjs +7 -4
- package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.js +7 -4
- package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.cjs +15 -10
- package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.js +15 -10
- package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs +7 -4
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.js +7 -4
- package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -4
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -4
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +11 -7
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +11 -7
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +7 -4
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +7 -4
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +7 -14
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +8 -15
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +6 -4
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +6 -4
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +12 -6
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +12 -6
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +7 -27
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +8 -28
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +4 -13
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +5 -14
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +7 -13
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +8 -14
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +13 -9
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +13 -9
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +5 -4
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +5 -4
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +7 -4
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +7 -4
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
- package/dist/vue3/style.css +111 -111
- package/dist/vue3/types/common/storybook_utils.d.ts +25 -0
- package/dist/vue3/types/common/storybook_utils.d.ts.map +1 -0
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts +34 -6
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts +8 -2
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts +4 -5
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -0
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -3
- package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -0
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general_row.vue.cjs","sources":["../../../../recipes/leftbar/general_row/general_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"leftbarGeneralRowClasses\"\n data-qa=\"dt-leftbar-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"'data-qa' in $attrs ? $attrs['data-qa'] : 'dt-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=\"generalRowListeners\"\n >\n <div\n class=\"dt-leftbar-row__alpha\"\n >\n <div\n v-if=\"isTyping\"\n class=\"dt-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-leftbar-row-icon\"\n />\n </slot>\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <slot name=\"label\">\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-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=\"dt-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=\"dt-leftbar-row-dnd\"\n class=\"dt-leftbar-row__dnd\"\n data-qa=\"dt-leftbar-row-dnd\"\n >\n {{ dndText }}\n </div>\n </template>\n </dt-tooltip>\n <div\n v-if=\"activeVoiceChat\"\n class=\"dt-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-leftbar-row-unread-badge\"\n :class=\"['dt-leftbar-row__unread-badge', {\n 'dt-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-leftbar-row-unread-mention-badge\"\n :class=\"['dt-leftbar-row__unread-badge',\n { 'dt-leftbar-row__unread-mention-count-badge': shouldApplyCustomStyleForCountBadge },\n { 'dt-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=\"dt-leftbar-row__action\"\n data-qa=\"dt-leftbar-row-action\"\n >\n <dt-tooltip\n :message=\"callButtonTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n class=\"dt-leftbar-row__action-button\"\n data-qa=\"dt-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/vue3';\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 { extractVueListeners, 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 * 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 'dt-leftbar-row',\n {\n 'dt-leftbar-row--no-action': !this.hasCallButton,\n 'dt-leftbar-row--has-unread': this.hasUnreads,\n 'dt-leftbar-row--unread-count': this.showUnreadCount || this.showUnreadMentionCount,\n 'dt-leftbar-row--selected': this.selected,\n 'dt-leftbar-row--muted': this.muted,\n 'dt-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 generalRowListeners () {\n return extractVueListeners(this.$attrs);\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 beforeUnmount: 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('.dt-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 16;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n@import \"../style/leftbar_row.less\";\n</style>\n"],"names":["DtEmojiTextWrapper","DtBadge","DtButton","DtTooltip","DtIconPhone","DtIconWaveform","DtRecipeLeftbarGeneralRowIcon","LEFTBAR_GENERAL_ROW_TYPES","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS","LEFTBAR_GENERAL_ROW_ICON_SIZES","extractVueListeners","safeConcatStrings","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR","_createElementVNode","_createElementBlock","_mergeProps","_toHandlers","_openBlock","_renderSlot","_createVNode","_createBlock","_normalizeClass","_withModifiers"],"mappings":";;;;;;;;;;;;AA+JA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,oBAAAA;AAAAA,IACA,SAAAC;AAAAA,IACA,UAAAC;AAAAA,IACA,WAAAC;AAAAA,iBACAC,KAAW;AAAA,IACX,gBAAAC,KAAc;AAAA,mCACdC;AAAAA,EACD;AAAA,EAED,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS;AACnB,eAAO,OAAO,OAAOC,sBAAAA,yBAAyB,EAAE,SAAS,IAAI;AAAA,MAC9D;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,OAAO,KAAKC,sBAAAA,yCAAyC,EAAE,SAA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,QAAQ;AAAA,cACT,MAAK;AAAA,cACL,MAAK;AAAA,cACJ,cAAY,OAAiB;AAAA,cAC7B,+CAAO,MAAa,gBAAA;AAAA,cACpB,8CAAM,MAAa,gBAAA;AAAA,cACnB,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAG,kBAAA,YAAO,KAAK,MAAA,QAAS,MAAM,GAAA,CAAA,MAAA,CAAA;AAAA;cAEtB,kBACT,MAEE;AAAA,gBAFFH,IAAAA,YAEE,0BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"general_row.vue.cjs","sources":["../../../../recipes/leftbar/general_row/general_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"leftbarGeneralRowClasses\"\n data-qa=\"dt-leftbar-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"'data-qa' in $attrs ? $attrs['data-qa'] : 'dt-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=\"generalRowListeners\"\n >\n <div\n class=\"dt-leftbar-row__alpha\"\n >\n <div\n v-if=\"isTyping\"\n class=\"dt-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-leftbar-row-icon\"\n />\n </slot>\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <slot name=\"label\">\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-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=\"dt-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=\"dt-leftbar-row-dnd\"\n class=\"dt-leftbar-row__dnd\"\n data-qa=\"dt-leftbar-row-dnd\"\n >\n {{ dndText }}\n </div>\n </template>\n </dt-tooltip>\n <div\n v-if=\"activeVoiceChat\"\n class=\"dt-leftbar-row__active-voice\"\n >\n <dt-icon\n size=\"300\"\n name=\"waveform\"\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-leftbar-row-unread-badge\"\n :class=\"['dt-leftbar-row__unread-badge', {\n 'dt-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-leftbar-row-unread-mention-badge\"\n :class=\"['dt-leftbar-row__unread-badge',\n { 'dt-leftbar-row__unread-mention-count-badge': shouldApplyCustomStyleForCountBadge },\n { 'dt-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=\"dt-leftbar-row__action\"\n data-qa=\"dt-leftbar-row-action\"\n >\n <dt-tooltip\n :message=\"callButtonTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n class=\"dt-leftbar-row__action-button\"\n data-qa=\"dt-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\n name=\"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 { DtIcon } from '@/components/icon';\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 { extractVueListeners, safeConcatStrings } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeGeneralRow',\n\n components: {\n DtEmojiTextWrapper,\n DtBadge,\n DtIcon,\n DtButton,\n DtTooltip,\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 * 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 'dt-leftbar-row',\n {\n 'dt-leftbar-row--no-action': !this.hasCallButton,\n 'dt-leftbar-row--has-unread': this.hasUnreads,\n 'dt-leftbar-row--unread-count': this.showUnreadCount || this.showUnreadMentionCount,\n 'dt-leftbar-row--selected': this.selected,\n 'dt-leftbar-row--muted': this.muted,\n 'dt-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 generalRowListeners () {\n return extractVueListeners(this.$attrs);\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 beforeUnmount: 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('.dt-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 16;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n@import \"../style/leftbar_row.less\";\n</style>\n"],"names":["DtEmojiTextWrapper","DtBadge","DtIcon","DtButton","DtTooltip","DtRecipeLeftbarGeneralRowIcon","LEFTBAR_GENERAL_ROW_TYPES","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS","LEFTBAR_GENERAL_ROW_ICON_SIZES","extractVueListeners","safeConcatStrings","LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR","_createElementVNode","_createElementBlock","_mergeProps","_toHandlers","_openBlock","_renderSlot","_createVNode","_createBlock","_normalizeClass","_withModifiers"],"mappings":";;;;;;;;;;;;AAiKA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,oBAAAA;AAAAA,IACA,SAAAC;AAAAA,IACA,QAAAC;AAAAA,IACA,UAAAC;AAAAA,IACA,WAAAC;AAAAA,mCACAC;AAAAA,EACD;AAAA,EAED,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS;AACnB,eAAO,OAAO,OAAOC,sBAAAA,yBAAyB,EAAE,SAAS,IAAI;AAAA,MAC9D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,qCAAA;AAAA;;iCAKnQ,MAAwB;AAAA,sDAArB,OAAkB,kBAAA,GAAA,CAAA;AAAA;;;;;;MAKnB,OAAa,iBADrBJ,IAAAA,aAAAH,IAAAA,mBA8BM,OA9BN,aA8BM;AAAA,QAzBJK,IAAAA,YAwBa,uBAAA;AAAA,UAvBV,SAAS,OAAiB;AAAA,UAC3B,WAAU;AAAA;UAEC,oBACT,MAiBY;AAAA,YAjBZA,IAAAA,YAiBY,sBAAA;AAAA,cAhBV,OAAM;AAAA,cACN,WAAQ;AAAA,cACP,QAAQ;AAAA,cACT,MAAK;AAAA,cACL,MAAK;AAAA,cACJ,cAAY,OAAiB;AAAA,cAC7B,+CAAO,MAAa,gBAAA;AAAA,cACpB,8CAAM,MAAa,gBAAA;AAAA,cACnB,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAG,kBAAA,YAAO,KAAK,MAAA,QAAS,MAAM,GAAA,CAAA,MAAA,CAAA;AAAA;cAEtB,kBACT,MAGE;AAAA,gBAHFH,IAAAA,YAGE,oBAAA;AAAA,kBAFA,MAAK;AAAA,kBACL,MAAK;AAAA;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LEFTBAR_GENERAL_ROW_TYPES, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS, LEFTBAR_GENERAL_ROW_ICON_SIZES, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR } from "./general_row_constants.js";
|
|
2
|
-
import { DtIconPhone, DtIconWaveform } from "@dialpad/dialtone-icons/vue3";
|
|
3
2
|
import DtEmojiTextWrapper from "../../../components/emoji_text_wrapper/emoji_text_wrapper.vue.js";
|
|
4
3
|
import DtRecipeLeftbarGeneralRowIcon from "./leftbar_general_row_icon.vue.js";
|
|
5
4
|
import { extractVueListeners, safeConcatStrings } from "../../../common/utils.js";
|
|
@@ -7,6 +6,7 @@ import { resolveComponent, openBlock, createElementBlock, normalizeClass, create
|
|
|
7
6
|
/* empty css */
|
|
8
7
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
8
|
import DtBadge from "../../../components/badge/badge.vue.js";
|
|
9
|
+
import DtIcon from "../../../components/icon/icon.vue.js";
|
|
10
10
|
import DtButton from "../../../components/button/button.vue.js";
|
|
11
11
|
import DtTooltip from "../../../components/tooltip/tooltip.vue.js";
|
|
12
12
|
const _sfc_main = {
|
|
@@ -14,10 +14,9 @@ const _sfc_main = {
|
|
|
14
14
|
components: {
|
|
15
15
|
DtEmojiTextWrapper,
|
|
16
16
|
DtBadge,
|
|
17
|
+
DtIcon,
|
|
17
18
|
DtButton,
|
|
18
19
|
DtTooltip,
|
|
19
|
-
DtIconPhone,
|
|
20
|
-
DtIconWaveform,
|
|
21
20
|
DtRecipeLeftbarGeneralRowIcon
|
|
22
21
|
},
|
|
23
22
|
inheritAttrs: false,
|
|
@@ -271,7 +270,7 @@ const _sfc_main = {
|
|
|
271
270
|
}
|
|
272
271
|
}
|
|
273
272
|
};
|
|
274
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
273
|
+
const _withScopeId = (n) => (pushScopeId("data-v-b6629526"), n = n(), popScopeId(), n);
|
|
275
274
|
const _hoisted_1 = ["data-qa", "aria-label", "title", "href"];
|
|
276
275
|
const _hoisted_2 = { class: "dt-leftbar-row__alpha" };
|
|
277
276
|
const _hoisted_3 = {
|
|
@@ -303,9 +302,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
303
302
|
const _component_dt_recipe_leftbar_general_row_icon = resolveComponent("dt-recipe-leftbar-general-row-icon");
|
|
304
303
|
const _component_dt_emoji_text_wrapper = resolveComponent("dt-emoji-text-wrapper");
|
|
305
304
|
const _component_dt_tooltip = resolveComponent("dt-tooltip");
|
|
306
|
-
const
|
|
305
|
+
const _component_dt_icon = resolveComponent("dt-icon");
|
|
307
306
|
const _component_dt_badge = resolveComponent("dt-badge");
|
|
308
|
-
const _component_dt_icon_phone = resolveComponent("dt-icon-phone");
|
|
309
307
|
const _component_dt_button = resolveComponent("dt-button");
|
|
310
308
|
return openBlock(), createElementBlock("div", {
|
|
311
309
|
class: normalizeClass($options.leftbarGeneralRowClasses),
|
|
@@ -362,7 +360,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
362
360
|
_: 1
|
|
363
361
|
}, 8, ["message"])) : createCommentVNode("", true),
|
|
364
362
|
$props.activeVoiceChat ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
365
|
-
createVNode(
|
|
363
|
+
createVNode(_component_dt_icon, {
|
|
364
|
+
size: "300",
|
|
365
|
+
name: "waveform"
|
|
366
|
+
})
|
|
366
367
|
])) : $options.showUnreadCount || $options.showUnreadMentionCount ? (openBlock(), createBlock(_component_dt_tooltip, {
|
|
367
368
|
key: 2,
|
|
368
369
|
message: $props.unreadCountTooltip,
|
|
@@ -420,7 +421,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
420
421
|
onClick: _cache[2] || (_cache[2] = withModifiers(($event) => _ctx.$emit("call", $event), ["stop"]))
|
|
421
422
|
}, {
|
|
422
423
|
icon: withCtx(() => [
|
|
423
|
-
createVNode(
|
|
424
|
+
createVNode(_component_dt_icon, {
|
|
425
|
+
name: "phone",
|
|
426
|
+
size: "200"
|
|
427
|
+
})
|
|
424
428
|
]),
|
|
425
429
|
_: 1
|
|
426
430
|
}, 8, ["aria-label"])
|
|
@@ -431,7 +435,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
431
435
|
])) : createCommentVNode("", true)
|
|
432
436
|
], 2);
|
|
433
437
|
}
|
|
434
|
-
const DtRecipeGeneralRow = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
438
|
+
const DtRecipeGeneralRow = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b6629526"]]);
|
|
435
439
|
export {
|
|
436
440
|
DtRecipeGeneralRow as default
|
|
437
441
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general_row.vue.js","sources":["../../../../recipes/leftbar/general_row/general_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"leftbarGeneralRowClasses\"\n data-qa=\"dt-leftbar-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"'data-qa' in $attrs ? $attrs['data-qa'] : 'dt-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=\"generalRowListeners\"\n >\n <div\n class=\"dt-leftbar-row__alpha\"\n >\n <div\n v-if=\"isTyping\"\n class=\"dt-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-leftbar-row-icon\"\n />\n </slot>\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <slot name=\"label\">\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-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=\"dt-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=\"dt-leftbar-row-dnd\"\n class=\"dt-leftbar-row__dnd\"\n data-qa=\"dt-leftbar-row-dnd\"\n >\n {{ dndText }}\n </div>\n </template>\n </dt-tooltip>\n <div\n v-if=\"activeVoiceChat\"\n class=\"dt-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-leftbar-row-unread-badge\"\n :class=\"['dt-leftbar-row__unread-badge', {\n 'dt-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-leftbar-row-unread-mention-badge\"\n :class=\"['dt-leftbar-row__unread-badge',\n { 'dt-leftbar-row__unread-mention-count-badge': shouldApplyCustomStyleForCountBadge },\n { 'dt-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=\"dt-leftbar-row__action\"\n data-qa=\"dt-leftbar-row-action\"\n >\n <dt-tooltip\n :message=\"callButtonTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n class=\"dt-leftbar-row__action-button\"\n data-qa=\"dt-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/vue3';\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 { extractVueListeners, 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 * 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 'dt-leftbar-row',\n {\n 'dt-leftbar-row--no-action': !this.hasCallButton,\n 'dt-leftbar-row--has-unread': this.hasUnreads,\n 'dt-leftbar-row--unread-count': this.showUnreadCount || this.showUnreadMentionCount,\n 'dt-leftbar-row--selected': this.selected,\n 'dt-leftbar-row--muted': this.muted,\n 'dt-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 generalRowListeners () {\n return extractVueListeners(this.$attrs);\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 beforeUnmount: 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('.dt-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 16;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n@import \"../style/leftbar_row.less\";\n</style>\n"],"names":["_createElementVNode","_createElementBlock","_mergeProps","_toHandlers","_openBlock","_renderSlot","_createVNode","_createBlock","_normalizeClass","_withModifiers"],"mappings":";;;;;;;;;;;AA+JA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS;AACnB,eAAO,OAAO,OAAO,yBAAyB,EAAE,SAAS,IAAI;AAAA,MAC9D;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,OAAO,KAAK,yCAAyC,EAAE,SAAS,KAAK;AAAA,MAC7E;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IA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AAkB;AAAA,QAC5B,WAAU;AAAA;QAEC,gBACT,MAWW;AAAA,UAVH,SAAe,gCADvBA,YAWW,qBAAA;AAAA;YATT,MAAK;AAAA,YACL,MAAK;AAAA,YACL,WAAQ;AAAA,YACP,OAAKC,eAAA,CAAA,gCAAA;AAAA,oDAAyG,SAAmC;AAAA;;6BAKlJ,MAAiB;AAAA,8CAAd,OAAW,WAAA,GAAA,CAAA;AAAA;;;UAGR,SAAsB,uCAD9BD,YAWW,qBAAA;AAAA;YATT,MAAK;AAAA,YACL,MAAK;AAAA,YACL,WAAQ;AAAA,YACP,OAAKC,eAAA;AAAA,cAAA;AAAA,8DAAwG,SAAmC,oCAAA;AAAA,mEAA8E,SAAoC,qCAAA;AAAA;;6BAKnQ,MAAwB;AAAA,8CAArB,OAAkB,kBAAA,GAAA,CAAA;AAAA;;;;;;MAKnB,OAAa,iBADrBJ,aAAAH,mBA6BM,OA7BN,aA6BM;AAAA,QAxBJK,YAuBa,uBAAA;AAAA,UAtBV,SAAS,OAAiB;AAAA,UAC3B,WAAU;AAAA;UAEC,gBACT,MAgBY;AAAA,YAhBZA,YAgBY,sBAAA;AAAA,cAfV,OAAM;AAAA,cACN,WAAQ;AAAA,cACP,QAAQ;AAAA,cACT,MAAK;AAAA,cACL,MAAK;AAAA,cACJ,cAAY,OAAiB;AAAA,cAC7B,+CAAO,MAAa,gBAAA;AAAA,cACpB,8CAAM,MAAa,gBAAA;AAAA,cACnB,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAG,cAAA,YAAO,KAAK,MAAA,QAAS,MAAM,GAAA,CAAA,MAAA,CAAA;AAAA;cAEtB,cACT,MAEE;AAAA,gBAFFH,YAEE,0BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"general_row.vue.js","sources":["../../../../recipes/leftbar/general_row/general_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"leftbarGeneralRowClasses\"\n data-qa=\"dt-leftbar-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"'data-qa' in $attrs ? $attrs['data-qa'] : 'dt-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=\"generalRowListeners\"\n >\n <div\n class=\"dt-leftbar-row__alpha\"\n >\n <div\n v-if=\"isTyping\"\n class=\"dt-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-leftbar-row-icon\"\n />\n </slot>\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <slot name=\"label\">\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-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=\"dt-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=\"dt-leftbar-row-dnd\"\n class=\"dt-leftbar-row__dnd\"\n data-qa=\"dt-leftbar-row-dnd\"\n >\n {{ dndText }}\n </div>\n </template>\n </dt-tooltip>\n <div\n v-if=\"activeVoiceChat\"\n class=\"dt-leftbar-row__active-voice\"\n >\n <dt-icon\n size=\"300\"\n name=\"waveform\"\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-leftbar-row-unread-badge\"\n :class=\"['dt-leftbar-row__unread-badge', {\n 'dt-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-leftbar-row-unread-mention-badge\"\n :class=\"['dt-leftbar-row__unread-badge',\n { 'dt-leftbar-row__unread-mention-count-badge': shouldApplyCustomStyleForCountBadge },\n { 'dt-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=\"dt-leftbar-row__action\"\n data-qa=\"dt-leftbar-row-action\"\n >\n <dt-tooltip\n :message=\"callButtonTooltip\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n class=\"dt-leftbar-row__action-button\"\n data-qa=\"dt-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\n name=\"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 { DtIcon } from '@/components/icon';\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 { extractVueListeners, safeConcatStrings } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeGeneralRow',\n\n components: {\n DtEmojiTextWrapper,\n DtBadge,\n DtIcon,\n DtButton,\n DtTooltip,\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 * 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 'dt-leftbar-row',\n {\n 'dt-leftbar-row--no-action': !this.hasCallButton,\n 'dt-leftbar-row--has-unread': this.hasUnreads,\n 'dt-leftbar-row--unread-count': this.showUnreadCount || this.showUnreadMentionCount,\n 'dt-leftbar-row--selected': this.selected,\n 'dt-leftbar-row--muted': this.muted,\n 'dt-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 generalRowListeners () {\n return extractVueListeners(this.$attrs);\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 beforeUnmount: 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('.dt-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 16;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n@import \"../style/leftbar_row.less\";\n</style>\n"],"names":["_createElementVNode","_createElementBlock","_mergeProps","_toHandlers","_openBlock","_renderSlot","_createVNode","_createBlock","_normalizeClass","_withModifiers"],"mappings":";;;;;;;;;;;AAiKA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS;AACnB,eAAO,OAAO,OAAO,yBAAyB,EAAE,SAAS,IAAI;AAAA,MAC9D;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,OAAO,KAAK,yCAAyC,EAAE,SAAS,KAAK;AAAA,MAC7E;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;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AAAA,8CAAd,OAAW,WAAA,GAAA,CAAA;AAAA;;;UAGR,SAAsB,uCAD9BD,YAWW,qBAAA;AAAA;YATT,MAAK;AAAA,YACL,MAAK;AAAA,YACL,WAAQ;AAAA,YACP,OAAKC,eAAA;AAAA,cAAA;AAAA,8DAAwG,SAAmC,oCAAA;AAAA,mEAA8E,SAAoC,qCAAA;AAAA;;6BAKnQ,MAAwB;AAAA,8CAArB,OAAkB,kBAAA,GAAA,CAAA;AAAA;;;;;;MAKnB,OAAa,iBADrBJ,aAAAH,mBA8BM,OA9BN,aA8BM;AAAA,QAzBJK,YAwBa,uBAAA;AAAA,UAvBV,SAAS,OAAiB;AAAA,UAC3B,WAAU;AAAA;UAEC,gBACT,MAiBY;AAAA,YAjBZA,YAiBY,sBAAA;AAAA,cAhBV,OAAM;AAAA,cACN,WAAQ;AAAA,cACP,QAAQ;AAAA,cACT,MAAK;AAAA,cACL,MAAK;AAAA,cACJ,cAAY,OAAiB;AAAA,cAC7B,+CAAO,MAAa,gBAAA;AAAA,cACpB,8CAAM,MAAa,gBAAA;AAAA,cACnB,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAG,cAAA,YAAO,KAAK,MAAA,QAAS,MAAM,GAAA,CAAA,MAAA,CAAA;AAAA;cAEtB,cACT,MAGE;AAAA,gBAHFH,YAGE,oBAAA;AAAA,kBAFA,MAAK;AAAA,kBACL,MAAK;AAAA;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
3
2
|
const general_row_constants = require("./general_row_constants.cjs");
|
|
4
3
|
const vue = require("vue");
|
|
5
4
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
6
5
|
const icon = require("../../../components/icon/icon.vue.cjs");
|
|
7
6
|
const _sfc_main = {
|
|
8
7
|
name: "DtRecipeLeftbarGeneralRowIcon",
|
|
9
|
-
components: { DtIcon: icon
|
|
8
|
+
components: { DtIcon: icon },
|
|
10
9
|
props: {
|
|
11
10
|
type: {
|
|
12
11
|
type: String,
|
|
@@ -51,7 +50,6 @@ const _sfc_main = {
|
|
|
51
50
|
};
|
|
52
51
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
53
52
|
const _component_dt_icon = vue.resolveComponent("dt-icon");
|
|
54
|
-
const _component_dt_icon_dialbot = vue.resolveComponent("dt-icon-dialbot");
|
|
55
53
|
return $options.isIconType ? (vue.openBlock(), vue.createBlock(_component_dt_icon, {
|
|
56
54
|
key: 0,
|
|
57
55
|
name: $options.getIconName,
|
|
@@ -64,7 +62,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
64
62
|
class: vue.normalizeClass($options.dialbotClasses),
|
|
65
63
|
"data-qa": "general-row-dialbot"
|
|
66
64
|
}, [
|
|
67
|
-
vue.createVNode(
|
|
65
|
+
vue.createVNode(_component_dt_icon, {
|
|
66
|
+
name: "dialbot",
|
|
67
|
+
size: "500"
|
|
68
|
+
})
|
|
68
69
|
], 2)) : vue.createCommentVNode("", true);
|
|
69
70
|
}
|
|
70
71
|
const DtRecipeLeftbarGeneralRowIcon = /* @__PURE__ */ _pluginVue_exportHelper(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leftbar_general_row_icon.vue.cjs","sources":["../../../../recipes/leftbar/general_row/leftbar_general_row_icon.vue"],"sourcesContent":["<template>\n <dt-icon\n v-if=\"isIconType\"\n :name=\"getIconName\"\n :size=\"iconSize\"\n />\n <div\n v-else-if=\"isContactCenterType\"\n :class=\"contactCenterIconClasses\"\n />\n <div\n v-else-if=\"isDialbotType\"\n :class=\"dialbotClasses\"\n data-qa=\"general-row-dialbot\"\n >\n <dt-icon
|
|
1
|
+
{"version":3,"file":"leftbar_general_row_icon.vue.cjs","sources":["../../../../recipes/leftbar/general_row/leftbar_general_row_icon.vue"],"sourcesContent":["<template>\n <dt-icon\n v-if=\"isIconType\"\n :name=\"getIconName\"\n :size=\"iconSize\"\n />\n <div\n v-else-if=\"isContactCenterType\"\n :class=\"contactCenterIconClasses\"\n />\n <div\n v-else-if=\"isDialbotType\"\n :class=\"dialbotClasses\"\n data-qa=\"general-row-dialbot\"\n >\n <dt-icon\n name=\"dialbot\"\n size=\"500\"\n />\n </div>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport {\n LEFTBAR_GENERAL_ROW_ICON_MAPPING as ICON_MAPPING,\n LEFTBAR_GENERAL_ROW_TYPES as TYPES,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS as COLORS,\n} from '@/recipes/leftbar/general_row/general_row_constants';\n\nexport default {\n name: 'DtRecipeLeftbarGeneralRowIcon',\n components: { DtIcon },\n props: {\n type: {\n type: String,\n default: null,\n },\n\n color: {\n type: String,\n default: null,\n },\n\n iconSize: {\n type: String,\n default: '300',\n },\n },\n\n computed: {\n isIconType () {\n return ![TYPES.DIALBOT, TYPES.CONTACT_CENTER].includes(this.type);\n },\n\n isContactCenterType () {\n return this.type === TYPES.CONTACT_CENTER;\n },\n\n isDialbotType () {\n return this.type === TYPES.DIALBOT;\n },\n\n getIconName () {\n return ICON_MAPPING[this.type];\n },\n\n contactCenterIconClasses () {\n return [\n 'dt-leftbar-row__icon-cc',\n COLORS[this.color],\n ];\n },\n\n dialbotClasses () {\n return [\n 'd-d-flex',\n 'd-ai-center',\n 'd-jc-center',\n ];\n },\n },\n};\n</script>\n"],"names":["DtIcon","TYPES","ICON_MAPPING","COLORS","_createBlock","_createElementBlock","_createVNode"],"mappings":";;;;;AA8BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY,EAAEA,QAAAA,KAAQ;AAAA,EACtB,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IAED,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IAED,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,aAAc;AACZ,aAAO,CAAC,CAACC,gDAAM,SAASA,sBAAK,0BAAC,cAAc,EAAE,SAAS,KAAK,IAAI;AAAA,IACjE;AAAA,IAED,sBAAuB;AACrB,aAAO,KAAK,SAASA,sBAAK,0BAAC;AAAA,IAC5B;AAAA,IAED,gBAAiB;AACf,aAAO,KAAK,SAASA,sBAAK,0BAAC;AAAA,IAC5B;AAAA,IAED,cAAe;AACb,aAAOC,sBAAY,iCAAC,KAAK,IAAI;AAAA,IAC9B;AAAA,IAED,2BAA4B;AAC1B,aAAO;AAAA,QACL;AAAA,QACAC,sBAAM,0CAAC,KAAK,KAAK;AAAA;IAEpB;AAAA,IAED,iBAAkB;AAChB,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA;IAEH;AAAA,EACF;AACH;;;SAhFU,SAAU,+BADlBC,IAIE,YAAA,oBAAA;AAAA;IAFC,MAAM,SAAW;AAAA,IACjB,MAAM,OAAQ;AAAA,mCAGJ,SAAmB,wCADhCC,IAGE,mBAAA,OAAA;AAAA;IADC,0BAAO,SAAwB,wBAAA;AAAA,iBAGrB,SAAa,kCAD1BA,IASM,mBAAA,OAAA;AAAA;IAPH,0BAAO,SAAc,cAAA;AAAA,IACtB,WAAQ;AAAA;IAERC,IAAAA,YAGE,oBAAA;AAAA,MAFA,MAAK;AAAA,MACL,MAAK;AAAA;;;;;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { DtIconDialbot } from "@dialpad/dialtone-icons/vue3";
|
|
2
1
|
import { LEFTBAR_GENERAL_ROW_TYPES, LEFTBAR_GENERAL_ROW_ICON_MAPPING, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS } from "./general_row_constants.js";
|
|
3
2
|
import { resolveComponent, openBlock, createBlock, createElementBlock, normalizeClass, createVNode, createCommentVNode } from "vue";
|
|
4
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
4
|
import DtIcon from "../../../components/icon/icon.vue.js";
|
|
6
5
|
const _sfc_main = {
|
|
7
6
|
name: "DtRecipeLeftbarGeneralRowIcon",
|
|
8
|
-
components: { DtIcon
|
|
7
|
+
components: { DtIcon },
|
|
9
8
|
props: {
|
|
10
9
|
type: {
|
|
11
10
|
type: String,
|
|
@@ -50,7 +49,6 @@ const _sfc_main = {
|
|
|
50
49
|
};
|
|
51
50
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
52
51
|
const _component_dt_icon = resolveComponent("dt-icon");
|
|
53
|
-
const _component_dt_icon_dialbot = resolveComponent("dt-icon-dialbot");
|
|
54
52
|
return $options.isIconType ? (openBlock(), createBlock(_component_dt_icon, {
|
|
55
53
|
key: 0,
|
|
56
54
|
name: $options.getIconName,
|
|
@@ -63,7 +61,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
63
61
|
class: normalizeClass($options.dialbotClasses),
|
|
64
62
|
"data-qa": "general-row-dialbot"
|
|
65
63
|
}, [
|
|
66
|
-
createVNode(
|
|
64
|
+
createVNode(_component_dt_icon, {
|
|
65
|
+
name: "dialbot",
|
|
66
|
+
size: "500"
|
|
67
|
+
})
|
|
67
68
|
], 2)) : createCommentVNode("", true);
|
|
68
69
|
}
|
|
69
70
|
const DtRecipeLeftbarGeneralRowIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leftbar_general_row_icon.vue.js","sources":["../../../../recipes/leftbar/general_row/leftbar_general_row_icon.vue"],"sourcesContent":["<template>\n <dt-icon\n v-if=\"isIconType\"\n :name=\"getIconName\"\n :size=\"iconSize\"\n />\n <div\n v-else-if=\"isContactCenterType\"\n :class=\"contactCenterIconClasses\"\n />\n <div\n v-else-if=\"isDialbotType\"\n :class=\"dialbotClasses\"\n data-qa=\"general-row-dialbot\"\n >\n <dt-icon
|
|
1
|
+
{"version":3,"file":"leftbar_general_row_icon.vue.js","sources":["../../../../recipes/leftbar/general_row/leftbar_general_row_icon.vue"],"sourcesContent":["<template>\n <dt-icon\n v-if=\"isIconType\"\n :name=\"getIconName\"\n :size=\"iconSize\"\n />\n <div\n v-else-if=\"isContactCenterType\"\n :class=\"contactCenterIconClasses\"\n />\n <div\n v-else-if=\"isDialbotType\"\n :class=\"dialbotClasses\"\n data-qa=\"general-row-dialbot\"\n >\n <dt-icon\n name=\"dialbot\"\n size=\"500\"\n />\n </div>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport {\n LEFTBAR_GENERAL_ROW_ICON_MAPPING as ICON_MAPPING,\n LEFTBAR_GENERAL_ROW_TYPES as TYPES,\n LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS as COLORS,\n} from '@/recipes/leftbar/general_row/general_row_constants';\n\nexport default {\n name: 'DtRecipeLeftbarGeneralRowIcon',\n components: { DtIcon },\n props: {\n type: {\n type: String,\n default: null,\n },\n\n color: {\n type: String,\n default: null,\n },\n\n iconSize: {\n type: String,\n default: '300',\n },\n },\n\n computed: {\n isIconType () {\n return ![TYPES.DIALBOT, TYPES.CONTACT_CENTER].includes(this.type);\n },\n\n isContactCenterType () {\n return this.type === TYPES.CONTACT_CENTER;\n },\n\n isDialbotType () {\n return this.type === TYPES.DIALBOT;\n },\n\n getIconName () {\n return ICON_MAPPING[this.type];\n },\n\n contactCenterIconClasses () {\n return [\n 'dt-leftbar-row__icon-cc',\n COLORS[this.color],\n ];\n },\n\n dialbotClasses () {\n return [\n 'd-d-flex',\n 'd-ai-center',\n 'd-jc-center',\n ];\n },\n },\n};\n</script>\n"],"names":["TYPES","ICON_MAPPING","COLORS","_createBlock","_createElementBlock","_createVNode"],"mappings":";;;;AA8BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY,EAAE,OAAQ;AAAA,EACtB,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IAED,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IAED,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,aAAc;AACZ,aAAO,CAAC,CAACA,0BAAM,SAASA,0BAAM,cAAc,EAAE,SAAS,KAAK,IAAI;AAAA,IACjE;AAAA,IAED,sBAAuB;AACrB,aAAO,KAAK,SAASA,0BAAM;AAAA,IAC5B;AAAA,IAED,gBAAiB;AACf,aAAO,KAAK,SAASA,0BAAM;AAAA,IAC5B;AAAA,IAED,cAAe;AACb,aAAOC,iCAAa,KAAK,IAAI;AAAA,IAC9B;AAAA,IAED,2BAA4B;AAC1B,aAAO;AAAA,QACL;AAAA,QACAC,0CAAO,KAAK,KAAK;AAAA;IAEpB;AAAA,IAED,iBAAkB;AAChB,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA;IAEH;AAAA,EACF;AACH;;;SAhFU,SAAU,2BADlBC,YAIE,oBAAA;AAAA;IAFC,MAAM,SAAW;AAAA,IACjB,MAAM,OAAQ;AAAA,mCAGJ,SAAmB,oCADhCC,mBAGE,OAAA;AAAA;IADC,sBAAO,SAAwB,wBAAA;AAAA,iBAGrB,SAAa,8BAD1BA,mBASM,OAAA;AAAA;IAPH,sBAAO,SAAc,cAAA;AAAA,IACtB,WAAQ;AAAA;IAERC,YAGE,oBAAA;AAAA,MAFA,MAAK;AAAA,MACL,MAAK;AAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
2
|
+
const icon = require("../../../components/icon/icon.vue.cjs");
|
|
3
3
|
const common_utils = require("../../../common/utils.cjs");
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
@@ -7,7 +7,7 @@ const general_row = require("../general_row/general_row.vue.cjs");
|
|
|
7
7
|
const _sfc_main = {
|
|
8
8
|
name: "DtRecipeGroupRow",
|
|
9
9
|
components: {
|
|
10
|
-
|
|
10
|
+
DtIcon: icon,
|
|
11
11
|
DtRecipeGeneralRow: general_row
|
|
12
12
|
},
|
|
13
13
|
inheritAttrs: false,
|
|
@@ -74,7 +74,7 @@ const _sfc_main = {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
77
|
-
const
|
|
77
|
+
const _component_dt_icon = vue.resolveComponent("dt-icon");
|
|
78
78
|
const _component_dt_recipe_general_row = vue.resolveComponent("dt-recipe-general-row");
|
|
79
79
|
return vue.openBlock(), vue.createBlock(_component_dt_recipe_general_row, vue.mergeProps({
|
|
80
80
|
description: $props.names,
|
|
@@ -86,7 +86,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
86
86
|
"is-typing": $props.isTyping
|
|
87
87
|
}, _ctx.$attrs, vue.toHandlers($options.contactRowListeners)), {
|
|
88
88
|
left: vue.withCtx(() => [
|
|
89
|
-
vue.createVNode(
|
|
89
|
+
vue.createVNode(_component_dt_icon, {
|
|
90
|
+
name: "users",
|
|
91
|
+
size: "300"
|
|
92
|
+
})
|
|
90
93
|
]),
|
|
91
94
|
_: 1
|
|
92
95
|
}, 16, ["description", "aria-label", "unread-count", "has-unreads", "unread-count-tooltip", "selected", "is-typing"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_row.vue.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-count-tooltip=\"unreadCountTooltip\"\n :selected=\"selected\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n v-on=\"contactRowListeners\"\n >\n <template #left>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"group_row.vue.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-count-tooltip=\"unreadCountTooltip\"\n :selected=\"selected\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n v-on=\"contactRowListeners\"\n >\n <template #left>\n <dt-icon\n name=\"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 DtIcon from '@/components/icon/icon.vue';\nimport { safeConcatStrings, extractVueListeners } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeGroupRow',\n\n components: {\n DtIcon,\n DtRecipeGeneralRow,\n },\n\n inheritAttrs: false,\n\n props: {\n\n /**\n * Screen reader will read out the number of users in the group using this text. Ex: \"2 users\"\n */\n groupCountText: {\n type: String,\n default: '',\n },\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 * Text shown when the unread count is hovered.\n */\n unreadCountTooltip: {\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\n computed: {\n ariaLabel () {\n return safeConcatStrings([this.groupCountText, this.names]);\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n"],"names":["DtIcon","DtRecipeGeneralRow","safeConcatStrings","extractVueListeners","_openBlock","_createBlock","_mergeProps","_toHandlers","_createVNode"],"mappings":";;;;;;AA0BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,QAAAA;AAAAA,IACA,oBAAAC;AAAAA,EACD;AAAA,EAED,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAKL,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO,CACN;AAAA,EAED,UAAU;AAAA,IACR,YAAa;AACX,aAAOC,aAAAA,kBAAkB,CAAC,KAAK,gBAAgB,KAAK,KAAK,CAAC;AAAA,IAC3D;AAAA,IAED,sBAAuB;AACrB,aAAOC,aAAmB,oBAAC,KAAK,MAAM;AAAA,IACvC;AAAA,EACF;AACH;;;;AA3GE,SAAAC,cAAA,GAAAC,gBAiBwB,kCAjBxBC,IAAAA,WAiBwB;AAAA,IAhBrB,aAAa,OAAK;AAAA,IAClB,cAAY,SAAS;AAAA,IACrB,gBAAc,OAAW;AAAA,IACzB,eAAa,OAAU;AAAA,IACvB,wBAAsB,OAAkB;AAAA,IACxC,UAAU,OAAQ;AAAA,IAClB,aAAW,OAAQ;AAAA,KACZ,KAAM,QACdC,IAAAA,WAA0B,SAAD,mBAAA,CAAA,GAAA;AAAA,IAEd,kBACT,MAGE;AAAA,MAHFC,IAAAA,YAGE,oBAAA;AAAA,QAFA,MAAK;AAAA,QACL,MAAK;AAAA;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import DtIcon from "../../../components/icon/icon.vue.js";
|
|
2
2
|
import { safeConcatStrings, extractVueListeners } from "../../../common/utils.js";
|
|
3
3
|
import { resolveComponent, openBlock, createBlock, mergeProps, toHandlers, withCtx, createVNode } from "vue";
|
|
4
4
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -6,7 +6,7 @@ import DtRecipeGeneralRow from "../general_row/general_row.vue.js";
|
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
name: "DtRecipeGroupRow",
|
|
8
8
|
components: {
|
|
9
|
-
|
|
9
|
+
DtIcon,
|
|
10
10
|
DtRecipeGeneralRow
|
|
11
11
|
},
|
|
12
12
|
inheritAttrs: false,
|
|
@@ -73,7 +73,7 @@ const _sfc_main = {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
76
|
-
const
|
|
76
|
+
const _component_dt_icon = resolveComponent("dt-icon");
|
|
77
77
|
const _component_dt_recipe_general_row = resolveComponent("dt-recipe-general-row");
|
|
78
78
|
return openBlock(), createBlock(_component_dt_recipe_general_row, mergeProps({
|
|
79
79
|
description: $props.names,
|
|
@@ -85,7 +85,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
85
85
|
"is-typing": $props.isTyping
|
|
86
86
|
}, _ctx.$attrs, toHandlers($options.contactRowListeners)), {
|
|
87
87
|
left: withCtx(() => [
|
|
88
|
-
createVNode(
|
|
88
|
+
createVNode(_component_dt_icon, {
|
|
89
|
+
name: "users",
|
|
90
|
+
size: "300"
|
|
91
|
+
})
|
|
89
92
|
]),
|
|
90
93
|
_: 1
|
|
91
94
|
}, 16, ["description", "aria-label", "unread-count", "has-unreads", "unread-count-tooltip", "selected", "is-typing"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_row.vue.js","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-count-tooltip=\"unreadCountTooltip\"\n :selected=\"selected\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n v-on=\"contactRowListeners\"\n >\n <template #left>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"group_row.vue.js","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-count-tooltip=\"unreadCountTooltip\"\n :selected=\"selected\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n v-on=\"contactRowListeners\"\n >\n <template #left>\n <dt-icon\n name=\"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 DtIcon from '@/components/icon/icon.vue';\nimport { safeConcatStrings, extractVueListeners } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeGroupRow',\n\n components: {\n DtIcon,\n DtRecipeGeneralRow,\n },\n\n inheritAttrs: false,\n\n props: {\n\n /**\n * Screen reader will read out the number of users in the group using this text. Ex: \"2 users\"\n */\n groupCountText: {\n type: String,\n default: '',\n },\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 * Text shown when the unread count is hovered.\n */\n unreadCountTooltip: {\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\n computed: {\n ariaLabel () {\n return safeConcatStrings([this.groupCountText, this.names]);\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n"],"names":["_openBlock","_createBlock","_mergeProps","_toHandlers","_createVNode"],"mappings":";;;;;AA0BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAKL,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO,CACN;AAAA,EAED,UAAU;AAAA,IACR,Y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