@dialpad/dialtone 9.99.0 → 9.99.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/css/dialtone-default-theme.css +94 -85
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone.css +94 -85
  4. package/dist/css/dialtone.min.css +1 -1
  5. package/dist/tokens/doc.json +17908 -17908
  6. package/dist/vue2/component-documentation.json +1 -1
  7. package/dist/vue2/components/item_layout/item_layout.vue.cjs +63 -1
  8. package/dist/vue2/components/item_layout/item_layout.vue.cjs.map +1 -1
  9. package/dist/vue2/components/item_layout/item_layout.vue.js +63 -1
  10. package/dist/vue2/components/item_layout/item_layout.vue.js.map +1 -1
  11. package/dist/vue2/components/list_item/list_item.vue.cjs +12 -13
  12. package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
  13. package/dist/vue2/components/list_item/list_item.vue.js +12 -13
  14. package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
  15. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +1 -1
  16. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  17. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +1 -1
  18. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  19. package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs +5 -1
  20. package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs.map +1 -1
  21. package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js +5 -1
  22. package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js.map +1 -1
  23. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +7 -0
  24. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  25. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +7 -0
  26. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  27. package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs +10 -10
  28. package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs.map +1 -1
  29. package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js +10 -10
  30. package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js.map +1 -1
  31. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +2 -4
  32. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  33. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +2 -4
  34. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  35. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs +4 -4
  36. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  37. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js +4 -4
  38. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  39. package/dist/vue2/types/components/item_layout/item_layout.vue.d.ts +66 -1
  40. package/dist/vue2/types/components/item_layout/item_layout.vue.d.ts.map +1 -1
  41. package/dist/vue2/types/components/list_item/list_item.vue.d.ts +1 -22
  42. package/dist/vue2/types/components/list_item/list_item.vue.d.ts.map +1 -1
  43. package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
  44. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  45. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +9 -0
  46. package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  47. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  48. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  49. package/dist/vue3/component-documentation.json +1 -1
  50. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +7 -0
  51. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  52. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +7 -0
  53. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  54. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +9 -0
  55. package/package.json +5 -1
@@ -1 +1 @@
1
- {"version":3,"file":"editor.vue.js","sources":["../../../../recipes/conversation_view/editor/editor.vue"],"sourcesContent":["<template>\n <div\n\n class=\"d-recipe-editor\"\n data-qa=\"dt-recipe-editor\"\n role=\"presentation\"\n @click=\"$refs.richTextEditor.focusEditor()\"\n >\n <!-- Section for the top UI -->\n <dt-stack\n class=\"d-recipe-editor__top-bar\"\n direction=\"row\"\n gap=\"450\"\n >\n <dt-stack\n v-for=\"buttonGroup in buttonGroups\"\n :key=\"buttonGroup.key\"\n direction=\"row\"\n gap=\"300\"\n >\n <dt-tooltip\n v-for=\"button in buttonGroup.buttonGroup\"\n :key=\"`${buttonGroup.key}-${JSON.stringify(button.selector)}`\"\n :message=\"button.tooltipMessage\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n :active=\"$refs.richTextEditor?.editor?.isActive(button.selector)\"\n :aria-label=\"button.tooltipMessage\"\n :data-qa=\"button.dataQA\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n @click=\"button.onClick()\"\n >\n <template #icon>\n <component\n :is=\"button.icon\"\n size=\"200\"\n />\n </template>\n <span v-if=\"button.label\">{{ button.label }}</span>\n </dt-button>\n </template>\n </dt-tooltip>\n <div class=\"d-recipe-editor__button-group-divider\" />\n </dt-stack>\n <dt-stack\n v-if=\"linkButton.showBtn\"\n direction=\"row\"\n gap=\"300\"\n >\n <dt-popover\n :open.sync=\"showLinkInput\"\n :show-close-button=\"false\"\n :visually-hidden-close=\"true\"\n :visually-hidden-close-label=\"'Close link input popover'\"\n data-qa=\"dt-recipe-editor-link-input-popover\"\n padding=\"none\"\n placement=\"bottom-start\"\n @click=\"onInputFocus\"\n @opened=\"updateInput\"\n @click.native.stop=\"onInputFocus\"\n >\n <template #anchor>\n <dt-tooltip\n :key=\"linkButton.key\"\n :message=\"linkButton.tooltipMessage\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n :active=\"$refs.richTextEditor?.editor?.isActive(linkButton.selector)\"\n :aria-label=\"linkButton.tooltipMessage\"\n :data-qa=\"linkButton.dataQA\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n @click=\"linkButton.onClick()\"\n >\n <template #icon>\n <component\n :is=\"linkButton.icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n </template>\n\n <template #content>\n <div class=\"d-recipe-editor__popover-content\">\n <span\n v-if=\"showAddLink.setLinkTitle.length > 0\"\n >\n {{ showAddLink.setLinkTitle }}\n </span>\n <dt-input\n v-model=\"linkInput\"\n :input-aria-label=\"showAddLink.setLinkInputAriaLabel\"\n :placeholder=\"setLinkPlaceholder\"\n data-qa=\"dt-recipe-editor-link-input\"\n input-wrapper-class=\"d-recipe-editor-link__input-wrapper\"\n @click=\"onInputFocus\"\n @focus=\"onInputFocus\"\n @click.native.stop=\"onInputFocus\"\n @keydown.enter=\"setLink\"\n />\n </div>\n </template>\n <template #footerContent>\n <dt-stack\n direction=\"row\"\n gap=\"300\"\n class=\"d-recipe-editor__popover-footer\"\n >\n <dt-button\n :aria-label=\"removeLinkButton.ariaLabel\"\n data-qa=\"dt-recipe-editor-remove-link-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"sm\"\n @click=\"removeLink\"\n >\n {{ removeLinkButton.label }}\n </dt-button>\n <dt-button\n :aria-label=\"cancelSetLinkButton.ariaLabel\"\n data-qa=\"dt-recipe-editor-set-link-cancel-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"sm\"\n @click=\"closeLinkInput\"\n >\n {{ cancelSetLinkButton.label }}\n </dt-button>\n <dt-button\n :aria-label=\"confirmSetLinkButton.ariaLabel\"\n data-qa=\"dt-recipe-editor-set-link-confirm-btn\"\n size=\"sm\"\n @click=\"setLink\"\n >\n {{ confirmSetLinkButton.label }}\n </dt-button>\n </dt-stack>\n </template>\n </dt-popover>\n </dt-stack>\n </dt-stack>\n\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n :style=\"{ 'max-height': maxHeight }\"\n class=\"d-recipe-editor__content\"\n >\n <dt-rich-text-editor\n ref=\"richTextEditor\"\n v-model=\"internalInputValue\"\n :allow-inline-images=\"true\"\n :allow-line-breaks=\"true\"\n :hide-link-bubble-menu=\"true\"\n :auto-focus=\"autoFocus\"\n :editable=\"editable\"\n :input-aria-label=\"inputAriaLabel\"\n :input-class=\"`d-recipe-editor__content-input ${inputClass}`\"\n :link=\"true\"\n :output-format=\"htmlOutputFormat\"\n :placeholder=\"placeholder\"\n data-qa=\"dt-rich-text-editor\"\n v-bind=\"$attrs\"\n @blur=\"onBlur\"\n @focus=\"onFocus\"\n @input=\"onInput($event)\"\n />\n </div>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n DtRichTextEditor,\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n} from '@/components/rich_text_editor';\nimport {\n EDITOR_SUPPORTED_LINK_PROTOCOLS,\n EDITOR_DEFAULT_LINK_PREFIX,\n} from './editor_constants.js';\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtStack } from '@/components/stack';\nimport { DtInput } from '@/components/input';\nimport { DtTooltip } from '@/components/tooltip';\nimport {\n DtIconAlignCenter,\n DtIconAlignJustify,\n DtIconAlignLeft,\n DtIconAlignRight,\n DtIconBold,\n DtIconCodeBlock,\n DtIconItalic,\n DtIconLightningBolt,\n DtIconLink2,\n DtIconListBullet,\n DtIconListOrdered,\n DtIconQuote,\n DtIconStrikethrough,\n DtIconUnderline,\n} from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'DtRecipeEditor',\n\n components: {\n DtRichTextEditor,\n DtButton,\n DtPopover,\n DtStack,\n DtInput,\n DtTooltip,\n DtIconLightningBolt,\n DtIconBold,\n DtIconItalic,\n DtIconUnderline,\n DtIconStrikethrough,\n DtIconListBullet,\n DtIconListOrdered,\n DtIconAlignLeft,\n DtIconAlignCenter,\n DtIconAlignRight,\n DtIconAlignJustify,\n DtIconQuote,\n DtIconCodeBlock,\n DtIconLink2,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n value: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n default: '',\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * Placeholder text\n */\n placeholder: {\n type: String,\n default: '',\n },\n\n /**\n * Content area needs to dynamically adjust height based on the conversation area height.\n * can be vh|px|rem|em|%\n */\n maxHeight: {\n type: String,\n default: 'unset',\n },\n\n /**\n * Confirm set link button defaults.\n */\n confirmSetLinkButton: {\n type: Object,\n default: () => ({ label: 'Confirm', ariaLabel: 'Confirm set link' }),\n },\n\n /**\n * Remove link button defaults.\n */\n removeLinkButton: {\n type: Object,\n default: () => ({ label: 'Remove', ariaLabel: 'Remove link' }),\n },\n\n /**\n * Cancel set link button defaults.\n */\n cancelSetLinkButton: {\n type: Object,\n default: () => ({ label: 'Cancel', ariaLabel: 'Cancel set link' }),\n },\n\n /**\n * Placeholder text for the set link input field\n */\n setLinkPlaceholder: {\n type: String,\n default: '',\n },\n\n /**\n * Show button to render text as bold\n */\n showBoldButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to render text in italics\n */\n showItalicsButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to underline text\n */\n showUnderlineButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to strike text\n */\n showStrikeButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to render list items\n */\n showListItemsButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to render ordered list items\n */\n showOrderedListButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to align text to the left\n */\n showAlignLeftButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to align text to the center\n */\n showAlignCenterButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to align text to the right\n */\n showAlignRightButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to justify text\n */\n showAlignJustifyButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to add quote format to text\n */\n showQuoteButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to add code block\n */\n showCodeBlockButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to handle quick replies\n */\n showQuickRepliesButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show add link default config.\n */\n showAddLink: {\n type: Object,\n default: () => ({\n showAddLinkButton: true,\n setLinkTitle: 'Add a link',\n setLinkInputAriaLabel: 'Input field to add link',\n }),\n },\n },\n\n emits: [\n /**\n * Native focus event\n * @event input\n * @type {String|JSON}\n */\n 'focus',\n\n /**\n * Native blur event\n * @event input\n * @type {String|JSON}\n */\n 'blur',\n\n /**\n * Native input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n\n /**\n * Quick replies button\n * pressed event\n * @event quick-replies-click\n */\n 'quick-replies-click',\n ],\n\n data () {\n return {\n internalInputValue: this.value, // internal input content\n hasFocus: false,\n\n linkOptions: {\n class: 'd-recipe-editor__link',\n },\n\n showLinkInput: false,\n linkInput: '',\n };\n },\n\n computed: {\n inputLength () {\n return this.internalInputValue.length;\n },\n\n htmlOutputFormat () {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS[2];\n },\n\n showingTextFormatButtons () {\n return this.showBoldButton || this.showItalicsButton || this.showStrikeButton || this.showUnderlineButton;\n },\n\n showingAlignmentButtons () {\n return this.showAlignLeftButton || this.showAlignCenterButton ||\n this.showAlignRightButton || this.showAlignJustifyButton;\n },\n\n showingListButtons () {\n return this.showListItemsButton || this.showOrderedListButton;\n },\n\n buttonGroups () {\n const individualButtonStacks = this.individualButtons.map(buttonData => ({\n key: buttonData.selector,\n buttonGroup: [buttonData],\n }));\n return [\n { key: 'new', buttonGroup: this.newButtons },\n { key: 'format', buttonGroup: this.textFormatButtons },\n { key: 'alignment', buttonGroup: this.alignmentButtons },\n { key: 'list', buttonGroup: this.listButtons },\n ...individualButtonStacks,\n ].filter(buttonGroupData => buttonGroupData.buttonGroup.length > 0);\n },\n\n newButtons () {\n return [\n {\n showBtn: this.showQuickRepliesButton,\n label: 'Quick reply',\n selector: 'quickReplies',\n icon: DtIconLightningBolt,\n dataQA: 'dt-recipe-editor-quick-replies-btn',\n tooltipMessage: 'Quick Reply',\n onClick: this.onQuickRepliesClick,\n },\n ].filter(button => button.showBtn);\n },\n\n textFormatButtons () {\n return [\n {\n showBtn: this.showBoldButton,\n selector: 'bold',\n icon: DtIconBold,\n dataQA: 'dt-recipe-editor-bold-btn',\n tooltipMessage: 'Bold',\n onClick: this.onBoldTextToggle,\n },\n {\n showBtn: this.showItalicsButton,\n selector: 'italic',\n icon: DtIconItalic,\n dataQA: 'dt-recipe-editor-italics-btn',\n tooltipMessage: 'Italics',\n onClick: this.onItalicTextToggle,\n },\n {\n showBtn: this.showUnderlineButton,\n selector: 'underline',\n icon: DtIconUnderline,\n dataQA: 'dt-recipe-editor-underline-btn',\n tooltipMessage: 'Underline',\n onClick: this.onUnderlineTextToggle,\n },\n {\n showBtn: this.showStrikeButton,\n selector: 'strike',\n icon: DtIconStrikethrough,\n dataQA: 'dt-recipe-editor-strike-btn',\n tooltipMessage: 'Strike',\n onClick: this.onStrikethroughTextToggle,\n },\n ].filter(button => button.showBtn);\n },\n\n alignmentButtons () {\n return [\n {\n showBtn: this.showAlignLeftButton,\n selector: { textAlign: 'left' },\n icon: DtIconAlignLeft,\n dataQA: 'dt-recipe-editor-align-left-btn',\n tooltipMessage: 'Align Left',\n onClick: () => this.onTextAlign('left'),\n },\n {\n showBtn: this.showAlignCenterButton,\n selector: { textAlign: 'center' },\n icon: DtIconAlignCenter,\n dataQA: 'dt-recipe-editor-align-center-btn',\n tooltipMessage: 'Align Center',\n onClick: () => this.onTextAlign('center'),\n },\n {\n showBtn: this.showAlignRightButton,\n selector: { textAlign: 'right' },\n icon: DtIconAlignRight,\n dataQA: 'dt-recipe-editor-align-right-btn',\n tooltipMessage: 'Align Right',\n onClick: () => this.onTextAlign('right'),\n },\n {\n showBtn: this.showAlignJustifyButton,\n selector: { textAlign: 'justify' },\n icon: DtIconAlignJustify,\n dataQA: 'dt-recipe-editor-align-justify-btn',\n tooltipMessage: 'Align Justify',\n onClick: () => this.onTextAlign('justify'),\n },\n ].filter(button => button.showBtn);\n },\n\n listButtons () {\n return [\n {\n showBtn: this.showListItemsButton,\n selector: 'bulletList',\n icon: DtIconListBullet,\n dataQA: 'dt-recipe-editor-list-items-btn',\n tooltipMessage: 'Bullet List',\n onClick: this.onBulletListToggle,\n },\n {\n showBtn: this.showOrderedListButton,\n selector: 'orderedList',\n icon: DtIconListOrdered,\n dataQA: 'dt-recipe-editor-ordered-list-items-btn',\n tooltipMessage: 'Ordered List',\n onClick: this.onOrderedListToggle,\n },\n ].filter(button => button.showBtn);\n },\n\n individualButtons () {\n return [\n {\n showBtn: this.showQuoteButton,\n selector: 'blockquote',\n icon: DtIconQuote,\n dataQA: 'dt-recipe-editor-blockquote-btn',\n tooltipMessage: 'Quote',\n onClick: this.onBlockquoteToggle,\n },\n {\n showBtn: this.showCodeBlockButton,\n selector: 'codeBlock',\n icon: DtIconCodeBlock,\n dataQA: 'dt-recipe-editor-code-block-btn',\n tooltipMessage: 'Code',\n onClick: this.onCodeBlockToggle,\n },\n ].filter(button => button.showBtn);\n },\n\n linkButton () {\n return {\n showBtn: this.showAddLink.showAddLinkButton,\n selector: 'link',\n icon: DtIconLink2,\n dataQA: 'dt-recipe-editor-add-link-btn',\n tooltipMessage: 'Link',\n onClick: this.openLinkInput,\n };\n },\n },\n\n watch: {\n value (newValue) {\n this.internalInputValue = newValue;\n },\n },\n\n methods: {\n onInputFocus (event) {\n event?.stopPropagation();\n },\n\n removeLink () {\n this.$refs.richTextEditor?.editor?.chain()?.focus()?.unsetLink()?.run();\n this.closeLinkInput();\n },\n\n setLink (event) {\n const editor = this.$refs.richTextEditor?.editor;\n event?.preventDefault();\n event?.stopPropagation();\n\n if (!this.linkInput) {\n // If link text is set to empty string,\n // remove any existing links.\n this.removeLink();\n return;\n }\n\n // Check if input matches any of the supported link formats\n const prefix = EDITOR_SUPPORTED_LINK_PROTOCOLS.find(prefixRegex => prefixRegex.test(this.linkInput));\n\n if (!prefix) {\n // If no matching pattern is found, prepend default prefix\n this.linkInput = `${EDITOR_DEFAULT_LINK_PREFIX}${this.linkInput}`;\n }\n\n const selection = editor?.view?.state?.selection;\n\n if (selection.anchor === selection.head) {\n // If no text has been selected, manually insert the link text.\n // Do not rely on link options set through DtRichTextEditor\n // component, because they clash with these and cause issues.\n editor\n .chain()\n .focus()\n .insertContentAt(\n selection.anchor,\n `<a class=\"${this.linkOptions.class}\" href=${this.linkInput}>${this.linkInput}</a>`,\n )\n .run();\n } else {\n // Set or edit the link\n editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .setLink({ href: this.linkInput, class: this.linkOptions.class })\n .run();\n }\n\n this.closeLinkInput();\n },\n\n openLinkInput () {\n this.showLinkInput = true;\n },\n\n updateInput (openedInput) {\n if (!openedInput) {\n return this.closeLinkInput();\n }\n this.linkInput = this.$refs.richTextEditor?.editor?.getAttributes('link')?.href;\n },\n\n closeLinkInput () {\n this.showLinkInput = false;\n this.linkInput = '';\n this.$refs.richTextEditor.editor?.chain().focus();\n },\n\n onBoldTextToggle () {\n this.$refs.richTextEditor?.editor?.chain().focus().toggleBold().run();\n },\n\n onItalicTextToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleItalic().run();\n },\n\n onUnderlineTextToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleUnderline().run();\n },\n\n onStrikethroughTextToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleStrike().run();\n },\n\n onTextAlign (alignment) {\n if (this.$refs.richTextEditor?.editor?.isActive({ textAlign: alignment })) {\n // If this alignment type is already set here, unset it\n return this.$refs.richTextEditor?.editor.chain().focus().unsetTextAlign().run();\n }\n this.$refs.richTextEditor?.editor.chain().focus().setTextAlign(alignment).run();\n },\n\n onBulletListToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleBulletList().run();\n },\n\n onOrderedListToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleOrderedList().run();\n },\n\n onCodeBlockToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleCodeBlock().run();\n },\n\n onQuickRepliesClick () {\n this.$emit('quick-replies-click');\n },\n\n onBlockquoteToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleBlockquote().run();\n },\n\n insertInMessageBody (messageContent) {\n this.$refs.richTextEditor?.editor.chain().focus().insertContent(messageContent).run();\n },\n\n setCursorPosition (position = null) {\n this.$refs.richTextEditor?.editor.chain().focus(position).run();\n },\n\n onFocus (event) {\n this.hasFocus = true;\n this.$emit('focus', event);\n },\n\n onBlur (event) {\n this.hasFocus = false;\n this.$emit('blur', event);\n },\n\n onInput (event) {\n this.$emit('input', event);\n },\n\n },\n};\n</script>\n"],"names":["editor"],"mappings":";;;;;;;;;;AAqNA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,WAAA;AAAA,MACA,MAAA,CAAA,SAAA,QAAA,MAAA;AAAA,MACA,SAA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,UAAA,IAAA;AAEA,gBAAA,UAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,iBAAA;AAAA,MACA;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,aAAA,WAAA;AAAA,IACA;AAAA,IAEA,qBAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,mBAAA;AAAA,IACA;AAAA,IAEA,sBAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,oBAAA;AAAA,IACA;AAAA,IAEA,oBAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,kBAAA;AAAA,IACA;AAAA,IAEA,sBAAA;AACA,WAAA,MAAA,qBAAA;AAAA,IACA;AAAA,IAEA,qBAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,mBAAA;AAAA,IACA;AAAA,IAEA,oBAAA,gBAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,cAAA,gBAAA;AAAA,IACA;AAAA,IAEA,kBAAA,WAAA,MAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,MAAA,UAAA;AAAA,IACA;AAAA,IAEA,QAAA,OAAA;AACA,WAAA,WAAA;AACA,WAAA,MAAA,SAAA,KAAA;AAAA,IACA;AAAA,IAEA,OAAA,OAAA;AACA,WAAA,WAAA;AACA,WAAA,MAAA,QAAA,KAAA;AAAA,IACA;AAAA,IAEA,QAAA,OAAA;AACA,WAAA,MAAA,SAAA,KAAA;AAAA,IACA;AAAA,EAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"editor.vue.js","sources":["../../../../recipes/conversation_view/editor/editor.vue"],"sourcesContent":["<template>\n <div\n\n class=\"d-recipe-editor\"\n data-qa=\"dt-recipe-editor\"\n role=\"presentation\"\n @click=\"$refs.richTextEditor.focusEditor()\"\n >\n <!-- Section for the top UI -->\n <dt-stack\n class=\"d-recipe-editor__top-bar\"\n direction=\"row\"\n gap=\"450\"\n >\n <dt-stack\n v-for=\"buttonGroup in buttonGroups\"\n :key=\"buttonGroup.key\"\n direction=\"row\"\n gap=\"300\"\n >\n <dt-tooltip\n v-for=\"button in buttonGroup.buttonGroup\"\n :key=\"`${buttonGroup.key}-${JSON.stringify(button.selector)}`\"\n :message=\"button.tooltipMessage\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n :active=\"$refs.richTextEditor?.editor?.isActive(button.selector)\"\n :aria-label=\"button.tooltipMessage\"\n :data-qa=\"button.dataQA\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n @click=\"button.onClick()\"\n >\n <template #icon>\n <component\n :is=\"button.icon\"\n size=\"200\"\n />\n </template>\n <span v-if=\"button.label\">{{ button.label }}</span>\n </dt-button>\n </template>\n </dt-tooltip>\n <div class=\"d-recipe-editor__button-group-divider\" />\n </dt-stack>\n <dt-stack\n v-if=\"linkButton.showBtn\"\n direction=\"row\"\n gap=\"300\"\n >\n <dt-popover\n :open.sync=\"showLinkInput\"\n :show-close-button=\"false\"\n :visually-hidden-close=\"true\"\n :visually-hidden-close-label=\"'Close link input popover'\"\n data-qa=\"dt-recipe-editor-link-input-popover\"\n padding=\"none\"\n placement=\"bottom-start\"\n @click=\"onInputFocus\"\n @opened=\"updateInput\"\n @click.native.stop=\"onInputFocus\"\n >\n <template #anchor>\n <dt-tooltip\n :key=\"linkButton.key\"\n :message=\"linkButton.tooltipMessage\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n :active=\"$refs.richTextEditor?.editor?.isActive(linkButton.selector)\"\n :aria-label=\"linkButton.tooltipMessage\"\n :data-qa=\"linkButton.dataQA\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n @click=\"linkButton.onClick()\"\n >\n <template #icon>\n <component\n :is=\"linkButton.icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n </template>\n\n <template #content>\n <div class=\"d-recipe-editor__popover-content\">\n <span\n v-if=\"showAddLink.setLinkTitle.length > 0\"\n >\n {{ showAddLink.setLinkTitle }}\n </span>\n <dt-input\n v-model=\"linkInput\"\n :input-aria-label=\"showAddLink.setLinkInputAriaLabel\"\n :placeholder=\"setLinkPlaceholder\"\n data-qa=\"dt-recipe-editor-link-input\"\n input-wrapper-class=\"d-recipe-editor-link__input-wrapper\"\n @click=\"onInputFocus\"\n @focus=\"onInputFocus\"\n @click.native.stop=\"onInputFocus\"\n @keydown.enter=\"setLink\"\n />\n </div>\n </template>\n <template #footerContent>\n <dt-stack\n direction=\"row\"\n gap=\"300\"\n class=\"d-recipe-editor__popover-footer\"\n >\n <dt-button\n :aria-label=\"removeLinkButton.ariaLabel\"\n data-qa=\"dt-recipe-editor-remove-link-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"sm\"\n @click=\"removeLink\"\n >\n {{ removeLinkButton.label }}\n </dt-button>\n <dt-button\n :aria-label=\"cancelSetLinkButton.ariaLabel\"\n data-qa=\"dt-recipe-editor-set-link-cancel-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"sm\"\n @click=\"closeLinkInput\"\n >\n {{ cancelSetLinkButton.label }}\n </dt-button>\n <dt-button\n :aria-label=\"confirmSetLinkButton.ariaLabel\"\n data-qa=\"dt-recipe-editor-set-link-confirm-btn\"\n size=\"sm\"\n @click=\"setLink\"\n >\n {{ confirmSetLinkButton.label }}\n </dt-button>\n </dt-stack>\n </template>\n </dt-popover>\n </dt-stack>\n </dt-stack>\n\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n :style=\"{ 'max-height': maxHeight }\"\n class=\"d-recipe-editor__content\"\n >\n <dt-rich-text-editor\n ref=\"richTextEditor\"\n v-model=\"internalInputValue\"\n :allow-inline-images=\"true\"\n :allow-line-breaks=\"true\"\n :hide-link-bubble-menu=\"true\"\n :auto-focus=\"autoFocus\"\n :editable=\"editable\"\n :input-aria-label=\"inputAriaLabel\"\n :input-class=\"`d-recipe-editor__content-input ${inputClass}`\"\n :link=\"true\"\n :output-format=\"htmlOutputFormat\"\n :placeholder=\"placeholder\"\n data-qa=\"dt-rich-text-editor\"\n v-bind=\"$attrs\"\n @blur=\"onBlur\"\n @focus=\"onFocus\"\n @input=\"onInput($event)\"\n />\n </div>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n DtRichTextEditor,\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n} from '@/components/rich_text_editor';\nimport {\n EDITOR_SUPPORTED_LINK_PROTOCOLS,\n EDITOR_DEFAULT_LINK_PREFIX,\n} from './editor_constants.js';\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtStack } from '@/components/stack';\nimport { DtInput } from '@/components/input';\nimport { DtTooltip } from '@/components/tooltip';\nimport {\n DtIconAlignCenter,\n DtIconAlignJustify,\n DtIconAlignLeft,\n DtIconAlignRight,\n DtIconBold,\n DtIconCodeBlock,\n DtIconItalic,\n DtIconLightningBolt,\n DtIconLink2,\n DtIconListBullet,\n DtIconListOrdered,\n DtIconQuote,\n DtIconStrikethrough,\n DtIconUnderline,\n} from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'DtRecipeEditor',\n\n components: {\n DtRichTextEditor,\n DtButton,\n DtPopover,\n DtStack,\n DtInput,\n DtTooltip,\n DtIconLightningBolt,\n DtIconBold,\n DtIconItalic,\n DtIconUnderline,\n DtIconStrikethrough,\n DtIconListBullet,\n DtIconListOrdered,\n DtIconAlignLeft,\n DtIconAlignCenter,\n DtIconAlignRight,\n DtIconAlignJustify,\n DtIconQuote,\n DtIconCodeBlock,\n DtIconLink2,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n value: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n default: '',\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * Placeholder text\n */\n placeholder: {\n type: String,\n default: '',\n },\n\n /**\n * Content area needs to dynamically adjust height based on the conversation area height.\n * can be vh|px|rem|em|%\n */\n maxHeight: {\n type: String,\n default: 'unset',\n },\n\n /**\n * Confirm set link button defaults.\n */\n confirmSetLinkButton: {\n type: Object,\n default: () => ({ label: 'Confirm', ariaLabel: 'Confirm set link' }),\n },\n\n /**\n * Remove link button defaults.\n */\n removeLinkButton: {\n type: Object,\n default: () => ({ label: 'Remove', ariaLabel: 'Remove link' }),\n },\n\n /**\n * Cancel set link button defaults.\n */\n cancelSetLinkButton: {\n type: Object,\n default: () => ({ label: 'Cancel', ariaLabel: 'Cancel set link' }),\n },\n\n /**\n * Placeholder text for the set link input field\n */\n setLinkPlaceholder: {\n type: String,\n default: '',\n },\n\n /**\n * Show button to render text as bold\n */\n showBoldButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to render text in italics\n */\n showItalicsButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to underline text\n */\n showUnderlineButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to strike text\n */\n showStrikeButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to render list items\n */\n showListItemsButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to render ordered list items\n */\n showOrderedListButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to align text to the left\n */\n showAlignLeftButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to align text to the center\n */\n showAlignCenterButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to align text to the right\n */\n showAlignRightButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to justify text\n */\n showAlignJustifyButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to add quote format to text\n */\n showQuoteButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to add code block\n */\n showCodeBlockButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show button to handle quick replies\n */\n showQuickRepliesButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show add link default config.\n */\n showAddLink: {\n type: Object,\n default: () => ({\n showAddLinkButton: true,\n setLinkTitle: 'Add a link',\n setLinkInputAriaLabel: 'Input field to add link',\n }),\n },\n\n /**\n * Use default paste handler.\n */\n useDefaultPasteHandler: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native focus event\n * @event input\n * @type {String|JSON}\n */\n 'focus',\n\n /**\n * Native blur event\n * @event input\n * @type {String|JSON}\n */\n 'blur',\n\n /**\n * Native input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n\n /**\n * Quick replies button\n * pressed event\n * @event quick-replies-click\n */\n 'quick-replies-click',\n ],\n\n data () {\n return {\n internalInputValue: this.value, // internal input content\n hasFocus: false,\n\n linkOptions: {\n class: 'd-recipe-editor__link',\n },\n\n showLinkInput: false,\n linkInput: '',\n };\n },\n\n computed: {\n inputLength () {\n return this.internalInputValue.length;\n },\n\n htmlOutputFormat () {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS[2];\n },\n\n showingTextFormatButtons () {\n return this.showBoldButton || this.showItalicsButton || this.showStrikeButton || this.showUnderlineButton;\n },\n\n showingAlignmentButtons () {\n return this.showAlignLeftButton || this.showAlignCenterButton ||\n this.showAlignRightButton || this.showAlignJustifyButton;\n },\n\n showingListButtons () {\n return this.showListItemsButton || this.showOrderedListButton;\n },\n\n buttonGroups () {\n const individualButtonStacks = this.individualButtons.map(buttonData => ({\n key: buttonData.selector,\n buttonGroup: [buttonData],\n }));\n return [\n { key: 'new', buttonGroup: this.newButtons },\n { key: 'format', buttonGroup: this.textFormatButtons },\n { key: 'alignment', buttonGroup: this.alignmentButtons },\n { key: 'list', buttonGroup: this.listButtons },\n ...individualButtonStacks,\n ].filter(buttonGroupData => buttonGroupData.buttonGroup.length > 0);\n },\n\n newButtons () {\n return [\n {\n showBtn: this.showQuickRepliesButton,\n label: 'Quick reply',\n selector: 'quickReplies',\n icon: DtIconLightningBolt,\n dataQA: 'dt-recipe-editor-quick-replies-btn',\n tooltipMessage: 'Quick Reply',\n onClick: this.onQuickRepliesClick,\n },\n ].filter(button => button.showBtn);\n },\n\n textFormatButtons () {\n return [\n {\n showBtn: this.showBoldButton,\n selector: 'bold',\n icon: DtIconBold,\n dataQA: 'dt-recipe-editor-bold-btn',\n tooltipMessage: 'Bold',\n onClick: this.onBoldTextToggle,\n },\n {\n showBtn: this.showItalicsButton,\n selector: 'italic',\n icon: DtIconItalic,\n dataQA: 'dt-recipe-editor-italics-btn',\n tooltipMessage: 'Italics',\n onClick: this.onItalicTextToggle,\n },\n {\n showBtn: this.showUnderlineButton,\n selector: 'underline',\n icon: DtIconUnderline,\n dataQA: 'dt-recipe-editor-underline-btn',\n tooltipMessage: 'Underline',\n onClick: this.onUnderlineTextToggle,\n },\n {\n showBtn: this.showStrikeButton,\n selector: 'strike',\n icon: DtIconStrikethrough,\n dataQA: 'dt-recipe-editor-strike-btn',\n tooltipMessage: 'Strike',\n onClick: this.onStrikethroughTextToggle,\n },\n ].filter(button => button.showBtn);\n },\n\n alignmentButtons () {\n return [\n {\n showBtn: this.showAlignLeftButton,\n selector: { textAlign: 'left' },\n icon: DtIconAlignLeft,\n dataQA: 'dt-recipe-editor-align-left-btn',\n tooltipMessage: 'Align Left',\n onClick: () => this.onTextAlign('left'),\n },\n {\n showBtn: this.showAlignCenterButton,\n selector: { textAlign: 'center' },\n icon: DtIconAlignCenter,\n dataQA: 'dt-recipe-editor-align-center-btn',\n tooltipMessage: 'Align Center',\n onClick: () => this.onTextAlign('center'),\n },\n {\n showBtn: this.showAlignRightButton,\n selector: { textAlign: 'right' },\n icon: DtIconAlignRight,\n dataQA: 'dt-recipe-editor-align-right-btn',\n tooltipMessage: 'Align Right',\n onClick: () => this.onTextAlign('right'),\n },\n {\n showBtn: this.showAlignJustifyButton,\n selector: { textAlign: 'justify' },\n icon: DtIconAlignJustify,\n dataQA: 'dt-recipe-editor-align-justify-btn',\n tooltipMessage: 'Align Justify',\n onClick: () => this.onTextAlign('justify'),\n },\n ].filter(button => button.showBtn);\n },\n\n listButtons () {\n return [\n {\n showBtn: this.showListItemsButton,\n selector: 'bulletList',\n icon: DtIconListBullet,\n dataQA: 'dt-recipe-editor-list-items-btn',\n tooltipMessage: 'Bullet List',\n onClick: this.onBulletListToggle,\n },\n {\n showBtn: this.showOrderedListButton,\n selector: 'orderedList',\n icon: DtIconListOrdered,\n dataQA: 'dt-recipe-editor-ordered-list-items-btn',\n tooltipMessage: 'Ordered List',\n onClick: this.onOrderedListToggle,\n },\n ].filter(button => button.showBtn);\n },\n\n individualButtons () {\n return [\n {\n showBtn: this.showQuoteButton,\n selector: 'blockquote',\n icon: DtIconQuote,\n dataQA: 'dt-recipe-editor-blockquote-btn',\n tooltipMessage: 'Quote',\n onClick: this.onBlockquoteToggle,\n },\n {\n showBtn: this.showCodeBlockButton,\n selector: 'codeBlock',\n icon: DtIconCodeBlock,\n dataQA: 'dt-recipe-editor-code-block-btn',\n tooltipMessage: 'Code',\n onClick: this.onCodeBlockToggle,\n },\n ].filter(button => button.showBtn);\n },\n\n linkButton () {\n return {\n showBtn: this.showAddLink.showAddLinkButton,\n selector: 'link',\n icon: DtIconLink2,\n dataQA: 'dt-recipe-editor-add-link-btn',\n tooltipMessage: 'Link',\n onClick: this.openLinkInput,\n };\n },\n },\n\n watch: {\n value (newValue) {\n this.internalInputValue = newValue;\n },\n },\n\n methods: {\n onInputFocus (event) {\n event?.stopPropagation();\n },\n\n removeLink () {\n this.$refs.richTextEditor?.editor?.chain()?.focus()?.unsetLink()?.run();\n this.closeLinkInput();\n },\n\n setLink (event) {\n const editor = this.$refs.richTextEditor?.editor;\n event?.preventDefault();\n event?.stopPropagation();\n\n if (!this.linkInput) {\n // If link text is set to empty string,\n // remove any existing links.\n this.removeLink();\n return;\n }\n\n // Check if input matches any of the supported link formats\n const prefix = EDITOR_SUPPORTED_LINK_PROTOCOLS.find(prefixRegex => prefixRegex.test(this.linkInput));\n\n if (!prefix) {\n // If no matching pattern is found, prepend default prefix\n this.linkInput = `${EDITOR_DEFAULT_LINK_PREFIX}${this.linkInput}`;\n }\n\n const selection = editor?.view?.state?.selection;\n\n if (selection.anchor === selection.head) {\n // If no text has been selected, manually insert the link text.\n // Do not rely on link options set through DtRichTextEditor\n // component, because they clash with these and cause issues.\n editor\n .chain()\n .focus()\n .insertContentAt(\n selection.anchor,\n `<a class=\"${this.linkOptions.class}\" href=${this.linkInput}>${this.linkInput}</a>`,\n )\n .run();\n } else {\n // Set or edit the link\n editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .setLink({ href: this.linkInput, class: this.linkOptions.class })\n .run();\n }\n\n this.closeLinkInput();\n },\n\n openLinkInput () {\n this.showLinkInput = true;\n },\n\n updateInput (openedInput) {\n if (!openedInput) {\n return this.closeLinkInput();\n }\n this.linkInput = this.$refs.richTextEditor?.editor?.getAttributes('link')?.href;\n },\n\n closeLinkInput () {\n this.showLinkInput = false;\n this.linkInput = '';\n this.$refs.richTextEditor.editor?.chain().focus();\n },\n\n onBoldTextToggle () {\n this.$refs.richTextEditor?.editor?.chain().focus().toggleBold().run();\n },\n\n onItalicTextToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleItalic().run();\n },\n\n onUnderlineTextToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleUnderline().run();\n },\n\n onStrikethroughTextToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleStrike().run();\n },\n\n onTextAlign (alignment) {\n if (this.$refs.richTextEditor?.editor?.isActive({ textAlign: alignment })) {\n // If this alignment type is already set here, unset it\n return this.$refs.richTextEditor?.editor.chain().focus().unsetTextAlign().run();\n }\n this.$refs.richTextEditor?.editor.chain().focus().setTextAlign(alignment).run();\n },\n\n onBulletListToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleBulletList().run();\n },\n\n onOrderedListToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleOrderedList().run();\n },\n\n onCodeBlockToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleCodeBlock().run();\n },\n\n onQuickRepliesClick () {\n this.$emit('quick-replies-click');\n },\n\n onBlockquoteToggle () {\n this.$refs.richTextEditor?.editor.chain().focus().toggleBlockquote().run();\n },\n\n insertInMessageBody (messageContent) {\n this.$refs.richTextEditor?.editor.chain().focus().insertContent(messageContent).run();\n },\n\n setCursorPosition (position = null) {\n this.$refs.richTextEditor?.editor.chain().focus(position).run();\n },\n\n onFocus (event) {\n this.hasFocus = true;\n this.$emit('focus', event);\n },\n\n onBlur (event) {\n this.hasFocus = false;\n this.$emit('blur', event);\n },\n\n onInput (event) {\n this.$emit('input', event);\n },\n\n },\n};\n</script>\n"],"names":["editor"],"mappings":";;;;;;;;;;AAqNA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAA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;AAAA,IAEA,sBAAA;AACA,WAAA,MAAA,qBAAA;AAAA,IACA;AAAA,IAEA,qBAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,mBAAA;AAAA,IACA;AAAA,IAEA,oBAAA,gBAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,QAAA,cAAA,gBAAA;AAAA,IACA;AAAA,IAEA,kBAAA,WAAA,MAAA;;AACA,iBAAA,MAAA,mBAAA,mBAAA,OAAA,QAAA,MAAA,UAAA;AAAA,IACA;AAAA,IAEA,QAAA,OAAA;AACA,WAAA,WAAA;AACA,WAAA,MAAA,SAAA,KAAA;AAAA,IACA;AAAA,IAEA,OAAA,OAAA;AACA,WAAA,WAAA;AACA,WAAA,MAAA,QAAA,KAAA;AAAA,IACA;AAAA,IAEA,QAAA,OAAA;AACA,WAAA,MAAA,SAAA,KAAA;AAAA,IACA;AAAA,EAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -96,20 +96,20 @@ var _sfc_render = function render() {
96
96
  _vm.hover = true;
97
97
  }, "mouseleave": function($event) {
98
98
  _vm.hover = false;
99
- }, "click": _vm.onClick } }, [_c("dt-item-layout", { staticClass: "d-recipe-feed-item-pill__layout", scopedSlots: _vm._u([{ key: "left", fn: function() {
99
+ }, "click": _vm.onClick } }, [_c("dt-item-layout", { staticClass: "d-recipe-feed-item-pill__layout", attrs: { "unstyled": "" }, scopedSlots: _vm._u([{ key: "left", fn: function() {
100
100
  return [_c("div", { staticClass: "d-recipe-feed-item-pill__icon", attrs: { "data-qa": "dt-recipe-feed-item-pill__icon" } }, [_vm.showChevronIcon ? _c(_vm.toggleIcon, { tag: "component", attrs: { "size": "300" } }) : _vm._t("leftIcon", null, { "iconSize": "300" })], 2)];
101
- }, proxy: true }, { key: "subtitle", fn: function() {
102
- return [_vm._t("subtitle")];
103
- }, proxy: true }, { key: "bottom", fn: function() {
104
- return [_vm._t("bottom")];
105
- }, proxy: true }, { key: "right", fn: function() {
106
- return [_vm._t("right")];
107
- }, proxy: true }], null, true) }, [_vm._t("title", function() {
101
+ }, proxy: true }, _vm.$slots.subtitle ? { key: "subtitle", fn: function() {
102
+ return [_c("div", { staticClass: "d-recipe-feed-item-pill__subtitle" }, [_vm._t("subtitle")], 2)];
103
+ }, proxy: true } : null, _vm.$slots.bottom ? { key: "bottom", fn: function() {
104
+ return [_c("div", { staticClass: "d-recipe-feed-item-pill__bottom" }, [_vm._t("bottom")], 2)];
105
+ }, proxy: true } : null, _vm.$slots.right ? { key: "right", fn: function() {
106
+ return [_c("div", { staticClass: "d-recipe-feed-item-pill__right" }, [_vm._t("right")], 2)];
107
+ }, proxy: true } : null], null, true) }, [_vm._t("title", function() {
108
108
  return [_c("span", { staticClass: "d-recipe-feed-item-pill__title" }, [_vm._v(_vm._s(_vm.title))])];
109
109
  })], 2)], 1)];
110
- }, proxy: true }, { key: "content", fn: function() {
110
+ }, proxy: true }, _vm.$slots.content ? { key: "content", fn: function() {
111
111
  return [_c("div", { staticClass: "d-recipe-feed-item-pill__content" }, [_vm._t("content")], 2)];
112
- }, proxy: true }], null, true) })], 1)]);
112
+ }, proxy: true } : null], null, true) })], 1)]);
113
113
  };
114
114
  var _sfc_staticRenderFns = [];
115
115
  var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.default(
@@ -1 +1 @@
1
- {"version":3,"file":"feed_item_pill.vue.cjs","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 :aria-label=\"ariaLabel\"\n :class=\"['d-recipe-feed-item-pill__button', toggleableClass, buttonClass]\"\n @focusin=\"hover = true\"\n @focusout=\"hover = false\"\n @mouseenter=\"hover = true\"\n @mouseleave=\"hover = false\"\n @click=\"onClick\"\n >\n <dt-item-layout class=\"d-recipe-feed-item-pill__layout\">\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 #subtitle>\n <slot name=\"subtitle\" />\n </template>\n <template #bottom>\n <slot name=\"bottom\" />\n </template>\n <template #right>\n <slot name=\"right\" />\n </template>\n </dt-item-layout>\n </button>\n </template>\n <template #content>\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';\n\nexport default {\n name: 'DtRecipeFeedItemPill',\n\n components: { DtItemLayout, DtCollapsible },\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 * Aria label for feed pill\n */\n ariaLabel: {\n type: String,\n required: true,\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\n methods: {\n onClick () {\n if (!this.toggleable) return;\n\n this.expanded = !this.expanded;\n },\n },\n};\n</script>\n"],"names":["DtItemLayout","DtCollapsible","FEED_ITEM_PILL_BORDER_COLORS","DtIconChevronDown","DtIconChevronRight"],"mappings":";;;;;;;AAiEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,cAAAA,YAAA,SAAA,eAAAC,oBAAA;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,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;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,CAAA,UAAA,OAAA,KAAAC,qDAAA,EAAA,SAAA,KAAA;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,WAAAC,KAAA,oBAAAC;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,yBAAA,6BAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AAEA,WAAA,WAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"feed_item_pill.vue.cjs","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 :aria-label=\"ariaLabel\"\n :class=\"['d-recipe-feed-item-pill__button', toggleableClass, buttonClass]\"\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';\n\nexport default {\n name: 'DtRecipeFeedItemPill',\n\n components: { DtItemLayout, DtCollapsible },\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 * Aria label for feed pill\n */\n ariaLabel: {\n type: String,\n required: true,\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\n methods: {\n onClick () {\n if (!this.toggleable) return;\n\n this.expanded = !this.expanded;\n },\n },\n};\n</script>\n"],"names":["DtItemLayout","DtCollapsible","FEED_ITEM_PILL_BORDER_COLORS","DtIconChevronDown","DtIconChevronRight"],"mappings":";;;;;;;AAsFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,cAAAA,YAAA,SAAA,eAAAC,oBAAA;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,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;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,CAAA,UAAA,OAAA,KAAAC,qDAAA,EAAA,SAAA,KAAA;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,WAAAC,KAAA,oBAAAC;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,yBAAA,6BAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AAEA,WAAA,WAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -94,20 +94,20 @@ var _sfc_render = function render() {
94
94
  _vm.hover = true;
95
95
  }, "mouseleave": function($event) {
96
96
  _vm.hover = false;
97
- }, "click": _vm.onClick } }, [_c("dt-item-layout", { staticClass: "d-recipe-feed-item-pill__layout", scopedSlots: _vm._u([{ key: "left", fn: function() {
97
+ }, "click": _vm.onClick } }, [_c("dt-item-layout", { staticClass: "d-recipe-feed-item-pill__layout", attrs: { "unstyled": "" }, scopedSlots: _vm._u([{ key: "left", fn: function() {
98
98
  return [_c("div", { staticClass: "d-recipe-feed-item-pill__icon", attrs: { "data-qa": "dt-recipe-feed-item-pill__icon" } }, [_vm.showChevronIcon ? _c(_vm.toggleIcon, { tag: "component", attrs: { "size": "300" } }) : _vm._t("leftIcon", null, { "iconSize": "300" })], 2)];
99
- }, proxy: true }, { key: "subtitle", fn: function() {
100
- return [_vm._t("subtitle")];
101
- }, proxy: true }, { key: "bottom", fn: function() {
102
- return [_vm._t("bottom")];
103
- }, proxy: true }, { key: "right", fn: function() {
104
- return [_vm._t("right")];
105
- }, proxy: true }], null, true) }, [_vm._t("title", function() {
99
+ }, proxy: true }, _vm.$slots.subtitle ? { key: "subtitle", fn: function() {
100
+ return [_c("div", { staticClass: "d-recipe-feed-item-pill__subtitle" }, [_vm._t("subtitle")], 2)];
101
+ }, proxy: true } : null, _vm.$slots.bottom ? { key: "bottom", fn: function() {
102
+ return [_c("div", { staticClass: "d-recipe-feed-item-pill__bottom" }, [_vm._t("bottom")], 2)];
103
+ }, proxy: true } : null, _vm.$slots.right ? { key: "right", fn: function() {
104
+ return [_c("div", { staticClass: "d-recipe-feed-item-pill__right" }, [_vm._t("right")], 2)];
105
+ }, proxy: true } : null], null, true) }, [_vm._t("title", function() {
106
106
  return [_c("span", { staticClass: "d-recipe-feed-item-pill__title" }, [_vm._v(_vm._s(_vm.title))])];
107
107
  })], 2)], 1)];
108
- }, proxy: true }, { key: "content", fn: function() {
108
+ }, proxy: true }, _vm.$slots.content ? { key: "content", fn: function() {
109
109
  return [_c("div", { staticClass: "d-recipe-feed-item-pill__content" }, [_vm._t("content")], 2)];
110
- }, proxy: true }], null, true) })], 1)]);
110
+ }, proxy: true } : null], null, true) })], 1)]);
111
111
  };
112
112
  var _sfc_staticRenderFns = [];
113
113
  var __component__ = /* @__PURE__ */ normalizeComponent(
@@ -1 +1 @@
1
- {"version":3,"file":"feed_item_pill.vue.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 :aria-label=\"ariaLabel\"\n :class=\"['d-recipe-feed-item-pill__button', toggleableClass, buttonClass]\"\n @focusin=\"hover = true\"\n @focusout=\"hover = false\"\n @mouseenter=\"hover = true\"\n @mouseleave=\"hover = false\"\n @click=\"onClick\"\n >\n <dt-item-layout class=\"d-recipe-feed-item-pill__layout\">\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 #subtitle>\n <slot name=\"subtitle\" />\n </template>\n <template #bottom>\n <slot name=\"bottom\" />\n </template>\n <template #right>\n <slot name=\"right\" />\n </template>\n </dt-item-layout>\n </button>\n </template>\n <template #content>\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';\n\nexport default {\n name: 'DtRecipeFeedItemPill',\n\n components: { DtItemLayout, DtCollapsible },\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 * Aria label for feed pill\n */\n ariaLabel: {\n type: String,\n required: true,\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\n methods: {\n onClick () {\n if (!this.toggleable) return;\n\n this.expanded = !this.expanded;\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAiEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,cAAA,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,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;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,CAAA,UAAA,OAAA,KAAA,4BAAA,EAAA,SAAA,KAAA;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,WAAA,oBAAA;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,aAAA,6BAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AAEA,WAAA,WAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"feed_item_pill.vue.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 :aria-label=\"ariaLabel\"\n :class=\"['d-recipe-feed-item-pill__button', toggleableClass, buttonClass]\"\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';\n\nexport default {\n name: 'DtRecipeFeedItemPill',\n\n components: { DtItemLayout, DtCollapsible },\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 * Aria label for feed pill\n */\n ariaLabel: {\n type: String,\n required: true,\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\n methods: {\n onClick () {\n if (!this.toggleable) return;\n\n this.expanded = !this.expanded;\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAsFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,cAAA,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,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;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,CAAA,UAAA,OAAA,KAAA,4BAAA,EAAA,SAAA,KAAA;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,WAAA,oBAAA;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,aAAA,6BAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AAEA,WAAA,WAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -180,16 +180,14 @@ const _sfc_main = {
180
180
  };
181
181
  var _sfc_render = function render() {
182
182
  var _vm = this, _c = _vm._self._c;
183
- return _c("dt-list-item", _vm._g(_vm._b({ ref: "FeedItemRef", class: ["d-recipe-feed-item-row", _vm.listItemClasses], attrs: { "navigation-type": "none", "data-qa": "dt-recipe-feed-item-row" }, scopedSlots: _vm._u([{ key: "left", fn: function() {
183
+ return _c("dt-list-item", _vm._g(_vm._b({ ref: "FeedItemRef", class: _vm.listItemClasses, attrs: { "navigation-type": "none", "data-qa": "dt-recipe-feed-item-row" }, scopedSlots: _vm._u([{ key: "left", fn: function() {
184
184
  return [_vm.showHeader ? _c("div", { staticClass: "d-recipe-feed-item-row__avatar-container" }, [_vm._t("avatar", function() {
185
185
  return [_c("dt-avatar", { attrs: { "full-name": _vm.displayName, "image-src": _vm.avatarImageUrl, "image-alt": "", "seed": _vm.avatarSeed }, scopedSlots: _vm._u([_vm.noInitials ? { key: "icon", fn: function({ iconSize }) {
186
186
  return [_c("dt-icon-user", { attrs: { "size": iconSize } })];
187
187
  } } : null], null, true) })];
188
188
  })], 2) : _vm._e(), !_vm.showHeader ? _c("span", { directives: [{ name: "show", rawName: "v-show", value: _vm.isActive, expression: "isActive" }], staticClass: "d-recipe-feed-item-row__left-time", attrs: { "data-qa": "dt-recipe-feed-item-row--left-time" } }, [_vm._v(" " + _vm._s(_vm.shortTime) + " ")]) : _vm._e()];
189
189
  }, proxy: true }, { key: "bottom", fn: function() {
190
- return [_vm.$slots.reactions ? _c("div", { staticClass: "d-recipe-feed-item-row__reactions", attrs: { "data-qa": "dt-recipe-feed-item-row--reactions" } }, [_vm._t("reactions")], 2) : _vm._e(), _vm.$slots.threading ? _c("div", { staticClass: "d-recipe-feed-item-row__threading" }, [_vm._t("threading")], 2) : _vm._e()];
191
- }, proxy: true }, { key: "right", fn: function() {
192
- return [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.isActive, expression: "isActive" }], staticClass: "d-recipe-feed-item-row__menu", attrs: { "data-qa": "dt-recipe-feed-item-row--menu" } }, [_c("dt-lazy-show", { attrs: { "appear": true, "transition": "fade", "show": _vm.isActive } }, [_vm._t("menu")], 2)], 1)];
190
+ return [_vm.$slots.reactions ? _c("div", { staticClass: "d-recipe-feed-item-row__reactions", attrs: { "data-qa": "dt-recipe-feed-item-row--reactions" } }, [_vm._t("reactions")], 2) : _vm._e(), _vm.$slots.threading ? _c("div", { staticClass: "d-recipe-feed-item-row__threading" }, [_vm._t("threading")], 2) : _vm._e(), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.isActive, expression: "isActive" }], staticClass: "d-recipe-feed-item-row__menu", attrs: { "data-qa": "dt-recipe-feed-item-row--menu" } }, [_c("dt-lazy-show", { attrs: { "appear": true, "transition": "fade", "show": _vm.isActive } }, [_vm._t("menu")], 2)], 1)];
193
191
  }, proxy: true }], null, true) }, "dt-list-item", _vm.$attrs, false), _vm.feedListeners), [_c("article", { staticClass: "d-recipe-feed-item-row__content" }, [_vm.showHeader ? _c("div", { staticClass: "d-recipe-feed-item-row__header", attrs: { "data-qa": "dt-recipe-feed-item-row--header" } }, [_vm._t("displayName", function() {
194
192
  return [_c("p", { staticClass: "d-recipe-feed-item-row__header-name" }, [_vm._v(" " + _vm._s(_vm.displayName) + " ")])];
195
193
  }), _c("time", { staticClass: "d-recipe-feed-item-row__header-time" }, [_vm._v(" " + _vm._s(_vm.time) + " ")]), _vm.labelText ? _c("dt-badge", { attrs: { "text": _vm.labelText } }) : _vm._e()], 2) : _vm._e(), _c("span", { attrs: { "data-qa": "dt-recipe-feed-item-row--content" } }, [_vm._t("default")], 2), _vm.$slots.attachment ? _c("div", { staticClass: "d-recipe-feed-item-row__attachment", attrs: { "data-qa": "dt-recipe-feed-item-row--attachment" } }, [_vm._t("attachment")], 2) : _vm._e()])]);
@@ -1 +1 @@
1
- {"version":3,"file":"feed_item_row.vue.cjs","sources":["../../../../recipes/conversation_view/feed_item_row/feed_item_row.vue"],"sourcesContent":["<template>\n <dt-list-item\n ref=\"FeedItemRef\"\n navigation-type=\"none\"\n v-bind=\"$attrs\"\n :class=\"['d-recipe-feed-item-row', listItemClasses]\"\n data-qa=\"dt-recipe-feed-item-row\"\n v-on=\"feedListeners\"\n >\n <!-- Avatar or time -->\n <template #left>\n <div\n v-if=\"showHeader\"\n class=\"d-recipe-feed-item-row__avatar-container\"\n >\n <!-- @slot Slot to contain the avatar, overrides avatar props. -->\n <slot\n name=\"avatar\"\n >\n <dt-avatar\n :full-name=\"displayName\"\n :image-src=\"avatarImageUrl\"\n image-alt=\"\"\n :seed=\"avatarSeed\"\n >\n <template\n v-if=\"noInitials\"\n #icon=\"{ iconSize }\"\n >\n <dt-icon-user\n :size=\"iconSize\"\n />\n </template>\n </dt-avatar>\n </slot>\n </div>\n <!-- show time instead of avatar when headers not present -->\n <span\n v-if=\"!showHeader\"\n v-show=\"isActive\"\n class=\"d-recipe-feed-item-row__left-time\"\n data-qa=\"dt-recipe-feed-item-row--left-time\"\n >\n {{ shortTime }}\n </span>\n </template>\n\n <article class=\"d-recipe-feed-item-row__content\">\n <!-- Feed Item -->\n <div\n v-if=\"showHeader\"\n data-qa=\"dt-recipe-feed-item-row--header\"\n class=\"d-recipe-feed-item-row__header\"\n >\n <!-- @slot Slot for display name -->\n <slot name=\"displayName\">\n <p class=\"d-recipe-feed-item-row__header-name\">\n {{ displayName }}\n </p>\n </slot>\n <time\n class=\"d-recipe-feed-item-row__header-time\"\n >\n {{ time }}\n </time>\n <dt-badge\n v-if=\"labelText\"\n :text=\"labelText\"\n />\n </div>\n <!-- @slot Default content slot for feed item row -->\n <span\n data-qa=\"dt-recipe-feed-item-row--content\"\n >\n <slot />\n </span>\n <div\n v-if=\"$slots.attachment\"\n data-qa=\"dt-recipe-feed-item-row--attachment\"\n class=\"d-recipe-feed-item-row__attachment\"\n >\n <slot name=\"attachment\" />\n </div>\n </article>\n\n <template #bottom>\n <div\n v-if=\"$slots.reactions\"\n class=\"d-recipe-feed-item-row__reactions\"\n data-qa=\"dt-recipe-feed-item-row--reactions\"\n >\n <!-- @slot Slot for reactions row component -->\n <slot name=\"reactions\" />\n </div>\n <div\n v-if=\"$slots.threading\"\n class=\"d-recipe-feed-item-row__threading\"\n >\n <!-- @slot Slot for threading row component -->\n <slot name=\"threading\" />\n </div>\n </template>\n\n <!-- Action menu -->\n <template #right>\n <div\n v-show=\"isActive\"\n data-qa=\"dt-recipe-feed-item-row--menu\"\n class=\"d-recipe-feed-item-row__menu\"\n >\n <dt-lazy-show\n :appear=\"true\"\n transition=\"fade\"\n :show=\"isActive\"\n >\n <!-- @slot Slot for actions hover menu component -->\n <slot name=\"menu\" />\n </dt-lazy-show>\n </div>\n </template>\n </dt-list-item>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DEFAULT_FEED_ROW_STATE, FEED_ROW_STATE_BACKGROUND_COLOR } from './feed_item_row_constants.js';\nimport { DtAvatar } from '@/components/avatar';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtListItem } from '@/components/list_item';\nimport { DtBadge } from '@/components/badge';\nimport Modal from '@/common/mixins/modal';\nimport { DtIconUser } from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'DtRecipeFeedItemRow',\n\n components: {\n DtAvatar,\n DtLazyShow,\n DtListItem,\n DtBadge,\n DtIconUser,\n },\n\n mixins: [Modal],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Show avatar, show header text or dont show left time and vice versa\n */\n showHeader: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional avatar image url.\n * If not provided it will use extracted initials from displayName.\n */\n avatarImageUrl: {\n type: String,\n default: '',\n },\n\n /**\n * The display name of the sender\n */\n displayName: {\n type: String,\n default: '',\n },\n\n /**\n * Initials will never be shown. Instead it will show a \"User\" icon.\n */\n noInitials: {\n type: Boolean,\n default: false,\n },\n\n /**\n * time string displayed as is.\n * Shown on the header when showHeader is true\n */\n time: {\n type: String,\n default: '',\n },\n\n /**\n * short time string without AM/PM displayed as is.\n * Shown on the left of feed item when showHeader is false and isActive is true\n */\n shortTime: {\n type: String,\n default: '',\n },\n\n /**\n * A label displayed next to the displayName. Will not show if empty.\n */\n labelText: {\n type: String,\n default: '',\n },\n\n /**\n * displays a darkened background on the row.\n */\n isActive: {\n type: Boolean,\n default: false,\n },\n\n /**\n * state for the feed item row. Can be normal, searched & error\n */\n state: {\n type: String,\n default: DEFAULT_FEED_ROW_STATE,\n validator: state => Object.keys(FEED_ROW_STATE_BACKGROUND_COLOR).includes(state),\n },\n },\n\n emits: [\n /**\n * Fires when hovered over feed row\n *\n * @event hover\n * @type {Boolean}\n */\n 'hover',\n\n /**\n * Fires when focused over feed row\n *\n * @event focus\n * @type {Boolean}\n */\n 'focus',\n\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n ],\n\n data () {\n return {\n transitionActive: false,\n };\n },\n\n computed: {\n feedListeners () {\n return {\n ...this.$listeners,\n mouseenter: () => this.setHover(true),\n mouseleave: () => this.setHover(false),\n focusin: () => this.setFocus(true),\n focusout: () => this.setFocus(false),\n transitionend: () => this.transitionComplete(),\n keydown: event => {\n switch (event.code) {\n case 'Tab':\n this.trapFocus(event);\n break;\n }\n this.$emit('keydown', event);\n },\n };\n },\n\n listItemClasses () {\n return [\n 'd-recipe-feed-item-row',\n { 'd-recipe-feed-item-row--active': this.isActive && this.state === DEFAULT_FEED_ROW_STATE },\n { 'd-recipe-feed-item-row__state-transition': this.transitionActive },\n FEED_ROW_STATE_BACKGROUND_COLOR[this.state],\n\n ];\n },\n },\n\n watch: {\n state: {\n immediate: true,\n handler: function (newState, oldState) {\n if (newState !== DEFAULT_FEED_ROW_STATE) {\n this.transitionActive = true;\n }\n },\n },\n },\n\n methods: {\n transitionComplete () {\n if (this.state === DEFAULT_FEED_ROW_STATE) {\n this.transitionActive = false;\n }\n },\n\n trapFocus (e) {\n this.focusTrappedTabPress(e);\n },\n\n setFocus (bool) {\n this.$emit('focus', bool);\n },\n\n setHover (bool) {\n this.$emit('hover', bool);\n },\n },\n};\n</script>\n"],"names":["DtAvatar","DtLazyShow","DtListItem","DtBadge","DtIconUser","Modal","DEFAULT_FEED_ROW_STATE","FEED_ROW_STATE_BACKGROUND_COLOR"],"mappings":";;;;;;;;;;AAqIA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,OAAA;AAAA,IACA,YAAAC,UAAA;AAAA,IACA,YAAAC,UAAA;AAAA,IACA,SAAAC,MAAA;AAAA,IACA,YAAAC,KAAA;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,MAAAA,OAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AA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AA,MAAA,WAAA,KAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACA,EAAA,kCAAA,KAAA,YAAA,KAAA,UAAAD,wBAAAA,uBAAA;AAAA,QACA,EAAA,4CAAA,KAAA,iBAAA;AAAA,QACAC,wBAAA,gCAAA,KAAA,KAAA;AAAA,MAEA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,WAAA;AAAA,MACA,SAAA,SAAA,UAAA,UAAA;AACA,YAAA,aAAAD,wBAAAA,wBAAA;AACA,eAAA,mBAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,qBAAA;AACA,UAAA,KAAA,UAAAA,gDAAA;AACA,aAAA,mBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA,GAAA;AACA,WAAA,qBAAA,CAAA;AAAA,IACA;AAAA,IAEA,SAAA,MAAA;AACA,WAAA,MAAA,SAAA,IAAA;AAAA,IACA;AAAA,IAEA,SAAA,MAAA;AACA,WAAA,MAAA,SAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"feed_item_row.vue.cjs","sources":["../../../../recipes/conversation_view/feed_item_row/feed_item_row.vue"],"sourcesContent":["<template>\n <dt-list-item\n ref=\"FeedItemRef\"\n navigation-type=\"none\"\n v-bind=\"$attrs\"\n :class=\"listItemClasses\"\n data-qa=\"dt-recipe-feed-item-row\"\n v-on=\"feedListeners\"\n >\n <!-- Avatar or time -->\n <template #left>\n <div\n v-if=\"showHeader\"\n class=\"d-recipe-feed-item-row__avatar-container\"\n >\n <!-- @slot Slot to contain the avatar, overrides avatar props. -->\n <slot\n name=\"avatar\"\n >\n <dt-avatar\n :full-name=\"displayName\"\n :image-src=\"avatarImageUrl\"\n image-alt=\"\"\n :seed=\"avatarSeed\"\n >\n <template\n v-if=\"noInitials\"\n #icon=\"{ iconSize }\"\n >\n <dt-icon-user\n :size=\"iconSize\"\n />\n </template>\n </dt-avatar>\n </slot>\n </div>\n <!-- show time instead of avatar when headers not present -->\n <span\n v-if=\"!showHeader\"\n v-show=\"isActive\"\n class=\"d-recipe-feed-item-row__left-time\"\n data-qa=\"dt-recipe-feed-item-row--left-time\"\n >\n {{ shortTime }}\n </span>\n </template>\n\n <article class=\"d-recipe-feed-item-row__content\">\n <!-- Feed Item -->\n <div\n v-if=\"showHeader\"\n data-qa=\"dt-recipe-feed-item-row--header\"\n class=\"d-recipe-feed-item-row__header\"\n >\n <!-- @slot Slot for display name -->\n <slot name=\"displayName\">\n <p class=\"d-recipe-feed-item-row__header-name\">\n {{ displayName }}\n </p>\n </slot>\n <time\n class=\"d-recipe-feed-item-row__header-time\"\n >\n {{ time }}\n </time>\n <dt-badge\n v-if=\"labelText\"\n :text=\"labelText\"\n />\n </div>\n <!-- @slot Default content slot for feed item row -->\n <span\n data-qa=\"dt-recipe-feed-item-row--content\"\n >\n <slot />\n </span>\n <div\n v-if=\"$slots.attachment\"\n data-qa=\"dt-recipe-feed-item-row--attachment\"\n class=\"d-recipe-feed-item-row__attachment\"\n >\n <slot name=\"attachment\" />\n </div>\n </article>\n\n <template #bottom>\n <!-- Reactions -->\n <div\n v-if=\"$slots.reactions\"\n class=\"d-recipe-feed-item-row__reactions\"\n data-qa=\"dt-recipe-feed-item-row--reactions\"\n >\n <!-- @slot Slot for reactions row component -->\n <slot name=\"reactions\" />\n </div>\n\n <!-- Threading -->\n <div\n v-if=\"$slots.threading\"\n class=\"d-recipe-feed-item-row__threading\"\n >\n <!-- @slot Slot for threading row component -->\n <slot name=\"threading\" />\n </div>\n\n <!-- Action menu -->\n <div\n v-show=\"isActive\"\n data-qa=\"dt-recipe-feed-item-row--menu\"\n class=\"d-recipe-feed-item-row__menu\"\n >\n <dt-lazy-show\n :appear=\"true\"\n transition=\"fade\"\n :show=\"isActive\"\n >\n <!-- @slot Slot for actions hover menu component -->\n <slot name=\"menu\" />\n </dt-lazy-show>\n </div>\n </template>\n </dt-list-item>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DEFAULT_FEED_ROW_STATE, FEED_ROW_STATE_BACKGROUND_COLOR } from './feed_item_row_constants.js';\nimport { DtAvatar } from '@/components/avatar';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtListItem } from '@/components/list_item';\nimport { DtBadge } from '@/components/badge';\nimport Modal from '@/common/mixins/modal';\nimport { DtIconUser } from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'DtRecipeFeedItemRow',\n\n components: {\n DtAvatar,\n DtLazyShow,\n DtListItem,\n DtBadge,\n DtIconUser,\n },\n\n mixins: [Modal],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Show avatar, show header text or dont show left time and vice versa\n */\n showHeader: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional avatar image url.\n * If not provided it will use extracted initials from displayName.\n */\n avatarImageUrl: {\n type: String,\n default: '',\n },\n\n /**\n * The display name of the sender\n */\n displayName: {\n type: String,\n default: '',\n },\n\n /**\n * Initials will never be shown. Instead it will show a \"User\" icon.\n */\n noInitials: {\n type: Boolean,\n default: false,\n },\n\n /**\n * time string displayed as is.\n * Shown on the header when showHeader is true\n */\n time: {\n type: String,\n default: '',\n },\n\n /**\n * short time string without AM/PM displayed as is.\n * Shown on the left of feed item when showHeader is false and isActive is true\n */\n shortTime: {\n type: String,\n default: '',\n },\n\n /**\n * A label displayed next to the displayName. Will not show if empty.\n */\n labelText: {\n type: String,\n default: '',\n },\n\n /**\n * displays a darkened background on the row.\n */\n isActive: {\n type: Boolean,\n default: false,\n },\n\n /**\n * state for the feed item row. Can be normal, searched & error\n */\n state: {\n type: String,\n default: DEFAULT_FEED_ROW_STATE,\n validator: state => Object.keys(FEED_ROW_STATE_BACKGROUND_COLOR).includes(state),\n },\n },\n\n emits: [\n /**\n * Fires when hovered over feed row\n *\n * @event hover\n * @type {Boolean}\n */\n 'hover',\n\n /**\n * Fires when focused over feed row\n *\n * @event focus\n * @type {Boolean}\n */\n 'focus',\n\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n ],\n\n data () {\n return {\n transitionActive: false,\n };\n },\n\n computed: {\n feedListeners () {\n return {\n ...this.$listeners,\n mouseenter: () => this.setHover(true),\n mouseleave: () => this.setHover(false),\n focusin: () => this.setFocus(true),\n focusout: () => this.setFocus(false),\n transitionend: () => this.transitionComplete(),\n keydown: event => {\n switch (event.code) {\n case 'Tab':\n this.trapFocus(event);\n break;\n }\n this.$emit('keydown', event);\n },\n };\n },\n\n listItemClasses () {\n return [\n 'd-recipe-feed-item-row',\n { 'd-recipe-feed-item-row--active': this.isActive && this.state === DEFAULT_FEED_ROW_STATE },\n { 'd-recipe-feed-item-row__state-transition': this.transitionActive },\n FEED_ROW_STATE_BACKGROUND_COLOR[this.state],\n\n ];\n },\n },\n\n watch: {\n state: {\n immediate: true,\n handler: function (newState, oldState) {\n if (newState !== DEFAULT_FEED_ROW_STATE) {\n this.transitionActive = true;\n }\n },\n },\n },\n\n methods: {\n transitionComplete () {\n if (this.state === DEFAULT_FEED_ROW_STATE) {\n this.transitionActive = false;\n }\n },\n\n trapFocus (e) {\n this.focusTrappedTabPress(e);\n },\n\n setFocus (bool) {\n this.$emit('focus', bool);\n },\n\n setHover (bool) {\n this.$emit('hover', bool);\n },\n },\n};\n</script>\n"],"names":["DtAvatar","DtLazyShow","DtListItem","DtBadge","DtIconUser","Modal","DEFAULT_FEED_ROW_STATE","FEED_ROW_STATE_BACKGROUND_COLOR"],"mappings":";;;;;;;;;;AAsIA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,OAAA;AAAA,IACA,YAAAC,UAA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;;;;;;;;;;;;;;;;"}
@@ -178,16 +178,14 @@ const _sfc_main = {
178
178
  };
179
179
  var _sfc_render = function render() {
180
180
  var _vm = this, _c = _vm._self._c;
181
- return _c("dt-list-item", _vm._g(_vm._b({ ref: "FeedItemRef", class: ["d-recipe-feed-item-row", _vm.listItemClasses], attrs: { "navigation-type": "none", "data-qa": "dt-recipe-feed-item-row" }, scopedSlots: _vm._u([{ key: "left", fn: function() {
181
+ return _c("dt-list-item", _vm._g(_vm._b({ ref: "FeedItemRef", class: _vm.listItemClasses, attrs: { "navigation-type": "none", "data-qa": "dt-recipe-feed-item-row" }, scopedSlots: _vm._u([{ key: "left", fn: function() {
182
182
  return [_vm.showHeader ? _c("div", { staticClass: "d-recipe-feed-item-row__avatar-container" }, [_vm._t("avatar", function() {
183
183
  return [_c("dt-avatar", { attrs: { "full-name": _vm.displayName, "image-src": _vm.avatarImageUrl, "image-alt": "", "seed": _vm.avatarSeed }, scopedSlots: _vm._u([_vm.noInitials ? { key: "icon", fn: function({ iconSize }) {
184
184
  return [_c("dt-icon-user", { attrs: { "size": iconSize } })];
185
185
  } } : null], null, true) })];
186
186
  })], 2) : _vm._e(), !_vm.showHeader ? _c("span", { directives: [{ name: "show", rawName: "v-show", value: _vm.isActive, expression: "isActive" }], staticClass: "d-recipe-feed-item-row__left-time", attrs: { "data-qa": "dt-recipe-feed-item-row--left-time" } }, [_vm._v(" " + _vm._s(_vm.shortTime) + " ")]) : _vm._e()];
187
187
  }, proxy: true }, { key: "bottom", fn: function() {
188
- return [_vm.$slots.reactions ? _c("div", { staticClass: "d-recipe-feed-item-row__reactions", attrs: { "data-qa": "dt-recipe-feed-item-row--reactions" } }, [_vm._t("reactions")], 2) : _vm._e(), _vm.$slots.threading ? _c("div", { staticClass: "d-recipe-feed-item-row__threading" }, [_vm._t("threading")], 2) : _vm._e()];
189
- }, proxy: true }, { key: "right", fn: function() {
190
- return [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.isActive, expression: "isActive" }], staticClass: "d-recipe-feed-item-row__menu", attrs: { "data-qa": "dt-recipe-feed-item-row--menu" } }, [_c("dt-lazy-show", { attrs: { "appear": true, "transition": "fade", "show": _vm.isActive } }, [_vm._t("menu")], 2)], 1)];
188
+ return [_vm.$slots.reactions ? _c("div", { staticClass: "d-recipe-feed-item-row__reactions", attrs: { "data-qa": "dt-recipe-feed-item-row--reactions" } }, [_vm._t("reactions")], 2) : _vm._e(), _vm.$slots.threading ? _c("div", { staticClass: "d-recipe-feed-item-row__threading" }, [_vm._t("threading")], 2) : _vm._e(), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.isActive, expression: "isActive" }], staticClass: "d-recipe-feed-item-row__menu", attrs: { "data-qa": "dt-recipe-feed-item-row--menu" } }, [_c("dt-lazy-show", { attrs: { "appear": true, "transition": "fade", "show": _vm.isActive } }, [_vm._t("menu")], 2)], 1)];
191
189
  }, proxy: true }], null, true) }, "dt-list-item", _vm.$attrs, false), _vm.feedListeners), [_c("article", { staticClass: "d-recipe-feed-item-row__content" }, [_vm.showHeader ? _c("div", { staticClass: "d-recipe-feed-item-row__header", attrs: { "data-qa": "dt-recipe-feed-item-row--header" } }, [_vm._t("displayName", function() {
192
190
  return [_c("p", { staticClass: "d-recipe-feed-item-row__header-name" }, [_vm._v(" " + _vm._s(_vm.displayName) + " ")])];
193
191
  }), _c("time", { staticClass: "d-recipe-feed-item-row__header-time" }, [_vm._v(" " + _vm._s(_vm.time) + " ")]), _vm.labelText ? _c("dt-badge", { attrs: { "text": _vm.labelText } }) : _vm._e()], 2) : _vm._e(), _c("span", { attrs: { "data-qa": "dt-recipe-feed-item-row--content" } }, [_vm._t("default")], 2), _vm.$slots.attachment ? _c("div", { staticClass: "d-recipe-feed-item-row__attachment", attrs: { "data-qa": "dt-recipe-feed-item-row--attachment" } }, [_vm._t("attachment")], 2) : _vm._e()])]);
@@ -1 +1 @@
1
- {"version":3,"file":"feed_item_row.vue.js","sources":["../../../../recipes/conversation_view/feed_item_row/feed_item_row.vue"],"sourcesContent":["<template>\n <dt-list-item\n ref=\"FeedItemRef\"\n navigation-type=\"none\"\n v-bind=\"$attrs\"\n :class=\"['d-recipe-feed-item-row', listItemClasses]\"\n data-qa=\"dt-recipe-feed-item-row\"\n v-on=\"feedListeners\"\n >\n <!-- Avatar or time -->\n <template #left>\n <div\n v-if=\"showHeader\"\n class=\"d-recipe-feed-item-row__avatar-container\"\n >\n <!-- @slot Slot to contain the avatar, overrides avatar props. -->\n <slot\n name=\"avatar\"\n >\n <dt-avatar\n :full-name=\"displayName\"\n :image-src=\"avatarImageUrl\"\n image-alt=\"\"\n :seed=\"avatarSeed\"\n >\n <template\n v-if=\"noInitials\"\n #icon=\"{ iconSize }\"\n >\n <dt-icon-user\n :size=\"iconSize\"\n />\n </template>\n </dt-avatar>\n </slot>\n </div>\n <!-- show time instead of avatar when headers not present -->\n <span\n v-if=\"!showHeader\"\n v-show=\"isActive\"\n class=\"d-recipe-feed-item-row__left-time\"\n data-qa=\"dt-recipe-feed-item-row--left-time\"\n >\n {{ shortTime }}\n </span>\n </template>\n\n <article class=\"d-recipe-feed-item-row__content\">\n <!-- Feed Item -->\n <div\n v-if=\"showHeader\"\n data-qa=\"dt-recipe-feed-item-row--header\"\n class=\"d-recipe-feed-item-row__header\"\n >\n <!-- @slot Slot for display name -->\n <slot name=\"displayName\">\n <p class=\"d-recipe-feed-item-row__header-name\">\n {{ displayName }}\n </p>\n </slot>\n <time\n class=\"d-recipe-feed-item-row__header-time\"\n >\n {{ time }}\n </time>\n <dt-badge\n v-if=\"labelText\"\n :text=\"labelText\"\n />\n </div>\n <!-- @slot Default content slot for feed item row -->\n <span\n data-qa=\"dt-recipe-feed-item-row--content\"\n >\n <slot />\n </span>\n <div\n v-if=\"$slots.attachment\"\n data-qa=\"dt-recipe-feed-item-row--attachment\"\n class=\"d-recipe-feed-item-row__attachment\"\n >\n <slot name=\"attachment\" />\n </div>\n </article>\n\n <template #bottom>\n <div\n v-if=\"$slots.reactions\"\n class=\"d-recipe-feed-item-row__reactions\"\n data-qa=\"dt-recipe-feed-item-row--reactions\"\n >\n <!-- @slot Slot for reactions row component -->\n <slot name=\"reactions\" />\n </div>\n <div\n v-if=\"$slots.threading\"\n class=\"d-recipe-feed-item-row__threading\"\n >\n <!-- @slot Slot for threading row component -->\n <slot name=\"threading\" />\n </div>\n </template>\n\n <!-- Action menu -->\n <template #right>\n <div\n v-show=\"isActive\"\n data-qa=\"dt-recipe-feed-item-row--menu\"\n class=\"d-recipe-feed-item-row__menu\"\n >\n <dt-lazy-show\n :appear=\"true\"\n transition=\"fade\"\n :show=\"isActive\"\n >\n <!-- @slot Slot for actions hover menu component -->\n <slot name=\"menu\" />\n </dt-lazy-show>\n </div>\n </template>\n </dt-list-item>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DEFAULT_FEED_ROW_STATE, FEED_ROW_STATE_BACKGROUND_COLOR } from './feed_item_row_constants.js';\nimport { DtAvatar } from '@/components/avatar';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtListItem } from '@/components/list_item';\nimport { DtBadge } from '@/components/badge';\nimport Modal from '@/common/mixins/modal';\nimport { DtIconUser } from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'DtRecipeFeedItemRow',\n\n components: {\n DtAvatar,\n DtLazyShow,\n DtListItem,\n DtBadge,\n DtIconUser,\n },\n\n mixins: [Modal],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Show avatar, show header text or dont show left time and vice versa\n */\n showHeader: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional avatar image url.\n * If not provided it will use extracted initials from displayName.\n */\n avatarImageUrl: {\n type: String,\n default: '',\n },\n\n /**\n * The display name of the sender\n */\n displayName: {\n type: String,\n default: '',\n },\n\n /**\n * Initials will never be shown. Instead it will show a \"User\" icon.\n */\n noInitials: {\n type: Boolean,\n default: false,\n },\n\n /**\n * time string displayed as is.\n * Shown on the header when showHeader is true\n */\n time: {\n type: String,\n default: '',\n },\n\n /**\n * short time string without AM/PM displayed as is.\n * Shown on the left of feed item when showHeader is false and isActive is true\n */\n shortTime: {\n type: String,\n default: '',\n },\n\n /**\n * A label displayed next to the displayName. Will not show if empty.\n */\n labelText: {\n type: String,\n default: '',\n },\n\n /**\n * displays a darkened background on the row.\n */\n isActive: {\n type: Boolean,\n default: false,\n },\n\n /**\n * state for the feed item row. Can be normal, searched & error\n */\n state: {\n type: String,\n default: DEFAULT_FEED_ROW_STATE,\n validator: state => Object.keys(FEED_ROW_STATE_BACKGROUND_COLOR).includes(state),\n },\n },\n\n emits: [\n /**\n * Fires when hovered over feed row\n *\n * @event hover\n * @type {Boolean}\n */\n 'hover',\n\n /**\n * Fires when focused over feed row\n *\n * @event focus\n * @type {Boolean}\n */\n 'focus',\n\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n ],\n\n data () {\n return {\n transitionActive: false,\n };\n },\n\n computed: {\n feedListeners () {\n return {\n ...this.$listeners,\n mouseenter: () => this.setHover(true),\n mouseleave: () => this.setHover(false),\n focusin: () => this.setFocus(true),\n focusout: () => this.setFocus(false),\n transitionend: () => this.transitionComplete(),\n keydown: event => {\n switch (event.code) {\n case 'Tab':\n this.trapFocus(event);\n break;\n }\n this.$emit('keydown', event);\n },\n };\n },\n\n listItemClasses () {\n return [\n 'd-recipe-feed-item-row',\n { 'd-recipe-feed-item-row--active': this.isActive && this.state === DEFAULT_FEED_ROW_STATE },\n { 'd-recipe-feed-item-row__state-transition': this.transitionActive },\n FEED_ROW_STATE_BACKGROUND_COLOR[this.state],\n\n ];\n },\n },\n\n watch: {\n state: {\n immediate: true,\n handler: function (newState, oldState) {\n if (newState !== DEFAULT_FEED_ROW_STATE) {\n this.transitionActive = true;\n }\n },\n },\n },\n\n methods: {\n transitionComplete () {\n if (this.state === DEFAULT_FEED_ROW_STATE) {\n this.transitionActive = false;\n }\n },\n\n trapFocus (e) {\n this.focusTrappedTabPress(e);\n },\n\n setFocus (bool) {\n this.$emit('focus', bool);\n },\n\n setHover (bool) {\n this.$emit('hover', bool);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;;AAqIA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA,CAAA,KAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,WAAA,OAAA,KAAA,+BAAA,EAAA,SAAA,K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IACA;AAAA,IAEA,SAAA,MAAA;AACA,WAAA,MAAA,SAAA,IAAA;AAAA,IACA;AAAA,IAEA,SAAA,MAAA;AACA,WAAA,MAAA,SAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"feed_item_row.vue.js","sources":["../../../../recipes/conversation_view/feed_item_row/feed_item_row.vue"],"sourcesContent":["<template>\n <dt-list-item\n ref=\"FeedItemRef\"\n navigation-type=\"none\"\n v-bind=\"$attrs\"\n :class=\"listItemClasses\"\n data-qa=\"dt-recipe-feed-item-row\"\n v-on=\"feedListeners\"\n >\n <!-- Avatar or time -->\n <template #left>\n <div\n v-if=\"showHeader\"\n class=\"d-recipe-feed-item-row__avatar-container\"\n >\n <!-- @slot Slot to contain the avatar, overrides avatar props. -->\n <slot\n name=\"avatar\"\n >\n <dt-avatar\n :full-name=\"displayName\"\n :image-src=\"avatarImageUrl\"\n image-alt=\"\"\n :seed=\"avatarSeed\"\n >\n <template\n v-if=\"noInitials\"\n #icon=\"{ iconSize }\"\n >\n <dt-icon-user\n :size=\"iconSize\"\n />\n </template>\n </dt-avatar>\n </slot>\n </div>\n <!-- show time instead of avatar when headers not present -->\n <span\n v-if=\"!showHeader\"\n v-show=\"isActive\"\n class=\"d-recipe-feed-item-row__left-time\"\n data-qa=\"dt-recipe-feed-item-row--left-time\"\n >\n {{ shortTime }}\n </span>\n </template>\n\n <article class=\"d-recipe-feed-item-row__content\">\n <!-- Feed Item -->\n <div\n v-if=\"showHeader\"\n data-qa=\"dt-recipe-feed-item-row--header\"\n class=\"d-recipe-feed-item-row__header\"\n >\n <!-- @slot Slot for display name -->\n <slot name=\"displayName\">\n <p class=\"d-recipe-feed-item-row__header-name\">\n {{ displayName }}\n </p>\n </slot>\n <time\n class=\"d-recipe-feed-item-row__header-time\"\n >\n {{ time }}\n </time>\n <dt-badge\n v-if=\"labelText\"\n :text=\"labelText\"\n />\n </div>\n <!-- @slot Default content slot for feed item row -->\n <span\n data-qa=\"dt-recipe-feed-item-row--content\"\n >\n <slot />\n </span>\n <div\n v-if=\"$slots.attachment\"\n data-qa=\"dt-recipe-feed-item-row--attachment\"\n class=\"d-recipe-feed-item-row__attachment\"\n >\n <slot name=\"attachment\" />\n </div>\n </article>\n\n <template #bottom>\n <!-- Reactions -->\n <div\n v-if=\"$slots.reactions\"\n class=\"d-recipe-feed-item-row__reactions\"\n data-qa=\"dt-recipe-feed-item-row--reactions\"\n >\n <!-- @slot Slot for reactions row component -->\n <slot name=\"reactions\" />\n </div>\n\n <!-- Threading -->\n <div\n v-if=\"$slots.threading\"\n class=\"d-recipe-feed-item-row__threading\"\n >\n <!-- @slot Slot for threading row component -->\n <slot name=\"threading\" />\n </div>\n\n <!-- Action menu -->\n <div\n v-show=\"isActive\"\n data-qa=\"dt-recipe-feed-item-row--menu\"\n class=\"d-recipe-feed-item-row__menu\"\n >\n <dt-lazy-show\n :appear=\"true\"\n transition=\"fade\"\n :show=\"isActive\"\n >\n <!-- @slot Slot for actions hover menu component -->\n <slot name=\"menu\" />\n </dt-lazy-show>\n </div>\n </template>\n </dt-list-item>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DEFAULT_FEED_ROW_STATE, FEED_ROW_STATE_BACKGROUND_COLOR } from './feed_item_row_constants.js';\nimport { DtAvatar } from '@/components/avatar';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtListItem } from '@/components/list_item';\nimport { DtBadge } from '@/components/badge';\nimport Modal from '@/common/mixins/modal';\nimport { DtIconUser } from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'DtRecipeFeedItemRow',\n\n components: {\n DtAvatar,\n DtLazyShow,\n DtListItem,\n DtBadge,\n DtIconUser,\n },\n\n mixins: [Modal],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Show avatar, show header text or dont show left time and vice versa\n */\n showHeader: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional avatar image url.\n * If not provided it will use extracted initials from displayName.\n */\n avatarImageUrl: {\n type: String,\n default: '',\n },\n\n /**\n * The display name of the sender\n */\n displayName: {\n type: String,\n default: '',\n },\n\n /**\n * Initials will never be shown. Instead it will show a \"User\" icon.\n */\n noInitials: {\n type: Boolean,\n default: false,\n },\n\n /**\n * time string displayed as is.\n * Shown on the header when showHeader is true\n */\n time: {\n type: String,\n default: '',\n },\n\n /**\n * short time string without AM/PM displayed as is.\n * Shown on the left of feed item when showHeader is false and isActive is true\n */\n shortTime: {\n type: String,\n default: '',\n },\n\n /**\n * A label displayed next to the displayName. Will not show if empty.\n */\n labelText: {\n type: String,\n default: '',\n },\n\n /**\n * displays a darkened background on the row.\n */\n isActive: {\n type: Boolean,\n default: false,\n },\n\n /**\n * state for the feed item row. Can be normal, searched & error\n */\n state: {\n type: String,\n default: DEFAULT_FEED_ROW_STATE,\n validator: state => Object.keys(FEED_ROW_STATE_BACKGROUND_COLOR).includes(state),\n },\n },\n\n emits: [\n /**\n * Fires when hovered over feed row\n *\n * @event hover\n * @type {Boolean}\n */\n 'hover',\n\n /**\n * Fires when focused over feed row\n *\n * @event focus\n * @type {Boolean}\n */\n 'focus',\n\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n ],\n\n data () {\n return {\n transitionActive: false,\n };\n },\n\n computed: {\n feedListeners () {\n return {\n ...this.$listeners,\n mouseenter: () => this.setHover(true),\n mouseleave: () => this.setHover(false),\n focusin: () => this.setFocus(true),\n focusout: () => this.setFocus(false),\n transitionend: () => this.transitionComplete(),\n keydown: event => {\n switch (event.code) {\n case 'Tab':\n this.trapFocus(event);\n break;\n }\n this.$emit('keydown', event);\n },\n };\n },\n\n listItemClasses () {\n return [\n 'd-recipe-feed-item-row',\n { 'd-recipe-feed-item-row--active': this.isActive && this.state === DEFAULT_FEED_ROW_STATE },\n { 'd-recipe-feed-item-row__state-transition': this.transitionActive },\n FEED_ROW_STATE_BACKGROUND_COLOR[this.state],\n\n ];\n },\n },\n\n watch: {\n state: {\n immediate: true,\n handler: function (newState, oldState) {\n if (newState !== DEFAULT_FEED_ROW_STATE) {\n this.transitionActive = true;\n }\n },\n },\n },\n\n methods: {\n transitionComplete () {\n if (this.state === DEFAULT_FEED_ROW_STATE) {\n this.transitionActive = false;\n }\n },\n\n trapFocus (e) {\n this.focusTrappedTabPress(e);\n },\n\n setFocus (bool) {\n this.$emit('focus', bool);\n },\n\n setHover (bool) {\n this.$emit('hover', bool);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;;AAsIA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA,CAAA,KAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,M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AA,aAAA,wBAAA;AACA,eAAA,mBAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,qBAAA;AACA,UAAA,KAAA,UAAA,wBAAA;AACA,aAAA,mBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA,GAAA;AACA,WAAA,qBAAA,CAAA;AAAA,IACA;AAAA,IAEA,SAAA,MAAA;AACA,WAAA,MAAA,SAAA,IAAA;AAAA,IACA;AAAA,IAEA,SAAA,MAAA;AACA,WAAA,MAAA,SAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -108,7 +108,7 @@ const _sfc_main = {
108
108
  };
109
109
  var _sfc_render = function render() {
110
110
  var _vm = this, _c = _vm._self._c;
111
- return _c("dt-item-layout", { staticClass: "d-recipe-contact-info", attrs: { "role": _vm.role, "data-qa": "contact-info" }, scopedSlots: _vm._u([_vm.showAvatar ? { key: "left", fn: function() {
111
+ return _c("dt-item-layout", { staticClass: "d-recipe-contact-info", attrs: { "role": _vm.role, "data-qa": "contact-info", "content-class": "d-recipe-contact-info__content", "right-class": "d-recipe-contact-info__right", "unstyled": "" }, scopedSlots: _vm._u([_vm.showAvatar ? { key: "left", fn: function() {
112
112
  return [_c("button", { staticClass: "d-recipe-contact-info__left", attrs: { "data-qa": "contact-info-left", "aria-labelledby": _vm.avatarLabelledBy }, on: { "click": _vm.avatarClick } }, [_vm.avatarList ? _c("span", { staticClass: "d-recipe-contact-info__avatars" }, _vm._l(_vm.avatarList, function(avatar2, index) {
113
113
  return _c("dt-avatar", { key: index, attrs: { "size": _vm.avatarSize, "seed": avatar2.seed, "full-name": avatar2.fullName, "image-src": avatar2.src, "image-alt": "", "overlay-text": avatar2.text, "avatar-class": [
114
114
  {
@@ -124,11 +124,11 @@ var _sfc_render = function render() {
124
124
  return [_vm._t("avatarIcon", null, { "iconSize": iconSize })];
125
125
  } }], null, true) })], 1)];
126
126
  }, proxy: true } : null, { key: "default", fn: function() {
127
- return [_c("div", { attrs: { "data-qa": "contact-info-header" } }, [_vm._t("header")], 2)];
127
+ return [_c("div", { staticClass: "d-recipe-contact-info__header", attrs: { "data-qa": "contact-info-header" } }, [_vm._t("header")], 2)];
128
128
  }, proxy: true }, { key: "subtitle", fn: function() {
129
- return [_c("div", { attrs: { "data-qa": "contact-info-subtitle" } }, [_vm._t("subtitle")], 2)];
129
+ return [_c("div", { staticClass: "d-recipe-contact-info__subtitle", attrs: { "data-qa": "contact-info-subtitle" } }, [_vm._t("subtitle")], 2)];
130
130
  }, proxy: true }, _vm.$slots.bottom ? { key: "bottom", fn: function() {
131
- return [_c("div", { attrs: { "data-qa": "contact-info-bottom" } }, [_vm._t("bottom")], 2)];
131
+ return [_c("div", { staticClass: "d-recipe-contact-info__bottom", attrs: { "data-qa": "contact-info-bottom" } }, [_vm._t("bottom")], 2)];
132
132
  }, proxy: true } : null, _vm.$slots.right ? { key: "right", fn: function() {
133
133
  return [_c("div", { attrs: { "data-qa": "contact-info-right" } }, [_vm._t("right")], 2)];
134
134
  }, proxy: true } : null], null, true) });
@@ -1 +1 @@
1
- {"version":3,"file":"contact_info.vue.cjs","sources":["../../../../recipes/item_layout/contact_info/contact_info.vue"],"sourcesContent":["<template>\n <dt-item-layout\n :role=\"role\"\n data-qa=\"contact-info\"\n class=\"d-recipe-contact-info\"\n >\n <template\n v-if=\"showAvatar\"\n #left\n >\n <button\n class=\"d-recipe-contact-info__left\"\n data-qa=\"contact-info-left\"\n :aria-labelledby=\"avatarLabelledBy\"\n @click=\"avatarClick\"\n >\n <span\n v-if=\"avatarList\"\n class=\"d-recipe-contact-info__avatars\"\n >\n <dt-avatar\n v-for=\"(avatar, index) in avatarList\"\n :key=\"index\"\n :size=\"avatarSize\"\n :seed=\"avatar.seed\"\n :full-name=\"avatar.fullName\"\n :image-src=\"avatar.src\"\n image-alt=\"\"\n :overlay-text=\"avatar.text\"\n :avatar-class=\"[\n {\n 'd-recipe-contact-info__avatar-stacked': index > 0,\n 'd-recipe-contact-info__avatar-halo': !!avatar.halo,\n },\n ]\"\n >\n <template\n #icon=\"{ iconSize }\"\n >\n <!-- @slot Slot for avatar icon in a list -->\n <slot\n name=\"avatarIcon\"\n :icon-size=\"iconSize\"\n />\n </template>\n <template\n v-if=\"avatar.icon\"\n #overlayIcon\n >\n <component :is=\"avatar.icon\" />\n </template>\n </dt-avatar>\n </span>\n <dt-avatar\n v-else\n :size=\"avatarSize\"\n :full-name=\"avatarFullName\"\n :image-src=\"avatarSrc\"\n image-alt=\"\"\n :seed=\"avatarSeed\"\n :color=\"avatarColor\"\n :presence=\"presence\"\n >\n <template\n #icon=\"{ iconSize }\"\n >\n <!-- @slot Slot for avatar icon in a list -->\n <slot\n name=\"avatarIcon\"\n :icon-size=\"iconSize\"\n />\n </template>\n </dt-avatar>\n </button>\n </template>\n <template #default>\n <div data-qa=\"contact-info-header\">\n <!-- @slot Slot for header information -->\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #subtitle>\n <div data-qa=\"contact-info-subtitle\">\n <!-- @slot Slot for subtitle information -->\n <slot name=\"subtitle\" />\n </div>\n </template>\n\n <template\n v-if=\"$slots.bottom\"\n #bottom\n >\n <div data-qa=\"contact-info-bottom\">\n <!-- @slot Slot for information at the bottom -->\n <slot name=\"bottom\" />\n </div>\n </template>\n\n <template\n v-if=\"$slots.right\"\n #right\n >\n <div data-qa=\"contact-info-right\">\n <!-- @slot Slot for the right content -->\n <slot name=\"right\" />\n </div>\n </template>\n </dt-item-layout>\n</template>\n\n<script>\nimport DtItemLayout from '@/components/item_layout/item_layout.vue';\nimport DtAvatar from '@/components/avatar/avatar.vue';\n\nexport default {\n name: 'DtRecipeContactInfo',\n\n components: {\n DtAvatar,\n DtItemLayout,\n },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: '',\n },\n\n /**\n * Display avatar if `showAvatar` property is true.\n */\n showAvatar: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Optional avatar image url.\n */\n avatarSrc: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar's full name, used to extract initials\n * to display in avatar if `avatarSrc` and `avatarIcon` are empty.\n */\n avatarFullName: {\n type: String,\n default: '',\n },\n\n /**\n * The size of the avatar\n * @values xs, sm, md, lg, xl\n */\n avatarSize: {\n type: String,\n default: 'lg',\n },\n\n /**\n * The aria-labelledby of the button containing avatars\n */\n avatarLabelledBy: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar color to display if `avatarSrc` is empty.\n */\n avatarColor: {\n type: String,\n default: null,\n },\n\n /**\n * Determines whether to show the presence indicator for\n * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',\n * or 'active'. By default, it's null and nothing is shown.\n * @values null, busy, away, offline, active\n */\n presence: {\n type: String,\n default: null,\n },\n\n /**\n * Showing multiple avatars in contact info.\n * The props of array items are: <br>\n * `src` - avatar image url (optional) <br>\n * `fullName` - full name, used to extract initials to display in avatar<br>\n * if `avatarSrc` and `avatarIcon` are empty<br>\n * `seed` - determines uniqueness of avatar background <br>\n * `text` - text that overlays the avatar (optional) <br>\n * `icon` - icon that overlays the avatar (optional) <br>\n * `halo` - halo highlight around the avatar. boolean true/false\n */\n avatarList: {\n type: Array,\n default: null,\n },\n },\n\n emits: ['avatar-click'],\n\n methods: {\n avatarClick () {\n this.$emit('avatar-click');\n },\n },\n};\n</script>\n"],"names":["DtAvatar","DtItemLayout"],"mappings":";;;;;AAmHA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,OAAA;AAAA,IACA,cAAAC,YAAA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;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,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,cAAA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,WAAA,MAAA,cAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"contact_info.vue.cjs","sources":["../../../../recipes/item_layout/contact_info/contact_info.vue"],"sourcesContent":["<template>\n <dt-item-layout\n :role=\"role\"\n data-qa=\"contact-info\"\n class=\"d-recipe-contact-info\"\n content-class=\"d-recipe-contact-info__content\"\n right-class=\"d-recipe-contact-info__right\"\n unstyled\n >\n <template\n v-if=\"showAvatar\"\n #left\n >\n <button\n class=\"d-recipe-contact-info__left\"\n data-qa=\"contact-info-left\"\n :aria-labelledby=\"avatarLabelledBy\"\n @click=\"avatarClick\"\n >\n <span\n v-if=\"avatarList\"\n class=\"d-recipe-contact-info__avatars\"\n >\n <dt-avatar\n v-for=\"(avatar, index) in avatarList\"\n :key=\"index\"\n :size=\"avatarSize\"\n :seed=\"avatar.seed\"\n :full-name=\"avatar.fullName\"\n :image-src=\"avatar.src\"\n image-alt=\"\"\n :overlay-text=\"avatar.text\"\n :avatar-class=\"[\n {\n 'd-recipe-contact-info__avatar-stacked': index > 0,\n 'd-recipe-contact-info__avatar-halo': !!avatar.halo,\n },\n ]\"\n >\n <template #icon=\"{ iconSize }\">\n <!-- @slot Slot for avatar icon in a list -->\n <slot\n name=\"avatarIcon\"\n :icon-size=\"iconSize\"\n />\n </template>\n <template\n v-if=\"avatar.icon\"\n #overlayIcon\n >\n <component :is=\"avatar.icon\" />\n </template>\n </dt-avatar>\n </span>\n <dt-avatar\n v-else\n :size=\"avatarSize\"\n :full-name=\"avatarFullName\"\n :image-src=\"avatarSrc\"\n image-alt=\"\"\n :seed=\"avatarSeed\"\n :color=\"avatarColor\"\n :presence=\"presence\"\n >\n <template #icon=\"{ iconSize }\">\n <!-- @slot Slot for avatar icon in a list -->\n <slot\n name=\"avatarIcon\"\n :icon-size=\"iconSize\"\n />\n </template>\n </dt-avatar>\n </button>\n </template>\n <template #default>\n <div\n class=\"d-recipe-contact-info__header\"\n data-qa=\"contact-info-header\"\n >\n <!-- @slot Slot for header information -->\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #subtitle>\n <div\n class=\"d-recipe-contact-info__subtitle\"\n data-qa=\"contact-info-subtitle\"\n >\n <!-- @slot Slot for subtitle information -->\n <slot name=\"subtitle\" />\n </div>\n </template>\n\n <template\n v-if=\"$slots.bottom\"\n #bottom\n >\n <div\n class=\"d-recipe-contact-info__bottom\"\n data-qa=\"contact-info-bottom\"\n >\n <!-- @slot Slot for information at the bottom -->\n <slot name=\"bottom\" />\n </div>\n </template>\n\n <template\n v-if=\"$slots.right\"\n #right\n >\n <div data-qa=\"contact-info-right\">\n <!-- @slot Slot for the right content -->\n <slot name=\"right\" />\n </div>\n </template>\n </dt-item-layout>\n</template>\n\n<script>\nimport DtItemLayout from '@/components/item_layout/item_layout.vue';\nimport DtAvatar from '@/components/avatar/avatar.vue';\n\nexport default {\n name: 'DtRecipeContactInfo',\n\n components: {\n DtAvatar,\n DtItemLayout,\n },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: '',\n },\n\n /**\n * Display avatar if `showAvatar` property is true.\n */\n showAvatar: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Optional avatar image url.\n */\n avatarSrc: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar's full name, used to extract initials\n * to display in avatar if `avatarSrc` and `avatarIcon` are empty.\n */\n avatarFullName: {\n type: String,\n default: '',\n },\n\n /**\n * The size of the avatar\n * @values xs, sm, md, lg, xl\n */\n avatarSize: {\n type: String,\n default: 'lg',\n },\n\n /**\n * The aria-labelledby of the button containing avatars\n */\n avatarLabelledBy: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar color to display if `avatarSrc` is empty.\n */\n avatarColor: {\n type: String,\n default: null,\n },\n\n /**\n * Determines whether to show the presence indicator for\n * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',\n * or 'active'. By default, it's null and nothing is shown.\n * @values null, busy, away, offline, active\n */\n presence: {\n type: String,\n default: null,\n },\n\n /**\n * Showing multiple avatars in contact info.\n * The props of array items are: <br>\n * `src` - avatar image url (optional) <br>\n * `fullName` - full name, used to extract initials to display in avatar<br>\n * if `avatarSrc` and `avatarIcon` are empty<br>\n * `seed` - determines uniqueness of avatar background <br>\n * `text` - text that overlays the avatar (optional) <br>\n * `icon` - icon that overlays the avatar (optional) <br>\n * `halo` - halo highlight around the avatar. boolean true/false\n */\n avatarList: {\n type: Array,\n default: null,\n },\n },\n\n emits: ['avatar-click'],\n\n methods: {\n avatarClick () {\n this.$emit('avatar-click');\n },\n },\n};\n</script>\n"],"names":["DtAvatar","DtItemLayout"],"mappings":";;;;;AA2HA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,OAAA;AAAA,IACA,cAAAC,YAAA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;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,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,cAAA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,WAAA,MAAA,cAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -106,7 +106,7 @@ const _sfc_main = {
106
106
  };
107
107
  var _sfc_render = function render() {
108
108
  var _vm = this, _c = _vm._self._c;
109
- return _c("dt-item-layout", { staticClass: "d-recipe-contact-info", attrs: { "role": _vm.role, "data-qa": "contact-info" }, scopedSlots: _vm._u([_vm.showAvatar ? { key: "left", fn: function() {
109
+ return _c("dt-item-layout", { staticClass: "d-recipe-contact-info", attrs: { "role": _vm.role, "data-qa": "contact-info", "content-class": "d-recipe-contact-info__content", "right-class": "d-recipe-contact-info__right", "unstyled": "" }, scopedSlots: _vm._u([_vm.showAvatar ? { key: "left", fn: function() {
110
110
  return [_c("button", { staticClass: "d-recipe-contact-info__left", attrs: { "data-qa": "contact-info-left", "aria-labelledby": _vm.avatarLabelledBy }, on: { "click": _vm.avatarClick } }, [_vm.avatarList ? _c("span", { staticClass: "d-recipe-contact-info__avatars" }, _vm._l(_vm.avatarList, function(avatar, index) {
111
111
  return _c("dt-avatar", { key: index, attrs: { "size": _vm.avatarSize, "seed": avatar.seed, "full-name": avatar.fullName, "image-src": avatar.src, "image-alt": "", "overlay-text": avatar.text, "avatar-class": [
112
112
  {
@@ -122,11 +122,11 @@ var _sfc_render = function render() {
122
122
  return [_vm._t("avatarIcon", null, { "iconSize": iconSize })];
123
123
  } }], null, true) })], 1)];
124
124
  }, proxy: true } : null, { key: "default", fn: function() {
125
- return [_c("div", { attrs: { "data-qa": "contact-info-header" } }, [_vm._t("header")], 2)];
125
+ return [_c("div", { staticClass: "d-recipe-contact-info__header", attrs: { "data-qa": "contact-info-header" } }, [_vm._t("header")], 2)];
126
126
  }, proxy: true }, { key: "subtitle", fn: function() {
127
- return [_c("div", { attrs: { "data-qa": "contact-info-subtitle" } }, [_vm._t("subtitle")], 2)];
127
+ return [_c("div", { staticClass: "d-recipe-contact-info__subtitle", attrs: { "data-qa": "contact-info-subtitle" } }, [_vm._t("subtitle")], 2)];
128
128
  }, proxy: true }, _vm.$slots.bottom ? { key: "bottom", fn: function() {
129
- return [_c("div", { attrs: { "data-qa": "contact-info-bottom" } }, [_vm._t("bottom")], 2)];
129
+ return [_c("div", { staticClass: "d-recipe-contact-info__bottom", attrs: { "data-qa": "contact-info-bottom" } }, [_vm._t("bottom")], 2)];
130
130
  }, proxy: true } : null, _vm.$slots.right ? { key: "right", fn: function() {
131
131
  return [_c("div", { attrs: { "data-qa": "contact-info-right" } }, [_vm._t("right")], 2)];
132
132
  }, proxy: true } : null], null, true) });