@ckeditor/ckeditor5-ui 47.6.1 → 48.0.0-alpha.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 (367) hide show
  1. package/LICENSE.md +1 -1
  2. package/ckeditor5-metadata.json +3 -3
  3. package/{src → dist}/colorselector/documentcolorcollection.d.ts +4 -4
  4. package/{src → dist}/dialog/dialog.d.ts +1 -1
  5. package/dist/index-editor.css +2728 -587
  6. package/dist/index.css +2673 -850
  7. package/dist/index.css.map +1 -1
  8. package/dist/index.js +11 -1
  9. package/dist/index.js.map +1 -1
  10. package/{src → dist}/menubar/menubarmenuview.d.ts +4 -0
  11. package/{src → dist}/view.d.ts +1 -1
  12. package/package.json +25 -47
  13. package/lang/contexts.json +0 -51
  14. package/lang/translations/af.po +0 -208
  15. package/lang/translations/ar.po +0 -208
  16. package/lang/translations/ast.po +0 -208
  17. package/lang/translations/az.po +0 -208
  18. package/lang/translations/be.po +0 -208
  19. package/lang/translations/bg.po +0 -208
  20. package/lang/translations/bn.po +0 -208
  21. package/lang/translations/bs.po +0 -208
  22. package/lang/translations/ca.po +0 -208
  23. package/lang/translations/cs.po +0 -208
  24. package/lang/translations/da.po +0 -208
  25. package/lang/translations/de-ch.po +0 -208
  26. package/lang/translations/de.po +0 -208
  27. package/lang/translations/el.po +0 -208
  28. package/lang/translations/en-au.po +0 -208
  29. package/lang/translations/en-gb.po +0 -208
  30. package/lang/translations/en.po +0 -208
  31. package/lang/translations/eo.po +0 -208
  32. package/lang/translations/es-co.po +0 -208
  33. package/lang/translations/es.po +0 -208
  34. package/lang/translations/et.po +0 -208
  35. package/lang/translations/eu.po +0 -208
  36. package/lang/translations/fa.po +0 -208
  37. package/lang/translations/fi.po +0 -208
  38. package/lang/translations/fr.po +0 -208
  39. package/lang/translations/gl.po +0 -208
  40. package/lang/translations/gu.po +0 -208
  41. package/lang/translations/he.po +0 -208
  42. package/lang/translations/hi.po +0 -208
  43. package/lang/translations/hr.po +0 -208
  44. package/lang/translations/hu.po +0 -208
  45. package/lang/translations/hy.po +0 -208
  46. package/lang/translations/id.po +0 -208
  47. package/lang/translations/it.po +0 -208
  48. package/lang/translations/ja.po +0 -208
  49. package/lang/translations/jv.po +0 -208
  50. package/lang/translations/kk.po +0 -208
  51. package/lang/translations/km.po +0 -208
  52. package/lang/translations/kn.po +0 -208
  53. package/lang/translations/ko.po +0 -208
  54. package/lang/translations/ku.po +0 -208
  55. package/lang/translations/lt.po +0 -208
  56. package/lang/translations/lv.po +0 -208
  57. package/lang/translations/ms.po +0 -208
  58. package/lang/translations/nb.po +0 -208
  59. package/lang/translations/ne.po +0 -208
  60. package/lang/translations/nl.po +0 -208
  61. package/lang/translations/no.po +0 -208
  62. package/lang/translations/oc.po +0 -208
  63. package/lang/translations/pl.po +0 -208
  64. package/lang/translations/pt-br.po +0 -208
  65. package/lang/translations/pt.po +0 -208
  66. package/lang/translations/ro.po +0 -208
  67. package/lang/translations/ru.po +0 -208
  68. package/lang/translations/si.po +0 -208
  69. package/lang/translations/sk.po +0 -208
  70. package/lang/translations/sl.po +0 -208
  71. package/lang/translations/sq.po +0 -208
  72. package/lang/translations/sr-latn.po +0 -208
  73. package/lang/translations/sr.po +0 -208
  74. package/lang/translations/sv.po +0 -208
  75. package/lang/translations/th.po +0 -208
  76. package/lang/translations/ti.po +0 -208
  77. package/lang/translations/tk.po +0 -208
  78. package/lang/translations/tr.po +0 -208
  79. package/lang/translations/tt.po +0 -208
  80. package/lang/translations/ug.po +0 -208
  81. package/lang/translations/uk.po +0 -208
  82. package/lang/translations/ur.po +0 -208
  83. package/lang/translations/uz.po +0 -208
  84. package/lang/translations/vi.po +0 -208
  85. package/lang/translations/zh-cn.po +0 -208
  86. package/lang/translations/zh.po +0 -208
  87. package/src/arialiveannouncer.js +0 -189
  88. package/src/augmentation.js +0 -5
  89. package/src/autocomplete/autocompleteview.js +0 -157
  90. package/src/badge/badge.js +0 -226
  91. package/src/bindings/addkeyboardhandlingforgrid.js +0 -107
  92. package/src/bindings/clickoutsidehandler.js +0 -36
  93. package/src/bindings/csstransitiondisablermixin.js +0 -58
  94. package/src/bindings/draggableviewmixin.js +0 -144
  95. package/src/bindings/preventdefault.js +0 -35
  96. package/src/bindings/submithandler.js +0 -47
  97. package/src/button/button.js +0 -5
  98. package/src/button/buttonlabel.js +0 -5
  99. package/src/button/buttonlabelview.js +0 -42
  100. package/src/button/buttonview.js +0 -278
  101. package/src/button/filedialogbuttonview.js +0 -147
  102. package/src/button/listitembuttonview.js +0 -136
  103. package/src/button/switchbuttonview.js +0 -79
  104. package/src/collapsible/collapsibleview.js +0 -106
  105. package/src/colorgrid/colorgridview.js +0 -140
  106. package/src/colorgrid/colortileview.js +0 -42
  107. package/src/colorgrid/utils.js +0 -84
  108. package/src/colorpicker/colorpickerview.js +0 -356
  109. package/src/colorpicker/utils.js +0 -108
  110. package/src/colorselector/colorgridsfragmentview.js +0 -368
  111. package/src/colorselector/colorpickerfragmentview.js +0 -254
  112. package/src/colorselector/colorselectorview.js +0 -294
  113. package/src/colorselector/documentcolorcollection.js +0 -42
  114. package/src/componentfactory.js +0 -108
  115. package/src/dialog/dialog.js +0 -325
  116. package/src/dialog/dialogactionsview.js +0 -118
  117. package/src/dialog/dialogcontentview.js +0 -39
  118. package/src/dialog/dialogview.js +0 -507
  119. package/src/dropdown/button/dropdownbutton.js +0 -5
  120. package/src/dropdown/button/dropdownbuttonview.js +0 -70
  121. package/src/dropdown/button/splitbuttonview.js +0 -178
  122. package/src/dropdown/dropdownpanelfocusable.js +0 -5
  123. package/src/dropdown/dropdownpanelview.js +0 -106
  124. package/src/dropdown/dropdownview.js +0 -438
  125. package/src/dropdown/menu/dropdownmenubehaviors.js +0 -125
  126. package/src/dropdown/menu/dropdownmenubuttonview.js +0 -69
  127. package/src/dropdown/menu/dropdownmenulistitembuttonview.js +0 -30
  128. package/src/dropdown/menu/dropdownmenulistitemview.js +0 -38
  129. package/src/dropdown/menu/dropdownmenulistview.js +0 -29
  130. package/src/dropdown/menu/dropdownmenunestedmenupanelview.js +0 -63
  131. package/src/dropdown/menu/dropdownmenunestedmenuview.js +0 -214
  132. package/src/dropdown/menu/dropdownmenurootlistview.js +0 -168
  133. package/src/dropdown/menu/utils.js +0 -61
  134. package/src/dropdown/utils.js +0 -654
  135. package/src/editableui/editableuiview.js +0 -130
  136. package/src/editableui/inline/inlineeditableuiview.js +0 -75
  137. package/src/editorui/accessibilityhelp/accessibilityhelp.js +0 -142
  138. package/src/editorui/accessibilityhelp/accessibilityhelpcontentview.js +0 -112
  139. package/src/editorui/bodycollection.js +0 -128
  140. package/src/editorui/boxed/boxededitoruiview.js +0 -95
  141. package/src/editorui/editorui.js +0 -586
  142. package/src/editorui/editoruiview.js +0 -60
  143. package/src/editorui/evaluationbadge.js +0 -99
  144. package/src/editorui/poweredby.js +0 -120
  145. package/src/focuscycler.js +0 -383
  146. package/src/formheader/formheaderview.js +0 -77
  147. package/src/formrow/formrowview.js +0 -56
  148. package/src/highlightedtext/buttonlabelwithhighlightview.js +0 -31
  149. package/src/highlightedtext/highlightedtextview.js +0 -102
  150. package/src/highlightedtext/labelwithhighlightview.js +0 -37
  151. package/src/icon/iconview.js +0 -123
  152. package/src/iframe/iframeview.js +0 -63
  153. package/src/index.js +0 -132
  154. package/src/input/inputbase.js +0 -119
  155. package/src/input/inputview.js +0 -24
  156. package/src/inputnumber/inputnumberview.js +0 -40
  157. package/src/inputtext/inputtextview.js +0 -27
  158. package/src/label/labelview.js +0 -46
  159. package/src/labeledfield/labeledfieldview.js +0 -177
  160. package/src/labeledfield/utils.js +0 -176
  161. package/src/labeledinput/labeledinputview.js +0 -138
  162. package/src/legacyerrors.js +0 -20
  163. package/src/list/listitemgroupview.js +0 -82
  164. package/src/list/listitemview.js +0 -46
  165. package/src/list/listseparatorview.js +0 -28
  166. package/src/list/listview.js +0 -210
  167. package/src/menubar/menubarmenubuttonview.js +0 -68
  168. package/src/menubar/menubarmenulistitembuttonview.js +0 -30
  169. package/src/menubar/menubarmenulistitemfiledialogbuttonview.js +0 -32
  170. package/src/menubar/menubarmenulistitemview.js +0 -34
  171. package/src/menubar/menubarmenulistview.js +0 -72
  172. package/src/menubar/menubarmenupanelview.js +0 -64
  173. package/src/menubar/menubarmenuview.js +0 -198
  174. package/src/menubar/menubarview.js +0 -281
  175. package/src/menubar/utils.js +0 -1432
  176. package/src/model.js +0 -31
  177. package/src/notification/notification.js +0 -192
  178. package/src/panel/balloon/balloonpanelview.js +0 -1077
  179. package/src/panel/balloon/contextualballoon.js +0 -616
  180. package/src/panel/sticky/stickypanelview.js +0 -246
  181. package/src/search/filteredview.js +0 -5
  182. package/src/search/filtergroupanditemnames.js +0 -38
  183. package/src/search/searchinfoview.js +0 -59
  184. package/src/search/searchresultsview.js +0 -83
  185. package/src/search/text/searchtextqueryview.js +0 -87
  186. package/src/search/text/searchtextview.js +0 -242
  187. package/src/spinner/spinnerview.js +0 -38
  188. package/src/template.js +0 -1396
  189. package/src/textarea/textareaview.js +0 -189
  190. package/src/toolbar/balloon/balloontoolbar.js +0 -358
  191. package/src/toolbar/block/blockbuttonview.js +0 -41
  192. package/src/toolbar/block/blocktoolbar.js +0 -507
  193. package/src/toolbar/normalizetoolbarconfig.js +0 -52
  194. package/src/toolbar/toolbarlinebreakview.js +0 -28
  195. package/src/toolbar/toolbarseparatorview.js +0 -28
  196. package/src/toolbar/toolbarview.js +0 -873
  197. package/src/tooltipmanager.js +0 -454
  198. package/src/view.js +0 -471
  199. package/src/viewcollection.js +0 -210
  200. package/theme/components/arialiveannouncer/arialiveannouncer.css +0 -14
  201. package/theme/components/autocomplete/autocomplete.css +0 -22
  202. package/theme/components/button/button.css +0 -39
  203. package/theme/components/button/listitembutton.css +0 -48
  204. package/theme/components/button/switchbutton.css +0 -14
  205. package/theme/components/collapsible/collapsible.css +0 -10
  206. package/theme/components/colorgrid/colorgrid.css +0 -8
  207. package/theme/components/colorpicker/colorpicker.css +0 -34
  208. package/theme/components/colorselector/colorselector.css +0 -35
  209. package/theme/components/dialog/dialog.css +0 -42
  210. package/theme/components/dialog/dialogactions.css +0 -11
  211. package/theme/components/dropdown/dropdown.css +0 -95
  212. package/theme/components/dropdown/listdropdown.css +0 -10
  213. package/theme/components/dropdown/menu/dropdownmenu.css +0 -8
  214. package/theme/components/dropdown/menu/dropdownmenubutton.css +0 -9
  215. package/theme/components/dropdown/menu/dropdownmenulistitem.css +0 -10
  216. package/theme/components/dropdown/menu/dropdownmenulistitembutton.css +0 -10
  217. package/theme/components/dropdown/menu/dropdownmenupanel.css +0 -11
  218. package/theme/components/dropdown/splitbutton.css +0 -14
  219. package/theme/components/dropdown/toolbardropdown.css +0 -20
  220. package/theme/components/editorui/accessibilityhelp.css +0 -10
  221. package/theme/components/editorui/editorui.css +0 -10
  222. package/theme/components/form/form.css +0 -87
  223. package/theme/components/formheader/formheader.css +0 -18
  224. package/theme/components/formrow/formrow.css +0 -32
  225. package/theme/components/highlightedtext/highlightedtext.css +0 -12
  226. package/theme/components/icon/icon.css +0 -8
  227. package/theme/components/input/input.css +0 -10
  228. package/theme/components/label/label.css +0 -12
  229. package/theme/components/labeledfield/labeledfieldview.css +0 -16
  230. package/theme/components/labeledinput/labeledinput.css +0 -10
  231. package/theme/components/list/list.css +0 -26
  232. package/theme/components/menubar/menubar.css +0 -10
  233. package/theme/components/menubar/menubarmenu.css +0 -9
  234. package/theme/components/menubar/menubarmenubutton.css +0 -11
  235. package/theme/components/menubar/menubarmenulistitem.css +0 -10
  236. package/theme/components/menubar/menubarmenulistitembutton.css +0 -10
  237. package/theme/components/menubar/menubarmenupanel.css +0 -62
  238. package/theme/components/panel/balloonpanel.css +0 -56
  239. package/theme/components/panel/balloonrotator.css +0 -17
  240. package/theme/components/panel/fakepanel.css +0 -23
  241. package/theme/components/panel/stickypanel.css +0 -17
  242. package/theme/components/responsive-form/responsiveform.css +0 -42
  243. package/theme/components/search/search.css +0 -43
  244. package/theme/components/spinner/spinner.css +0 -23
  245. package/theme/components/textarea/textarea.css +0 -10
  246. package/theme/components/toolbar/blocktoolbar.css +0 -9
  247. package/theme/components/toolbar/toolbar.css +0 -58
  248. package/theme/components/tooltip/tooltip.css +0 -12
  249. package/theme/globals/_evaluationbadge.css +0 -54
  250. package/theme/globals/_hidden.css +0 -13
  251. package/theme/globals/_poweredby.css +0 -84
  252. package/theme/globals/_transition.css +0 -12
  253. package/theme/globals/_zindex.css +0 -10
  254. package/theme/globals/globals.css +0 -10
  255. package/theme/mixins/_dir.css +0 -10
  256. package/theme/mixins/_mediacolors.css +0 -20
  257. package/theme/mixins/_rwd.css +0 -10
  258. package/theme/mixins/_unselectable.css +0 -14
  259. /package/{src → dist}/arialiveannouncer.d.ts +0 -0
  260. /package/{src → dist}/augmentation.d.ts +0 -0
  261. /package/{src → dist}/autocomplete/autocompleteview.d.ts +0 -0
  262. /package/{src → dist}/badge/badge.d.ts +0 -0
  263. /package/{src → dist}/bindings/addkeyboardhandlingforgrid.d.ts +0 -0
  264. /package/{src → dist}/bindings/clickoutsidehandler.d.ts +0 -0
  265. /package/{src → dist}/bindings/csstransitiondisablermixin.d.ts +0 -0
  266. /package/{src → dist}/bindings/draggableviewmixin.d.ts +0 -0
  267. /package/{src → dist}/bindings/preventdefault.d.ts +0 -0
  268. /package/{src → dist}/bindings/submithandler.d.ts +0 -0
  269. /package/{src → dist}/button/button.d.ts +0 -0
  270. /package/{src → dist}/button/buttonlabel.d.ts +0 -0
  271. /package/{src → dist}/button/buttonlabelview.d.ts +0 -0
  272. /package/{src → dist}/button/buttonview.d.ts +0 -0
  273. /package/{src → dist}/button/filedialogbuttonview.d.ts +0 -0
  274. /package/{src → dist}/button/listitembuttonview.d.ts +0 -0
  275. /package/{src → dist}/button/switchbuttonview.d.ts +0 -0
  276. /package/{src → dist}/collapsible/collapsibleview.d.ts +0 -0
  277. /package/{src → dist}/colorgrid/colorgridview.d.ts +0 -0
  278. /package/{src → dist}/colorgrid/colortileview.d.ts +0 -0
  279. /package/{src → dist}/colorgrid/utils.d.ts +0 -0
  280. /package/{src → dist}/colorpicker/colorpickerview.d.ts +0 -0
  281. /package/{src → dist}/colorpicker/utils.d.ts +0 -0
  282. /package/{src → dist}/colorselector/colorgridsfragmentview.d.ts +0 -0
  283. /package/{src → dist}/colorselector/colorpickerfragmentview.d.ts +0 -0
  284. /package/{src → dist}/colorselector/colorselectorview.d.ts +0 -0
  285. /package/{src → dist}/componentfactory.d.ts +0 -0
  286. /package/{src → dist}/dialog/dialogactionsview.d.ts +0 -0
  287. /package/{src → dist}/dialog/dialogcontentview.d.ts +0 -0
  288. /package/{src → dist}/dialog/dialogview.d.ts +0 -0
  289. /package/{src → dist}/dropdown/button/dropdownbutton.d.ts +0 -0
  290. /package/{src → dist}/dropdown/button/dropdownbuttonview.d.ts +0 -0
  291. /package/{src → dist}/dropdown/button/splitbuttonview.d.ts +0 -0
  292. /package/{src → dist}/dropdown/dropdownpanelfocusable.d.ts +0 -0
  293. /package/{src → dist}/dropdown/dropdownpanelview.d.ts +0 -0
  294. /package/{src → dist}/dropdown/dropdownview.d.ts +0 -0
  295. /package/{src → dist}/dropdown/menu/dropdownmenubehaviors.d.ts +0 -0
  296. /package/{src → dist}/dropdown/menu/dropdownmenubuttonview.d.ts +0 -0
  297. /package/{src → dist}/dropdown/menu/dropdownmenulistitembuttonview.d.ts +0 -0
  298. /package/{src → dist}/dropdown/menu/dropdownmenulistitemview.d.ts +0 -0
  299. /package/{src → dist}/dropdown/menu/dropdownmenulistview.d.ts +0 -0
  300. /package/{src → dist}/dropdown/menu/dropdownmenunestedmenupanelview.d.ts +0 -0
  301. /package/{src → dist}/dropdown/menu/dropdownmenunestedmenuview.d.ts +0 -0
  302. /package/{src → dist}/dropdown/menu/dropdownmenurootlistview.d.ts +0 -0
  303. /package/{src → dist}/dropdown/menu/utils.d.ts +0 -0
  304. /package/{src → dist}/dropdown/utils.d.ts +0 -0
  305. /package/{src → dist}/editableui/editableuiview.d.ts +0 -0
  306. /package/{src → dist}/editableui/inline/inlineeditableuiview.d.ts +0 -0
  307. /package/{src → dist}/editorui/accessibilityhelp/accessibilityhelp.d.ts +0 -0
  308. /package/{src → dist}/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +0 -0
  309. /package/{src → dist}/editorui/bodycollection.d.ts +0 -0
  310. /package/{src → dist}/editorui/boxed/boxededitoruiview.d.ts +0 -0
  311. /package/{src → dist}/editorui/editorui.d.ts +0 -0
  312. /package/{src → dist}/editorui/editoruiview.d.ts +0 -0
  313. /package/{src → dist}/editorui/evaluationbadge.d.ts +0 -0
  314. /package/{src → dist}/editorui/poweredby.d.ts +0 -0
  315. /package/{src → dist}/focuscycler.d.ts +0 -0
  316. /package/{src → dist}/formheader/formheaderview.d.ts +0 -0
  317. /package/{src → dist}/formrow/formrowview.d.ts +0 -0
  318. /package/{src → dist}/highlightedtext/buttonlabelwithhighlightview.d.ts +0 -0
  319. /package/{src → dist}/highlightedtext/highlightedtextview.d.ts +0 -0
  320. /package/{src → dist}/highlightedtext/labelwithhighlightview.d.ts +0 -0
  321. /package/{src → dist}/icon/iconview.d.ts +0 -0
  322. /package/{src → dist}/iframe/iframeview.d.ts +0 -0
  323. /package/{src → dist}/index.d.ts +0 -0
  324. /package/{src → dist}/input/inputbase.d.ts +0 -0
  325. /package/{src → dist}/input/inputview.d.ts +0 -0
  326. /package/{src → dist}/inputnumber/inputnumberview.d.ts +0 -0
  327. /package/{src → dist}/inputtext/inputtextview.d.ts +0 -0
  328. /package/{src → dist}/label/labelview.d.ts +0 -0
  329. /package/{src → dist}/labeledfield/labeledfieldview.d.ts +0 -0
  330. /package/{src → dist}/labeledfield/utils.d.ts +0 -0
  331. /package/{src → dist}/labeledinput/labeledinputview.d.ts +0 -0
  332. /package/{src → dist}/legacyerrors.d.ts +0 -0
  333. /package/{src → dist}/list/listitemgroupview.d.ts +0 -0
  334. /package/{src → dist}/list/listitemview.d.ts +0 -0
  335. /package/{src → dist}/list/listseparatorview.d.ts +0 -0
  336. /package/{src → dist}/list/listview.d.ts +0 -0
  337. /package/{src → dist}/menubar/menubarmenubuttonview.d.ts +0 -0
  338. /package/{src → dist}/menubar/menubarmenulistitembuttonview.d.ts +0 -0
  339. /package/{src → dist}/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +0 -0
  340. /package/{src → dist}/menubar/menubarmenulistitemview.d.ts +0 -0
  341. /package/{src → dist}/menubar/menubarmenulistview.d.ts +0 -0
  342. /package/{src → dist}/menubar/menubarmenupanelview.d.ts +0 -0
  343. /package/{src → dist}/menubar/menubarview.d.ts +0 -0
  344. /package/{src → dist}/menubar/utils.d.ts +0 -0
  345. /package/{src → dist}/model.d.ts +0 -0
  346. /package/{src → dist}/notification/notification.d.ts +0 -0
  347. /package/{src → dist}/panel/balloon/balloonpanelview.d.ts +0 -0
  348. /package/{src → dist}/panel/balloon/contextualballoon.d.ts +0 -0
  349. /package/{src → dist}/panel/sticky/stickypanelview.d.ts +0 -0
  350. /package/{src → dist}/search/filteredview.d.ts +0 -0
  351. /package/{src → dist}/search/filtergroupanditemnames.d.ts +0 -0
  352. /package/{src → dist}/search/searchinfoview.d.ts +0 -0
  353. /package/{src → dist}/search/searchresultsview.d.ts +0 -0
  354. /package/{src → dist}/search/text/searchtextqueryview.d.ts +0 -0
  355. /package/{src → dist}/search/text/searchtextview.d.ts +0 -0
  356. /package/{src → dist}/spinner/spinnerview.d.ts +0 -0
  357. /package/{src → dist}/template.d.ts +0 -0
  358. /package/{src → dist}/textarea/textareaview.d.ts +0 -0
  359. /package/{src → dist}/toolbar/balloon/balloontoolbar.d.ts +0 -0
  360. /package/{src → dist}/toolbar/block/blockbuttonview.d.ts +0 -0
  361. /package/{src → dist}/toolbar/block/blocktoolbar.d.ts +0 -0
  362. /package/{src → dist}/toolbar/normalizetoolbarconfig.d.ts +0 -0
  363. /package/{src → dist}/toolbar/toolbarlinebreakview.d.ts +0 -0
  364. /package/{src → dist}/toolbar/toolbarseparatorview.d.ts +0 -0
  365. /package/{src → dist}/toolbar/toolbarview.d.ts +0 -0
  366. /package/{src → dist}/tooltipmanager.d.ts +0 -0
  367. /package/{src → dist}/viewcollection.d.ts +0 -0
package/src/view.js DELETED
@@ -1,471 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module ui/view
7
- */
8
- import { ViewCollection } from './viewcollection.js';
9
- import { Template } from './template.js';
10
- import { CKEditorError, Collection, DomEmitterMixin, ObservableMixin, isIterable } from '@ckeditor/ckeditor5-utils';
11
- import '../theme/globals/globals.css';
12
- /**
13
- * The basic view class, which represents an HTML element created out of a
14
- * {@link module:ui/view~View#template}. Views are building blocks of the user interface and handle
15
- * interaction
16
- *
17
- * Views {@link module:ui/view~View#registerChild aggregate} children in
18
- * {@link module:ui/view~View#createCollection collections} and manage the life cycle of DOM
19
- * listeners e.g. by handling rendering and destruction.
20
- *
21
- * See the {@link module:ui/template~TemplateDefinition} syntax to learn more about shaping view
22
- * elements, attributes and listeners.
23
- *
24
- * ```ts
25
- * class SampleView extends View {
26
- * constructor( locale ) {
27
- * super( locale );
28
- *
29
- * const bind = this.bindTemplate;
30
- *
31
- * // Views define their interface (state) using observable attributes.
32
- * this.set( 'elementClass', 'bar' );
33
- *
34
- * this.setTemplate( {
35
- * tag: 'p',
36
- *
37
- * // The element of the view can be defined with its children.
38
- * children: [
39
- * 'Hello',
40
- * {
41
- * tag: 'b',
42
- * children: [ 'world!' ]
43
- * }
44
- * ],
45
- * attributes: {
46
- * class: [
47
- * 'foo',
48
- *
49
- * // Observable attributes control the state of the view in DOM.
50
- * bind.to( 'elementClass' )
51
- * ]
52
- * },
53
- * on: {
54
- * // Views listen to DOM events and propagate them.
55
- * click: bind.to( 'clicked' )
56
- * }
57
- * } );
58
- * }
59
- * }
60
- *
61
- * const view = new SampleView( locale );
62
- *
63
- * view.render();
64
- *
65
- * // Append <p class="foo bar">Hello<b>world</b></p> to the <body>
66
- * document.body.appendChild( view.element );
67
- *
68
- * // Change the class attribute to <p class="foo baz">Hello<b>world</b></p>
69
- * view.elementClass = 'baz';
70
- *
71
- * // Respond to the "click" event in DOM by executing a custom action.
72
- * view.on( 'clicked', () => {
73
- * console.log( 'The view has been clicked!' );
74
- * } );
75
- * ```
76
- */
77
- export class View extends /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ ObservableMixin()) {
78
- /**
79
- * An HTML element of the view. `null` until {@link #render rendered}
80
- * from the {@link #template}.
81
- *
82
- * ```ts
83
- * class SampleView extends View {
84
- * constructor() {
85
- * super();
86
- *
87
- * // A template instance the #element will be created from.
88
- * this.setTemplate( {
89
- * tag: 'p'
90
- *
91
- * // ...
92
- * } );
93
- * }
94
- * }
95
- *
96
- * const view = new SampleView();
97
- *
98
- * // Renders the #template.
99
- * view.render();
100
- *
101
- * // Append the HTML element of the view to <body>.
102
- * document.body.appendChild( view.element );
103
- * ```
104
- *
105
- * **Note**: The element of the view can also be assigned directly:
106
- *
107
- * ```ts
108
- * view.element = document.querySelector( '#my-container' );
109
- * ```
110
- */
111
- element;
112
- /**
113
- * Set `true` when the view has already been {@link module:ui/view~View#render rendered}.
114
- *
115
- * @readonly
116
- */
117
- isRendered;
118
- /**
119
- * A set of tools to localize the user interface.
120
- *
121
- * Also see {@link module:core/editor/editor~Editor#locale}.
122
- *
123
- * @readonly
124
- */
125
- locale;
126
- /**
127
- * Shorthand for {@link module:utils/locale~Locale#t}.
128
- *
129
- * Note: If {@link #locale} instance hasn't been passed to the view this method may not
130
- * be available.
131
- *
132
- * @see module:utils/locale~Locale#t
133
- */
134
- t;
135
- /**
136
- * Template of this view. It provides the {@link #element} representing
137
- * the view in DOM, which is {@link #render rendered}.
138
- */
139
- template;
140
- /**
141
- * Collections registered with {@link #createCollection}.
142
- */
143
- _viewCollections;
144
- /**
145
- * A collection of view instances, which have been added directly
146
- * into the {@link module:ui/template~Template#children}.
147
- */
148
- _unboundChildren;
149
- /**
150
- * Cached {@link module:ui/template~BindChain bind chain} object created by the
151
- * {@link #template}. See {@link #bindTemplate}.
152
- */
153
- _bindTemplate;
154
- /**
155
- * Creates an instance of the {@link module:ui/view~View} class.
156
- *
157
- * Also see {@link #render}.
158
- *
159
- * @param locale The localization services instance.
160
- */
161
- constructor(locale) {
162
- super();
163
- this.element = null;
164
- this.isRendered = false;
165
- this.locale = locale;
166
- this.t = locale && locale.t;
167
- this._viewCollections = new Collection();
168
- this._unboundChildren = this.createCollection();
169
- // Pass parent locale to its children.
170
- this._viewCollections.on('add', (evt, collection) => {
171
- collection.locale = locale;
172
- collection.t = locale && locale.t;
173
- });
174
- this.decorate('render');
175
- }
176
- /**
177
- * Shorthand for {@link module:ui/template~Template.bind}, a binding
178
- * {@link module:ui/template~BindChain interface} pre–configured for the view instance.
179
- *
180
- * It provides {@link module:ui/template~BindChain#to `to()`} and
181
- * {@link module:ui/template~BindChain#if `if()`} methods that initialize bindings with
182
- * observable attributes and attach DOM listeners.
183
- *
184
- * ```ts
185
- * class SampleView extends View {
186
- * constructor( locale ) {
187
- * super( locale );
188
- *
189
- * const bind = this.bindTemplate;
190
- *
191
- * // These {@link module:utils/observablemixin~Observable observable} attributes will control
192
- * // the state of the view in DOM.
193
- * this.set( {
194
- * elementClass: 'foo',
195
- * isEnabled: true
196
- * } );
197
- *
198
- * this.setTemplate( {
199
- * tag: 'p',
200
- *
201
- * attributes: {
202
- * // The class HTML attribute will follow elementClass
203
- * // and isEnabled view attributes.
204
- * class: [
205
- * bind.to( 'elementClass' )
206
- * bind.if( 'isEnabled', 'present-when-enabled' )
207
- * ]
208
- * },
209
- *
210
- * on: {
211
- * // The view will fire the "clicked" event upon clicking <p> in DOM.
212
- * click: bind.to( 'clicked' )
213
- * }
214
- * } );
215
- * }
216
- * }
217
- * ```
218
- */
219
- get bindTemplate() {
220
- if (this._bindTemplate) {
221
- return this._bindTemplate;
222
- }
223
- return (this._bindTemplate = Template.bind(this, this));
224
- }
225
- /**
226
- * Creates a new collection of views, which can be used as
227
- * {@link module:ui/template~Template#children} of this view.
228
- *
229
- * ```ts
230
- * class SampleView extends View {
231
- * constructor( locale ) {
232
- * super( locale );
233
- *
234
- * const child = new ChildView( locale );
235
- * this.items = this.createCollection( [ child ] );
236
- *
237
- * this.setTemplate( {
238
- * tag: 'p',
239
- *
240
- * // `items` collection will render here.
241
- * children: this.items
242
- * } );
243
- * }
244
- * }
245
- *
246
- * const view = new SampleView( locale );
247
- * view.render();
248
- *
249
- * // It will append <p><child#element></p> to the <body>.
250
- * document.body.appendChild( view.element );
251
- * ```
252
- *
253
- * @param views Initial views of the collection.
254
- * @returns A new collection of view instances.
255
- */
256
- createCollection(views) {
257
- const collection = new ViewCollection(views);
258
- this._viewCollections.add(collection);
259
- return collection;
260
- }
261
- /**
262
- * Registers a new child view under the view instance. Once registered, a child
263
- * view is managed by its parent, including {@link #render rendering}
264
- * and {@link #destroy destruction}.
265
- *
266
- * To revert this, use {@link #deregisterChild}.
267
- *
268
- * ```ts
269
- * class SampleView extends View {
270
- * constructor( locale ) {
271
- * super( locale );
272
- *
273
- * this.childA = new SomeChildView( locale );
274
- * this.childB = new SomeChildView( locale );
275
- *
276
- * this.setTemplate( { tag: 'p' } );
277
- *
278
- * // Register the children.
279
- * this.registerChild( [ this.childA, this.childB ] );
280
- * }
281
- *
282
- * render() {
283
- * super.render();
284
- *
285
- * this.element.appendChild( this.childA.element );
286
- * this.element.appendChild( this.childB.element );
287
- * }
288
- * }
289
- *
290
- * const view = new SampleView( locale );
291
- *
292
- * view.render();
293
- *
294
- * // Will append <p><childA#element><b></b><childB#element></p>.
295
- * document.body.appendChild( view.element );
296
- * ```
297
- *
298
- * **Note**: There's no need to add child views if they're already referenced in the
299
- * {@link #template}:
300
- *
301
- * ```ts
302
- * class SampleView extends View {
303
- * constructor( locale ) {
304
- * super( locale );
305
- *
306
- * this.childA = new SomeChildView( locale );
307
- * this.childB = new SomeChildView( locale );
308
- *
309
- * this.setTemplate( {
310
- * tag: 'p',
311
- *
312
- * // These children will be added automatically. There's no
313
- * // need to call {@link #registerChild} for any of them.
314
- * children: [ this.childA, this.childB ]
315
- * } );
316
- * }
317
- *
318
- * // ...
319
- * }
320
- * ```
321
- *
322
- * @param children Children views to be registered.
323
- */
324
- registerChild(children) {
325
- if (!isIterable(children)) {
326
- children = [children];
327
- }
328
- for (const child of children) {
329
- this._unboundChildren.add(child);
330
- }
331
- }
332
- /**
333
- * The opposite of {@link #registerChild}. Removes a child view from this view instance.
334
- * Once removed, the child is no longer managed by its parent, e.g. it can safely
335
- * become a child of another parent view.
336
- *
337
- * @see #registerChild
338
- * @param children Child views to be removed.
339
- */
340
- deregisterChild(children) {
341
- if (!isIterable(children)) {
342
- children = [children];
343
- }
344
- for (const child of children) {
345
- this._unboundChildren.remove(child);
346
- }
347
- }
348
- /**
349
- * Sets the {@link #template} of the view with with given definition.
350
- *
351
- * A shorthand for:
352
- *
353
- * ```ts
354
- * view.setTemplate( definition );
355
- * ```
356
- *
357
- * @param definition Definition of view's template.
358
- */
359
- setTemplate(definition) {
360
- this.template = new Template(definition);
361
- }
362
- /**
363
- * {@link module:ui/template~Template.extend Extends} the {@link #template} of the view with
364
- * with given definition.
365
- *
366
- * A shorthand for:
367
- *
368
- * ```ts
369
- * Template.extend( view.template, definition );
370
- * ```
371
- *
372
- * **Note**: Is requires the {@link #template} to be already set. See {@link #setTemplate}.
373
- *
374
- * @param definition Definition which extends the {@link #template}.
375
- */
376
- extendTemplate(definition) {
377
- Template.extend(this.template, definition);
378
- }
379
- /**
380
- * Recursively renders the view.
381
- *
382
- * Once the view is rendered:
383
- * * the {@link #element} becomes an HTML element out of {@link #template},
384
- * * the {@link #isRendered} flag is set `true`.
385
- *
386
- * **Note**: The children of the view:
387
- * * defined directly in the {@link #template}
388
- * * residing in collections created by the {@link #createCollection} method,
389
- * * and added by {@link #registerChild}
390
- * are also rendered in the process.
391
- *
392
- * In general, `render()` method is the right place to keep the code which refers to the
393
- * {@link #element} and should be executed at the very beginning of the view's life cycle.
394
- *
395
- * It is possible to {@link module:ui/template~Template.extend} the {@link #template} before
396
- * the view is rendered. To allow an early customization of the view (e.g. by its parent),
397
- * such references should be done in `render()`.
398
- *
399
- * ```ts
400
- * class SampleView extends View {
401
- * constructor() {
402
- * this.setTemplate( {
403
- * // ...
404
- * } );
405
- * },
406
- *
407
- * render() {
408
- * // View#element becomes available.
409
- * super.render();
410
- *
411
- * // The "scroll" listener depends on #element.
412
- * this.listenTo( window, 'scroll', () => {
413
- * // A reference to #element would render the #template and make it non-extendable.
414
- * if ( window.scrollY > 0 ) {
415
- * this.element.scrollLeft = 100;
416
- * } else {
417
- * this.element.scrollLeft = 0;
418
- * }
419
- * } );
420
- * }
421
- * }
422
- *
423
- * const view = new SampleView();
424
- *
425
- * // Let's customize the view before it gets rendered.
426
- * view.extendTemplate( {
427
- * attributes: {
428
- * class: [
429
- * 'additional-class'
430
- * ]
431
- * }
432
- * } );
433
- *
434
- * // Late rendering allows customization of the view.
435
- * view.render();
436
- * ```
437
- */
438
- render() {
439
- if (this.isRendered) {
440
- /**
441
- * This View has already been rendered.
442
- *
443
- * @error ui-view-render-already-rendered
444
- */
445
- throw new CKEditorError('ui-view-render-already-rendered', this);
446
- }
447
- // Render #element of the view.
448
- if (this.template) {
449
- this.element = this.template.render();
450
- // Auto–register view children from #template.
451
- this.registerChild(this.template.getViews());
452
- }
453
- this.isRendered = true;
454
- }
455
- /**
456
- * Recursively destroys the view instance and child views added by {@link #registerChild} and
457
- * residing in collections created by the {@link #createCollection}.
458
- *
459
- * Destruction disables all event listeners:
460
- * * created on the view, e.g. `view.on( 'event', () => {} )`,
461
- * * defined in the {@link #template} for DOM events.
462
- */
463
- destroy() {
464
- this.stopListening();
465
- this._viewCollections.map(c => c.destroy());
466
- // Template isn't obligatory for views.
467
- if (this.template && this.template._revertData) {
468
- this.template.revert(this.element);
469
- }
470
- }
471
- }
@@ -1,210 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module ui/viewcollection
7
- */
8
- import { CKEditorError, Collection } from '@ckeditor/ckeditor5-utils';
9
- /**
10
- * Collects {@link module:ui/view~View} instances.
11
- *
12
- * ```ts
13
- * const parentView = new ParentView( locale );
14
- * const collection = new ViewCollection( locale );
15
- *
16
- * collection.setParent( parentView.element );
17
- *
18
- * const viewA = new ChildView( locale );
19
- * const viewB = new ChildView( locale );
20
- * ```
21
- *
22
- * View collection renders and manages view {@link module:ui/view~View#element elements}:
23
- *
24
- * ```ts
25
- * collection.add( viewA );
26
- * collection.add( viewB );
27
- *
28
- * console.log( parentView.element.firsChild ); // -> viewA.element
29
- * console.log( parentView.element.lastChild ); // -> viewB.element
30
- * ```
31
- *
32
- * It {@link module:ui/viewcollection~ViewCollection#delegate propagates} DOM events too:
33
- *
34
- * ```ts
35
- * // Delegate #click and #keydown events from viewA and viewB to the parentView.
36
- * collection.delegate( 'click' ).to( parentView );
37
- *
38
- * parentView.on( 'click', ( evt ) => {
39
- * console.log( `${ evt.source } has been clicked.` );
40
- * } );
41
- *
42
- * // This event will be delegated to the parentView.
43
- * viewB.fire( 'click' );
44
- * ```
45
- *
46
- * **Note**: A view collection can be used directly in the {@link module:ui/template~TemplateDefinition definition}
47
- * of a {@link module:ui/template~Template template}.
48
- */
49
- export class ViewCollection extends Collection {
50
- /**
51
- * A parent element within which child views are rendered and managed in DOM.
52
- */
53
- _parentElement;
54
- /**
55
- * Creates a new instance of the {@link module:ui/viewcollection~ViewCollection}.
56
- *
57
- * @param initialItems The initial items of the collection.
58
- */
59
- constructor(initialItems = []) {
60
- super(initialItems, {
61
- // An #id Number attribute should be legal and not break the `ViewCollection` instance.
62
- // https://github.com/ckeditor/ckeditor5-ui/issues/93
63
- idProperty: 'viewUid'
64
- });
65
- // Handle {@link module:ui/view~View#element} in DOM when a new view is added to the collection.
66
- this.on('add', (evt, view, index) => {
67
- this._renderViewIntoCollectionParent(view, index);
68
- });
69
- // Handle {@link module:ui/view~View#element} in DOM when a view is removed from the collection.
70
- this.on('remove', (evt, view) => {
71
- if (view.element && this._parentElement) {
72
- view.element.remove();
73
- }
74
- });
75
- this._parentElement = null;
76
- }
77
- /**
78
- * Destroys the view collection along with child views.
79
- * See the view {@link module:ui/view~View#destroy} method.
80
- */
81
- destroy() {
82
- this.map(view => view.destroy());
83
- }
84
- /**
85
- * Sets the parent HTML element of this collection. When parent is set, {@link #add adding} and
86
- * {@link #remove removing} views in the collection synchronizes their
87
- * {@link module:ui/view~View#element elements} in the parent element.
88
- *
89
- * @param elementOrDocFragment A new parent element or document fragment.
90
- */
91
- setParent(elementOrDocFragment) {
92
- this._parentElement = elementOrDocFragment;
93
- // Take care of the initial collection items passed to the constructor.
94
- for (const view of this) {
95
- this._renderViewIntoCollectionParent(view);
96
- }
97
- }
98
- /**
99
- * Delegates selected events coming from within views in the collection to any
100
- * {@link module:utils/emittermixin~Emitter}.
101
- *
102
- * For the following views and collection:
103
- *
104
- * ```ts
105
- * const viewA = new View();
106
- * const viewB = new View();
107
- * const viewC = new View();
108
- *
109
- * const views = parentView.createCollection();
110
- *
111
- * views.delegate( 'eventX' ).to( viewB );
112
- * views.delegate( 'eventX', 'eventY' ).to( viewC );
113
- *
114
- * views.add( viewA );
115
- * ```
116
- *
117
- * the `eventX` is delegated (fired by) `viewB` and `viewC` along with `customData`:
118
- *
119
- * ```ts
120
- * viewA.fire( 'eventX', customData );
121
- * ```
122
- *
123
- * and `eventY` is delegated (fired by) `viewC` along with `customData`:
124
- *
125
- * ```ts
126
- * viewA.fire( 'eventY', customData );
127
- * ```
128
- *
129
- * See {@link module:utils/emittermixin~Emitter#delegate}.
130
- *
131
- * @param events {@link module:ui/view~View} event names to be delegated to another
132
- * {@link module:utils/emittermixin~Emitter}.
133
- * @returns Object with `to` property, a function which accepts the destination
134
- * of {@link module:utils/emittermixin~Emitter#delegate delegated} events.
135
- */
136
- delegate(...events) {
137
- if (!events.length || !isStringArray(events)) {
138
- /**
139
- * All event names must be strings.
140
- *
141
- * @error ui-viewcollection-delegate-wrong-events
142
- */
143
- throw new CKEditorError('ui-viewcollection-delegate-wrong-events', this);
144
- }
145
- return {
146
- to: dest => {
147
- // Activate delegating on existing views in this collection.
148
- for (const view of this) {
149
- for (const evtName of events) {
150
- view.delegate(evtName).to(dest);
151
- }
152
- }
153
- // Activate delegating on future views in this collection.
154
- this.on('add', (evt, view) => {
155
- for (const evtName of events) {
156
- view.delegate(evtName).to(dest);
157
- }
158
- });
159
- // Deactivate delegating when view is removed from this collection.
160
- this.on('remove', (evt, view) => {
161
- for (const evtName of events) {
162
- view.stopDelegating(evtName, dest);
163
- }
164
- });
165
- }
166
- };
167
- }
168
- /**
169
- * This method {@link module:ui/view~View#render renders} a new view added to the collection.
170
- *
171
- * If the {@link #_parentElement parent element} of the collection is set, this method also adds
172
- * the view's {@link module:ui/view~View#element} as a child of the parent in DOM at a specified index.
173
- *
174
- * **Note**: If index is not specified, the view's element is pushed as the last child
175
- * of the parent element.
176
- *
177
- * @param view A new view added to the collection.
178
- * @param index An index the view holds in the collection. When not specified,
179
- * the view is added at the end.
180
- */
181
- _renderViewIntoCollectionParent(view, index) {
182
- if (!view.isRendered) {
183
- view.render();
184
- }
185
- if (view.element && this._parentElement) {
186
- this._parentElement.insertBefore(view.element, this._parentElement.children[index]);
187
- }
188
- }
189
- /**
190
- * Removes a child view from the collection. If the {@link #setParent parent element} of the
191
- * collection has been set, the {@link module:ui/view~View#element element} of the view is also removed
192
- * in DOM, reflecting the order of the collection.
193
- *
194
- * See the {@link #add} method.
195
- *
196
- * @param subject The view to remove, its id or index in the collection.
197
- * @returns The removed view.
198
- */
199
- remove(subject) {
200
- return super.remove(subject);
201
- }
202
- }
203
- /**
204
- * Check if all entries of the array are of `String` type.
205
- *
206
- * @param arr An array to be checked.
207
- */
208
- function isStringArray(arr) {
209
- return arr.every(a => typeof a == 'string');
210
- }
@@ -1,14 +0,0 @@
1
- /*
2
- * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
-
6
- .ck.ck-aria-live-announcer {
7
- position: absolute;
8
- left: -10000px;
9
- top: -10000px;
10
- }
11
-
12
- .ck.ck-aria-live-region-list {
13
- list-style-type: none;
14
- }