@dialpad/dialtone 9.177.1 → 9.178.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/css/dialtone-default-theme.css +75 -0
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone.css +75 -0
  4. package/dist/css/dialtone.min.css +1 -1
  5. package/dist/css/tokens-docs.json +1 -1
  6. package/dist/tokens/doc.json +116900 -116900
  7. package/dist/vue3/{attachment_carousel-DMKCJe7S.cjs → attachment_carousel-BHxR7A76.cjs} +1 -1
  8. package/dist/vue3/{attachment_carousel-DMKCJe7S.cjs.map → attachment_carousel-BHxR7A76.cjs.map} +1 -1
  9. package/dist/vue3/{attachment_carousel-gV6IHYgP.js → attachment_carousel-CouFqFMw.js} +1 -1
  10. package/dist/vue3/{attachment_carousel-gV6IHYgP.js.map → attachment_carousel-CouFqFMw.js.map} +1 -1
  11. package/dist/vue3/component-documentation.json +1 -1
  12. package/dist/vue3/components/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -0
  13. package/dist/vue3/components/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  14. package/dist/vue3/components/resizable/composables/computeLayout.d.ts +35 -0
  15. package/dist/vue3/components/resizable/composables/computeLayout.d.ts.map +1 -0
  16. package/dist/vue3/components/resizable/composables/constraintResolver.d.ts +22 -0
  17. package/dist/vue3/components/resizable/composables/constraintResolver.d.ts.map +1 -0
  18. package/dist/vue3/components/resizable/composables/index.d.ts +16 -0
  19. package/dist/vue3/components/resizable/composables/index.d.ts.map +1 -0
  20. package/dist/vue3/components/resizable/composables/useResizableAnnouncements.d.ts +6 -0
  21. package/dist/vue3/components/resizable/composables/useResizableAnnouncements.d.ts.map +1 -0
  22. package/dist/vue3/components/resizable/composables/useResizableCalculations.d.ts +14 -0
  23. package/dist/vue3/components/resizable/composables/useResizableCalculations.d.ts.map +1 -0
  24. package/dist/vue3/components/resizable/composables/useResizableDrag.d.ts +42 -0
  25. package/dist/vue3/components/resizable/composables/useResizableDrag.d.ts.map +1 -0
  26. package/dist/vue3/components/resizable/composables/useResizableGroup.d.ts +25 -0
  27. package/dist/vue3/components/resizable/composables/useResizableGroup.d.ts.map +1 -0
  28. package/dist/vue3/components/resizable/composables/useResizableKeyboard.d.ts +41 -0
  29. package/dist/vue3/components/resizable/composables/useResizableKeyboard.d.ts.map +1 -0
  30. package/dist/vue3/components/resizable/composables/useResizableOffset.d.ts +15 -0
  31. package/dist/vue3/components/resizable/composables/useResizableOffset.d.ts.map +1 -0
  32. package/dist/vue3/components/resizable/composables/useResizablePanelControls.d.ts +46 -0
  33. package/dist/vue3/components/resizable/composables/useResizablePanelControls.d.ts.map +1 -0
  34. package/dist/vue3/components/resizable/composables/useResizablePanelState.d.ts +9 -0
  35. package/dist/vue3/components/resizable/composables/useResizablePanelState.d.ts.map +1 -0
  36. package/dist/vue3/components/resizable/composables/useResizableStorage.d.ts +12 -0
  37. package/dist/vue3/components/resizable/composables/useResizableStorage.d.ts.map +1 -0
  38. package/dist/vue3/components/resizable/index.d.ts +6 -0
  39. package/dist/vue3/components/resizable/index.d.ts.map +1 -0
  40. package/dist/vue3/components/resizable/resizable.vue.d.ts +69 -0
  41. package/dist/vue3/components/resizable/resizable.vue.d.ts.map +1 -0
  42. package/dist/vue3/components/resizable/resizable_constants.d.ts +103 -0
  43. package/dist/vue3/components/resizable/resizable_constants.d.ts.map +1 -0
  44. package/dist/vue3/components/resizable/resizable_handle.vue.d.ts +22 -0
  45. package/dist/vue3/components/resizable/resizable_handle.vue.d.ts.map +1 -0
  46. package/dist/vue3/components/resizable/resizable_panel.vue.d.ts +44 -0
  47. package/dist/vue3/components/resizable/resizable_panel.vue.d.ts.map +1 -0
  48. package/dist/vue3/components/resizable/resizable_utils.d.ts +15 -0
  49. package/dist/vue3/components/resizable/resizable_utils.d.ts.map +1 -0
  50. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -0
  51. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  52. package/dist/vue3/components/scroller/scroller.vue.d.ts +6 -8
  53. package/dist/vue3/components/scroller/scroller.vue.d.ts.map +1 -1
  54. package/dist/vue3/components/split_button/split_button.vue.d.ts +4 -4
  55. package/dist/vue3/dialtone-vue.cjs +1 -1
  56. package/dist/vue3/dialtone-vue.js +56 -51
  57. package/dist/vue3/index.d.ts +1 -0
  58. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  59. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +1 -1
  60. package/dist/vue3/lib/attachment-carousel/index.cjs +1 -1
  61. package/dist/vue3/lib/attachment-carousel/index.js +1 -1
  62. package/dist/vue3/lib/editor/editor.cjs +1 -1
  63. package/dist/vue3/lib/editor/editor.js +1 -1
  64. package/dist/vue3/lib/message-input/index.cjs +1 -1
  65. package/dist/vue3/lib/message-input/index.js +1 -1
  66. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  67. package/dist/vue3/lib/message-input/message-input.js +1 -1
  68. package/dist/vue3/lib/resizable/index.cjs +1 -0
  69. package/dist/vue3/lib/resizable/index.js +5 -0
  70. package/dist/vue3/lib/resizable/resizable-handle.cjs +1 -0
  71. package/dist/vue3/lib/resizable/resizable-handle.js +2 -0
  72. package/dist/vue3/lib/resizable/resizable-panel.cjs +2 -0
  73. package/dist/vue3/lib/resizable/resizable-panel.cjs.map +1 -0
  74. package/dist/vue3/lib/resizable/resizable-panel.js +132 -0
  75. package/dist/vue3/lib/resizable/resizable-panel.js.map +1 -0
  76. package/dist/vue3/lib/resizable/resizable.cjs +1 -0
  77. package/dist/vue3/lib/resizable/resizable.js +2 -0
  78. package/dist/vue3/lib/rich-text-editor/index.cjs +1 -1
  79. package/dist/vue3/lib/rich-text-editor/index.js +1 -1
  80. package/dist/vue3/lib/rich-text-editor/markdownRenderer.cjs +1 -7
  81. package/dist/vue3/lib/rich-text-editor/markdownRenderer.js +2 -62
  82. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +1 -1
  83. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +1 -1
  84. package/dist/vue3/lib/scroller/index.cjs +1 -1
  85. package/dist/vue3/lib/scroller/index.js +1 -1
  86. package/dist/vue3/lib/scroller/scroller.cjs +1 -1
  87. package/dist/vue3/lib/scroller/scroller.js +1 -1
  88. package/dist/vue3/lib/toast/index.cjs +1 -1
  89. package/dist/vue3/lib/toast/index.js +1 -1
  90. package/dist/vue3/lib/toast/toast.cjs +1 -1
  91. package/dist/vue3/lib/toast/toast.js +1 -1
  92. package/dist/vue3/markdownRenderer-DCgGQseq.cjs +31 -0
  93. package/dist/vue3/markdownRenderer-DCgGQseq.cjs.map +1 -0
  94. package/dist/vue3/markdownRenderer-D_P94RyM.js +322 -0
  95. package/dist/vue3/markdownRenderer-D_P94RyM.js.map +1 -0
  96. package/dist/vue3/{message_input-VmltTreF.cjs → message_input-AWgvtwMV.cjs} +2 -2
  97. package/dist/vue3/{message_input-VmltTreF.cjs.map → message_input-AWgvtwMV.cjs.map} +1 -1
  98. package/dist/vue3/{message_input-tVB6JYJm.js → message_input-CHlTsBGK.js} +2 -2
  99. package/dist/vue3/{message_input-tVB6JYJm.js.map → message_input-CHlTsBGK.js.map} +1 -1
  100. package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
  101. package/dist/vue3/node_modules/@tiptap/vue-3.js +1 -1
  102. package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
  103. package/dist/vue3/recipes/conversation_view/editor/editor.vue.d.ts +2 -0
  104. package/dist/vue3/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  105. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.d.ts +2 -0
  106. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  107. package/dist/vue3/resizable-D4-peBOl.js +960 -0
  108. package/dist/vue3/resizable-D4-peBOl.js.map +1 -0
  109. package/dist/vue3/resizable-aOVGO_Os.cjs +2 -0
  110. package/dist/vue3/resizable-aOVGO_Os.cjs.map +1 -0
  111. package/dist/vue3/resizable_handle-BlKBiWnx.js +307 -0
  112. package/dist/vue3/resizable_handle-BlKBiWnx.js.map +1 -0
  113. package/dist/vue3/resizable_handle-RIKS8frB.cjs +2 -0
  114. package/dist/vue3/resizable_handle-RIKS8frB.cjs.map +1 -0
  115. package/dist/vue3/resizable_utils-BComtrMV.js +131 -0
  116. package/dist/vue3/resizable_utils-BComtrMV.js.map +1 -0
  117. package/dist/vue3/resizable_utils-DhuzXRdP.cjs +2 -0
  118. package/dist/vue3/resizable_utils-DhuzXRdP.cjs.map +1 -0
  119. package/dist/vue3/{rich_text_editor-CtCGNkSD.js → rich_text_editor-Ba67C4Uk.js} +421 -454
  120. package/dist/vue3/rich_text_editor-Ba67C4Uk.js.map +1 -0
  121. package/dist/vue3/rich_text_editor-DMP5eTlf.cjs +10 -0
  122. package/dist/vue3/rich_text_editor-DMP5eTlf.cjs.map +1 -0
  123. package/dist/vue3/{scroller-Ckquh-PU.js → scroller-BGVDh3sq.js} +1 -1
  124. package/dist/vue3/{scroller-Ckquh-PU.js.map → scroller-BGVDh3sq.js.map} +1 -1
  125. package/dist/vue3/{scroller-06ayn-64.cjs → scroller-CjAsgjl9.cjs} +1 -1
  126. package/dist/vue3/{scroller-06ayn-64.cjs.map → scroller-CjAsgjl9.cjs.map} +1 -1
  127. package/dist/vue3/{toast-B1zeUPtg.js → toast-DvPN-bCi.js} +1 -1
  128. package/dist/vue3/{toast-B1zeUPtg.js.map → toast-DvPN-bCi.js.map} +1 -1
  129. package/dist/vue3/{toast-0QfP90_3.cjs → toast-d8_zmgkL.cjs} +1 -1
  130. package/dist/vue3/{toast-0QfP90_3.cjs.map → toast-d8_zmgkL.cjs.map} +1 -1
  131. package/dist/vue3/useResizableCalculations-BDITle3Q.cjs +2 -0
  132. package/dist/vue3/useResizableCalculations-BDITle3Q.cjs.map +1 -0
  133. package/dist/vue3/useResizableCalculations-DAajatT4.js +80 -0
  134. package/dist/vue3/useResizableCalculations-DAajatT4.js.map +1 -0
  135. package/package.json +1 -1
  136. package/dist/vue3/lib/rich-text-editor/markdownRenderer.cjs.map +0 -1
  137. package/dist/vue3/lib/rich-text-editor/markdownRenderer.js.map +0 -1
  138. package/dist/vue3/rich_text_editor-CEwKDuzw.cjs +0 -10
  139. package/dist/vue3/rich_text_editor-CEwKDuzw.cjs.map +0 -1
  140. package/dist/vue3/rich_text_editor-CtCGNkSD.js.map +0 -1
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),t=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`../../localization/index.cjs`),r=require(`../button/button.cjs`),i=require(`../list-item/list-item.cjs`),a=require(`../../combobox-DhjZxfUw.cjs`),o=require(`../stack/stack.cjs`),s=require(`../tooltip/tooltip.cjs`),c=require(`../popover/popover.cjs`),l=require(`../dropdown/dropdown-separator.cjs`),u=require(`../input/input.cjs`),d=require(`../list-item-group/list-item-group.cjs`),f=require(`../../rich_text_editor-CEwKDuzw.cjs`),p=require(`../rich-text-editor/rich-text-editor-constants.cjs`),m=require(`./editor-constants.cjs`),h=require(`./EditorToolbarButton.cjs`),g=require(`./EditorToolbarDropdownButton.cjs`),_=require(`./EditorToolbarPopoverButton.cjs`);let v=require(`vue`),y=require(`@dialpad/dialtone-icons/vue3`);var b={compatConfig:{MODE:3},name:`DtRecipeEditor`,components:{DtListItemGroup:d.default,DtDropdownSeparator:l.default,DtListItem:i.default,DtRichTextEditor:f.t,DtButton:r.default,DtPopover:c.default,DtStack:o.default,DtInput:u.default,DtTooltip:s.default,DtCombobox:a.t,EditorToolbarButton:h.default,EditorToolbarDropdownButton:g.default,EditorToolbarPopoverButton:_.default,DtIconQuickReply:y.DtIconQuickReply,DtIconBold:y.DtIconBold,DtIconItalic:y.DtIconItalic,DtIconUnderline:y.DtIconUnderline,DtIconStrikethrough:y.DtIconStrikethrough,DtIconListBullet:y.DtIconListBullet,DtIconListOrdered:y.DtIconListOrdered,DtIconAlignLeft:y.DtIconAlignLeft,DtIconAlignCenter:y.DtIconAlignCenter,DtIconAlignRight:y.DtIconAlignRight,DtIconAlignJustify:y.DtIconAlignJustify,DtIconQuote:y.DtIconQuote,DtIconCodeBlock:y.DtIconCodeBlock,DtIconLink2:y.DtIconLink2,DtIconImage:y.DtIconImage,DtIconSearch:y.DtIconSearch,DtIconType:y.DtIconType,DtIconBraces:y.DtIconBraces,DtIconChevronDown:y.DtIconChevronDown,DtIconFontSize:y.DtIconFontSize,DtIconStopFilled:y.DtIconStopFilled},mixins:[],inheritAttrs:!1,props:{modelValue:{type:[Object,String],default:``},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:``},inputClass:{type:String,default:``},autoFocus:{type:[Boolean,String,Number],default:!1,validator(e){return typeof e==`string`?p.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(e):!0}},placeholder:{type:String,default:``},maxHeight:{type:String,default:`unset`},setLinkPlaceholder:{type:String,default:``},showBoldButton:{type:Boolean,default:!0},showItalicsButton:{type:Boolean,default:!0},showUnderlineButton:{type:Boolean,default:!0},showStrikeButton:{type:Boolean,default:!0},showListItemsButton:{type:Boolean,default:!0},showOrderedListButton:{type:Boolean,default:!0},showAlignLeftButton:{type:Boolean,default:!0},showAlignCenterButton:{type:Boolean,default:!0},showAlignRightButton:{type:Boolean,default:!0},showAlignJustifyButton:{type:Boolean,default:!0},showQuoteButton:{type:Boolean,default:!0},showCodeBlockButton:{type:Boolean,default:!0},showQuickRepliesButton:{type:Boolean,default:!0},showInlineImageButton:{type:Boolean,default:!1},showVariableButton:{type:Boolean,default:!1},variableCategories:{type:Array,default:()=>[]},showAddLink:{type:Object,default:()=>({showAddLinkButton:!0})},showFontStyleButton:{type:Boolean,default:!1},showFontSizeButton:{type:Boolean,default:!1},showFontColorButton:{type:Boolean,default:!1},fontStyles:{type:Array,default:()=>[{name:`Arial`,value:null},{name:`Georgia`,value:`Georgia`},{name:`Helvetica`,value:`Helvetica`},{name:`Verdana`,value:`Verdana`},{name:`Times New Roman`,value:`Times New Roman`}]},fontSizes:{type:Array,default:()=>[{name:`Small`,value:`12px`},{name:`Normal`,value:`15px`},{name:`Large`,value:`24px`},{name:`Huge`,value:`36px`}]},allowBackgroundColor:{type:Boolean,default:!1},allowLineHeight:{type:Boolean,default:!1},preserveWhitespace:{type:[Boolean,String],default:`full`},useDivTags:{type:Boolean,default:!1},allowTables:{type:Boolean,default:!1},allowImageResize:{type:Boolean,default:!1}},emits:[`focus`,`blur`,`input`,`update:modelValue`,`quick-replies-click`,`inline-image-click`,`text-input`],data(){return{internalInputValue:this.modelValue,hasFocus:!1,linkOptions:{class:`d-recipe-editor__link`},currentFontColor:void 0,showLinkInput:!1,fontStyleSearch:``,linkInput:``,currentButtonRefIndex:0,variableSearchValue:``,i18n:new n.DialtoneLocalization}},computed:{inputLength(){return this.internalInputValue.length},htmlOutputFormat(){return p.RICH_TEXT_EDITOR_OUTPUT_FORMATS[2]},flattenedVariableItems(){return this.variableCategories?this.variableCategories.reduce((e,t)=>e.concat(t.items||[]),[]):[]},showingTextFormatButtons(){return this.showBoldButton||this.showItalicsButton||this.showStrikeButton||this.showUnderlineButton},showingAlignmentButtons(){return this.showAlignLeftButton||this.showAlignCenterButton||this.showAlignRightButton||this.showAlignJustifyButton},showingListButtons(){return this.showListItemsButton||this.showOrderedListButton},orderedRefs(){let e=this.buttonGroups.reduce(function(e,t){return t.buttonGroup.forEach(n=>{e.push(this.getButtonRef(t.key,n.selector))},this),e}.bind(this),[]);return e.push(this.getButtonRef(`custom`,`link`)),e},buttonGroups(){let e=this.individualButtons.map(e=>({key:e.selector,buttonGroup:[e]}));return[{key:`new`,buttonGroup:this.newButtons},{key:`format`,buttonGroup:this.textFormatButtons},{key:`alignment`,buttonGroup:this.alignmentButtons},{key:`list`,buttonGroup:this.listButtons},...e].filter(e=>e.buttonGroup.length>0)},newButtons(){return[{showBtn:this.showQuickRepliesButton,buttonType:`button`,label:this.i18n.$t(`DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL`),selector:`quickReplies`,icon:y.DtIconQuickReply,dataQA:`dt-recipe-editor-quick-replies-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL`),onClick:this.onQuickRepliesClick}].filter(e=>e.showBtn)},textFormatButtons(){return[{showBtn:this.showFontStyleButton,buttonType:`popover`,selector:`fontStyle`,icon:y.DtIconType,dataQA:`dt-recipe-editor-font-style-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_FONT_STYLE_BUTTON_LABEL`)},{showBtn:this.showFontSizeButton,buttonType:`popover`,selector:`fontSize`,icon:y.DtIconFontSize,dataQA:`dt-recipe-editor-font-size-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_FONT_SIZE_BUTTON_LABEL`)},{showBtn:this.showFontColorButton,buttonType:`custom`,selector:`fontColor`,icon:y.DtIconStopFilled,dataQA:`dt-recipe-editor-font-color-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_FONT_COLOR_BUTTON_LABEL`),onClick:this.onColorPickerButtonClick},{showBtn:this.showBoldButton,buttonType:`button`,selector:`bold`,icon:y.DtIconBold,dataQA:`dt-recipe-editor-bold-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_BOLD_BUTTON_LABEL`),onClick:this.onBoldTextToggle},{showBtn:this.showItalicsButton,buttonType:`button`,selector:`italic`,icon:y.DtIconItalic,dataQA:`dt-recipe-editor-italics-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ITALICS_BUTTON_LABEL`),onClick:this.onItalicTextToggle},{showBtn:this.showUnderlineButton,buttonType:`button`,selector:`underline`,icon:y.DtIconUnderline,dataQA:`dt-recipe-editor-underline-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_UNDERLINE_BUTTON_LABEL`),onClick:this.onUnderlineTextToggle},{showBtn:this.showStrikeButton,buttonType:`button`,selector:`strike`,icon:y.DtIconStrikethrough,dataQA:`dt-recipe-editor-strike-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_STRIKE_BUTTON_LABEL`),onClick:this.onStrikethroughTextToggle}].filter(e=>e.showBtn)},alignmentButtons(){return[{showBtn:this.showAlignLeftButton,buttonType:`button`,selector:{textAlign:`left`},icon:y.DtIconAlignLeft,dataQA:`dt-recipe-editor-align-left-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ALIGN_LEFT_BUTTON_LABEL`),onClick:()=>this.onTextAlign(`left`)},{showBtn:this.showAlignCenterButton,buttonType:`button`,selector:{textAlign:`center`},icon:y.DtIconAlignCenter,dataQA:`dt-recipe-editor-align-center-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ALIGN_CENTER_BUTTON_LABEL`),onClick:()=>this.onTextAlign(`center`)},{showBtn:this.showAlignRightButton,buttonType:`button`,selector:{textAlign:`right`},icon:y.DtIconAlignRight,dataQA:`dt-recipe-editor-align-right-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ALIGN_RIGHT_BUTTON_LABEL`),onClick:()=>this.onTextAlign(`right`)},{showBtn:this.showAlignJustifyButton,buttonType:`button`,selector:{textAlign:`justify`},icon:y.DtIconAlignJustify,dataQA:`dt-recipe-editor-align-justify-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ALIGN_JUSTIFY_BUTTON_LABEL`),onClick:()=>this.onTextAlign(`justify`)}].filter(e=>e.showBtn)},listButtons(){return[{showBtn:this.showListItemsButton,buttonType:`button`,selector:`bulletList`,icon:y.DtIconListBullet,dataQA:`dt-recipe-editor-list-items-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_BULLET_LIST_BUTTON_LABEL`),onClick:this.onBulletListToggle},{showBtn:this.showOrderedListButton,buttonType:`button`,selector:`orderedList`,icon:y.DtIconListOrdered,dataQA:`dt-recipe-editor-ordered-list-items-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ORDERED_LIST_BUTTON_LABEL`),onClick:this.onOrderedListToggle}].filter(e=>e.showBtn)},individualButtons(){return[{showBtn:this.showQuoteButton,buttonType:`button`,selector:`blockquote`,icon:y.DtIconQuote,dataQA:`dt-recipe-editor-blockquote-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_QUOTE_BUTTON_LABEL`),onClick:this.onBlockquoteToggle},{showBtn:this.showCodeBlockButton,buttonType:`button`,selector:`codeBlock`,icon:y.DtIconCodeBlock,dataQA:`dt-recipe-editor-code-block-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_CODE_BUTTON_LABEL`),onClick:this.onCodeBlockToggle},{showBtn:this.showInlineImageButton,buttonType:`button`,selector:`image`,icon:y.DtIconImage,dataQA:`dt-recipe-editor-inline-image-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_IMAGE_BUTTON_LABEL`),onClick:this.onInsertInlineImageClick},{showBtn:this.showVariableButton,buttonType:`popover`,selector:`variable`,icon:y.DtIconBraces,dataQA:`dt-recipe-editor-variable-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_VARIABLE_BUTTON_LABEL`)}].filter(e=>e.showBtn)},linkButton(){return{showBtn:this.showAddLink.showAddLinkButton,buttonType:`custom`,selector:`link`,icon:y.DtIconLink2,dataQA:`dt-recipe-editor-add-link-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_LINK_BUTTON_LABEL`),onClick:this.openLinkInput}},confirmSetLinkButtonLabels(){return this.i18n.$ta(`DIALTONE_EDITOR_CONFIRM_SET_LINK_BUTTON`)},cancelSetLinkButtonLabels(){return this.i18n.$ta(`DIALTONE_EDITOR_CANCEL_SET_LINK_BUTTON`)},removeLinkButtonLabels(){return this.i18n.$ta(`DIALTONE_EDITOR_REMOVE_LINK_BUTTON`)},showAddLinkButtonLabels(){return this.i18n.$ta(`DIALTONE_EDITOR_ADD_LINK_BUTTON`)},filteredFontStyles(){let e=this.fontStyleSearch.toLowerCase();return this.fontStyles.filter(t=>t.name.toLowerCase().includes(e))},filteredCategories(){return this.variableCategories.filter(e=>this.getFilteredItemsForCategory(e).length)},colorPickerInput(){return this.$refs.editorRoot?.querySelector(`.colorPickerInput`)},isDefaultFontColor(){return this.currentFontColor===m.EDITOR_DEFAULT_FONT_COLOR},actionBarBtn(){let e=this.$refs[this.orderedRefs[this.currentButtonRefIndex]][0]?.$refs?.buttonRef||this.$refs[this.orderedRefs[this.currentButtonRefIndex]];return Array.isArray(e)?e[0]:e}},watch:{modelValue(e){this.internalInputValue=e}},methods:{removeClassStyleAttrs:e.removeClassStyleAttrs,addClassStyleAttrs:e.addClassStyleAttrs,focusEditor(){this.$refs.richTextEditor?.editor?.commands.focus()},onInputFocus(e){e?.stopPropagation()},removeLink(){this.$refs.richTextEditor?.editor?.chain()?.focus()?.unsetLink()?.run(),this.closeLinkInput()},setLink(e){let t=this.$refs.richTextEditor?.editor;if(e?.preventDefault(),e?.stopPropagation(),!this.linkInput){this.removeLink();return}m.EDITOR_SUPPORTED_LINK_PROTOCOLS.find(e=>e.test(this.linkInput))||(this.linkInput=`${m.EDITOR_DEFAULT_LINK_PREFIX}${this.linkInput}`);let n=t?.view?.state?.selection;n.anchor===n.head?t.chain().focus().insertContentAt(n.anchor,`<a class="${this.linkOptions.class}" href=${this.linkInput}>${this.linkInput}</a>`).run():t.chain().focus().extendMarkRange(`link`).setLink({href:this.linkInput,class:this.linkOptions.class}).run(),this.closeLinkInput()},openLinkInput(){this.showLinkInput=!0},updateInput(e){if(!e)return this.closeLinkInput();this.linkInput=this.$refs.richTextEditor?.editor?.getAttributes(`link`)?.href},closeLinkInput(){this.showLinkInput=!1,this.linkInput=``,this.$refs.richTextEditor.editor?.chain().focus()},onBoldTextToggle(){this.$refs.richTextEditor?.editor?.chain().focus().toggleBold().run()},onItalicTextToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleItalic().run()},onUnderlineTextToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleUnderline().run()},onStrikethroughTextToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleStrike().run()},onTextAlign(e){if(this.$refs.richTextEditor?.editor?.isActive({textAlign:e}))return this.$refs.richTextEditor?.editor.chain().focus().unsetTextAlign().run();this.$refs.richTextEditor?.editor.chain().focus().setTextAlign(e).run()},onBulletListToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleBulletList().run()},onOrderedListToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleOrderedList().run()},onCodeBlockToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleCodeBlock().run()},onQuickRepliesClick(){this.$emit(`quick-replies-click`)},onInsertInlineImageClick(){this.$emit(`inline-image-click`)},insertVariable(e,t){this.$refs.richTextEditor?.editor.chain().focus().insertVariable({id:t.id,placeholder:t.placeholder||``,altText:``,enableAltText:t.enableAltText}).run()},insertInlineImage(e){this.$refs.richTextEditor?.editor.chain().focus().setImage({src:e}).run()},insertInMessageBody(e){this.$refs.richTextEditor?.editor.chain().focus().insertContent(e).run()},setCursorPosition(e=null){this.$refs.richTextEditor?.editor.chain().focus(e).run()},onBlockquoteToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleBlockquote().run()},onTextInput(e){this.$emit(`text-input`,e)},onFocus(e){this.hasFocus=!0,this.$emit(`focus`,e)},onBlur(e){this.hasFocus=!1,this.$emit(`blur`,e)},onInput(e){this.$emit(`input`,e),this.$emit(`update:modelValue`,e)},onSelected(){this.updateFontColorInput()},getButtonKey(e,t){return`${e}-${JSON.stringify(t)}`},getButtonRef(e,t){return`${this.getButtonKey(e,t)}-ref`},canFocus(e){return e===this.orderedRefs[this.currentButtonRefIndex]},shiftActionBarFocusRight(){this.shiftButtonRefIndex(1)},shiftActionBarFocusLeft(){this.shiftButtonRefIndex(-1)},shiftButtonRefIndex(e){let t=this.actionBarBtn,n=(this.currentButtonRefIndex+e)%this.orderedRefs.length;this.currentButtonRefIndex=n>=0?n:this.orderedRefs.length+n;let r=this.actionBarBtn;t.$el.blur(),r.$el.focus()},onFontStyleSelect(e){e?this.$refs.richTextEditor?.editor?.chain().focus().setFontFamily(e).run():this.$refs.richTextEditor?.editor?.chain().focus().unsetFontFamily().run(),this.$refs.richTextEditor?.editor?.commands.focus()},isCurrentFontFamily(e){return e?this.$refs.richTextEditor?.editor?.isActive(`textStyle`,{fontFamily:e}):!this.$refs.richTextEditor?.editor?.getAttributes(`textStyle`)?.fontFamily},onFontSizeSelect(e){this.$refs.richTextEditor?.editor?.chain().focus().setFontSize(e).run(),this.$refs.richTextEditor?.editor?.commands.focus()},isCurrentFontSize(e){return e?this.$refs.richTextEditor?.editor?.isActive(`textStyle`,{fontSize:e}):!this.$refs.richTextEditor?.editor?.getAttributes(`textStyle`)?.fontSize},getFilteredItemsForCategory(e){let t=this.variableSearchValue.toLowerCase();return e.name.toLowerCase().includes(t)?e.items:e.items.filter(e=>e.name.toLowerCase().includes(t))},updateFontColorInput(){this.currentFontColor=this.$refs.richTextEditor?.editor?.getAttributes(`textStyle`)?.color||`#000000`},onColorPickerButtonClick(){this.colorPickerInput?.click()},onColorPickerInput(e){this.$refs.richTextEditor?.editor?.chain().focus().setColor(e).run(),this.$refs.richTextEditor?.editor?.commands.focus(),this.updateFontColorInput()}}},x={class:`d-recipe-editor__popover-content`};function S(e,t,n,r,i,a){let o=(0,v.resolveComponent)(`dt-icon-search`),s=(0,v.resolveComponent)(`dt-input`),c=(0,v.resolveComponent)(`dt-list-item`),l=(0,v.resolveComponent)(`dt-combobox`),u=(0,v.resolveComponent)(`editor-toolbar-popover-button`),d=(0,v.resolveComponent)(`editor-toolbar-dropdown-button`),f=(0,v.resolveComponent)(`dt-button`),p=(0,v.resolveComponent)(`dt-dropdown-separator`),m=(0,v.resolveComponent)(`dt-list-item-group`),h=(0,v.resolveComponent)(`editor-toolbar-button`),g=(0,v.resolveComponent)(`dt-stack`),_=(0,v.resolveComponent)(`dt-tooltip`),y=(0,v.resolveComponent)(`dt-popover`),b=(0,v.resolveComponent)(`dt-rich-text-editor`),S=(0,v.resolveDirective)(`dt-tooltip`);return(0,v.openBlock)(),(0,v.createElementBlock)(`div`,(0,v.mergeProps)({ref:`editorRoot`,class:`d-recipe-editor`},a.addClassStyleAttrs(e.$attrs),{"data-qa":`dt-recipe-editor`,role:`presentation`,onClick:t[7]||(t[7]=t=>e.$refs.richTextEditor.focusEditor())}),[(0,v.createVNode)(g,{class:`d-recipe-editor__top-bar`,direction:`row`,gap:`450`},{default:(0,v.withCtx)(()=>[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(a.buttonGroups,r=>((0,v.openBlock)(),(0,v.createBlock)(g,{key:r.key,direction:`row`,gap:`300`},{default:(0,v.withCtx)(()=>[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(r.buttonGroup,g=>((0,v.openBlock)(),(0,v.createElementBlock)(v.Fragment,null,[g.buttonType===`popover`&&g.selector===`fontStyle`?((0,v.openBlock)(),(0,v.createBlock)(u,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),"is-active":e.$refs.richTextEditor?.editor?.isActive(g.selector),"tooltip-message":g.tooltipMessage,"data-qa":g.dataQA,"popover-data-qa":`dt-recipe-editor-font-style-input-popover`,tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,icon:g.icon,onShiftFocusRight:a.shiftActionBarFocusRight,onShiftFocusLeft:a.shiftActionBarFocusLeft},{content:(0,v.withCtx)(({close:e})=>[(0,v.createVNode)(l,{label:``,"label-visible":!1,"show-list":!0,"click-on-select":!0,onEscape:t=>e()},{input:(0,v.withCtx)(({inputProps:e})=>[(0,v.createVNode)(s,(0,v.mergeProps)({ref_for:!0},e,{modelValue:i.fontStyleSearch,"onUpdate:modelValue":t[0]||(t[0]=e=>i.fontStyleSearch=e),"root-class":`d-p8 d-pb4 d-w216`,type:`search`,placeholder:i.i18n.$t(`DIALTONE_EDITOR_FONT_STYLE_SEARCH_PLACEHOLDER`),size:`sm`,role:`menuitem`}),{leftIcon:(0,v.withCtx)(({iconSize:e})=>[(0,v.createVNode)(o,{size:e},null,8,[`size`])]),_:1},16,[`modelValue`,`placeholder`])]),list:(0,v.withCtx)(({listProps:t})=>[(0,v.createElementVNode)(`ul`,(0,v.mergeProps)({ref_for:!0},t),[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(a.filteredFontStyles,t=>((0,v.openBlock)(),(0,v.createBlock)(c,{key:t.name,selected:a.isCurrentFontFamily(t.value),style:(0,v.normalizeStyle)({fontFamily:t.value||`inherit`}),role:`option`,"navigation-type":`arrow-keys`,onClick:n=>{e(a.focusEditor),a.onFontStyleSelect(t.value)}},{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(t.name),1)]),_:2},1032,[`selected`,`style`,`onClick`]))),128))],16)]),_:2},1032,[`onEscape`])]),_:1},8,[`is-active`,`tooltip-message`,`data-qa`,`tabindex`,`icon`,`onShiftFocusRight`,`onShiftFocusLeft`])):g.buttonType===`popover`&&g.selector===`fontSize`?((0,v.openBlock)(),(0,v.createBlock)(d,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),"is-active":e.$refs.richTextEditor?.editor?.isActive(g.selector),"tooltip-message":g.tooltipMessage,"data-qa":g.dataQA,"dropdown-data-qa":`dt-recipe-editor-font-size-input-popover`,tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,icon:g.icon,onShiftFocusRight:a.shiftActionBarFocusRight,onShiftFocusLeft:a.shiftActionBarFocusLeft},{list:(0,v.withCtx)(({close:e})=>[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(n.fontSizes,t=>((0,v.openBlock)(),(0,v.createBlock)(c,{key:t.name,selected:a.isCurrentFontSize(t.value),role:`menuitem`,"navigation-type":`arrow-keys`,onClick:n=>{e(a.focusEditor),a.onFontSizeSelect(t.value,n)}},{default:(0,v.withCtx)(()=>[(0,v.createElementVNode)(`span`,{style:(0,v.normalizeStyle)({fontSize:t.value})},(0,v.toDisplayString)(t.name),5)]),_:2},1032,[`selected`,`onClick`]))),128))]),_:1},8,[`is-active`,`tooltip-message`,`data-qa`,`tabindex`,`icon`,`onShiftFocusRight`,`onShiftFocusLeft`])):g.buttonType===`custom`&&g.selector===`fontColor`?(0,v.withDirectives)(((0,v.openBlock)(),(0,v.createBlock)(f,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),kind:`muted`,importance:`clear`,size:`xs`,active:e.$refs.richTextEditor?.editor?.isActive(g.selector),tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,"aria-label":g.tooltipMessage,"data-qa":g.dataQA,onKeydown:[(0,v.withKeys)((0,v.withModifiers)(a.shiftActionBarFocusRight,[`stop`]),[`right`]),(0,v.withKeys)((0,v.withModifiers)(a.shiftActionBarFocusLeft,[`stop`]),[`left`])],onClick:e=>g.onClick()},{icon:(0,v.withCtx)(()=>[((0,v.openBlock)(),(0,v.createBlock)((0,v.resolveDynamicComponent)(g.icon),{size:`200`,style:(0,v.normalizeStyle)(a.isDefaultFontColor?{}:{color:i.currentFontColor})},null,8,[`style`])),(0,v.createVNode)(s,{value:i.currentFontColor,"root-class":`d-w0 d-h0 d-of-hidden`,"input-class":`colorPickerInput d-w0 d-h0 d-p0 d-bar0`,"input-wrapper-class":`d-w0 d-h0 d-ba-none`,size:`sm`,type:`color`,onInput:a.onColorPickerInput,onClick:t[1]||(t[1]=(0,v.withModifiers)(()=>{},[`stop`]))},null,8,[`value`,`onInput`])]),_:2},1032,[`active`,`tabindex`,`aria-label`,`data-qa`,`onKeydown`,`onClick`])),[[S,{message:g.tooltipMessage,placement:`top`,externalAnchorElement:e.$refs[a.getButtonRef(r.key,g.selector)]?.$el}]]):g.buttonType===`popover`&&g.selector===`variable`?((0,v.openBlock)(),(0,v.createBlock)(u,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),"is-active":!1,"tooltip-message":g.tooltipMessage,"data-qa":g.dataQA,"popover-data-qa":`dt-recipe-editor-variable-popover`,tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,icon:g.icon,onShiftFocusRight:a.shiftActionBarFocusRight,onShiftFocusLeft:a.shiftActionBarFocusLeft},{content:(0,v.withCtx)(({close:e})=>[(0,v.createVNode)(l,{label:``,"label-visible":!1,"show-list":!0,"click-on-select":!0,onEscape:t=>e()},{input:(0,v.withCtx)(({inputProps:e})=>[(0,v.createVNode)(s,(0,v.mergeProps)({ref_for:!0},e,{modelValue:i.variableSearchValue,"onUpdate:modelValue":t[2]||(t[2]=e=>i.variableSearchValue=e),"root-class":`d-p8 d-pb4 d-w264`,type:`search`,placeholder:i.i18n.$t(`DIALTONE_EDITOR_VARIABLE_POPOVER_SEARCH_PLACEHOLDER`),size:`md`,role:`menuitem`}),{leftIcon:(0,v.withCtx)(({iconSize:e})=>[(0,v.createVNode)(o,{size:e},null,8,[`size`])]),_:1},16,[`modelValue`,`placeholder`])]),list:(0,v.withCtx)(({listProps:t})=>[(0,v.createElementVNode)(`div`,(0,v.mergeProps)({ref_for:!0},t),[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(a.filteredCategories,(t,n)=>((0,v.openBlock)(),(0,v.createBlock)(m,{key:t.name,heading:t.name,"heading-class":`d-headline--sm-compact d-p8`},{default:(0,v.withCtx)(()=>[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(a.getFilteredItemsForCategory(t),n=>((0,v.openBlock)(),(0,v.createBlock)(c,{key:t.name+n.name,role:`option`,"navigation-type":`arrow-keys`,onClick:r=>{a.insertVariable(t.name,n),e(a.focusEditor)}},{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(n.name),1)]),_:2},1032,[`onClick`]))),128)),n<a.filteredCategories.length-1?((0,v.openBlock)(),(0,v.createBlock)(p,{key:0})):(0,v.createCommentVNode)(``,!0)]),_:2},1032,[`heading`]))),128))],16)]),_:2},1032,[`onEscape`])]),_:1},8,[`tooltip-message`,`data-qa`,`tabindex`,`icon`,`onShiftFocusRight`,`onShiftFocusLeft`])):g.buttonType===`button`?((0,v.openBlock)(),(0,v.createBlock)(h,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),"is-active":e.$refs.richTextEditor?.editor?.isActive(g.selector),"tooltip-message":g.tooltipMessage,"data-qa":g.dataQA,tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,icon:g.icon,label:g.label,"on-click":g.onClick,onShiftFocusRight:a.shiftActionBarFocusRight,onShiftFocusLeft:a.shiftActionBarFocusLeft},null,8,[`is-active`,`tooltip-message`,`data-qa`,`tabindex`,`icon`,`label`,`on-click`,`onShiftFocusRight`,`onShiftFocusLeft`])):(0,v.createCommentVNode)(``,!0)],64))),256)),t[8]||(t[8]=(0,v.createElementVNode)(`div`,{class:`d-recipe-editor__button-group-divider`},null,-1))]),_:2},1024))),128)),a.linkButton.showBtn?((0,v.openBlock)(),(0,v.createBlock)(g,{key:0,direction:`row`,gap:`300`},{default:(0,v.withCtx)(()=>[(0,v.createVNode)(y,{open:i.showLinkInput,"show-close-button":!1,"data-qa":`dt-recipe-editor-link-input-popover`,padding:`none`,placement:`bottom-start`,onClick:[a.onInputFocus,(0,v.withModifiers)(a.onInputFocus,[`stop`])],onOpened:a.updateInput},{anchor:(0,v.withCtx)(()=>[((0,v.openBlock)(),(0,v.createBlock)(_,{key:a.linkButton.key,message:a.linkButton.tooltipMessage,placement:`top`},{anchor:(0,v.withCtx)(()=>[(0,v.createVNode)(f,{ref:a.getButtonRef(`custom`,`link`),active:e.$refs.richTextEditor?.editor?.isActive(a.linkButton.selector),"aria-label":a.linkButton.tooltipMessage,"data-qa":a.linkButton.dataQA,tabindex:a.canFocus(a.getButtonRef(`custom`,`link`))?0:-1,importance:`clear`,kind:`muted`,size:`xs`,onClick:t[3]||(t[3]=e=>a.linkButton.onClick()),onKeydown:[(0,v.withKeys)((0,v.withModifiers)(a.shiftActionBarFocusRight,[`stop`]),[`right`]),(0,v.withKeys)((0,v.withModifiers)(a.shiftActionBarFocusLeft,[`stop`]),[`left`])]},{icon:(0,v.withCtx)(()=>[((0,v.openBlock)(),(0,v.createBlock)((0,v.resolveDynamicComponent)(a.linkButton.icon),{size:`200`}))]),_:1},8,[`active`,`aria-label`,`data-qa`,`tabindex`,`onKeydown`])]),_:1},8,[`message`]))]),content:(0,v.withCtx)(()=>[(0,v.createElementVNode)(`div`,x,[(0,v.createElementVNode)(`span`,null,(0,v.toDisplayString)(a.showAddLinkButtonLabels.title),1),(0,v.createVNode)(s,{modelValue:i.linkInput,"onUpdate:modelValue":t[4]||(t[4]=e=>i.linkInput=e),"input-aria-label":a.showAddLinkButtonLabels[`aria-label`],placeholder:n.setLinkPlaceholder,"data-qa":`dt-recipe-editor-link-input`,"input-wrapper-class":`d-recipe-editor-link__input-wrapper`,onClick:[a.onInputFocus,(0,v.withModifiers)(a.onInputFocus,[`stop`])],onFocus:a.onInputFocus,onKeydown:(0,v.withKeys)(a.setLink,[`enter`])},null,8,[`modelValue`,`input-aria-label`,`placeholder`,`onClick`,`onFocus`,`onKeydown`])])]),footerContent:(0,v.withCtx)(()=>[(0,v.createVNode)(g,{direction:`row`,gap:`300`,class:`d-recipe-editor__popover-footer`},{default:(0,v.withCtx)(()=>[(0,v.createVNode)(f,(0,v.mergeProps)({"data-qa":`dt-recipe-editor-remove-link-btn`,importance:`clear`,kind:`muted`,size:`sm`},a.removeLinkButtonLabels,{onClick:a.removeLink}),{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(a.removeLinkButtonLabels.title),1)]),_:1},16,[`onClick`]),(0,v.createVNode)(f,(0,v.mergeProps)({"data-qa":`dt-recipe-editor-set-link-cancel-btn`,importance:`clear`,kind:`muted`,size:`sm`},a.cancelSetLinkButtonLabels,{onClick:a.closeLinkInput}),{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(a.cancelSetLinkButtonLabels.title),1)]),_:1},16,[`onClick`]),(0,v.createVNode)(f,(0,v.mergeProps)({"data-qa":`dt-recipe-editor-set-link-confirm-btn`,size:`sm`},a.confirmSetLinkButtonLabels,{onClick:a.setLink}),{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(a.confirmSetLinkButtonLabels.title),1)]),_:1},16,[`onClick`])]),_:1})]),_:1},8,[`open`,`onClick`,`onOpened`])]),_:1})):(0,v.createCommentVNode)(``,!0)]),_:1}),(0,v.createElementVNode)(`div`,{style:(0,v.normalizeStyle)({"max-height":n.maxHeight}),class:(0,v.normalizeClass)([`d-recipe-editor__content`,{"d-recipe-editor__content-image-resize":n.allowImageResize}])},[(0,v.createVNode)(b,(0,v.mergeProps)({ref:`richTextEditor`,modelValue:i.internalInputValue,"onUpdate:modelValue":t[5]||(t[5]=e=>i.internalInputValue=e),"allow-font-color":!0,"allow-font-family":!0,"allow-inline-images":!0,"allow-line-breaks":!0,"allow-variable":!0,"allow-font-size":n.showFontSizeButton,"allow-background-color":n.allowBackgroundColor,"allow-line-height":n.allowLineHeight,"variable-items":a.flattenedVariableItems,"hide-link-bubble-menu":!0,"auto-focus":n.autoFocus,editable:n.editable,"input-aria-label":n.inputAriaLabel,"input-class":`d-recipe-editor__content-input ${n.inputClass}`,link:!0,"output-format":a.htmlOutputFormat,placeholder:n.placeholder,"preserve-whitespace":n.preserveWhitespace,"use-div-tags":n.useDivTags,"allow-tables":n.allowTables,"allow-image-resize":n.allowImageResize,"data-qa":`dt-rich-text-editor`},a.removeClassStyleAttrs(e.$attrs),{onTextInput:a.onTextInput,onBlur:a.onBlur,onFocus:a.onFocus,onInput:t[6]||(t[6]=e=>a.onInput(e)),onSelected:a.onSelected}),null,16,[`modelValue`,`allow-font-size`,`allow-background-color`,`allow-line-height`,`variable-items`,`auto-focus`,`editable`,`input-aria-label`,`input-class`,`output-format`,`placeholder`,`preserve-whitespace`,`use-div-tags`,`allow-tables`,`allow-image-resize`,`onTextInput`,`onBlur`,`onFocus`,`onSelected`])],6)],16)}var C=t.t(b,[[`render`,S]]);exports.default=C;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),t=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`../../localization/index.cjs`),r=require(`../button/button.cjs`),i=require(`../list-item/list-item.cjs`),a=require(`../../combobox-DhjZxfUw.cjs`),o=require(`../stack/stack.cjs`),s=require(`../tooltip/tooltip.cjs`),c=require(`../popover/popover.cjs`),l=require(`../dropdown/dropdown-separator.cjs`),u=require(`../input/input.cjs`),d=require(`../list-item-group/list-item-group.cjs`),f=require(`../../rich_text_editor-DMP5eTlf.cjs`),p=require(`../rich-text-editor/rich-text-editor-constants.cjs`),m=require(`./editor-constants.cjs`),h=require(`./EditorToolbarButton.cjs`),g=require(`./EditorToolbarDropdownButton.cjs`),_=require(`./EditorToolbarPopoverButton.cjs`);let v=require(`vue`),y=require(`@dialpad/dialtone-icons/vue3`);var b={compatConfig:{MODE:3},name:`DtRecipeEditor`,components:{DtListItemGroup:d.default,DtDropdownSeparator:l.default,DtListItem:i.default,DtRichTextEditor:f.t,DtButton:r.default,DtPopover:c.default,DtStack:o.default,DtInput:u.default,DtTooltip:s.default,DtCombobox:a.t,EditorToolbarButton:h.default,EditorToolbarDropdownButton:g.default,EditorToolbarPopoverButton:_.default,DtIconQuickReply:y.DtIconQuickReply,DtIconBold:y.DtIconBold,DtIconItalic:y.DtIconItalic,DtIconUnderline:y.DtIconUnderline,DtIconStrikethrough:y.DtIconStrikethrough,DtIconListBullet:y.DtIconListBullet,DtIconListOrdered:y.DtIconListOrdered,DtIconAlignLeft:y.DtIconAlignLeft,DtIconAlignCenter:y.DtIconAlignCenter,DtIconAlignRight:y.DtIconAlignRight,DtIconAlignJustify:y.DtIconAlignJustify,DtIconQuote:y.DtIconQuote,DtIconCodeBlock:y.DtIconCodeBlock,DtIconLink2:y.DtIconLink2,DtIconImage:y.DtIconImage,DtIconSearch:y.DtIconSearch,DtIconType:y.DtIconType,DtIconBraces:y.DtIconBraces,DtIconChevronDown:y.DtIconChevronDown,DtIconFontSize:y.DtIconFontSize,DtIconStopFilled:y.DtIconStopFilled},mixins:[],inheritAttrs:!1,props:{modelValue:{type:[Object,String],default:``},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:``},inputClass:{type:String,default:``},autoFocus:{type:[Boolean,String,Number],default:!1,validator(e){return typeof e==`string`?p.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(e):!0}},placeholder:{type:String,default:``},maxHeight:{type:String,default:`unset`},setLinkPlaceholder:{type:String,default:``},showBoldButton:{type:Boolean,default:!0},showItalicsButton:{type:Boolean,default:!0},showUnderlineButton:{type:Boolean,default:!0},showStrikeButton:{type:Boolean,default:!0},showListItemsButton:{type:Boolean,default:!0},showOrderedListButton:{type:Boolean,default:!0},showAlignLeftButton:{type:Boolean,default:!0},showAlignCenterButton:{type:Boolean,default:!0},showAlignRightButton:{type:Boolean,default:!0},showAlignJustifyButton:{type:Boolean,default:!0},showQuoteButton:{type:Boolean,default:!0},showCodeBlockButton:{type:Boolean,default:!0},showQuickRepliesButton:{type:Boolean,default:!0},showInlineImageButton:{type:Boolean,default:!1},showVariableButton:{type:Boolean,default:!1},variableCategories:{type:Array,default:()=>[]},showAddLink:{type:Object,default:()=>({showAddLinkButton:!0})},showFontStyleButton:{type:Boolean,default:!1},showFontSizeButton:{type:Boolean,default:!1},showFontColorButton:{type:Boolean,default:!1},fontStyles:{type:Array,default:()=>[{name:`Arial`,value:null},{name:`Georgia`,value:`Georgia`},{name:`Helvetica`,value:`Helvetica`},{name:`Verdana`,value:`Verdana`},{name:`Times New Roman`,value:`Times New Roman`}]},fontSizes:{type:Array,default:()=>[{name:`Small`,value:`12px`},{name:`Normal`,value:`15px`},{name:`Large`,value:`24px`},{name:`Huge`,value:`36px`}]},allowBackgroundColor:{type:Boolean,default:!1},allowLineHeight:{type:Boolean,default:!1},preserveWhitespace:{type:[Boolean,String],default:`full`},useDivTags:{type:Boolean,default:!1},allowTables:{type:Boolean,default:!1},allowImageResize:{type:Boolean,default:!1}},emits:[`focus`,`blur`,`input`,`update:modelValue`,`quick-replies-click`,`inline-image-click`,`text-input`],data(){return{internalInputValue:this.modelValue,hasFocus:!1,linkOptions:{class:`d-recipe-editor__link`},currentFontColor:void 0,showLinkInput:!1,fontStyleSearch:``,linkInput:``,currentButtonRefIndex:0,variableSearchValue:``,i18n:new n.DialtoneLocalization}},computed:{inputLength(){return this.internalInputValue.length},htmlOutputFormat(){return p.RICH_TEXT_EDITOR_OUTPUT_FORMATS[2]},flattenedVariableItems(){return this.variableCategories?this.variableCategories.reduce((e,t)=>e.concat(t.items||[]),[]):[]},showingTextFormatButtons(){return this.showBoldButton||this.showItalicsButton||this.showStrikeButton||this.showUnderlineButton},showingAlignmentButtons(){return this.showAlignLeftButton||this.showAlignCenterButton||this.showAlignRightButton||this.showAlignJustifyButton},showingListButtons(){return this.showListItemsButton||this.showOrderedListButton},orderedRefs(){let e=this.buttonGroups.reduce(function(e,t){return t.buttonGroup.forEach(n=>{e.push(this.getButtonRef(t.key,n.selector))},this),e}.bind(this),[]);return e.push(this.getButtonRef(`custom`,`link`)),e},buttonGroups(){let e=this.individualButtons.map(e=>({key:e.selector,buttonGroup:[e]}));return[{key:`new`,buttonGroup:this.newButtons},{key:`format`,buttonGroup:this.textFormatButtons},{key:`alignment`,buttonGroup:this.alignmentButtons},{key:`list`,buttonGroup:this.listButtons},...e].filter(e=>e.buttonGroup.length>0)},newButtons(){return[{showBtn:this.showQuickRepliesButton,buttonType:`button`,label:this.i18n.$t(`DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL`),selector:`quickReplies`,icon:y.DtIconQuickReply,dataQA:`dt-recipe-editor-quick-replies-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL`),onClick:this.onQuickRepliesClick}].filter(e=>e.showBtn)},textFormatButtons(){return[{showBtn:this.showFontStyleButton,buttonType:`popover`,selector:`fontStyle`,icon:y.DtIconType,dataQA:`dt-recipe-editor-font-style-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_FONT_STYLE_BUTTON_LABEL`)},{showBtn:this.showFontSizeButton,buttonType:`popover`,selector:`fontSize`,icon:y.DtIconFontSize,dataQA:`dt-recipe-editor-font-size-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_FONT_SIZE_BUTTON_LABEL`)},{showBtn:this.showFontColorButton,buttonType:`custom`,selector:`fontColor`,icon:y.DtIconStopFilled,dataQA:`dt-recipe-editor-font-color-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_FONT_COLOR_BUTTON_LABEL`),onClick:this.onColorPickerButtonClick},{showBtn:this.showBoldButton,buttonType:`button`,selector:`bold`,icon:y.DtIconBold,dataQA:`dt-recipe-editor-bold-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_BOLD_BUTTON_LABEL`),onClick:this.onBoldTextToggle},{showBtn:this.showItalicsButton,buttonType:`button`,selector:`italic`,icon:y.DtIconItalic,dataQA:`dt-recipe-editor-italics-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ITALICS_BUTTON_LABEL`),onClick:this.onItalicTextToggle},{showBtn:this.showUnderlineButton,buttonType:`button`,selector:`underline`,icon:y.DtIconUnderline,dataQA:`dt-recipe-editor-underline-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_UNDERLINE_BUTTON_LABEL`),onClick:this.onUnderlineTextToggle},{showBtn:this.showStrikeButton,buttonType:`button`,selector:`strike`,icon:y.DtIconStrikethrough,dataQA:`dt-recipe-editor-strike-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_STRIKE_BUTTON_LABEL`),onClick:this.onStrikethroughTextToggle}].filter(e=>e.showBtn)},alignmentButtons(){return[{showBtn:this.showAlignLeftButton,buttonType:`button`,selector:{textAlign:`left`},icon:y.DtIconAlignLeft,dataQA:`dt-recipe-editor-align-left-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ALIGN_LEFT_BUTTON_LABEL`),onClick:()=>this.onTextAlign(`left`)},{showBtn:this.showAlignCenterButton,buttonType:`button`,selector:{textAlign:`center`},icon:y.DtIconAlignCenter,dataQA:`dt-recipe-editor-align-center-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ALIGN_CENTER_BUTTON_LABEL`),onClick:()=>this.onTextAlign(`center`)},{showBtn:this.showAlignRightButton,buttonType:`button`,selector:{textAlign:`right`},icon:y.DtIconAlignRight,dataQA:`dt-recipe-editor-align-right-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ALIGN_RIGHT_BUTTON_LABEL`),onClick:()=>this.onTextAlign(`right`)},{showBtn:this.showAlignJustifyButton,buttonType:`button`,selector:{textAlign:`justify`},icon:y.DtIconAlignJustify,dataQA:`dt-recipe-editor-align-justify-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ALIGN_JUSTIFY_BUTTON_LABEL`),onClick:()=>this.onTextAlign(`justify`)}].filter(e=>e.showBtn)},listButtons(){return[{showBtn:this.showListItemsButton,buttonType:`button`,selector:`bulletList`,icon:y.DtIconListBullet,dataQA:`dt-recipe-editor-list-items-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_BULLET_LIST_BUTTON_LABEL`),onClick:this.onBulletListToggle},{showBtn:this.showOrderedListButton,buttonType:`button`,selector:`orderedList`,icon:y.DtIconListOrdered,dataQA:`dt-recipe-editor-ordered-list-items-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_ORDERED_LIST_BUTTON_LABEL`),onClick:this.onOrderedListToggle}].filter(e=>e.showBtn)},individualButtons(){return[{showBtn:this.showQuoteButton,buttonType:`button`,selector:`blockquote`,icon:y.DtIconQuote,dataQA:`dt-recipe-editor-blockquote-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_QUOTE_BUTTON_LABEL`),onClick:this.onBlockquoteToggle},{showBtn:this.showCodeBlockButton,buttonType:`button`,selector:`codeBlock`,icon:y.DtIconCodeBlock,dataQA:`dt-recipe-editor-code-block-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_CODE_BUTTON_LABEL`),onClick:this.onCodeBlockToggle},{showBtn:this.showInlineImageButton,buttonType:`button`,selector:`image`,icon:y.DtIconImage,dataQA:`dt-recipe-editor-inline-image-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_IMAGE_BUTTON_LABEL`),onClick:this.onInsertInlineImageClick},{showBtn:this.showVariableButton,buttonType:`popover`,selector:`variable`,icon:y.DtIconBraces,dataQA:`dt-recipe-editor-variable-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_VARIABLE_BUTTON_LABEL`)}].filter(e=>e.showBtn)},linkButton(){return{showBtn:this.showAddLink.showAddLinkButton,buttonType:`custom`,selector:`link`,icon:y.DtIconLink2,dataQA:`dt-recipe-editor-add-link-btn`,tooltipMessage:this.i18n.$t(`DIALTONE_EDITOR_LINK_BUTTON_LABEL`),onClick:this.openLinkInput}},confirmSetLinkButtonLabels(){return this.i18n.$ta(`DIALTONE_EDITOR_CONFIRM_SET_LINK_BUTTON`)},cancelSetLinkButtonLabels(){return this.i18n.$ta(`DIALTONE_EDITOR_CANCEL_SET_LINK_BUTTON`)},removeLinkButtonLabels(){return this.i18n.$ta(`DIALTONE_EDITOR_REMOVE_LINK_BUTTON`)},showAddLinkButtonLabels(){return this.i18n.$ta(`DIALTONE_EDITOR_ADD_LINK_BUTTON`)},filteredFontStyles(){let e=this.fontStyleSearch.toLowerCase();return this.fontStyles.filter(t=>t.name.toLowerCase().includes(e))},filteredCategories(){return this.variableCategories.filter(e=>this.getFilteredItemsForCategory(e).length)},colorPickerInput(){return this.$refs.editorRoot?.querySelector(`.colorPickerInput`)},isDefaultFontColor(){return this.currentFontColor===m.EDITOR_DEFAULT_FONT_COLOR},actionBarBtn(){let e=this.$refs[this.orderedRefs[this.currentButtonRefIndex]][0]?.$refs?.buttonRef||this.$refs[this.orderedRefs[this.currentButtonRefIndex]];return Array.isArray(e)?e[0]:e}},watch:{modelValue(e){this.internalInputValue=e}},methods:{removeClassStyleAttrs:e.removeClassStyleAttrs,addClassStyleAttrs:e.addClassStyleAttrs,focusEditor(){this.$refs.richTextEditor?.editor?.commands.focus()},onInputFocus(e){e?.stopPropagation()},removeLink(){this.$refs.richTextEditor?.editor?.chain()?.focus()?.unsetLink()?.run(),this.closeLinkInput()},setLink(e){let t=this.$refs.richTextEditor?.editor;if(e?.preventDefault(),e?.stopPropagation(),!this.linkInput){this.removeLink();return}m.EDITOR_SUPPORTED_LINK_PROTOCOLS.find(e=>e.test(this.linkInput))||(this.linkInput=`${m.EDITOR_DEFAULT_LINK_PREFIX}${this.linkInput}`);let n=t?.view?.state?.selection;n.anchor===n.head?t.chain().focus().insertContentAt(n.anchor,`<a class="${this.linkOptions.class}" href=${this.linkInput}>${this.linkInput}</a>`).run():t.chain().focus().extendMarkRange(`link`).setLink({href:this.linkInput,class:this.linkOptions.class}).run(),this.closeLinkInput()},openLinkInput(){this.showLinkInput=!0},updateInput(e){if(!e)return this.closeLinkInput();this.linkInput=this.$refs.richTextEditor?.editor?.getAttributes(`link`)?.href},closeLinkInput(){this.showLinkInput=!1,this.linkInput=``,this.$refs.richTextEditor.editor?.chain().focus()},onBoldTextToggle(){this.$refs.richTextEditor?.editor?.chain().focus().toggleBold().run()},onItalicTextToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleItalic().run()},onUnderlineTextToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleUnderline().run()},onStrikethroughTextToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleStrike().run()},onTextAlign(e){if(this.$refs.richTextEditor?.editor?.isActive({textAlign:e}))return this.$refs.richTextEditor?.editor.chain().focus().unsetTextAlign().run();this.$refs.richTextEditor?.editor.chain().focus().setTextAlign(e).run()},onBulletListToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleBulletList().run()},onOrderedListToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleOrderedList().run()},onCodeBlockToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleCodeBlock().run()},onQuickRepliesClick(){this.$emit(`quick-replies-click`)},onInsertInlineImageClick(){this.$emit(`inline-image-click`)},insertVariable(e,t){this.$refs.richTextEditor?.editor.chain().focus().insertVariable({id:t.id,placeholder:t.placeholder||``,altText:``,enableAltText:t.enableAltText}).run()},insertInlineImage(e){this.$refs.richTextEditor?.editor.chain().focus().setImage({src:e}).run()},insertInMessageBody(e){this.$refs.richTextEditor?.editor.chain().focus().insertContent(e).run()},setCursorPosition(e=null){this.$refs.richTextEditor?.editor.chain().focus(e).run()},onBlockquoteToggle(){this.$refs.richTextEditor?.editor.chain().focus().toggleBlockquote().run()},onTextInput(e){this.$emit(`text-input`,e)},onFocus(e){this.hasFocus=!0,this.$emit(`focus`,e)},onBlur(e){this.hasFocus=!1,this.$emit(`blur`,e)},onInput(e){this.$emit(`input`,e),this.$emit(`update:modelValue`,e)},onSelected(){this.updateFontColorInput()},getButtonKey(e,t){return`${e}-${JSON.stringify(t)}`},getButtonRef(e,t){return`${this.getButtonKey(e,t)}-ref`},canFocus(e){return e===this.orderedRefs[this.currentButtonRefIndex]},shiftActionBarFocusRight(){this.shiftButtonRefIndex(1)},shiftActionBarFocusLeft(){this.shiftButtonRefIndex(-1)},shiftButtonRefIndex(e){let t=this.actionBarBtn,n=(this.currentButtonRefIndex+e)%this.orderedRefs.length;this.currentButtonRefIndex=n>=0?n:this.orderedRefs.length+n;let r=this.actionBarBtn;t.$el.blur(),r.$el.focus()},onFontStyleSelect(e){e?this.$refs.richTextEditor?.editor?.chain().focus().setFontFamily(e).run():this.$refs.richTextEditor?.editor?.chain().focus().unsetFontFamily().run(),this.$refs.richTextEditor?.editor?.commands.focus()},isCurrentFontFamily(e){return e?this.$refs.richTextEditor?.editor?.isActive(`textStyle`,{fontFamily:e}):!this.$refs.richTextEditor?.editor?.getAttributes(`textStyle`)?.fontFamily},onFontSizeSelect(e){this.$refs.richTextEditor?.editor?.chain().focus().setFontSize(e).run(),this.$refs.richTextEditor?.editor?.commands.focus()},isCurrentFontSize(e){return e?this.$refs.richTextEditor?.editor?.isActive(`textStyle`,{fontSize:e}):!this.$refs.richTextEditor?.editor?.getAttributes(`textStyle`)?.fontSize},getFilteredItemsForCategory(e){let t=this.variableSearchValue.toLowerCase();return e.name.toLowerCase().includes(t)?e.items:e.items.filter(e=>e.name.toLowerCase().includes(t))},updateFontColorInput(){this.currentFontColor=this.$refs.richTextEditor?.editor?.getAttributes(`textStyle`)?.color||`#000000`},onColorPickerButtonClick(){this.colorPickerInput?.click()},onColorPickerInput(e){this.$refs.richTextEditor?.editor?.chain().focus().setColor(e).run(),this.$refs.richTextEditor?.editor?.commands.focus(),this.updateFontColorInput()}}},x={class:`d-recipe-editor__popover-content`};function S(e,t,n,r,i,a){let o=(0,v.resolveComponent)(`dt-icon-search`),s=(0,v.resolveComponent)(`dt-input`),c=(0,v.resolveComponent)(`dt-list-item`),l=(0,v.resolveComponent)(`dt-combobox`),u=(0,v.resolveComponent)(`editor-toolbar-popover-button`),d=(0,v.resolveComponent)(`editor-toolbar-dropdown-button`),f=(0,v.resolveComponent)(`dt-button`),p=(0,v.resolveComponent)(`dt-dropdown-separator`),m=(0,v.resolveComponent)(`dt-list-item-group`),h=(0,v.resolveComponent)(`editor-toolbar-button`),g=(0,v.resolveComponent)(`dt-stack`),_=(0,v.resolveComponent)(`dt-tooltip`),y=(0,v.resolveComponent)(`dt-popover`),b=(0,v.resolveComponent)(`dt-rich-text-editor`),S=(0,v.resolveDirective)(`dt-tooltip`);return(0,v.openBlock)(),(0,v.createElementBlock)(`div`,(0,v.mergeProps)({ref:`editorRoot`,class:`d-recipe-editor`},a.addClassStyleAttrs(e.$attrs),{"data-qa":`dt-recipe-editor`,role:`presentation`,onClick:t[7]||(t[7]=t=>e.$refs.richTextEditor.focusEditor())}),[(0,v.createVNode)(g,{class:`d-recipe-editor__top-bar`,direction:`row`,gap:`450`},{default:(0,v.withCtx)(()=>[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(a.buttonGroups,r=>((0,v.openBlock)(),(0,v.createBlock)(g,{key:r.key,direction:`row`,gap:`300`},{default:(0,v.withCtx)(()=>[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(r.buttonGroup,g=>((0,v.openBlock)(),(0,v.createElementBlock)(v.Fragment,null,[g.buttonType===`popover`&&g.selector===`fontStyle`?((0,v.openBlock)(),(0,v.createBlock)(u,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),"is-active":e.$refs.richTextEditor?.editor?.isActive(g.selector),"tooltip-message":g.tooltipMessage,"data-qa":g.dataQA,"popover-data-qa":`dt-recipe-editor-font-style-input-popover`,tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,icon:g.icon,onShiftFocusRight:a.shiftActionBarFocusRight,onShiftFocusLeft:a.shiftActionBarFocusLeft},{content:(0,v.withCtx)(({close:e})=>[(0,v.createVNode)(l,{label:``,"label-visible":!1,"show-list":!0,"click-on-select":!0,onEscape:t=>e()},{input:(0,v.withCtx)(({inputProps:e})=>[(0,v.createVNode)(s,(0,v.mergeProps)({ref_for:!0},e,{modelValue:i.fontStyleSearch,"onUpdate:modelValue":t[0]||(t[0]=e=>i.fontStyleSearch=e),"root-class":`d-p8 d-pb4 d-w216`,type:`search`,placeholder:i.i18n.$t(`DIALTONE_EDITOR_FONT_STYLE_SEARCH_PLACEHOLDER`),size:`sm`,role:`menuitem`}),{leftIcon:(0,v.withCtx)(({iconSize:e})=>[(0,v.createVNode)(o,{size:e},null,8,[`size`])]),_:1},16,[`modelValue`,`placeholder`])]),list:(0,v.withCtx)(({listProps:t})=>[(0,v.createElementVNode)(`ul`,(0,v.mergeProps)({ref_for:!0},t),[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(a.filteredFontStyles,t=>((0,v.openBlock)(),(0,v.createBlock)(c,{key:t.name,selected:a.isCurrentFontFamily(t.value),style:(0,v.normalizeStyle)({fontFamily:t.value||`inherit`}),role:`option`,"navigation-type":`arrow-keys`,onClick:n=>{e(a.focusEditor),a.onFontStyleSelect(t.value)}},{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(t.name),1)]),_:2},1032,[`selected`,`style`,`onClick`]))),128))],16)]),_:2},1032,[`onEscape`])]),_:1},8,[`is-active`,`tooltip-message`,`data-qa`,`tabindex`,`icon`,`onShiftFocusRight`,`onShiftFocusLeft`])):g.buttonType===`popover`&&g.selector===`fontSize`?((0,v.openBlock)(),(0,v.createBlock)(d,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),"is-active":e.$refs.richTextEditor?.editor?.isActive(g.selector),"tooltip-message":g.tooltipMessage,"data-qa":g.dataQA,"dropdown-data-qa":`dt-recipe-editor-font-size-input-popover`,tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,icon:g.icon,onShiftFocusRight:a.shiftActionBarFocusRight,onShiftFocusLeft:a.shiftActionBarFocusLeft},{list:(0,v.withCtx)(({close:e})=>[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(n.fontSizes,t=>((0,v.openBlock)(),(0,v.createBlock)(c,{key:t.name,selected:a.isCurrentFontSize(t.value),role:`menuitem`,"navigation-type":`arrow-keys`,onClick:n=>{e(a.focusEditor),a.onFontSizeSelect(t.value,n)}},{default:(0,v.withCtx)(()=>[(0,v.createElementVNode)(`span`,{style:(0,v.normalizeStyle)({fontSize:t.value})},(0,v.toDisplayString)(t.name),5)]),_:2},1032,[`selected`,`onClick`]))),128))]),_:1},8,[`is-active`,`tooltip-message`,`data-qa`,`tabindex`,`icon`,`onShiftFocusRight`,`onShiftFocusLeft`])):g.buttonType===`custom`&&g.selector===`fontColor`?(0,v.withDirectives)(((0,v.openBlock)(),(0,v.createBlock)(f,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),kind:`muted`,importance:`clear`,size:`xs`,active:e.$refs.richTextEditor?.editor?.isActive(g.selector),tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,"aria-label":g.tooltipMessage,"data-qa":g.dataQA,onKeydown:[(0,v.withKeys)((0,v.withModifiers)(a.shiftActionBarFocusRight,[`stop`]),[`right`]),(0,v.withKeys)((0,v.withModifiers)(a.shiftActionBarFocusLeft,[`stop`]),[`left`])],onClick:e=>g.onClick()},{icon:(0,v.withCtx)(()=>[((0,v.openBlock)(),(0,v.createBlock)((0,v.resolveDynamicComponent)(g.icon),{size:`200`,style:(0,v.normalizeStyle)(a.isDefaultFontColor?{}:{color:i.currentFontColor})},null,8,[`style`])),(0,v.createVNode)(s,{value:i.currentFontColor,"root-class":`d-w0 d-h0 d-of-hidden`,"input-class":`colorPickerInput d-w0 d-h0 d-p0 d-bar0`,"input-wrapper-class":`d-w0 d-h0 d-ba-none`,size:`sm`,type:`color`,onInput:a.onColorPickerInput,onClick:t[1]||(t[1]=(0,v.withModifiers)(()=>{},[`stop`]))},null,8,[`value`,`onInput`])]),_:2},1032,[`active`,`tabindex`,`aria-label`,`data-qa`,`onKeydown`,`onClick`])),[[S,{message:g.tooltipMessage,placement:`top`,externalAnchorElement:e.$refs[a.getButtonRef(r.key,g.selector)]?.$el}]]):g.buttonType===`popover`&&g.selector===`variable`?((0,v.openBlock)(),(0,v.createBlock)(u,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),"is-active":!1,"tooltip-message":g.tooltipMessage,"data-qa":g.dataQA,"popover-data-qa":`dt-recipe-editor-variable-popover`,tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,icon:g.icon,onShiftFocusRight:a.shiftActionBarFocusRight,onShiftFocusLeft:a.shiftActionBarFocusLeft},{content:(0,v.withCtx)(({close:e})=>[(0,v.createVNode)(l,{label:``,"label-visible":!1,"show-list":!0,"click-on-select":!0,onEscape:t=>e()},{input:(0,v.withCtx)(({inputProps:e})=>[(0,v.createVNode)(s,(0,v.mergeProps)({ref_for:!0},e,{modelValue:i.variableSearchValue,"onUpdate:modelValue":t[2]||(t[2]=e=>i.variableSearchValue=e),"root-class":`d-p8 d-pb4 d-w264`,type:`search`,placeholder:i.i18n.$t(`DIALTONE_EDITOR_VARIABLE_POPOVER_SEARCH_PLACEHOLDER`),size:`md`,role:`menuitem`}),{leftIcon:(0,v.withCtx)(({iconSize:e})=>[(0,v.createVNode)(o,{size:e},null,8,[`size`])]),_:1},16,[`modelValue`,`placeholder`])]),list:(0,v.withCtx)(({listProps:t})=>[(0,v.createElementVNode)(`div`,(0,v.mergeProps)({ref_for:!0},t),[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(a.filteredCategories,(t,n)=>((0,v.openBlock)(),(0,v.createBlock)(m,{key:t.name,heading:t.name,"heading-class":`d-headline--sm-compact d-p8`},{default:(0,v.withCtx)(()=>[((0,v.openBlock)(!0),(0,v.createElementBlock)(v.Fragment,null,(0,v.renderList)(a.getFilteredItemsForCategory(t),n=>((0,v.openBlock)(),(0,v.createBlock)(c,{key:t.name+n.name,role:`option`,"navigation-type":`arrow-keys`,onClick:r=>{a.insertVariable(t.name,n),e(a.focusEditor)}},{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(n.name),1)]),_:2},1032,[`onClick`]))),128)),n<a.filteredCategories.length-1?((0,v.openBlock)(),(0,v.createBlock)(p,{key:0})):(0,v.createCommentVNode)(``,!0)]),_:2},1032,[`heading`]))),128))],16)]),_:2},1032,[`onEscape`])]),_:1},8,[`tooltip-message`,`data-qa`,`tabindex`,`icon`,`onShiftFocusRight`,`onShiftFocusLeft`])):g.buttonType===`button`?((0,v.openBlock)(),(0,v.createBlock)(h,{key:a.getButtonKey(r.key,g.selector),ref_for:!0,ref:a.getButtonRef(r.key,g.selector),"is-active":e.$refs.richTextEditor?.editor?.isActive(g.selector),"tooltip-message":g.tooltipMessage,"data-qa":g.dataQA,tabindex:a.canFocus(a.getButtonRef(r.key,g.selector))?0:-1,icon:g.icon,label:g.label,"on-click":g.onClick,onShiftFocusRight:a.shiftActionBarFocusRight,onShiftFocusLeft:a.shiftActionBarFocusLeft},null,8,[`is-active`,`tooltip-message`,`data-qa`,`tabindex`,`icon`,`label`,`on-click`,`onShiftFocusRight`,`onShiftFocusLeft`])):(0,v.createCommentVNode)(``,!0)],64))),256)),t[8]||(t[8]=(0,v.createElementVNode)(`div`,{class:`d-recipe-editor__button-group-divider`},null,-1))]),_:2},1024))),128)),a.linkButton.showBtn?((0,v.openBlock)(),(0,v.createBlock)(g,{key:0,direction:`row`,gap:`300`},{default:(0,v.withCtx)(()=>[(0,v.createVNode)(y,{open:i.showLinkInput,"show-close-button":!1,"data-qa":`dt-recipe-editor-link-input-popover`,padding:`none`,placement:`bottom-start`,onClick:[a.onInputFocus,(0,v.withModifiers)(a.onInputFocus,[`stop`])],onOpened:a.updateInput},{anchor:(0,v.withCtx)(()=>[((0,v.openBlock)(),(0,v.createBlock)(_,{key:a.linkButton.key,message:a.linkButton.tooltipMessage,placement:`top`},{anchor:(0,v.withCtx)(()=>[(0,v.createVNode)(f,{ref:a.getButtonRef(`custom`,`link`),active:e.$refs.richTextEditor?.editor?.isActive(a.linkButton.selector),"aria-label":a.linkButton.tooltipMessage,"data-qa":a.linkButton.dataQA,tabindex:a.canFocus(a.getButtonRef(`custom`,`link`))?0:-1,importance:`clear`,kind:`muted`,size:`xs`,onClick:t[3]||(t[3]=e=>a.linkButton.onClick()),onKeydown:[(0,v.withKeys)((0,v.withModifiers)(a.shiftActionBarFocusRight,[`stop`]),[`right`]),(0,v.withKeys)((0,v.withModifiers)(a.shiftActionBarFocusLeft,[`stop`]),[`left`])]},{icon:(0,v.withCtx)(()=>[((0,v.openBlock)(),(0,v.createBlock)((0,v.resolveDynamicComponent)(a.linkButton.icon),{size:`200`}))]),_:1},8,[`active`,`aria-label`,`data-qa`,`tabindex`,`onKeydown`])]),_:1},8,[`message`]))]),content:(0,v.withCtx)(()=>[(0,v.createElementVNode)(`div`,x,[(0,v.createElementVNode)(`span`,null,(0,v.toDisplayString)(a.showAddLinkButtonLabels.title),1),(0,v.createVNode)(s,{modelValue:i.linkInput,"onUpdate:modelValue":t[4]||(t[4]=e=>i.linkInput=e),"input-aria-label":a.showAddLinkButtonLabels[`aria-label`],placeholder:n.setLinkPlaceholder,"data-qa":`dt-recipe-editor-link-input`,"input-wrapper-class":`d-recipe-editor-link__input-wrapper`,onClick:[a.onInputFocus,(0,v.withModifiers)(a.onInputFocus,[`stop`])],onFocus:a.onInputFocus,onKeydown:(0,v.withKeys)(a.setLink,[`enter`])},null,8,[`modelValue`,`input-aria-label`,`placeholder`,`onClick`,`onFocus`,`onKeydown`])])]),footerContent:(0,v.withCtx)(()=>[(0,v.createVNode)(g,{direction:`row`,gap:`300`,class:`d-recipe-editor__popover-footer`},{default:(0,v.withCtx)(()=>[(0,v.createVNode)(f,(0,v.mergeProps)({"data-qa":`dt-recipe-editor-remove-link-btn`,importance:`clear`,kind:`muted`,size:`sm`},a.removeLinkButtonLabels,{onClick:a.removeLink}),{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(a.removeLinkButtonLabels.title),1)]),_:1},16,[`onClick`]),(0,v.createVNode)(f,(0,v.mergeProps)({"data-qa":`dt-recipe-editor-set-link-cancel-btn`,importance:`clear`,kind:`muted`,size:`sm`},a.cancelSetLinkButtonLabels,{onClick:a.closeLinkInput}),{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(a.cancelSetLinkButtonLabels.title),1)]),_:1},16,[`onClick`]),(0,v.createVNode)(f,(0,v.mergeProps)({"data-qa":`dt-recipe-editor-set-link-confirm-btn`,size:`sm`},a.confirmSetLinkButtonLabels,{onClick:a.setLink}),{default:(0,v.withCtx)(()=>[(0,v.createTextVNode)((0,v.toDisplayString)(a.confirmSetLinkButtonLabels.title),1)]),_:1},16,[`onClick`])]),_:1})]),_:1},8,[`open`,`onClick`,`onOpened`])]),_:1})):(0,v.createCommentVNode)(``,!0)]),_:1}),(0,v.createElementVNode)(`div`,{style:(0,v.normalizeStyle)({"max-height":n.maxHeight}),class:(0,v.normalizeClass)([`d-recipe-editor__content`,{"d-recipe-editor__content-image-resize":n.allowImageResize}])},[(0,v.createVNode)(b,(0,v.mergeProps)({ref:`richTextEditor`,modelValue:i.internalInputValue,"onUpdate:modelValue":t[5]||(t[5]=e=>i.internalInputValue=e),"allow-font-color":!0,"allow-font-family":!0,"allow-inline-images":!0,"allow-line-breaks":!0,"allow-variable":!0,"allow-font-size":n.showFontSizeButton,"allow-background-color":n.allowBackgroundColor,"allow-line-height":n.allowLineHeight,"variable-items":a.flattenedVariableItems,"hide-link-bubble-menu":!0,"auto-focus":n.autoFocus,editable:n.editable,"input-aria-label":n.inputAriaLabel,"input-class":`d-recipe-editor__content-input ${n.inputClass}`,link:!0,"output-format":a.htmlOutputFormat,placeholder:n.placeholder,"preserve-whitespace":n.preserveWhitespace,"use-div-tags":n.useDivTags,"allow-tables":n.allowTables,"allow-image-resize":n.allowImageResize,"data-qa":`dt-rich-text-editor`},a.removeClassStyleAttrs(e.$attrs),{onTextInput:a.onTextInput,onBlur:a.onBlur,onFocus:a.onFocus,onInput:t[6]||(t[6]=e=>a.onInput(e)),onSelected:a.onSelected}),null,16,[`modelValue`,`allow-font-size`,`allow-background-color`,`allow-line-height`,`variable-items`,`auto-focus`,`editable`,`input-aria-label`,`input-class`,`output-format`,`placeholder`,`preserve-whitespace`,`use-div-tags`,`allow-tables`,`allow-image-resize`,`onTextInput`,`onBlur`,`onFocus`,`onSelected`])],6)],16)}var C=t.t(b,[[`render`,S]]);exports.default=C;
2
2
  //# sourceMappingURL=editor.cjs.map
@@ -10,7 +10,7 @@ import l from "../popover/popover.js";
10
10
  import u from "../dropdown/dropdown-separator.js";
11
11
  import d from "../input/input.js";
12
12
  import f from "../list-item-group/list-item-group.js";
13
- import { t as p } from "../../rich_text_editor-CtCGNkSD.js";
13
+ import { t as p } from "../../rich_text_editor-Ba67C4Uk.js";
14
14
  import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as m, RICH_TEXT_EDITOR_OUTPUT_FORMATS as h } from "../rich-text-editor/rich-text-editor-constants.js";
15
15
  import { EDITOR_DEFAULT_FONT_COLOR as g, EDITOR_DEFAULT_LINK_PREFIX as _, EDITOR_SUPPORTED_LINK_PROTOCOLS as v } from "./editor-constants.js";
16
16
  import y from "./EditorToolbarButton.js";
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../message_input-VmltTreF.cjs`);exports.DtRecipeMessageInput=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../message_input-AWgvtwMV.cjs`);exports.DtRecipeMessageInput=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../message_input-tVB6JYJm.js";
1
+ import { t as e } from "../../message_input-CHlTsBGK.js";
2
2
  export { e as DtRecipeMessageInput };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../message_input-VmltTreF.cjs`);exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../message_input-AWgvtwMV.cjs`);exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../message_input-tVB6JYJm.js";
1
+ import { t as e } from "../../message_input-CHlTsBGK.js";
2
2
  export { e as default };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../resizable_utils-DhuzXRdP.cjs`),t=require(`../../resizable-aOVGO_Os.cjs`),n=require(`../../resizable_handle-RIKS8frB.cjs`),r=require(`./resizable-panel.cjs`);exports.DEFAULT_PANEL_SIZE=e.l,exports.DtResizable=t.t,exports.DtResizableHandle=n.t,exports.DtResizablePanel=r.default,exports.MIN_PANEL_SIZE_PX=e.u,exports.RESIZABLE_CONTEXT_KEY=e.d,exports.buildHandleId=e.f,exports.hasPercentageMinSize=e.t,exports.invalidateTokenCache=e.n,exports.isCSSValue=e.r,exports.isPercentageValue=e.i,exports.isValidSizing=e.a,exports.parseSizeToPixels=e.o,exports.pixelsToPercentage=e.s,exports.validateContainerSize=e.c;
@@ -0,0 +1,5 @@
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../../resizable_utils-BComtrMV.js";
2
+ import { t as f } from "../../resizable-D4-peBOl.js";
3
+ import { t as p } from "../../resizable_handle-BlKBiWnx.js";
4
+ import m from "./resizable-panel.js";
5
+ export { a as DEFAULT_PANEL_SIZE, f as DtResizable, p as DtResizableHandle, m as DtResizablePanel, d as MIN_PANEL_SIZE_PX, n as RESIZABLE_CONTEXT_KEY, r as buildHandleId, u as hasPercentageMinSize, o as invalidateTokenCache, c as isCSSValue, i as isPercentageValue, e as isValidSizing, s as parseSizeToPixels, l as pixelsToPercentage, t as validateContainerSize };
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../resizable_handle-RIKS8frB.cjs`);exports.default=e.t;
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../../resizable_handle-BlKBiWnx.js";
2
+ export { e as default };
@@ -0,0 +1,2 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../resizable_utils-DhuzXRdP.cjs`);let t=require(`vue`);var n=[`id`,`data-panel-id`],r={__name:`resizable_panel`,props:{id:{type:String,required:!0},initialSize:{type:String,default:void 0},userMinSize:{type:String,default:void 0},userMaxSize:{type:String,default:void 0},systemMinSize:{type:String,default:void 0},systemMaxSize:{type:String,default:void 0},collapseSize:{type:String,default:void 0},resizable:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!1},class:{type:[String,Object,Array],default:``}},setup(r){let i=r,a=[`initialSize`,`userMinSize`,`userMaxSize`,`systemMinSize`,`systemMaxSize`,`collapseSize`];(0,t.watch)(()=>a.map(e=>i[e]),t=>t.forEach((t,n)=>{t!==void 0&&!e.a(t)&&console.error(`[DtResizablePanel] Invalid ${a[n]}: "${t}".`)}),{immediate:!0});let o=(0,t.inject)(e.d,null),s=o?.layout??(0,t.computed)(()=>({panels:new Map,handles:[]})),c=o?.isResizing??(0,t.computed)(()=>!1),l=o?.offsetContentStyles??(0,t.computed)(()=>({})),u=o?.registerPanel??null,d=o?.unregisterPanel??null,f=(0,t.computed)(()=>({id:i.id,initialSize:i.initialSize,userMinSize:i.userMinSize,userMaxSize:i.userMaxSize,systemMinSize:i.systemMinSize,systemMaxSize:i.systemMaxSize,collapseSize:i.collapseSize,resizable:i.resizable??!0,collapsible:i.collapsible??!1,collapsed:i.collapsed??!1}));(0,t.onMounted)(()=>{u&&u(f.value)}),(0,t.onUnmounted)(()=>{d&&d(i.id)}),(0,t.watch)(f,()=>{u&&u(f.value)},{deep:!0});let p=o?.collapsePanel??null,m=o?.isInitializing??(0,t.computed)(()=>!1);(0,t.watch)(()=>i.collapsed,e=>{m.value||p&&e!==void 0&&p(i.id,e)},{immediate:!0});let h=o?.panelMap??(0,t.computed)(()=>new Map),g=(0,t.computed)(()=>h.value.get(i.id)),_=(0,t.computed)(()=>{let e=s.value.panels.get(i.id);return e?e.collapsed?{insetInlineStart:`${e.left}px`,inlineSize:`0px`,overflow:`hidden`,pointerEvents:`none`}:{insetInlineStart:`${e.left}px`,insetInlineEnd:`${e.right}px`}:{insetInlineStart:`0px`,inlineSize:`0px`,pointerEvents:`none`}});return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{id:`dt-resizable-panel-${i.id}`,class:(0,t.normalizeClass)([`d-resizable-panel`,[i.class,{"d-resizable-panel--collapsed":g.value&&g.value.collapsed===!0,"d-resizable-panel--fixed":g.value&&g.value.resizable===!1}]]),style:(0,t.normalizeStyle)(_.value),"data-panel-id":i.id,"data-qa":`d-resizable-panel`},[(0,t.createElementVNode)(`div`,{class:`d-resizable-panel__content`,style:(0,t.normalizeStyle)((0,t.unref)(l))},[(0,t.renderSlot)(e.$slots,`default`,{panel:g.value,isCollapsed:g.value?.collapsed,isResizing:(0,t.unref)(c)})],4)],14,n))}};exports.default=r;
2
+ //# sourceMappingURL=resizable-panel.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizable-panel.cjs","names":[],"sources":["../../../components/resizable/resizable_panel.vue"],"sourcesContent":["<template>\n <div\n :id=\"`dt-resizable-panel-${props.id}`\"\n class=\"d-resizable-panel\"\n :class=\"[\n props.class,\n {\n 'd-resizable-panel--collapsed': panel && panel.collapsed === true,\n 'd-resizable-panel--fixed': panel && panel.resizable === false,\n },\n ]\"\n :style=\"panelStyles\"\n :data-panel-id=\"props.id\"\n data-qa=\"d-resizable-panel\"\n >\n <div\n class=\"d-resizable-panel__content\"\n :style=\"offsetContentStyles\"\n >\n <!-- @slot Panel content. Provides panel state and collapsed/resizing flags. -->\n <slot\n :panel=\"panel\"\n :is-collapsed=\"panel?.collapsed\"\n :is-resizing=\"isResizing\"\n />\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed, inject, onMounted, onUnmounted, watch } from 'vue';\nimport { RESIZABLE_CONTEXT_KEY } from './resizable_constants';\nimport { isValidSizing } from './resizable_utils';\n\nconst props = defineProps({\n /** Unique panel identifier. Must be unique within its DtResizable parent. */\n id: { type: String, required: true },\n /** Initial size as a percentage token (e.g., '25p' for 25%) or Dialtone size token. */\n initialSize: { type: String, default: undefined },\n /** Minimum size for user drag interactions (hard floor). */\n userMinSize: { type: String, default: undefined },\n /** Maximum size for user drag interactions (hard ceiling). */\n userMaxSize: { type: String, default: undefined },\n /** Minimum size for system viewport scaling. Falls back to userMinSize. */\n systemMinSize: { type: String, default: undefined },\n /** Maximum size for system viewport scaling. Falls back to userMaxSize. */\n systemMaxSize: { type: String, default: undefined },\n /** Container width threshold that triggers auto-collapse. */\n collapseSize: { type: String, default: undefined },\n /** Whether this panel can be resized by dragging. */\n resizable: { type: Boolean, default: true },\n /** Whether this panel can be collapsed to zero width. */\n collapsible: { type: Boolean, default: false },\n /** Initial collapsed state. */\n collapsed: { type: Boolean, default: false },\n /** Additional CSS classes applied to the panel element. */\n class: { type: [String, Object, Array], default: '' },\n});\n\nconst SIZE_PROPS = ['initialSize', 'userMinSize', 'userMaxSize', 'systemMinSize', 'systemMaxSize', 'collapseSize'];\nwatch(\n () => SIZE_PROPS.map(n => props[n]),\n vals => vals.forEach((v, i) => {\n if (v !== undefined && !isValidSizing(v)) {\n console.error(`[DtResizablePanel] Invalid ${SIZE_PROPS[i]}: \"${v}\".`);\n }\n }),\n { immediate: true },\n);\n\nconst ctx = inject(RESIZABLE_CONTEXT_KEY, null);\nconst layoutRef = ctx?.layout ?? computed(() => ({ panels: new Map(), handles: [] }));\nconst isResizing = ctx?.isResizing ?? computed(() => false);\nconst offsetContentStyles = ctx?.offsetContentStyles ?? computed(() => ({}));\n\nconst registerPanel = ctx?.registerPanel ?? null;\nconst unregisterPanel = ctx?.unregisterPanel ?? null;\n\nconst panelConfig = computed(() => ({\n id: props.id,\n initialSize: props.initialSize,\n userMinSize: props.userMinSize,\n userMaxSize: props.userMaxSize,\n systemMinSize: props.systemMinSize,\n systemMaxSize: props.systemMaxSize,\n collapseSize: props.collapseSize,\n resizable: props.resizable ?? true,\n collapsible: props.collapsible ?? false,\n collapsed: props.collapsed ?? false,\n}));\n\nonMounted(() => {\n if (registerPanel) {\n registerPanel(panelConfig.value);\n }\n});\n\nonUnmounted(() => {\n if (unregisterPanel) {\n unregisterPanel(props.id);\n }\n});\n\n// Re-register on config change (watch each config field explicitly)\nwatch(panelConfig, () => {\n if (registerPanel) registerPanel(panelConfig.value);\n}, { deep: true });\n\nconst collapsePanel = ctx?.collapsePanel ?? null;\nconst isInitializing = ctx?.isInitializing ?? computed(() => false);\n\nwatch(\n () => props.collapsed,\n newCollapsed => {\n if (isInitializing.value) return;\n if (collapsePanel && newCollapsed !== undefined) {\n collapsePanel(props.id, newCollapsed);\n }\n },\n { immediate: true },\n);\n\nconst panelMap = ctx?.panelMap ?? computed(() => new Map());\nconst panel = computed(() => panelMap.value.get(props.id));\n\nconst panelStyles = computed(() => {\n const position = layoutRef.value.panels.get(props.id);\n\n if (!position) {\n return { insetInlineStart: '0px', inlineSize: '0px', pointerEvents: 'none' };\n }\n\n if (position.collapsed) {\n return {\n insetInlineStart: `${position.left}px`,\n inlineSize: '0px',\n overflow: 'hidden',\n pointerEvents: 'none',\n };\n }\n\n return {\n insetInlineStart: `${position.left}px`,\n insetInlineEnd: `${position.right}px`,\n };\n});\n</script>\n"],"mappings":"4sBAkCA,IAAM,EAAQ,EAyBR,EAAa,CAAC,cAAe,cAAe,cAAe,gBAAiB,gBAAiB,eAAe,EAClH,EAAA,EAAA,WACQ,EAAW,IAAI,GAAK,EAAM,GAAG,CACnC,GAAQ,EAAK,SAAS,EAAG,IAAM,CACzB,IAAM,IAAA,IAAa,CAAC,EAAA,EAAc,EAAE,EACtC,QAAQ,MAAM,8BAA8B,EAAW,GAAG,KAAK,EAAE,IAAI,EAEvE,CACF,CAAE,UAAW,GAAM,CACpB,CAED,IAAM,GAAA,EAAA,EAAA,QAAa,EAAA,EAAuB,KAAK,CACzC,EAAY,GAAK,SAAA,EAAA,EAAA,eAA0B,CAAE,OAAQ,IAAI,IAAO,QAAS,EAAE,CAAE,EAAE,CAC/E,EAAa,GAAK,aAAA,EAAA,EAAA,cAA6B,GAAM,CACrD,EAAsB,GAAK,sBAAA,EAAA,EAAA,eAAuC,EAAE,EAAE,CAEtE,EAAgB,GAAK,eAAiB,KACtC,EAAkB,GAAK,iBAAmB,KAE1C,GAAA,EAAA,EAAA,eAA8B,CAClC,GAAI,EAAM,GACV,YAAa,EAAM,YACnB,YAAa,EAAM,YACnB,YAAa,EAAM,YACnB,cAAe,EAAM,cACrB,cAAe,EAAM,cACrB,aAAc,EAAM,aACpB,UAAW,EAAM,WAAa,GAC9B,YAAa,EAAM,aAAe,GAClC,UAAW,EAAM,WAAa,GAC/B,EAAE,EAEH,EAAA,EAAA,eAAgB,CACV,GACF,EAAc,EAAY,MAAM,EAElC,EAEF,EAAA,EAAA,iBAAkB,CACZ,GACF,EAAgB,EAAM,GAAG,EAE3B,EAGF,EAAA,EAAA,OAAM,MAAmB,CACnB,GAAe,EAAc,EAAY,MAAM,EAClD,CAAE,KAAM,GAAM,CAAC,CAElB,IAAM,EAAgB,GAAK,eAAiB,KACtC,EAAiB,GAAK,iBAAA,EAAA,EAAA,cAAiC,GAAM,EAEnE,EAAA,EAAA,WACQ,EAAM,UACZ,GAAgB,CACV,EAAe,OACf,GAAiB,IAAiB,IAAA,IACpC,EAAc,EAAM,GAAI,EAAa,EAGzC,CAAE,UAAW,GAAM,CACpB,CAED,IAAM,EAAW,GAAK,WAAA,EAAA,EAAA,cAA2B,IAAI,IAAM,CACrD,GAAA,EAAA,EAAA,cAAuB,EAAS,MAAM,IAAI,EAAM,GAAG,CAAC,CAEpD,GAAA,EAAA,EAAA,cAA6B,CACjC,IAAM,EAAW,EAAU,MAAM,OAAO,IAAI,EAAM,GAAG,CAerD,OAbK,EAID,EAAS,UACJ,CACL,iBAAkB,GAAG,EAAS,KAAK,IACnC,WAAY,MACZ,SAAU,SACV,cAAe,OAChB,CAGI,CACL,iBAAkB,GAAG,EAAS,KAAK,IACnC,eAAgB,GAAG,EAAS,MAAM,IACnC,CAfQ,CAAE,iBAAkB,MAAO,WAAY,MAAO,cAAe,OAAQ,EAgB9E,0DAvHM,MAAA,CAxBH,GAAE,sBAAwB,EAAM,KACjC,OAAA,EAAA,EAAA,gBAAK,CAAC,oBAAmB,CACT,EAAM,MAAA,gCAAuD,EAAA,OAAS,EAAA,MAAM,YAAS,8BAA+C,EAAA,OAAS,EAAA,MAAM,YAAS,OAO3K,OAAA,EAAA,EAAA,gBAAO,EAAA,MAAW,CAClB,gBAAe,EAAM,GACtB,UAAQ,+CAYF,MAAA,CATJ,MAAM,6BACL,OAAA,EAAA,EAAA,iBAAA,EAAA,EAAA,OAAO,EAAmB,CAAA,oBAOzB,EAAA,OAAA,UAAA,CAHC,MAAO,EAAA,MACP,YAAc,EAAA,OAAO,UACrB,YAAA,EAAA,EAAA,OAAa,EAAU"}
@@ -0,0 +1,132 @@
1
+ import { a as e, d as t } from "../../resizable_utils-BComtrMV.js";
2
+ import { computed as n, createElementBlock as r, createElementVNode as i, inject as a, normalizeClass as o, normalizeStyle as s, onMounted as c, onUnmounted as l, openBlock as u, renderSlot as d, unref as f, watch as p } from "vue";
3
+ //#region components/resizable/resizable_panel.vue
4
+ var m = ["id", "data-panel-id"], h = {
5
+ __name: "resizable_panel",
6
+ props: {
7
+ id: {
8
+ type: String,
9
+ required: !0
10
+ },
11
+ initialSize: {
12
+ type: String,
13
+ default: void 0
14
+ },
15
+ userMinSize: {
16
+ type: String,
17
+ default: void 0
18
+ },
19
+ userMaxSize: {
20
+ type: String,
21
+ default: void 0
22
+ },
23
+ systemMinSize: {
24
+ type: String,
25
+ default: void 0
26
+ },
27
+ systemMaxSize: {
28
+ type: String,
29
+ default: void 0
30
+ },
31
+ collapseSize: {
32
+ type: String,
33
+ default: void 0
34
+ },
35
+ resizable: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ collapsible: {
40
+ type: Boolean,
41
+ default: !1
42
+ },
43
+ collapsed: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ class: {
48
+ type: [
49
+ String,
50
+ Object,
51
+ Array
52
+ ],
53
+ default: ""
54
+ }
55
+ },
56
+ setup(h) {
57
+ let g = h, _ = [
58
+ "initialSize",
59
+ "userMinSize",
60
+ "userMaxSize",
61
+ "systemMinSize",
62
+ "systemMaxSize",
63
+ "collapseSize"
64
+ ];
65
+ p(() => _.map((e) => g[e]), (t) => t.forEach((t, n) => {
66
+ t !== void 0 && !e(t) && console.error(`[DtResizablePanel] Invalid ${_[n]}: "${t}".`);
67
+ }), { immediate: !0 });
68
+ let v = a(t, null), y = v?.layout ?? n(() => ({
69
+ panels: /* @__PURE__ */ new Map(),
70
+ handles: []
71
+ })), b = v?.isResizing ?? n(() => !1), x = v?.offsetContentStyles ?? n(() => ({})), S = v?.registerPanel ?? null, C = v?.unregisterPanel ?? null, w = n(() => ({
72
+ id: g.id,
73
+ initialSize: g.initialSize,
74
+ userMinSize: g.userMinSize,
75
+ userMaxSize: g.userMaxSize,
76
+ systemMinSize: g.systemMinSize,
77
+ systemMaxSize: g.systemMaxSize,
78
+ collapseSize: g.collapseSize,
79
+ resizable: g.resizable ?? !0,
80
+ collapsible: g.collapsible ?? !1,
81
+ collapsed: g.collapsed ?? !1
82
+ }));
83
+ c(() => {
84
+ S && S(w.value);
85
+ }), l(() => {
86
+ C && C(g.id);
87
+ }), p(w, () => {
88
+ S && S(w.value);
89
+ }, { deep: !0 });
90
+ let T = v?.collapsePanel ?? null, E = v?.isInitializing ?? n(() => !1);
91
+ p(() => g.collapsed, (e) => {
92
+ E.value || T && e !== void 0 && T(g.id, e);
93
+ }, { immediate: !0 });
94
+ let D = v?.panelMap ?? n(() => /* @__PURE__ */ new Map()), O = n(() => D.value.get(g.id)), k = n(() => {
95
+ let e = y.value.panels.get(g.id);
96
+ return e ? e.collapsed ? {
97
+ insetInlineStart: `${e.left}px`,
98
+ inlineSize: "0px",
99
+ overflow: "hidden",
100
+ pointerEvents: "none"
101
+ } : {
102
+ insetInlineStart: `${e.left}px`,
103
+ insetInlineEnd: `${e.right}px`
104
+ } : {
105
+ insetInlineStart: "0px",
106
+ inlineSize: "0px",
107
+ pointerEvents: "none"
108
+ };
109
+ });
110
+ return (e, t) => (u(), r("div", {
111
+ id: `dt-resizable-panel-${g.id}`,
112
+ class: o(["d-resizable-panel", [g.class, {
113
+ "d-resizable-panel--collapsed": O.value && O.value.collapsed === !0,
114
+ "d-resizable-panel--fixed": O.value && O.value.resizable === !1
115
+ }]]),
116
+ style: s(k.value),
117
+ "data-panel-id": g.id,
118
+ "data-qa": "d-resizable-panel"
119
+ }, [i("div", {
120
+ class: "d-resizable-panel__content",
121
+ style: s(f(x))
122
+ }, [d(e.$slots, "default", {
123
+ panel: O.value,
124
+ isCollapsed: O.value?.collapsed,
125
+ isResizing: f(b)
126
+ })], 4)], 14, m));
127
+ }
128
+ };
129
+ //#endregion
130
+ export { h as default };
131
+
132
+ //# sourceMappingURL=resizable-panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizable-panel.js","names":[],"sources":["../../../components/resizable/resizable_panel.vue"],"sourcesContent":["<template>\n <div\n :id=\"`dt-resizable-panel-${props.id}`\"\n class=\"d-resizable-panel\"\n :class=\"[\n props.class,\n {\n 'd-resizable-panel--collapsed': panel && panel.collapsed === true,\n 'd-resizable-panel--fixed': panel && panel.resizable === false,\n },\n ]\"\n :style=\"panelStyles\"\n :data-panel-id=\"props.id\"\n data-qa=\"d-resizable-panel\"\n >\n <div\n class=\"d-resizable-panel__content\"\n :style=\"offsetContentStyles\"\n >\n <!-- @slot Panel content. Provides panel state and collapsed/resizing flags. -->\n <slot\n :panel=\"panel\"\n :is-collapsed=\"panel?.collapsed\"\n :is-resizing=\"isResizing\"\n />\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed, inject, onMounted, onUnmounted, watch } from 'vue';\nimport { RESIZABLE_CONTEXT_KEY } from './resizable_constants';\nimport { isValidSizing } from './resizable_utils';\n\nconst props = defineProps({\n /** Unique panel identifier. Must be unique within its DtResizable parent. */\n id: { type: String, required: true },\n /** Initial size as a percentage token (e.g., '25p' for 25%) or Dialtone size token. */\n initialSize: { type: String, default: undefined },\n /** Minimum size for user drag interactions (hard floor). */\n userMinSize: { type: String, default: undefined },\n /** Maximum size for user drag interactions (hard ceiling). */\n userMaxSize: { type: String, default: undefined },\n /** Minimum size for system viewport scaling. Falls back to userMinSize. */\n systemMinSize: { type: String, default: undefined },\n /** Maximum size for system viewport scaling. Falls back to userMaxSize. */\n systemMaxSize: { type: String, default: undefined },\n /** Container width threshold that triggers auto-collapse. */\n collapseSize: { type: String, default: undefined },\n /** Whether this panel can be resized by dragging. */\n resizable: { type: Boolean, default: true },\n /** Whether this panel can be collapsed to zero width. */\n collapsible: { type: Boolean, default: false },\n /** Initial collapsed state. */\n collapsed: { type: Boolean, default: false },\n /** Additional CSS classes applied to the panel element. */\n class: { type: [String, Object, Array], default: '' },\n});\n\nconst SIZE_PROPS = ['initialSize', 'userMinSize', 'userMaxSize', 'systemMinSize', 'systemMaxSize', 'collapseSize'];\nwatch(\n () => SIZE_PROPS.map(n => props[n]),\n vals => vals.forEach((v, i) => {\n if (v !== undefined && !isValidSizing(v)) {\n console.error(`[DtResizablePanel] Invalid ${SIZE_PROPS[i]}: \"${v}\".`);\n }\n }),\n { immediate: true },\n);\n\nconst ctx = inject(RESIZABLE_CONTEXT_KEY, null);\nconst layoutRef = ctx?.layout ?? computed(() => ({ panels: new Map(), handles: [] }));\nconst isResizing = ctx?.isResizing ?? computed(() => false);\nconst offsetContentStyles = ctx?.offsetContentStyles ?? computed(() => ({}));\n\nconst registerPanel = ctx?.registerPanel ?? null;\nconst unregisterPanel = ctx?.unregisterPanel ?? null;\n\nconst panelConfig = computed(() => ({\n id: props.id,\n initialSize: props.initialSize,\n userMinSize: props.userMinSize,\n userMaxSize: props.userMaxSize,\n systemMinSize: props.systemMinSize,\n systemMaxSize: props.systemMaxSize,\n collapseSize: props.collapseSize,\n resizable: props.resizable ?? true,\n collapsible: props.collapsible ?? false,\n collapsed: props.collapsed ?? false,\n}));\n\nonMounted(() => {\n if (registerPanel) {\n registerPanel(panelConfig.value);\n }\n});\n\nonUnmounted(() => {\n if (unregisterPanel) {\n unregisterPanel(props.id);\n }\n});\n\n// Re-register on config change (watch each config field explicitly)\nwatch(panelConfig, () => {\n if (registerPanel) registerPanel(panelConfig.value);\n}, { deep: true });\n\nconst collapsePanel = ctx?.collapsePanel ?? null;\nconst isInitializing = ctx?.isInitializing ?? computed(() => false);\n\nwatch(\n () => props.collapsed,\n newCollapsed => {\n if (isInitializing.value) return;\n if (collapsePanel && newCollapsed !== undefined) {\n collapsePanel(props.id, newCollapsed);\n }\n },\n { immediate: true },\n);\n\nconst panelMap = ctx?.panelMap ?? computed(() => new Map());\nconst panel = computed(() => panelMap.value.get(props.id));\n\nconst panelStyles = computed(() => {\n const position = layoutRef.value.panels.get(props.id);\n\n if (!position) {\n return { insetInlineStart: '0px', inlineSize: '0px', pointerEvents: 'none' };\n }\n\n if (position.collapsed) {\n return {\n insetInlineStart: `${position.left}px`,\n inlineSize: '0px',\n overflow: 'hidden',\n pointerEvents: 'none',\n };\n }\n\n return {\n insetInlineStart: `${position.left}px`,\n insetInlineEnd: `${position.right}px`,\n };\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCA,IAAM,IAAQ,GAyBR,IAAa;GAAC;GAAe;GAAe;GAAe;GAAiB;GAAiB;GAAe;AAClH,UACQ,EAAW,KAAI,MAAK,EAAM,GAAG,GACnC,MAAQ,EAAK,SAAS,GAAG,MAAM;AAC7B,GAAI,MAAM,KAAA,KAAa,CAAC,EAAc,EAAE,IACtC,QAAQ,MAAM,8BAA8B,EAAW,GAAG,KAAK,EAAE,IAAI;IAEvE,EACF,EAAE,WAAW,IAAM,CACpB;EAED,IAAM,IAAM,EAAO,GAAuB,KAAK,EACzC,IAAY,GAAK,UAAU,SAAgB;GAAE,wBAAQ,IAAI,KAAK;GAAE,SAAS,EAAE;GAAE,EAAE,EAC/E,IAAa,GAAK,cAAc,QAAe,GAAM,EACrD,IAAsB,GAAK,uBAAuB,SAAgB,EAAE,EAAE,EAEtE,IAAgB,GAAK,iBAAiB,MACtC,IAAkB,GAAK,mBAAmB,MAE1C,IAAc,SAAgB;GAClC,IAAI,EAAM;GACV,aAAa,EAAM;GACnB,aAAa,EAAM;GACnB,aAAa,EAAM;GACnB,eAAe,EAAM;GACrB,eAAe,EAAM;GACrB,cAAc,EAAM;GACpB,WAAW,EAAM,aAAa;GAC9B,aAAa,EAAM,eAAe;GAClC,WAAW,EAAM,aAAa;GAC/B,EAAE;AAeH,EAbA,QAAgB;AACd,GAAI,KACF,EAAc,EAAY,MAAM;IAElC,EAEF,QAAkB;AAChB,GAAI,KACF,EAAgB,EAAM,GAAG;IAE3B,EAGF,EAAM,SAAmB;AACvB,GAAI,KAAe,EAAc,EAAY,MAAM;KAClD,EAAE,MAAM,IAAM,CAAC;EAElB,IAAM,IAAgB,GAAK,iBAAiB,MACtC,IAAiB,GAAK,kBAAkB,QAAe,GAAM;AAEnE,UACQ,EAAM,YACZ,MAAgB;AACV,KAAe,SACf,KAAiB,MAAiB,KAAA,KACpC,EAAc,EAAM,IAAI,EAAa;KAGzC,EAAE,WAAW,IAAM,CACpB;EAED,IAAM,IAAW,GAAK,YAAY,wBAAe,IAAI,KAAK,CAAC,EACrD,IAAQ,QAAe,EAAS,MAAM,IAAI,EAAM,GAAG,CAAC,EAEpD,IAAc,QAAe;GACjC,IAAM,IAAW,EAAU,MAAM,OAAO,IAAI,EAAM,GAAG;AAerD,UAbK,IAID,EAAS,YACJ;IACL,kBAAkB,GAAG,EAAS,KAAK;IACnC,YAAY;IACZ,UAAU;IACV,eAAe;IAChB,GAGI;IACL,kBAAkB,GAAG,EAAS,KAAK;IACnC,gBAAgB,GAAG,EAAS,MAAM;IACnC,GAfQ;IAAE,kBAAkB;IAAO,YAAY;IAAO,eAAe;IAAQ;IAgB9E;yBAhJA,EAyBM,OAAA;GAxBH,IAAE,sBAAwB,EAAM;GACjC,OAAK,EAAA,CAAC,qBAAmB,CACT,EAAM,OAAA;oCAAuD,EAAA,SAAS,EAAA,MAAM,cAAS;gCAA+C,EAAA,SAAS,EAAA,MAAM,cAAS;;GAO3K,OAAK,EAAE,EAAA,MAAW;GAClB,iBAAe,EAAM;GACtB,WAAQ;MAER,EAUM,OAAA;GATJ,OAAM;GACL,OAAK,EAAE,EAAA,EAAmB,CAAA;MAG3B,EAIE,EAAA,QAAA,WAAA;GAHC,OAAO,EAAA;GACP,aAAc,EAAA,OAAO;GACrB,YAAa,EAAA,EAAU"}
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../resizable-aOVGO_Os.cjs`);exports.default=e.t;
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../../resizable-D4-peBOl.js";
2
+ export { e as default };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../rich_text_editor-CEwKDuzw.cjs`),t=require(`./rich-text-editor-constants.cjs`);exports.DtRichTextEditor=e.t,exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=t.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=t.RICH_TEXT_EDITOR_OUTPUT_FORMATS;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../rich_text_editor-DMP5eTlf.cjs`),t=require(`./rich-text-editor-constants.cjs`);exports.DtRichTextEditor=e.t,exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=t.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=t.RICH_TEXT_EDITOR_OUTPUT_FORMATS;
@@ -1,3 +1,3 @@
1
- import { t as e } from "../../rich_text_editor-CtCGNkSD.js";
1
+ import { t as e } from "../../rich_text_editor-Ba67C4Uk.js";
2
2
  import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as t, RICH_TEXT_EDITOR_OUTPUT_FORMATS as n } from "./rich-text-editor-constants.js";
3
3
  export { e as DtRichTextEditor, t as RICH_TEXT_EDITOR_AUTOFOCUS_TYPES, n as RICH_TEXT_EDITOR_OUTPUT_FORMATS };
@@ -1,7 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-Bmb41Sf3.cjs`);let e=require(`@tiptap/static-renderer/pm/markdown`);var t=e=>Array.isArray(e)?e.join(``):e||``,n=(e,t,n)=>{let r=e.trim();return r?`${e.slice(0,e.length-e.trimStart().length)}${t}${r}${n}${e.slice(e.trimEnd().length)}`:e};function r(r,i){return(0,e.renderToMarkdown)({extensions:i,content:r,options:{nodeMapping:{blockquote({children:e}){return t(e).trim().split(`
2
- `).map(e=>e?`> ${e}`:`>`).join(`
3
- `)+`
4
- `},codeBlock({node:e,children:n}){return`\`\`\`${e.attrs?.language||``}\n${t(n)}\n\`\`\`\n`},mention({node:e}){return`<!-- @mention: {"id": "${e.attrs?.id||``}", "contactKey": "${e.attrs?.contactKey||``}", "name": "${e.attrs?.name||``}"} -->`},channel({node:e}){return`<!-- @channel: {"id": "${e.attrs?.id||``}", "channelKey": "${e.attrs?.channelKey||``}", "name": "${e.attrs?.name||``}", "locked": "${String(e.attrs?.locked??``)}"} -->`},"slash-commands"({node:e}){return`/${e.attrs?.command||``}`},emoji({node:e}){return e.attrs?.code||``},variable({node:e}){return`{{${e.attrs?.id||``}=${e.attrs?.altText||``}}}`}},markMapping:{bold({children:e}){return n(t(e),`**`,`**`)},italic({children:e}){return n(t(e),`*`,`*`)},strike({children:e}){return n(t(e),`~~`,`~~`)},code({children:e}){return n(t(e),"`","`")},link({mark:e,children:n}){let r=t(n),i=e.attrs?.href||``,a=r.trim();return`${r.slice(0,r.length-r.trimStart().length)}[${a}](${i})${r.slice(r.trimEnd().length)}`},underline({children:e}){return t(e)}}}}).replace(/\n{3,}/g,`
5
-
6
- `).replace(/^\n+|\n+$/g,``)}exports.renderEditorToMarkdown=r;
7
- //# sourceMappingURL=markdownRenderer.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../markdownRenderer-DCgGQseq.cjs`);exports.renderEditorToMarkdown=e.t;
@@ -1,62 +1,2 @@
1
- import { renderToMarkdown as e } from "@tiptap/static-renderer/pm/markdown";
2
- //#region components/rich_text_editor/markdownRenderer.js
3
- var t = (e) => Array.isArray(e) ? e.join("") : e || "", n = (e, t, n) => {
4
- let r = e.trim();
5
- return r ? `${e.slice(0, e.length - e.trimStart().length)}${t}${r}${n}${e.slice(e.trimEnd().length)}` : e;
6
- };
7
- function r(r, i) {
8
- return e({
9
- extensions: i,
10
- content: r,
11
- options: {
12
- nodeMapping: {
13
- blockquote({ children: e }) {
14
- return t(e).trim().split("\n").map((e) => e ? `> ${e}` : ">").join("\n") + "\n";
15
- },
16
- codeBlock({ node: e, children: n }) {
17
- return `\`\`\`${e.attrs?.language || ""}\n${t(n)}\n\`\`\`\n`;
18
- },
19
- mention({ node: e }) {
20
- return `<!-- @mention: {"id": "${e.attrs?.id || ""}", "contactKey": "${e.attrs?.contactKey || ""}", "name": "${e.attrs?.name || ""}"} -->`;
21
- },
22
- channel({ node: e }) {
23
- return `<!-- @channel: {"id": "${e.attrs?.id || ""}", "channelKey": "${e.attrs?.channelKey || ""}", "name": "${e.attrs?.name || ""}", "locked": "${String(e.attrs?.locked ?? "")}"} -->`;
24
- },
25
- "slash-commands"({ node: e }) {
26
- return `/${e.attrs?.command || ""}`;
27
- },
28
- emoji({ node: e }) {
29
- return e.attrs?.code || "";
30
- },
31
- variable({ node: e }) {
32
- return `{{${e.attrs?.id || ""}=${e.attrs?.altText || ""}}}`;
33
- }
34
- },
35
- markMapping: {
36
- bold({ children: e }) {
37
- return n(t(e), "**", "**");
38
- },
39
- italic({ children: e }) {
40
- return n(t(e), "*", "*");
41
- },
42
- strike({ children: e }) {
43
- return n(t(e), "~~", "~~");
44
- },
45
- code({ children: e }) {
46
- return n(t(e), "`", "`");
47
- },
48
- link({ mark: e, children: n }) {
49
- let r = t(n), i = e.attrs?.href || "", a = r.trim();
50
- return `${r.slice(0, r.length - r.trimStart().length)}[${a}](${i})${r.slice(r.trimEnd().length)}`;
51
- },
52
- underline({ children: e }) {
53
- return t(e);
54
- }
55
- }
56
- }
57
- }).replace(/\n{3,}/g, "\n\n").replace(/^\n+|\n+$/g, "");
58
- }
59
- //#endregion
60
- export { r as renderEditorToMarkdown };
61
-
62
- //# sourceMappingURL=markdownRenderer.js.map
1
+ import { t as e } from "../../markdownRenderer-D_P94RyM.js";
2
+ export { e as renderEditorToMarkdown };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../rich_text_editor-CEwKDuzw.cjs`);exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../rich_text_editor-DMP5eTlf.cjs`);exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../rich_text_editor-CtCGNkSD.js";
1
+ import { t as e } from "../../rich_text_editor-Ba67C4Uk.js";
2
2
  export { e as default };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../scroller-06ayn-64.cjs`);exports.DtScroller=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../scroller-CjAsgjl9.cjs`);exports.DtScroller=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../scroller-Ckquh-PU.js";
1
+ import { t as e } from "../../scroller-BGVDh3sq.js";
2
2
  export { e as DtScroller };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../scroller-06ayn-64.cjs`);exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../scroller-CjAsgjl9.cjs`);exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../scroller-Ckquh-PU.js";
1
+ import { t as e } from "../../scroller-BGVDh3sq.js";
2
2
  export { e as default };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./toast-constants.cjs`),t=require(`../../toast-0QfP90_3.cjs`);exports.DtToast=t.t,exports.TOAST_MIN_DURATION=e.TOAST_MIN_DURATION,exports.TOAST_ROLES=e.TOAST_ROLES;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./toast-constants.cjs`),t=require(`../../toast-d8_zmgkL.cjs`);exports.DtToast=t.t,exports.TOAST_MIN_DURATION=e.TOAST_MIN_DURATION,exports.TOAST_ROLES=e.TOAST_ROLES;
@@ -1,3 +1,3 @@
1
1
  import { TOAST_MIN_DURATION as e, TOAST_ROLES as t } from "./toast-constants.js";
2
- import { t as n } from "../../toast-B1zeUPtg.js";
2
+ import { t as n } from "../../toast-DvPN-bCi.js";
3
3
  export { n as DtToast, e as TOAST_MIN_DURATION, t as TOAST_ROLES };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../toast-0QfP90_3.cjs`);exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../toast-d8_zmgkL.cjs`);exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../toast-B1zeUPtg.js";
1
+ import { t as e } from "../../toast-DvPN-bCi.js";
2
2
  export { e as default };
@@ -0,0 +1,31 @@
1
+ require(`./chunk-Bmb41Sf3.cjs`);let e=require(`@tiptap/core`),t=require(`@tiptap/pm/model`);function n(t,n,r){let i=t.attrs;return i?n.filter(e=>e.type===(typeof t.type==`string`?t.type:t.type.name)?r?e.attribute.rendered:!0:!1).map(e=>e.attribute.renderHTML&&e.attribute.renderHTML(i)||{[e.name]:e.name in i?i[e.name]:e.attribute.default}).reduce((t,n)=>(0,e.mergeAttributes)(t,n),{}):{}}function r(e,t){return n(e,t,!0)}function i(t,n,i,a){let o=(0,e.getExtensionField)(n,`renderHTML`,{name:n.name,options:n.options,storage:n.storage,parent:n.parent});return o?[n.name,({node:e,children:a})=>{try{return t(o({node:e,HTMLAttributes:r(e,i)}))(a)}catch(e){throw Error(`[tiptap error]: Node ${n.name} cannot be rendered, it's "renderToHTML" method threw an error: ${e.message}`,{cause:e})}}]:a?.unhandledNode?[n.name,a.unhandledNode]:[n.name,()=>{throw Error(`[tiptap error]: Node ${n.name} cannot be rendered, it is missing a "renderToHTML" method, please implement it or override the corresponding "nodeMapping" method to have a custom rendering`)}]}function a(t,n,i,a){let o=(0,e.getExtensionField)(n,`renderHTML`,{name:n.name,options:n.options,storage:n.storage,parent:n.parent});return o?[n.name,({mark:e,children:a})=>{try{return t(o({mark:e,HTMLAttributes:r(e,i)}))(a)}catch(e){throw Error(`[tiptap error]: Mark ${n.name} cannot be rendered, it's "renderToHTML" method threw an error: ${e.message}`,{cause:e})}}]:a?.unhandledMark?[n.name,a.unhandledMark]:[n.name,()=>{throw Error(`Node ${n.name} cannot be rendered, it is missing a "renderToHTML" method`)}]}function o({renderer:n,domOutputSpecToElement:r,mapDefinedTypes:o,content:s,extensions:c,options:l}){c=(0,e.resolveExtensions)(c);let u=(0,e.getAttributesFromExtensions)(c),{nodeExtensions:d,markExtensions:f}=(0,e.splitExtensions)(c);return s instanceof t.Node||(s=t.Node.fromJSON((0,e.getSchemaByResolvedExtensions)(c),s)),n({...l,nodeMapping:{...Object.fromEntries(d.filter(e=>e.name in o?!1:l?.nodeMapping?!(e.name in l.nodeMapping):!0).map(e=>i(r,e,u,l))),...o,...l?.nodeMapping},markMapping:{...Object.fromEntries(f.filter(e=>l?.markMapping?!(e.name in l.markMapping):!0).map(e=>a(r,e,u,l))),...l?.markMapping}})({content:s})}function s(e,{nodeMapping:t,markMapping:n,unhandledNode:r,unhandledMark:i}){return function a({content:o,parent:s}){let c=typeof o.type==`string`?o.type:o.type.name,l=t[c]??r;if(!l)throw Error(`missing handler for node type ${c}`);let u=e({component:l,props:{node:o,parent:s,renderElement:a,get children(){let e=[];return o.content&&o.content.forEach(t=>{e.push(a({content:t,parent:o}))}),e}}});return o.marks?o.marks.reduce((t,r)=>{let a=typeof r.type==`string`?r.type:r.type.name,c=n[a]??i;if(!c)throw Error(`missing handler for mark type ${a}`);return e({component:c,props:{mark:r,parent:s,node:o,children:t}})},u):u}}function c(e){return s(e=>e.component(e.props),e)}function l(e){let t=Object.entries(e||{}).map(([e,t])=>`${e.split(` `).at(-1)}=${JSON.stringify(t)}`).join(` `);return t?` ${t}`:``}function u(e){return[].concat(e||``).filter(Boolean).join(``)}var d=new Set([`iframe`,`script`,`style`,`title`,`textarea`,`div`,`span`,`a`,`button`]);function f(e){if(typeof e==`string`)return()=>e;if(typeof e==`object`&&`length`in e){let[t,n,r,...i]=e,a=t,o=a.split(` `);if(o.length>1&&(a=`${o[1]} xmlns="${o[0]}"`),n===void 0)return()=>`<${a}/>`;if(n===0)return e=>`<${a}>${u(e)}</${a}>`;if(typeof n==`object`)return Array.isArray(n)?r===void 0||r===0?e=>`<${a}>${f(n)(e)}</${a}>`:e=>`<${a}>${f(n)(e)}${[r].concat(i).map(t=>f(t)(e))}</${a}>`:r===void 0?d.has(a)?()=>`<${a}${l(n)}></${a}>`:()=>`<${a}${l(n)}/>`:r===0?e=>`<${a}${l(n)}>${u(e)}</${a}>`:e=>`<${a}${l(n)}>${[r].concat(i).map(t=>f(t)(e)).join(``)}</${a}>`}throw Error("[tiptap error]: Unsupported DomOutputSpec type, check the `renderHTML` method output or implement a node mapping",{cause:e})}function p({content:e,extensions:t,options:n}){return o({renderer:c,domOutputSpecToElement:f,mapDefinedTypes:{doc:({children:e})=>u(e),text:({node:e})=>e.text??``},content:e,extensions:t,options:n})}function m({content:e,extensions:t,options:n}){return p({content:e,extensions:t,options:{...n,nodeMapping:{bulletList({children:e}){return`
2
+ ${u(e)}`},orderedList({children:e}){return`
3
+ ${u(e)}`},listItem({node:e,children:t,parent:n}){if(n?.type.name===`bulletList`)return`- ${u(t).trim()}
4
+ `;if(n?.type.name===`orderedList`){let r=n.attrs.start||1;return n.forEach((t,n,i)=>{e===t&&(r=i+1)}),`${r}. ${u(t).trim()}
5
+ `}return u(t)},paragraph({children:e}){return`
6
+ ${u(e)}
7
+ `},heading({node:e,children:t}){let n=e.attrs.level;return`${Array(n).fill(`#`).join(``)} ${t}
8
+ `},codeBlock({node:e,children:t}){return`
9
+ \`\`\`${e.attrs.language}
10
+ ${u(t)}
11
+ \`\`\`
12
+ `},blockquote({children:e}){return`
13
+ ${u(e).trim().split(`
14
+ `).map(e=>`> ${e}`).join(`
15
+ `)}`},image({node:e}){return`![${e.attrs.alt}](${e.attrs.src})`},hardBreak(){return`
16
+ `},horizontalRule(){return`
17
+ ---
18
+ `},table({children:e,node:t}){if(!Array.isArray(e))return`
19
+ ${u(e)}
20
+ `;let n=t.children[0].childCount;return`
21
+ ${u(e[0])}| ${Array(n).fill(`---`).join(` | `)} |
22
+ ${u(e.slice(1))}
23
+ `},tableRow({children:e}){return Array.isArray(e)?`| ${e.join(` | `)} |
24
+ `:`${u(e)}
25
+ `},tableHeader({children:e}){return u(e).trim()},tableCell({children:e}){return u(e).trim()},...n?.nodeMapping},markMapping:{bold({children:e}){return`**${u(e)}**`},italic({children:e,node:t}){let n=!1;return t?.marks.some(e=>e.type.name===`bold`)&&(n=!0),n?`*${u(e)}*`:`_${u(e)}_`},code({children:e}){return`\`${u(e)}\``},strike({children:e}){return`~~${u(e)}~~`},underline({children:e}){return`<u>${u(e)}</u>`},subscript({children:e}){return`<sub>${u(e)}</sub>`},superscript({children:e}){return`<sup>${u(e)}</sup>`},link({mark:e,children:t}){return`[${u(t)}](${e.attrs.href})`},highlight({children:e}){return`==${u(e)}==`},...n?.markMapping}}})}var h=e=>Array.isArray(e)?e.join(``):e||``,g=(e,t,n)=>{let r=e.trim();return r?`${e.slice(0,e.length-e.trimStart().length)}${t}${r}${n}${e.slice(e.trimEnd().length)}`:e};function _(e,t){return m({extensions:t,content:e,options:{nodeMapping:{blockquote({children:e}){return h(e).trim().split(`
26
+ `).map(e=>e?`> ${e}`:`>`).join(`
27
+ `)+`
28
+ `},codeBlock({node:e,children:t}){return`\`\`\`${e.attrs?.language||``}\n${h(t)}\n\`\`\`\n`},mention({node:e}){return`<!-- @mention: {"id": "${e.attrs?.id||``}", "contactKey": "${e.attrs?.contactKey||``}", "name": "${e.attrs?.name||``}"} -->`},channel({node:e}){return`<!-- @channel: {"id": "${e.attrs?.id||``}", "channelKey": "${e.attrs?.channelKey||``}", "name": "${e.attrs?.name||``}", "locked": "${String(e.attrs?.locked??``)}"} -->`},"slash-commands"({node:e}){return`/${e.attrs?.command||``}`},emoji({node:e}){return e.attrs?.code||``},variable({node:e}){return`{{${e.attrs?.id||``}=${e.attrs?.altText||``}}}`}},markMapping:{bold({children:e}){return g(h(e),`**`,`**`)},italic({children:e}){return g(h(e),`*`,`*`)},strike({children:e}){return g(h(e),`~~`,`~~`)},code({children:e}){return g(h(e),"`","`")},link({mark:e,children:t}){let n=h(t),r=e.attrs?.href||``,i=n.trim();return`${n.slice(0,n.length-n.trimStart().length)}[${i}](${r})${n.slice(n.trimEnd().length)}`},underline({children:e}){return h(e)}}}}).replace(/\n{3,}/g,`
29
+
30
+ `).replace(/^\n+|\n+$/g,``)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _}});
31
+ //# sourceMappingURL=markdownRenderer-DCgGQseq.cjs.map