@dialpad/dialtone 9.158.0 → 9.160.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 +20 -1
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone-docs.json +1 -1
- package/dist/css/dialtone.css +20 -1
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/doc.json +84323 -84323
- package/dist/vue3/common/test-utils/node-traversal.cjs +2 -0
- package/dist/vue3/common/test-utils/node-traversal.cjs.map +1 -0
- package/dist/vue3/common/test-utils/node-traversal.js +54 -0
- package/dist/vue3/common/test-utils/node-traversal.js.map +1 -0
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +155 -153
- package/dist/vue3/dialtone-vue.js.map +1 -1
- package/dist/vue3/lib/button/button.cjs +1 -1
- package/dist/vue3/lib/button/button.cjs.map +1 -1
- package/dist/vue3/lib/button/button.js +146 -81
- package/dist/vue3/lib/button/button.js.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
- package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker.js +306 -242
- package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue3/lib/datepicker/utils.cjs +1 -1
- package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/utils.js +40 -40
- package/dist/vue3/lib/datepicker/utils.js.map +1 -1
- package/dist/vue3/lib/dropdown/dropdown-separator.cjs +1 -1
- 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 +284 -148
- package/dist/vue3/lib/editor/editor.js.map +1 -1
- package/dist/vue3/lib/general-row/index.cjs +1 -1
- package/dist/vue3/lib/general-row/index.js +6 -4
- package/dist/vue3/lib/general-row/index.js.map +1 -1
- package/dist/vue3/lib/link/link.cjs +1 -1
- package/dist/vue3/lib/link/link.cjs.map +1 -1
- package/dist/vue3/lib/link/link.js +58 -18
- package/dist/vue3/lib/link/link.js.map +1 -1
- package/dist/vue3/lib/list-item-group/list-item-group.cjs +1 -1
- package/dist/vue3/lib/list-item-group/list-item-group.js +5 -5
- package/dist/vue3/lib/message-input/message-input.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input.js +9 -7
- package/dist/vue3/lib/message-input/message-input.js.map +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 +466 -283
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/lib/tooltip-directive/tooltip.cjs +1 -1
- package/dist/vue3/lib/tooltip-directive/tooltip.cjs.map +1 -1
- package/dist/vue3/lib/tooltip-directive/tooltip.js +69 -67
- package/dist/vue3/lib/tooltip-directive/tooltip.js.map +1 -1
- package/dist/vue3/localization/en-US.cjs +6 -0
- package/dist/vue3/localization/en-US.cjs.map +1 -1
- package/dist/vue3/localization/en-US.js +6 -0
- package/dist/vue3/localization/en-US.js.map +1 -1
- package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +68 -1
- package/dist/vue3/types/common/test_utils/node_traversal.d.ts +10 -0
- package/dist/vue3/types/common/test_utils/node_traversal.d.ts.map +1 -0
- package/dist/vue3/types/components/banner/banner.vue.d.ts +136 -2
- package/dist/vue3/types/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/breadcrumbs/breadcrumb_item.vue.d.ts +39 -1
- package/dist/vue3/types/components/breadcrumbs/breadcrumb_item.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +39 -1
- package/dist/vue3/types/components/button/button.vue.d.ts +68 -1
- package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts +68 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +68 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts +4 -0
- package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts +8 -0
- package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +4 -0
- package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/utils.d.ts +1 -1
- package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
- package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +136 -2
- package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/hovercard/hovercard.vue.d.ts +272 -4
- package/dist/vue3/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +136 -2
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/link/link.vue.d.ts +39 -1
- package/dist/vue3/types/components/link/link.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/modal/modal.vue.d.ts +136 -2
- package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice.vue.d.ts +136 -2
- package/dist/vue3/types/components/notice/notice.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts +136 -2
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts +68 -1
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/popover/popover.vue.d.ts +136 -2
- package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +68 -1
- package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +39 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +39 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts +1804 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts.map +1 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/variable/index.d.ts +3 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/variable/index.d.ts.map +1 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/variable/variable.d.ts +3 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/variable/variable.d.ts.map +1 -0
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +87 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/split_button/split_button-alpha.vue.d.ts +68 -1
- package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +68 -1
- package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/split_button/split_button.vue.d.ts +272 -4
- package/dist/vue3/types/components/split_button/split_button.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/tab/tab.vue.d.ts +68 -1
- package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +136 -2
- package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +136 -2
- package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toast/toast.vue.d.ts +544 -8
- package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/vue3/types/directives/tooltip_directive/tooltip.d.ts.map +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +272 -4
- package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +272 -4
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +204 -3
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +136 -2
- package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +272 -4
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +204 -3
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +664 -4
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +631 -9
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +272 -4
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/index.d.ts +1 -0
- package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +68 -1
- package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,41 +1,49 @@
|
|
|
1
|
-
import { EDITOR_SUPPORTED_LINK_PROTOCOLS as
|
|
2
|
-
import { addClassStyleAttrs as
|
|
3
|
-
import { DtIconImage as
|
|
4
|
-
import { DialtoneLocalization as
|
|
5
|
-
import { resolveComponent as h, openBlock as
|
|
6
|
-
import { _ as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
1
|
+
import { EDITOR_SUPPORTED_LINK_PROTOCOLS as Z, EDITOR_DEFAULT_LINK_PREFIX as tt } from "./editor-constants.js";
|
|
2
|
+
import { addClassStyleAttrs as et, removeClassStyleAttrs as it } from "../../common/utils/index.js";
|
|
3
|
+
import { DtIconSearch as ot, DtIconBraces as y, DtIconImage as x, DtIconLink2 as N, DtIconCodeBlock as v, DtIconQuote as S, DtIconAlignJustify as F, DtIconAlignRight as U, DtIconAlignCenter as V, DtIconAlignLeft as M, DtIconListOrdered as Q, DtIconListBullet as q, DtIconStrikethrough as K, DtIconUnderline as P, DtIconItalic as z, DtIconBold as G, DtIconQuickReply as H } from "@dialpad/dialtone-icons/vue3";
|
|
4
|
+
import { DialtoneLocalization as nt } from "../../localization/index.js";
|
|
5
|
+
import { resolveComponent as h, openBlock as u, createElementBlock as _, mergeProps as f, createVNode as c, withCtx as r, Fragment as w, renderList as O, createBlock as d, withKeys as L, withModifiers as g, createTextVNode as A, toDisplayString as m, resolveDynamicComponent as b, createElementVNode as E, createCommentVNode as D, normalizeStyle as rt } from "vue";
|
|
6
|
+
import { _ as st } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
import lt from "../tooltip/tooltip.js";
|
|
8
|
+
import at from "../input/input.js";
|
|
9
|
+
import ut from "../stack/stack.js";
|
|
10
|
+
import ct from "../popover/popover.js";
|
|
11
|
+
import dt from "../button/button.js";
|
|
12
|
+
import ht from "../rich-text-editor/rich-text-editor.js";
|
|
13
|
+
import pt from "../list-item/list-item.js";
|
|
14
|
+
import Bt from "../dropdown/dropdown-separator.js";
|
|
15
|
+
import ft from "../list-item-group/list-item-group.js";
|
|
16
|
+
import { RICH_TEXT_EDITOR_OUTPUT_FORMATS as gt, RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as mt } from "../rich-text-editor/rich-text-editor-constants.js";
|
|
17
|
+
const kt = {
|
|
15
18
|
compatConfig: { MODE: 3 },
|
|
16
19
|
name: "DtRecipeEditor",
|
|
17
20
|
components: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
DtListItemGroup: ft,
|
|
22
|
+
DtDropdownSeparator: Bt,
|
|
23
|
+
DtListItem: pt,
|
|
24
|
+
DtRichTextEditor: ht,
|
|
25
|
+
DtButton: dt,
|
|
26
|
+
DtPopover: ct,
|
|
27
|
+
DtStack: ut,
|
|
28
|
+
DtInput: at,
|
|
29
|
+
DtTooltip: lt,
|
|
30
|
+
DtIconQuickReply: H,
|
|
31
|
+
DtIconBold: G,
|
|
32
|
+
DtIconItalic: z,
|
|
33
|
+
DtIconUnderline: P,
|
|
34
|
+
DtIconStrikethrough: K,
|
|
35
|
+
DtIconListBullet: q,
|
|
36
|
+
DtIconListOrdered: Q,
|
|
37
|
+
DtIconAlignLeft: M,
|
|
38
|
+
DtIconAlignCenter: V,
|
|
39
|
+
DtIconAlignRight: U,
|
|
40
|
+
DtIconAlignJustify: F,
|
|
41
|
+
DtIconQuote: S,
|
|
42
|
+
DtIconCodeBlock: v,
|
|
43
|
+
DtIconLink2: N,
|
|
44
|
+
DtIconImage: x,
|
|
45
|
+
DtIconBraces: y,
|
|
46
|
+
DtIconSearch: ot
|
|
39
47
|
},
|
|
40
48
|
mixins: [],
|
|
41
49
|
inheritAttrs: !1,
|
|
@@ -87,7 +95,7 @@ const ut = {
|
|
|
87
95
|
type: [Boolean, String, Number],
|
|
88
96
|
default: !1,
|
|
89
97
|
validator(t) {
|
|
90
|
-
return typeof t == "string" ?
|
|
98
|
+
return typeof t == "string" ? mt.includes(t) : !0;
|
|
91
99
|
}
|
|
92
100
|
},
|
|
93
101
|
/**
|
|
@@ -210,6 +218,20 @@ const ut = {
|
|
|
210
218
|
type: Boolean,
|
|
211
219
|
default: !1
|
|
212
220
|
},
|
|
221
|
+
/**
|
|
222
|
+
* Show button to add a variable
|
|
223
|
+
*/
|
|
224
|
+
showVariableButton: {
|
|
225
|
+
type: Boolean,
|
|
226
|
+
default: !1
|
|
227
|
+
},
|
|
228
|
+
/**
|
|
229
|
+
* Variable categories to display when variable button is clicked
|
|
230
|
+
*/
|
|
231
|
+
variableCategories: {
|
|
232
|
+
type: Array,
|
|
233
|
+
default: () => []
|
|
234
|
+
},
|
|
213
235
|
/**
|
|
214
236
|
* Show add link default config.
|
|
215
237
|
*/
|
|
@@ -288,7 +310,8 @@ const ut = {
|
|
|
288
310
|
showLinkInput: !1,
|
|
289
311
|
linkInput: "",
|
|
290
312
|
currentButtonRefIndex: 0,
|
|
291
|
-
|
|
313
|
+
variableSearchValue: "",
|
|
314
|
+
i18n: new nt()
|
|
292
315
|
};
|
|
293
316
|
},
|
|
294
317
|
computed: {
|
|
@@ -296,7 +319,10 @@ const ut = {
|
|
|
296
319
|
return this.internalInputValue.length;
|
|
297
320
|
},
|
|
298
321
|
htmlOutputFormat() {
|
|
299
|
-
return
|
|
322
|
+
return gt[2];
|
|
323
|
+
},
|
|
324
|
+
flattenedVariableItems() {
|
|
325
|
+
return this.variableCategories ? this.variableCategories.reduce((t, e) => t.concat(e.items || []), []) : [];
|
|
300
326
|
},
|
|
301
327
|
showingTextFormatButtons() {
|
|
302
328
|
return this.showBoldButton || this.showItalicsButton || this.showStrikeButton || this.showUnderlineButton;
|
|
@@ -309,8 +335,8 @@ const ut = {
|
|
|
309
335
|
},
|
|
310
336
|
orderedRefs() {
|
|
311
337
|
const t = this.buttonGroups.reduce((function(e, o) {
|
|
312
|
-
return o.buttonGroup.forEach((
|
|
313
|
-
e.push(this.getButtonRef(o.key,
|
|
338
|
+
return o.buttonGroup.forEach((l) => {
|
|
339
|
+
e.push(this.getButtonRef(o.key, l.selector));
|
|
314
340
|
}, this), e;
|
|
315
341
|
}).bind(this), []);
|
|
316
342
|
return t.push(this.getButtonRef("custom", "link")), t;
|
|
@@ -334,7 +360,7 @@ const ut = {
|
|
|
334
360
|
showBtn: this.showQuickRepliesButton,
|
|
335
361
|
label: this.i18n.$t("DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL"),
|
|
336
362
|
selector: "quickReplies",
|
|
337
|
-
icon:
|
|
363
|
+
icon: H,
|
|
338
364
|
dataQA: "dt-recipe-editor-quick-replies-btn",
|
|
339
365
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_QUICK_REPLY_BUTTON_LABEL"),
|
|
340
366
|
onClick: this.onQuickRepliesClick
|
|
@@ -346,7 +372,7 @@ const ut = {
|
|
|
346
372
|
{
|
|
347
373
|
showBtn: this.showBoldButton,
|
|
348
374
|
selector: "bold",
|
|
349
|
-
icon:
|
|
375
|
+
icon: G,
|
|
350
376
|
dataQA: "dt-recipe-editor-bold-btn",
|
|
351
377
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_BOLD_BUTTON_LABEL"),
|
|
352
378
|
onClick: this.onBoldTextToggle
|
|
@@ -354,7 +380,7 @@ const ut = {
|
|
|
354
380
|
{
|
|
355
381
|
showBtn: this.showItalicsButton,
|
|
356
382
|
selector: "italic",
|
|
357
|
-
icon:
|
|
383
|
+
icon: z,
|
|
358
384
|
dataQA: "dt-recipe-editor-italics-btn",
|
|
359
385
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_ITALICS_BUTTON_LABEL"),
|
|
360
386
|
onClick: this.onItalicTextToggle
|
|
@@ -362,7 +388,7 @@ const ut = {
|
|
|
362
388
|
{
|
|
363
389
|
showBtn: this.showUnderlineButton,
|
|
364
390
|
selector: "underline",
|
|
365
|
-
icon:
|
|
391
|
+
icon: P,
|
|
366
392
|
dataQA: "dt-recipe-editor-underline-btn",
|
|
367
393
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_UNDERLINE_BUTTON_LABEL"),
|
|
368
394
|
onClick: this.onUnderlineTextToggle
|
|
@@ -370,7 +396,7 @@ const ut = {
|
|
|
370
396
|
{
|
|
371
397
|
showBtn: this.showStrikeButton,
|
|
372
398
|
selector: "strike",
|
|
373
|
-
icon:
|
|
399
|
+
icon: K,
|
|
374
400
|
dataQA: "dt-recipe-editor-strike-btn",
|
|
375
401
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_STRIKE_BUTTON_LABEL"),
|
|
376
402
|
onClick: this.onStrikethroughTextToggle
|
|
@@ -382,7 +408,7 @@ const ut = {
|
|
|
382
408
|
{
|
|
383
409
|
showBtn: this.showAlignLeftButton,
|
|
384
410
|
selector: { textAlign: "left" },
|
|
385
|
-
icon:
|
|
411
|
+
icon: M,
|
|
386
412
|
dataQA: "dt-recipe-editor-align-left-btn",
|
|
387
413
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_ALIGN_LEFT_BUTTON_LABEL"),
|
|
388
414
|
onClick: () => this.onTextAlign("left")
|
|
@@ -390,7 +416,7 @@ const ut = {
|
|
|
390
416
|
{
|
|
391
417
|
showBtn: this.showAlignCenterButton,
|
|
392
418
|
selector: { textAlign: "center" },
|
|
393
|
-
icon:
|
|
419
|
+
icon: V,
|
|
394
420
|
dataQA: "dt-recipe-editor-align-center-btn",
|
|
395
421
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_ALIGN_CENTER_BUTTON_LABEL"),
|
|
396
422
|
onClick: () => this.onTextAlign("center")
|
|
@@ -398,7 +424,7 @@ const ut = {
|
|
|
398
424
|
{
|
|
399
425
|
showBtn: this.showAlignRightButton,
|
|
400
426
|
selector: { textAlign: "right" },
|
|
401
|
-
icon:
|
|
427
|
+
icon: U,
|
|
402
428
|
dataQA: "dt-recipe-editor-align-right-btn",
|
|
403
429
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_ALIGN_RIGHT_BUTTON_LABEL"),
|
|
404
430
|
onClick: () => this.onTextAlign("right")
|
|
@@ -406,7 +432,7 @@ const ut = {
|
|
|
406
432
|
{
|
|
407
433
|
showBtn: this.showAlignJustifyButton,
|
|
408
434
|
selector: { textAlign: "justify" },
|
|
409
|
-
icon:
|
|
435
|
+
icon: F,
|
|
410
436
|
dataQA: "dt-recipe-editor-align-justify-btn",
|
|
411
437
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_ALIGN_JUSTIFY_BUTTON_LABEL"),
|
|
412
438
|
onClick: () => this.onTextAlign("justify")
|
|
@@ -418,7 +444,7 @@ const ut = {
|
|
|
418
444
|
{
|
|
419
445
|
showBtn: this.showListItemsButton,
|
|
420
446
|
selector: "bulletList",
|
|
421
|
-
icon:
|
|
447
|
+
icon: q,
|
|
422
448
|
dataQA: "dt-recipe-editor-list-items-btn",
|
|
423
449
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_BULLET_LIST_BUTTON_LABEL"),
|
|
424
450
|
onClick: this.onBulletListToggle
|
|
@@ -426,7 +452,7 @@ const ut = {
|
|
|
426
452
|
{
|
|
427
453
|
showBtn: this.showOrderedListButton,
|
|
428
454
|
selector: "orderedList",
|
|
429
|
-
icon:
|
|
455
|
+
icon: Q,
|
|
430
456
|
dataQA: "dt-recipe-editor-ordered-list-items-btn",
|
|
431
457
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_ORDERED_LIST_BUTTON_LABEL"),
|
|
432
458
|
onClick: this.onOrderedListToggle
|
|
@@ -438,7 +464,7 @@ const ut = {
|
|
|
438
464
|
{
|
|
439
465
|
showBtn: this.showQuoteButton,
|
|
440
466
|
selector: "blockquote",
|
|
441
|
-
icon:
|
|
467
|
+
icon: S,
|
|
442
468
|
dataQA: "dt-recipe-editor-blockquote-btn",
|
|
443
469
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_QUOTE_BUTTON_LABEL"),
|
|
444
470
|
onClick: this.onBlockquoteToggle
|
|
@@ -446,7 +472,7 @@ const ut = {
|
|
|
446
472
|
{
|
|
447
473
|
showBtn: this.showCodeBlockButton,
|
|
448
474
|
selector: "codeBlock",
|
|
449
|
-
icon:
|
|
475
|
+
icon: v,
|
|
450
476
|
dataQA: "dt-recipe-editor-code-block-btn",
|
|
451
477
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_CODE_BUTTON_LABEL"),
|
|
452
478
|
onClick: this.onCodeBlockToggle
|
|
@@ -454,7 +480,7 @@ const ut = {
|
|
|
454
480
|
{
|
|
455
481
|
showBtn: this.showInlineImageButton,
|
|
456
482
|
selector: "image",
|
|
457
|
-
icon:
|
|
483
|
+
icon: x,
|
|
458
484
|
dataQA: "dt-recipe-editor-inline-image-btn",
|
|
459
485
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_IMAGE_BUTTON_LABEL"),
|
|
460
486
|
// Handle getting image
|
|
@@ -466,12 +492,21 @@ const ut = {
|
|
|
466
492
|
return {
|
|
467
493
|
showBtn: this.showAddLink.showAddLinkButton,
|
|
468
494
|
selector: "link",
|
|
469
|
-
icon:
|
|
495
|
+
icon: N,
|
|
470
496
|
dataQA: "dt-recipe-editor-add-link-btn",
|
|
471
497
|
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_LINK_BUTTON_LABEL"),
|
|
472
498
|
onClick: this.openLinkInput
|
|
473
499
|
};
|
|
474
500
|
},
|
|
501
|
+
variableButton() {
|
|
502
|
+
return {
|
|
503
|
+
showBtn: this.showVariableButton,
|
|
504
|
+
selector: "variable",
|
|
505
|
+
icon: y,
|
|
506
|
+
dataQA: "dt-recipe-editor-variable-btn",
|
|
507
|
+
tooltipMessage: this.i18n.$t("DIALTONE_EDITOR_VARIABLE_BUTTON_LABEL")
|
|
508
|
+
};
|
|
509
|
+
},
|
|
475
510
|
confirmSetLinkButtonLabels() {
|
|
476
511
|
return this.i18n.$ta("DIALTONE_EDITOR_CONFIRM_SET_LINK_BUTTON");
|
|
477
512
|
},
|
|
@@ -483,6 +518,11 @@ const ut = {
|
|
|
483
518
|
},
|
|
484
519
|
showAddLinkButtonLabels() {
|
|
485
520
|
return this.i18n.$ta("DIALTONE_EDITOR_ADD_LINK_BUTTON");
|
|
521
|
+
},
|
|
522
|
+
filteredCategories() {
|
|
523
|
+
return this.variableCategories.filter(
|
|
524
|
+
(t) => this.getFilteredItemsForCategory(t).length
|
|
525
|
+
);
|
|
486
526
|
}
|
|
487
527
|
},
|
|
488
528
|
watch: {
|
|
@@ -491,26 +531,26 @@ const ut = {
|
|
|
491
531
|
}
|
|
492
532
|
},
|
|
493
533
|
methods: {
|
|
494
|
-
removeClassStyleAttrs:
|
|
495
|
-
addClassStyleAttrs:
|
|
534
|
+
removeClassStyleAttrs: it,
|
|
535
|
+
addClassStyleAttrs: et,
|
|
496
536
|
onInputFocus(t) {
|
|
497
537
|
t == null || t.stopPropagation();
|
|
498
538
|
},
|
|
499
539
|
removeLink() {
|
|
500
|
-
var t, e, o,
|
|
501
|
-
(
|
|
540
|
+
var t, e, o, l, s;
|
|
541
|
+
(s = (l = (o = (e = (t = this.$refs.richTextEditor) == null ? void 0 : t.editor) == null ? void 0 : e.chain()) == null ? void 0 : o.focus()) == null ? void 0 : l.unsetLink()) == null || s.run(), this.closeLinkInput();
|
|
502
542
|
},
|
|
503
543
|
setLink(t) {
|
|
504
|
-
var
|
|
505
|
-
const e = (
|
|
544
|
+
var s, i, p;
|
|
545
|
+
const e = (s = this.$refs.richTextEditor) == null ? void 0 : s.editor;
|
|
506
546
|
if (t == null || t.preventDefault(), t == null || t.stopPropagation(), !this.linkInput) {
|
|
507
547
|
this.removeLink();
|
|
508
548
|
return;
|
|
509
549
|
}
|
|
510
|
-
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
|
|
550
|
+
Z.find((k) => k.test(this.linkInput)) || (this.linkInput = `${tt}${this.linkInput}`);
|
|
551
|
+
const l = (p = (i = e == null ? void 0 : e.view) == null ? void 0 : i.state) == null ? void 0 : p.selection;
|
|
552
|
+
l.anchor === l.head ? e.chain().focus().insertContentAt(
|
|
553
|
+
l.anchor,
|
|
514
554
|
`<a class="${this.linkOptions.class}" href=${this.linkInput}>${this.linkInput}</a>`
|
|
515
555
|
).run() : e.chain().focus().extendMarkRange("link").setLink({ href: this.linkInput, class: this.linkOptions.class }).run(), this.closeLinkInput();
|
|
516
556
|
},
|
|
@@ -518,10 +558,10 @@ const ut = {
|
|
|
518
558
|
this.showLinkInput = !0;
|
|
519
559
|
},
|
|
520
560
|
updateInput(t) {
|
|
521
|
-
var e, o,
|
|
561
|
+
var e, o, l;
|
|
522
562
|
if (!t)
|
|
523
563
|
return this.closeLinkInput();
|
|
524
|
-
this.linkInput = (
|
|
564
|
+
this.linkInput = (l = (o = (e = this.$refs.richTextEditor) == null ? void 0 : e.editor) == null ? void 0 : o.getAttributes("link")) == null ? void 0 : l.href;
|
|
525
565
|
},
|
|
526
566
|
closeLinkInput() {
|
|
527
567
|
var t;
|
|
@@ -544,10 +584,10 @@ const ut = {
|
|
|
544
584
|
(t = this.$refs.richTextEditor) == null || t.editor.chain().focus().toggleStrike().run();
|
|
545
585
|
},
|
|
546
586
|
onTextAlign(t) {
|
|
547
|
-
var e, o,
|
|
587
|
+
var e, o, l, s;
|
|
548
588
|
if ((o = (e = this.$refs.richTextEditor) == null ? void 0 : e.editor) != null && o.isActive({ textAlign: t }))
|
|
549
|
-
return (
|
|
550
|
-
(
|
|
589
|
+
return (l = this.$refs.richTextEditor) == null ? void 0 : l.editor.chain().focus().unsetTextAlign().run();
|
|
590
|
+
(s = this.$refs.richTextEditor) == null || s.editor.chain().focus().setTextAlign(t).run();
|
|
551
591
|
},
|
|
552
592
|
onBulletListToggle() {
|
|
553
593
|
var t;
|
|
@@ -567,6 +607,14 @@ const ut = {
|
|
|
567
607
|
onInsertInlineImageClick() {
|
|
568
608
|
this.$emit("inline-image-click");
|
|
569
609
|
},
|
|
610
|
+
insertVariable(t, e) {
|
|
611
|
+
var o;
|
|
612
|
+
(o = this.$refs.richTextEditor) == null || o.editor.chain().focus().insertVariable({
|
|
613
|
+
id: e.id,
|
|
614
|
+
placeholder: e.placeholder || "",
|
|
615
|
+
altText: ""
|
|
616
|
+
}).run();
|
|
617
|
+
},
|
|
570
618
|
insertInlineImage(t) {
|
|
571
619
|
var e;
|
|
572
620
|
(e = this.$refs.richTextEditor) == null || e.editor.chain().focus().setImage({ src: t }).run();
|
|
@@ -616,61 +664,67 @@ const ut = {
|
|
|
616
664
|
this.shiftButtonRefIndex(-1);
|
|
617
665
|
},
|
|
618
666
|
shiftButtonRefIndex(t) {
|
|
619
|
-
const e = this.$refs[this.orderedRefs[this.currentButtonRefIndex]], o = Array.isArray(e) ? e[0] : e,
|
|
620
|
-
this.currentButtonRefIndex =
|
|
621
|
-
const
|
|
667
|
+
const e = this.$refs[this.orderedRefs[this.currentButtonRefIndex]], o = Array.isArray(e) ? e[0] : e, l = (this.currentButtonRefIndex + t) % this.orderedRefs.length;
|
|
668
|
+
this.currentButtonRefIndex = l >= 0 ? l : this.orderedRefs.length + l;
|
|
669
|
+
const s = this.$refs[this.orderedRefs[this.currentButtonRefIndex]], i = Array.isArray(s) ? s[0] : s;
|
|
622
670
|
o.$el.blur(), i.$el.focus();
|
|
671
|
+
},
|
|
672
|
+
getFilteredItemsForCategory(t) {
|
|
673
|
+
const e = this.variableSearchValue.toLowerCase();
|
|
674
|
+
return t.name.toLowerCase().includes(e) ? t.items : t.items.filter(
|
|
675
|
+
(o) => o.name.toLowerCase().includes(e)
|
|
676
|
+
);
|
|
623
677
|
}
|
|
624
678
|
}
|
|
625
|
-
},
|
|
626
|
-
function
|
|
627
|
-
const
|
|
628
|
-
return
|
|
679
|
+
}, Tt = { class: "d-recipe-editor__popover-content" };
|
|
680
|
+
function It(t, e, o, l, s, i) {
|
|
681
|
+
const p = h("dt-button"), k = h("dt-tooltip"), T = h("dt-stack"), j = h("dt-icon-search"), C = h("dt-input"), J = h("dt-list-item"), Y = h("dt-dropdown-separator"), X = h("dt-list-item-group"), R = h("dt-popover"), $ = h("dt-rich-text-editor");
|
|
682
|
+
return u(), _("div", f({ class: "d-recipe-editor" }, i.addClassStyleAttrs(t.$attrs), {
|
|
629
683
|
"data-qa": "dt-recipe-editor",
|
|
630
684
|
role: "presentation",
|
|
631
|
-
onClick: e[
|
|
685
|
+
onClick: e[5] || (e[5] = (a) => t.$refs.richTextEditor.focusEditor())
|
|
632
686
|
}), [
|
|
633
|
-
|
|
687
|
+
c(T, {
|
|
634
688
|
class: "d-recipe-editor__top-bar",
|
|
635
689
|
direction: "row",
|
|
636
690
|
gap: "450"
|
|
637
691
|
}, {
|
|
638
|
-
default:
|
|
639
|
-
(
|
|
640
|
-
key:
|
|
692
|
+
default: r(() => [
|
|
693
|
+
(u(!0), _(w, null, O(i.buttonGroups, (a) => (u(), d(T, {
|
|
694
|
+
key: a.key,
|
|
641
695
|
direction: "row",
|
|
642
696
|
gap: "300"
|
|
643
697
|
}, {
|
|
644
|
-
default:
|
|
645
|
-
(
|
|
646
|
-
key: i.getButtonKey(
|
|
647
|
-
message:
|
|
698
|
+
default: r(() => [
|
|
699
|
+
(u(!0), _(w, null, O(a.buttonGroup, (n) => (u(), d(k, {
|
|
700
|
+
key: i.getButtonKey(a.key, n.selector),
|
|
701
|
+
message: n.tooltipMessage,
|
|
648
702
|
placement: "top"
|
|
649
703
|
}, {
|
|
650
|
-
anchor:
|
|
651
|
-
var
|
|
704
|
+
anchor: r(() => {
|
|
705
|
+
var I, B;
|
|
652
706
|
return [
|
|
653
|
-
|
|
707
|
+
c(p, {
|
|
654
708
|
ref_for: !0,
|
|
655
|
-
ref: i.getButtonRef(
|
|
656
|
-
active: (
|
|
657
|
-
"aria-label":
|
|
658
|
-
"data-qa":
|
|
659
|
-
tabindex: i.canFocus(i.getButtonRef(
|
|
709
|
+
ref: i.getButtonRef(a.key, n.selector),
|
|
710
|
+
active: (B = (I = t.$refs.richTextEditor) == null ? void 0 : I.editor) == null ? void 0 : B.isActive(n.selector),
|
|
711
|
+
"aria-label": n.tooltipMessage,
|
|
712
|
+
"data-qa": n.dataQA,
|
|
713
|
+
tabindex: i.canFocus(i.getButtonRef(a.key, n.selector)) ? 0 : -1,
|
|
660
714
|
importance: "clear",
|
|
661
715
|
kind: "muted",
|
|
662
716
|
size: "xs",
|
|
663
|
-
onClick: (
|
|
717
|
+
onClick: (W) => n.onClick(),
|
|
664
718
|
onKeydown: [
|
|
665
|
-
g(
|
|
666
|
-
g(
|
|
719
|
+
L(g(i.shiftActionBarFocusRight, ["stop"]), ["right"]),
|
|
720
|
+
L(g(i.shiftActionBarFocusLeft, ["stop"]), ["left"])
|
|
667
721
|
]
|
|
668
722
|
}, {
|
|
669
|
-
icon:
|
|
670
|
-
(
|
|
723
|
+
icon: r(() => [
|
|
724
|
+
(u(), d(b(n.icon), { size: "200" }))
|
|
671
725
|
]),
|
|
672
|
-
default:
|
|
673
|
-
|
|
726
|
+
default: r(() => [
|
|
727
|
+
A(" " + m(n == null ? void 0 : n.label), 1)
|
|
674
728
|
]),
|
|
675
729
|
_: 2
|
|
676
730
|
}, 1032, ["active", "aria-label", "data-qa", "tabindex", "onClick", "onKeydown"])
|
|
@@ -678,54 +732,134 @@ function ct(t, e, o, n, r, i) {
|
|
|
678
732
|
}),
|
|
679
733
|
_: 2
|
|
680
734
|
}, 1032, ["message"]))), 128)),
|
|
681
|
-
e[
|
|
735
|
+
e[6] || (e[6] = E("div", { class: "d-recipe-editor__button-group-divider" }, null, -1))
|
|
682
736
|
]),
|
|
683
737
|
_: 2
|
|
684
738
|
}, 1024))), 128)),
|
|
685
|
-
i.
|
|
739
|
+
i.variableButton.showBtn ? (u(), d(T, {
|
|
686
740
|
key: 0,
|
|
687
741
|
direction: "row",
|
|
688
742
|
gap: "300"
|
|
689
743
|
}, {
|
|
690
|
-
default:
|
|
691
|
-
|
|
692
|
-
|
|
744
|
+
default: r(() => [
|
|
745
|
+
c(R, {
|
|
746
|
+
padding: "small",
|
|
747
|
+
"navigation-type": "arrow-keys",
|
|
748
|
+
modal: !1,
|
|
749
|
+
placement: "bottom-start"
|
|
750
|
+
}, {
|
|
751
|
+
anchor: r(({ attrs: a }) => [
|
|
752
|
+
c(k, {
|
|
753
|
+
message: i.variableButton.tooltipMessage,
|
|
754
|
+
placement: "top"
|
|
755
|
+
}, {
|
|
756
|
+
anchor: r(() => [
|
|
757
|
+
c(p, f(a, {
|
|
758
|
+
kind: "muted",
|
|
759
|
+
size: "xs",
|
|
760
|
+
importance: "clear",
|
|
761
|
+
"aria-label": i.variableButton.tooltipMessage,
|
|
762
|
+
"data-qa": i.variableButton.dataQA,
|
|
763
|
+
"label-class": "d-jc-flex-start"
|
|
764
|
+
}), {
|
|
765
|
+
icon: r(() => [
|
|
766
|
+
(u(), d(b(i.variableButton.icon), { size: "200" }))
|
|
767
|
+
]),
|
|
768
|
+
_: 1
|
|
769
|
+
}, 16, ["aria-label", "data-qa"])
|
|
770
|
+
]),
|
|
771
|
+
_: 2
|
|
772
|
+
}, 1032, ["message"])
|
|
773
|
+
]),
|
|
774
|
+
content: r(({ close: a }) => [
|
|
775
|
+
c(C, {
|
|
776
|
+
modelValue: s.variableSearchValue,
|
|
777
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => s.variableSearchValue = n),
|
|
778
|
+
"root-class": "d-p8 d-pb4 d-w264",
|
|
779
|
+
type: "search",
|
|
780
|
+
placeholder: s.i18n.$t("DIALTONE_EDITOR_VARIABLE_POPOVER_SEARCH_PLACEHOLDER"),
|
|
781
|
+
size: "md",
|
|
782
|
+
role: "menuitem"
|
|
783
|
+
}, {
|
|
784
|
+
leftIcon: r(({ iconSize: n }) => [
|
|
785
|
+
c(j, { size: n }, null, 8, ["size"])
|
|
786
|
+
]),
|
|
787
|
+
_: 1
|
|
788
|
+
}, 8, ["modelValue", "placeholder"]),
|
|
789
|
+
(u(!0), _(w, null, O(i.filteredCategories, (n, I) => (u(), d(X, {
|
|
790
|
+
key: n.name,
|
|
791
|
+
heading: n.name,
|
|
792
|
+
"heading-class": "d-headline--sm-compact d-p8"
|
|
793
|
+
}, {
|
|
794
|
+
default: r(() => [
|
|
795
|
+
(u(!0), _(w, null, O(i.getFilteredItemsForCategory(n), (B) => (u(), d(J, {
|
|
796
|
+
key: n.name + B.name,
|
|
797
|
+
role: "menuitem",
|
|
798
|
+
"navigation-type": "arrow-keys",
|
|
799
|
+
onClick: (W) => {
|
|
800
|
+
i.insertVariable(n.name, B), a();
|
|
801
|
+
}
|
|
802
|
+
}, {
|
|
803
|
+
default: r(() => [
|
|
804
|
+
A(m(B.name), 1)
|
|
805
|
+
]),
|
|
806
|
+
_: 2
|
|
807
|
+
}, 1032, ["onClick"]))), 128)),
|
|
808
|
+
I < i.filteredCategories.length - 1 ? (u(), d(Y, { key: 0 })) : D("", !0)
|
|
809
|
+
]),
|
|
810
|
+
_: 2
|
|
811
|
+
}, 1032, ["heading"]))), 128))
|
|
812
|
+
]),
|
|
813
|
+
_: 1
|
|
814
|
+
}),
|
|
815
|
+
e[7] || (e[7] = E("div", { class: "d-recipe-editor__button-group-divider" }, null, -1))
|
|
816
|
+
]),
|
|
817
|
+
_: 1
|
|
818
|
+
})) : D("", !0),
|
|
819
|
+
i.linkButton.showBtn ? (u(), d(T, {
|
|
820
|
+
key: 1,
|
|
821
|
+
direction: "row",
|
|
822
|
+
gap: "300"
|
|
823
|
+
}, {
|
|
824
|
+
default: r(() => [
|
|
825
|
+
c(R, {
|
|
826
|
+
open: s.showLinkInput,
|
|
693
827
|
"show-close-button": !1,
|
|
694
828
|
"data-qa": "dt-recipe-editor-link-input-popover",
|
|
695
829
|
padding: "none",
|
|
696
830
|
placement: "bottom-start",
|
|
697
831
|
onClick: [
|
|
698
832
|
i.onInputFocus,
|
|
699
|
-
|
|
833
|
+
g(i.onInputFocus, ["stop"])
|
|
700
834
|
],
|
|
701
835
|
onOpened: i.updateInput
|
|
702
836
|
}, {
|
|
703
|
-
anchor:
|
|
704
|
-
(
|
|
837
|
+
anchor: r(() => [
|
|
838
|
+
(u(), d(k, {
|
|
705
839
|
key: i.linkButton.key,
|
|
706
840
|
message: i.linkButton.tooltipMessage,
|
|
707
841
|
placement: "top"
|
|
708
842
|
}, {
|
|
709
|
-
anchor:
|
|
710
|
-
var
|
|
843
|
+
anchor: r(() => {
|
|
844
|
+
var a, n;
|
|
711
845
|
return [
|
|
712
|
-
|
|
846
|
+
c(p, {
|
|
713
847
|
ref: i.getButtonRef("custom", "link"),
|
|
714
|
-
active: (
|
|
848
|
+
active: (n = (a = t.$refs.richTextEditor) == null ? void 0 : a.editor) == null ? void 0 : n.isActive(i.linkButton.selector),
|
|
715
849
|
"aria-label": i.linkButton.tooltipMessage,
|
|
716
850
|
"data-qa": i.linkButton.dataQA,
|
|
717
851
|
tabindex: i.canFocus(i.getButtonRef("custom", "link")) ? 0 : -1,
|
|
718
852
|
importance: "clear",
|
|
719
853
|
kind: "muted",
|
|
720
854
|
size: "xs",
|
|
721
|
-
onClick: e[
|
|
855
|
+
onClick: e[1] || (e[1] = (I) => i.linkButton.onClick()),
|
|
722
856
|
onKeydown: [
|
|
723
|
-
g(
|
|
724
|
-
g(
|
|
857
|
+
L(g(i.shiftActionBarFocusRight, ["stop"]), ["right"]),
|
|
858
|
+
L(g(i.shiftActionBarFocusLeft, ["stop"]), ["left"])
|
|
725
859
|
]
|
|
726
860
|
}, {
|
|
727
|
-
icon:
|
|
728
|
-
(
|
|
861
|
+
icon: r(() => [
|
|
862
|
+
(u(), d(b(i.linkButton.icon), { size: "200" }))
|
|
729
863
|
]),
|
|
730
864
|
_: 1
|
|
731
865
|
}, 8, ["active", "aria-label", "data-qa", "tabindex", "onKeydown"])
|
|
@@ -734,60 +868,60 @@ function ct(t, e, o, n, r, i) {
|
|
|
734
868
|
_: 1
|
|
735
869
|
}, 8, ["message"]))
|
|
736
870
|
]),
|
|
737
|
-
content:
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
modelValue:
|
|
742
|
-
"onUpdate:modelValue": e[
|
|
871
|
+
content: r(() => [
|
|
872
|
+
E("div", Tt, [
|
|
873
|
+
E("span", null, m(i.showAddLinkButtonLabels.title), 1),
|
|
874
|
+
c(C, {
|
|
875
|
+
modelValue: s.linkInput,
|
|
876
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => s.linkInput = a),
|
|
743
877
|
"input-aria-label": i.showAddLinkButtonLabels["aria-label"],
|
|
744
878
|
placeholder: o.setLinkPlaceholder,
|
|
745
879
|
"data-qa": "dt-recipe-editor-link-input",
|
|
746
880
|
"input-wrapper-class": "d-recipe-editor-link__input-wrapper",
|
|
747
881
|
onClick: [
|
|
748
882
|
i.onInputFocus,
|
|
749
|
-
|
|
883
|
+
g(i.onInputFocus, ["stop"])
|
|
750
884
|
],
|
|
751
885
|
onFocus: i.onInputFocus,
|
|
752
|
-
onKeydown:
|
|
886
|
+
onKeydown: L(i.setLink, ["enter"])
|
|
753
887
|
}, null, 8, ["modelValue", "input-aria-label", "placeholder", "onClick", "onFocus", "onKeydown"])
|
|
754
888
|
])
|
|
755
889
|
]),
|
|
756
|
-
footerContent:
|
|
757
|
-
|
|
890
|
+
footerContent: r(() => [
|
|
891
|
+
c(T, {
|
|
758
892
|
direction: "row",
|
|
759
893
|
gap: "300",
|
|
760
894
|
class: "d-recipe-editor__popover-footer"
|
|
761
895
|
}, {
|
|
762
|
-
default:
|
|
763
|
-
|
|
896
|
+
default: r(() => [
|
|
897
|
+
c(p, f({
|
|
764
898
|
"data-qa": "dt-recipe-editor-remove-link-btn",
|
|
765
899
|
importance: "clear",
|
|
766
900
|
kind: "muted",
|
|
767
901
|
size: "sm"
|
|
768
902
|
}, i.removeLinkButtonLabels, { onClick: i.removeLink }), {
|
|
769
|
-
default:
|
|
770
|
-
|
|
903
|
+
default: r(() => [
|
|
904
|
+
A(m(i.removeLinkButtonLabels.title), 1)
|
|
771
905
|
]),
|
|
772
906
|
_: 1
|
|
773
907
|
}, 16, ["onClick"]),
|
|
774
|
-
|
|
908
|
+
c(p, f({
|
|
775
909
|
"data-qa": "dt-recipe-editor-set-link-cancel-btn",
|
|
776
910
|
importance: "clear",
|
|
777
911
|
kind: "muted",
|
|
778
912
|
size: "sm"
|
|
779
913
|
}, i.cancelSetLinkButtonLabels, { onClick: i.closeLinkInput }), {
|
|
780
|
-
default:
|
|
781
|
-
|
|
914
|
+
default: r(() => [
|
|
915
|
+
A(m(i.cancelSetLinkButtonLabels.title), 1)
|
|
782
916
|
]),
|
|
783
917
|
_: 1
|
|
784
918
|
}, 16, ["onClick"]),
|
|
785
|
-
|
|
919
|
+
c(p, f({
|
|
786
920
|
"data-qa": "dt-recipe-editor-set-link-confirm-btn",
|
|
787
921
|
size: "sm"
|
|
788
922
|
}, i.confirmSetLinkButtonLabels, { onClick: i.setLink }), {
|
|
789
|
-
default:
|
|
790
|
-
|
|
923
|
+
default: r(() => [
|
|
924
|
+
A(m(i.confirmSetLinkButtonLabels.title), 1)
|
|
791
925
|
]),
|
|
792
926
|
_: 1
|
|
793
927
|
}, 16, ["onClick"])
|
|
@@ -799,22 +933,24 @@ function ct(t, e, o, n, r, i) {
|
|
|
799
933
|
}, 8, ["open", "onClick", "onOpened"])
|
|
800
934
|
]),
|
|
801
935
|
_: 1
|
|
802
|
-
})) :
|
|
936
|
+
})) : D("", !0)
|
|
803
937
|
]),
|
|
804
938
|
_: 1
|
|
805
939
|
}),
|
|
806
|
-
|
|
807
|
-
style:
|
|
940
|
+
E("div", {
|
|
941
|
+
style: rt({ "max-height": o.maxHeight }),
|
|
808
942
|
class: "d-recipe-editor__content"
|
|
809
943
|
}, [
|
|
810
|
-
|
|
944
|
+
c($, f({
|
|
811
945
|
ref: "richTextEditor",
|
|
812
|
-
modelValue:
|
|
813
|
-
"onUpdate:modelValue": e[
|
|
946
|
+
modelValue: s.internalInputValue,
|
|
947
|
+
"onUpdate:modelValue": e[3] || (e[3] = (a) => s.internalInputValue = a),
|
|
814
948
|
"allow-font-color": !0,
|
|
815
949
|
"allow-font-family": !0,
|
|
816
950
|
"allow-inline-images": !0,
|
|
817
951
|
"allow-line-breaks": !0,
|
|
952
|
+
"allow-variable": !0,
|
|
953
|
+
"variable-items": i.flattenedVariableItems,
|
|
818
954
|
"hide-link-bubble-menu": !0,
|
|
819
955
|
"auto-focus": o.autoFocus,
|
|
820
956
|
editable: o.editable,
|
|
@@ -830,13 +966,13 @@ function ct(t, e, o, n, r, i) {
|
|
|
830
966
|
onTextInput: i.onTextInput,
|
|
831
967
|
onBlur: i.onBlur,
|
|
832
968
|
onFocus: i.onFocus,
|
|
833
|
-
onInput: e[
|
|
834
|
-
}), null, 16, ["modelValue", "auto-focus", "editable", "input-aria-label", "input-class", "output-format", "placeholder", "use-div-tags", "allow-tables", "onTextInput", "onBlur", "onFocus"])
|
|
969
|
+
onInput: e[4] || (e[4] = (a) => i.onInput(a))
|
|
970
|
+
}), null, 16, ["modelValue", "variable-items", "auto-focus", "editable", "input-aria-label", "input-class", "output-format", "placeholder", "use-div-tags", "allow-tables", "onTextInput", "onBlur", "onFocus"])
|
|
835
971
|
], 4)
|
|
836
972
|
], 16);
|
|
837
973
|
}
|
|
838
|
-
const
|
|
974
|
+
const Ut = /* @__PURE__ */ st(kt, [["render", It]]);
|
|
839
975
|
export {
|
|
840
|
-
|
|
976
|
+
Ut as default
|
|
841
977
|
};
|
|
842
978
|
//# sourceMappingURL=editor.js.map
|