@progress/kendo-vue-editor 5.3.0-dev.202409130647 → 5.3.0-develop.1

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