@progress/kendo-vue-editor 6.4.1-develop.2 → 6.4.2-develop.3

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/Editor.mjs CHANGED
@@ -5,10 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as j, createVNode as p, toRaw as K, markRaw as B, isVNode as J, h as F } from "vue";
8
+ import { defineComponent as j, toRaw as K, markRaw as B, createVNode as p, h as F, isVNode as J } from "vue";
9
9
  import { ButtonGroup as q, Toolbar as Q, ToolbarSeparator as X } from "@progress/kendo-vue-buttons";
10
- import { guid as T, validatePackage as Y, shouldShowValidationUI as Z, getRef as O, WatermarkOverlay as ee, classNames as te, setRef as P, templateRendering as ie, getListeners as oe, getTemplate as re } from "@progress/kendo-vue-common";
11
- import { Plugin as E, PluginKey as R, spacesFix as se, history as ne, dropCursor as ae, gapCursor as le, tableEditing as pe, getMark as de, Schema as ce, marks as me, EditorState as ue, keymap as H, baseKeymap as he, EditorView as fe } from "@progress/kendo-editor-common";
10
+ import { guid as T, WatermarkOverlay as Y, classNames as Z, setRef as O, getRef as P, validatePackage as ee, shouldShowValidationUI as te, templateRendering as ie, getListeners as oe, getTemplate as re } from "@progress/kendo-vue-common";
11
+ import { Plugin as E, spacesFix as se, history as ne, dropCursor as ae, gapCursor as le, tableEditing as pe, PluginKey as R, Schema as de, marks as ce, EditorState as me, keymap as H, baseKeymap as ue, EditorView as he, getMark as fe } from "@progress/kendo-editor-common";
12
12
  import { nodes as ge } from "./config/schema.mjs";
13
13
  import { defaultStyle as ve, tablesStyles as we, rtlStyles as ke } from "./config/defaultStyles.mjs";
14
14
  import { EditorToolsSettings as e } from "./config/toolsSettings.mjs";
@@ -267,10 +267,10 @@ const C = {
267
267
  };
268
268
  },
269
269
  created() {
270
- this._view = void 0, this.trOnChange = null, this.valueisUpdated = !1, this._prevValue = this.$props.value, Y(x), this.showLicenseWatermark = Z(x);
270
+ this._view = void 0, this.trOnChange = null, this.valueisUpdated = !1, this._prevValue = this.$props.value, ee(x), this.showLicenseWatermark = te(x);
271
271
  },
272
272
  mounted() {
273
- this.iframe = O(this, "iframe"), this.contentElement = O(this, "contentElement"), (!this.iframe || !_) && this.initialize();
273
+ this.iframe = P(this, "iframe"), this.contentElement = P(this, "contentElement"), (!this.iframe || !_) && this.initialize();
274
274
  },
275
275
  watch: {
276
276
  value: function(t, i) {
@@ -294,7 +294,7 @@ const C = {
294
294
  preserveWhitespace: g = "full",
295
295
  style: c,
296
296
  value: k
297
- } = this.$props, b = this.getView(), m = Re(this), L = this.showLicenseWatermark ? p(ee, null, null) : null;
297
+ } = this.$props, b = this.getView(), m = Re(this), L = this.showLicenseWatermark ? p(Y, null, null) : null;
298
298
  if (this.view) {
299
299
  const o = D.getState(this.view.state);
300
300
  o.preserveWhitespace = g;
@@ -362,7 +362,7 @@ const C = {
362
362
  }) : s.call(this, o, u);
363
363
  }, this);
364
364
  return p("div", {
365
- class: te("k-editor", {
365
+ class: Z("k-editor", {
366
366
  "k-editor-resizable": this.$props.resizable
367
367
  }),
368
368
  dir: this.$props.dir
@@ -376,7 +376,7 @@ const C = {
376
376
  class: "k-editor-content"
377
377
  }, [p("iframe", {
378
378
  onLoad: this.iframeLoad,
379
- ref: P(this, "iframe"),
379
+ ref: O(this, "iframe"),
380
380
  frameborder: "0",
381
381
  title: m.toLanguageString(w.iframeTitle, A[w.iframeTitle]),
382
382
  style: h,
@@ -385,7 +385,7 @@ const C = {
385
385
  style: h,
386
386
  class: "k-editor-content"
387
387
  }, [p("div", {
388
- ref: P(this, "contentElement"),
388
+ ref: O(this, "contentElement"),
389
389
  role: "textbox",
390
390
  "aria-labelledby": this.$props.ariaLabelledBy,
391
391
  "aria-describedby": this.$props.ariaDescribedBy,
@@ -475,7 +475,7 @@ const C = {
475
475
  linkDialog: s
476
476
  } = this.$data, d = this.getView();
477
477
  if (d) {
478
- const n = d.state, o = n.selection.empty, u = de(n, n.schema.marks[z.mark]);
478
+ const n = d.state, o = n.selection.empty, u = fe(n, n.schema.marks[z.mark]);
479
479
  !s && !(o && !u) && (this.linkDialog = !0);
480
480
  }
481
481
  return !s;
@@ -484,14 +484,14 @@ const C = {
484
484
  const {
485
485
  defaultContent: b = "",
486
486
  value: m
487
- } = this.$props, L = m && typeof m != "string" ? K(m) : y.createDocument(new ce({
487
+ } = this.$props, L = m && typeof m != "string" ? K(m) : y.createDocument(new de({
488
488
  nodes: ge,
489
- marks: me
489
+ marks: ce
490
490
  }), m || b, {
491
491
  preserveWhitespace: r
492
492
  }), V = {
493
- state: ue.create({
494
- plugins: [...c, H(k), H(he)],
493
+ state: me.create({
494
+ plugins: [...c, H(k), H(ue)],
495
495
  doc: L
496
496
  }),
497
497
  transformPastedHTML: this.onPasteHtml,
@@ -509,7 +509,7 @@ const C = {
509
509
  dom: i
510
510
  };
511
511
  this.$emit("loaded", h);
512
- const $ = this.$props.extendView && this.$props.extendView(h) || new fe({
512
+ const $ = this.$props.extendView && this.$props.extendView(h) || new he({
513
513
  mount: i
514
514
  }, V);
515
515
  this.view = B($);
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { chainCommands as u, exitCode as h, toggleInlineFormat as i, undo as p, redo as l, undoInputRule as f, splitListItem as S, goToNextCell as a } from "@progress/kendo-editor-common";
8
+ import { chainCommands as u, exitCode as h, goToNextCell as l, splitListItem as p, undoInputRule as f, redo as a, undo as S, toggleInlineFormat as i } from "@progress/kendo-editor-common";
9
9
  import { EditorToolsSettings as M } from "./toolsSettings.mjs";
10
10
  const {
11
11
  bold: b,
@@ -20,10 +20,10 @@ const {
20
20
  "Mod-b": (t, o) => i(n.bold || b)(t, o),
21
21
  "Mod-i": (t, o) => i(n.italic || I)(t, o),
22
22
  "Mod-u": (t, o) => i(n.underline || y)(t, o),
23
- "Mod-z": p,
24
- "Shift-Mod-z": l,
23
+ "Mod-z": S,
24
+ "Shift-Mod-z": a,
25
25
  ...c ? {} : {
26
- "Mod-y": l
26
+ "Mod-y": a
27
27
  },
28
28
  Backspace: f,
29
29
  "Mod-Enter": r,
@@ -31,9 +31,9 @@ const {
31
31
  ...c ? {
32
32
  "Ctrl-Enter": r
33
33
  } : {},
34
- Enter: (t, o) => S(t.schema.nodes[s])(t, o),
35
- Tab: a(1),
36
- "Shift-Tab": a(-1)
34
+ Enter: (t, o) => p(t.schema.nodes[s])(t, o),
35
+ Tab: l(1),
36
+ "Shift-Tab": l(-1)
37
37
  };
38
38
  };
39
39
  export {
@@ -14,7 +14,7 @@ import { provideLocalizationService as G } from "@progress/kendo-vue-intl";
14
14
  import { messages as l } from "../messages/main.mjs";
15
15
  import { EditorToolsSettings as J } from "../config/toolsSettings.mjs";
16
16
  import { formatString as Q } from "../tools/utils.mjs";
17
- import { selectedLineTextOnly as X, textHighlightKey as Y, TextSelection as g, find as Z, replace as ee, replaceAll as te, findAll as ne } from "@progress/kendo-editor-common";
17
+ import { findAll as X, replaceAll as Y, replace as Z, TextSelection as g, find as ee, textHighlightKey as te, selectedLineTextOnly as ne } from "@progress/kendo-editor-common";
18
18
  import { Icon as N } from "@progress/kendo-vue-common";
19
19
  import { Error as se } from "@progress/kendo-vue-labels";
20
20
  function x(e) {
@@ -46,7 +46,7 @@ const ae = 13, ce = 27, ie = J.findAndReplace, be = /* @__PURE__ */ V({
46
46
  data() {
47
47
  return {
48
48
  selectedTab: 0,
49
- searchText: X(this.$props.view.state),
49
+ searchText: ne(this.$props.view.state),
50
50
  replaceText: "",
51
51
  matchCase: !1,
52
52
  matchWord: !1,
@@ -77,7 +77,7 @@ const ae = 13, ce = 27, ie = J.findAndReplace, be = /* @__PURE__ */ V({
77
77
  class: n && o.eq(n) ? "k-text-selected" : "k-text-highlighted"
78
78
  }
79
79
  });
80
- }), i.setMeta(Y, c), i.setSelection(n || g.create(a.doc, a.selection.from)), s.dispatch(i);
80
+ }), i.setMeta(te, c), i.setSelection(n || g.create(a.doc, a.selection.from)), s.dispatch(i);
81
81
  }
82
82
  },
83
83
  unmounted() {
@@ -299,7 +299,7 @@ const ae = 13, ce = 27, ie = J.findAndReplace, be = /* @__PURE__ */ V({
299
299
  useRegExp: o,
300
300
  backward: e,
301
301
  matchCyclic: i
302
- }, p = Z(n.state, r);
302
+ }, p = ee(n.state, r);
303
303
  if (p) {
304
304
  const u = n.state.tr.setSelection(p);
305
305
  u.scrollIntoView(), n.updateState(n.state.apply(u)), this._prevMatch = this.nextMatch, this.nextMatch = p, this._prevMatch !== this.nextMatch && this.$forceUpdate();
@@ -310,7 +310,7 @@ const ae = 13, ce = 27, ie = J.findAndReplace, be = /* @__PURE__ */ V({
310
310
  replaceText: s
311
311
  } = this.$data;
312
312
  if (!n.empty) {
313
- const a = n.from, i = a + s.length, c = ee(n, s, e.state.tr);
313
+ const a = n.from, i = a + s.length, c = Z(n, s, e.state.tr);
314
314
  c.setSelection(g.create(c.doc, a, i)), c.scrollIntoView(), e.dispatch(c), this.onFind(), this.setNextState({});
315
315
  }
316
316
  },
@@ -326,7 +326,7 @@ const ae = 13, ce = 27, ie = J.findAndReplace, be = /* @__PURE__ */ V({
326
326
  matchWord: i,
327
327
  matchCase: a,
328
328
  useRegExp: c
329
- }, r = te(e.state, s, o);
329
+ }, r = Y(e.state, s, o);
330
330
  r && (e.dispatch(r), this.setNextState({}));
331
331
  },
332
332
  onKeyDown(e) {
@@ -361,7 +361,7 @@ const ae = 13, ce = 27, ie = J.findAndReplace, be = /* @__PURE__ */ V({
361
361
  }, s = e.state.selection;
362
362
  let a = [], i;
363
363
  try {
364
- a = ne(e.state.doc, n);
364
+ a = X(e.state.doc, n);
365
365
  } catch (o) {
366
366
  o instanceof SyntaxError && (i = this.settings.messages.findReplaceInvalidRegExp);
367
367
  }
@@ -8,10 +8,10 @@
8
8
  import { defineComponent as L, createVNode as t, isVNode as T } from "vue";
9
9
  import { Window as j, DialogActionsBar as x } from "@progress/kendo-vue-dialogs";
10
10
  import { Button as S } from "@progress/kendo-vue-buttons";
11
- import { NodeSelection as C, insertNode as z } from "@progress/kendo-editor-common";
11
+ import { insertNode as z, NodeSelection as C } from "@progress/kendo-editor-common";
12
12
  import { provideLocalizationService as A } from "@progress/kendo-vue-intl";
13
13
  import { messages as r } from "../messages/main.mjs";
14
- import { getRef as c, setRef as g } from "@progress/kendo-vue-common";
14
+ import { setRef as c, getRef as g } from "@progress/kendo-vue-common";
15
15
  import { Form as N, FormElement as O, FieldWrapper as m } from "@progress/kendo-vue-form";
16
16
  import { Input as f } from "@progress/kendo-vue-inputs";
17
17
  function k(e) {
@@ -47,7 +47,7 @@ const K = /* @__PURE__ */ L({
47
47
  };
48
48
  },
49
49
  mounted() {
50
- this.src = c(this, "src"), this.altText = c(this, "altText"), this.title = c(this, "title"), this.width = c(this, "width"), this.height = c(this, "height"), this.src && this.src.focus();
50
+ this.src = g(this, "src"), this.altText = g(this, "altText"), this.title = g(this, "title"), this.width = g(this, "width"), this.height = g(this, "height"), this.src && this.src.focus();
51
51
  },
52
52
  render() {
53
53
  let e, n;
@@ -80,7 +80,7 @@ const K = /* @__PURE__ */ L({
80
80
  id: "k-editor-image-url",
81
81
  value: this.srcValue,
82
82
  onInput: this.handleSrcInput,
83
- ref: g(this, "src")
83
+ ref: c(this, "src")
84
84
  }, null)])]
85
85
  }), t(m, null, {
86
86
  default: () => [t("label", {
@@ -92,7 +92,7 @@ const K = /* @__PURE__ */ L({
92
92
  id: "k-editor-image-alt",
93
93
  value: this.altValue,
94
94
  onInput: this.handleAltInput,
95
- ref: g(this, "altText")
95
+ ref: c(this, "altText")
96
96
  }, null)])]
97
97
  }), t(m, null, {
98
98
  default: () => [t("label", {
@@ -104,7 +104,7 @@ const K = /* @__PURE__ */ L({
104
104
  id: "k-editor-image-title",
105
105
  value: this.titleValue,
106
106
  onInput: this.handleTitleInput,
107
- ref: g(this, "title")
107
+ ref: c(this, "title")
108
108
  }, null)])]
109
109
  }), t(m, null, {
110
110
  default: () => [t("label", {
@@ -116,7 +116,7 @@ const K = /* @__PURE__ */ L({
116
116
  id: "k-editor-image-width",
117
117
  value: this.widthValue,
118
118
  onInput: this.handleWidthInput,
119
- ref: g(this, "width")
119
+ ref: c(this, "width")
120
120
  }, null)])]
121
121
  }), t(m, null, {
122
122
  default: () => [t("label", {
@@ -128,7 +128,7 @@ const K = /* @__PURE__ */ L({
128
128
  id: "k-editor-image-height",
129
129
  value: this.heightValue,
130
130
  onInput: this.handleHeightInput,
131
- ref: g(this, "height")
131
+ ref: c(this, "height")
132
132
  }, null)])]
133
133
  })]
134
134
  })]
@@ -8,10 +8,10 @@
8
8
  import { defineComponent as w, createVNode as e, isVNode as y } from "vue";
9
9
  import { Window as V, DialogActionsBar as L } from "@progress/kendo-vue-dialogs";
10
10
  import { Button as p } from "@progress/kendo-vue-buttons";
11
- import { getMark as S, applyLink as I } from "@progress/kendo-editor-common";
11
+ import { applyLink as S, getMark as I } from "@progress/kendo-editor-common";
12
12
  import { provideLocalizationService as z } from "@progress/kendo-vue-intl";
13
13
  import { messages as r } from "../messages/main.mjs";
14
- import { getRef as s, setRef as a } from "@progress/kendo-vue-common";
14
+ import { setRef as s, getRef as a } from "@progress/kendo-vue-common";
15
15
  import { Form as H, FormElement as $, FieldWrapper as u } from "@progress/kendo-vue-form";
16
16
  import { Input as k, Checkbox as j } from "@progress/kendo-vue-inputs";
17
17
  function C(t) {
@@ -31,7 +31,7 @@ const M = /* @__PURE__ */ w({
31
31
  const {
32
32
  view: t,
33
33
  settings: l
34
- } = this.$props, i = t ? S(t.state, t.state.schema.marks[l.mark]) : !1;
34
+ } = this.$props, i = t ? I(t.state, t.state.schema.marks[l.mark]) : !1;
35
35
  return {
36
36
  hrefValue: i && i.attrs.href || void 0,
37
37
  titleValue: i && i.attrs.title || void 0,
@@ -44,7 +44,7 @@ const M = /* @__PURE__ */ w({
44
44
  }
45
45
  },
46
46
  mounted() {
47
- this.href = s(this, "href"), this.title = s(this, "title"), this.target = s(this, "target"), this.href && this.href.focus();
47
+ this.href = a(this, "href"), this.title = a(this, "title"), this.target = a(this, "target"), this.href && this.href.focus();
48
48
  },
49
49
  render() {
50
50
  let t, l;
@@ -70,7 +70,7 @@ const M = /* @__PURE__ */ w({
70
70
  class: "k-form-field-wrap"
71
71
  }, [e(k, {
72
72
  id: "k-editor-link-url",
73
- ref: a(this, "href"),
73
+ ref: s(this, "href"),
74
74
  onInput: this.hrefChange,
75
75
  value: this.hrefValue
76
76
  }, null)])]
@@ -82,7 +82,7 @@ const M = /* @__PURE__ */ w({
82
82
  class: "k-form-field-wrap"
83
83
  }, [e(k, {
84
84
  id: "k-editor-link-text",
85
- ref: a(this, "title"),
85
+ ref: s(this, "title"),
86
86
  onInput: this.titleChange,
87
87
  value: this.titleValue
88
88
  }, null)])]
@@ -93,7 +93,7 @@ const M = /* @__PURE__ */ w({
93
93
  class: "k-form-field-wrap"
94
94
  }, [e(j, {
95
95
  id: "k-editor-link-target",
96
- ref: a(this, "target"),
96
+ ref: s(this, "target"),
97
97
  label: b,
98
98
  onChange: this.targetChange,
99
99
  checked: this.targetValue
@@ -152,7 +152,7 @@ const M = /* @__PURE__ */ w({
152
152
  title: this.title ? this.titleValue : void 0,
153
153
  target: this.target && this.targetValue ? "_blank" : void 0
154
154
  };
155
- I({
155
+ S({
156
156
  mark: l,
157
157
  attrs: i
158
158
  }, this.$props.settings.commandName)(t.state, t.dispatch), this.onClose();
@@ -8,11 +8,11 @@
8
8
  import { defineComponent as h, createVNode as i, isVNode as g } from "vue";
9
9
  import { Window as f, DialogActionsBar as x } from "@progress/kendo-vue-dialogs";
10
10
  import { Button as c } from "@progress/kendo-vue-buttons";
11
- import { indentHtml as A, getHtml as k, trimWhitespace as w, setHtml as v } from "@progress/kendo-editor-common";
11
+ import { trimWhitespace as A, setHtml as k, indentHtml as w, getHtml as v } from "@progress/kendo-editor-common";
12
12
  import { provideLocalizationService as C } from "@progress/kendo-vue-intl";
13
13
  import { messages as r } from "../messages/main.mjs";
14
14
  import { editorPropsKey as y } from "../utils/props-key.mjs";
15
- import { guid as b, getRef as H, setRef as S } from "@progress/kendo-vue-common";
15
+ import { setRef as b, getRef as H, guid as S } from "@progress/kendo-vue-common";
16
16
  function l(t) {
17
17
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !g(t);
18
18
  }
@@ -27,7 +27,7 @@ const I = /* @__PURE__ */ h({
27
27
  dir: String
28
28
  },
29
29
  created() {
30
- this.textAreaId = b();
30
+ this.textAreaId = S();
31
31
  },
32
32
  inject: {
33
33
  kendoLocalizationService: {
@@ -39,7 +39,7 @@ const I = /* @__PURE__ */ h({
39
39
  view: t
40
40
  } = this.$props;
41
41
  return {
42
- textAreaValue: A(k(t.state))
42
+ textAreaValue: w(v(t.state))
43
43
  };
44
44
  },
45
45
  mounted() {
@@ -57,7 +57,7 @@ const I = /* @__PURE__ */ h({
57
57
  } = n.messages, p = i("span", {
58
58
  class: "k-input k-textarea k-input-md k-input-solid k-rounded-md k-editor-textarea"
59
59
  }, [i("textarea", {
60
- ref: S(this, "htmlArea"),
60
+ ref: b(this, "htmlArea"),
61
61
  onInput: this.textAreaChange,
62
62
  value: this.textAreaValue,
63
63
  id: this.textAreaId,
@@ -111,10 +111,10 @@ const I = /* @__PURE__ */ h({
111
111
  const {
112
112
  view: t,
113
113
  settings: o
114
- } = this.$props, n = w(this.htmlArea ? this.textAreaValue : ""), {
114
+ } = this.$props, n = A(this.htmlArea ? this.textAreaValue : ""), {
115
115
  preserveWhitespace: e
116
116
  } = y.getState(t.state);
117
- v(n, o.commandName, {
117
+ k(n, o.commandName, {
118
118
  preserveWhitespace: e
119
119
  })(t.state, t.dispatch), this.onClose();
120
120
  },