@ckeditor/ckeditor5-find-and-replace 0.0.0-internal-20241017.0

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 (320) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +26 -0
  4. package/build/find-and-replace.js +5 -0
  5. package/build/translations/af.js +1 -0
  6. package/build/translations/ar.js +1 -0
  7. package/build/translations/bg.js +1 -0
  8. package/build/translations/bn.js +1 -0
  9. package/build/translations/bs.js +1 -0
  10. package/build/translations/ca.js +1 -0
  11. package/build/translations/cs.js +1 -0
  12. package/build/translations/da.js +1 -0
  13. package/build/translations/de.js +1 -0
  14. package/build/translations/el.js +1 -0
  15. package/build/translations/en-au.js +1 -0
  16. package/build/translations/es-co.js +1 -0
  17. package/build/translations/es.js +1 -0
  18. package/build/translations/et.js +1 -0
  19. package/build/translations/fa.js +1 -0
  20. package/build/translations/fi.js +1 -0
  21. package/build/translations/fr.js +1 -0
  22. package/build/translations/gl.js +1 -0
  23. package/build/translations/he.js +1 -0
  24. package/build/translations/hi.js +1 -0
  25. package/build/translations/hr.js +1 -0
  26. package/build/translations/hu.js +1 -0
  27. package/build/translations/id.js +1 -0
  28. package/build/translations/it.js +1 -0
  29. package/build/translations/ja.js +1 -0
  30. package/build/translations/jv.js +1 -0
  31. package/build/translations/ko.js +1 -0
  32. package/build/translations/lt.js +1 -0
  33. package/build/translations/lv.js +1 -0
  34. package/build/translations/ms.js +1 -0
  35. package/build/translations/nl.js +1 -0
  36. package/build/translations/no.js +1 -0
  37. package/build/translations/pl.js +1 -0
  38. package/build/translations/pt-br.js +1 -0
  39. package/build/translations/pt.js +1 -0
  40. package/build/translations/ro.js +1 -0
  41. package/build/translations/ru.js +1 -0
  42. package/build/translations/sk.js +1 -0
  43. package/build/translations/sr-latn.js +1 -0
  44. package/build/translations/sr.js +1 -0
  45. package/build/translations/sv.js +1 -0
  46. package/build/translations/th.js +1 -0
  47. package/build/translations/ti.js +1 -0
  48. package/build/translations/tr.js +1 -0
  49. package/build/translations/tt.js +1 -0
  50. package/build/translations/ug.js +1 -0
  51. package/build/translations/uk.js +1 -0
  52. package/build/translations/ur.js +1 -0
  53. package/build/translations/vi.js +1 -0
  54. package/build/translations/zh-cn.js +1 -0
  55. package/build/translations/zh.js +1 -0
  56. package/ckeditor5-metadata.json +18 -0
  57. package/dist/augmentation.d.ts +24 -0
  58. package/dist/findandreplace.d.ts +50 -0
  59. package/dist/findandreplaceconfig.d.ts +35 -0
  60. package/dist/findandreplaceediting.d.ts +71 -0
  61. package/dist/findandreplacestate.d.ts +116 -0
  62. package/dist/findandreplaceui.d.ts +87 -0
  63. package/dist/findandreplaceutils.d.ts +77 -0
  64. package/dist/findcommand.d.ts +52 -0
  65. package/dist/findnextcommand.d.ts +39 -0
  66. package/dist/findpreviouscommand.d.ts +23 -0
  67. package/dist/index-content.css +4 -0
  68. package/dist/index-editor.css +54 -0
  69. package/dist/index.css +78 -0
  70. package/dist/index.css.map +1 -0
  71. package/dist/index.d.ts +22 -0
  72. package/dist/index.js +1523 -0
  73. package/dist/index.js.map +1 -0
  74. package/dist/replaceallcommand.d.ts +39 -0
  75. package/dist/replacecommand.d.ts +26 -0
  76. package/dist/replacecommandbase.d.ts +35 -0
  77. package/dist/translations/af.d.ts +8 -0
  78. package/dist/translations/af.js +5 -0
  79. package/dist/translations/af.umd.js +11 -0
  80. package/dist/translations/ar.d.ts +8 -0
  81. package/dist/translations/ar.js +5 -0
  82. package/dist/translations/ar.umd.js +11 -0
  83. package/dist/translations/bg.d.ts +8 -0
  84. package/dist/translations/bg.js +5 -0
  85. package/dist/translations/bg.umd.js +11 -0
  86. package/dist/translations/bn.d.ts +8 -0
  87. package/dist/translations/bn.js +5 -0
  88. package/dist/translations/bn.umd.js +11 -0
  89. package/dist/translations/bs.d.ts +8 -0
  90. package/dist/translations/bs.js +5 -0
  91. package/dist/translations/bs.umd.js +11 -0
  92. package/dist/translations/ca.d.ts +8 -0
  93. package/dist/translations/ca.js +5 -0
  94. package/dist/translations/ca.umd.js +11 -0
  95. package/dist/translations/cs.d.ts +8 -0
  96. package/dist/translations/cs.js +5 -0
  97. package/dist/translations/cs.umd.js +11 -0
  98. package/dist/translations/da.d.ts +8 -0
  99. package/dist/translations/da.js +5 -0
  100. package/dist/translations/da.umd.js +11 -0
  101. package/dist/translations/de.d.ts +8 -0
  102. package/dist/translations/de.js +5 -0
  103. package/dist/translations/de.umd.js +11 -0
  104. package/dist/translations/el.d.ts +8 -0
  105. package/dist/translations/el.js +5 -0
  106. package/dist/translations/el.umd.js +11 -0
  107. package/dist/translations/en-au.d.ts +8 -0
  108. package/dist/translations/en-au.js +5 -0
  109. package/dist/translations/en-au.umd.js +11 -0
  110. package/dist/translations/en.d.ts +8 -0
  111. package/dist/translations/en.js +5 -0
  112. package/dist/translations/en.umd.js +11 -0
  113. package/dist/translations/es-co.d.ts +8 -0
  114. package/dist/translations/es-co.js +5 -0
  115. package/dist/translations/es-co.umd.js +11 -0
  116. package/dist/translations/es.d.ts +8 -0
  117. package/dist/translations/es.js +5 -0
  118. package/dist/translations/es.umd.js +11 -0
  119. package/dist/translations/et.d.ts +8 -0
  120. package/dist/translations/et.js +5 -0
  121. package/dist/translations/et.umd.js +11 -0
  122. package/dist/translations/fa.d.ts +8 -0
  123. package/dist/translations/fa.js +5 -0
  124. package/dist/translations/fa.umd.js +11 -0
  125. package/dist/translations/fi.d.ts +8 -0
  126. package/dist/translations/fi.js +5 -0
  127. package/dist/translations/fi.umd.js +11 -0
  128. package/dist/translations/fr.d.ts +8 -0
  129. package/dist/translations/fr.js +5 -0
  130. package/dist/translations/fr.umd.js +11 -0
  131. package/dist/translations/gl.d.ts +8 -0
  132. package/dist/translations/gl.js +5 -0
  133. package/dist/translations/gl.umd.js +11 -0
  134. package/dist/translations/he.d.ts +8 -0
  135. package/dist/translations/he.js +5 -0
  136. package/dist/translations/he.umd.js +11 -0
  137. package/dist/translations/hi.d.ts +8 -0
  138. package/dist/translations/hi.js +5 -0
  139. package/dist/translations/hi.umd.js +11 -0
  140. package/dist/translations/hr.d.ts +8 -0
  141. package/dist/translations/hr.js +5 -0
  142. package/dist/translations/hr.umd.js +11 -0
  143. package/dist/translations/hu.d.ts +8 -0
  144. package/dist/translations/hu.js +5 -0
  145. package/dist/translations/hu.umd.js +11 -0
  146. package/dist/translations/id.d.ts +8 -0
  147. package/dist/translations/id.js +5 -0
  148. package/dist/translations/id.umd.js +11 -0
  149. package/dist/translations/it.d.ts +8 -0
  150. package/dist/translations/it.js +5 -0
  151. package/dist/translations/it.umd.js +11 -0
  152. package/dist/translations/ja.d.ts +8 -0
  153. package/dist/translations/ja.js +5 -0
  154. package/dist/translations/ja.umd.js +11 -0
  155. package/dist/translations/jv.d.ts +8 -0
  156. package/dist/translations/jv.js +5 -0
  157. package/dist/translations/jv.umd.js +11 -0
  158. package/dist/translations/ko.d.ts +8 -0
  159. package/dist/translations/ko.js +5 -0
  160. package/dist/translations/ko.umd.js +11 -0
  161. package/dist/translations/lt.d.ts +8 -0
  162. package/dist/translations/lt.js +5 -0
  163. package/dist/translations/lt.umd.js +11 -0
  164. package/dist/translations/lv.d.ts +8 -0
  165. package/dist/translations/lv.js +5 -0
  166. package/dist/translations/lv.umd.js +11 -0
  167. package/dist/translations/ms.d.ts +8 -0
  168. package/dist/translations/ms.js +5 -0
  169. package/dist/translations/ms.umd.js +11 -0
  170. package/dist/translations/nl.d.ts +8 -0
  171. package/dist/translations/nl.js +5 -0
  172. package/dist/translations/nl.umd.js +11 -0
  173. package/dist/translations/no.d.ts +8 -0
  174. package/dist/translations/no.js +5 -0
  175. package/dist/translations/no.umd.js +11 -0
  176. package/dist/translations/pl.d.ts +8 -0
  177. package/dist/translations/pl.js +5 -0
  178. package/dist/translations/pl.umd.js +11 -0
  179. package/dist/translations/pt-br.d.ts +8 -0
  180. package/dist/translations/pt-br.js +5 -0
  181. package/dist/translations/pt-br.umd.js +11 -0
  182. package/dist/translations/pt.d.ts +8 -0
  183. package/dist/translations/pt.js +5 -0
  184. package/dist/translations/pt.umd.js +11 -0
  185. package/dist/translations/ro.d.ts +8 -0
  186. package/dist/translations/ro.js +5 -0
  187. package/dist/translations/ro.umd.js +11 -0
  188. package/dist/translations/ru.d.ts +8 -0
  189. package/dist/translations/ru.js +5 -0
  190. package/dist/translations/ru.umd.js +11 -0
  191. package/dist/translations/sk.d.ts +8 -0
  192. package/dist/translations/sk.js +5 -0
  193. package/dist/translations/sk.umd.js +11 -0
  194. package/dist/translations/sr-latn.d.ts +8 -0
  195. package/dist/translations/sr-latn.js +5 -0
  196. package/dist/translations/sr-latn.umd.js +11 -0
  197. package/dist/translations/sr.d.ts +8 -0
  198. package/dist/translations/sr.js +5 -0
  199. package/dist/translations/sr.umd.js +11 -0
  200. package/dist/translations/sv.d.ts +8 -0
  201. package/dist/translations/sv.js +5 -0
  202. package/dist/translations/sv.umd.js +11 -0
  203. package/dist/translations/th.d.ts +8 -0
  204. package/dist/translations/th.js +5 -0
  205. package/dist/translations/th.umd.js +11 -0
  206. package/dist/translations/ti.d.ts +8 -0
  207. package/dist/translations/ti.js +5 -0
  208. package/dist/translations/ti.umd.js +11 -0
  209. package/dist/translations/tr.d.ts +8 -0
  210. package/dist/translations/tr.js +5 -0
  211. package/dist/translations/tr.umd.js +11 -0
  212. package/dist/translations/tt.d.ts +8 -0
  213. package/dist/translations/tt.js +5 -0
  214. package/dist/translations/tt.umd.js +11 -0
  215. package/dist/translations/ug.d.ts +8 -0
  216. package/dist/translations/ug.js +5 -0
  217. package/dist/translations/ug.umd.js +11 -0
  218. package/dist/translations/uk.d.ts +8 -0
  219. package/dist/translations/uk.js +5 -0
  220. package/dist/translations/uk.umd.js +11 -0
  221. package/dist/translations/ur.d.ts +8 -0
  222. package/dist/translations/ur.js +5 -0
  223. package/dist/translations/ur.umd.js +11 -0
  224. package/dist/translations/vi.d.ts +8 -0
  225. package/dist/translations/vi.js +5 -0
  226. package/dist/translations/vi.umd.js +11 -0
  227. package/dist/translations/zh-cn.d.ts +8 -0
  228. package/dist/translations/zh-cn.js +5 -0
  229. package/dist/translations/zh-cn.umd.js +11 -0
  230. package/dist/translations/zh.d.ts +8 -0
  231. package/dist/translations/zh.js +5 -0
  232. package/dist/translations/zh.umd.js +11 -0
  233. package/dist/ui/findandreplaceformview.d.ts +313 -0
  234. package/lang/contexts.json +16 -0
  235. package/lang/translations/af.po +74 -0
  236. package/lang/translations/ar.po +74 -0
  237. package/lang/translations/bg.po +74 -0
  238. package/lang/translations/bn.po +74 -0
  239. package/lang/translations/bs.po +74 -0
  240. package/lang/translations/ca.po +74 -0
  241. package/lang/translations/cs.po +74 -0
  242. package/lang/translations/da.po +74 -0
  243. package/lang/translations/de.po +74 -0
  244. package/lang/translations/el.po +74 -0
  245. package/lang/translations/en-au.po +74 -0
  246. package/lang/translations/en.po +74 -0
  247. package/lang/translations/es-co.po +74 -0
  248. package/lang/translations/es.po +74 -0
  249. package/lang/translations/et.po +74 -0
  250. package/lang/translations/fa.po +74 -0
  251. package/lang/translations/fi.po +74 -0
  252. package/lang/translations/fr.po +74 -0
  253. package/lang/translations/gl.po +74 -0
  254. package/lang/translations/he.po +74 -0
  255. package/lang/translations/hi.po +74 -0
  256. package/lang/translations/hr.po +74 -0
  257. package/lang/translations/hu.po +74 -0
  258. package/lang/translations/id.po +74 -0
  259. package/lang/translations/it.po +74 -0
  260. package/lang/translations/ja.po +74 -0
  261. package/lang/translations/jv.po +74 -0
  262. package/lang/translations/ko.po +74 -0
  263. package/lang/translations/lt.po +74 -0
  264. package/lang/translations/lv.po +74 -0
  265. package/lang/translations/ms.po +74 -0
  266. package/lang/translations/nl.po +74 -0
  267. package/lang/translations/no.po +74 -0
  268. package/lang/translations/pl.po +74 -0
  269. package/lang/translations/pt-br.po +74 -0
  270. package/lang/translations/pt.po +74 -0
  271. package/lang/translations/ro.po +74 -0
  272. package/lang/translations/ru.po +74 -0
  273. package/lang/translations/sk.po +74 -0
  274. package/lang/translations/sr-latn.po +74 -0
  275. package/lang/translations/sr.po +74 -0
  276. package/lang/translations/sv.po +74 -0
  277. package/lang/translations/th.po +74 -0
  278. package/lang/translations/ti.po +74 -0
  279. package/lang/translations/tr.po +74 -0
  280. package/lang/translations/tt.po +74 -0
  281. package/lang/translations/ug.po +74 -0
  282. package/lang/translations/uk.po +74 -0
  283. package/lang/translations/ur.po +74 -0
  284. package/lang/translations/vi.po +74 -0
  285. package/lang/translations/zh-cn.po +74 -0
  286. package/lang/translations/zh.po +74 -0
  287. package/package.json +42 -0
  288. package/src/augmentation.d.ts +20 -0
  289. package/src/augmentation.js +5 -0
  290. package/src/findandreplace.d.ts +46 -0
  291. package/src/findandreplace.js +90 -0
  292. package/src/findandreplaceconfig.d.ts +31 -0
  293. package/src/findandreplaceconfig.js +5 -0
  294. package/src/findandreplaceediting.d.ts +67 -0
  295. package/src/findandreplaceediting.js +233 -0
  296. package/src/findandreplacestate.d.ts +112 -0
  297. package/src/findandreplacestate.js +80 -0
  298. package/src/findandreplaceui.d.ts +83 -0
  299. package/src/findandreplaceui.js +275 -0
  300. package/src/findandreplaceutils.d.ts +73 -0
  301. package/src/findandreplaceutils.js +160 -0
  302. package/src/findcommand.d.ts +48 -0
  303. package/src/findcommand.js +79 -0
  304. package/src/findnextcommand.d.ts +35 -0
  305. package/src/findnextcommand.js +47 -0
  306. package/src/findpreviouscommand.d.ts +19 -0
  307. package/src/findpreviouscommand.js +25 -0
  308. package/src/index.d.ts +18 -0
  309. package/src/index.js +17 -0
  310. package/src/replaceallcommand.d.ts +35 -0
  311. package/src/replaceallcommand.js +50 -0
  312. package/src/replacecommand.d.ts +22 -0
  313. package/src/replacecommand.js +20 -0
  314. package/src/replacecommandbase.d.ts +31 -0
  315. package/src/replacecommandbase.js +56 -0
  316. package/src/ui/findandreplaceformview.d.ts +309 -0
  317. package/src/ui/findandreplaceformview.js +472 -0
  318. package/theme/findandreplace.css +13 -0
  319. package/theme/findandreplaceform.css +17 -0
  320. package/theme/icons/find-replace.svg +1 -0
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ export default {"zh":{"dictionary":{"Find and replace":"尋找和取代","Find in text…":"在文本中尋找","Find":"尋找","Previous result":"前一個結果","Next result":"後一個結果","Replace":"取代","Replace all":"全部取代","Match case":"大小寫需相符","Whole words only":"僅全字拼寫","Replace with…":"以…替代","Text to find must not be empty.":"不能查找空字串","Tip: Find some text first in order to replace it.":"提示:先查找字串再取代","Advanced options":"進階選項","Find in the document":"在文件中尋找"},getPluralForm(n){return 0;}}}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ ( e => {
7
+ const { [ 'zh' ]: { dictionary, getPluralForm } } = {"zh":{"dictionary":{"Find and replace":"尋找和取代","Find in text…":"在文本中尋找","Find":"尋找","Previous result":"前一個結果","Next result":"後一個結果","Replace":"取代","Replace all":"全部取代","Match case":"大小寫需相符","Whole words only":"僅全字拼寫","Replace with…":"以…替代","Text to find must not be empty.":"不能查找空字串","Tip: Find some text first in order to replace it.":"提示:先查找字串再取代","Advanced options":"進階選項","Find in the document":"在文件中尋找"},getPluralForm(n){return 0;}}};
8
+ e[ 'zh' ] ||= { dictionary: {}, getPluralForm: null };
9
+ e[ 'zh' ].dictionary = Object.assign( e[ 'zh' ].dictionary, dictionary );
10
+ e[ 'zh' ].getPluralForm = getPluralForm;
11
+ } )( window.CKEDITOR_TRANSLATIONS ||= {} );
@@ -0,0 +1,313 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module find-and-replace/ui/findandreplaceformview
11
+ */
12
+ import { View, LabeledFieldView, FocusCycler, ViewCollection, type InputView } from 'ckeditor5/src/ui.js';
13
+ import { type Locale } from 'ckeditor5/src/utils.js';
14
+ import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';
15
+ import '../../theme/findandreplaceform.css';
16
+ /**
17
+ * The find and replace form view class.
18
+ *
19
+ * See {@link module:find-and-replace/ui/findandreplaceformview~FindAndReplaceFormView}.
20
+ */
21
+ export default class FindAndReplaceFormView extends View {
22
+ /**
23
+ * A collection of child views.
24
+ */
25
+ children: ViewCollection;
26
+ /**
27
+ * Stores the number of matched search results.
28
+ *
29
+ * @readonly
30
+ * @observable
31
+ */
32
+ matchCount: number;
33
+ /**
34
+ * The offset of currently highlighted search result in {@link #matchCount matched results}.
35
+ *
36
+ * @observable
37
+ */
38
+ readonly highlightOffset: number;
39
+ /**
40
+ * `true` when the search params (find text, options) has been changed by the user since
41
+ * the last time find was executed. `false` otherwise.
42
+ *
43
+ * @readonly
44
+ * @observable
45
+ */
46
+ isDirty: boolean;
47
+ /**
48
+ * A live object with the aggregated `isEnabled` states of editor commands related to find and
49
+ * replace. For instance, it may look as follows:
50
+ *
51
+ * ```json
52
+ * {
53
+ * findNext: true,
54
+ * findPrevious: true,
55
+ * replace: false,
56
+ * replaceAll: false
57
+ * }
58
+ * ```
59
+ *
60
+ * @internal
61
+ * @observable
62
+ */
63
+ readonly _areCommandsEnabled: Record<string, boolean>;
64
+ /**
65
+ * The content of the counter label displaying the index of the current highlighted match
66
+ * on top of the find input, for instance "3 of 50".
67
+ *
68
+ * @internal
69
+ * @readonly
70
+ * @observable
71
+ */
72
+ _resultsCounterText: string;
73
+ /**
74
+ * The flag reflecting the state of the "Match case" switch button in the search options
75
+ * dropdown.
76
+ *
77
+ * @internal
78
+ * @readonly
79
+ * @observable
80
+ */
81
+ _matchCase: boolean;
82
+ /**
83
+ * The flag reflecting the state of the "Whole words only" switch button in the search options
84
+ * dropdown.
85
+ *
86
+ * @internal
87
+ * @readonly
88
+ * @observable
89
+ */
90
+ _wholeWordsOnly: boolean;
91
+ /**
92
+ * This flag is set `true` when some matches were found and the user didn't change the search
93
+ * params (text to find, options) yet. This is only possible immediately after hitting the "Find" button.
94
+ * `false` when there were no matches (see {@link #matchCount}) or the user changed the params (see {@link #isDirty}).
95
+ *
96
+ * It is used to control the enabled state of the replace UI (input and buttons); replacing text is only possible
97
+ * if this flag is `true`.
98
+ *
99
+ * @internal
100
+ * @observable
101
+ */
102
+ readonly _searchResultsFound: boolean;
103
+ /**
104
+ * The find in text input view that stores the searched string.
105
+ *
106
+ * @internal
107
+ */
108
+ readonly _findInputView: LabeledFieldView<InputView>;
109
+ /**
110
+ * The replace input view.
111
+ */
112
+ private readonly _replaceInputView;
113
+ /**
114
+ * The find button view that initializes the search process.
115
+ */
116
+ private readonly _findButtonView;
117
+ /**
118
+ * The find previous button view.
119
+ */
120
+ private readonly _findPrevButtonView;
121
+ /**
122
+ * The find next button view.
123
+ */
124
+ private readonly _findNextButtonView;
125
+ /**
126
+ * A collapsible view aggregating the advanced search options.
127
+ */
128
+ private readonly _advancedOptionsCollapsibleView;
129
+ /**
130
+ * A switch button view controlling the "Match case" option.
131
+ */
132
+ private readonly _matchCaseSwitchView;
133
+ /**
134
+ * A switch button view controlling the "Whole words only" option.
135
+ */
136
+ private readonly _wholeWordsOnlySwitchView;
137
+ /**
138
+ * The replace button view.
139
+ */
140
+ private readonly _replaceButtonView;
141
+ /**
142
+ * The replace all button view.
143
+ */
144
+ private readonly _replaceAllButtonView;
145
+ /**
146
+ * The `div` aggregating the inputs.
147
+ */
148
+ private readonly _inputsDivView;
149
+ /**
150
+ * The `div` aggregating the action buttons.
151
+ */
152
+ private readonly _actionButtonsDivView;
153
+ /**
154
+ * Tracks information about the DOM focus in the form.
155
+ */
156
+ private readonly _focusTracker;
157
+ /**
158
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
159
+ */
160
+ private readonly _keystrokes;
161
+ /**
162
+ * A collection of views that can be focused in the form.
163
+ */
164
+ private readonly _focusables;
165
+ /**
166
+ * Helps cycling over {@link #_focusables} in the form.
167
+ */
168
+ readonly focusCycler: FocusCycler;
169
+ locale: Locale;
170
+ /**
171
+ * Creates a view of find and replace form.
172
+ *
173
+ * @param locale The localization services instance.
174
+ */
175
+ constructor(locale: Locale);
176
+ /**
177
+ * @inheritDoc
178
+ */
179
+ render(): void;
180
+ /**
181
+ * @inheritDoc
182
+ */
183
+ destroy(): void;
184
+ /**
185
+ * @inheritDoc
186
+ */
187
+ focus(direction?: 1 | -1): void;
188
+ /**
189
+ * Resets the form before re-appearing.
190
+ *
191
+ * It clears error messages, hides the match counter and disables the replace feature
192
+ * until the next hit of the "Find" button.
193
+ *
194
+ * **Note**: It does not reset inputs and options, though. This way the form works better in editors with
195
+ * disappearing toolbar (e.g. BalloonEditor): hiding the toolbar by accident (together with the find and replace UI)
196
+ * does not require filling the entire form again.
197
+ */
198
+ reset(): void;
199
+ /**
200
+ * Returns the value of the find input.
201
+ */
202
+ private get _textToFind();
203
+ /**
204
+ * Returns the value of the replace input.
205
+ */
206
+ private get _textToReplace();
207
+ /**
208
+ * Configures and returns the `<div>` aggregating all form inputs.
209
+ */
210
+ private _createInputsDiv;
211
+ /**
212
+ * The action performed when the {@link #_findButtonView} is pressed.
213
+ */
214
+ private _onFindButtonExecute;
215
+ /**
216
+ * Configures an injects the find results counter displaying a "N of M" label of the {@link #_findInputView}.
217
+ */
218
+ private _injectFindResultsCounter;
219
+ /**
220
+ * Creates the collapsible view aggregating the advanced search options.
221
+ */
222
+ private _createAdvancedOptionsCollapsible;
223
+ /**
224
+ * Configures and returns the `<div>` element aggregating all form action buttons.
225
+ */
226
+ private _createActionButtonsDiv;
227
+ /**
228
+ * Creates, configures and returns and instance of a dropdown allowing users to narrow
229
+ * the search criteria down. The dropdown has a list with switch buttons for each option.
230
+ */
231
+ private _createMatchCaseSwitch;
232
+ /**
233
+ * Creates, configures and returns and instance of a dropdown allowing users to narrow
234
+ * the search criteria down. The dropdown has a list with switch buttons for each option.
235
+ */
236
+ private _createWholeWordsOnlySwitch;
237
+ /**
238
+ * Initializes the {@link #_focusables} and {@link #_focusTracker} to allow navigation
239
+ * using <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keystrokes in the right order.
240
+ */
241
+ private _initFocusCycling;
242
+ /**
243
+ * Initializes the keystroke handling in the form.
244
+ */
245
+ private _initKeystrokeHandling;
246
+ /**
247
+ * Creates a button view.
248
+ *
249
+ * @param options The properties of the `ButtonView`.
250
+ * @returns The button view instance.
251
+ */
252
+ private _createButton;
253
+ /**
254
+ * Creates a labeled input view.
255
+ *
256
+ * @param label The input label.
257
+ * @returns The labeled input view instance.
258
+ */
259
+ private _createInputField;
260
+ }
261
+ /**
262
+ * Fired when the find next button is triggered.
263
+ *
264
+ * @eventName ~FindAndReplaceFormView#findNext
265
+ * @param data The event data.
266
+ */
267
+ export type FindNextEvent = {
268
+ name: 'findNext';
269
+ args: [data?: FindNextEventData];
270
+ };
271
+ export type FindNextEventData = FindEventBaseData & {
272
+ matchCase: boolean;
273
+ wholeWords: boolean;
274
+ };
275
+ /**
276
+ * Fired when the find previous button is triggered.
277
+ *
278
+ * @eventName ~FindAndReplaceFormView#findPrevious
279
+ * @param data The event data.
280
+ */
281
+ export type FindPreviousEvent = {
282
+ name: 'findPrevious';
283
+ args: [data?: FindEventBaseData];
284
+ };
285
+ /**
286
+ * Base type for all find/replace events.
287
+ */
288
+ export type FindEventBaseData = {
289
+ searchText: string;
290
+ };
291
+ /**
292
+ * Fired when the replace button is triggered.
293
+ *
294
+ * @eventName ~FindAndReplaceFormView#replace
295
+ * @param data The event data.
296
+ */
297
+ export type ReplaceEvent = {
298
+ name: 'replace';
299
+ args: [data: ReplaceEventData];
300
+ };
301
+ export type ReplaceEventData = FindEventBaseData & {
302
+ replaceText: string;
303
+ };
304
+ /**
305
+ * Fired when the replaceAll button is triggered.
306
+ *
307
+ * @eventName ~FindAndReplaceFormView#replaceAll
308
+ * @param data The event data.
309
+ */
310
+ export type ReplaceAllEvent = {
311
+ name: 'replaceAll';
312
+ args: [data: ReplaceEventData];
313
+ };
@@ -0,0 +1,16 @@
1
+ {
2
+ "Find and replace": "The tooltip of a find and replace button in the toolbar. Also, the title of the find and replace form.",
3
+ "Find in text…": "The label for the searched text in the find and replace dropdown.",
4
+ "Find": "The label for the find action button in the find and replace dropdown.",
5
+ "Previous result": "The label for the previous result button in the find and replace dropdown.",
6
+ "Next result": "The label for the previous result button in the find and replace dropdown.",
7
+ "Replace": "The label for the (single) replace action button in the find and replace dropdown.",
8
+ "Replace all": "The label for the replace all action button in the find and replace dropdown.",
9
+ "Match case": "The label for the match case checkbox in the find and replace dropdown.",
10
+ "Whole words only": "The label for the whole words only checkbox in the find and replace dropdown.",
11
+ "Replace with…": "The label for the text replacement in the find and replace dropdown.",
12
+ "Text to find must not be empty.": "An error text displayed when user attempted to find an empty text.",
13
+ "Tip: Find some text first in order to replace it.": "A message displayed next to the replace field when disabled but user tries to use it.",
14
+ "Advanced options": "The label and the tooltip of the options dropdown button in the find and replace form.",
15
+ "Find in the document": "Keystroke description for assistive technologies: keystroke for opening the find and replace UI."
16
+ }
@@ -0,0 +1,74 @@
1
+ # Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Afrikaans (https://app.transifex.com/ckeditor/teams/11143/af/)\n"
16
+ "Language: af\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "The tooltip of a find and replace button in the toolbar. Also, the title of the find and replace form."
21
+ msgid "Find and replace"
22
+ msgstr "Soek en vervang"
23
+
24
+ msgctxt "The label for the searched text in the find and replace dropdown."
25
+ msgid "Find in text…"
26
+ msgstr "Soek in teks …"
27
+
28
+ msgctxt "The label for the find action button in the find and replace dropdown."
29
+ msgid "Find"
30
+ msgstr "Soek"
31
+
32
+ msgctxt "The label for the previous result button in the find and replace dropdown."
33
+ msgid "Previous result"
34
+ msgstr "Vorige resultaat"
35
+
36
+ msgctxt "The label for the previous result button in the find and replace dropdown."
37
+ msgid "Next result"
38
+ msgstr "Volgende resultaat"
39
+
40
+ msgctxt "The label for the (single) replace action button in the find and replace dropdown."
41
+ msgid "Replace"
42
+ msgstr "Vervang"
43
+
44
+ msgctxt "The label for the replace all action button in the find and replace dropdown."
45
+ msgid "Replace all"
46
+ msgstr "Vervang alles"
47
+
48
+ msgctxt "The label for the match case checkbox in the find and replace dropdown."
49
+ msgid "Match case"
50
+ msgstr "Hooflettersensitief"
51
+
52
+ msgctxt "The label for the whole words only checkbox in the find and replace dropdown."
53
+ msgid "Whole words only"
54
+ msgstr "Slegs hele woorde"
55
+
56
+ msgctxt "The label for the text replacement in the find and replace dropdown."
57
+ msgid "Replace with…"
58
+ msgstr "Vervang met ..."
59
+
60
+ msgctxt "An error text displayed when user attempted to find an empty text."
61
+ msgid "Text to find must not be empty."
62
+ msgstr "Soekteks mag nie leeg wees nie."
63
+
64
+ msgctxt "A message displayed next to the replace field when disabled but user tries to use it."
65
+ msgid "Tip: Find some text first in order to replace it."
66
+ msgstr "Wenk: Soek eers 'n bietjie teks om dit te vervang."
67
+
68
+ msgctxt "The label and the tooltip of the options dropdown button in the find and replace form."
69
+ msgid "Advanced options"
70
+ msgstr ""
71
+
72
+ msgctxt "Keystroke description for assistive technologies: keystroke for opening the find and replace UI."
73
+ msgid "Find in the document"
74
+ msgstr ""
@@ -0,0 +1,74 @@
1
+ # Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Arabic (https://app.transifex.com/ckeditor/teams/11143/ar/)\n"
16
+ "Language: ar\n"
17
+ "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "The tooltip of a find and replace button in the toolbar. Also, the title of the find and replace form."
21
+ msgid "Find and replace"
22
+ msgstr "البحث والاستبدال"
23
+
24
+ msgctxt "The label for the searched text in the find and replace dropdown."
25
+ msgid "Find in text…"
26
+ msgstr "البحث في النص..."
27
+
28
+ msgctxt "The label for the find action button in the find and replace dropdown."
29
+ msgid "Find"
30
+ msgstr "البحث"
31
+
32
+ msgctxt "The label for the previous result button in the find and replace dropdown."
33
+ msgid "Previous result"
34
+ msgstr "النتيجة السابقة"
35
+
36
+ msgctxt "The label for the previous result button in the find and replace dropdown."
37
+ msgid "Next result"
38
+ msgstr "النتيجة التالية"
39
+
40
+ msgctxt "The label for the (single) replace action button in the find and replace dropdown."
41
+ msgid "Replace"
42
+ msgstr "استبدال"
43
+
44
+ msgctxt "The label for the replace all action button in the find and replace dropdown."
45
+ msgid "Replace all"
46
+ msgstr "استبدال الكل"
47
+
48
+ msgctxt "The label for the match case checkbox in the find and replace dropdown."
49
+ msgid "Match case"
50
+ msgstr "مطابقة حالة الأحرف"
51
+
52
+ msgctxt "The label for the whole words only checkbox in the find and replace dropdown."
53
+ msgid "Whole words only"
54
+ msgstr "الكلمات بأكملها فقط"
55
+
56
+ msgctxt "The label for the text replacement in the find and replace dropdown."
57
+ msgid "Replace with…"
58
+ msgstr "استبدال بـ..."
59
+
60
+ msgctxt "An error text displayed when user attempted to find an empty text."
61
+ msgid "Text to find must not be empty."
62
+ msgstr "لا يمكن لبيان النص المطلوب البحث عنه أن يكون فارغاً."
63
+
64
+ msgctxt "A message displayed next to the replace field when disabled but user tries to use it."
65
+ msgid "Tip: Find some text first in order to replace it."
66
+ msgstr "نصيحة: في البداية، ابحث عن جزء من النص؛ لتتمكن من استبداله. "
67
+
68
+ msgctxt "The label and the tooltip of the options dropdown button in the find and replace form."
69
+ msgid "Advanced options"
70
+ msgstr "الخيارات المتقدمة"
71
+
72
+ msgctxt "Keystroke description for assistive technologies: keystroke for opening the find and replace UI."
73
+ msgid "Find in the document"
74
+ msgstr "ابحثْ في الوثيقة"
@@ -0,0 +1,74 @@
1
+ # Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Bulgarian (https://app.transifex.com/ckeditor/teams/11143/bg/)\n"
16
+ "Language: bg\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "The tooltip of a find and replace button in the toolbar. Also, the title of the find and replace form."
21
+ msgid "Find and replace"
22
+ msgstr "Намери и замени"
23
+
24
+ msgctxt "The label for the searched text in the find and replace dropdown."
25
+ msgid "Find in text…"
26
+ msgstr "Намери в текста..."
27
+
28
+ msgctxt "The label for the find action button in the find and replace dropdown."
29
+ msgid "Find"
30
+ msgstr "Намери"
31
+
32
+ msgctxt "The label for the previous result button in the find and replace dropdown."
33
+ msgid "Previous result"
34
+ msgstr "Предишен резултат"
35
+
36
+ msgctxt "The label for the previous result button in the find and replace dropdown."
37
+ msgid "Next result"
38
+ msgstr "Следващ резултат"
39
+
40
+ msgctxt "The label for the (single) replace action button in the find and replace dropdown."
41
+ msgid "Replace"
42
+ msgstr "Замени"
43
+
44
+ msgctxt "The label for the replace all action button in the find and replace dropdown."
45
+ msgid "Replace all"
46
+ msgstr "Замени всички"
47
+
48
+ msgctxt "The label for the match case checkbox in the find and replace dropdown."
49
+ msgid "Match case"
50
+ msgstr "Сравни съвпадащ шрифт"
51
+
52
+ msgctxt "The label for the whole words only checkbox in the find and replace dropdown."
53
+ msgid "Whole words only"
54
+ msgstr "Само цели думи"
55
+
56
+ msgctxt "The label for the text replacement in the find and replace dropdown."
57
+ msgid "Replace with…"
58
+ msgstr "Замени с..."
59
+
60
+ msgctxt "An error text displayed when user attempted to find an empty text."
61
+ msgid "Text to find must not be empty."
62
+ msgstr "Текстът за намиране не трябва да е празен."
63
+
64
+ msgctxt "A message displayed next to the replace field when disabled but user tries to use it."
65
+ msgid "Tip: Find some text first in order to replace it."
66
+ msgstr "Съвет: Първо намерете някакъв текст, за да го замените."
67
+
68
+ msgctxt "The label and the tooltip of the options dropdown button in the find and replace form."
69
+ msgid "Advanced options"
70
+ msgstr "Разширени опции"
71
+
72
+ msgctxt "Keystroke description for assistive technologies: keystroke for opening the find and replace UI."
73
+ msgid "Find in the document"
74
+ msgstr "Намиране на документ"
@@ -0,0 +1,74 @@
1
+ # Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Bengali (https://app.transifex.com/ckeditor/teams/11143/bn/)\n"
16
+ "Language: bn\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+
20
+ msgctxt "The tooltip of a find and replace button in the toolbar. Also, the title of the find and replace form."
21
+ msgid "Find and replace"
22
+ msgstr "অনুসন্ধান ও প্রতিস্থাপন করুন"
23
+
24
+ msgctxt "The label for the searched text in the find and replace dropdown."
25
+ msgid "Find in text…"
26
+ msgstr "টেক্সটে খুঁজুন…"
27
+
28
+ msgctxt "The label for the find action button in the find and replace dropdown."
29
+ msgid "Find"
30
+ msgstr "খুঁজুন "
31
+
32
+ msgctxt "The label for the previous result button in the find and replace dropdown."
33
+ msgid "Previous result"
34
+ msgstr "পূর্ববর্তী ফলাফল"
35
+
36
+ msgctxt "The label for the previous result button in the find and replace dropdown."
37
+ msgid "Next result"
38
+ msgstr "পরবর্তী ফলাফল"
39
+
40
+ msgctxt "The label for the (single) replace action button in the find and replace dropdown."
41
+ msgid "Replace"
42
+ msgstr "প্রতিস্থাপন করুন"
43
+
44
+ msgctxt "The label for the replace all action button in the find and replace dropdown."
45
+ msgid "Replace all"
46
+ msgstr "সব প্রতিস্থাপন"
47
+
48
+ msgctxt "The label for the match case checkbox in the find and replace dropdown."
49
+ msgid "Match case"
50
+ msgstr "ম্যাচ কেস"
51
+
52
+ msgctxt "The label for the whole words only checkbox in the find and replace dropdown."
53
+ msgid "Whole words only"
54
+ msgstr "শুধুমাত্র পুরো শব্দ"
55
+
56
+ msgctxt "The label for the text replacement in the find and replace dropdown."
57
+ msgid "Replace with…"
58
+ msgstr "এর সাথে প্রতিস্থাপন..."
59
+
60
+ msgctxt "An error text displayed when user attempted to find an empty text."
61
+ msgid "Text to find must not be empty."
62
+ msgstr "খুঁজে পেতে টেক্সট খালি হওয়া উচিত নয়।"
63
+
64
+ msgctxt "A message displayed next to the replace field when disabled but user tries to use it."
65
+ msgid "Tip: Find some text first in order to replace it."
66
+ msgstr "পরামর্শঃ এটি প্রতিস্থাপন করতে প্রথমে কিছু টেক্সট খুঁজুন।"
67
+
68
+ msgctxt "The label and the tooltip of the options dropdown button in the find and replace form."
69
+ msgid "Advanced options"
70
+ msgstr "উন্নত বিকল্পগুলি"
71
+
72
+ msgctxt "Keystroke description for assistive technologies: keystroke for opening the find and replace UI."
73
+ msgid "Find in the document"
74
+ msgstr "ডকুমেন্টে খুঁজুন"