@progress/kendo-vue-editor 3.7.2 → 3.7.3-dev.202211021441

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/es/Editor.js CHANGED
@@ -25,6 +25,7 @@ var allVue = Vue;
25
25
  var gh = allVue.h;
26
26
  var isV3 = allVue.version && allVue.version[0] === '3';
27
27
  var markRaw = allVue.markRaw;
28
+ var toRaw = allVue.toRaw;
28
29
  import { ButtonGroup, Toolbar, ToolbarSeparator } from '@progress/kendo-vue-buttons';
29
30
  import { classNames, validatePackage, getTemplate, getListeners, templateRendering, guid, setRef, getRef } from '@progress/kendo-vue-common';
30
31
  import { EditorState, Plugin, PluginKey, EditorView, Schema, baseKeymap, keymap, history, dropCursor, gapCursor, getMark, spacesFix, tableEditing } from '@progress/kendo-editor-common';
@@ -287,6 +288,7 @@ var EditorVue2 = {
287
288
  },
288
289
  created: function created() {
289
290
  this._view = undefined;
291
+ this.trOnChange = null;
290
292
  this.valueisUpdated = false;
291
293
  this._prevValue = this.$props.value;
292
294
  validatePackage(packageMetadata);
@@ -310,7 +312,7 @@ var EditorVue2 = {
310
312
  if (value === undefined || !this.valueisUpdated || !view) {
311
313
  return;
312
314
  }
313
- updateEditorValue(view, value, this._prevValue, this.trOnChange, this.htmlOnChange);
315
+ updateEditorValue(view, this.computedValue(), this._prevValue, this.trOnChange, this.htmlOnChange);
314
316
  this.valueisUpdated = false;
315
317
  this.trOnChange = null;
316
318
  this.htmlOnChange = null;
@@ -330,18 +332,6 @@ var EditorVue2 = {
330
332
  this.view = undefined;
331
333
  this._view = undefined;
332
334
  },
333
- computed: {
334
- computedValue: function computedValue() {
335
- if (this.trOnChange !== null) {
336
- return this.trOnChange.doc;
337
- } else if (this.$props.value !== undefined) {
338
- return this.$props.value;
339
- } else if (this.getView()) {
340
- return this.getView().state.doc;
341
- }
342
- return this.$props.defaultContent || '';
343
- }
344
- },
345
335
  // @ts-ignore
346
336
  setup: !isV3 ? undefined : function () {
347
337
  var v3 = !!isV3;
@@ -614,7 +604,7 @@ var EditorVue2 = {
614
604
  _c = _b.defaultContent,
615
605
  defaultContent = _c === void 0 ? '' : _c,
616
606
  value = _b.value;
617
- var doc = value && typeof value !== 'string' ? value : EditorUtils.createDocument(new Schema({
607
+ var doc = value && typeof value !== 'string' ? this.v3 ? toRaw(value) : value : EditorUtils.createDocument(new Schema({
618
608
  nodes: nodes,
619
609
  marks: marks
620
610
  }), value || defaultContent, {
@@ -720,6 +710,16 @@ var EditorVue2 = {
720
710
  },
721
711
  handleClose: function handleClose() {
722
712
  this.linkDialog = false;
713
+ },
714
+ computedValue: function computedValue() {
715
+ if (this.trOnChange !== null) {
716
+ return this.trOnChange.doc;
717
+ } else if (this.$props.value !== undefined) {
718
+ return this.$props.value;
719
+ } else if (this.getView()) {
720
+ return this.getView().state.doc;
721
+ }
722
+ return this.$props.defaultContent || '';
723
723
  }
724
724
  }
725
725
  };
@@ -28,6 +28,11 @@ var InsertImageDialogVue2 = {
28
28
  default: null
29
29
  }
30
30
  },
31
+ data: function data() {
32
+ return {
33
+ srcValue: ''
34
+ };
35
+ },
31
36
  mounted: function mounted() {
32
37
  this.src = getRef(this, 'src');
33
38
  this.altText = getRef(this, 'altText');
@@ -89,9 +94,13 @@ var InsertImageDialogVue2 = {
89
94
  },
90
95
  "class": "k-input-inner",
91
96
  id: "k-editor-image-url",
92
- value: this.v3 ? attrs.src : null,
97
+ value: this.v3 ? this.srcValue : null,
93
98
  domProps: this.v3 ? undefined : {
94
- "value": attrs.src
99
+ "value": this.srcValue
100
+ },
101
+ onInput: this.handleSrcInput,
102
+ on: this.v3 ? undefined : {
103
+ "input": this.handleSrcInput
95
104
  },
96
105
  ref: setRef(this, 'src')
97
106
  })])]), h("div", {
@@ -213,9 +222,11 @@ var InsertImageDialogVue2 = {
213
222
  type: "button",
214
223
  attrs: this.v3 ? undefined : {
215
224
  type: "button",
225
+ disabled: !this.srcValue,
216
226
  themeColor: 'primary',
217
227
  dir: dir
218
228
  },
229
+ disabled: !this.srcValue,
219
230
  onClick: this.onInsert,
220
231
  on: this.v3 ? undefined : {
221
232
  "click": this.onInsert
@@ -257,6 +268,9 @@ var InsertImageDialogVue2 = {
257
268
  return dialog;
258
269
  },
259
270
  methods: {
271
+ handleSrcInput: function handleSrcInput(e) {
272
+ this.srcValue = e.target.value;
273
+ },
260
274
  onClose: function onClose() {
261
275
  this.$props.view.focus();
262
276
  this.$emit('close');
@@ -268,7 +282,7 @@ var InsertImageDialogVue2 = {
268
282
  var nodes = view.state.schema.nodes;
269
283
  var nodeType = nodes[settings.node];
270
284
  var data = {
271
- src: this.src ? this.src.value : null,
285
+ src: this.src ? this.srcValue : null,
272
286
  title: this.title ? this.title.value : null,
273
287
  alt: this.altText ? this.altText.value : null,
274
288
  width: this.width ? this.width.value : null,
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-editor',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1667290063,
8
+ publishDate: 1667399476,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };
@@ -25,6 +25,7 @@ var allVue = Vue;
25
25
  var gh = allVue.h;
26
26
  var isV3 = allVue.version && allVue.version[0] === '3';
27
27
  var markRaw = allVue.markRaw;
28
+ var toRaw = allVue.toRaw;
28
29
  import { ButtonGroup, Toolbar, ToolbarSeparator } from '@progress/kendo-vue-buttons';
29
30
  import { classNames, validatePackage, getTemplate, getListeners, templateRendering, guid, setRef, getRef } from '@progress/kendo-vue-common';
30
31
  import { EditorState, Plugin, PluginKey, EditorView, Schema, baseKeymap, keymap, history, dropCursor, gapCursor, getMark, spacesFix, tableEditing } from '@progress/kendo-editor-common';
@@ -287,6 +288,7 @@ var EditorVue2 = {
287
288
  },
288
289
  created: function created() {
289
290
  this._view = undefined;
291
+ this.trOnChange = null;
290
292
  this.valueisUpdated = false;
291
293
  this._prevValue = this.$props.value;
292
294
  validatePackage(packageMetadata);
@@ -310,7 +312,7 @@ var EditorVue2 = {
310
312
  if (value === undefined || !this.valueisUpdated || !view) {
311
313
  return;
312
314
  }
313
- updateEditorValue(view, value, this._prevValue, this.trOnChange, this.htmlOnChange);
315
+ updateEditorValue(view, this.computedValue(), this._prevValue, this.trOnChange, this.htmlOnChange);
314
316
  this.valueisUpdated = false;
315
317
  this.trOnChange = null;
316
318
  this.htmlOnChange = null;
@@ -330,18 +332,6 @@ var EditorVue2 = {
330
332
  this.view = undefined;
331
333
  this._view = undefined;
332
334
  },
333
- computed: {
334
- computedValue: function computedValue() {
335
- if (this.trOnChange !== null) {
336
- return this.trOnChange.doc;
337
- } else if (this.$props.value !== undefined) {
338
- return this.$props.value;
339
- } else if (this.getView()) {
340
- return this.getView().state.doc;
341
- }
342
- return this.$props.defaultContent || '';
343
- }
344
- },
345
335
  // @ts-ignore
346
336
  setup: !isV3 ? undefined : function () {
347
337
  var v3 = !!isV3;
@@ -614,7 +604,7 @@ var EditorVue2 = {
614
604
  _c = _b.defaultContent,
615
605
  defaultContent = _c === void 0 ? '' : _c,
616
606
  value = _b.value;
617
- var doc = value && typeof value !== 'string' ? value : EditorUtils.createDocument(new Schema({
607
+ var doc = value && typeof value !== 'string' ? this.v3 ? toRaw(value) : value : EditorUtils.createDocument(new Schema({
618
608
  nodes: nodes,
619
609
  marks: marks
620
610
  }), value || defaultContent, {
@@ -720,6 +710,16 @@ var EditorVue2 = {
720
710
  },
721
711
  handleClose: function handleClose() {
722
712
  this.linkDialog = false;
713
+ },
714
+ computedValue: function computedValue() {
715
+ if (this.trOnChange !== null) {
716
+ return this.trOnChange.doc;
717
+ } else if (this.$props.value !== undefined) {
718
+ return this.$props.value;
719
+ } else if (this.getView()) {
720
+ return this.getView().state.doc;
721
+ }
722
+ return this.$props.defaultContent || '';
723
723
  }
724
724
  }
725
725
  };
@@ -28,6 +28,11 @@ var InsertImageDialogVue2 = {
28
28
  default: null
29
29
  }
30
30
  },
31
+ data: function data() {
32
+ return {
33
+ srcValue: ''
34
+ };
35
+ },
31
36
  mounted: function mounted() {
32
37
  this.src = getRef(this, 'src');
33
38
  this.altText = getRef(this, 'altText');
@@ -89,9 +94,13 @@ var InsertImageDialogVue2 = {
89
94
  },
90
95
  "class": "k-input-inner",
91
96
  id: "k-editor-image-url",
92
- value: this.v3 ? attrs.src : null,
97
+ value: this.v3 ? this.srcValue : null,
93
98
  domProps: this.v3 ? undefined : {
94
- "value": attrs.src
99
+ "value": this.srcValue
100
+ },
101
+ onInput: this.handleSrcInput,
102
+ on: this.v3 ? undefined : {
103
+ "input": this.handleSrcInput
95
104
  },
96
105
  ref: setRef(this, 'src')
97
106
  })])]), h("div", {
@@ -213,9 +222,11 @@ var InsertImageDialogVue2 = {
213
222
  type: "button",
214
223
  attrs: this.v3 ? undefined : {
215
224
  type: "button",
225
+ disabled: !this.srcValue,
216
226
  themeColor: 'primary',
217
227
  dir: dir
218
228
  },
229
+ disabled: !this.srcValue,
219
230
  onClick: this.onInsert,
220
231
  on: this.v3 ? undefined : {
221
232
  "click": this.onInsert
@@ -257,6 +268,9 @@ var InsertImageDialogVue2 = {
257
268
  return dialog;
258
269
  },
259
270
  methods: {
271
+ handleSrcInput: function handleSrcInput(e) {
272
+ this.srcValue = e.target.value;
273
+ },
260
274
  onClose: function onClose() {
261
275
  this.$props.view.focus();
262
276
  this.$emit('close');
@@ -268,7 +282,7 @@ var InsertImageDialogVue2 = {
268
282
  var nodes = view.state.schema.nodes;
269
283
  var nodeType = nodes[settings.node];
270
284
  var data = {
271
- src: this.src ? this.src.value : null,
285
+ src: this.src ? this.srcValue : null,
272
286
  title: this.title ? this.title.value : null,
273
287
  alt: this.altText ? this.altText.value : null,
274
288
  width: this.width ? this.width.value : null,
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-editor',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1667290063,
8
+ publishDate: 1667399476,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };
@@ -31,6 +31,7 @@ var allVue = Vue;
31
31
  var gh = allVue.h;
32
32
  var isV3 = allVue.version && allVue.version[0] === '3';
33
33
  var markRaw = allVue.markRaw;
34
+ var toRaw = allVue.toRaw;
34
35
  var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
35
36
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
36
37
  var kendo_editor_common_1 = require("@progress/kendo-editor-common");
@@ -293,6 +294,7 @@ var EditorVue2 = {
293
294
  },
294
295
  created: function created() {
295
296
  this._view = undefined;
297
+ this.trOnChange = null;
296
298
  this.valueisUpdated = false;
297
299
  this._prevValue = this.$props.value;
298
300
  (0, kendo_vue_common_1.validatePackage)(package_metadata_1.packageMetadata);
@@ -316,7 +318,7 @@ var EditorVue2 = {
316
318
  if (value === undefined || !this.valueisUpdated || !view) {
317
319
  return;
318
320
  }
319
- (0, controlled_value_1.updateEditorValue)(view, value, this._prevValue, this.trOnChange, this.htmlOnChange);
321
+ (0, controlled_value_1.updateEditorValue)(view, this.computedValue(), this._prevValue, this.trOnChange, this.htmlOnChange);
320
322
  this.valueisUpdated = false;
321
323
  this.trOnChange = null;
322
324
  this.htmlOnChange = null;
@@ -336,18 +338,6 @@ var EditorVue2 = {
336
338
  this.view = undefined;
337
339
  this._view = undefined;
338
340
  },
339
- computed: {
340
- computedValue: function computedValue() {
341
- if (this.trOnChange !== null) {
342
- return this.trOnChange.doc;
343
- } else if (this.$props.value !== undefined) {
344
- return this.$props.value;
345
- } else if (this.getView()) {
346
- return this.getView().state.doc;
347
- }
348
- return this.$props.defaultContent || '';
349
- }
350
- },
351
341
  // @ts-ignore
352
342
  setup: !isV3 ? undefined : function () {
353
343
  var v3 = !!isV3;
@@ -620,7 +610,7 @@ var EditorVue2 = {
620
610
  _c = _b.defaultContent,
621
611
  defaultContent = _c === void 0 ? '' : _c,
622
612
  value = _b.value;
623
- var doc = value && typeof value !== 'string' ? value : main_1.EditorUtils.createDocument(new kendo_editor_common_1.Schema({
613
+ var doc = value && typeof value !== 'string' ? this.v3 ? toRaw(value) : value : main_1.EditorUtils.createDocument(new kendo_editor_common_1.Schema({
624
614
  nodes: schema_1.nodes,
625
615
  marks: schema_1.marks
626
616
  }), value || defaultContent, {
@@ -726,6 +716,16 @@ var EditorVue2 = {
726
716
  },
727
717
  handleClose: function handleClose() {
728
718
  this.linkDialog = false;
719
+ },
720
+ computedValue: function computedValue() {
721
+ if (this.trOnChange !== null) {
722
+ return this.trOnChange.doc;
723
+ } else if (this.$props.value !== undefined) {
724
+ return this.$props.value;
725
+ } else if (this.getView()) {
726
+ return this.getView().state.doc;
727
+ }
728
+ return this.$props.defaultContent || '';
729
729
  }
730
730
  }
731
731
  };
@@ -34,6 +34,11 @@ var InsertImageDialogVue2 = {
34
34
  default: null
35
35
  }
36
36
  },
37
+ data: function data() {
38
+ return {
39
+ srcValue: ''
40
+ };
41
+ },
37
42
  mounted: function mounted() {
38
43
  this.src = (0, kendo_vue_common_1.getRef)(this, 'src');
39
44
  this.altText = (0, kendo_vue_common_1.getRef)(this, 'altText');
@@ -95,9 +100,13 @@ var InsertImageDialogVue2 = {
95
100
  },
96
101
  "class": "k-input-inner",
97
102
  id: "k-editor-image-url",
98
- value: this.v3 ? attrs.src : null,
103
+ value: this.v3 ? this.srcValue : null,
99
104
  domProps: this.v3 ? undefined : {
100
- "value": attrs.src
105
+ "value": this.srcValue
106
+ },
107
+ onInput: this.handleSrcInput,
108
+ on: this.v3 ? undefined : {
109
+ "input": this.handleSrcInput
101
110
  },
102
111
  ref: (0, kendo_vue_common_1.setRef)(this, 'src')
103
112
  })])]), h("div", {
@@ -219,9 +228,11 @@ var InsertImageDialogVue2 = {
219
228
  type: "button",
220
229
  attrs: this.v3 ? undefined : {
221
230
  type: "button",
231
+ disabled: !this.srcValue,
222
232
  themeColor: 'primary',
223
233
  dir: dir
224
234
  },
235
+ disabled: !this.srcValue,
225
236
  onClick: this.onInsert,
226
237
  on: this.v3 ? undefined : {
227
238
  "click": this.onInsert
@@ -263,6 +274,9 @@ var InsertImageDialogVue2 = {
263
274
  return dialog;
264
275
  },
265
276
  methods: {
277
+ handleSrcInput: function handleSrcInput(e) {
278
+ this.srcValue = e.target.value;
279
+ },
266
280
  onClose: function onClose() {
267
281
  this.$props.view.focus();
268
282
  this.$emit('close');
@@ -274,7 +288,7 @@ var InsertImageDialogVue2 = {
274
288
  var nodes = view.state.schema.nodes;
275
289
  var nodeType = nodes[settings.node];
276
290
  var data = {
277
- src: this.src ? this.src.value : null,
291
+ src: this.src ? this.srcValue : null,
278
292
  title: this.title ? this.title.value : null,
279
293
  alt: this.altText ? this.altText.value : null,
280
294
  width: this.width ? this.width.value : null,
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-editor',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1667290063,
11
+ publishDate: 1667399476,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
14
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-editor",
3
3
  "description": "Kendo UI for Vue Editor package",
4
- "version": "3.7.2",
4
+ "version": "3.7.3-dev.202211021441",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -49,21 +49,22 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@progress/kendo-editor-common": "1.9.3",
52
- "@progress/kendo-vue-common": "3.7.2"
52
+ "@progress/kendo-vue-common": "3.7.3-dev.202211021441"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@progress/kendo-drawing": "^1.8.0",
56
56
  "@progress/kendo-licensing": "^1.0.1",
57
- "@progress/kendo-vue-buttons": "3.7.2",
58
- "@progress/kendo-vue-dialogs": "3.7.2",
59
- "@progress/kendo-vue-dropdowns": "3.7.2",
60
- "@progress/kendo-vue-form": "3.7.2",
61
- "@progress/kendo-vue-inputs": "3.7.2",
62
- "@progress/kendo-vue-intl": "3.7.2",
63
- "@progress/kendo-vue-layout": "3.7.2",
64
- "@progress/kendo-vue-pdf": "3.7.2",
65
- "@progress/kendo-vue-popup": "3.7.2",
66
- "@progress/kendo-vue-upload": "3.7.2"
57
+ "@progress/kendo-vue-buttons": "3.7.3-dev.202211021441",
58
+ "@progress/kendo-vue-dialogs": "3.7.3-dev.202211021441",
59
+ "@progress/kendo-vue-dropdowns": "3.7.3-dev.202211021441",
60
+ "@progress/kendo-vue-form": "3.7.3-dev.202211021441",
61
+ "@progress/kendo-vue-inputs": "3.7.3-dev.202211021441",
62
+ "@progress/kendo-vue-intl": "3.7.3-dev.202211021441",
63
+ "@progress/kendo-vue-layout": "3.7.3-dev.202211021441",
64
+ "@progress/kendo-vue-pdf": "3.7.3-dev.202211021441",
65
+ "@progress/kendo-vue-popup": "3.7.3-dev.202211021441",
66
+ "@progress/kendo-vue-upload": "3.7.3-dev.202211021441",
67
+ "prosemirror-markdown": "1.10.1"
67
68
  },
68
69
  "@progress": {
69
70
  "friendlyName": "Editor",