@dialpad/dialtone 9.156.1 → 9.158.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/dialtone-default-theme.css +7 -0
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +7 -0
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/doc.json +76215 -76215
- package/dist/vue3/common/dates/index.js +4 -4
- package/dist/vue3/common/utils/index.js +3 -3
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +349 -349
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +1 -1
- package/dist/vue3/lib/avatar/avatar.js +10 -10
- package/dist/vue3/lib/badge/badge.js +5 -5
- package/dist/vue3/lib/banner/banner.js +1 -1
- package/dist/vue3/lib/breadcrumbs/breadcrumb-item.js +2 -2
- package/dist/vue3/lib/breadcrumbs/breadcrumbs.js +1 -1
- package/dist/vue3/lib/button/button.js +14 -14
- package/dist/vue3/lib/button-group/button-group.js +2 -2
- package/dist/vue3/lib/button-group/buttons-decorator.js +2 -2
- package/dist/vue3/lib/callbar-button/callbar-button.js +2 -2
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +9 -9
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
- package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js +9 -9
- package/dist/vue3/lib/callbox/callbox.js +1 -1
- package/dist/vue3/lib/card/card.js +4 -4
- package/dist/vue3/lib/checkbox/checkbox.js +5 -5
- package/dist/vue3/lib/checkbox-group/checkboxes-decorator.js +1 -1
- package/dist/vue3/lib/chip/chip.js +7 -7
- package/dist/vue3/lib/codeblock/codeblock.js +2 -2
- package/dist/vue3/lib/collapsible/collapsible-lazy-show.js +3 -3
- package/dist/vue3/lib/collapsible/collapsible.js +8 -8
- package/dist/vue3/lib/combobox/combobox-empty-list.js +2 -2
- package/dist/vue3/lib/combobox/combobox-loading-list.js +3 -3
- package/dist/vue3/lib/combobox/combobox.cjs +1 -1
- package/dist/vue3/lib/combobox/combobox.js +8 -8
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +1 -1
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
- package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js +10 -10
- package/dist/vue3/lib/contact-centers-row/contact-centers-row.js +7 -7
- package/dist/vue3/lib/contact-info/contact-info.js +1 -1
- package/dist/vue3/lib/contact-row/contact-row.js +1 -1
- package/dist/vue3/lib/datepicker/datepicker.js +1 -1
- package/dist/vue3/lib/datepicker/utils.js +4 -4
- package/dist/vue3/lib/description-list/description-list.js +3 -3
- package/dist/vue3/lib/dropdown/dropdown-list.js +4 -4
- package/dist/vue3/lib/dropdown/dropdown-separator.js +2 -2
- package/dist/vue3/lib/dropdown/dropdown.js +2 -2
- package/dist/vue3/lib/editor/editor.cjs +1 -1
- package/dist/vue3/lib/editor/editor.cjs.map +1 -1
- package/dist/vue3/lib/editor/editor.js +59 -51
- package/dist/vue3/lib/editor/editor.js.map +1 -1
- package/dist/vue3/lib/emoji/emoji.js +2 -2
- package/dist/vue3/lib/emoji-picker/emoji-picker.js +1 -1
- package/dist/vue3/lib/emoji-row/emoji-row.js +6 -6
- package/dist/vue3/lib/empty-state/empty-state.js +7 -7
- package/dist/vue3/lib/feed-item-pill/feed-item-pill.js +1 -1
- package/dist/vue3/lib/feed-item-row/feed-item-row.js +15 -15
- package/dist/vue3/lib/general-row/general-row.js +13 -13
- package/dist/vue3/lib/general-row/leftbar-general-row-icon.js +5 -5
- package/dist/vue3/lib/group-row/group-row.js +2 -2
- package/dist/vue3/lib/grouped-chip/grouped-chip.js +14 -14
- package/dist/vue3/lib/hovercard/hovercard.js +2 -2
- package/dist/vue3/lib/icon/icon.js +3 -3
- package/dist/vue3/lib/illustration/illustration.js +3 -3
- package/dist/vue3/lib/image-viewer/image-viewer.js +12 -12
- package/dist/vue3/lib/input/input.js +10 -10
- package/dist/vue3/lib/input-group/input-group.js +8 -8
- package/dist/vue3/lib/item-layout/item-layout.js +13 -13
- package/dist/vue3/lib/ivr-node/ivr-node.js +9 -9
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut.js +3 -3
- package/dist/vue3/lib/lazy-show/lazy-show.js +2 -2
- package/dist/vue3/lib/link/link.js +2 -2
- package/dist/vue3/lib/list-item/list-item.js +3 -3
- package/dist/vue3/lib/list-item-group/list-item-group.js +5 -5
- package/dist/vue3/lib/loader/loader.js +2 -2
- package/dist/vue3/lib/message-input/message-input-button.js +5 -5
- package/dist/vue3/lib/message-input/message-input-link.js +2 -2
- package/dist/vue3/lib/message-input/message-input-topbar.js +2 -2
- package/dist/vue3/lib/message-input/message-input.js +1 -1
- package/dist/vue3/lib/modal/modal.js +1 -1
- package/dist/vue3/lib/motion-text/motion-text.js +5 -5
- package/dist/vue3/lib/notice/notice-action.js +1 -1
- package/dist/vue3/lib/notice/notice-content.js +6 -6
- package/dist/vue3/lib/notice/notice-icon.js +4 -4
- package/dist/vue3/lib/notice/notice.js +1 -1
- package/dist/vue3/lib/pagination/pagination.js +1 -1
- package/dist/vue3/lib/popover/popover-constants.js +3 -3
- package/dist/vue3/lib/popover/popover-header-footer.js +6 -6
- package/dist/vue3/lib/popover/popover.js +7 -7
- package/dist/vue3/lib/presence/presence.js +4 -4
- package/dist/vue3/lib/radio/radio.js +10 -10
- package/dist/vue3/lib/radio-group/radios-decorator.js +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +4 -4
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +161 -149
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/lib/root-layout/root-layout.js +3 -3
- package/dist/vue3/lib/scroller/scroller.js +1 -1
- package/dist/vue3/lib/select-menu/select-menu.js +12 -12
- package/dist/vue3/lib/settings-menu-button/settings-menu-button.js +3 -3
- package/dist/vue3/lib/skeleton/skeleton-list-item.js +2 -2
- package/dist/vue3/lib/skeleton/skeleton-paragraph.js +1 -1
- package/dist/vue3/lib/skeleton/skeleton-shape.js +2 -2
- package/dist/vue3/lib/skeleton/skeleton-text.js +4 -4
- package/dist/vue3/lib/skeleton/skeleton.js +1 -1
- package/dist/vue3/lib/split-button/split-button-alpha.js +2 -2
- package/dist/vue3/lib/split-button/split-button-omega.js +2 -2
- package/dist/vue3/lib/split-button/split-button.js +13 -13
- package/dist/vue3/lib/stack/stack.js +2 -2
- package/dist/vue3/lib/stack/utils.js +5 -5
- package/dist/vue3/lib/stack/validators.js +7 -7
- package/dist/vue3/lib/tab/tab-group.js +2 -2
- package/dist/vue3/lib/tab/tab-panel.js +2 -2
- package/dist/vue3/lib/tab/tab.js +2 -2
- package/dist/vue3/lib/time-pill/time-pill.js +2 -2
- package/dist/vue3/lib/toast/toast.js +1 -1
- package/dist/vue3/lib/toggle/toggle.js +7 -7
- package/dist/vue3/lib/tooltip/tooltip.js +5 -5
- package/dist/vue3/lib/top-banner-info/top-banner-info.js +2 -2
- package/dist/vue3/lib/unread-pill/unread-pill.js +1 -1
- package/dist/vue3/lib/validation-messages/validation-messages.js +6 -6
- package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
- package/dist/vue3/shared/sr_only_close_button.js +2 -2
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +9 -0
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +18 -0
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +9 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/package.json +9 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hasSlotContent as b, extractVueListeners as g, getUniqueString as s } from "../../common/utils/index.js";
|
|
2
2
|
import C from "./collapsible-lazy-show.js";
|
|
3
3
|
import { DtIconChevronRight as x, DtIconChevronDown as S } from "@dialpad/dialtone-icons/vue3";
|
|
4
|
-
import { resolveComponent as a,
|
|
4
|
+
import { resolveComponent as a, openBlock as o, createBlock as i, resolveDynamicComponent as v, mergeProps as c, toHandlers as d, withCtx as r, createElementVNode as h, normalizeClass as L, renderSlot as p, createVNode as m, normalizeStyle as O, toDisplayString as T } from "vue";
|
|
5
5
|
import { _ as w } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
import D from "../lazy-show/lazy-show.js";
|
|
7
7
|
import B from "../button/button.js";
|
|
@@ -162,21 +162,21 @@ const z = {
|
|
|
162
162
|
}, A = ["id"], E = ["title"];
|
|
163
163
|
function k(n, W, e, H, l, t) {
|
|
164
164
|
const u = a("dt-icon-chevron-down"), f = a("dt-icon-chevron-right"), y = a("dt-button"), _ = a("dt-collapsible-lazy-show");
|
|
165
|
-
return
|
|
165
|
+
return o(), i(v(e.elementType), c({ ref: "collapsible" }, d(t.collapsibleListeners)), {
|
|
166
166
|
default: r(() => [
|
|
167
167
|
h("div", {
|
|
168
168
|
id: !e.ariaLabelledBy && t.labelledBy,
|
|
169
169
|
ref: "anchor",
|
|
170
170
|
class: L(e.anchorClass)
|
|
171
171
|
}, [
|
|
172
|
-
|
|
172
|
+
p(n.$slots, "anchor", {
|
|
173
173
|
attrs: {
|
|
174
174
|
"aria-controls": e.id,
|
|
175
175
|
"aria-expanded": l.isOpen.toString(),
|
|
176
176
|
role: "button"
|
|
177
177
|
}
|
|
178
178
|
}, () => [
|
|
179
|
-
|
|
179
|
+
m(y, {
|
|
180
180
|
importance: "clear",
|
|
181
181
|
kind: "muted",
|
|
182
182
|
"aria-controls": e.id,
|
|
@@ -187,11 +187,11 @@ function k(n, W, e, H, l, t) {
|
|
|
187
187
|
onClick: t.defaultToggleOpen
|
|
188
188
|
}, {
|
|
189
189
|
default: r(() => [
|
|
190
|
-
l.isOpen ? (
|
|
190
|
+
l.isOpen ? (o(), i(u, {
|
|
191
191
|
key: 0,
|
|
192
192
|
class: "d-collapsible__icon",
|
|
193
193
|
size: "300"
|
|
194
|
-
})) : (
|
|
194
|
+
})) : (o(), i(f, {
|
|
195
195
|
key: 1,
|
|
196
196
|
class: "d-collapsible__icon",
|
|
197
197
|
size: "300"
|
|
@@ -205,7 +205,7 @@ function k(n, W, e, H, l, t) {
|
|
|
205
205
|
}, 8, ["aria-controls", "aria-expanded", "style", "onClick"])
|
|
206
206
|
])
|
|
207
207
|
], 10, A),
|
|
208
|
-
|
|
208
|
+
m(_, c({
|
|
209
209
|
id: e.id,
|
|
210
210
|
ref: "contentWrapper",
|
|
211
211
|
"aria-hidden": `${!l.isOpen}`,
|
|
@@ -226,7 +226,7 @@ function k(n, W, e, H, l, t) {
|
|
|
226
226
|
onAfterEnter: t.onEnterTransitionComplete
|
|
227
227
|
}), {
|
|
228
228
|
default: r(() => [
|
|
229
|
-
|
|
229
|
+
p(n.$slots, "content")
|
|
230
230
|
]),
|
|
231
231
|
_: 3
|
|
232
232
|
}, 16, ["id", "aria-hidden", "aria-labelledby", "aria-label", "show", "element-type", "class", "style", "onAfterLeave", "onAfterEnter"])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent as s,
|
|
1
|
+
import { resolveComponent as s, openBlock as m, createElementBlock as n, renderSlot as a, createVNode as i, normalizeClass as r, withCtx as l, createElementVNode as c, toDisplayString as p } from "vue";
|
|
2
2
|
import { _ } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
import d from "../list-item/list-item.js";
|
|
4
4
|
const b = {
|
|
@@ -28,7 +28,7 @@ const b = {
|
|
|
28
28
|
};
|
|
29
29
|
function u(e, y, t, x, C, g) {
|
|
30
30
|
const o = s("dt-list-item");
|
|
31
|
-
return
|
|
31
|
+
return m(), n("ol", f, [
|
|
32
32
|
a(e.$slots, "default", {}, () => [
|
|
33
33
|
i(o, {
|
|
34
34
|
role: "option",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent as t,
|
|
1
|
+
import { resolveComponent as t, openBlock as o, createElementBlock as e, Fragment as m, renderList as c, createVNode as n, withCtx as _ } from "vue";
|
|
2
2
|
import { _ as a } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
import p from "../skeleton/skeleton.js";
|
|
4
4
|
import l from "../list-item/list-item.js";
|
|
@@ -11,8 +11,8 @@ const d = {
|
|
|
11
11
|
};
|
|
12
12
|
function u(b, x, k, L, g, y) {
|
|
13
13
|
const s = t("dt-skeleton"), r = t("dt-list-item");
|
|
14
|
-
return
|
|
15
|
-
(
|
|
14
|
+
return o(), e("ol", f, [
|
|
15
|
+
(o(), e(m, null, c(7, (i) => n(r, {
|
|
16
16
|
key: i,
|
|
17
17
|
role: "option",
|
|
18
18
|
"navigation-type": "none"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./combobox-loading-list.cjs"),g=require("./combobox-empty-list.cjs"),l=require("../../common/utils/index.cjs"),e=require("vue"),u=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),m=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./combobox-loading-list.cjs"),g=require("./combobox-empty-list.cjs"),l=require("../../common/utils/index.cjs"),e=require("vue"),u=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),m=require("./combobox-constants.cjs"),p=require("../../common/mixins/keyboard-list-navigation.cjs"),y={compatConfig:{MODE:3},name:"DtCombobox",components:{ComboboxLoadingList:a.default,ComboboxEmptyList:g.default},mixins:[p.default({indexKey:"highlightIndex",idKey:"highlightId",listElementKey:"getListElement",afterHighlightMethod:"afterHighlight",beginningOfListMethod:"beginningOfListMethod",endOfListMethod:"endOfListMethod",activeItemKey:"activeItemEl"})],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:i=>Object.values(m.COMBOBOX_LABEL_SIZES).includes(i)},description:{type:String,default:""},listId:{type:String,default(){return l.getUniqueString()}},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},showList:{type:Boolean,default:!1},listRenderedOutside:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},emptyStateClass:{type:[String,Object,Array],default:""},clickOnSelect:{type:Boolean,default:!1}},emits:["select","escape","highlight","opened"],data(){return{outsideRenderedListRef:null,hasSlotContent:l.hasSlotContent}},computed:{inputProps(){return{label:this.label,labelVisible:this.labelVisible,size:this.size,description:this.description,role:"combobox","aria-label":this.label,"aria-expanded":this.showList.toString(),"aria-owns":this.listId,"aria-haspopup":"listbox","aria-activedescendant":this.activeItemId,"aria-controls":this.listId}},listProps(){return{role:"listbox",id:this.listId,class:"d-ps-relative","aria-label":this.label}},beginningOfListMethod(){return this.onBeginningOfList||this.jumpToEnd},endOfListMethod(){return this.onEndOfList||this.jumpToBeginning},activeItemId(){if(!(!this.showList||this.highlightIndex<0||this.loading))return this.highlightId},activeItemEl(){return this.highlightId?this.getListElement().querySelector("#"+this.highlightId):""}},watch:{showList(i){this.listRenderedOutside||(this.setInitialHighlightIndex(),this.$emit("opened",i)),!i&&this.outsideRenderedListRef&&(this.outsideRenderedListRef.removeEventListener("mousemove",this.onMouseHighlight),this.outsideRenderedListRef=null)},loading(){this.$nextTick(()=>{this.setInitialHighlightIndex()})},$props:{deep:!0,immediate:!0,handler(){this.validateEmptyListProps()}}},created(){this.validateEmptyListProps()},methods:{onMouseHighlight(i){if(this.loading)return;const t=i.target.closest("li");t&&this.highlightId!==t.id&&this.setHighlightId(t.id)},getListElement(){var i;return this.outsideRenderedListRef??((i=this.$refs.listWrapper)==null?void 0:i.querySelector(`#${this.listId}`))},clearHighlightIndex(){this.showList&&this.setHighlightIndex(-1)},afterHighlight(){this.loading||this.$emit("highlight",this.highlightIndex)},onEnterKey(){var i;this.loading||this.emptyList||this.highlightIndex>=0&&(this.$emit("select",this.highlightIndex),this.clickOnSelect&&((i=this.activeItemEl)==null||i.click()))},onEscapeKey(){this.$emit("escape")},onOpen(i,t){var n;this.outsideRenderedListRef=t,(n=this.outsideRenderedListRef)==null||n.addEventListener("mousemove",this.onMouseHighlight),this.$emit("opened",i),i&&this.setInitialHighlightIndex()},onKeyValidation(i,t){!this.showList||!this.getListElement()||this[t](i)},setInitialHighlightIndex(){this.showList&&this.$nextTick(()=>{this.setHighlightIndex(this.loading?-1:0)})},validateEmptyListProps(){this.$slots.emptyListItem||this.emptyList&&!this.emptyStateMessage&&console.error(`Invalid props: you must pass both props emptyList and emptyStateMessage to show the
|
|
2
2
|
empty message.`)}}},f={"data-qa":"dt-combobox-input-wrapper"};function c(i,t,n,L,r,s){const d=e.resolveComponent("combobox-loading-list"),h=e.resolveComponent("combobox-empty-list");return e.openBlock(),e.createElementBlock("div",{onKeydown:[t[3]||(t[3]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEscapeKey"),["stop"]),["esc"])),t[4]||(t[4]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEnterKey"),["exact"]),["enter"])),t[5]||(t[5]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onUpKey"),["stop","prevent"]),["up"])),t[6]||(t[6]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onDownKey"),["stop","prevent"]),["down"])),t[7]||(t[7]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onHomeKey"),["stop","prevent"]),["home"])),t[8]||(t[8]=e.withKeys(e.withModifiers(o=>s.onKeyValidation(o,"onEndKey"),["stop","prevent"]),["end"]))]},[e.createElementVNode("div",f,[e.renderSlot(i.$slots,"input",{inputProps:s.inputProps})]),n.showList?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"listWrapper","data-qa":"dt-combobox-list-wrapper",onMouseleave:t[0]||(t[0]=(...o)=>s.clearHighlightIndex&&s.clearHighlightIndex(...o)),onFocusout:t[1]||(t[1]=(...o)=>s.clearHighlightIndex&&s.clearHighlightIndex(...o)),onMousemoveCapture:t[2]||(t[2]=(...o)=>s.onMouseHighlight&&s.onMouseHighlight(...o))},[n.loading&&!n.listRenderedOutside?(e.openBlock(),e.createBlock(d,e.normalizeProps(e.mergeProps({key:0},s.listProps)),null,16)):n.emptyList&&(n.emptyStateMessage||r.hasSlotContent(i.$slots.emptyListItem))&&!n.listRenderedOutside?(e.openBlock(),e.createBlock(h,e.mergeProps({key:1},s.listProps,{message:n.emptyStateMessage,"item-class":n.emptyStateClass}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"emptyListItem")]),_:3},16,["message","item-class"])):e.renderSlot(i.$slots,"list",{key:2,listProps:s.listProps,opened:s.onOpen,clearHighlightIndex:s.clearHighlightIndex})],544)):e.createCommentVNode("",!0)],32)}const b=u._(y,[["render",c]]);exports.default=b;
|
|
3
3
|
//# sourceMappingURL=combobox.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import y from "./combobox-loading-list.js";
|
|
2
2
|
import I from "./combobox-empty-list.js";
|
|
3
3
|
import { hasSlotContent as L, getUniqueString as b } from "../../common/utils/index.js";
|
|
4
|
-
import { resolveComponent as h,
|
|
4
|
+
import { resolveComponent as h, openBlock as d, createElementBlock as a, withKeys as l, withModifiers as o, createElementVNode as c, renderSlot as r, createBlock as g, normalizeProps as x, mergeProps as m, withCtx as v, createCommentVNode as E } from "vue";
|
|
5
5
|
import { _ as O } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import S from "
|
|
7
|
-
import
|
|
6
|
+
import { COMBOBOX_LABEL_SIZES as S } from "./combobox-constants.js";
|
|
7
|
+
import H from "../../common/mixins/keyboard-list-navigation.js";
|
|
8
8
|
const K = {
|
|
9
9
|
compatConfig: { MODE: 3 },
|
|
10
10
|
name: "DtCombobox",
|
|
@@ -13,7 +13,7 @@ const K = {
|
|
|
13
13
|
ComboboxEmptyList: I
|
|
14
14
|
},
|
|
15
15
|
mixins: [
|
|
16
|
-
|
|
16
|
+
H({
|
|
17
17
|
indexKey: "highlightIndex",
|
|
18
18
|
idKey: "highlightId",
|
|
19
19
|
listElementKey: "getListElement",
|
|
@@ -46,7 +46,7 @@ const K = {
|
|
|
46
46
|
size: {
|
|
47
47
|
type: String,
|
|
48
48
|
default: null,
|
|
49
|
-
validator: (e) => Object.values(
|
|
49
|
+
validator: (e) => Object.values(S).includes(e)
|
|
50
50
|
},
|
|
51
51
|
/**
|
|
52
52
|
* Description for the input
|
|
@@ -299,11 +299,11 @@ function w(e, t, n, R, p, i) {
|
|
|
299
299
|
onFocusout: t[1] || (t[1] = (...s) => i.clearHighlightIndex && i.clearHighlightIndex(...s)),
|
|
300
300
|
onMousemoveCapture: t[2] || (t[2] = (...s) => i.onMouseHighlight && i.onMouseHighlight(...s))
|
|
301
301
|
}, [
|
|
302
|
-
n.loading && !n.listRenderedOutside ? (d(), g(u,
|
|
302
|
+
n.loading && !n.listRenderedOutside ? (d(), g(u, x(m({ key: 0 }, i.listProps)), null, 16)) : n.emptyList && (n.emptyStateMessage || p.hasSlotContent(e.$slots.emptyListItem)) && !n.listRenderedOutside ? (d(), g(f, m({ key: 1 }, i.listProps, {
|
|
303
303
|
message: n.emptyStateMessage,
|
|
304
304
|
"item-class": n.emptyStateClass
|
|
305
305
|
}), {
|
|
306
|
-
default:
|
|
306
|
+
default: v(() => [
|
|
307
307
|
r(e.$slots, "emptyListItem")
|
|
308
308
|
]),
|
|
309
309
|
_: 3
|
|
@@ -313,7 +313,7 @@ function w(e, t, n, R, p, i) {
|
|
|
313
313
|
opened: i.onOpen,
|
|
314
314
|
clearHighlightIndex: i.clearHighlightIndex
|
|
315
315
|
})
|
|
316
|
-
], 544)) :
|
|
316
|
+
], 544)) : E("", !0)
|
|
317
317
|
], 32);
|
|
318
318
|
}
|
|
319
319
|
const z = /* @__PURE__ */ O(K, [["render", w]]);
|
|
@@ -6,7 +6,7 @@ import { validationMessageValidator as M } from "../../common/validators/index.j
|
|
|
6
6
|
import { extractNonListeners as B, returnFirstEl as d, extractVueListeners as O, hasSlotContent as T } from "../../common/utils/index.js";
|
|
7
7
|
import { POPOVER_APPEND_TO_VALUES as P } from "../popover/popover-constants.js";
|
|
8
8
|
import { CHIP_TOP_POSITION as F, CHIP_SIZES as k, MULTI_SELECT_SIZES as H } from "./combobox-multi-select-constants.js";
|
|
9
|
-
import { resolveComponent as p,
|
|
9
|
+
import { resolveComponent as p, openBlock as u, createBlock as f, mergeProps as g, createSlots as R, withCtx as r, createElementVNode as h, withModifiers as V, renderSlot as m, createElementBlock as b, toDisplayString as C, normalizeClass as z, Fragment as E, renderList as D, toHandlers as K, withKeys as N, createTextVNode as A, createVNode as y } from "vue";
|
|
10
10
|
import { _ as U } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const j = {
|
|
12
12
|
compatConfig: { MODE: 3 },
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("../combobox/combobox-loading-list.cjs"),y=require("../combobox/combobox-empty-list.cjs"),u=require("../../common/utils/index.cjs"),t=require("vue"),L=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("../combobox/combobox-loading-list.cjs"),y=require("../combobox/combobox-empty-list.cjs"),u=require("../../common/utils/index.cjs"),t=require("vue"),L=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),_=require("../popover/popover.cjs"),x=require("../combobox/combobox.cjs"),h=require("../dropdown/dropdown-constants.cjs"),m=require("../popover/popover-constants.cjs"),w=require("../combobox/combobox-constants.cjs"),C={compatConfig:{MODE:3},name:"DtRecipeComboboxWithPopover",components:{DtCombobox:x.default,DtPopover:_.default,ComboboxLoadingList:S.default,ComboboxEmptyList:y.default},props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:e=>Object.values(w.COMBOBOX_LABEL_SIZES).includes(e)},description:{type:String,default:""},showList:{type:Boolean,default:null},listId:{type:String,default(){return u.getUniqueString()}},listClass:{type:[String,Array,Object],default:""},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},padding:{type:String,default:"small",validator:e=>Object.keys(h.DROPDOWN_PADDING_CLASSES).some(n=>n===e)},contentWidth:{type:String,default:null,validator:e=>m.POPOVER_CONTENT_WIDTHS.includes(e)},openWithArrowKeys:{type:Boolean,default:!1},popoverOffset:{type:Array,default:()=>[0,4]},popoverSticky:{type:[Boolean,String],default:!1},hasSuggestionList:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>m.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["select","escape","highlight","opened"],data(){return{DROPDOWN_PADDING_CLASSES:h.DROPDOWN_PADDING_CLASSES,isListShown:!1,isInputFocused:!1,isListFocused:!1,externalAnchor:u.getUniqueString(),hasSlotContent:u.hasSlotContent}},computed:{comboboxListeners(){return{...this.$attrs,onSelect:this.onSelect,onEscape:this.onEscape,onHighlight:this.onHighlight}}},watch:{showList:{handler:function(e){e!==null&&(this.isListShown=e)},immediate:!0},isListShown(e){e?window.addEventListener("mousedown",this.onFocusOut):window.removeEventListener("mousedown",this.onFocusOut),this.onOpened(e)}},methods:{handleDisplayList(e){!this.hasSuggestionList&&e&&this.showComboboxList(),!this.hasSuggestionList&&!e&&this.closeComboboxList()},showComboboxList(){this.showList==null&&(this.isListShown=!0)},closeComboboxList(){this.showList==null&&(this.isListShown=!1)},onSelect(e){this.loading||(this.$emit("select",e),this.hasSuggestionList||this.closeComboboxList())},onEscape(){this.$emit("escape"),this.closeComboboxList()},onHighlight(e){this.loading||this.$emit("highlight",e)},onOpened(e){this.$emit("opened",e)},onFocusIn(e){var n;this.hasSuggestionList&&e&&((n=this.$refs.input)==null?void 0:n.querySelector("input"))===e.target&&this.showComboboxList()},onFocusOut(e){var r,i,s;const n=(i=(r=this.$refs.popover)==null?void 0:r.tip)==null?void 0:i.popper,o=this.$refs.input;(s=e.composedPath())!=null&&s.some(a=>[n,o].includes(a))||this.closeComboboxList()},openOnArrowKeyPress(){this.showList!==null||this.isListShown||!this.openWithArrowKeys||this.showComboboxList()}}},v=["id"],O={ref:"header"},E=["onMouseleave","onFocusout"],P={ref:"footer"};function D(e,n,o,r,i,s){const a=t.resolveComponent("combobox-loading-list"),p=t.resolveComponent("combobox-empty-list"),b=t.resolveComponent("dt-popover"),f=t.resolveComponent("dt-combobox");return t.openBlock(),t.createBlock(f,t.mergeProps({ref:"combobox",loading:o.loading,label:o.label,"label-visible":o.labelVisible,size:o.size,description:o.description,"empty-list":o.emptyList,"empty-state-message":o.emptyStateMessage,"show-list":i.isListShown,"on-beginning-of-list":o.onBeginningOfList,"on-end-of-list":o.onEndOfList,"list-rendered-outside":!0,"list-id":o.listId,"data-qa":"dt-combobox"},s.comboboxListeners),{input:t.withCtx(({inputProps:d})=>[t.createElementVNode("div",{id:i.externalAnchor,ref:"input",onFocusin:n[0]||(n[0]=(...l)=>s.onFocusIn&&s.onFocusIn(...l)),onKeydown:[n[1]||(n[1]=t.withKeys(l=>s.openOnArrowKeyPress(l),["up"])),n[2]||(n[2]=t.withKeys(l=>s.openOnArrowKeyPress(l),["down"]))]},[t.renderSlot(e.$slots,"input",{inputProps:d,onInput:s.handleDisplayList})],40,v)]),list:t.withCtx(({opened:d,listProps:l,clearHighlightIndex:c})=>[t.createVNode(b,{ref:"popover",open:i.isListShown,"onUpdate:open":n[3]||(n[3]=g=>i.isListShown=g),"hide-on-click":!1,"max-height":o.maxHeight,"max-width":o.maxWidth,offset:o.popoverOffset,sticky:o.popoverSticky,placement:"bottom-start","initial-focus-element":"none",padding:"none",role:"listbox","external-anchor":i.externalAnchor,"content-width":o.contentWidth,"content-appear":!0,"content-tabindex":null,modal:!1,"auto-focus":!1,"append-to":o.appendTo,transition:o.transition,onOpened:d},t.createSlots({content:t.withCtx(()=>[t.createElementVNode("div",{ref:"listWrapper",class:t.normalizeClass(["d-recipe-combobox-with-popover__list",i.DROPDOWN_PADDING_CLASSES[o.padding],o.listClass]),onMouseleave:c,onFocusout:c},[o.loading?(t.openBlock(),t.createBlock(a,t.normalizeProps(t.mergeProps({key:0},l)),null,16)):o.emptyList&&o.emptyStateMessage?(t.openBlock(),t.createBlock(p,t.mergeProps({key:1},l,{message:o.emptyStateMessage}),null,16,["message"])):t.renderSlot(e.$slots,"list",{key:2,listProps:l})],42,E)]),_:2},[i.hasSlotContent(e.$slots.header)?{name:"headerContent",fn:t.withCtx(()=>[t.createElementVNode("div",O,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,i.hasSlotContent(e.$slots.footer)?{name:"footerContent",fn:t.withCtx(()=>[t.createElementVNode("div",P,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["open","max-height","max-width","offset","sticky","external-anchor","content-width","append-to","transition","onOpened"])]),_:3},16,["loading","label","label-visible","size","description","empty-list","empty-state-message","show-list","on-beginning-of-list","on-end-of-list","list-id"])}const A=L._(C,[["render",D]]);exports.default=A;
|
|
2
2
|
//# sourceMappingURL=combobox-with-popover.cjs.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import _ from "../combobox/combobox-loading-list.js";
|
|
2
2
|
import C from "../combobox/combobox-empty-list.js";
|
|
3
3
|
import { hasSlotContent as v, getUniqueString as g } from "../../common/utils/index.js";
|
|
4
|
-
import { resolveComponent as r,
|
|
4
|
+
import { resolveComponent as r, openBlock as f, createBlock as p, mergeProps as c, withCtx as l, createVNode as E, createSlots as P, createElementVNode as a, normalizeClass as A, normalizeProps as D, renderSlot as d, withKeys as y } from "vue";
|
|
5
5
|
import { _ as B } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import I from "../combobox/combobox.js";
|
|
6
|
+
import k from "../popover/popover.js";
|
|
7
|
+
import F from "../combobox/combobox.js";
|
|
9
8
|
import { DROPDOWN_PADDING_CLASSES as S } from "../dropdown/dropdown-constants.js";
|
|
9
|
+
import { POPOVER_APPEND_TO_VALUES as W, POPOVER_CONTENT_WIDTHS as I } from "../popover/popover-constants.js";
|
|
10
10
|
import { COMBOBOX_LABEL_SIZES as M } from "../combobox/combobox-constants.js";
|
|
11
11
|
const N = {
|
|
12
12
|
compatConfig: { MODE: 3 },
|
|
13
13
|
name: "DtRecipeComboboxWithPopover",
|
|
14
14
|
components: {
|
|
15
|
-
DtCombobox:
|
|
16
|
-
DtPopover:
|
|
15
|
+
DtCombobox: F,
|
|
16
|
+
DtPopover: k,
|
|
17
17
|
ComboboxLoadingList: _,
|
|
18
18
|
ComboboxEmptyList: C
|
|
19
19
|
},
|
|
@@ -121,7 +121,7 @@ const N = {
|
|
|
121
121
|
contentWidth: {
|
|
122
122
|
type: String,
|
|
123
123
|
default: null,
|
|
124
|
-
validator: (t) =>
|
|
124
|
+
validator: (t) => I.includes(t)
|
|
125
125
|
},
|
|
126
126
|
/**
|
|
127
127
|
* If the list should be shown by pressing up or down arrow key on the input element.
|
|
@@ -183,7 +183,7 @@ const N = {
|
|
|
183
183
|
appendTo: {
|
|
184
184
|
type: [HTMLElement, String],
|
|
185
185
|
default: "body",
|
|
186
|
-
validator: (t) =>
|
|
186
|
+
validator: (t) => W.includes(t) || t instanceof HTMLElement
|
|
187
187
|
},
|
|
188
188
|
/**
|
|
189
189
|
* Named transition when the content display is toggled.
|
|
@@ -292,7 +292,7 @@ const N = {
|
|
|
292
292
|
}, H = ["id"], K = { ref: "header" }, T = ["onMouseleave", "onFocusout"], V = { ref: "footer" };
|
|
293
293
|
function z(t, o, e, m, i, n) {
|
|
294
294
|
const u = r("combobox-loading-list"), L = r("combobox-empty-list"), w = r("dt-popover"), x = r("dt-combobox");
|
|
295
|
-
return
|
|
295
|
+
return f(), p(x, c({
|
|
296
296
|
ref: "combobox",
|
|
297
297
|
loading: e.loading,
|
|
298
298
|
label: e.label,
|
|
@@ -359,7 +359,7 @@ function z(t, o, e, m, i, n) {
|
|
|
359
359
|
onMouseleave: b,
|
|
360
360
|
onFocusout: b
|
|
361
361
|
}, [
|
|
362
|
-
e.loading ? (
|
|
362
|
+
e.loading ? (f(), p(u, D(c({ key: 0 }, s)), null, 16)) : e.emptyList && e.emptyStateMessage ? (f(), p(L, c({ key: 1 }, s, { message: e.emptyStateMessage }), null, 16, ["message"])) : d(t.$slots, "list", {
|
|
363
363
|
key: 2,
|
|
364
364
|
listProps: s
|
|
365
365
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { addClassStyleAttrs as S, removeClassStyleAttrs as A, returnFirstEl as u, extractVueListeners as E, safeConcatStrings as N } from "../../common/utils/index.js";
|
|
2
2
|
import { DtIconChevronDown as W, DtIconHeadphones as k } from "@dialpad/dialtone-icons/vue3";
|
|
3
3
|
import { DialtoneLocalization as D } from "../../localization/index.js";
|
|
4
|
-
import { resolveComponent as i,
|
|
4
|
+
import { resolveComponent as i, openBlock as h, createElementBlock as f, mergeProps as w, createElementVNode as o, normalizeClass as T, toHandlers as q, createVNode as _, normalizeStyle as B, withCtx as b, createTextVNode as C, toDisplayString as y, renderSlot as v, createBlock as $, createCommentVNode as L, withModifiers as z } from "vue";
|
|
5
5
|
import { _ as O } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
import R from "../emoji-text-wrapper/emoji-text-wrapper.js";
|
|
7
7
|
import j from "../badge/badge.js";
|
|
@@ -171,14 +171,14 @@ function G(e, r, a, m, n, t) {
|
|
|
171
171
|
size: "200"
|
|
172
172
|
}, {
|
|
173
173
|
default: b(() => [
|
|
174
|
-
y(
|
|
174
|
+
C(y(a.description), 1)
|
|
175
175
|
]),
|
|
176
176
|
_: 1
|
|
177
177
|
})
|
|
178
178
|
], 4)
|
|
179
179
|
], 16, x),
|
|
180
|
-
a.hideActions ?
|
|
181
|
-
|
|
180
|
+
a.hideActions ? L("", !0) : (h(), f("div", M, [
|
|
181
|
+
v(e.$slots, "right"),
|
|
182
182
|
o("div", H, [
|
|
183
183
|
t.showUnreadCount ? (h(), $(d, {
|
|
184
184
|
key: 0,
|
|
@@ -188,10 +188,10 @@ function G(e, r, a, m, n, t) {
|
|
|
188
188
|
type: "bulletin"
|
|
189
189
|
}, {
|
|
190
190
|
default: b(() => [
|
|
191
|
-
y(
|
|
191
|
+
C(y(a.unreadCount), 1)
|
|
192
192
|
]),
|
|
193
193
|
_: 1
|
|
194
|
-
})) :
|
|
194
|
+
})) : L("", !0),
|
|
195
195
|
_(g, {
|
|
196
196
|
class: "d-recipe-leftbar-row__action",
|
|
197
197
|
"data-qa": "dt-recipe-leftbar-row-action-button",
|
|
@@ -211,7 +211,7 @@ function G(e, r, a, m, n, t) {
|
|
|
211
211
|
]))
|
|
212
212
|
], 2),
|
|
213
213
|
o("div", F, [
|
|
214
|
-
|
|
214
|
+
v(e.$slots, "timer")
|
|
215
215
|
])
|
|
216
216
|
], 16);
|
|
217
217
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import g from "../item-layout/item-layout.js";
|
|
2
2
|
import h from "../avatar/avatar.js";
|
|
3
|
-
import { resolveComponent as m,
|
|
3
|
+
import { resolveComponent as m, openBlock as n, createBlock as i, createSlots as u, withCtx as o, createElementVNode as l, renderSlot as c, createElementBlock as _, Fragment as p, renderList as S, resolveDynamicComponent as k } from "vue";
|
|
4
4
|
import { _ as b } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const C = {
|
|
6
6
|
compatConfig: { MODE: 3 },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { safeConcatStrings as w, extractVueListeners as g } from "../../common/utils/index.js";
|
|
2
2
|
import { DtIconUser as C } from "@dialpad/dialtone-icons/vue3";
|
|
3
|
-
import { resolveComponent as a,
|
|
3
|
+
import { resolveComponent as a, openBlock as o, createBlock as d, mergeProps as S, toHandlers as v, withCtx as t, createVNode as s, createTextVNode as u, toDisplayString as c, createElementVNode as h, createElementBlock as x, normalizeClass as b, createCommentVNode as m, createSlots as B } from "vue";
|
|
4
4
|
import { _ as D } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import T from "../emoji-text-wrapper/emoji-text-wrapper.js";
|
|
6
6
|
import k from "../general-row/general-row.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as E, computed as B, watch as F, onMounted as V,
|
|
1
|
+
import { ref as E, computed as B, watch as F, onMounted as V, openBlock as $, createBlock as G, unref as e, withCtx as m, createVNode as i, createElementVNode as M, toDisplayString as P, nextTick as N, createElementBlock as g, Fragment as x, renderList as Y, normalizeClass as q, createTextVNode as W, getCurrentInstance as j } from "vue";
|
|
2
2
|
import { DtIconChevronsLeft as J, DtIconChevronLeft as Q, DtIconChevronRight as Z, DtIconChevronsRight as ee } from "@dialpad/dialtone-icons/vue3";
|
|
3
3
|
import { getMonth as K, getYear as S, getDate as te, set as ae, addMonths as ne, subMonths as re } from "date-fns";
|
|
4
4
|
import { getCalendarDays as le, formatMonth as oe, getWeekDayNames as se, calculateNextFocusDate as ce, calculatePrevFocusDate as ue, formatDate as ie } from "./utils.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDay as D, addMonths as y, startOfMonth as w, addDays as f, getDate as h, endOfMonth as M, subMonths as g, startOfWeek as k, getMonth as O, isEqual as W } from "date-fns";
|
|
2
2
|
import { WEEK_START as x } from "./datepicker-constants.js";
|
|
3
3
|
const u = (t) => t ? new Date(t) : /* @__PURE__ */ new Date(), S = (t, e, n) => {
|
|
4
4
|
const s = u(JSON.parse(JSON.stringify(t))), a = [];
|
|
@@ -15,7 +15,7 @@ const u = (t) => t ? new Date(t) : /* @__PURE__ */ new Date(), S = (t, e, n) =>
|
|
|
15
15
|
}
|
|
16
16
|
return a;
|
|
17
17
|
}, p = (t, e) => !t || !e ? !1 : W(t, e), N = (t, e, n) => {
|
|
18
|
-
const s = [], a = u(new Date(e, t)), o = u(new Date(e, t + 1, 0)), c =
|
|
18
|
+
const s = [], a = u(new Date(e, t)), o = u(new Date(e, t + 1, 0)), c = k(a, { weekStartsOn: x }), i = (d) => {
|
|
19
19
|
const m = S(d, t, n);
|
|
20
20
|
if (s.push({ days: m }), !s[s.length - 1].days.some(
|
|
21
21
|
(l) => p(l.value, o)
|
|
@@ -29,11 +29,11 @@ const u = (t) => t ? new Date(t) : /* @__PURE__ */ new Date(), S = (t, e, n) =>
|
|
|
29
29
|
const n = [1, 2, 3, 4, 5, 6, 7].map((o) => new Intl.DateTimeFormat(t, { weekday: "short", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`2017-01-0${o}T00:00:00+00:00`)).slice(0, 2)), s = n.slice(0, e), a = n.slice(e + 1, n.length);
|
|
30
30
|
return [n[e]].concat(...a).concat(...s);
|
|
31
31
|
}, E = (t, e, n) => new Intl.DateTimeFormat(n, { month: e }).format(new Date(2e3, t, 1)), I = (t, e, n) => new Intl.DateTimeFormat(n, { dateStyle: e }).format(new Date(t)), P = (t) => {
|
|
32
|
-
const e = new Date(t), n = D(e), s =
|
|
32
|
+
const e = new Date(t), n = D(e), s = y(e, 1), a = w(s), o = D(a), r = (n - o + 7) % 7, c = f(a, r);
|
|
33
33
|
return h(c);
|
|
34
34
|
}, b = (t) => {
|
|
35
35
|
const e = new Date(t), n = D(e);
|
|
36
|
-
let a = g(
|
|
36
|
+
let a = M(g(e, 1));
|
|
37
37
|
for (; D(a) !== n; )
|
|
38
38
|
a = f(a, -1);
|
|
39
39
|
return h(a);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DT_DESCRIPTION_LIST_DIRECTION as c } from "./description-list-constants.js";
|
|
2
2
|
import { itemsValidator as p } from "./description-list-validators.js";
|
|
3
|
-
import {
|
|
3
|
+
import { openBlock as s, createElementBlock as i, normalizeClass as a, Fragment as d, renderList as m, createElementVNode as l, toDisplayString as n } from "vue";
|
|
4
4
|
import { _ as u } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import { DT_STACK_GAP as _ } from "../stack/stack-constants.js";
|
|
6
6
|
const C = {
|
|
@@ -65,10 +65,10 @@ const C = {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
function f(t, g, o, y, D, e) {
|
|
68
|
-
return
|
|
68
|
+
return s(), i("dl", {
|
|
69
69
|
class: a(["d-description-list", e.getDirectionClass, e.getGapClass])
|
|
70
70
|
}, [
|
|
71
|
-
(
|
|
71
|
+
(s(!0), i(d, null, m(o.items, (r) => (s(), i(d, {
|
|
72
72
|
key: r.term
|
|
73
73
|
}, [
|
|
74
74
|
l("dt", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent as d,
|
|
1
|
+
import { resolveComponent as d, openBlock as e, createElementBlock as r, createBlock as l, withCtx as s, createElementVNode as o, toDisplayString as c, createCommentVNode as i, normalizeClass as p, renderSlot as m } from "vue";
|
|
2
2
|
import { _ as f } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
import _ from "../stack/stack.js";
|
|
4
4
|
const u = {
|
|
@@ -31,11 +31,11 @@ function k(a, g, t, w, h, C) {
|
|
|
31
31
|
align: "center",
|
|
32
32
|
class: "dt-dropdown-list--header d-fs12 d-fc-black-400 d-fw-bold d-lh4 d-py4 d-px12"
|
|
33
33
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
o("span", null,
|
|
34
|
+
default: s(() => [
|
|
35
|
+
o("span", null, c(t.heading), 1)
|
|
36
36
|
]),
|
|
37
37
|
_: 1
|
|
38
|
-
})) :
|
|
38
|
+
})) : i("", !0),
|
|
39
39
|
o("ul", {
|
|
40
40
|
class: p(["d-ps-relative", "d-stack2", "d-px0", t.listClass]),
|
|
41
41
|
"data-qa": "dt-dropdown-list-wrapper"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { openBlock as o, createElementBlock as t } from "vue";
|
|
2
2
|
import { _ as r } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
const e = {
|
|
4
4
|
compatConfig: { MODE: 3 },
|
|
@@ -8,7 +8,7 @@ const e = {
|
|
|
8
8
|
class: "d-list-item-separator"
|
|
9
9
|
};
|
|
10
10
|
function n(s, c, p, i, _, d) {
|
|
11
|
-
return
|
|
11
|
+
return o(), t("li", a);
|
|
12
12
|
}
|
|
13
13
|
const l = /* @__PURE__ */ r(e, [["render", n]]);
|
|
14
14
|
export {
|
|
@@ -2,7 +2,7 @@ import f from "../../common/mixins/keyboard-list-navigation.js";
|
|
|
2
2
|
import { DROPDOWN_PADDING_CLASSES as a } from "./dropdown-constants.js";
|
|
3
3
|
import { getUniqueString as m } from "../../common/utils/index.js";
|
|
4
4
|
import { EVENT_KEYNAMES as n } from "../../common/constants/index.js";
|
|
5
|
-
import { resolveComponent as y,
|
|
5
|
+
import { resolveComponent as y, openBlock as c, createBlock as K, mergeProps as p, toHandlers as w, withCtx as h, renderSlot as l, createElementVNode as O, normalizeClass as E } from "vue";
|
|
6
6
|
import { _ as I } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
import { LIST_ITEM_NAVIGATION_TYPES as d } from "../list-item/list-item-constants.js";
|
|
8
8
|
import b from "../popover/popover.js";
|
|
@@ -342,7 +342,7 @@ const P = {
|
|
|
342
342
|
}, S = ["id"];
|
|
343
343
|
function A(e, t, i, H, u, o) {
|
|
344
344
|
const g = y("dt-popover");
|
|
345
|
-
return
|
|
345
|
+
return c(), K(g, p({
|
|
346
346
|
ref: "popover",
|
|
347
347
|
"content-width": i.contentWidth,
|
|
348
348
|
open: i.open,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./editor-constants.cjs"),f=require("../../common/utils/index.cjs"),n=require("@dialpad/dialtone-icons/vue3"),L=require("../../localization/index.cjs"),e=require("vue"),m=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),A=require("../tooltip/tooltip.cjs"),E=require("../input/input.cjs"),w=require("../stack/stack.cjs"),D=require("../popover/popover.cjs"),x=require("../button/button.cjs"),C=require("../rich-text-editor/rich-text-editor.cjs"),k=require("../rich-text-editor/rich-text-editor-constants.cjs"),O={compatConfig:{MODE:3},name:"DtRecipeEditor",components:{DtRichTextEditor:C.default,DtButton:x.default,DtPopover:D.default,DtStack:w.default,DtInput:E.default,DtTooltip:A.default,DtIconQuickReply:n.DtIconQuickReply,DtIconBold:n.DtIconBold,DtIconItalic:n.DtIconItalic,DtIconUnderline:n.DtIconUnderline,DtIconStrikethrough:n.DtIconStrikethrough,DtIconListBullet:n.DtIconListBullet,DtIconListOrdered:n.DtIconListOrdered,DtIconAlignLeft:n.DtIconAlignLeft,DtIconAlignCenter:n.DtIconAlignCenter,DtIconAlignRight:n.DtIconAlignRight,DtIconAlignJustify:n.DtIconAlignJustify,DtIconQuote:n.DtIconQuote,DtIconCodeBlock:n.DtIconCodeBlock,DtIconLink2:n.DtIconLink2,DtIconImage:n.DtIconImage},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(t){return typeof t=="string"?k.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(t):!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},showAddLink:{type:Object,default:()=>({showAddLinkButton:!0})},useDivTags:{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"},showLinkInput:!1,linkInput:"",currentButtonRefIndex:0,i18n:new L.DialtoneLocalization}},computed:{inputLength(){return this.internalInputValue.length},htmlOutputFormat(){return k.RICH_TEXT_EDITOR_OUTPUT_FORMATS[2]},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(){const t=this.buttonGroups.reduce((function(i,r){return r.buttonGroup.forEach(s=>{i.push(this.getButtonRef(r.key,s.selector))},this),i}).bind(this),[]);return t.push(this.getButtonRef("custom","link")),t},buttonGroups(){const t=this.individualButtons.map(i=>({key:i.selector,buttonGroup:[i]}));return[{key:"new",buttonGroup:this.newButtons},{key:"format",buttonGroup:this.textFormatButtons},{key:"alignment",buttonGroup:this.alignmentButtons},{key:"list",buttonGroup:this.listButtons},...t].filter(i=>i.buttonGroup.length>0)},newButtons(){return[{showBtn:this.showQuickRepliesButton,label:this.i18n.$t("DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL"),selector:"quickReplies",icon:n.DtIconQuickReply,dataQA:"dt-recipe-editor-quick-replies-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL"),onClick:this.onQuickRepliesClick}].filter(t=>t.showBtn)},textFormatButtons(){return[{showBtn:this.showBoldButton,selector:"bold",icon:n.DtIconBold,dataQA:"dt-recipe-editor-bold-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_BOLD_BUTTON_LABEL"),onClick:this.onBoldTextToggle},{showBtn:this.showItalicsButton,selector:"italic",icon:n.DtIconItalic,dataQA:"dt-recipe-editor-italics-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_ITALICS_BUTTON_LABEL"),onClick:this.onItalicTextToggle},{showBtn:this.showUnderlineButton,selector:"underline",icon:n.DtIconUnderline,dataQA:"dt-recipe-editor-underline-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_UNDERLINE_BUTTON_LABEL"),onClick:this.onUnderlineTextToggle},{showBtn:this.showStrikeButton,selector:"strike",icon:n.DtIconStrikethrough,dataQA:"dt-recipe-editor-strike-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_STRIKE_BUTTON_LABEL"),onClick:this.onStrikethroughTextToggle}].filter(t=>t.showBtn)},alignmentButtons(){return[{showBtn:this.showAlignLeftButton,selector:{textAlign:"left"},icon:n.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,selector:{textAlign:"center"},icon:n.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,selector:{textAlign:"right"},icon:n.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,selector:{textAlign:"justify"},icon:n.DtIconAlignJustify,dataQA:"dt-recipe-editor-align-justify-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_ALIGN_JUSTIFY_BUTTON_LABEL"),onClick:()=>this.onTextAlign("justify")}].filter(t=>t.showBtn)},listButtons(){return[{showBtn:this.showListItemsButton,selector:"bulletList",icon:n.DtIconListBullet,dataQA:"dt-recipe-editor-list-items-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_BULLET_LIST_BUTTON_LABEL"),onClick:this.onBulletListToggle},{showBtn:this.showOrderedListButton,selector:"orderedList",icon:n.DtIconListOrdered,dataQA:"dt-recipe-editor-ordered-list-items-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_ORDERED_LIST_BUTTON_LABEL"),onClick:this.onOrderedListToggle}].filter(t=>t.showBtn)},individualButtons(){return[{showBtn:this.showQuoteButton,selector:"blockquote",icon:n.DtIconQuote,dataQA:"dt-recipe-editor-blockquote-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_QUOTE_BUTTON_LABEL"),onClick:this.onBlockquoteToggle},{showBtn:this.showCodeBlockButton,selector:"codeBlock",icon:n.DtIconCodeBlock,dataQA:"dt-recipe-editor-code-block-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_CODE_BUTTON_LABEL"),onClick:this.onCodeBlockToggle},{showBtn:this.showInlineImageButton,selector:"image",icon:n.DtIconImage,dataQA:"dt-recipe-editor-inline-image-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_IMAGE_BUTTON_LABEL"),onClick:this.onInsertInlineImageClick}].filter(t=>t.showBtn)},linkButton(){return{showBtn:this.showAddLink.showAddLinkButton,selector:"link",icon:n.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")}},watch:{modelValue(t){this.internalInputValue=t}},methods:{removeClassStyleAttrs:f.removeClassStyleAttrs,addClassStyleAttrs:f.addClassStyleAttrs,onInputFocus(t){t==null||t.stopPropagation()},removeLink(){var t,i,r,s,l;(l=(s=(r=(i=(t=this.$refs.richTextEditor)==null?void 0:t.editor)==null?void 0:i.chain())==null?void 0:r.focus())==null?void 0:s.unsetLink())==null||l.run(),this.closeLinkInput()},setLink(t){var l,o,a;const i=(l=this.$refs.richTextEditor)==null?void 0:l.editor;if(t==null||t.preventDefault(),t==null||t.stopPropagation(),!this.linkInput){this.removeLink();return}g.EDITOR_SUPPORTED_LINK_PROTOCOLS.find(d=>d.test(this.linkInput))||(this.linkInput=`${g.EDITOR_DEFAULT_LINK_PREFIX}${this.linkInput}`);const s=(a=(o=i==null?void 0:i.view)==null?void 0:o.state)==null?void 0:a.selection;s.anchor===s.head?i.chain().focus().insertContentAt(s.anchor,`<a class="${this.linkOptions.class}" href=${this.linkInput}>${this.linkInput}</a>`).run():i.chain().focus().extendMarkRange("link").setLink({href:this.linkInput,class:this.linkOptions.class}).run(),this.closeLinkInput()},openLinkInput(){this.showLinkInput=!0},updateInput(t){var i,r,s;if(!t)return this.closeLinkInput();this.linkInput=(s=(r=(i=this.$refs.richTextEditor)==null?void 0:i.editor)==null?void 0:r.getAttributes("link"))==null?void 0:s.href},closeLinkInput(){var t;this.showLinkInput=!1,this.linkInput="",(t=this.$refs.richTextEditor.editor)==null||t.chain().focus()},onBoldTextToggle(){var t,i;(i=(t=this.$refs.richTextEditor)==null?void 0:t.editor)==null||i.chain().focus().toggleBold().run()},onItalicTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleItalic().run()},onUnderlineTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleUnderline().run()},onStrikethroughTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleStrike().run()},onTextAlign(t){var i,r,s,l;if((r=(i=this.$refs.richTextEditor)==null?void 0:i.editor)!=null&&r.isActive({textAlign:t}))return(s=this.$refs.richTextEditor)==null?void 0:s.editor.chain().focus().unsetTextAlign().run();(l=this.$refs.richTextEditor)==null||l.editor.chain().focus().setTextAlign(t).run()},onBulletListToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleBulletList().run()},onOrderedListToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleOrderedList().run()},onCodeBlockToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleCodeBlock().run()},onQuickRepliesClick(){this.$emit("quick-replies-click")},onInsertInlineImageClick(){this.$emit("inline-image-click")},insertInlineImage(t){var i;(i=this.$refs.richTextEditor)==null||i.editor.chain().focus().setImage({src:t}).run()},insertInMessageBody(t){var i;(i=this.$refs.richTextEditor)==null||i.editor.chain().focus().insertContent(t).run()},setCursorPosition(t=null){var i;(i=this.$refs.richTextEditor)==null||i.editor.chain().focus(t).run()},onBlockquoteToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleBlockquote().run()},onTextInput(t){this.$emit("text-input",t)},onFocus(t){this.hasFocus=!0,this.$emit("focus",t)},onBlur(t){this.hasFocus=!1,this.$emit("blur",t)},onInput(t){this.$emit("input",t),this.$emit("update:modelValue",t)},getButtonKey(t,i){return`${t}-${JSON.stringify(i)}`},getButtonRef(t,i){return`${this.getButtonKey(t,i)}-ref`},canFocus(t){return t===this.orderedRefs[this.currentButtonRefIndex]},shiftActionBarFocusRight(){this.shiftButtonRefIndex(1)},shiftActionBarFocusLeft(){this.shiftButtonRefIndex(-1)},shiftButtonRefIndex(t){const i=this.$refs[this.orderedRefs[this.currentButtonRefIndex]],r=Array.isArray(i)?i[0]:i,s=(this.currentButtonRefIndex+t)%this.orderedRefs.length;this.currentButtonRefIndex=s>=0?s:this.orderedRefs.length+s;const l=this.$refs[this.orderedRefs[this.currentButtonRefIndex]],o=Array.isArray(l)?l[0]:l;r.$el.blur(),o.$el.focus()}}},y={class:"d-recipe-editor__popover-content"};function R(t,i,r,s,l,o){const a=e.resolveComponent("dt-button"),d=e.resolveComponent("dt-tooltip"),h=e.resolveComponent("dt-stack"),I=e.resolveComponent("dt-input"),T=e.resolveComponent("dt-popover"),_=e.resolveComponent("dt-rich-text-editor");return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"d-recipe-editor"},o.addClassStyleAttrs(t.$attrs),{"data-qa":"dt-recipe-editor",role:"presentation",onClick:i[4]||(i[4]=u=>t.$refs.richTextEditor.focusEditor())}),[e.createVNode(h,{class:"d-recipe-editor__top-bar",direction:"row",gap:"450"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.buttonGroups,u=>(e.openBlock(),e.createBlock(h,{key:u.key,direction:"row",gap:"300"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.buttonGroup,c=>(e.openBlock(),e.createBlock(d,{key:o.getButtonKey(u.key,c.selector),message:c.tooltipMessage,placement:"top"},{anchor:e.withCtx(()=>{var p,B;return[e.createVNode(a,{ref_for:!0,ref:o.getButtonRef(u.key,c.selector),active:(B=(p=t.$refs.richTextEditor)==null?void 0:p.editor)==null?void 0:B.isActive(c.selector),"aria-label":c.tooltipMessage,"data-qa":c.dataQA,tabindex:o.canFocus(o.getButtonRef(u.key,c.selector))?0:-1,importance:"clear",kind:"muted",size:"xs",onClick:N=>c.onClick(),onKeydown:[e.withKeys(e.withModifiers(o.shiftActionBarFocusRight,["stop"]),["right"]),e.withKeys(e.withModifiers(o.shiftActionBarFocusLeft,["stop"]),["left"])]},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon),{size:"200"}))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(c==null?void 0:c.label),1)]),_:2},1032,["active","aria-label","data-qa","tabindex","onClick","onKeydown"])]}),_:2},1032,["message"]))),128)),i[5]||(i[5]=e.createElementVNode("div",{class:"d-recipe-editor__button-group-divider"},null,-1))]),_:2},1024))),128)),o.linkButton.showBtn?(e.openBlock(),e.createBlock(h,{key:0,direction:"row",gap:"300"},{default:e.withCtx(()=>[e.createVNode(T,{open:l.showLinkInput,"show-close-button":!1,"data-qa":"dt-recipe-editor-link-input-popover",padding:"none",placement:"bottom-start",onClick:[o.onInputFocus,e.withModifiers(o.onInputFocus,["stop"])],onOpened:o.updateInput},{anchor:e.withCtx(()=>[(e.openBlock(),e.createBlock(d,{key:o.linkButton.key,message:o.linkButton.tooltipMessage,placement:"top"},{anchor:e.withCtx(()=>{var u,c;return[e.createVNode(a,{ref:o.getButtonRef("custom","link"),active:(c=(u=t.$refs.richTextEditor)==null?void 0:u.editor)==null?void 0:c.isActive(o.linkButton.selector),"aria-label":o.linkButton.tooltipMessage,"data-qa":o.linkButton.dataQA,tabindex:o.canFocus(o.getButtonRef("custom","link"))?0:-1,importance:"clear",kind:"muted",size:"xs",onClick:i[0]||(i[0]=p=>o.linkButton.onClick()),onKeydown:[e.withKeys(e.withModifiers(o.shiftActionBarFocusRight,["stop"]),["right"]),e.withKeys(e.withModifiers(o.shiftActionBarFocusLeft,["stop"]),["left"])]},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.linkButton.icon),{size:"200"}))]),_:1},8,["active","aria-label","data-qa","tabindex","onKeydown"])]}),_:1},8,["message"]))]),content:e.withCtx(()=>[e.createElementVNode("div",y,[e.createElementVNode("span",null,e.toDisplayString(o.showAddLinkButtonLabels.title),1),e.createVNode(I,{modelValue:l.linkInput,"onUpdate:modelValue":i[1]||(i[1]=u=>l.linkInput=u),"input-aria-label":o.showAddLinkButtonLabels["aria-label"],placeholder:r.setLinkPlaceholder,"data-qa":"dt-recipe-editor-link-input","input-wrapper-class":"d-recipe-editor-link__input-wrapper",onClick:[o.onInputFocus,e.withModifiers(o.onInputFocus,["stop"])],onFocus:o.onInputFocus,onKeydown:e.withKeys(o.setLink,["enter"])},null,8,["modelValue","input-aria-label","placeholder","onClick","onFocus","onKeydown"])])]),footerContent:e.withCtx(()=>[e.createVNode(h,{direction:"row",gap:"300",class:"d-recipe-editor__popover-footer"},{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({"data-qa":"dt-recipe-editor-remove-link-btn",importance:"clear",kind:"muted",size:"sm"},o.removeLinkButtonLabels,{onClick:o.removeLink}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.removeLinkButtonLabels.title),1)]),_:1},16,["onClick"]),e.createVNode(a,e.mergeProps({"data-qa":"dt-recipe-editor-set-link-cancel-btn",importance:"clear",kind:"muted",size:"sm"},o.cancelSetLinkButtonLabels,{onClick:o.closeLinkInput}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.cancelSetLinkButtonLabels.title),1)]),_:1},16,["onClick"]),e.createVNode(a,e.mergeProps({"data-qa":"dt-recipe-editor-set-link-confirm-btn",size:"sm"},o.confirmSetLinkButtonLabels,{onClick:o.setLink}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmSetLinkButtonLabels.title),1)]),_:1},16,["onClick"])]),_:1})]),_:1},8,["open","onClick","onOpened"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",{style:e.normalizeStyle({"max-height":r.maxHeight}),class:"d-recipe-editor__content"},[e.createVNode(_,e.mergeProps({ref:"richTextEditor",modelValue:l.internalInputValue,"onUpdate:modelValue":i[2]||(i[2]=u=>l.internalInputValue=u),"allow-font-color":!0,"allow-font-family":!0,"allow-inline-images":!0,"allow-line-breaks":!0,"hide-link-bubble-menu":!0,"auto-focus":r.autoFocus,editable:r.editable,"input-aria-label":r.inputAriaLabel,"input-class":`d-recipe-editor__content-input ${r.inputClass}`,link:!0,"output-format":o.htmlOutputFormat,placeholder:r.placeholder,"use-div-tags":r.useDivTags,"data-qa":"dt-rich-text-editor"},o.removeClassStyleAttrs(t.$attrs),{onTextInput:o.onTextInput,onBlur:o.onBlur,onFocus:o.onFocus,onInput:i[3]||(i[3]=u=>o.onInput(u))}),null,16,["modelValue","auto-focus","editable","input-aria-label","input-class","output-format","placeholder","use-div-tags","onTextInput","onBlur","onFocus"])],4)],16)}const b=m._(O,[["render",R]]);exports.default=b;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./editor-constants.cjs"),f=require("../../common/utils/index.cjs"),n=require("@dialpad/dialtone-icons/vue3"),L=require("../../localization/index.cjs"),e=require("vue"),m=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),A=require("../tooltip/tooltip.cjs"),w=require("../input/input.cjs"),E=require("../stack/stack.cjs"),D=require("../popover/popover.cjs"),x=require("../button/button.cjs"),C=require("../rich-text-editor/rich-text-editor.cjs"),k=require("../rich-text-editor/rich-text-editor-constants.cjs"),O={compatConfig:{MODE:3},name:"DtRecipeEditor",components:{DtRichTextEditor:C.default,DtButton:x.default,DtPopover:D.default,DtStack:E.default,DtInput:w.default,DtTooltip:A.default,DtIconQuickReply:n.DtIconQuickReply,DtIconBold:n.DtIconBold,DtIconItalic:n.DtIconItalic,DtIconUnderline:n.DtIconUnderline,DtIconStrikethrough:n.DtIconStrikethrough,DtIconListBullet:n.DtIconListBullet,DtIconListOrdered:n.DtIconListOrdered,DtIconAlignLeft:n.DtIconAlignLeft,DtIconAlignCenter:n.DtIconAlignCenter,DtIconAlignRight:n.DtIconAlignRight,DtIconAlignJustify:n.DtIconAlignJustify,DtIconQuote:n.DtIconQuote,DtIconCodeBlock:n.DtIconCodeBlock,DtIconLink2:n.DtIconLink2,DtIconImage:n.DtIconImage},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(t){return typeof t=="string"?k.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(t):!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},showAddLink:{type:Object,default:()=>({showAddLinkButton:!0})},useDivTags:{type:Boolean,default:!1},allowTables:{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"},showLinkInput:!1,linkInput:"",currentButtonRefIndex:0,i18n:new L.DialtoneLocalization}},computed:{inputLength(){return this.internalInputValue.length},htmlOutputFormat(){return k.RICH_TEXT_EDITOR_OUTPUT_FORMATS[2]},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(){const t=this.buttonGroups.reduce((function(i,r){return r.buttonGroup.forEach(s=>{i.push(this.getButtonRef(r.key,s.selector))},this),i}).bind(this),[]);return t.push(this.getButtonRef("custom","link")),t},buttonGroups(){const t=this.individualButtons.map(i=>({key:i.selector,buttonGroup:[i]}));return[{key:"new",buttonGroup:this.newButtons},{key:"format",buttonGroup:this.textFormatButtons},{key:"alignment",buttonGroup:this.alignmentButtons},{key:"list",buttonGroup:this.listButtons},...t].filter(i=>i.buttonGroup.length>0)},newButtons(){return[{showBtn:this.showQuickRepliesButton,label:this.i18n.$t("DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL"),selector:"quickReplies",icon:n.DtIconQuickReply,dataQA:"dt-recipe-editor-quick-replies-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL"),onClick:this.onQuickRepliesClick}].filter(t=>t.showBtn)},textFormatButtons(){return[{showBtn:this.showBoldButton,selector:"bold",icon:n.DtIconBold,dataQA:"dt-recipe-editor-bold-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_BOLD_BUTTON_LABEL"),onClick:this.onBoldTextToggle},{showBtn:this.showItalicsButton,selector:"italic",icon:n.DtIconItalic,dataQA:"dt-recipe-editor-italics-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_ITALICS_BUTTON_LABEL"),onClick:this.onItalicTextToggle},{showBtn:this.showUnderlineButton,selector:"underline",icon:n.DtIconUnderline,dataQA:"dt-recipe-editor-underline-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_UNDERLINE_BUTTON_LABEL"),onClick:this.onUnderlineTextToggle},{showBtn:this.showStrikeButton,selector:"strike",icon:n.DtIconStrikethrough,dataQA:"dt-recipe-editor-strike-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_STRIKE_BUTTON_LABEL"),onClick:this.onStrikethroughTextToggle}].filter(t=>t.showBtn)},alignmentButtons(){return[{showBtn:this.showAlignLeftButton,selector:{textAlign:"left"},icon:n.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,selector:{textAlign:"center"},icon:n.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,selector:{textAlign:"right"},icon:n.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,selector:{textAlign:"justify"},icon:n.DtIconAlignJustify,dataQA:"dt-recipe-editor-align-justify-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_ALIGN_JUSTIFY_BUTTON_LABEL"),onClick:()=>this.onTextAlign("justify")}].filter(t=>t.showBtn)},listButtons(){return[{showBtn:this.showListItemsButton,selector:"bulletList",icon:n.DtIconListBullet,dataQA:"dt-recipe-editor-list-items-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_BULLET_LIST_BUTTON_LABEL"),onClick:this.onBulletListToggle},{showBtn:this.showOrderedListButton,selector:"orderedList",icon:n.DtIconListOrdered,dataQA:"dt-recipe-editor-ordered-list-items-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_ORDERED_LIST_BUTTON_LABEL"),onClick:this.onOrderedListToggle}].filter(t=>t.showBtn)},individualButtons(){return[{showBtn:this.showQuoteButton,selector:"blockquote",icon:n.DtIconQuote,dataQA:"dt-recipe-editor-blockquote-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_QUOTE_BUTTON_LABEL"),onClick:this.onBlockquoteToggle},{showBtn:this.showCodeBlockButton,selector:"codeBlock",icon:n.DtIconCodeBlock,dataQA:"dt-recipe-editor-code-block-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_CODE_BUTTON_LABEL"),onClick:this.onCodeBlockToggle},{showBtn:this.showInlineImageButton,selector:"image",icon:n.DtIconImage,dataQA:"dt-recipe-editor-inline-image-btn",tooltipMessage:this.i18n.$t("DIALTONE_EDITOR_IMAGE_BUTTON_LABEL"),onClick:this.onInsertInlineImageClick}].filter(t=>t.showBtn)},linkButton(){return{showBtn:this.showAddLink.showAddLinkButton,selector:"link",icon:n.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")}},watch:{modelValue(t){this.internalInputValue=t}},methods:{removeClassStyleAttrs:f.removeClassStyleAttrs,addClassStyleAttrs:f.addClassStyleAttrs,onInputFocus(t){t==null||t.stopPropagation()},removeLink(){var t,i,r,s,l;(l=(s=(r=(i=(t=this.$refs.richTextEditor)==null?void 0:t.editor)==null?void 0:i.chain())==null?void 0:r.focus())==null?void 0:s.unsetLink())==null||l.run(),this.closeLinkInput()},setLink(t){var l,o,a;const i=(l=this.$refs.richTextEditor)==null?void 0:l.editor;if(t==null||t.preventDefault(),t==null||t.stopPropagation(),!this.linkInput){this.removeLink();return}g.EDITOR_SUPPORTED_LINK_PROTOCOLS.find(d=>d.test(this.linkInput))||(this.linkInput=`${g.EDITOR_DEFAULT_LINK_PREFIX}${this.linkInput}`);const s=(a=(o=i==null?void 0:i.view)==null?void 0:o.state)==null?void 0:a.selection;s.anchor===s.head?i.chain().focus().insertContentAt(s.anchor,`<a class="${this.linkOptions.class}" href=${this.linkInput}>${this.linkInput}</a>`).run():i.chain().focus().extendMarkRange("link").setLink({href:this.linkInput,class:this.linkOptions.class}).run(),this.closeLinkInput()},openLinkInput(){this.showLinkInput=!0},updateInput(t){var i,r,s;if(!t)return this.closeLinkInput();this.linkInput=(s=(r=(i=this.$refs.richTextEditor)==null?void 0:i.editor)==null?void 0:r.getAttributes("link"))==null?void 0:s.href},closeLinkInput(){var t;this.showLinkInput=!1,this.linkInput="",(t=this.$refs.richTextEditor.editor)==null||t.chain().focus()},onBoldTextToggle(){var t,i;(i=(t=this.$refs.richTextEditor)==null?void 0:t.editor)==null||i.chain().focus().toggleBold().run()},onItalicTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleItalic().run()},onUnderlineTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleUnderline().run()},onStrikethroughTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleStrike().run()},onTextAlign(t){var i,r,s,l;if((r=(i=this.$refs.richTextEditor)==null?void 0:i.editor)!=null&&r.isActive({textAlign:t}))return(s=this.$refs.richTextEditor)==null?void 0:s.editor.chain().focus().unsetTextAlign().run();(l=this.$refs.richTextEditor)==null||l.editor.chain().focus().setTextAlign(t).run()},onBulletListToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleBulletList().run()},onOrderedListToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleOrderedList().run()},onCodeBlockToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleCodeBlock().run()},onQuickRepliesClick(){this.$emit("quick-replies-click")},onInsertInlineImageClick(){this.$emit("inline-image-click")},insertInlineImage(t){var i;(i=this.$refs.richTextEditor)==null||i.editor.chain().focus().setImage({src:t}).run()},insertInMessageBody(t){var i;(i=this.$refs.richTextEditor)==null||i.editor.chain().focus().insertContent(t).run()},setCursorPosition(t=null){var i;(i=this.$refs.richTextEditor)==null||i.editor.chain().focus(t).run()},onBlockquoteToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleBlockquote().run()},onTextInput(t){this.$emit("text-input",t)},onFocus(t){this.hasFocus=!0,this.$emit("focus",t)},onBlur(t){this.hasFocus=!1,this.$emit("blur",t)},onInput(t){this.$emit("input",t),this.$emit("update:modelValue",t)},getButtonKey(t,i){return`${t}-${JSON.stringify(i)}`},getButtonRef(t,i){return`${this.getButtonKey(t,i)}-ref`},canFocus(t){return t===this.orderedRefs[this.currentButtonRefIndex]},shiftActionBarFocusRight(){this.shiftButtonRefIndex(1)},shiftActionBarFocusLeft(){this.shiftButtonRefIndex(-1)},shiftButtonRefIndex(t){const i=this.$refs[this.orderedRefs[this.currentButtonRefIndex]],r=Array.isArray(i)?i[0]:i,s=(this.currentButtonRefIndex+t)%this.orderedRefs.length;this.currentButtonRefIndex=s>=0?s:this.orderedRefs.length+s;const l=this.$refs[this.orderedRefs[this.currentButtonRefIndex]],o=Array.isArray(l)?l[0]:l;r.$el.blur(),o.$el.focus()}}},y={class:"d-recipe-editor__popover-content"};function R(t,i,r,s,l,o){const a=e.resolveComponent("dt-button"),d=e.resolveComponent("dt-tooltip"),h=e.resolveComponent("dt-stack"),I=e.resolveComponent("dt-input"),T=e.resolveComponent("dt-popover"),_=e.resolveComponent("dt-rich-text-editor");return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"d-recipe-editor"},o.addClassStyleAttrs(t.$attrs),{"data-qa":"dt-recipe-editor",role:"presentation",onClick:i[4]||(i[4]=u=>t.$refs.richTextEditor.focusEditor())}),[e.createVNode(h,{class:"d-recipe-editor__top-bar",direction:"row",gap:"450"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.buttonGroups,u=>(e.openBlock(),e.createBlock(h,{key:u.key,direction:"row",gap:"300"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.buttonGroup,c=>(e.openBlock(),e.createBlock(d,{key:o.getButtonKey(u.key,c.selector),message:c.tooltipMessage,placement:"top"},{anchor:e.withCtx(()=>{var B,p;return[e.createVNode(a,{ref_for:!0,ref:o.getButtonRef(u.key,c.selector),active:(p=(B=t.$refs.richTextEditor)==null?void 0:B.editor)==null?void 0:p.isActive(c.selector),"aria-label":c.tooltipMessage,"data-qa":c.dataQA,tabindex:o.canFocus(o.getButtonRef(u.key,c.selector))?0:-1,importance:"clear",kind:"muted",size:"xs",onClick:N=>c.onClick(),onKeydown:[e.withKeys(e.withModifiers(o.shiftActionBarFocusRight,["stop"]),["right"]),e.withKeys(e.withModifiers(o.shiftActionBarFocusLeft,["stop"]),["left"])]},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon),{size:"200"}))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(c==null?void 0:c.label),1)]),_:2},1032,["active","aria-label","data-qa","tabindex","onClick","onKeydown"])]}),_:2},1032,["message"]))),128)),i[5]||(i[5]=e.createElementVNode("div",{class:"d-recipe-editor__button-group-divider"},null,-1))]),_:2},1024))),128)),o.linkButton.showBtn?(e.openBlock(),e.createBlock(h,{key:0,direction:"row",gap:"300"},{default:e.withCtx(()=>[e.createVNode(T,{open:l.showLinkInput,"show-close-button":!1,"data-qa":"dt-recipe-editor-link-input-popover",padding:"none",placement:"bottom-start",onClick:[o.onInputFocus,e.withModifiers(o.onInputFocus,["stop"])],onOpened:o.updateInput},{anchor:e.withCtx(()=>[(e.openBlock(),e.createBlock(d,{key:o.linkButton.key,message:o.linkButton.tooltipMessage,placement:"top"},{anchor:e.withCtx(()=>{var u,c;return[e.createVNode(a,{ref:o.getButtonRef("custom","link"),active:(c=(u=t.$refs.richTextEditor)==null?void 0:u.editor)==null?void 0:c.isActive(o.linkButton.selector),"aria-label":o.linkButton.tooltipMessage,"data-qa":o.linkButton.dataQA,tabindex:o.canFocus(o.getButtonRef("custom","link"))?0:-1,importance:"clear",kind:"muted",size:"xs",onClick:i[0]||(i[0]=B=>o.linkButton.onClick()),onKeydown:[e.withKeys(e.withModifiers(o.shiftActionBarFocusRight,["stop"]),["right"]),e.withKeys(e.withModifiers(o.shiftActionBarFocusLeft,["stop"]),["left"])]},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.linkButton.icon),{size:"200"}))]),_:1},8,["active","aria-label","data-qa","tabindex","onKeydown"])]}),_:1},8,["message"]))]),content:e.withCtx(()=>[e.createElementVNode("div",y,[e.createElementVNode("span",null,e.toDisplayString(o.showAddLinkButtonLabels.title),1),e.createVNode(I,{modelValue:l.linkInput,"onUpdate:modelValue":i[1]||(i[1]=u=>l.linkInput=u),"input-aria-label":o.showAddLinkButtonLabels["aria-label"],placeholder:r.setLinkPlaceholder,"data-qa":"dt-recipe-editor-link-input","input-wrapper-class":"d-recipe-editor-link__input-wrapper",onClick:[o.onInputFocus,e.withModifiers(o.onInputFocus,["stop"])],onFocus:o.onInputFocus,onKeydown:e.withKeys(o.setLink,["enter"])},null,8,["modelValue","input-aria-label","placeholder","onClick","onFocus","onKeydown"])])]),footerContent:e.withCtx(()=>[e.createVNode(h,{direction:"row",gap:"300",class:"d-recipe-editor__popover-footer"},{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({"data-qa":"dt-recipe-editor-remove-link-btn",importance:"clear",kind:"muted",size:"sm"},o.removeLinkButtonLabels,{onClick:o.removeLink}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.removeLinkButtonLabels.title),1)]),_:1},16,["onClick"]),e.createVNode(a,e.mergeProps({"data-qa":"dt-recipe-editor-set-link-cancel-btn",importance:"clear",kind:"muted",size:"sm"},o.cancelSetLinkButtonLabels,{onClick:o.closeLinkInput}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.cancelSetLinkButtonLabels.title),1)]),_:1},16,["onClick"]),e.createVNode(a,e.mergeProps({"data-qa":"dt-recipe-editor-set-link-confirm-btn",size:"sm"},o.confirmSetLinkButtonLabels,{onClick:o.setLink}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmSetLinkButtonLabels.title),1)]),_:1},16,["onClick"])]),_:1})]),_:1},8,["open","onClick","onOpened"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",{style:e.normalizeStyle({"max-height":r.maxHeight}),class:"d-recipe-editor__content"},[e.createVNode(_,e.mergeProps({ref:"richTextEditor",modelValue:l.internalInputValue,"onUpdate:modelValue":i[2]||(i[2]=u=>l.internalInputValue=u),"allow-font-color":!0,"allow-font-family":!0,"allow-inline-images":!0,"allow-line-breaks":!0,"hide-link-bubble-menu":!0,"auto-focus":r.autoFocus,editable:r.editable,"input-aria-label":r.inputAriaLabel,"input-class":`d-recipe-editor__content-input ${r.inputClass}`,link:!0,"output-format":o.htmlOutputFormat,placeholder:r.placeholder,"use-div-tags":r.useDivTags,"allow-tables":r.allowTables,"data-qa":"dt-rich-text-editor"},o.removeClassStyleAttrs(t.$attrs),{onTextInput:o.onTextInput,onBlur:o.onBlur,onFocus:o.onFocus,onInput:i[3]||(i[3]=u=>o.onInput(u))}),null,16,["modelValue","auto-focus","editable","input-aria-label","input-class","output-format","placeholder","use-div-tags","allow-tables","onTextInput","onBlur","onFocus"])],4)],16)}const b=m._(O,[["render",R]]);exports.default=b;
|
|
2
2
|
//# sourceMappingURL=editor.cjs.map
|