@ckeditor/ckeditor5-special-characters 42.0.2 → 43.0.0-alpha.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 (221) hide show
  1. package/CHANGELOG.md +1 -27
  2. package/build/special-characters.js +2 -2
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/az.js +1 -1
  5. package/build/translations/bg.js +1 -1
  6. package/build/translations/bn.js +1 -1
  7. package/build/translations/ca.js +1 -1
  8. package/build/translations/cs.js +1 -1
  9. package/build/translations/da.js +1 -1
  10. package/build/translations/de.js +1 -1
  11. package/build/translations/el.js +1 -1
  12. package/build/translations/en-au.js +1 -1
  13. package/build/translations/es.js +1 -1
  14. package/build/translations/et.js +1 -1
  15. package/build/translations/fa.js +1 -1
  16. package/build/translations/fi.js +1 -1
  17. package/build/translations/fr.js +1 -1
  18. package/build/translations/gl.js +1 -1
  19. package/build/translations/he.js +1 -1
  20. package/build/translations/hi.js +1 -1
  21. package/build/translations/hr.js +1 -1
  22. package/build/translations/hu.js +1 -1
  23. package/build/translations/id.js +1 -1
  24. package/build/translations/it.js +1 -1
  25. package/build/translations/ja.js +1 -1
  26. package/build/translations/ko.js +1 -1
  27. package/build/translations/lt.js +1 -1
  28. package/build/translations/lv.js +1 -1
  29. package/build/translations/ms.js +1 -1
  30. package/build/translations/nl.js +1 -1
  31. package/build/translations/no.js +1 -1
  32. package/build/translations/pl.js +1 -1
  33. package/build/translations/pt-br.js +1 -1
  34. package/build/translations/pt.js +1 -1
  35. package/build/translations/ro.js +1 -1
  36. package/build/translations/ru.js +1 -1
  37. package/build/translations/sk.js +1 -1
  38. package/build/translations/sq.js +1 -1
  39. package/build/translations/sr-latn.js +1 -1
  40. package/build/translations/sr.js +1 -1
  41. package/build/translations/sv.js +1 -1
  42. package/build/translations/th.js +1 -1
  43. package/build/translations/ti.js +1 -1
  44. package/build/translations/tk.js +1 -1
  45. package/build/translations/tr.js +1 -1
  46. package/build/translations/uk.js +1 -1
  47. package/build/translations/ur.js +1 -1
  48. package/build/translations/uz.js +1 -1
  49. package/build/translations/vi.js +1 -1
  50. package/build/translations/zh-cn.js +1 -1
  51. package/build/translations/zh.js +1 -1
  52. package/dist/index-editor.css +77 -1
  53. package/dist/index.css +96 -0
  54. package/dist/index.css.map +1 -1
  55. package/dist/index.js +155 -137
  56. package/dist/index.js.map +1 -1
  57. package/dist/specialcharacters.d.ts +8 -2
  58. package/dist/translations/ar.js +1 -1
  59. package/dist/translations/ar.umd.js +1 -1
  60. package/dist/translations/az.js +1 -1
  61. package/dist/translations/az.umd.js +1 -1
  62. package/dist/translations/bg.js +1 -1
  63. package/dist/translations/bg.umd.js +1 -1
  64. package/dist/translations/bn.js +1 -1
  65. package/dist/translations/bn.umd.js +1 -1
  66. package/dist/translations/ca.js +1 -1
  67. package/dist/translations/ca.umd.js +1 -1
  68. package/dist/translations/cs.js +1 -1
  69. package/dist/translations/cs.umd.js +1 -1
  70. package/dist/translations/da.js +1 -1
  71. package/dist/translations/da.umd.js +1 -1
  72. package/dist/translations/de.js +1 -1
  73. package/dist/translations/de.umd.js +1 -1
  74. package/dist/translations/el.js +1 -1
  75. package/dist/translations/el.umd.js +1 -1
  76. package/dist/translations/en-au.js +1 -1
  77. package/dist/translations/en-au.umd.js +1 -1
  78. package/dist/translations/en.js +1 -1
  79. package/dist/translations/en.umd.js +1 -1
  80. package/dist/translations/es.js +1 -1
  81. package/dist/translations/es.umd.js +1 -1
  82. package/dist/translations/et.js +1 -1
  83. package/dist/translations/et.umd.js +1 -1
  84. package/dist/translations/fa.js +1 -1
  85. package/dist/translations/fa.umd.js +1 -1
  86. package/dist/translations/fi.js +1 -1
  87. package/dist/translations/fi.umd.js +1 -1
  88. package/dist/translations/fr.js +1 -1
  89. package/dist/translations/fr.umd.js +1 -1
  90. package/dist/translations/gl.js +1 -1
  91. package/dist/translations/gl.umd.js +1 -1
  92. package/dist/translations/he.js +1 -1
  93. package/dist/translations/he.umd.js +1 -1
  94. package/dist/translations/hi.js +1 -1
  95. package/dist/translations/hi.umd.js +1 -1
  96. package/dist/translations/hr.js +1 -1
  97. package/dist/translations/hr.umd.js +1 -1
  98. package/dist/translations/hu.js +1 -1
  99. package/dist/translations/hu.umd.js +1 -1
  100. package/dist/translations/id.js +1 -1
  101. package/dist/translations/id.umd.js +1 -1
  102. package/dist/translations/it.js +1 -1
  103. package/dist/translations/it.umd.js +1 -1
  104. package/dist/translations/ja.js +1 -1
  105. package/dist/translations/ja.umd.js +1 -1
  106. package/dist/translations/ko.js +1 -1
  107. package/dist/translations/ko.umd.js +1 -1
  108. package/dist/translations/lt.js +1 -1
  109. package/dist/translations/lt.umd.js +1 -1
  110. package/dist/translations/lv.js +1 -1
  111. package/dist/translations/lv.umd.js +1 -1
  112. package/dist/translations/ms.js +1 -1
  113. package/dist/translations/ms.umd.js +1 -1
  114. package/dist/translations/nl.js +1 -1
  115. package/dist/translations/nl.umd.js +1 -1
  116. package/dist/translations/no.js +1 -1
  117. package/dist/translations/no.umd.js +1 -1
  118. package/dist/translations/pl.js +1 -1
  119. package/dist/translations/pl.umd.js +1 -1
  120. package/dist/translations/pt-br.js +1 -1
  121. package/dist/translations/pt-br.umd.js +1 -1
  122. package/dist/translations/pt.js +1 -1
  123. package/dist/translations/pt.umd.js +1 -1
  124. package/dist/translations/ro.js +1 -1
  125. package/dist/translations/ro.umd.js +1 -1
  126. package/dist/translations/ru.js +1 -1
  127. package/dist/translations/ru.umd.js +1 -1
  128. package/dist/translations/sk.js +1 -1
  129. package/dist/translations/sk.umd.js +1 -1
  130. package/dist/translations/sq.js +1 -1
  131. package/dist/translations/sq.umd.js +1 -1
  132. package/dist/translations/sr-latn.js +1 -1
  133. package/dist/translations/sr-latn.umd.js +1 -1
  134. package/dist/translations/sr.js +1 -1
  135. package/dist/translations/sr.umd.js +1 -1
  136. package/dist/translations/sv.js +1 -1
  137. package/dist/translations/sv.umd.js +1 -1
  138. package/dist/translations/th.js +1 -1
  139. package/dist/translations/th.umd.js +1 -1
  140. package/dist/translations/ti.js +1 -1
  141. package/dist/translations/ti.umd.js +1 -1
  142. package/dist/translations/tk.js +1 -1
  143. package/dist/translations/tk.umd.js +1 -1
  144. package/dist/translations/tr.js +1 -1
  145. package/dist/translations/tr.umd.js +1 -1
  146. package/dist/translations/uk.js +1 -1
  147. package/dist/translations/uk.umd.js +1 -1
  148. package/dist/translations/ur.js +1 -1
  149. package/dist/translations/ur.umd.js +1 -1
  150. package/dist/translations/uz.js +1 -1
  151. package/dist/translations/uz.umd.js +1 -1
  152. package/dist/translations/vi.js +1 -1
  153. package/dist/translations/vi.umd.js +1 -1
  154. package/dist/translations/zh-cn.js +1 -1
  155. package/dist/translations/zh-cn.umd.js +1 -1
  156. package/dist/translations/zh.js +1 -1
  157. package/dist/translations/zh.umd.js +1 -1
  158. package/dist/ui/specialcharacterscategoriesview.d.ts +45 -0
  159. package/dist/ui/specialcharactersview.d.ts +4 -4
  160. package/lang/contexts.json +2 -2
  161. package/lang/translations/ar.po +4 -4
  162. package/lang/translations/az.po +4 -4
  163. package/lang/translations/bg.po +4 -4
  164. package/lang/translations/bn.po +4 -4
  165. package/lang/translations/ca.po +4 -4
  166. package/lang/translations/cs.po +4 -4
  167. package/lang/translations/da.po +4 -4
  168. package/lang/translations/de.po +4 -4
  169. package/lang/translations/el.po +4 -4
  170. package/lang/translations/en-au.po +4 -4
  171. package/lang/translations/en.po +4 -4
  172. package/lang/translations/es.po +4 -4
  173. package/lang/translations/et.po +4 -4
  174. package/lang/translations/fa.po +4 -4
  175. package/lang/translations/fi.po +4 -4
  176. package/lang/translations/fr.po +4 -4
  177. package/lang/translations/gl.po +4 -4
  178. package/lang/translations/he.po +4 -4
  179. package/lang/translations/hi.po +4 -4
  180. package/lang/translations/hr.po +4 -4
  181. package/lang/translations/hu.po +4 -4
  182. package/lang/translations/id.po +4 -4
  183. package/lang/translations/it.po +4 -4
  184. package/lang/translations/ja.po +4 -4
  185. package/lang/translations/ko.po +4 -4
  186. package/lang/translations/lt.po +4 -4
  187. package/lang/translations/lv.po +4 -4
  188. package/lang/translations/ms.po +4 -4
  189. package/lang/translations/nl.po +4 -4
  190. package/lang/translations/no.po +4 -4
  191. package/lang/translations/pl.po +4 -4
  192. package/lang/translations/pt-br.po +4 -4
  193. package/lang/translations/pt.po +4 -4
  194. package/lang/translations/ro.po +4 -4
  195. package/lang/translations/ru.po +4 -4
  196. package/lang/translations/sk.po +4 -4
  197. package/lang/translations/sq.po +4 -4
  198. package/lang/translations/sr-latn.po +4 -4
  199. package/lang/translations/sr.po +4 -4
  200. package/lang/translations/sv.po +4 -4
  201. package/lang/translations/th.po +4 -4
  202. package/lang/translations/ti.po +4 -4
  203. package/lang/translations/tk.po +4 -4
  204. package/lang/translations/tr.po +4 -4
  205. package/lang/translations/uk.po +4 -4
  206. package/lang/translations/ur.po +4 -4
  207. package/lang/translations/uz.po +4 -4
  208. package/lang/translations/vi.po +4 -4
  209. package/lang/translations/zh-cn.po +4 -4
  210. package/lang/translations/zh.po +4 -4
  211. package/package.json +6 -6
  212. package/src/specialcharacters.d.ts +8 -2
  213. package/src/specialcharacters.js +60 -38
  214. package/src/ui/specialcharacterscategoriesview.d.ts +41 -0
  215. package/src/ui/specialcharacterscategoriesview.js +94 -0
  216. package/src/ui/specialcharactersview.d.ts +4 -4
  217. package/src/ui/specialcharactersview.js +6 -6
  218. package/theme/specialcharacters.css +81 -0
  219. package/dist/ui/specialcharactersnavigationview.d.ts +0 -63
  220. package/src/ui/specialcharactersnavigationview.d.ts +0 -59
  221. package/src/ui/specialcharactersnavigationview.js +0 -95
@@ -1,95 +0,0 @@
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
- * @module special-characters/ui/specialcharactersnavigationview
7
- */
8
- import { Collection } from 'ckeditor5/src/utils.js';
9
- import { addListToDropdown, createDropdown, ViewModel, FormHeaderView } from 'ckeditor5/src/ui.js';
10
- /**
11
- * A class representing the navigation part of the special characters UI. It is responsible
12
- * for describing the feature and allowing the user to select a particular character group.
13
- */
14
- export default class SpecialCharactersNavigationView extends FormHeaderView {
15
- /**
16
- * Creates an instance of the {@link module:special-characters/ui/specialcharactersnavigationview~SpecialCharactersNavigationView}
17
- * class.
18
- *
19
- * @param locale The localization services instance.
20
- * @param groupNames The names of the character groups and their displayed labels.
21
- */
22
- constructor(locale, groupNames) {
23
- super(locale);
24
- const t = locale.t;
25
- this.set('class', 'ck-special-characters-navigation');
26
- this.groupDropdownView = this._createGroupDropdown(groupNames);
27
- this.groupDropdownView.panelPosition = locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw';
28
- this.label = t('Special characters');
29
- this.children.add(this.groupDropdownView);
30
- }
31
- /**
32
- * Returns the name of the character group currently selected in the {@link #groupDropdownView}.
33
- */
34
- get currentGroupName() {
35
- return this.groupDropdownView.value;
36
- }
37
- /**
38
- * Focuses the character categories dropdown.
39
- */
40
- focus() {
41
- this.groupDropdownView.focus();
42
- }
43
- /**
44
- * Returns a dropdown that allows selecting character groups.
45
- *
46
- * @param groupNames The names of the character groups and their displayed labels.
47
- */
48
- _createGroupDropdown(groupNames) {
49
- const locale = this.locale;
50
- const t = locale.t;
51
- const dropdown = createDropdown(locale);
52
- const groupDefinitions = this._getCharacterGroupListItemDefinitions(dropdown, groupNames);
53
- const accessibleLabel = t('Character categories');
54
- dropdown.set('value', groupDefinitions.first.model.name);
55
- dropdown.buttonView.bind('label').to(dropdown, 'value', value => groupNames.get(value));
56
- dropdown.buttonView.set({
57
- isOn: false,
58
- withText: true,
59
- tooltip: accessibleLabel,
60
- class: ['ck-dropdown__button_label-width_auto'],
61
- ariaLabel: accessibleLabel,
62
- ariaLabelledBy: undefined
63
- });
64
- dropdown.on('execute', evt => {
65
- dropdown.value = evt.source.name;
66
- });
67
- dropdown.delegate('execute').to(this);
68
- addListToDropdown(dropdown, groupDefinitions, {
69
- ariaLabel: accessibleLabel,
70
- role: 'menu'
71
- });
72
- return dropdown;
73
- }
74
- /**
75
- * Returns list item definitions to be used in the character group dropdown
76
- * representing specific character groups.
77
- *
78
- * @param dropdown Dropdown view element
79
- * @param groupNames The names of the character groups and their displayed labels.
80
- */
81
- _getCharacterGroupListItemDefinitions(dropdown, groupNames) {
82
- const groupDefs = new Collection();
83
- for (const [name, label] of groupNames) {
84
- const model = new ViewModel({
85
- name,
86
- label,
87
- withText: true,
88
- role: 'menuitemradio'
89
- });
90
- model.bind('isOn').to(dropdown, 'value', value => value === model.name);
91
- groupDefs.add({ type: 'button', model });
92
- }
93
- return groupDefs;
94
- }
95
- }