@progress/kendo-vue-editor 2.8.0-dev.202201111325 → 3.0.0-dev.202201161025

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.
Files changed (58) hide show
  1. package/dist/cdn/js/kendo-vue-editor.js +1 -1
  2. package/dist/es/Editor.js +14 -9
  3. package/dist/es/config/toolsSettings.d.ts +4 -0
  4. package/dist/es/dialogs/FindReplace.d.ts +1 -1
  5. package/dist/es/dialogs/FindReplace.js +145 -115
  6. package/dist/es/dialogs/insertImage.js +20 -10
  7. package/dist/es/dialogs/insertLink.js +9 -5
  8. package/dist/es/main.d.ts +19 -0
  9. package/dist/es/main.js +19 -0
  10. package/dist/es/package-metadata.js +1 -1
  11. package/dist/es/tools/align.js +2 -2
  12. package/dist/es/tools/applyColor.js +6 -2
  13. package/dist/es/tools/cleanFormatting.js +2 -2
  14. package/dist/es/tools/findReplace.js +4 -4
  15. package/dist/es/tools/fontStyle.js +56 -20
  16. package/dist/es/tools/formatBlock.js +50 -16
  17. package/dist/es/tools/indent.js +2 -2
  18. package/dist/es/tools/inlineFormat.js +2 -2
  19. package/dist/es/tools/insertImage.js +2 -2
  20. package/dist/es/tools/insertLink.js +2 -2
  21. package/dist/es/tools/insertTable/tool.js +2 -2
  22. package/dist/es/tools/lists.js +2 -2
  23. package/dist/es/tools/outdent.js +2 -2
  24. package/dist/es/tools/pdf.js +2 -2
  25. package/dist/es/tools/print.js +2 -2
  26. package/dist/es/tools/proseMirrorTool.js +2 -2
  27. package/dist/es/tools/selectAll.js +2 -2
  28. package/dist/es/tools/unlink.js +2 -2
  29. package/dist/es/tools/viewHtml.js +2 -2
  30. package/dist/npm/Editor.js +13 -8
  31. package/dist/npm/config/toolsSettings.d.ts +4 -0
  32. package/dist/npm/dialogs/FindReplace.d.ts +1 -1
  33. package/dist/npm/dialogs/FindReplace.js +145 -115
  34. package/dist/npm/dialogs/insertImage.js +20 -10
  35. package/dist/npm/dialogs/insertLink.js +9 -5
  36. package/dist/npm/main.d.ts +19 -0
  37. package/dist/npm/main.js +38 -0
  38. package/dist/npm/package-metadata.js +1 -1
  39. package/dist/npm/tools/align.js +2 -2
  40. package/dist/npm/tools/applyColor.js +6 -2
  41. package/dist/npm/tools/cleanFormatting.js +2 -2
  42. package/dist/npm/tools/findReplace.js +4 -4
  43. package/dist/npm/tools/fontStyle.js +57 -20
  44. package/dist/npm/tools/formatBlock.js +51 -16
  45. package/dist/npm/tools/indent.js +2 -2
  46. package/dist/npm/tools/inlineFormat.js +2 -2
  47. package/dist/npm/tools/insertImage.js +2 -2
  48. package/dist/npm/tools/insertLink.js +2 -2
  49. package/dist/npm/tools/insertTable/tool.js +2 -2
  50. package/dist/npm/tools/lists.js +2 -2
  51. package/dist/npm/tools/outdent.js +2 -2
  52. package/dist/npm/tools/pdf.js +2 -2
  53. package/dist/npm/tools/print.js +2 -2
  54. package/dist/npm/tools/proseMirrorTool.js +2 -2
  55. package/dist/npm/tools/selectAll.js +2 -2
  56. package/dist/npm/tools/unlink.js +2 -2
  57. package/dist/npm/tools/viewHtml.js +2 -2
  58. package/package.json +12 -12
package/dist/es/Editor.js CHANGED
@@ -33,7 +33,7 @@ import * as Vue from 'vue';
33
33
  var allVue = Vue;
34
34
  var gh = allVue.h;
35
35
  var markRaw = allVue.markRaw;
36
- import { ButtonGroup, Toolbar } from '@progress/kendo-vue-buttons';
36
+ import { ButtonGroup, Toolbar, ToolbarSeparator } from '@progress/kendo-vue-buttons';
37
37
  import { classNames, validatePackage, getTemplate, getListeners, templateRendering, guid } from '@progress/kendo-vue-common';
38
38
  import { EditorState, Plugin, PluginKey, EditorView, Schema, baseKeymap, keymap, history, dropCursor, gapCursor, getMark, spacesFix, tableEditing } from '@progress/kendo-editor-common';
39
39
  import { marks, nodes } from './config/schema';
@@ -350,8 +350,8 @@ var EditorVue2 = {
350
350
  style = _a.style;
351
351
  var view = this.getView();
352
352
 
353
- if (view) {
354
- var editorProps = editorPropsKey.getState(view.state);
353
+ if (this.view) {
354
+ var editorProps = editorPropsKey.getState(this.view.state);
355
355
  editorProps.preserveWhitespace = preserveWhitespace;
356
356
  }
357
357
 
@@ -395,8 +395,14 @@ var EditorVue2 = {
395
395
  return h(this.v3 ? markRaw(allTools[currentTool].comp) : allTools[currentTool].comp, this.v3 ? toolProps : {
396
396
  props: toolProps
397
397
  });
398
+ } else if (ct === 'Separator') {
399
+ return (// @ts-ignore
400
+ h(ToolbarSeparator, {
401
+ key: index
402
+ })
403
+ );
398
404
  } else {
399
- var tool = templateRendering.call(this, ct, getListeners.call(this));
405
+ var tool = templateRendering.call(this, ct.render, getListeners.call(this));
400
406
  return getTemplate.call(this, {
401
407
  h: h,
402
408
  template: tool,
@@ -405,11 +411,11 @@ var EditorVue2 = {
405
411
  additionalProps: {
406
412
  view: view,
407
413
  dir: this.$props.dir,
408
- key: index
414
+ key: guid(),
415
+ settings: ct.props
409
416
  }
410
417
  });
411
- } // return tool.type === ToolbarSeparator ? <Tool key={index} /> : tool;
412
-
418
+ }
413
419
  };
414
420
 
415
421
  var renderTools = function renderTools(item, index) {
@@ -598,8 +604,7 @@ var EditorVue2 = {
598
604
  var _b = this.$props,
599
605
  _c = _b.defaultContent,
600
606
  defaultContent = _c === void 0 ? '' : _c,
601
- value = _b.value,
602
- onMount = _b.onMount;
607
+ value = _b.value;
603
608
  var doc = value && typeof value !== 'string' ? value : EditorUtils.createDocument(new Schema({
604
609
  nodes: nodes,
605
610
  marks: marks
@@ -154,6 +154,10 @@ export declare namespace EditorToolsSettings {
154
154
  * The name of the applied command.
155
155
  */
156
156
  commandName: string;
157
+ /**
158
+ * The dir of the applied command.
159
+ */
160
+ dir?: String;
157
161
  }
158
162
  /**
159
163
  * The setting of the IndentAction tool.
@@ -7,7 +7,7 @@ import { EditorToolsSettings } from './../config/toolsSettings';
7
7
  import { TextSelection, EditorView } from '@progress/kendo-editor-common';
8
8
  interface FindAndReplaceDialogData {
9
9
  selectedTab: number;
10
- matches?: TextSelection<any>[];
10
+ matches: TextSelection<any>[];
11
11
  nextMatch?: TextSelection<any>;
12
12
  searchText: string;
13
13
  replaceText: string;
@@ -32,7 +32,8 @@ var FindAndReplaceDialogVue2 = {
32
32
  }
33
33
  },
34
34
  created: function created() {
35
- this.matches = undefined;
35
+ this._prevMatch = undefined;
36
+ this.nextMatch = undefined;
36
37
  },
37
38
  data: function data() {
38
39
  return {
@@ -43,24 +44,26 @@ var FindAndReplaceDialogVue2 = {
43
44
  matchWord: false,
44
45
  matchCyclic: false,
45
46
  useRegExp: false,
46
- nextMatch: undefined
47
+ matches: [],
48
+ hasMounted: false
47
49
  };
48
50
  },
49
51
  mounted: function mounted() {
50
52
  if (this.$el) {
51
53
  document.body.append(this.$el);
52
54
  }
55
+
56
+ this.setNextState();
57
+ this.hasMounted = true;
53
58
  },
54
59
 
55
60
  /**
56
61
  * @hidden
57
62
  */
58
63
  updated: function updated() {
64
+ var matches = this.matches || [];
65
+ var nextMatch = this.nextMatch;
59
66
  var view = this.$props.view;
60
- var _a = this.$data,
61
- _b = _a.matches,
62
- matches = _b === void 0 ? [] : _b,
63
- nextMatch = _a.nextMatch;
64
67
 
65
68
  if (this._prevMatch !== nextMatch) {
66
69
  var state = view.state; // highlight selection
@@ -92,11 +95,6 @@ var FindAndReplaceDialogVue2 = {
92
95
  this.$el.remove();
93
96
  }
94
97
  },
95
- watch: {
96
- nextMatch: function nextMatch(_newNextMatch, oldMatch) {
97
- this._prevMatch = oldMatch;
98
- }
99
- },
100
98
  // @ts-ignore
101
99
  setup: !gh ? undefined : function () {
102
100
  var v3 = !!gh;
@@ -138,7 +136,7 @@ var FindAndReplaceDialogVue2 = {
138
136
  var checkboxes = h("div", {
139
137
  "class": "k-search-options"
140
138
  }, [h("span", [h("input", {
141
- "class": "k-checkbox",
139
+ "class": "k-checkbox k-checkbox-md k-rounded-md",
142
140
  type: "checkbox",
143
141
  attrs: this.v3 ? undefined : {
144
142
  type: "checkbox",
@@ -160,7 +158,7 @@ var FindAndReplaceDialogVue2 = {
160
158
  },
161
159
  "class": "k-checkbox-label"
162
160
  }, [localization.toLanguageString(findReplaceMatchCase, messages[findReplaceMatchCase])])]), h("span", [h("input", {
163
- "class": "k-checkbox",
161
+ "class": "k-checkbox k-checkbox-md k-rounded-md",
164
162
  type: "checkbox",
165
163
  attrs: this.v3 ? undefined : {
166
164
  type: "checkbox",
@@ -182,7 +180,7 @@ var FindAndReplaceDialogVue2 = {
182
180
  },
183
181
  "class": "k-checkbox-label"
184
182
  }, [localization.toLanguageString(findReplaceMatchWord, messages[findReplaceMatchWord])])]), h("span", [h("input", {
185
- "class": "k-checkbox",
183
+ "class": "k-checkbox k-checkbox-md k-rounded-md",
186
184
  type: "checkbox",
187
185
  attrs: this.v3 ? undefined : {
188
186
  type: "checkbox",
@@ -204,7 +202,7 @@ var FindAndReplaceDialogVue2 = {
204
202
  },
205
203
  "class": "k-checkbox-label"
206
204
  }, [localization.toLanguageString(findReplaceMatchCyclic, messages[findReplaceMatchCyclic])])]), h("span", [h("input", {
207
- "class": "k-checkbox",
205
+ "class": "k-checkbox k-checkbox-md k-rounded-md",
208
206
  type: "checkbox",
209
207
  attrs: this.v3 ? undefined : {
210
208
  type: "checkbox",
@@ -226,78 +224,95 @@ var FindAndReplaceDialogVue2 = {
226
224
  },
227
225
  "class": "k-checkbox-label"
228
226
  }, [localization.toLanguageString(findReplaceUseRegExp, messages[findReplaceUseRegExp])])])]);
229
- var navigation = h("div", {
230
- "class": "k-matches-container"
231
- }, [// @ts-ignore function children
232
- h(Button, {
233
- fillMode: 'flat',
234
- attrs: this.v3 ? undefined : {
227
+
228
+ var navigation = function navigation(findWhatRef) {
229
+ var isRtl = this.$props.dir === 'rtl';
230
+ var prevButton = // @ts-ignore function children
231
+ h(Button, {
235
232
  fillMode: 'flat',
236
- themeColor: 'primary'
237
- },
238
- themeColor: 'primary',
239
- onClick: this.onFindPrev,
240
- on: this.v3 ? undefined : {
241
- "click": this.onFindPrev
242
- }
243
- }, this.v3 ? function () {
244
- return [h("span", {
245
- "class": "k-icon k-i-arrow-chevron-left"
246
- }), localization.toLanguageString(findReplacePrevMatch, messages[findReplacePrevMatch])];
247
- } : [h("span", {
248
- "class": "k-icon k-i-arrow-chevron-left"
249
- }), localization.toLanguageString(findReplacePrevMatch, messages[findReplacePrevMatch])]), h("span", [this.matchesMessage(localization.toLanguageString(findReplaceMatches, messages[findReplaceMatches]))]), // @ts-ignore function children
250
- h(Button, {
251
- fillMode: 'flat',
252
- attrs: this.v3 ? undefined : {
233
+ attrs: this.v3 ? undefined : {
234
+ fillMode: 'flat',
235
+ themeColor: 'primary'
236
+ },
237
+ themeColor: 'primary',
238
+ onClick: this.onFindPrev,
239
+ on: this.v3 ? undefined : {
240
+ "click": this.onFindPrev
241
+ }
242
+ }, this.v3 ? function () {
243
+ return [h("span", {
244
+ "class": "k-icon k-i-arrow-chevron-" + (isRtl ? 'right' : 'left')
245
+ }), localization.toLanguageString(findReplacePrevMatch, messages[findReplacePrevMatch])];
246
+ } : [h("span", {
247
+ "class": "k-icon k-i-arrow-chevron-" + (isRtl ? 'right' : 'left')
248
+ }), localization.toLanguageString(findReplacePrevMatch, messages[findReplacePrevMatch])]);
249
+ var nextButton = // @ts-ignore function children
250
+ h(Button, {
253
251
  fillMode: 'flat',
254
- themeColor: 'primary'
255
- },
256
- themeColor: 'primary',
257
- onClick: this.onFindNext,
258
- on: this.v3 ? undefined : {
259
- "click": this.onFindNext
260
- }
261
- }, this.v3 ? function () {
262
- return [localization.toLanguageString(findReplaceNextMatch, messages[findReplaceNextMatch]), h("span", {
263
- "class": "k-icon k-i-arrow-chevron-right"
264
- })];
265
- } : [localization.toLanguageString(findReplaceNextMatch, messages[findReplaceNextMatch]), h("span", {
266
- "class": "k-icon k-i-arrow-chevron-right"
267
- })])]);
268
- var findWhatLabel = h("div", {
269
- "class": "k-edit-label"
270
- }, [h("label", {
271
- "for": "findWhat",
272
- attrs: this.v3 ? undefined : {
273
- "for": "findWhat"
274
- }
275
- }, [localization.toLanguageString(findReplaceFindWhat, messages[findReplaceFindWhat])])]);
276
- var findWhat = h("div", {
277
- "class": "k-edit-field"
278
- }, [h("input", {
279
- id: "findWhat",
280
- attrs: this.v3 ? undefined : {
281
- id: "findWhat",
252
+ attrs: this.v3 ? undefined : {
253
+ fillMode: 'flat',
254
+ themeColor: 'primary'
255
+ },
256
+ themeColor: 'primary',
257
+ onClick: this.onFindNext,
258
+ on: this.v3 ? undefined : {
259
+ "click": this.onFindNext
260
+ }
261
+ }, this.v3 ? function () {
262
+ return [localization.toLanguageString(findReplaceNextMatch, messages[findReplaceNextMatch]), h("span", {
263
+ "class": "k-icon k-i-arrow-chevron-" + (isRtl ? 'left' : 'right')
264
+ })];
265
+ } : [localization.toLanguageString(findReplaceNextMatch, messages[findReplaceNextMatch]), h("span", {
266
+ "class": "k-icon k-i-arrow-chevron-" + (isRtl ? 'left' : 'right')
267
+ })]);
268
+ return h("div", {
269
+ "class": "k-matches-container"
270
+ }, [prevButton, this.hasMounted && h("span", {
271
+ ref: findWhatRef
272
+ }, [this.matchesMessage(localization.toLanguageString(findReplaceMatches, messages[findReplaceMatches]))]), nextButton]);
273
+ };
274
+
275
+ var findWhatLabel = function findWhatLabel(findWhatId) {
276
+ return h("div", {
277
+ "class": "k-edit-label"
278
+ }, [h("label", {
279
+ ref: findWhatId,
280
+ "for": findWhatId,
281
+ attrs: this.v3 ? undefined : {
282
+ "for": findWhatId
283
+ }
284
+ }, [localization.toLanguageString(findReplaceFindWhat, messages[findReplaceFindWhat])])]);
285
+ };
286
+
287
+ var findWhat = function findWhat(findWhatId) {
288
+ return h("div", {
289
+ "class": "k-edit-field"
290
+ }, [h("span", {
291
+ "class": "k-textbox k-input k-input-md k-rounded-md k-input-solid"
292
+ }, [h("input", {
293
+ id: findWhatId,
294
+ attrs: this.v3 ? undefined : {
295
+ id: findWhatId,
296
+ type: "text"
297
+ },
298
+ ref: findWhatId,
282
299
  type: "text",
283
- autoFocus: true
284
- },
285
- type: "text",
286
- "class": "k-input",
287
- value: this.v3 ? searchText : null,
288
- domProps: this.v3 ? undefined : {
289
- "value": searchText
290
- },
291
- onInput: this.onSearchChange,
292
- on: this.v3 ? undefined : {
293
- "input": this.onSearchChange,
294
- "focus": this.onSearchChange,
295
- "keydown": this.onKeyDown
296
- },
297
- onFocus: this.onSearchChange,
298
- onKeydown: this.onKeyDown,
299
- autoFocus: true
300
- })]);
300
+ "class": "k-input-inner",
301
+ value: this.v3 ? searchText : null,
302
+ domProps: this.v3 ? undefined : {
303
+ "value": searchText
304
+ },
305
+ onInput: this.onSearchChange,
306
+ on: this.v3 ? undefined : {
307
+ "input": this.onSearchChange,
308
+ "focus": this.onSearchChange,
309
+ "keydown": this.onKeyDown
310
+ },
311
+ onFocus: this.onSearchChange,
312
+ onKeydown: this.onKeyDown
313
+ })])]);
314
+ };
315
+
301
316
  var replaceWithLabel = h("div", {
302
317
  "class": "k-edit-label"
303
318
  }, [h("label", {
@@ -308,13 +323,15 @@ var FindAndReplaceDialogVue2 = {
308
323
  }, [localization.toLanguageString(findReplaceReplaceWith, messages[findReplaceReplaceWith])])]);
309
324
  var replaceWith = h("div", {
310
325
  "class": "k-edit-field"
326
+ }, [h("span", {
327
+ "class": "k-textbox k-input k-input-md k-rounded-md k-input-solid"
311
328
  }, [h("input", {
312
329
  id: "replaceWith",
313
330
  attrs: this.v3 ? undefined : {
314
331
  id: "replaceWith",
315
332
  type: "text"
316
333
  },
317
- "class": "k-input",
334
+ "class": "k-input-inner",
318
335
  type: "text",
319
336
  value: this.v3 ? replaceText : null,
320
337
  domProps: this.v3 ? undefined : {
@@ -324,7 +341,7 @@ var FindAndReplaceDialogVue2 = {
324
341
  on: this.v3 ? undefined : {
325
342
  "input": this.onReplaceChange
326
343
  }
327
- })]);
344
+ })])]);
328
345
  return (// @ts-ignore function children
329
346
  h(Window, {
330
347
  title: localization.toLanguageString(findReplaceDialogTitle, messages[findReplaceDialogTitle]),
@@ -341,7 +358,8 @@ var FindAndReplaceDialogVue2 = {
341
358
  },
342
359
  maximizeButton: function maximizeButton() {
343
360
  return null;
344
- }
361
+ },
362
+ dir: this.$props.dir
345
363
  },
346
364
  onClose: this.onClose,
347
365
  on: this.v3 ? undefined : {
@@ -358,15 +376,18 @@ var FindAndReplaceDialogVue2 = {
358
376
  },
359
377
  maximizeButton: function maximizeButton() {
360
378
  return null;
361
- }
379
+ },
380
+ dir: this.$props.dir
362
381
  }, this.v3 ? function () {
363
382
  return [// @ts-ignore function children
364
383
  h(TabStrip, {
365
- selected: _this.selectedTab,
384
+ dir: _this.$props.dir,
366
385
  attrs: _this.v3 ? undefined : {
386
+ dir: _this.$props.dir,
367
387
  selected: _this.selectedTab,
368
388
  animation: false
369
389
  },
390
+ selected: _this.selectedTab,
370
391
  "class": "k-editor-find-replace",
371
392
  onSelect: _this.onTabSelect,
372
393
  on: _this.v3 ? undefined : {
@@ -383,10 +404,10 @@ var FindAndReplaceDialogVue2 = {
383
404
  }, _this.v3 ? function () {
384
405
  return [h("div", {
385
406
  "class": "k-edit-form-container"
386
- }, [findWhatLabel, findWhat]), checkboxes, navigation];
407
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')];
387
408
  } : [h("div", {
388
409
  "class": "k-edit-form-container"
389
- }, [findWhatLabel, findWhat]), checkboxes, navigation]), // @ts-ignore function children
410
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')]), // @ts-ignore function children
390
411
  h(TabStripTab, {
391
412
  title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace]),
392
413
  attrs: _this.v3 ? undefined : {
@@ -395,7 +416,7 @@ var FindAndReplaceDialogVue2 = {
395
416
  }, _this.v3 ? function () {
396
417
  return [h("div", {
397
418
  "class": "k-edit-form-container"
398
- }, [findWhatLabel, findWhat, replaceWithLabel, replaceWith]), h("div", {
419
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
399
420
  "class": "k-actions k-hstack k-justify-content-end"
400
421
  }, [// @ts-ignore function children
401
422
  h(Button, {
@@ -421,10 +442,10 @@ var FindAndReplaceDialogVue2 = {
421
442
  }
422
443
  }, _this.v3 ? function () {
423
444
  return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
424
- } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation];
445
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')];
425
446
  } : [h("div", {
426
447
  "class": "k-edit-form-container"
427
- }, [findWhatLabel, findWhat, replaceWithLabel, replaceWith]), h("div", {
448
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
428
449
  "class": "k-actions k-hstack k-justify-content-end"
429
450
  }, [h(Button, {
430
451
  disabled: !Boolean(nextMatch),
@@ -448,7 +469,7 @@ var FindAndReplaceDialogVue2 = {
448
469
  }
449
470
  }, _this.v3 ? function () {
450
471
  return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
451
- } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation])];
472
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')])];
452
473
  } : [h(TabStripTab, {
453
474
  title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind]),
454
475
  attrs: _this.v3 ? undefined : {
@@ -457,10 +478,10 @@ var FindAndReplaceDialogVue2 = {
457
478
  }, _this.v3 ? function () {
458
479
  return [h("div", {
459
480
  "class": "k-edit-form-container"
460
- }, [findWhatLabel, findWhat]), checkboxes, navigation];
481
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')];
461
482
  } : [h("div", {
462
483
  "class": "k-edit-form-container"
463
- }, [findWhatLabel, findWhat]), checkboxes, navigation]), h(TabStripTab, {
484
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')]), h(TabStripTab, {
464
485
  title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace]),
465
486
  attrs: _this.v3 ? undefined : {
466
487
  title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace])
@@ -468,7 +489,7 @@ var FindAndReplaceDialogVue2 = {
468
489
  }, _this.v3 ? function () {
469
490
  return [h("div", {
470
491
  "class": "k-edit-form-container"
471
- }, [findWhatLabel, findWhat, replaceWithLabel, replaceWith]), h("div", {
492
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
472
493
  "class": "k-actions k-hstack k-justify-content-end"
473
494
  }, [h(Button, {
474
495
  disabled: !Boolean(nextMatch),
@@ -492,10 +513,10 @@ var FindAndReplaceDialogVue2 = {
492
513
  }
493
514
  }, _this.v3 ? function () {
494
515
  return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
495
- } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation];
516
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')];
496
517
  } : [h("div", {
497
518
  "class": "k-edit-form-container"
498
- }, [findWhatLabel, findWhat, replaceWithLabel, replaceWith]), h("div", {
519
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
499
520
  "class": "k-actions k-hstack k-justify-content-end"
500
521
  }, [h(Button, {
501
522
  disabled: !Boolean(nextMatch),
@@ -519,13 +540,15 @@ var FindAndReplaceDialogVue2 = {
519
540
  }
520
541
  }, _this.v3 ? function () {
521
542
  return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
522
- } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation])])];
543
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')])])];
523
544
  } : [h(TabStrip, {
524
- selected: _this.selectedTab,
545
+ dir: _this.$props.dir,
525
546
  attrs: _this.v3 ? undefined : {
547
+ dir: _this.$props.dir,
526
548
  selected: _this.selectedTab,
527
549
  animation: false
528
550
  },
551
+ selected: _this.selectedTab,
529
552
  "class": "k-editor-find-replace",
530
553
  onSelect: _this.onTabSelect,
531
554
  on: _this.v3 ? undefined : {
@@ -541,10 +564,10 @@ var FindAndReplaceDialogVue2 = {
541
564
  }, _this.v3 ? function () {
542
565
  return [h("div", {
543
566
  "class": "k-edit-form-container"
544
- }, [findWhatLabel, findWhat]), checkboxes, navigation];
567
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')];
545
568
  } : [h("div", {
546
569
  "class": "k-edit-form-container"
547
- }, [findWhatLabel, findWhat]), checkboxes, navigation]), h(TabStripTab, {
570
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')]), h(TabStripTab, {
548
571
  title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace]),
549
572
  attrs: _this.v3 ? undefined : {
550
573
  title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace])
@@ -552,7 +575,7 @@ var FindAndReplaceDialogVue2 = {
552
575
  }, _this.v3 ? function () {
553
576
  return [h("div", {
554
577
  "class": "k-edit-form-container"
555
- }, [findWhatLabel, findWhat, replaceWithLabel, replaceWith]), h("div", {
578
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
556
579
  "class": "k-actions k-hstack k-justify-content-end"
557
580
  }, [h(Button, {
558
581
  disabled: !Boolean(nextMatch),
@@ -576,10 +599,10 @@ var FindAndReplaceDialogVue2 = {
576
599
  }
577
600
  }, _this.v3 ? function () {
578
601
  return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
579
- } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation];
602
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')];
580
603
  } : [h("div", {
581
604
  "class": "k-edit-form-container"
582
- }, [findWhatLabel, findWhat, replaceWithLabel, replaceWith]), h("div", {
605
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
583
606
  "class": "k-actions k-hstack k-justify-content-end"
584
607
  }, [h(Button, {
585
608
  disabled: !Boolean(nextMatch),
@@ -603,7 +626,7 @@ var FindAndReplaceDialogVue2 = {
603
626
  }
604
627
  }, _this.v3 ? function () {
605
628
  return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
606
- } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation])];
629
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')])];
607
630
  } : [h(TabStripTab, {
608
631
  title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind]),
609
632
  attrs: _this.v3 ? undefined : {
@@ -612,10 +635,10 @@ var FindAndReplaceDialogVue2 = {
612
635
  }, _this.v3 ? function () {
613
636
  return [h("div", {
614
637
  "class": "k-edit-form-container"
615
- }, [findWhatLabel, findWhat]), checkboxes, navigation];
638
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')];
616
639
  } : [h("div", {
617
640
  "class": "k-edit-form-container"
618
- }, [findWhatLabel, findWhat]), checkboxes, navigation]), h(TabStripTab, {
641
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')]), h(TabStripTab, {
619
642
  title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace]),
620
643
  attrs: _this.v3 ? undefined : {
621
644
  title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace])
@@ -623,7 +646,7 @@ var FindAndReplaceDialogVue2 = {
623
646
  }, _this.v3 ? function () {
624
647
  return [h("div", {
625
648
  "class": "k-edit-form-container"
626
- }, [findWhatLabel, findWhat, replaceWithLabel, replaceWith]), h("div", {
649
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
627
650
  "class": "k-actions k-hstack k-justify-content-end"
628
651
  }, [h(Button, {
629
652
  disabled: !Boolean(nextMatch),
@@ -647,10 +670,10 @@ var FindAndReplaceDialogVue2 = {
647
670
  }
648
671
  }, _this.v3 ? function () {
649
672
  return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
650
- } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation];
673
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')];
651
674
  } : [h("div", {
652
675
  "class": "k-edit-form-container"
653
- }, [findWhatLabel, findWhat, replaceWithLabel, replaceWith]), h("div", {
676
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
654
677
  "class": "k-actions k-hstack k-justify-content-end"
655
678
  }, [h(Button, {
656
679
  disabled: !Boolean(nextMatch),
@@ -674,7 +697,7 @@ var FindAndReplaceDialogVue2 = {
674
697
  }
675
698
  }, _this.v3 ? function () {
676
699
  return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
677
- } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation])])])
700
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')])])])
678
701
  ); // document.body);
679
702
  },
680
703
  methods: {
@@ -737,7 +760,12 @@ var FindAndReplaceDialogVue2 = {
737
760
  var transaction = view.state.tr.setSelection(selectionResult);
738
761
  transaction.scrollIntoView();
739
762
  view.updateState(view.state.apply(transaction));
763
+ this._prevMatch = this.nextMatch;
740
764
  this.nextMatch = selectionResult;
765
+
766
+ if (this._prevMatch !== this.nextMatch) {
767
+ this.$forceUpdate();
768
+ }
741
769
  }
742
770
  },
743
771
  onReplace: function onReplace() {
@@ -818,10 +846,12 @@ var FindAndReplaceDialogVue2 = {
818
846
  var nextMatch = !this.searchText && matches[0] || matches.find(function (match) {
819
847
  return match.from >= selection_1.from;
820
848
  }) || this.matchCyclic && matches[0] || undefined;
849
+ this._prevMatch = this.nextMatch;
821
850
  this.matches = matches;
822
851
  this.nextMatch = nextMatch;
823
852
  } else {
824
- this.matches = undefined;
853
+ this._prevMatch = this.nextMatch;
854
+ this.matches = [];
825
855
  this.nextMatch = undefined;
826
856
  }
827
857
  }