@progress/kendo-vue-editor 3.5.0 → 3.5.1-dev.202208100944

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 (153) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/js/kendo-vue-editor.js +1 -1
  3. package/dist/es/Editor.d.ts +41 -41
  4. package/dist/es/Editor.js +7 -11
  5. package/dist/es/EditorProps.js +1 -0
  6. package/dist/es/config/pasteSettings.js +1 -0
  7. package/dist/es/config/toolsSettings.js +13 -11
  8. package/dist/es/dialogs/EditorDialogProps.js +1 -0
  9. package/dist/es/dialogs/FindReplace.js +4 -4
  10. package/dist/es/main.d.ts +0 -1
  11. package/dist/es/main.js +115 -28
  12. package/dist/es/messages/index.d.ts +0 -313
  13. package/dist/es/package-metadata.js +1 -1
  14. package/dist/es/tools/ToolProps.d.ts +2 -1
  15. package/dist/es/tools/ToolProps.js +1 -0
  16. package/dist/es/tools/fontStyle.js +7 -11
  17. package/dist/es/tools/formatBlock.js +7 -11
  18. package/dist/es/tools/insertTable/popupGrid.js +1 -1
  19. package/dist/es/tools/main.js +1 -0
  20. package/dist/esm/Editor.d.ts +283 -0
  21. package/dist/esm/Editor.js +813 -0
  22. package/dist/esm/EditorProps.d.ts +182 -0
  23. package/dist/esm/EditorProps.js +1 -0
  24. package/dist/esm/additionalTypes.ts +21 -0
  25. package/dist/esm/config/defaultStyles.d.ts +12 -0
  26. package/dist/esm/config/defaultStyles.js +12 -0
  27. package/dist/esm/config/pasteSettings.d.ts +6 -0
  28. package/dist/esm/config/pasteSettings.js +1 -0
  29. package/dist/esm/config/schema.d.ts +8 -0
  30. package/dist/esm/config/schema.js +51 -0
  31. package/dist/esm/config/shortcuts.d.ts +22 -0
  32. package/dist/esm/config/shortcuts.js +70 -0
  33. package/dist/esm/config/toolsSettings.d.ts +485 -0
  34. package/dist/esm/config/toolsSettings.js +525 -0
  35. package/dist/esm/dialogs/EditorDialogProps.d.ts +23 -0
  36. package/dist/esm/dialogs/EditorDialogProps.js +1 -0
  37. package/dist/esm/dialogs/FindReplace.d.ts +70 -0
  38. package/dist/esm/dialogs/FindReplace.js +880 -0
  39. package/dist/esm/dialogs/insertImage.d.ts +54 -0
  40. package/dist/esm/dialogs/insertImage.js +299 -0
  41. package/dist/esm/dialogs/insertLink.d.ts +52 -0
  42. package/dist/esm/dialogs/insertLink.js +313 -0
  43. package/dist/esm/dialogs/main.d.ts +1 -0
  44. package/dist/esm/dialogs/main.js +42 -0
  45. package/dist/esm/dialogs/viewHtml.d.ts +51 -0
  46. package/dist/esm/dialogs/viewHtml.js +149 -0
  47. package/dist/esm/main.d.ts +184 -0
  48. package/dist/esm/main.js +216 -0
  49. package/dist/esm/messages/index.d.ts +166 -0
  50. package/dist/esm/messages/index.js +485 -0
  51. package/dist/esm/package-metadata.d.ts +5 -0
  52. package/dist/esm/package-metadata.js +11 -0
  53. package/dist/esm/package.json +3 -0
  54. package/dist/esm/tools/ToolProps.d.ts +35 -0
  55. package/dist/esm/tools/ToolProps.js +1 -0
  56. package/dist/esm/tools/align.d.ts +42 -0
  57. package/dist/esm/tools/align.js +124 -0
  58. package/dist/esm/tools/applyColor.d.ts +45 -0
  59. package/dist/esm/tools/applyColor.js +107 -0
  60. package/dist/esm/tools/cleanFormatting.d.ts +49 -0
  61. package/dist/esm/tools/cleanFormatting.js +122 -0
  62. package/dist/esm/tools/findReplace.d.ts +43 -0
  63. package/dist/esm/tools/findReplace.js +127 -0
  64. package/dist/esm/tools/fontStyle.d.ts +55 -0
  65. package/dist/esm/tools/fontStyle.js +166 -0
  66. package/dist/esm/tools/formatBlock.d.ts +45 -0
  67. package/dist/esm/tools/formatBlock.js +161 -0
  68. package/dist/esm/tools/history.d.ts +18 -0
  69. package/dist/esm/tools/history.js +5 -0
  70. package/dist/esm/tools/indent.d.ts +44 -0
  71. package/dist/esm/tools/indent.js +135 -0
  72. package/dist/esm/tools/inlineFormat.d.ts +74 -0
  73. package/dist/esm/tools/inlineFormat.js +133 -0
  74. package/dist/esm/tools/insertImage.d.ts +46 -0
  75. package/dist/esm/tools/insertImage.js +138 -0
  76. package/dist/esm/tools/insertLink.d.ts +46 -0
  77. package/dist/esm/tools/insertLink.js +138 -0
  78. package/dist/esm/tools/insertTable/index.d.ts +1 -0
  79. package/dist/esm/tools/insertTable/index.js +6 -0
  80. package/dist/esm/tools/insertTable/popup.d.ts +80 -0
  81. package/dist/esm/tools/insertTable/popup.js +176 -0
  82. package/dist/esm/tools/insertTable/popupGrid.d.ts +51 -0
  83. package/dist/esm/tools/insertTable/popupGrid.js +139 -0
  84. package/dist/esm/tools/insertTable/tool.d.ts +53 -0
  85. package/dist/esm/tools/insertTable/tool.js +173 -0
  86. package/dist/esm/tools/lists.d.ts +48 -0
  87. package/dist/esm/tools/lists.js +140 -0
  88. package/dist/esm/tools/main.d.ts +95 -0
  89. package/dist/esm/tools/main.js +1 -0
  90. package/dist/esm/tools/outdent.d.ts +44 -0
  91. package/dist/esm/tools/outdent.js +137 -0
  92. package/dist/esm/tools/pdf.d.ts +58 -0
  93. package/dist/esm/tools/pdf.js +113 -0
  94. package/dist/esm/tools/print.d.ts +49 -0
  95. package/dist/esm/tools/print.js +117 -0
  96. package/dist/esm/tools/proseMirrorTool.d.ts +48 -0
  97. package/dist/esm/tools/proseMirrorTool.js +118 -0
  98. package/dist/esm/tools/selectAll.d.ts +49 -0
  99. package/dist/esm/tools/selectAll.js +110 -0
  100. package/dist/esm/tools/tableEdit.d.ts +51 -0
  101. package/dist/esm/tools/tableEdit.js +43 -0
  102. package/dist/esm/tools/unlink.d.ts +47 -0
  103. package/dist/esm/tools/unlink.js +118 -0
  104. package/dist/esm/tools/utils.d.ts +18 -0
  105. package/dist/esm/tools/utils.js +36 -0
  106. package/dist/esm/tools/viewHtml.d.ts +54 -0
  107. package/dist/esm/tools/viewHtml.js +133 -0
  108. package/dist/esm/utils/browser-detection.d.ts +4 -0
  109. package/dist/esm/utils/browser-detection.js +5 -0
  110. package/dist/esm/utils/controlled-value.d.ts +5 -0
  111. package/dist/esm/utils/controlled-value.js +31 -0
  112. package/dist/esm/utils/index.d.ts +358 -0
  113. package/dist/esm/utils/index.js +422 -0
  114. package/dist/esm/utils/props-key.d.ts +5 -0
  115. package/dist/esm/utils/props-key.js +5 -0
  116. package/dist/npm/Editor.d.ts +41 -41
  117. package/dist/npm/Editor.js +18 -22
  118. package/dist/npm/config/schema.js +1 -1
  119. package/dist/npm/config/shortcuts.js +11 -9
  120. package/dist/npm/config/toolsSettings.js +13 -11
  121. package/dist/npm/dialogs/FindReplace.js +11 -11
  122. package/dist/npm/dialogs/insertImage.js +12 -12
  123. package/dist/npm/dialogs/insertLink.js +9 -9
  124. package/dist/npm/dialogs/viewHtml.js +7 -7
  125. package/dist/npm/main.d.ts +0 -1
  126. package/dist/npm/main.js +116 -29
  127. package/dist/npm/messages/index.d.ts +0 -313
  128. package/dist/npm/package-metadata.js +1 -1
  129. package/dist/npm/tools/ToolProps.d.ts +2 -1
  130. package/dist/npm/tools/align.js +4 -4
  131. package/dist/npm/tools/applyColor.js +2 -2
  132. package/dist/npm/tools/cleanFormatting.js +2 -2
  133. package/dist/npm/tools/findReplace.js +1 -1
  134. package/dist/npm/tools/fontStyle.js +10 -14
  135. package/dist/npm/tools/formatBlock.js +10 -14
  136. package/dist/npm/tools/indent.js +11 -11
  137. package/dist/npm/tools/inlineFormat.js +3 -3
  138. package/dist/npm/tools/insertImage.js +2 -2
  139. package/dist/npm/tools/insertLink.js +2 -2
  140. package/dist/npm/tools/insertTable/popupGrid.js +2 -2
  141. package/dist/npm/tools/insertTable/tool.js +5 -5
  142. package/dist/npm/tools/lists.js +4 -4
  143. package/dist/npm/tools/outdent.js +7 -7
  144. package/dist/npm/tools/pdf.js +2 -2
  145. package/dist/npm/tools/print.js +1 -1
  146. package/dist/npm/tools/proseMirrorTool.js +1 -1
  147. package/dist/npm/tools/selectAll.js +2 -2
  148. package/dist/npm/tools/tableEdit.js +4 -4
  149. package/dist/npm/tools/unlink.js +3 -3
  150. package/dist/npm/tools/viewHtml.js +1 -1
  151. package/dist/npm/utils/controlled-value.js +2 -1
  152. package/dist/npm/utils/index.js +35 -35
  153. package/package.json +12 -12
@@ -0,0 +1,880 @@
1
+ // @ts-ignore
2
+ import * as Vue from 'vue';
3
+ var allVue = Vue;
4
+ var gh = allVue.h;
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
+ import { Button } from '@progress/kendo-vue-buttons';
7
+ import { Window } from '@progress/kendo-vue-dialogs';
8
+ import { TabStrip, TabStripTab } from '@progress/kendo-vue-layout';
9
+ import { provideLocalizationService } from '@progress/kendo-vue-intl';
10
+ import { messages } from './../messages.js';
11
+ import { EditorToolsSettings } from './../config/toolsSettings.js';
12
+ import { formatString } from './../tools/utils.js';
13
+ import { find, replace, replaceAll, findAll, TextSelection, textHighlightKey, selectedLineTextOnly } from '@progress/kendo-editor-common';
14
+ var enter = 13,
15
+ esc = 27;
16
+ var settings = EditorToolsSettings.findAndReplace;
17
+ /**
18
+ * @hidden
19
+ */
20
+
21
+ var FindAndReplaceDialogVue2 = {
22
+ name: 'KendoFindAndReplaceDialog',
23
+ // @ts-ignore
24
+ emits: {
25
+ close: null
26
+ },
27
+ props: {
28
+ view: Object,
29
+ settings: {
30
+ type: Object,
31
+ default: function _default() {
32
+ return settings;
33
+ }
34
+ },
35
+ dir: String
36
+ },
37
+ inject: {
38
+ kendoLocalizationService: {
39
+ default: null
40
+ }
41
+ },
42
+ created: function created() {
43
+ this._prevMatch = undefined;
44
+ this.nextMatch = undefined;
45
+ },
46
+ data: function data() {
47
+ return {
48
+ selectedTab: 0,
49
+ searchText: selectedLineTextOnly(this.$props.view.state),
50
+ replaceText: '',
51
+ matchCase: false,
52
+ matchWord: false,
53
+ matchCyclic: false,
54
+ useRegExp: false,
55
+ matches: [],
56
+ hasMounted: false
57
+ };
58
+ },
59
+ mounted: function mounted() {
60
+ if (this.$el) {
61
+ document.body.append(this.$el);
62
+ }
63
+
64
+ this.setNextState();
65
+ this.hasMounted = true;
66
+ setTimeout(function () {
67
+ var findInput = document.getElementById('findWhatFind');
68
+
69
+ if (findInput) {
70
+ findInput.focus();
71
+ }
72
+ }, 10);
73
+ },
74
+
75
+ /**
76
+ * @hidden
77
+ */
78
+ updated: function updated() {
79
+ var matches = this.matches || [];
80
+ var nextMatch = this.nextMatch;
81
+ var view = this.$props.view;
82
+
83
+ if (this._prevMatch !== nextMatch) {
84
+ var state = view.state; // highlight selection
85
+
86
+ var tr = state.tr;
87
+ var highlights_1 = [];
88
+ matches.forEach(function (m) {
89
+ highlights_1.push({
90
+ from: m.from,
91
+ to: m.to,
92
+ attrs: {
93
+ class: nextMatch && m.eq(nextMatch) ? 'k-text-selected' : 'k-text-highlighted'
94
+ }
95
+ });
96
+ });
97
+ tr.setMeta(textHighlightKey, highlights_1);
98
+ tr.setSelection(nextMatch || TextSelection.create(state.doc, state.selection.from));
99
+ view.dispatch(tr);
100
+ }
101
+ },
102
+ destroyed: !!isV3 ? undefined : function () {
103
+ if (this.$el) {
104
+ this.$el.remove();
105
+ }
106
+ },
107
+ // @ts-ignore
108
+ unmounted: function unmounted() {
109
+ if (this.$el) {
110
+ this.$el.remove();
111
+ }
112
+ },
113
+ // @ts-ignore
114
+ setup: !isV3 ? undefined : function () {
115
+ var v3 = !!isV3;
116
+ return {
117
+ v3: v3
118
+ };
119
+ },
120
+ // @ts-ignore
121
+ render: function render(createElement) {
122
+ var _this = this;
123
+
124
+ var h = gh || createElement;
125
+ var localization = provideLocalizationService(this);
126
+ var _a = this.settings.messages,
127
+ findReplaceDialogTitle = _a.findReplaceDialogTitle,
128
+ findReplaceTabFind = _a.findReplaceTabFind,
129
+ findReplaceTabReplace = _a.findReplaceTabReplace,
130
+ findReplaceFindWhat = _a.findReplaceFindWhat,
131
+ findReplaceReplaceWith = _a.findReplaceReplaceWith,
132
+ findReplaceReplace = _a.findReplaceReplace,
133
+ findReplaceReplaceAll = _a.findReplaceReplaceAll,
134
+ findReplaceMatchCase = _a.findReplaceMatchCase,
135
+ findReplaceMatchWord = _a.findReplaceMatchWord,
136
+ findReplaceMatchCyclic = _a.findReplaceMatchCyclic,
137
+ findReplaceUseRegExp = _a.findReplaceUseRegExp,
138
+ findReplacePrevMatch = _a.findReplacePrevMatch,
139
+ findReplaceNextMatch = _a.findReplaceNextMatch,
140
+ findReplaceMatches = _a.findReplaceMatches;
141
+
142
+ var _b = this,
143
+ matchCase = _b.matchCase,
144
+ matchWord = _b.matchWord,
145
+ matchCyclic = _b.matchCyclic,
146
+ useRegExp = _b.useRegExp,
147
+ searchText = _b.searchText,
148
+ replaceText = _b.replaceText,
149
+ nextMatch = _b.nextMatch;
150
+
151
+ var checkboxes = h("div", {
152
+ "class": "k-search-options"
153
+ }, [h("span", [h("input", {
154
+ "class": "k-checkbox k-checkbox-md k-rounded-md",
155
+ type: "checkbox",
156
+ attrs: this.v3 ? undefined : {
157
+ type: "checkbox",
158
+ id: "match-case"
159
+ },
160
+ id: "match-case",
161
+ checked: this.v3 ? matchCase : null,
162
+ domProps: this.v3 ? undefined : {
163
+ "checked": matchCase
164
+ },
165
+ onChange: this.onMatchCaseChecked,
166
+ on: this.v3 ? undefined : {
167
+ "change": this.onMatchCaseChecked
168
+ }
169
+ }), h("label", {
170
+ "for": "match-case",
171
+ attrs: this.v3 ? undefined : {
172
+ "for": "match-case"
173
+ },
174
+ "class": "k-checkbox-label"
175
+ }, [localization.toLanguageString(findReplaceMatchCase, messages[findReplaceMatchCase])])]), h("span", [h("input", {
176
+ "class": "k-checkbox k-checkbox-md k-rounded-md",
177
+ type: "checkbox",
178
+ attrs: this.v3 ? undefined : {
179
+ type: "checkbox",
180
+ id: "match-whole"
181
+ },
182
+ id: "match-whole",
183
+ checked: this.v3 ? matchWord : null,
184
+ domProps: this.v3 ? undefined : {
185
+ "checked": matchWord
186
+ },
187
+ onChange: this.onMatchWordChecked,
188
+ on: this.v3 ? undefined : {
189
+ "change": this.onMatchWordChecked
190
+ }
191
+ }), h("label", {
192
+ "for": "match-whole",
193
+ attrs: this.v3 ? undefined : {
194
+ "for": "match-whole"
195
+ },
196
+ "class": "k-checkbox-label"
197
+ }, [localization.toLanguageString(findReplaceMatchWord, messages[findReplaceMatchWord])])]), h("span", [h("input", {
198
+ "class": "k-checkbox k-checkbox-md k-rounded-md",
199
+ type: "checkbox",
200
+ attrs: this.v3 ? undefined : {
201
+ type: "checkbox",
202
+ id: "match-cyclic"
203
+ },
204
+ id: "match-cyclic",
205
+ checked: this.v3 ? matchCyclic : null,
206
+ domProps: this.v3 ? undefined : {
207
+ "checked": matchCyclic
208
+ },
209
+ onChange: this.onMatchCyclicChecked,
210
+ on: this.v3 ? undefined : {
211
+ "change": this.onMatchCyclicChecked
212
+ }
213
+ }), h("label", {
214
+ "for": "match-cyclic",
215
+ attrs: this.v3 ? undefined : {
216
+ "for": "match-cyclic"
217
+ },
218
+ "class": "k-checkbox-label"
219
+ }, [localization.toLanguageString(findReplaceMatchCyclic, messages[findReplaceMatchCyclic])])]), h("span", [h("input", {
220
+ "class": "k-checkbox k-checkbox-md k-rounded-md",
221
+ type: "checkbox",
222
+ attrs: this.v3 ? undefined : {
223
+ type: "checkbox",
224
+ id: "regular-expression"
225
+ },
226
+ id: "regular-expression",
227
+ checked: this.v3 ? useRegExp : null,
228
+ domProps: this.v3 ? undefined : {
229
+ "checked": useRegExp
230
+ },
231
+ onChange: this.onUseRegExpChecked,
232
+ on: this.v3 ? undefined : {
233
+ "change": this.onUseRegExpChecked
234
+ }
235
+ }), h("label", {
236
+ "for": "regular-expression",
237
+ attrs: this.v3 ? undefined : {
238
+ "for": "regular-expression"
239
+ },
240
+ "class": "k-checkbox-label"
241
+ }, [localization.toLanguageString(findReplaceUseRegExp, messages[findReplaceUseRegExp])])])]);
242
+
243
+ var navigation = function navigation(findWhatRef) {
244
+ var isRtl = this.$props.dir === 'rtl';
245
+ var prevButton = // @ts-ignore function children
246
+ h(Button, {
247
+ fillMode: 'flat',
248
+ attrs: this.v3 ? undefined : {
249
+ fillMode: 'flat',
250
+ themeColor: 'primary'
251
+ },
252
+ themeColor: 'primary',
253
+ onClick: this.onFindPrev,
254
+ on: this.v3 ? undefined : {
255
+ "click": this.onFindPrev
256
+ }
257
+ }, this.v3 ? function () {
258
+ return [h("span", {
259
+ "class": "k-icon k-i-arrow-chevron-".concat(isRtl ? 'right' : 'left')
260
+ }), localization.toLanguageString(findReplacePrevMatch, messages[findReplacePrevMatch])];
261
+ } : [h("span", {
262
+ "class": "k-icon k-i-arrow-chevron-".concat(isRtl ? 'right' : 'left')
263
+ }), localization.toLanguageString(findReplacePrevMatch, messages[findReplacePrevMatch])]);
264
+ var nextButton = // @ts-ignore function children
265
+ h(Button, {
266
+ fillMode: 'flat',
267
+ attrs: this.v3 ? undefined : {
268
+ fillMode: 'flat',
269
+ themeColor: 'primary'
270
+ },
271
+ themeColor: 'primary',
272
+ onClick: this.onFindNext,
273
+ on: this.v3 ? undefined : {
274
+ "click": this.onFindNext
275
+ }
276
+ }, this.v3 ? function () {
277
+ return [localization.toLanguageString(findReplaceNextMatch, messages[findReplaceNextMatch]), h("span", {
278
+ "class": "k-icon k-i-arrow-chevron-".concat(isRtl ? 'left' : 'right')
279
+ })];
280
+ } : [localization.toLanguageString(findReplaceNextMatch, messages[findReplaceNextMatch]), h("span", {
281
+ "class": "k-icon k-i-arrow-chevron-".concat(isRtl ? 'left' : 'right')
282
+ })]);
283
+ return h("div", {
284
+ "class": "k-matches-container"
285
+ }, [prevButton, this.hasMounted && h("span", {
286
+ ref: findWhatRef
287
+ }, [this.matchesMessage(localization.toLanguageString(findReplaceMatches, messages[findReplaceMatches]))]), nextButton]);
288
+ };
289
+
290
+ var findWhatLabel = function findWhatLabel(findWhatId) {
291
+ return h("div", {
292
+ "class": "k-edit-label"
293
+ }, [h("label", {
294
+ ref: findWhatId,
295
+ "for": findWhatId,
296
+ attrs: this.v3 ? undefined : {
297
+ "for": findWhatId
298
+ }
299
+ }, [localization.toLanguageString(findReplaceFindWhat, messages[findReplaceFindWhat])])]);
300
+ };
301
+
302
+ var findWhat = function findWhat(findWhatId) {
303
+ return h("div", {
304
+ "class": "k-edit-field"
305
+ }, [h("span", {
306
+ "class": "k-textbox k-input k-input-md k-rounded-md k-input-solid"
307
+ }, [h("input", {
308
+ id: findWhatId,
309
+ attrs: this.v3 ? undefined : {
310
+ id: findWhatId,
311
+ type: "text"
312
+ },
313
+ ref: findWhatId,
314
+ type: "text",
315
+ "class": "k-input-inner",
316
+ value: this.v3 ? searchText : null,
317
+ domProps: this.v3 ? undefined : {
318
+ "value": searchText
319
+ },
320
+ onInput: this.onSearchChange,
321
+ on: this.v3 ? undefined : {
322
+ "input": this.onSearchChange,
323
+ "focus": this.onSearchChange,
324
+ "keydown": this.onKeyDown
325
+ },
326
+ onFocus: this.onSearchChange,
327
+ onKeydown: this.onKeyDown
328
+ })])]);
329
+ };
330
+
331
+ var replaceWithLabel = h("div", {
332
+ "class": "k-edit-label"
333
+ }, [h("label", {
334
+ "for": "replaceWith",
335
+ attrs: this.v3 ? undefined : {
336
+ "for": "replaceWith"
337
+ }
338
+ }, [localization.toLanguageString(findReplaceReplaceWith, messages[findReplaceReplaceWith])])]);
339
+ var replaceWith = h("div", {
340
+ "class": "k-edit-field"
341
+ }, [h("span", {
342
+ "class": "k-textbox k-input k-input-md k-rounded-md k-input-solid"
343
+ }, [h("input", {
344
+ id: "replaceWith",
345
+ attrs: this.v3 ? undefined : {
346
+ id: "replaceWith",
347
+ type: "text"
348
+ },
349
+ "class": "k-input-inner",
350
+ type: "text",
351
+ value: this.v3 ? replaceText : null,
352
+ domProps: this.v3 ? undefined : {
353
+ "value": replaceText
354
+ },
355
+ onInput: this.onReplaceChange,
356
+ on: this.v3 ? undefined : {
357
+ "input": this.onReplaceChange
358
+ }
359
+ })])]);
360
+ return (// @ts-ignore function children
361
+ h(Window, {
362
+ title: localization.toLanguageString(findReplaceDialogTitle, messages[findReplaceDialogTitle]),
363
+ attrs: this.v3 ? undefined : {
364
+ title: localization.toLanguageString(findReplaceDialogTitle, messages[findReplaceDialogTitle]),
365
+ windowStyle: {
366
+ width: 'auto',
367
+ height: 'auto',
368
+ userSelect: 'none'
369
+ },
370
+ resizable: false,
371
+ minimizeButton: function minimizeButton() {
372
+ return null;
373
+ },
374
+ maximizeButton: function maximizeButton() {
375
+ return null;
376
+ },
377
+ dir: this.$props.dir
378
+ },
379
+ onClose: this.onClose,
380
+ on: this.v3 ? undefined : {
381
+ "close": this.onClose
382
+ },
383
+ windowStyle: {
384
+ width: 'auto',
385
+ height: 'auto',
386
+ userSelect: 'none'
387
+ },
388
+ resizable: false,
389
+ minimizeButton: function minimizeButton() {
390
+ return null;
391
+ },
392
+ maximizeButton: function maximizeButton() {
393
+ return null;
394
+ },
395
+ dir: this.$props.dir
396
+ }, this.v3 ? function () {
397
+ return [// @ts-ignore function children
398
+ h(TabStrip, {
399
+ dir: _this.$props.dir,
400
+ attrs: _this.v3 ? undefined : {
401
+ dir: _this.$props.dir,
402
+ selected: _this.selectedTab,
403
+ animation: false
404
+ },
405
+ selected: _this.selectedTab,
406
+ "class": "k-editor-find-replace",
407
+ onSelect: _this.onTabSelect,
408
+ on: _this.v3 ? undefined : {
409
+ "select": _this.onTabSelect
410
+ },
411
+ animation: false
412
+ }, _this.v3 ? function () {
413
+ return [// @ts-ignore function children
414
+ h(TabStripTab, {
415
+ title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind]),
416
+ attrs: _this.v3 ? undefined : {
417
+ title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind])
418
+ }
419
+ }, _this.v3 ? function () {
420
+ return [h("div", {
421
+ "class": "k-edit-form-container"
422
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')];
423
+ } : [h("div", {
424
+ "class": "k-edit-form-container"
425
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')]), // @ts-ignore function children
426
+ h(TabStripTab, {
427
+ title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace]),
428
+ attrs: _this.v3 ? undefined : {
429
+ title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace])
430
+ }
431
+ }, _this.v3 ? function () {
432
+ return [h("div", {
433
+ "class": "k-edit-form-container"
434
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
435
+ "class": "k-actions k-hstack k-justify-content-end"
436
+ }, [// @ts-ignore function children
437
+ h(Button, {
438
+ disabled: !Boolean(nextMatch),
439
+ attrs: _this.v3 ? undefined : {
440
+ disabled: !Boolean(nextMatch)
441
+ },
442
+ onClick: _this.onReplace,
443
+ on: _this.v3 ? undefined : {
444
+ "click": _this.onReplace
445
+ }
446
+ }, _this.v3 ? function () {
447
+ return [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])];
448
+ } : [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])]), // @ts-ignore function children
449
+ h(Button, {
450
+ disabled: !Boolean(nextMatch),
451
+ attrs: _this.v3 ? undefined : {
452
+ disabled: !Boolean(nextMatch)
453
+ },
454
+ onClick: _this.onReplaceAll,
455
+ on: _this.v3 ? undefined : {
456
+ "click": _this.onReplaceAll
457
+ }
458
+ }, _this.v3 ? function () {
459
+ return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
460
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')];
461
+ } : [h("div", {
462
+ "class": "k-edit-form-container"
463
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
464
+ "class": "k-actions k-hstack k-justify-content-end"
465
+ }, [h(Button, {
466
+ disabled: !Boolean(nextMatch),
467
+ attrs: _this.v3 ? undefined : {
468
+ disabled: !Boolean(nextMatch)
469
+ },
470
+ onClick: _this.onReplace,
471
+ on: _this.v3 ? undefined : {
472
+ "click": _this.onReplace
473
+ }
474
+ }, _this.v3 ? function () {
475
+ return [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])];
476
+ } : [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])]), h(Button, {
477
+ disabled: !Boolean(nextMatch),
478
+ attrs: _this.v3 ? undefined : {
479
+ disabled: !Boolean(nextMatch)
480
+ },
481
+ onClick: _this.onReplaceAll,
482
+ on: _this.v3 ? undefined : {
483
+ "click": _this.onReplaceAll
484
+ }
485
+ }, _this.v3 ? function () {
486
+ return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
487
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')])];
488
+ } : [h(TabStripTab, {
489
+ title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind]),
490
+ attrs: _this.v3 ? undefined : {
491
+ title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind])
492
+ }
493
+ }, _this.v3 ? function () {
494
+ return [h("div", {
495
+ "class": "k-edit-form-container"
496
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')];
497
+ } : [h("div", {
498
+ "class": "k-edit-form-container"
499
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')]), h(TabStripTab, {
500
+ title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace]),
501
+ attrs: _this.v3 ? undefined : {
502
+ title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace])
503
+ }
504
+ }, _this.v3 ? function () {
505
+ return [h("div", {
506
+ "class": "k-edit-form-container"
507
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
508
+ "class": "k-actions k-hstack k-justify-content-end"
509
+ }, [h(Button, {
510
+ disabled: !Boolean(nextMatch),
511
+ attrs: _this.v3 ? undefined : {
512
+ disabled: !Boolean(nextMatch)
513
+ },
514
+ onClick: _this.onReplace,
515
+ on: _this.v3 ? undefined : {
516
+ "click": _this.onReplace
517
+ }
518
+ }, _this.v3 ? function () {
519
+ return [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])];
520
+ } : [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])]), h(Button, {
521
+ disabled: !Boolean(nextMatch),
522
+ attrs: _this.v3 ? undefined : {
523
+ disabled: !Boolean(nextMatch)
524
+ },
525
+ onClick: _this.onReplaceAll,
526
+ on: _this.v3 ? undefined : {
527
+ "click": _this.onReplaceAll
528
+ }
529
+ }, _this.v3 ? function () {
530
+ return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
531
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')];
532
+ } : [h("div", {
533
+ "class": "k-edit-form-container"
534
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
535
+ "class": "k-actions k-hstack k-justify-content-end"
536
+ }, [h(Button, {
537
+ disabled: !Boolean(nextMatch),
538
+ attrs: _this.v3 ? undefined : {
539
+ disabled: !Boolean(nextMatch)
540
+ },
541
+ onClick: _this.onReplace,
542
+ on: _this.v3 ? undefined : {
543
+ "click": _this.onReplace
544
+ }
545
+ }, _this.v3 ? function () {
546
+ return [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])];
547
+ } : [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])]), h(Button, {
548
+ disabled: !Boolean(nextMatch),
549
+ attrs: _this.v3 ? undefined : {
550
+ disabled: !Boolean(nextMatch)
551
+ },
552
+ onClick: _this.onReplaceAll,
553
+ on: _this.v3 ? undefined : {
554
+ "click": _this.onReplaceAll
555
+ }
556
+ }, _this.v3 ? function () {
557
+ return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
558
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')])])];
559
+ } : [h(TabStrip, {
560
+ dir: _this.$props.dir,
561
+ attrs: _this.v3 ? undefined : {
562
+ dir: _this.$props.dir,
563
+ selected: _this.selectedTab,
564
+ animation: false
565
+ },
566
+ selected: _this.selectedTab,
567
+ "class": "k-editor-find-replace",
568
+ onSelect: _this.onTabSelect,
569
+ on: _this.v3 ? undefined : {
570
+ "select": _this.onTabSelect
571
+ },
572
+ animation: false
573
+ }, _this.v3 ? function () {
574
+ return [h(TabStripTab, {
575
+ title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind]),
576
+ attrs: _this.v3 ? undefined : {
577
+ title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind])
578
+ }
579
+ }, _this.v3 ? function () {
580
+ return [h("div", {
581
+ "class": "k-edit-form-container"
582
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')];
583
+ } : [h("div", {
584
+ "class": "k-edit-form-container"
585
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')]), h(TabStripTab, {
586
+ title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace]),
587
+ attrs: _this.v3 ? undefined : {
588
+ title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace])
589
+ }
590
+ }, _this.v3 ? function () {
591
+ return [h("div", {
592
+ "class": "k-edit-form-container"
593
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
594
+ "class": "k-actions k-hstack k-justify-content-end"
595
+ }, [h(Button, {
596
+ disabled: !Boolean(nextMatch),
597
+ attrs: _this.v3 ? undefined : {
598
+ disabled: !Boolean(nextMatch)
599
+ },
600
+ onClick: _this.onReplace,
601
+ on: _this.v3 ? undefined : {
602
+ "click": _this.onReplace
603
+ }
604
+ }, _this.v3 ? function () {
605
+ return [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])];
606
+ } : [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])]), h(Button, {
607
+ disabled: !Boolean(nextMatch),
608
+ attrs: _this.v3 ? undefined : {
609
+ disabled: !Boolean(nextMatch)
610
+ },
611
+ onClick: _this.onReplaceAll,
612
+ on: _this.v3 ? undefined : {
613
+ "click": _this.onReplaceAll
614
+ }
615
+ }, _this.v3 ? function () {
616
+ return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
617
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')];
618
+ } : [h("div", {
619
+ "class": "k-edit-form-container"
620
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
621
+ "class": "k-actions k-hstack k-justify-content-end"
622
+ }, [h(Button, {
623
+ disabled: !Boolean(nextMatch),
624
+ attrs: _this.v3 ? undefined : {
625
+ disabled: !Boolean(nextMatch)
626
+ },
627
+ onClick: _this.onReplace,
628
+ on: _this.v3 ? undefined : {
629
+ "click": _this.onReplace
630
+ }
631
+ }, _this.v3 ? function () {
632
+ return [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])];
633
+ } : [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])]), h(Button, {
634
+ disabled: !Boolean(nextMatch),
635
+ attrs: _this.v3 ? undefined : {
636
+ disabled: !Boolean(nextMatch)
637
+ },
638
+ onClick: _this.onReplaceAll,
639
+ on: _this.v3 ? undefined : {
640
+ "click": _this.onReplaceAll
641
+ }
642
+ }, _this.v3 ? function () {
643
+ return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
644
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')])];
645
+ } : [h(TabStripTab, {
646
+ title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind]),
647
+ attrs: _this.v3 ? undefined : {
648
+ title: localization.toLanguageString(findReplaceTabFind, messages[findReplaceTabFind])
649
+ }
650
+ }, _this.v3 ? function () {
651
+ return [h("div", {
652
+ "class": "k-edit-form-container"
653
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')];
654
+ } : [h("div", {
655
+ "class": "k-edit-form-container"
656
+ }, [findWhatLabel.call(_this, 'findWhatFind'), findWhat.call(_this, 'findWhatFind')]), checkboxes, navigation.call(_this, 'findWhatFind')]), h(TabStripTab, {
657
+ title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace]),
658
+ attrs: _this.v3 ? undefined : {
659
+ title: localization.toLanguageString(findReplaceTabReplace, messages[findReplaceTabReplace])
660
+ }
661
+ }, _this.v3 ? function () {
662
+ return [h("div", {
663
+ "class": "k-edit-form-container"
664
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
665
+ "class": "k-actions k-hstack k-justify-content-end"
666
+ }, [h(Button, {
667
+ disabled: !Boolean(nextMatch),
668
+ attrs: _this.v3 ? undefined : {
669
+ disabled: !Boolean(nextMatch)
670
+ },
671
+ onClick: _this.onReplace,
672
+ on: _this.v3 ? undefined : {
673
+ "click": _this.onReplace
674
+ }
675
+ }, _this.v3 ? function () {
676
+ return [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])];
677
+ } : [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])]), h(Button, {
678
+ disabled: !Boolean(nextMatch),
679
+ attrs: _this.v3 ? undefined : {
680
+ disabled: !Boolean(nextMatch)
681
+ },
682
+ onClick: _this.onReplaceAll,
683
+ on: _this.v3 ? undefined : {
684
+ "click": _this.onReplaceAll
685
+ }
686
+ }, _this.v3 ? function () {
687
+ return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
688
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')];
689
+ } : [h("div", {
690
+ "class": "k-edit-form-container"
691
+ }, [findWhatLabel.call(_this, 'findWhatReplace'), findWhat.call(_this, 'findWhatReplace'), replaceWithLabel, replaceWith]), h("div", {
692
+ "class": "k-actions k-hstack k-justify-content-end"
693
+ }, [h(Button, {
694
+ disabled: !Boolean(nextMatch),
695
+ attrs: _this.v3 ? undefined : {
696
+ disabled: !Boolean(nextMatch)
697
+ },
698
+ onClick: _this.onReplace,
699
+ on: _this.v3 ? undefined : {
700
+ "click": _this.onReplace
701
+ }
702
+ }, _this.v3 ? function () {
703
+ return [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])];
704
+ } : [localization.toLanguageString(findReplaceReplace, messages[findReplaceReplace])]), h(Button, {
705
+ disabled: !Boolean(nextMatch),
706
+ attrs: _this.v3 ? undefined : {
707
+ disabled: !Boolean(nextMatch)
708
+ },
709
+ onClick: _this.onReplaceAll,
710
+ on: _this.v3 ? undefined : {
711
+ "click": _this.onReplaceAll
712
+ }
713
+ }, _this.v3 ? function () {
714
+ return [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])];
715
+ } : [localization.toLanguageString(findReplaceReplaceAll, messages[findReplaceReplaceAll])])]), checkboxes, navigation.call(_this, 'findWhatReplace')])])])
716
+ ); // document.body);
717
+ },
718
+ methods: {
719
+ onTabSelect: function onTabSelect(event) {
720
+ this.selectedTab = event.selected;
721
+ },
722
+ onClose: function onClose() {
723
+ var view = this.$props.view;
724
+ var state = view.state;
725
+ var transaction = state.tr.setSelection(TextSelection.create(state.doc, state.selection.from, state.selection.to));
726
+ view.updateState(state.apply(transaction));
727
+ view.focus();
728
+ this.$emit('close');
729
+ },
730
+ matchesMessage: function matchesMessage(locMessage) {
731
+ var matches = this.matches;
732
+ var nextMatch = this.nextMatch;
733
+ var cur = 0,
734
+ all = 0;
735
+
736
+ if (matches && nextMatch) {
737
+ var current = matches.findIndex(function (s) {
738
+ return s.eq(nextMatch);
739
+ });
740
+ cur = current === -1 ? matches.length : current + 1;
741
+ all = matches.length;
742
+ }
743
+
744
+ return formatString(locMessage, cur, all);
745
+ },
746
+ onFindNext: function onFindNext() {
747
+ this.onFind();
748
+ },
749
+ onFindPrev: function onFindPrev() {
750
+ this.onFind(true);
751
+ },
752
+ onFind: function onFind(backward) {
753
+ if (backward === void 0) {
754
+ backward = false;
755
+ }
756
+
757
+ var view = this.$props.view;
758
+ var _a = this.$data,
759
+ text = _a.searchText,
760
+ matchCase = _a.matchCase,
761
+ matchCyclic = _a.matchCyclic,
762
+ matchWord = _a.matchWord,
763
+ useRegExp = _a.useRegExp;
764
+ var searchOptions = {
765
+ text: text,
766
+ matchWord: matchWord,
767
+ matchCase: matchCase,
768
+ useRegExp: useRegExp,
769
+ backward: backward,
770
+ matchCyclic: matchCyclic
771
+ };
772
+ var selectionResult = find(view.state, searchOptions);
773
+
774
+ if (selectionResult) {
775
+ var transaction = view.state.tr.setSelection(selectionResult);
776
+ transaction.scrollIntoView();
777
+ view.updateState(view.state.apply(transaction));
778
+ this._prevMatch = this.nextMatch;
779
+ this.nextMatch = selectionResult;
780
+
781
+ if (this._prevMatch !== this.nextMatch) {
782
+ this.$forceUpdate();
783
+ }
784
+ }
785
+ },
786
+ onReplace: function onReplace() {
787
+ var view = this.$props.view;
788
+ var selection = view.state.selection;
789
+ var replaceText = this.$data.replaceText;
790
+
791
+ if (!selection.empty) {
792
+ var start = selection.from;
793
+ var end = start + replaceText.length;
794
+ var transaction = replace(selection, replaceText, view.state.tr);
795
+ transaction.setSelection(TextSelection.create(transaction.doc, start, end));
796
+ transaction.scrollIntoView();
797
+ view.dispatch(transaction);
798
+ this.setNextState({});
799
+ }
800
+ },
801
+ onReplaceAll: function onReplaceAll() {
802
+ var view = this.$props.view;
803
+ var _a = this.$data,
804
+ searchText = _a.searchText,
805
+ replaceText = _a.replaceText,
806
+ matchCase = _a.matchCase,
807
+ matchWord = _a.matchWord,
808
+ useRegExp = _a.useRegExp;
809
+ var searchOptions = {
810
+ text: searchText,
811
+ matchWord: matchWord,
812
+ matchCase: matchCase,
813
+ useRegExp: useRegExp
814
+ };
815
+ view.dispatch(replaceAll(view.state, replaceText, searchOptions));
816
+ this.setNextState({});
817
+ },
818
+ onKeyDown: function onKeyDown(event) {
819
+ if (event.keyCode === enter) {
820
+ this.onFindNext();
821
+ } else if (event.keyCode === esc) {
822
+ this.onClose();
823
+ }
824
+ },
825
+ onMatchCaseChecked: function onMatchCaseChecked(e) {
826
+ this.matchCase = e.target.checked;
827
+ this.setNextState();
828
+ },
829
+ onMatchWordChecked: function onMatchWordChecked(e) {
830
+ this.matchWord = e.target.checked;
831
+ this.setNextState();
832
+ },
833
+ onMatchCyclicChecked: function onMatchCyclicChecked(e) {
834
+ this.matchCyclic = e.target.checked;
835
+ this.setNextState();
836
+ },
837
+ onUseRegExpChecked: function onUseRegExpChecked(e) {
838
+ this.useRegExp = e.target.checked;
839
+ this.setNextState();
840
+ },
841
+ onSearchChange: function onSearchChange(e) {
842
+ this.searchText = e.target.value;
843
+ this.setNextState();
844
+ },
845
+ onReplaceChange: function onReplaceChange(e) {
846
+ this.replaceText = e.target.value;
847
+ this.setNextState();
848
+ },
849
+ setNextState: function setNextState() {
850
+ var view = this.$props.view;
851
+
852
+ if (this.searchText) {
853
+ var searchOptions = {
854
+ text: this.searchText,
855
+ matchWord: this.matchWord,
856
+ matchCase: this.matchCase,
857
+ useRegExp: this.useRegExp
858
+ };
859
+ var selection_1 = view.state.selection;
860
+ var matches = findAll(view.state.doc, searchOptions);
861
+ var nextMatch = !this.searchText && matches[0] || matches.find(function (match) {
862
+ return match.from >= selection_1.from;
863
+ }) || this.matchCyclic && matches[0] || undefined;
864
+ this._prevMatch = this.nextMatch;
865
+ this.matches = matches;
866
+ this.nextMatch = nextMatch;
867
+ } else {
868
+ this._prevMatch = this.nextMatch;
869
+ this.matches = [];
870
+ this.nextMatch = undefined;
871
+ }
872
+ }
873
+ }
874
+ };
875
+ /**
876
+ * @hidden
877
+ */
878
+
879
+ var FindAndReplaceDialog = FindAndReplaceDialogVue2;
880
+ export { FindAndReplaceDialog, FindAndReplaceDialogVue2 };