@ckeditor/ckeditor5-special-characters 35.4.0 → 36.0.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 (112) hide show
  1. package/LICENSE.md +1 -1
  2. package/build/special-characters.js +3 -3
  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/hu.js +1 -1
  22. package/build/translations/id.js +1 -1
  23. package/build/translations/it.js +1 -1
  24. package/build/translations/ja.js +1 -1
  25. package/build/translations/ko.js +1 -1
  26. package/build/translations/lt.js +1 -1
  27. package/build/translations/lv.js +1 -1
  28. package/build/translations/ms.js +1 -1
  29. package/build/translations/nl.js +1 -1
  30. package/build/translations/no.js +1 -1
  31. package/build/translations/pl.js +1 -1
  32. package/build/translations/pt-br.js +1 -1
  33. package/build/translations/pt.js +1 -1
  34. package/build/translations/ro.js +1 -1
  35. package/build/translations/ru.js +1 -1
  36. package/build/translations/sk.js +1 -1
  37. package/build/translations/sr-latn.js +1 -1
  38. package/build/translations/sr.js +1 -1
  39. package/build/translations/sv.js +1 -1
  40. package/build/translations/th.js +1 -1
  41. package/build/translations/tk.js +1 -1
  42. package/build/translations/tr.js +1 -1
  43. package/build/translations/uk.js +1 -1
  44. package/build/translations/ur.js +1 -1
  45. package/build/translations/uz.js +1 -1
  46. package/build/translations/vi.js +1 -1
  47. package/build/translations/zh-cn.js +1 -1
  48. package/build/translations/zh.js +1 -1
  49. package/lang/contexts.json +6 -0
  50. package/lang/translations/ar.po +25 -1
  51. package/lang/translations/az.po +25 -1
  52. package/lang/translations/bg.po +25 -1
  53. package/lang/translations/bn.po +25 -1
  54. package/lang/translations/ca.po +25 -1
  55. package/lang/translations/cs.po +25 -1
  56. package/lang/translations/da.po +25 -1
  57. package/lang/translations/de.po +25 -1
  58. package/lang/translations/el.po +25 -1
  59. package/lang/translations/en-au.po +25 -1
  60. package/lang/translations/en.po +25 -1
  61. package/lang/translations/es.po +25 -1
  62. package/lang/translations/et.po +25 -1
  63. package/lang/translations/fa.po +25 -1
  64. package/lang/translations/fi.po +25 -1
  65. package/lang/translations/fr.po +25 -1
  66. package/lang/translations/gl.po +25 -1
  67. package/lang/translations/he.po +25 -1
  68. package/lang/translations/hi.po +25 -1
  69. package/lang/translations/hu.po +25 -1
  70. package/lang/translations/id.po +25 -1
  71. package/lang/translations/it.po +25 -1
  72. package/lang/translations/ja.po +25 -1
  73. package/lang/translations/ko.po +25 -1
  74. package/lang/translations/lt.po +25 -1
  75. package/lang/translations/lv.po +25 -1
  76. package/lang/translations/ms.po +25 -1
  77. package/lang/translations/nl.po +25 -1
  78. package/lang/translations/no.po +25 -1
  79. package/lang/translations/pl.po +25 -1
  80. package/lang/translations/pt-br.po +25 -1
  81. package/lang/translations/pt.po +25 -1
  82. package/lang/translations/ro.po +25 -1
  83. package/lang/translations/ru.po +25 -1
  84. package/lang/translations/sk.po +25 -1
  85. package/lang/translations/sr-latn.po +29 -5
  86. package/lang/translations/sr.po +29 -5
  87. package/lang/translations/sv.po +25 -1
  88. package/lang/translations/th.po +25 -1
  89. package/lang/translations/tk.po +25 -1
  90. package/lang/translations/tr.po +25 -1
  91. package/lang/translations/uk.po +25 -1
  92. package/lang/translations/ur.po +25 -1
  93. package/lang/translations/uz.po +25 -1
  94. package/lang/translations/vi.po +25 -1
  95. package/lang/translations/zh-cn.po +25 -1
  96. package/lang/translations/zh.po +25 -1
  97. package/package.json +12 -12
  98. package/src/index.js +1 -1
  99. package/src/specialcharacters.js +108 -17
  100. package/src/specialcharactersarrows.js +2 -2
  101. package/src/specialcharacterscurrency.js +2 -2
  102. package/src/specialcharactersessentials.js +1 -1
  103. package/src/specialcharacterslatin.js +2 -2
  104. package/src/specialcharactersmathematical.js +2 -2
  105. package/src/specialcharacterstext.js +2 -2
  106. package/src/ui/charactergridview.js +1 -1
  107. package/src/ui/characterinfoview.js +1 -1
  108. package/src/ui/specialcharactersnavigationview.js +11 -10
  109. package/src/ui/specialcharactersview.js +1 -1
  110. package/theme/charactergrid.css +1 -1
  111. package/theme/characterinfo.css +1 -1
  112. package/theme/specialcharacters.css +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -22,7 +22,7 @@ export default class SpecialCharactersNavigationView extends FormHeaderView {
22
22
  * class.
23
23
  *
24
24
  * @param {module:utils/locale~Locale} locale The localization services instance.
25
- * @param {Iterable.<String>} groupNames The names of the character groups.
25
+ * @param {Map.<String, String>} groupNames The names of the character groups and their displayed labels.
26
26
  */
27
27
  constructor( locale, groupNames ) {
28
28
  super( locale );
@@ -70,7 +70,7 @@ export default class SpecialCharactersNavigationView extends FormHeaderView {
70
70
  * Returns a dropdown that allows selecting character groups.
71
71
  *
72
72
  * @private
73
- * @param {Iterable.<String>} groupNames The names of the character groups.
73
+ * @param {Map.<String, String>} groupNames The names of the character groups and their displayed labels.
74
74
  * @returns {module:ui/dropdown/dropdownview~DropdownView}
75
75
  */
76
76
  _createGroupDropdown( groupNames ) {
@@ -79,9 +79,9 @@ export default class SpecialCharactersNavigationView extends FormHeaderView {
79
79
  const dropdown = createDropdown( locale );
80
80
  const groupDefinitions = this._getCharacterGroupListItemDefinitions( dropdown, groupNames );
81
81
 
82
- dropdown.set( 'value', groupDefinitions.first.model.label );
82
+ dropdown.set( 'value', groupDefinitions.first.model.name );
83
83
 
84
- dropdown.buttonView.bind( 'label' ).to( dropdown, 'value' );
84
+ dropdown.buttonView.bind( 'label' ).to( dropdown, 'value', value => groupNames.get( value ) );
85
85
 
86
86
  dropdown.buttonView.set( {
87
87
  isOn: false,
@@ -91,7 +91,7 @@ export default class SpecialCharactersNavigationView extends FormHeaderView {
91
91
  } );
92
92
 
93
93
  dropdown.on( 'execute', evt => {
94
- dropdown.value = evt.source.label;
94
+ dropdown.value = evt.source.name;
95
95
  } );
96
96
 
97
97
  dropdown.delegate( 'execute' ).to( this );
@@ -107,23 +107,24 @@ export default class SpecialCharactersNavigationView extends FormHeaderView {
107
107
  *
108
108
  * @private
109
109
  * @param {module:ui/dropdown/dropdownview~DropdownView} dropdown
110
- * @param {Iterable.<String>} groupNames The names of the character groups.
110
+ * @param {Map.<String, String>} groupNames The names of the character groups and their displayed labels.
111
111
  * @returns {Iterable.<module:ui/dropdown/utils~ListDropdownItemDefinition>}
112
112
  */
113
113
  _getCharacterGroupListItemDefinitions( dropdown, groupNames ) {
114
114
  const groupDefs = new Collection();
115
115
 
116
- for ( const name of groupNames ) {
116
+ for ( const [ name, label ] of groupNames ) {
117
117
  const definition = {
118
118
  type: 'button',
119
119
  model: new Model( {
120
- label: name,
120
+ name,
121
+ label,
121
122
  withText: true
122
123
  } )
123
124
  };
124
125
 
125
126
  definition.model.bind( 'isOn' ).to( dropdown, 'value', value => {
126
- return value === definition.model.label;
127
+ return value === definition.model.name;
127
128
  } );
128
129
 
129
130
  groupDefs.add( definition );
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5