@dialpad/dialtone-vue 2.190.1 → 2.191.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component-documentation.json +1 -1
- package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/lib/emoji-picker/emoji-picker.js +9 -6
- package/dist/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/lib/message-input/message-input.cjs +1 -1
- package/dist/lib/message-input/message-input.cjs.map +1 -1
- package/dist/lib/message-input/message-input.js +14 -6
- package/dist/lib/message-input/message-input.js.map +1 -1
- package/dist/lib/popover/popover.cjs +1 -1
- package/dist/lib/popover/popover.cjs.map +1 -1
- package/dist/lib/popover/popover.js +1 -1
- package/dist/lib/popover/popover.js.map +1 -1
- package/dist/lib/rich-text-editor/mention-suggestion.cjs +1 -1
- package/dist/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
- package/dist/lib/rich-text-editor/mention-suggestion.js +33 -14
- package/dist/lib/rich-text-editor/mention-suggestion.js.map +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.cjs +4 -4
- package/dist/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.js +326 -307
- package/dist/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/node_modules/@tiptap/vue-2.cjs +1 -1
- package/dist/node_modules/@tiptap/vue-2.cjs.map +1 -1
- package/dist/node_modules/@tiptap/vue-2.js +191 -149
- package/dist/node_modules/@tiptap/vue-2.js.map +1 -1
- package/dist/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
- package/dist/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +16 -16
- package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +16 -16
- package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +16 -16
- package/dist/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -0
- package/dist/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +16 -16
- package/dist/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
- package/dist/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +16 -16
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
- package/package.json +35 -35
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as
|
|
2
|
-
import { Node as q, mergeAttributes as m, InputRule as K, nodePasteRule as
|
|
1
|
+
import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as w, VueNodeViewRenderer as b, EditorContent as P, BubbleMenu as H, Editor as F } from "../../node_modules/@tiptap/vue-2.js";
|
|
2
|
+
import { Node as q, mergeAttributes as m, InputRule as K, nodePasteRule as T, getMarksBetween as U, combineTransactionSteps as N, getChangedRanges as V, findChildrenInRange as z, Mark as W, nodeInputRule as X, Extension as J } from "@tiptap/core";
|
|
3
3
|
import Y from "@tiptap/extension-blockquote";
|
|
4
4
|
import G from "@tiptap/extension-code-block";
|
|
5
5
|
import Q from "@tiptap/extension-code";
|
|
@@ -10,12 +10,12 @@ import te from "@tiptap/extension-hard-break";
|
|
|
10
10
|
import ne from "@tiptap/extension-bold";
|
|
11
11
|
import re from "@tiptap/extension-bullet-list";
|
|
12
12
|
import ie from "@tiptap/extension-italic";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import se from "@tiptap/extension-link";
|
|
14
|
+
import oe from "@tiptap/extension-list-item";
|
|
15
15
|
import ae from "@tiptap/extension-ordered-list";
|
|
16
16
|
import le from "@tiptap/extension-strike";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import ce from "@tiptap/extension-underline";
|
|
18
|
+
import de from "@tiptap/extension-text";
|
|
19
19
|
import ue from "@tiptap/extension-text-align";
|
|
20
20
|
import me from "@tiptap/extension-history";
|
|
21
21
|
import he from "@tiptap/extension-text-style";
|
|
@@ -24,18 +24,18 @@ import pe from "@tiptap/extension-font-family";
|
|
|
24
24
|
import { PluginKey as f, Plugin as ge } from "@tiptap/pm/state";
|
|
25
25
|
import _e from "@tiptap/suggestion";
|
|
26
26
|
import { emojiPattern as M } from "regex-combined-emojis";
|
|
27
|
-
import { n as
|
|
27
|
+
import { n as c } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
|
|
28
28
|
import O from "../emoji/emoji.js";
|
|
29
|
-
import { stringToUnicode as ye, codeToEmojiData as E, emojiRegex as
|
|
29
|
+
import { stringToUnicode as ye, codeToEmojiData as E, emojiRegex as we, emojiShortCodeRegex as be } from "../../common/emoji/index.js";
|
|
30
30
|
import { emojisIndexed as ve } from "@dialpad/dialtone-emojis";
|
|
31
31
|
import xe from "../list-item/list-item.js";
|
|
32
32
|
import v from "../stack/stack.js";
|
|
33
33
|
import x from "tippy.js";
|
|
34
|
-
import { linkRegex as
|
|
35
|
-
import
|
|
34
|
+
import { linkRegex as Ce, getPhoneNumberRegex as ke, warnIfUnmounted as Se } from "../../common/utils/index.js";
|
|
35
|
+
import Te from "@tiptap/extension-image";
|
|
36
36
|
import $ from "@tiptap/extension-mention";
|
|
37
|
-
import
|
|
38
|
-
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as
|
|
37
|
+
import D from "../link/link.js";
|
|
38
|
+
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as Re, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Ee, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as L } from "./rich-text-editor-constants.js";
|
|
39
39
|
import $e from "../avatar/avatar.js";
|
|
40
40
|
import Le from "@dialpad/dialtone-icons/vue2/hash";
|
|
41
41
|
import Ie from "@dialpad/dialtone-icons/vue2/lock";
|
|
@@ -50,14 +50,14 @@ const Me = {
|
|
|
50
50
|
props: y
|
|
51
51
|
};
|
|
52
52
|
var Oe = function() {
|
|
53
|
-
var
|
|
54
|
-
return r("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [r("dt-emoji", { attrs: { size: "500", code:
|
|
55
|
-
},
|
|
53
|
+
var e = this, r = e._self._c;
|
|
54
|
+
return r("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [r("dt-emoji", { attrs: { size: "500", code: e.node.attrs.code } })], 1);
|
|
55
|
+
}, De = [], Be = /* @__PURE__ */ c(
|
|
56
56
|
Me,
|
|
57
57
|
Oe,
|
|
58
|
-
|
|
58
|
+
De
|
|
59
59
|
);
|
|
60
|
-
const Pe =
|
|
60
|
+
const Pe = Be.exports, He = {
|
|
61
61
|
name: "SuggestionList",
|
|
62
62
|
components: {
|
|
63
63
|
DtListItem: xe
|
|
@@ -91,8 +91,8 @@ const Pe = De.exports, He = {
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
methods: {
|
|
94
|
-
onKeyDown({ event:
|
|
95
|
-
return
|
|
94
|
+
onKeyDown({ event: t }) {
|
|
95
|
+
return t.key === "ArrowUp" ? (this.upHandler(), !0) : t.key === "ArrowDown" ? (this.downHandler(), !0) : t.key === "Enter" || t.key === "Tab" ? (this.selectHandler(), !0) : !1;
|
|
96
96
|
},
|
|
97
97
|
upHandler() {
|
|
98
98
|
this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length, this.scrollActiveElementIntoView();
|
|
@@ -102,8 +102,8 @@ const Pe = De.exports, He = {
|
|
|
102
102
|
},
|
|
103
103
|
async scrollActiveElementIntoView() {
|
|
104
104
|
await this.$nextTick();
|
|
105
|
-
const
|
|
106
|
-
|
|
105
|
+
const t = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
|
|
106
|
+
t && t.scrollIntoView({
|
|
107
107
|
behaviour: "smooth",
|
|
108
108
|
block: "center"
|
|
109
109
|
});
|
|
@@ -111,43 +111,43 @@ const Pe = De.exports, He = {
|
|
|
111
111
|
selectHandler() {
|
|
112
112
|
this.selectItem(this.selectedIndex);
|
|
113
113
|
},
|
|
114
|
-
selectItem(
|
|
115
|
-
const
|
|
114
|
+
selectItem(t) {
|
|
115
|
+
const e = this.items[t];
|
|
116
116
|
switch (this.itemType) {
|
|
117
117
|
case "emoji":
|
|
118
|
-
this.command(
|
|
118
|
+
this.command(e);
|
|
119
119
|
return;
|
|
120
120
|
case "mention":
|
|
121
|
-
this.command({ name:
|
|
121
|
+
this.command({ name: e.name, id: e.id, avatarSrc: e.avatarSrc });
|
|
122
122
|
break;
|
|
123
123
|
case "channel":
|
|
124
|
-
this.command({ name:
|
|
124
|
+
this.command({ name: e.name, id: e.id });
|
|
125
125
|
break;
|
|
126
126
|
case "slash-command":
|
|
127
|
-
this.command({ command:
|
|
127
|
+
this.command({ command: e.command });
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
var Fe = function() {
|
|
134
|
-
var
|
|
135
|
-
return r("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [r("ul", { directives: [{ name: "show", rawName: "v-show", value:
|
|
134
|
+
var e = this, r = e._self._c;
|
|
135
|
+
return r("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [r("ul", { directives: [{ name: "show", rawName: "v-show", value: e.items.length, expression: "items.length" }], ref: "suggestionList", staticClass: "d-suggestion-list" }, e._l(e.items, function(n, i) {
|
|
136
136
|
return r("dt-list-item", { key: n.id, class: [
|
|
137
137
|
"d-suggestion-list__item",
|
|
138
|
-
{ "d-list-item--highlighted": i ===
|
|
139
|
-
], attrs: { "navigation-type": "arrow-keys" }, on: { click: function(
|
|
140
|
-
return
|
|
141
|
-
}, keydown: function(
|
|
142
|
-
return
|
|
143
|
-
} } }, [r(
|
|
138
|
+
{ "d-list-item--highlighted": i === e.selectedIndex }
|
|
139
|
+
], attrs: { "navigation-type": "arrow-keys" }, on: { click: function(o) {
|
|
140
|
+
return e.selectItem(i);
|
|
141
|
+
}, keydown: function(o) {
|
|
142
|
+
return o.preventDefault(), e.onKeyDown.apply(null, arguments);
|
|
143
|
+
} } }, [r(e.itemComponent, { tag: "component", attrs: { item: n } })], 1);
|
|
144
144
|
}), 1)]);
|
|
145
|
-
}, qe = [], Ke = /* @__PURE__ */
|
|
145
|
+
}, qe = [], Ke = /* @__PURE__ */ c(
|
|
146
146
|
He,
|
|
147
147
|
Fe,
|
|
148
148
|
qe
|
|
149
149
|
);
|
|
150
|
-
const
|
|
150
|
+
const C = Ke.exports, Ue = {
|
|
151
151
|
name: "EmojiSuggestion",
|
|
152
152
|
components: {
|
|
153
153
|
DtEmoji: O,
|
|
@@ -161,57 +161,57 @@ const k = Ke.exports, Ue = {
|
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
var Ne = function() {
|
|
164
|
-
var
|
|
165
|
-
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [r("dt-emoji", { attrs: { size: "200", code:
|
|
166
|
-
}, Ve = [], ze = /* @__PURE__ */
|
|
164
|
+
var e = this, r = e._self._c;
|
|
165
|
+
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [r("dt-emoji", { attrs: { size: "200", code: e.item.code } }), e._v(" " + e._s(e.item.code) + " ")], 1);
|
|
166
|
+
}, Ve = [], ze = /* @__PURE__ */ c(
|
|
167
167
|
Ue,
|
|
168
168
|
Ne,
|
|
169
169
|
Ve
|
|
170
170
|
);
|
|
171
|
-
const We = ze.exports,
|
|
171
|
+
const We = ze.exports, k = {
|
|
172
172
|
name: "hideOnEsc",
|
|
173
173
|
defaultValue: !0,
|
|
174
|
-
fn({ hide:
|
|
175
|
-
function
|
|
176
|
-
r.keyCode === 27 &&
|
|
174
|
+
fn({ hide: t }) {
|
|
175
|
+
function e(r) {
|
|
176
|
+
r.keyCode === 27 && t();
|
|
177
177
|
}
|
|
178
178
|
return {
|
|
179
179
|
onShow() {
|
|
180
|
-
document.addEventListener("keydown",
|
|
180
|
+
document.addEventListener("keydown", e);
|
|
181
181
|
},
|
|
182
182
|
onHide() {
|
|
183
|
-
document.removeEventListener("keydown",
|
|
183
|
+
document.removeEventListener("keydown", e);
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
187
|
}, Xe = 20, Je = {
|
|
188
|
-
items: ({ query:
|
|
189
|
-
if (
|
|
188
|
+
items: ({ query: t }) => {
|
|
189
|
+
if (t.length < 2)
|
|
190
190
|
return [];
|
|
191
|
-
const
|
|
192
|
-
return
|
|
191
|
+
const e = Object.values(ve);
|
|
192
|
+
return t = t.toLowerCase(), e.filter(
|
|
193
193
|
(n) => [
|
|
194
194
|
n.name,
|
|
195
195
|
n.shortname.replaceAll(":", ""),
|
|
196
196
|
...n.keywords
|
|
197
|
-
].some((i) => i.startsWith(
|
|
197
|
+
].some((i) => i.startsWith(t))
|
|
198
198
|
).splice(0, Xe).map((n) => ({ code: n.shortname }));
|
|
199
199
|
},
|
|
200
|
-
command: ({ editor:
|
|
201
|
-
var
|
|
202
|
-
const n =
|
|
203
|
-
((
|
|
200
|
+
command: ({ editor: t, range: e, props: r }) => {
|
|
201
|
+
var o, s;
|
|
202
|
+
const n = t.view.state.selection.$to.nodeAfter;
|
|
203
|
+
((o = n == null ? void 0 : n.text) == null ? void 0 : o.startsWith(" ")) && (e.to += 1), t.chain().focus().insertContentAt(e, [
|
|
204
204
|
{
|
|
205
205
|
type: "emoji",
|
|
206
206
|
attrs: r
|
|
207
207
|
}
|
|
208
|
-
]).run(), (
|
|
208
|
+
]).run(), (s = window.getSelection()) == null || s.collapseToEnd();
|
|
209
209
|
},
|
|
210
210
|
render: () => {
|
|
211
|
-
let
|
|
211
|
+
let t, e, r = !1;
|
|
212
212
|
return {
|
|
213
213
|
onStart: (n) => {
|
|
214
|
-
|
|
214
|
+
t = new w(C, {
|
|
215
215
|
parent: void 0,
|
|
216
216
|
propsData: {
|
|
217
217
|
itemComponent: We,
|
|
@@ -219,10 +219,10 @@ const We = ze.exports, C = {
|
|
|
219
219
|
...n
|
|
220
220
|
},
|
|
221
221
|
editor: n.editor
|
|
222
|
-
}), n.clientRect && (
|
|
222
|
+
}), n.clientRect && (e = x("body", {
|
|
223
223
|
getReferenceClientRect: n.clientRect,
|
|
224
224
|
appendTo: () => document.body,
|
|
225
|
-
content:
|
|
225
|
+
content: t.element,
|
|
226
226
|
showOnCreate: !1,
|
|
227
227
|
onShow: () => {
|
|
228
228
|
r = !0;
|
|
@@ -234,28 +234,28 @@ const We = ze.exports, C = {
|
|
|
234
234
|
trigger: "manual",
|
|
235
235
|
placement: "top-start",
|
|
236
236
|
zIndex: 650,
|
|
237
|
-
plugins: [
|
|
238
|
-
}), n.items.length > 0 && (
|
|
237
|
+
plugins: [k]
|
|
238
|
+
}), n.items.length > 0 && (e == null || e[0].show()));
|
|
239
239
|
},
|
|
240
240
|
onUpdate(n) {
|
|
241
|
-
|
|
241
|
+
t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), e == null || e[0].setProps({
|
|
242
242
|
getReferenceClientRect: n.clientRect
|
|
243
243
|
});
|
|
244
244
|
},
|
|
245
245
|
onKeyDown(n) {
|
|
246
246
|
var i;
|
|
247
247
|
if (r)
|
|
248
|
-
return (i =
|
|
248
|
+
return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
|
|
249
249
|
},
|
|
250
250
|
onExit() {
|
|
251
|
-
|
|
251
|
+
e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
}, Ye = /(:\w+:)$/, Ge = new RegExp(M + "$"), Qe = (
|
|
256
|
-
if (
|
|
257
|
-
return { text:
|
|
258
|
-
}, Ze = (
|
|
255
|
+
}, Ye = /(:\w+:)$/, Ge = new RegExp(M + "$"), Qe = (t) => {
|
|
256
|
+
if (t && E(t[0]))
|
|
257
|
+
return { text: t[2] || t[0] };
|
|
258
|
+
}, Ze = (t) => [...t.matchAll(be)].filter((r) => E(r[0])).map((r) => ({
|
|
259
259
|
index: r.index,
|
|
260
260
|
text: r[0],
|
|
261
261
|
match: r
|
|
@@ -271,7 +271,7 @@ const We = ze.exports, C = {
|
|
|
271
271
|
selectable: !1,
|
|
272
272
|
atom: !0,
|
|
273
273
|
addNodeView() {
|
|
274
|
-
return
|
|
274
|
+
return b(Pe);
|
|
275
275
|
},
|
|
276
276
|
addAttributes() {
|
|
277
277
|
return {
|
|
@@ -287,44 +287,44 @@ const We = ze.exports, C = {
|
|
|
287
287
|
}
|
|
288
288
|
];
|
|
289
289
|
},
|
|
290
|
-
renderText({ node:
|
|
291
|
-
return ye(E(
|
|
290
|
+
renderText({ node: t }) {
|
|
291
|
+
return ye(E(t.attrs.code).unicode_output);
|
|
292
292
|
},
|
|
293
|
-
renderHTML({ HTMLAttributes:
|
|
294
|
-
return ["emoji-component", m(this.options.HTMLAttributes,
|
|
293
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
294
|
+
return ["emoji-component", m(this.options.HTMLAttributes, t)];
|
|
295
295
|
},
|
|
296
296
|
addInputRules() {
|
|
297
297
|
return [
|
|
298
298
|
new K({
|
|
299
|
-
find: (
|
|
300
|
-
const
|
|
301
|
-
if (
|
|
302
|
-
return Qe(
|
|
299
|
+
find: (t) => {
|
|
300
|
+
const e = t.match(Ye) || t.match(Ge);
|
|
301
|
+
if (e)
|
|
302
|
+
return Qe(e);
|
|
303
303
|
},
|
|
304
|
-
handler: ({ state:
|
|
305
|
-
const { tr:
|
|
306
|
-
|
|
304
|
+
handler: ({ state: t, range: e, match: r, commands: n, chain: i, can: o }) => {
|
|
305
|
+
const { tr: s } = t, a = e.from, l = e.to;
|
|
306
|
+
s.replaceWith(a, l, this.type.create({ code: r[0] }));
|
|
307
307
|
}
|
|
308
308
|
})
|
|
309
309
|
];
|
|
310
310
|
},
|
|
311
311
|
addPasteRules() {
|
|
312
312
|
return [
|
|
313
|
-
|
|
313
|
+
T({
|
|
314
314
|
find: Ze,
|
|
315
315
|
type: this.type,
|
|
316
|
-
getAttributes(
|
|
316
|
+
getAttributes(t) {
|
|
317
317
|
return {
|
|
318
|
-
code:
|
|
318
|
+
code: t[0]
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
}),
|
|
322
|
-
|
|
323
|
-
find:
|
|
322
|
+
T({
|
|
323
|
+
find: we,
|
|
324
324
|
type: this.type,
|
|
325
|
-
getAttributes(
|
|
325
|
+
getAttributes(t) {
|
|
326
326
|
return {
|
|
327
|
-
code:
|
|
327
|
+
code: t[0]
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
})
|
|
@@ -343,42 +343,42 @@ const We = ze.exports, C = {
|
|
|
343
343
|
},
|
|
344
344
|
addKeyboardShortcuts() {
|
|
345
345
|
return {
|
|
346
|
-
Backspace: () => this.editor.commands.command(({ tr:
|
|
346
|
+
Backspace: () => this.editor.commands.command(({ tr: t, state: e }) => {
|
|
347
347
|
let r = !1;
|
|
348
|
-
const { selection: n } =
|
|
349
|
-
return i ? (
|
|
350
|
-
if (
|
|
351
|
-
return r = !0,
|
|
348
|
+
const { selection: n } = e, { empty: i, anchor: o } = n;
|
|
349
|
+
return i ? (e.doc.nodesBetween(o - 1, o, (s, a) => {
|
|
350
|
+
if (s.type.name === this.name)
|
|
351
|
+
return r = !0, t.insertText("", a, a + s.nodeSize), !1;
|
|
352
352
|
}), r) : !1;
|
|
353
353
|
})
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
356
|
});
|
|
357
|
-
function tt(
|
|
357
|
+
function tt(t, e, r = () => !0) {
|
|
358
358
|
const n = [];
|
|
359
|
-
|
|
359
|
+
e.lastIndex = 0;
|
|
360
360
|
let i;
|
|
361
|
-
for (; i =
|
|
362
|
-
r(
|
|
361
|
+
for (; i = e.exec(t); )
|
|
362
|
+
r(t, i) && n.push(i);
|
|
363
363
|
return n;
|
|
364
364
|
}
|
|
365
|
-
function nt(
|
|
366
|
-
return !["#", "@"].includes(
|
|
365
|
+
function nt(t, e) {
|
|
366
|
+
return !["#", "@"].includes(t.charAt(e.index)) && !["#", "@"].includes(t.charAt(e.index - 1));
|
|
367
367
|
}
|
|
368
|
-
function rt(
|
|
369
|
-
const
|
|
368
|
+
function rt(t) {
|
|
369
|
+
const e = new RegExp(
|
|
370
370
|
"(?:" + [
|
|
371
371
|
`[!?.,:;'"]`,
|
|
372
372
|
"(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"
|
|
373
373
|
].join("|"),
|
|
374
374
|
"g"
|
|
375
375
|
);
|
|
376
|
-
return
|
|
376
|
+
return t.replace(e, "");
|
|
377
377
|
}
|
|
378
|
-
function it(
|
|
379
|
-
const r =
|
|
378
|
+
function it(t, e) {
|
|
379
|
+
const r = t.slice(0, e + 1).search(/\S+\s*$/), n = t.slice(e).search(/\s/);
|
|
380
380
|
if (n < 0) {
|
|
381
|
-
const i =
|
|
381
|
+
const i = t.slice(r);
|
|
382
382
|
return {
|
|
383
383
|
text: i,
|
|
384
384
|
from: r,
|
|
@@ -386,61 +386,61 @@ function it(e, t) {
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
return {
|
|
389
|
-
text:
|
|
389
|
+
text: t.slice(r, n + e),
|
|
390
390
|
from: r,
|
|
391
|
-
to: n +
|
|
391
|
+
to: n + e
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const i = it(
|
|
394
|
+
function R(t, e, r, n) {
|
|
395
|
+
const i = it(t, e);
|
|
396
396
|
if (n.lastIndex = 0, !n.test(i.text))
|
|
397
397
|
return i;
|
|
398
|
-
const
|
|
399
|
-
return
|
|
398
|
+
const o = r === "left" ? i.from - 1 : i.to + 1;
|
|
399
|
+
return o <= 0 || o >= t.length || o === e ? i : R(t, o, r, n);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
const i = Math.max(
|
|
403
|
-
for (const a of
|
|
401
|
+
function st(t, e, r, n) {
|
|
402
|
+
const i = Math.max(t.from - 1, 0), o = Math.min(t.to + 1, e.content.size), s = U(i, o, e);
|
|
403
|
+
for (const a of s)
|
|
404
404
|
a.mark.type === n && r.removeMark(a.from, a.to, n);
|
|
405
405
|
}
|
|
406
|
-
const I =
|
|
407
|
-
function A(
|
|
408
|
-
if (!
|
|
406
|
+
const I = ke(1, 15);
|
|
407
|
+
function A(t, e, r, n, i, o) {
|
|
408
|
+
if (!t)
|
|
409
409
|
return;
|
|
410
|
-
let
|
|
411
|
-
|
|
412
|
-
const a = n -
|
|
413
|
-
|
|
414
|
-
|
|
410
|
+
let s = r - e - 1;
|
|
411
|
+
s = s < 0 ? 0 : s;
|
|
412
|
+
const a = n - e, l = R(
|
|
413
|
+
t,
|
|
414
|
+
s,
|
|
415
415
|
"left",
|
|
416
416
|
I
|
|
417
|
-
),
|
|
418
|
-
|
|
417
|
+
), d = R(
|
|
418
|
+
t,
|
|
419
419
|
a,
|
|
420
420
|
"right",
|
|
421
421
|
I
|
|
422
|
-
), u =
|
|
423
|
-
tt(u,
|
|
424
|
-
const h = rt(S[0]), g =
|
|
425
|
-
i.addMark(g,
|
|
422
|
+
), u = t.slice(l.from, d.to);
|
|
423
|
+
tt(u, Ce, nt).forEach((S) => {
|
|
424
|
+
const h = rt(S[0]), g = e + l.from + S.index + 1, B = g + h.length;
|
|
425
|
+
i.addMark(g, B, o.create());
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
|
-
function
|
|
429
|
-
let
|
|
428
|
+
function ot(t) {
|
|
429
|
+
let e = !1;
|
|
430
430
|
return new ge({
|
|
431
431
|
key: new f("autolink"),
|
|
432
432
|
appendTransaction: (r, n, i) => {
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
433
|
+
const o = r.some((u) => u.docChanged) && !n.doc.eq(i.doc);
|
|
434
|
+
if (e && !o)
|
|
435
435
|
return;
|
|
436
|
-
const { tr:
|
|
437
|
-
|
|
436
|
+
const { tr: s } = i, { textContent: a } = i.doc;
|
|
437
|
+
e || A(a, 0, 0, a.length, s, t.type), e = !0;
|
|
438
438
|
const l = N(
|
|
439
439
|
n.doc,
|
|
440
440
|
[...r]
|
|
441
441
|
);
|
|
442
442
|
return V(l).forEach(({ oldRange: u, newRange: p }) => {
|
|
443
|
-
|
|
443
|
+
st(p, i.doc, s, t.type), z(
|
|
444
444
|
i.doc,
|
|
445
445
|
p,
|
|
446
446
|
(h) => h.isTextblock
|
|
@@ -450,11 +450,11 @@ function st(e) {
|
|
|
450
450
|
g,
|
|
451
451
|
u.from,
|
|
452
452
|
p.to,
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
s,
|
|
454
|
+
t.type
|
|
455
455
|
);
|
|
456
456
|
});
|
|
457
|
-
}),
|
|
457
|
+
}), s;
|
|
458
458
|
}
|
|
459
459
|
});
|
|
460
460
|
}
|
|
@@ -463,25 +463,25 @@ const at = {
|
|
|
463
463
|
rel: "noopener noreferrer nofollow"
|
|
464
464
|
}, lt = W.create({
|
|
465
465
|
name: "CustomLink",
|
|
466
|
-
renderHTML({ HTMLAttributes:
|
|
466
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
467
467
|
return [
|
|
468
468
|
"a",
|
|
469
469
|
m(
|
|
470
470
|
this.options.HTMLAttributes,
|
|
471
|
-
|
|
471
|
+
t,
|
|
472
472
|
at
|
|
473
473
|
)
|
|
474
474
|
];
|
|
475
475
|
},
|
|
476
|
-
renderText({ node:
|
|
477
|
-
return
|
|
476
|
+
renderText({ node: t }) {
|
|
477
|
+
return t.attrs.text;
|
|
478
478
|
},
|
|
479
479
|
addProseMirrorPlugins() {
|
|
480
480
|
return [
|
|
481
|
-
|
|
481
|
+
ot({ type: this.type })
|
|
482
482
|
];
|
|
483
483
|
}
|
|
484
|
-
}),
|
|
484
|
+
}), ct = Te.extend({
|
|
485
485
|
name: "ConfigurableImage",
|
|
486
486
|
addAttributes() {
|
|
487
487
|
return {
|
|
@@ -505,18 +505,18 @@ const at = {
|
|
|
505
505
|
}
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
|
-
}).configure({ inline: !0, allowBase64: !0 }),
|
|
508
|
+
}).configure({ inline: !0, allowBase64: !0 }), dt = j.extend({
|
|
509
509
|
parseHTML() {
|
|
510
510
|
return [{ tag: "div" }];
|
|
511
511
|
},
|
|
512
|
-
renderHTML({ HTMLAttributes:
|
|
513
|
-
return ["div", m(this.options.HTMLAttributes,
|
|
512
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
513
|
+
return ["div", m(this.options.HTMLAttributes, t), 0];
|
|
514
514
|
}
|
|
515
515
|
}), ut = {
|
|
516
516
|
name: "MentionComponent",
|
|
517
517
|
components: {
|
|
518
518
|
NodeViewWrapper: _,
|
|
519
|
-
DtLink:
|
|
519
|
+
DtLink: D
|
|
520
520
|
},
|
|
521
521
|
props: y,
|
|
522
522
|
computed: {
|
|
@@ -526,16 +526,16 @@ const at = {
|
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
528
|
var mt = function() {
|
|
529
|
-
var
|
|
530
|
-
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [
|
|
531
|
-
}, ht = [], ft = /* @__PURE__ */
|
|
529
|
+
var e = this, r = e._self._c;
|
|
530
|
+
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
|
|
531
|
+
}, ht = [], ft = /* @__PURE__ */ c(
|
|
532
532
|
ut,
|
|
533
533
|
mt,
|
|
534
534
|
ht
|
|
535
535
|
);
|
|
536
536
|
const pt = ft.exports, gt = $.extend({
|
|
537
537
|
addNodeView() {
|
|
538
|
-
return
|
|
538
|
+
return b(pt);
|
|
539
539
|
},
|
|
540
540
|
parseHTML() {
|
|
541
541
|
return [
|
|
@@ -557,11 +557,11 @@ const pt = ft.exports, gt = $.extend({
|
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
},
|
|
560
|
-
renderText({ node:
|
|
561
|
-
return `@${
|
|
560
|
+
renderText({ node: t }) {
|
|
561
|
+
return `@${t.attrs.id}`;
|
|
562
562
|
},
|
|
563
|
-
renderHTML({ HTMLAttributes:
|
|
564
|
-
return ["mention-component", m(this.options.HTMLAttributes,
|
|
563
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
564
|
+
return ["mention-component", m(this.options.HTMLAttributes, t)];
|
|
565
565
|
}
|
|
566
566
|
}).configure({
|
|
567
567
|
suggestion: {
|
|
@@ -572,7 +572,7 @@ const pt = ft.exports, gt = $.extend({
|
|
|
572
572
|
name: "ChannelComponent",
|
|
573
573
|
components: {
|
|
574
574
|
NodeViewWrapper: _,
|
|
575
|
-
DtLink:
|
|
575
|
+
DtLink: D
|
|
576
576
|
},
|
|
577
577
|
props: y,
|
|
578
578
|
computed: {
|
|
@@ -582,17 +582,17 @@ const pt = ft.exports, gt = $.extend({
|
|
|
582
582
|
}
|
|
583
583
|
};
|
|
584
584
|
var yt = function() {
|
|
585
|
-
var
|
|
586
|
-
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [
|
|
587
|
-
},
|
|
585
|
+
var e = this, r = e._self._c;
|
|
586
|
+
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
|
|
587
|
+
}, wt = [], bt = /* @__PURE__ */ c(
|
|
588
588
|
_t,
|
|
589
589
|
yt,
|
|
590
|
-
|
|
590
|
+
wt
|
|
591
591
|
);
|
|
592
|
-
const vt =
|
|
592
|
+
const vt = bt.exports, xt = $.extend({
|
|
593
593
|
name: "channel",
|
|
594
594
|
addNodeView() {
|
|
595
|
-
return
|
|
595
|
+
return b(vt);
|
|
596
596
|
},
|
|
597
597
|
parseHTML() {
|
|
598
598
|
return [
|
|
@@ -614,18 +614,18 @@ const vt = wt.exports, xt = $.extend({
|
|
|
614
614
|
}
|
|
615
615
|
};
|
|
616
616
|
},
|
|
617
|
-
renderText({ node:
|
|
618
|
-
return `#${
|
|
617
|
+
renderText({ node: t }) {
|
|
618
|
+
return `#${t.attrs.id}`;
|
|
619
619
|
},
|
|
620
|
-
renderHTML({ HTMLAttributes:
|
|
621
|
-
return ["channel-component", m(this.options.HTMLAttributes,
|
|
620
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
621
|
+
return ["channel-component", m(this.options.HTMLAttributes, t)];
|
|
622
622
|
}
|
|
623
623
|
}).configure({
|
|
624
624
|
suggestion: {
|
|
625
625
|
char: "#",
|
|
626
626
|
pluginKey: new f("channelSuggestion")
|
|
627
627
|
}
|
|
628
|
-
}),
|
|
628
|
+
}), Ct = {
|
|
629
629
|
name: "SlashCommandsComponent",
|
|
630
630
|
components: {
|
|
631
631
|
NodeViewWrapper: _
|
|
@@ -641,15 +641,15 @@ const vt = wt.exports, xt = $.extend({
|
|
|
641
641
|
this.$parent.$emit("selected-command", this.$props.node.attrs.command);
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
|
-
var
|
|
645
|
-
var
|
|
646
|
-
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [
|
|
647
|
-
}, St = [],
|
|
648
|
-
kt,
|
|
644
|
+
var kt = function() {
|
|
645
|
+
var e = this, r = e._self._c;
|
|
646
|
+
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [e._v(" " + e._s(e.text) + " ")]);
|
|
647
|
+
}, St = [], Tt = /* @__PURE__ */ c(
|
|
649
648
|
Ct,
|
|
649
|
+
kt,
|
|
650
650
|
St
|
|
651
651
|
);
|
|
652
|
-
const
|
|
652
|
+
const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
|
|
653
653
|
let i = n[2];
|
|
654
654
|
return i.endsWith(" ") || (i += " "), {
|
|
655
655
|
index: n.index,
|
|
@@ -661,7 +661,7 @@ const Tt = Rt.exports, Et = (e, t) => [...e.matchAll(t)].map((n) => {
|
|
|
661
661
|
group: "inline",
|
|
662
662
|
inline: !0,
|
|
663
663
|
addNodeView() {
|
|
664
|
-
return
|
|
664
|
+
return b(Rt);
|
|
665
665
|
},
|
|
666
666
|
parseHTML() {
|
|
667
667
|
return [
|
|
@@ -683,18 +683,18 @@ const Tt = Rt.exports, Et = (e, t) => [...e.matchAll(t)].map((n) => {
|
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
685
|
},
|
|
686
|
-
renderText({ node:
|
|
687
|
-
return `/${
|
|
686
|
+
renderText({ node: t }) {
|
|
687
|
+
return `/${t.attrs.command}`;
|
|
688
688
|
},
|
|
689
|
-
renderHTML({ HTMLAttributes:
|
|
690
|
-
return ["command-component", m(this.options.HTMLAttributes,
|
|
689
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
690
|
+
return ["command-component", m(this.options.HTMLAttributes, t)];
|
|
691
691
|
},
|
|
692
692
|
addInputRules() {
|
|
693
693
|
var r;
|
|
694
|
-
const
|
|
694
|
+
const t = (r = this.options.suggestion) == null ? void 0 : r.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) $`);
|
|
695
695
|
return [
|
|
696
696
|
X({
|
|
697
|
-
find:
|
|
697
|
+
find: e,
|
|
698
698
|
type: this.type,
|
|
699
699
|
getAttributes(n) {
|
|
700
700
|
return { command: n[2] };
|
|
@@ -704,10 +704,10 @@ const Tt = Rt.exports, Et = (e, t) => [...e.matchAll(t)].map((n) => {
|
|
|
704
704
|
},
|
|
705
705
|
addPasteRules() {
|
|
706
706
|
var r;
|
|
707
|
-
const
|
|
707
|
+
const t = (r = this.options.suggestion) == null ? void 0 : r.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
|
|
708
708
|
return [
|
|
709
|
-
|
|
710
|
-
find: (n) => Et(n,
|
|
709
|
+
T({
|
|
710
|
+
find: (n) => Et(n, e),
|
|
711
711
|
type: this.type,
|
|
712
712
|
getAttributes(n) {
|
|
713
713
|
return { command: n[0].trim() };
|
|
@@ -738,13 +738,33 @@ const Tt = Rt.exports, Et = (e, t) => [...e.matchAll(t)].map((n) => {
|
|
|
738
738
|
},
|
|
739
739
|
avatarSrc() {
|
|
740
740
|
return this.item.avatarSrc;
|
|
741
|
+
},
|
|
742
|
+
presence() {
|
|
743
|
+
return this.item.presence;
|
|
744
|
+
},
|
|
745
|
+
status() {
|
|
746
|
+
return this.item.status;
|
|
747
|
+
},
|
|
748
|
+
presenceText() {
|
|
749
|
+
return this.item.presenceText;
|
|
750
|
+
},
|
|
751
|
+
presenceFontColorClass() {
|
|
752
|
+
return {
|
|
753
|
+
active: "d-recipe-contact-row--active",
|
|
754
|
+
busy: "d-recipe-contact-row--busy",
|
|
755
|
+
away: "d-recipe-contact-row--away",
|
|
756
|
+
offline: "d-recipe-contact-row--busy"
|
|
757
|
+
}[this.presence];
|
|
758
|
+
},
|
|
759
|
+
showDetails() {
|
|
760
|
+
return this.item.showDetails;
|
|
741
761
|
}
|
|
742
762
|
}
|
|
743
763
|
};
|
|
744
764
|
var It = function() {
|
|
745
|
-
var
|
|
746
|
-
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [r("dt-avatar", { attrs: { "full-name":
|
|
747
|
-
}, At = [], jt = /* @__PURE__ */
|
|
765
|
+
var e = this, r = e._self._c;
|
|
766
|
+
return r("dt-stack", { staticClass: "d-mention-suggestion__container", attrs: { direction: "row", gap: "400" } }, [r("dt-avatar", { attrs: { "full-name": e.name, "image-src": e.avatarSrc, "image-alt": e.name, "show-presence": e.showDetails, presence: e.presence, size: "sm" } }), r("dt-stack", { staticClass: "d-mention-suggestion__details-container", attrs: { gap: "100" } }, [r("span", { staticClass: "d-mention-suggestion__name" }, [e._v(" " + e._s(e.name) + " ")]), e.showDetails ? r("dt-stack", { staticClass: "d-label--sm-plain", attrs: { direction: "row", gap: "300" } }, [e.presenceText ? r("span", { staticClass: "d-mention-suggestion__presence", class: [e.presenceFontColorClass] }, [e._v(" " + e._s(e.presenceText) + " ")]) : e._e(), e.status && e.presenceText ? r("div", { staticClass: "d-mention-suggestion__divider" }, [e._v(" • ")]) : e._e(), e.status ? r("div", { staticClass: "d-mention-suggestion__status" }, [e._v(" " + e._s(e.status) + " ")]) : e._e()]) : e._e()], 1)], 1);
|
|
767
|
+
}, At = [], jt = /* @__PURE__ */ c(
|
|
748
768
|
Lt,
|
|
749
769
|
It,
|
|
750
770
|
At
|
|
@@ -755,10 +775,10 @@ const Mt = jt.exports, Ot = {
|
|
|
755
775
|
// items: ({ query }) => { return [] },
|
|
756
776
|
allowSpaces: !0,
|
|
757
777
|
render: () => {
|
|
758
|
-
let
|
|
778
|
+
let t, e, r = !1;
|
|
759
779
|
return {
|
|
760
780
|
onStart: (n) => {
|
|
761
|
-
|
|
781
|
+
t = new w(C, {
|
|
762
782
|
parent: void 0,
|
|
763
783
|
propsData: {
|
|
764
784
|
itemComponent: Mt,
|
|
@@ -766,10 +786,10 @@ const Mt = jt.exports, Ot = {
|
|
|
766
786
|
...n
|
|
767
787
|
},
|
|
768
788
|
editor: n.editor
|
|
769
|
-
}), n.clientRect && (
|
|
789
|
+
}), n.clientRect && (e = x("body", {
|
|
770
790
|
getReferenceClientRect: n.clientRect,
|
|
771
791
|
appendTo: () => document.body,
|
|
772
|
-
content:
|
|
792
|
+
content: t.element,
|
|
773
793
|
showOnCreate: !1,
|
|
774
794
|
onShow: () => {
|
|
775
795
|
r = !0;
|
|
@@ -781,25 +801,25 @@ const Mt = jt.exports, Ot = {
|
|
|
781
801
|
trigger: "manual",
|
|
782
802
|
placement: "top-start",
|
|
783
803
|
zIndex: 650,
|
|
784
|
-
plugins: [
|
|
785
|
-
}), n.items.length > 0 && (
|
|
804
|
+
plugins: [k]
|
|
805
|
+
}), n.items.length > 0 && (e == null || e[0].show()));
|
|
786
806
|
},
|
|
787
807
|
onUpdate(n) {
|
|
788
|
-
|
|
808
|
+
t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
|
|
789
809
|
getReferenceClientRect: n.clientRect
|
|
790
810
|
}));
|
|
791
811
|
},
|
|
792
812
|
onKeyDown(n) {
|
|
793
813
|
var i;
|
|
794
814
|
if (r)
|
|
795
|
-
return (i =
|
|
815
|
+
return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
|
|
796
816
|
},
|
|
797
817
|
onExit() {
|
|
798
|
-
|
|
818
|
+
e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
|
|
799
819
|
}
|
|
800
820
|
};
|
|
801
821
|
}
|
|
802
|
-
},
|
|
822
|
+
}, Dt = {
|
|
803
823
|
name: "ChannelSuggestion",
|
|
804
824
|
components: {
|
|
805
825
|
DtStack: v,
|
|
@@ -818,12 +838,12 @@ const Mt = jt.exports, Ot = {
|
|
|
818
838
|
}
|
|
819
839
|
}
|
|
820
840
|
};
|
|
821
|
-
var
|
|
822
|
-
var
|
|
823
|
-
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [
|
|
824
|
-
}, Pt = [], Ht = /* @__PURE__ */
|
|
825
|
-
Bt,
|
|
841
|
+
var Bt = function() {
|
|
842
|
+
var e = this, r = e._self._c;
|
|
843
|
+
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [e.item.locked ? r("dt-icon-lock", { attrs: { size: "300" } }) : r("dt-icon-hash", { attrs: { size: "300" } }), r("span", [e._v(e._s(e.name))])], 1);
|
|
844
|
+
}, Pt = [], Ht = /* @__PURE__ */ c(
|
|
826
845
|
Dt,
|
|
846
|
+
Bt,
|
|
827
847
|
Pt
|
|
828
848
|
);
|
|
829
849
|
const Ft = Ht.exports, qt = {
|
|
@@ -832,10 +852,10 @@ const Ft = Ht.exports, qt = {
|
|
|
832
852
|
// items: ({ query }) => { return [] },
|
|
833
853
|
allowSpaces: !0,
|
|
834
854
|
render: () => {
|
|
835
|
-
let
|
|
855
|
+
let t, e, r = !1;
|
|
836
856
|
return {
|
|
837
857
|
onStart: (n) => {
|
|
838
|
-
|
|
858
|
+
t = new w(C, {
|
|
839
859
|
parent: void 0,
|
|
840
860
|
propsData: {
|
|
841
861
|
itemComponent: Ft,
|
|
@@ -843,10 +863,10 @@ const Ft = Ht.exports, qt = {
|
|
|
843
863
|
...n
|
|
844
864
|
},
|
|
845
865
|
editor: n.editor
|
|
846
|
-
}), n.clientRect && (
|
|
866
|
+
}), n.clientRect && (e = x("body", {
|
|
847
867
|
getReferenceClientRect: n.clientRect,
|
|
848
868
|
appendTo: () => document.body,
|
|
849
|
-
content:
|
|
869
|
+
content: t.element,
|
|
850
870
|
showOnCreate: !1,
|
|
851
871
|
onShow: () => {
|
|
852
872
|
r = !0;
|
|
@@ -858,21 +878,21 @@ const Ft = Ht.exports, qt = {
|
|
|
858
878
|
trigger: "manual",
|
|
859
879
|
placement: "top-start",
|
|
860
880
|
zIndex: 650,
|
|
861
|
-
plugins: [
|
|
862
|
-
}), n.items.length > 0 && (
|
|
881
|
+
plugins: [k]
|
|
882
|
+
}), n.items.length > 0 && (e == null || e[0].show()));
|
|
863
883
|
},
|
|
864
884
|
onUpdate(n) {
|
|
865
|
-
|
|
885
|
+
t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
|
|
866
886
|
getReferenceClientRect: n.clientRect
|
|
867
887
|
}));
|
|
868
888
|
},
|
|
869
889
|
onKeyDown(n) {
|
|
870
890
|
var i;
|
|
871
891
|
if (r)
|
|
872
|
-
return (i =
|
|
892
|
+
return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
|
|
873
893
|
},
|
|
874
894
|
onExit() {
|
|
875
|
-
|
|
895
|
+
e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
|
|
876
896
|
}
|
|
877
897
|
};
|
|
878
898
|
}
|
|
@@ -897,9 +917,9 @@ const Ft = Ht.exports, qt = {
|
|
|
897
917
|
}
|
|
898
918
|
};
|
|
899
919
|
var Ut = function() {
|
|
900
|
-
var
|
|
901
|
-
return r("div", [r("div", { staticClass: "d-body--md-compact" }, [r("span", [
|
|
902
|
-
}, Nt = [], Vt = /* @__PURE__ */
|
|
920
|
+
var e = this, r = e._self._c;
|
|
921
|
+
return r("div", [r("div", { staticClass: "d-body--md-compact" }, [r("span", [e._v("/" + e._s(e.command))]), e.parametersExample ? r("span", [e._v(" " + e._s(e.parametersExample))]) : e._e()]), r("div", { staticClass: "d-body--sm d-fc-tertiary" }, [e._v(" " + e._s(e.description) + " ")])]);
|
|
922
|
+
}, Nt = [], Vt = /* @__PURE__ */ c(
|
|
903
923
|
Kt,
|
|
904
924
|
Ut,
|
|
905
925
|
Nt
|
|
@@ -911,10 +931,10 @@ const zt = Vt.exports, Wt = {
|
|
|
911
931
|
allowSpaces: !0,
|
|
912
932
|
startOfLine: !0,
|
|
913
933
|
render: () => {
|
|
914
|
-
let
|
|
934
|
+
let t, e, r = !1;
|
|
915
935
|
return {
|
|
916
936
|
onStart: (n) => {
|
|
917
|
-
|
|
937
|
+
t = new w(C, {
|
|
918
938
|
parent: void 0,
|
|
919
939
|
propsData: {
|
|
920
940
|
itemComponent: zt,
|
|
@@ -922,10 +942,10 @@ const zt = Vt.exports, Wt = {
|
|
|
922
942
|
...n
|
|
923
943
|
},
|
|
924
944
|
editor: n.editor
|
|
925
|
-
}), n.clientRect && (
|
|
945
|
+
}), n.clientRect && (e = x("body", {
|
|
926
946
|
getReferenceClientRect: n.clientRect,
|
|
927
947
|
appendTo: () => document.body,
|
|
928
|
-
content:
|
|
948
|
+
content: t.element,
|
|
929
949
|
showOnCreate: !1,
|
|
930
950
|
onShow: () => {
|
|
931
951
|
r = !0;
|
|
@@ -937,21 +957,21 @@ const zt = Vt.exports, Wt = {
|
|
|
937
957
|
trigger: "manual",
|
|
938
958
|
placement: "top-start",
|
|
939
959
|
zIndex: 650,
|
|
940
|
-
plugins: [
|
|
941
|
-
}), n.items.length > 0 && (
|
|
960
|
+
plugins: [k]
|
|
961
|
+
}), n.items.length > 0 && (e == null || e[0].show()));
|
|
942
962
|
},
|
|
943
963
|
onUpdate(n) {
|
|
944
|
-
|
|
964
|
+
t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
|
|
945
965
|
getReferenceClientRect: n.clientRect
|
|
946
966
|
}));
|
|
947
967
|
},
|
|
948
968
|
onKeyDown(n) {
|
|
949
969
|
var i;
|
|
950
970
|
if (r)
|
|
951
|
-
return (i =
|
|
971
|
+
return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
|
|
952
972
|
},
|
|
953
973
|
onExit() {
|
|
954
|
-
|
|
974
|
+
e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
|
|
955
975
|
}
|
|
956
976
|
};
|
|
957
977
|
}
|
|
@@ -1024,8 +1044,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1024
1044
|
autoFocus: {
|
|
1025
1045
|
type: [Boolean, String, Number],
|
|
1026
1046
|
default: !1,
|
|
1027
|
-
validator(
|
|
1028
|
-
return typeof
|
|
1047
|
+
validator(t) {
|
|
1048
|
+
return typeof t == "string" ? Re.includes(t) : !0;
|
|
1029
1049
|
}
|
|
1030
1050
|
},
|
|
1031
1051
|
/**
|
|
@@ -1037,8 +1057,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1037
1057
|
outputFormat: {
|
|
1038
1058
|
type: String,
|
|
1039
1059
|
default: "html",
|
|
1040
|
-
validator(
|
|
1041
|
-
return Ee.includes(
|
|
1060
|
+
validator(t) {
|
|
1061
|
+
return Ee.includes(t);
|
|
1042
1062
|
}
|
|
1043
1063
|
},
|
|
1044
1064
|
/**
|
|
@@ -1290,8 +1310,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1290
1310
|
editor: null,
|
|
1291
1311
|
tippyOptions: {
|
|
1292
1312
|
appendTo: () => {
|
|
1293
|
-
var
|
|
1294
|
-
return (
|
|
1313
|
+
var t;
|
|
1314
|
+
return (t = this.$refs.editor.$el.getRootNode()) == null ? void 0 : t.querySelector("body");
|
|
1295
1315
|
},
|
|
1296
1316
|
placement: "top-start"
|
|
1297
1317
|
}
|
|
@@ -1311,51 +1331,50 @@ const zt = Vt.exports, Wt = {
|
|
|
1311
1331
|
},
|
|
1312
1332
|
// eslint-disable-next-line complexity
|
|
1313
1333
|
extensions() {
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1334
|
+
const t = [Z, de, me, te];
|
|
1335
|
+
t.push(this.useDivTags ? dt : j), this.allowBlockquote && t.push(Y), this.allowBold && t.push(ne), this.allowBulletList && (t.push(re), t.push(oe.extend({
|
|
1316
1336
|
renderText({ node: n }) {
|
|
1317
1337
|
return n.textContent;
|
|
1318
1338
|
}
|
|
1319
|
-
})),
|
|
1339
|
+
})), t.push(ae)), this.allowItalic && t.push(ie), this.allowStrike && t.push(le), this.allowUnderline && t.push(ce), this.placeholder && t.push(
|
|
1320
1340
|
ee.configure({ placeholder: this.placeholder })
|
|
1321
1341
|
);
|
|
1322
|
-
const
|
|
1342
|
+
const e = this, r = J.create({
|
|
1323
1343
|
addKeyboardShortcuts() {
|
|
1324
1344
|
return {
|
|
1325
|
-
"Shift-Enter": ({ editor: n }) =>
|
|
1345
|
+
"Shift-Enter": ({ editor: n }) => e.allowLineBreaks ? !1 : (n.commands.first(({ commands: i }) => [
|
|
1326
1346
|
() => i.newlineInCode(),
|
|
1327
|
-
() =>
|
|
1347
|
+
() => e.allowBulletList && i.splitListItem("listItem"),
|
|
1328
1348
|
() => i.createParagraphNear(),
|
|
1329
1349
|
() => i.liftEmptyBlock(),
|
|
1330
1350
|
() => i.splitBlock()
|
|
1331
1351
|
]), !0),
|
|
1332
|
-
Enter: () =>
|
|
1352
|
+
Enter: () => e.allowLineBreaks ? !1 : (e.$emit("enter"), !0)
|
|
1333
1353
|
};
|
|
1334
1354
|
}
|
|
1335
1355
|
});
|
|
1336
|
-
if (
|
|
1356
|
+
if (t.push(r), this.link && t.push(se.extend({ inclusive: !1 }).configure({
|
|
1337
1357
|
HTMLAttributes: {
|
|
1338
1358
|
class: "d-link d-wb-break-all"
|
|
1339
1359
|
},
|
|
1340
1360
|
openOnClick: !1,
|
|
1341
1361
|
autolink: !0,
|
|
1342
1362
|
protocols: L
|
|
1343
|
-
})), this.customLink &&
|
|
1363
|
+
})), this.customLink && t.push(this.getExtension(lt, this.customLink)), this.mentionSuggestion) {
|
|
1344
1364
|
const n = { ...this.mentionSuggestion, ...Ot };
|
|
1345
|
-
|
|
1365
|
+
t.push(gt.configure({ suggestion: n }));
|
|
1346
1366
|
}
|
|
1347
1367
|
if (this.channelSuggestion) {
|
|
1348
1368
|
const n = { ...this.channelSuggestion, ...qt };
|
|
1349
|
-
|
|
1369
|
+
t.push(xt.configure({ suggestion: n }));
|
|
1350
1370
|
}
|
|
1351
1371
|
if (this.slashCommandSuggestion) {
|
|
1352
1372
|
const n = { ...this.slashCommandSuggestion, ...Wt };
|
|
1353
|
-
|
|
1373
|
+
t.push($t.configure({ suggestion: n }));
|
|
1354
1374
|
}
|
|
1355
|
-
return
|
|
1356
|
-
types: ["paragraph"]
|
|
1357
|
-
|
|
1358
|
-
})), this.allowCode && e.push(Q), this.allowCodeblock && e.push(G.extend({
|
|
1375
|
+
return t.push(et), t.push(ue.configure({
|
|
1376
|
+
types: ["paragraph"]
|
|
1377
|
+
})), this.allowCode && t.push(Q), this.allowCodeblock && t.push(G.extend({
|
|
1359
1378
|
renderText({ node: n }) {
|
|
1360
1379
|
return `\`\`\`
|
|
1361
1380
|
${n.textContent}
|
|
@@ -1365,15 +1384,15 @@ ${n.textContent}
|
|
|
1365
1384
|
HTMLAttributes: {
|
|
1366
1385
|
class: "d-rich-text-editor__code-block"
|
|
1367
1386
|
}
|
|
1368
|
-
})), this.allowInlineImages &&
|
|
1387
|
+
})), this.allowInlineImages && t.push(ct), (this.allowFontFamily || this.allowFontColor) && (t.push(he), this.allowFontColor && t.push(fe), this.allowFontFamily && t.push(pe)), this.additionalExtensions.length && t.push(...this.additionalExtensions), t;
|
|
1369
1388
|
},
|
|
1370
1389
|
inputAttrs() {
|
|
1371
|
-
const
|
|
1390
|
+
const t = {
|
|
1372
1391
|
"aria-label": this.inputAriaLabel,
|
|
1373
1392
|
"aria-multiline": !0,
|
|
1374
1393
|
role: "textbox"
|
|
1375
1394
|
};
|
|
1376
|
-
return this.editable || (
|
|
1395
|
+
return this.editable || (t["aria-readonly"] = !0), t;
|
|
1377
1396
|
}
|
|
1378
1397
|
},
|
|
1379
1398
|
/**
|
|
@@ -1382,20 +1401,20 @@ ${n.textContent}
|
|
|
1382
1401
|
* to be hooked up to the Editor's own API.
|
|
1383
1402
|
*/
|
|
1384
1403
|
watch: {
|
|
1385
|
-
editable(
|
|
1386
|
-
this.editor.setEditable(
|
|
1404
|
+
editable(t) {
|
|
1405
|
+
this.editor.setEditable(t), this.updateEditorAttributes({ "aria-readonly": !t });
|
|
1387
1406
|
},
|
|
1388
|
-
inputClass(
|
|
1389
|
-
this.updateEditorAttributes({ class:
|
|
1407
|
+
inputClass(t) {
|
|
1408
|
+
this.updateEditorAttributes({ class: t });
|
|
1390
1409
|
},
|
|
1391
|
-
inputAriaLabel(
|
|
1392
|
-
this.updateEditorAttributes({ "aria-label":
|
|
1410
|
+
inputAriaLabel(t) {
|
|
1411
|
+
this.updateEditorAttributes({ "aria-label": t });
|
|
1393
1412
|
},
|
|
1394
1413
|
extensions() {
|
|
1395
1414
|
this.destroyEditor(), this.createEditor();
|
|
1396
1415
|
},
|
|
1397
|
-
value(
|
|
1398
|
-
this.processValue(
|
|
1416
|
+
value(t) {
|
|
1417
|
+
this.processValue(t);
|
|
1399
1418
|
}
|
|
1400
1419
|
},
|
|
1401
1420
|
created() {
|
|
@@ -1419,13 +1438,13 @@ ${n.textContent}
|
|
|
1419
1438
|
...this.inputAttrs,
|
|
1420
1439
|
class: this.inputClass
|
|
1421
1440
|
},
|
|
1422
|
-
handlePaste: (
|
|
1441
|
+
handlePaste: (t, e) => {
|
|
1423
1442
|
if (!this.link && !this.customLink) {
|
|
1424
1443
|
const r = /^https?:\/\//;
|
|
1425
|
-
if (!(
|
|
1444
|
+
if (!(e != null && e.clipboardData))
|
|
1426
1445
|
return !1;
|
|
1427
|
-
const n =
|
|
1428
|
-
if (!r.test(n) || !
|
|
1446
|
+
const n = e.clipboardData.getData("text");
|
|
1447
|
+
if (!r.test(n) || !e.clipboardData.getData("text/html"))
|
|
1429
1448
|
return !1;
|
|
1430
1449
|
const i = n.replace(/\n/g, "<br>").replace(/ {2}/g, " ");
|
|
1431
1450
|
return this.editor.chain().focus().insertContent(i).run(), !0;
|
|
@@ -1434,72 +1453,72 @@ ${n.textContent}
|
|
|
1434
1453
|
},
|
|
1435
1454
|
// Moves the <br /> tags inside the previous closing tag to avoid
|
|
1436
1455
|
// Prosemirror wrapping them within another </p> tag.
|
|
1437
|
-
transformPastedHTML(
|
|
1438
|
-
return
|
|
1456
|
+
transformPastedHTML(t) {
|
|
1457
|
+
return t.replace(/(<\/\w+>)((<br \/>)+)/g, "$2$3$1");
|
|
1439
1458
|
}
|
|
1440
1459
|
}
|
|
1441
1460
|
}), this.addEditorListeners();
|
|
1442
1461
|
},
|
|
1443
|
-
bubbleMenuShouldShow({ editor:
|
|
1444
|
-
return
|
|
1462
|
+
bubbleMenuShouldShow({ editor: t, view: e, state: r, oldState: n, from: i, to: o }) {
|
|
1463
|
+
return t.isActive("link");
|
|
1445
1464
|
},
|
|
1446
1465
|
/**
|
|
1447
1466
|
* If the selection contains a link, return the existing link text.
|
|
1448
1467
|
* Otherwise, use just the selected text.
|
|
1449
1468
|
* @param editor the editor instance.
|
|
1450
1469
|
*/
|
|
1451
|
-
getSelectedLinkText(
|
|
1452
|
-
var a, l,
|
|
1453
|
-
const { view:
|
|
1454
|
-
return
|
|
1470
|
+
getSelectedLinkText(t) {
|
|
1471
|
+
var a, l, d;
|
|
1472
|
+
const { view: e, state: r } = t, { from: n, to: i } = e.state.selection, o = r.doc.textBetween(n, i, ""), s = this.editor.state.doc.nodeAt(n);
|
|
1473
|
+
return s && ((d = (l = (a = s.marks) == null ? void 0 : a.at(0)) == null ? void 0 : l.type) == null ? void 0 : d.name) === "link" ? s.textContent : o;
|
|
1455
1474
|
},
|
|
1456
1475
|
editLink() {
|
|
1457
|
-
const
|
|
1476
|
+
const t = this.getSelectedLinkText(this.editor), e = {
|
|
1458
1477
|
href: this.editor.getAttributes("link").href,
|
|
1459
|
-
text:
|
|
1478
|
+
text: t
|
|
1460
1479
|
};
|
|
1461
|
-
this.$emit("edit-link",
|
|
1480
|
+
this.$emit("edit-link", e);
|
|
1462
1481
|
},
|
|
1463
1482
|
removeLink() {
|
|
1464
|
-
var
|
|
1465
|
-
(n = (r = (
|
|
1483
|
+
var t, e, r, n;
|
|
1484
|
+
(n = (r = (e = (t = this.editor) == null ? void 0 : t.chain()) == null ? void 0 : e.focus()) == null ? void 0 : r.unsetLink()) == null || n.run();
|
|
1466
1485
|
},
|
|
1467
1486
|
openLink() {
|
|
1468
|
-
var
|
|
1469
|
-
(r = (
|
|
1470
|
-
const
|
|
1471
|
-
window.open(
|
|
1487
|
+
var e, r;
|
|
1488
|
+
(r = (e = this.editor) == null ? void 0 : e.chain()) == null || r.focus();
|
|
1489
|
+
const t = this.editor.getAttributes("link").href;
|
|
1490
|
+
window.open(t, "_blank");
|
|
1472
1491
|
},
|
|
1473
1492
|
// eslint-disable-next-line complexity
|
|
1474
|
-
setLink(
|
|
1475
|
-
var a, l,
|
|
1476
|
-
if (!
|
|
1493
|
+
setLink(t, e, r, n = L, i) {
|
|
1494
|
+
var a, l, d;
|
|
1495
|
+
if (!t) {
|
|
1477
1496
|
this.removeLink();
|
|
1478
1497
|
return;
|
|
1479
1498
|
}
|
|
1480
|
-
n.find((u) => u.test(
|
|
1481
|
-
const
|
|
1482
|
-
this.editor.chain().focus().insertContent(
|
|
1499
|
+
n.find((u) => u.test(t)) || (t = `${i}${t}`), this.editor.chain().focus().extendMarkRange("link").run();
|
|
1500
|
+
const s = (d = (l = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : l.state) == null ? void 0 : d.selection;
|
|
1501
|
+
this.editor.chain().focus().insertContent(e).setTextSelection({ from: s.from, to: s.from + e.length }).setLink({ href: t, class: r.class }).run();
|
|
1483
1502
|
},
|
|
1484
1503
|
// eslint-disable-next-line complexity
|
|
1485
|
-
processValue(
|
|
1504
|
+
processValue(t, e = !0) {
|
|
1486
1505
|
const r = this.getOutput();
|
|
1487
|
-
if (!(
|
|
1488
|
-
if (typeof
|
|
1506
|
+
if (!(e && Ae(t, r))) {
|
|
1507
|
+
if (typeof t == "string" && this.outputFormat === "text") {
|
|
1489
1508
|
const n = new RegExp(`(${M})`, "g");
|
|
1490
|
-
|
|
1509
|
+
t = t == null ? void 0 : t.replace(n, '<emoji-component code="$1"></emoji-component>');
|
|
1491
1510
|
}
|
|
1492
|
-
this.editor.commands.setContent(
|
|
1511
|
+
this.editor.commands.setContent(t, !1);
|
|
1493
1512
|
}
|
|
1494
1513
|
},
|
|
1495
1514
|
destroyEditor() {
|
|
1496
1515
|
this.editor.destroy();
|
|
1497
1516
|
},
|
|
1498
1517
|
triggerInputChangeEvents() {
|
|
1499
|
-
const
|
|
1500
|
-
this.$emit("input",
|
|
1501
|
-
const
|
|
1502
|
-
this.$emit("json-input",
|
|
1518
|
+
const t = this.getOutput();
|
|
1519
|
+
this.$emit("input", t), this.$emit("update:value", t);
|
|
1520
|
+
const e = this.editor.getJSON();
|
|
1521
|
+
this.$emit("json-input", e);
|
|
1503
1522
|
const r = this.editor.getHTML();
|
|
1504
1523
|
this.$emit("html-input", r);
|
|
1505
1524
|
const n = this.editor.getText({ blockSeparator: `
|
|
@@ -1514,18 +1533,18 @@ ${n.textContent}
|
|
|
1514
1533
|
this.editor.on("create", () => {
|
|
1515
1534
|
this.triggerInputChangeEvents();
|
|
1516
1535
|
}), this.editor.on("update", () => {
|
|
1517
|
-
var
|
|
1518
|
-
if (this.preventTyping && ((
|
|
1536
|
+
var t, e;
|
|
1537
|
+
if (this.preventTyping && ((e = (t = this.editor.view) == null ? void 0 : t.input) == null ? void 0 : e.lastKeyCode) !== 8) {
|
|
1519
1538
|
this.editor.commands.setContent(this.value, !1);
|
|
1520
1539
|
return;
|
|
1521
1540
|
}
|
|
1522
1541
|
this.triggerInputChangeEvents();
|
|
1523
|
-
}), this.editor.on("selectionUpdate", ({ editor:
|
|
1524
|
-
this.$emit("selected", this.getSelectedLinkText(
|
|
1525
|
-
}), this.editor.on("focus", ({ event:
|
|
1526
|
-
this.$emit("focus",
|
|
1527
|
-
}), this.editor.on("blur", ({ event:
|
|
1528
|
-
this.$emit("blur",
|
|
1542
|
+
}), this.editor.on("selectionUpdate", ({ editor: t }) => {
|
|
1543
|
+
this.$emit("selected", this.getSelectedLinkText(t));
|
|
1544
|
+
}), this.editor.on("focus", ({ event: t }) => {
|
|
1545
|
+
this.$emit("focus", t);
|
|
1546
|
+
}), this.editor.on("blur", ({ event: t }) => {
|
|
1547
|
+
this.$emit("blur", t);
|
|
1529
1548
|
});
|
|
1530
1549
|
},
|
|
1531
1550
|
getOutput() {
|
|
@@ -1540,17 +1559,17 @@ ${n.textContent}
|
|
|
1540
1559
|
` });
|
|
1541
1560
|
}
|
|
1542
1561
|
},
|
|
1543
|
-
getExtension(
|
|
1562
|
+
getExtension(t, e) {
|
|
1544
1563
|
var r;
|
|
1545
|
-
return typeof
|
|
1564
|
+
return typeof e == "boolean" ? t : (r = t.configure) == null ? void 0 : r.call(t, e);
|
|
1546
1565
|
},
|
|
1547
|
-
updateEditorAttributes(
|
|
1566
|
+
updateEditorAttributes(t) {
|
|
1548
1567
|
this.editor.setOptions({
|
|
1549
1568
|
editorProps: {
|
|
1550
1569
|
attributes: {
|
|
1551
1570
|
...this.inputAttrs,
|
|
1552
1571
|
class: this.inputClass,
|
|
1553
|
-
...
|
|
1572
|
+
...t
|
|
1554
1573
|
}
|
|
1555
1574
|
}
|
|
1556
1575
|
});
|
|
@@ -1561,9 +1580,9 @@ ${n.textContent}
|
|
|
1561
1580
|
}
|
|
1562
1581
|
};
|
|
1563
1582
|
var Jt = function() {
|
|
1564
|
-
var
|
|
1565
|
-
return r("div", [
|
|
1566
|
-
}, Yt = [], Gt = /* @__PURE__ */
|
|
1583
|
+
var e = this, r = e._self._c;
|
|
1584
|
+
return r("div", [e.editor && e.link && !e.hideLinkBubbleMenu ? r("bubble-menu", { staticStyle: { visibility: "visible" }, attrs: { editor: e.editor, "should-show": e.bubbleMenuShouldShow, "tippy-options": e.tippyOptions } }, [r("div", { staticClass: "d-popover__dialog" }, [r("dt-stack", { staticClass: "d-rich-text-editor-bubble-menu__button-stack", attrs: { direction: "row", gap: "0" } }, [r("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: e.editLink } }, [e._v(" Edit ")]), r("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: e.openLink } }, [e._v(" Open link ")]), r("dt-button", { attrs: { kind: "danger", importance: "clear" }, on: { click: e.removeLink } }, [e._v(" Remove ")])], 1)], 1)]) : e._e(), r("editor-content", e._g({ ref: "editor", staticClass: "d-rich-text-editor", attrs: { editor: e.editor, "data-qa": "dt-rich-text-editor" } }, e.editorListeners))], 1);
|
|
1585
|
+
}, Yt = [], Gt = /* @__PURE__ */ c(
|
|
1567
1586
|
Xt,
|
|
1568
1587
|
Jt,
|
|
1569
1588
|
Yt
|