@ckeditor/ckeditor5-ui 47.6.1-alpha.1 → 48.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 (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
@@ -1,616 +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/panel/balloon/contextualballoon
7
- */
8
- import { BalloonPanelView } from './balloonpanelview.js';
9
- import { View } from '../../view.js';
10
- import { ButtonView } from '../../button/buttonview.js';
11
- import { Plugin } from '@ckeditor/ckeditor5-core';
12
- import { CKEditorError, FocusTracker, Rect, toUnit } from '@ckeditor/ckeditor5-utils';
13
- import { IconNextArrow, IconPreviousArrow } from '@ckeditor/ckeditor5-icons';
14
- import '../../../theme/components/panel/balloonrotator.css';
15
- import '../../../theme/components/panel/fakepanel.css';
16
- const toPx = /* #__PURE__ */ toUnit('px');
17
- /**
18
- * Provides the common contextual balloon for the editor.
19
- *
20
- * The role of this plugin is to unify the contextual balloons logic, simplify views management and help
21
- * avoid the unnecessary complexity of handling multiple {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}
22
- * instances in the editor.
23
- *
24
- * This plugin allows for creating single or multiple panel stacks.
25
- *
26
- * Each stack may have multiple views, with the one on the top being visible. When the visible view is removed from the stack,
27
- * the previous view becomes visible.
28
- *
29
- * It might be useful to implement nested navigation in a balloon. For instance, a toolbar view may contain a link button.
30
- * When you click it, a link view (which lets you set the URL) is created and put on top of the toolbar view, so the link panel
31
- * is displayed. When you finish editing the link and close (remove) the link view, the toolbar view is visible again.
32
- *
33
- * However, there are cases when there are multiple independent balloons to be displayed, for instance, if the selection
34
- * is inside two inline comments at the same time. For such cases, you can create two independent panel stacks.
35
- * The contextual balloon plugin will create a navigation bar to let the users switch between these panel stacks using the "Next"
36
- * and "Previous" buttons.
37
- *
38
- * If there are no views in the current stack, the balloon panel will try to switch to the next stack. If there are no
39
- * panels in any stack, the balloon panel will be hidden.
40
- *
41
- * **Note**: To force the balloon panel to show only one view, even if there are other stacks, use the `singleViewMode=true` option
42
- * when {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon#add adding} a view to a panel.
43
- *
44
- * From the implementation point of view, the contextual ballon plugin is reusing a single
45
- * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} instance to display multiple contextual balloon
46
- * panels in the editor. It also creates a special {@link module:ui/panel/balloon/contextualballoon~RotatorView rotator view},
47
- * used to manage multiple panel stacks. Rotator view is a child of the balloon panel view and the parent of the specific
48
- * view you want to display. If there is more than one panel stack to be displayed, the rotator view will add a
49
- * navigation bar. If there is only one stack, the rotator view is transparent (it does not add any UI elements).
50
- */
51
- export class ContextualBalloon extends Plugin {
52
- /**
53
- * The {@link module:utils/dom/position~DomOptimalPositionOptions#limiter position limiter}
54
- * for the {@link #view balloon}, used when no `limiter` has been passed into {@link #add}
55
- * or {@link #updatePosition}.
56
- *
57
- * By default, a function that obtains the farthest DOM
58
- * {@link module:engine/view/rooteditableelement~ViewRootEditableElement}
59
- * of the {@link module:engine/view/document~ViewDocument#selection}.
60
- */
61
- positionLimiter;
62
- visibleStack;
63
- /**
64
- * The map of views and their stacks.
65
- */
66
- _viewToStack = new Map();
67
- /**
68
- * The map of IDs and stacks.
69
- */
70
- _idToStack = new Map();
71
- /**
72
- * The common balloon panel view.
73
- */
74
- _view = null;
75
- /**
76
- * Rotator view embedded in the contextual balloon.
77
- * Displays the currently visible view in the balloon and provides navigation for switching stacks.
78
- */
79
- _rotatorView = null;
80
- /**
81
- * Displays fake panels under the balloon panel view when multiple stacks are added to the balloon.
82
- */
83
- _fakePanelsView = null;
84
- /**
85
- * @inheritDoc
86
- */
87
- static get pluginName() {
88
- return 'ContextualBalloon';
89
- }
90
- /**
91
- * @inheritDoc
92
- */
93
- static get isOfficialPlugin() {
94
- return true;
95
- }
96
- /**
97
- * @inheritDoc
98
- */
99
- constructor(editor) {
100
- super(editor);
101
- this.positionLimiter = () => {
102
- const view = this.editor.editing.view;
103
- const viewDocument = view.document;
104
- const editableElement = viewDocument.selection.editableElement;
105
- if (editableElement) {
106
- return view.domConverter.mapViewToDom(editableElement.root);
107
- }
108
- return null;
109
- };
110
- this.decorate('getPositionOptions');
111
- this.set('visibleView', null);
112
- this.set('_numberOfStacks', 0);
113
- this.set('_singleViewMode', false);
114
- }
115
- /**
116
- * @inheritDoc
117
- */
118
- destroy() {
119
- super.destroy();
120
- if (this._view) {
121
- this._view.destroy();
122
- }
123
- if (this._rotatorView) {
124
- this._rotatorView.destroy();
125
- }
126
- if (this._fakePanelsView) {
127
- this._fakePanelsView.destroy();
128
- }
129
- }
130
- /**
131
- * The common balloon panel view.
132
- */
133
- get view() {
134
- if (!this._view) {
135
- this._createPanelView();
136
- }
137
- return this._view;
138
- }
139
- /**
140
- * Returns `true` when the given view is in one of the stacks. Otherwise returns `false`.
141
- */
142
- hasView(view) {
143
- return Array.from(this._viewToStack.keys()).includes(view);
144
- }
145
- /**
146
- * Adds a new view to the stack and makes it visible if the current stack is visible
147
- * or it is the first view in the balloon.
148
- *
149
- * @param data The configuration of the view.
150
- * @param data.stackId The ID of the stack that the view is added to. Defaults to `'main'`.
151
- * @param data.view The content of the balloon.
152
- * @param data.position Positioning options.
153
- * @param data.balloonClassName An additional CSS class added to the {@link #view balloon} when visible.
154
- * @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow. Defaults to `true`.
155
- * @param data.singleViewMode Whether the view should be the only visible view even if other stacks were added. Defaults to `false`.
156
- */
157
- add(data) {
158
- if (!this._view) {
159
- this._createPanelView();
160
- }
161
- if (this.hasView(data.view)) {
162
- /**
163
- * Trying to add configuration of the same view more than once.
164
- *
165
- * @error contextualballoon-add-view-exist
166
- */
167
- throw new CKEditorError('contextualballoon-add-view-exist', [this, data]);
168
- }
169
- const stackId = data.stackId || 'main';
170
- // If new stack is added, creates it and show view from this stack.
171
- if (!this._idToStack.has(stackId)) {
172
- this._idToStack.set(stackId, new Map([[data.view, data]]));
173
- this._viewToStack.set(data.view, this._idToStack.get(stackId));
174
- this._numberOfStacks = this._idToStack.size;
175
- if (!this._visibleStack || data.singleViewMode) {
176
- this.showStack(stackId);
177
- }
178
- return;
179
- }
180
- const stack = this._idToStack.get(stackId);
181
- if (data.singleViewMode) {
182
- this.showStack(stackId);
183
- }
184
- // Add new view to the stack.
185
- stack.set(data.view, data);
186
- this._viewToStack.set(data.view, stack);
187
- // And display it if is added to the currently visible stack.
188
- if (stack === this._visibleStack) {
189
- this._showView(data);
190
- }
191
- }
192
- /**
193
- * Removes the given view from the stack. If the removed view was visible,
194
- * the view preceding it in the stack will become visible instead.
195
- * When there is no view in the stack, the next stack will be displayed.
196
- * When there are no more stacks, the balloon will hide.
197
- *
198
- * @param view A view to be removed from the balloon.
199
- */
200
- remove(view) {
201
- if (!this.hasView(view)) {
202
- /**
203
- * Trying to remove the configuration of the view not defined in the stack.
204
- *
205
- * @error contextualballoon-remove-view-not-exist
206
- */
207
- throw new CKEditorError('contextualballoon-remove-view-not-exist', [this, view]);
208
- }
209
- const stack = this._viewToStack.get(view);
210
- if (this._singleViewMode && this.visibleView === view) {
211
- this._singleViewMode = false;
212
- }
213
- // When visible view will be removed we need to show a preceding view or next stack
214
- // if a view is the only view in the stack.
215
- if (this.visibleView === view) {
216
- if (stack.size === 1) {
217
- if (this._idToStack.size > 1) {
218
- this._showNextStack();
219
- }
220
- else {
221
- this.view.hide();
222
- this.visibleView = null;
223
- this._rotatorView.hideView();
224
- }
225
- }
226
- else {
227
- this._showView(Array.from(stack.values())[stack.size - 2]);
228
- }
229
- }
230
- if (stack.size === 1) {
231
- this._idToStack.delete(this._getStackId(stack));
232
- this._numberOfStacks = this._idToStack.size;
233
- }
234
- else {
235
- stack.delete(view);
236
- }
237
- this._viewToStack.delete(view);
238
- }
239
- /**
240
- * Updates the position of the balloon using the position data of the first visible view in the stack.
241
- * When new position data is given, the position data of the currently visible view will be updated.
242
- *
243
- * @param position Position options.
244
- */
245
- updatePosition(position) {
246
- if (position) {
247
- this._visibleStack.get(this.visibleView).position = position;
248
- }
249
- this.view.pin(this.getPositionOptions());
250
- this._fakePanelsView.updatePosition();
251
- }
252
- /**
253
- * Returns position options of the last view in the stack.
254
- * This keeps the balloon in the same position when the view is changed.
255
- */
256
- getPositionOptions() {
257
- let position = Array.from(this._visibleStack.values()).pop().position;
258
- if (position) {
259
- // Use the default limiter if none has been specified.
260
- if (!position.limiter) {
261
- // Don't modify the original options object.
262
- position = Object.assign({}, position, {
263
- limiter: this.positionLimiter
264
- });
265
- }
266
- // Don't modify the original options object.
267
- position = Object.assign({}, position, {
268
- viewportOffsetConfig: {
269
- ...this.editor.ui.viewportOffset,
270
- top: this.editor.ui.viewportOffset.visualTop
271
- }
272
- });
273
- }
274
- return position;
275
- }
276
- /**
277
- * Shows the last view from the stack of a given ID.
278
- */
279
- showStack(id) {
280
- this.visibleStack = id;
281
- const stack = this._idToStack.get(id);
282
- if (!stack) {
283
- /**
284
- * Trying to show a stack that does not exist.
285
- *
286
- * @error contextualballoon-showstack-stack-not-exist
287
- */
288
- throw new CKEditorError('contextualballoon-showstack-stack-not-exist', this);
289
- }
290
- if (this._visibleStack === stack) {
291
- return;
292
- }
293
- this._showView(Array.from(stack.values()).pop());
294
- }
295
- /**
296
- * Initializes view instances.
297
- */
298
- _createPanelView() {
299
- this._view = new BalloonPanelView(this.editor.locale);
300
- this.editor.ui.view.body.add(this._view);
301
- this._rotatorView = this._createRotatorView();
302
- this._fakePanelsView = this._createFakePanelsView();
303
- }
304
- /**
305
- * Returns the stack of the currently visible view.
306
- */
307
- get _visibleStack() {
308
- return this._viewToStack.get(this.visibleView);
309
- }
310
- /**
311
- * Returns the ID of the given stack.
312
- */
313
- _getStackId(stack) {
314
- const entry = Array.from(this._idToStack.entries()).find(entry => entry[1] === stack);
315
- return entry[0];
316
- }
317
- /**
318
- * Shows the last view from the next stack.
319
- */
320
- _showNextStack() {
321
- const stacks = Array.from(this._idToStack.values());
322
- let nextIndex = stacks.indexOf(this._visibleStack) + 1;
323
- if (!stacks[nextIndex]) {
324
- nextIndex = 0;
325
- }
326
- this.showStack(this._getStackId(stacks[nextIndex]));
327
- }
328
- /**
329
- * Shows the last view from the previous stack.
330
- */
331
- _showPrevStack() {
332
- const stacks = Array.from(this._idToStack.values());
333
- let nextIndex = stacks.indexOf(this._visibleStack) - 1;
334
- if (!stacks[nextIndex]) {
335
- nextIndex = stacks.length - 1;
336
- }
337
- this.showStack(this._getStackId(stacks[nextIndex]));
338
- }
339
- /**
340
- * Creates a rotator view.
341
- */
342
- _createRotatorView() {
343
- const view = new RotatorView(this.editor.locale);
344
- const t = this.editor.locale.t;
345
- this.view.content.add(view);
346
- // Hide navigation when there is only a one stack & not in single view mode.
347
- view.bind('isNavigationVisible').to(this, '_numberOfStacks', this, '_singleViewMode', (value, isSingleViewMode) => {
348
- return !isSingleViewMode && value > 1;
349
- });
350
- // Update balloon position after toggling navigation.
351
- view.on('change:isNavigationVisible', () => (this.updatePosition()), { priority: 'low' });
352
- // Update stacks counter value.
353
- view.bind('counter').to(this, 'visibleView', this, '_numberOfStacks', (visibleView, numberOfStacks) => {
354
- if (numberOfStacks < 2) {
355
- return '';
356
- }
357
- const current = Array.from(this._idToStack.values()).indexOf(this._visibleStack) + 1;
358
- return t('%0 of %1', [current, numberOfStacks]);
359
- });
360
- view.buttonNextView.on('execute', () => {
361
- // When current view has a focus then move focus to the editable before removing it,
362
- // otherwise editor will lost focus.
363
- if (view.focusTracker.isFocused) {
364
- this.editor.editing.view.focus();
365
- }
366
- this._showNextStack();
367
- });
368
- view.buttonPrevView.on('execute', () => {
369
- // When current view has a focus then move focus to the editable before removing it,
370
- // otherwise editor will lost focus.
371
- if (view.focusTracker.isFocused) {
372
- this.editor.editing.view.focus();
373
- }
374
- this._showPrevStack();
375
- });
376
- return view;
377
- }
378
- /**
379
- * Creates a fake panels view.
380
- */
381
- _createFakePanelsView() {
382
- const view = new FakePanelsView(this.editor.locale, this.view);
383
- view.bind('numberOfPanels').to(this, '_numberOfStacks', this, '_singleViewMode', (number, isSingleViewMode) => {
384
- const showPanels = !isSingleViewMode && number >= 2;
385
- return showPanels ? Math.min(number - 1, 2) : 0;
386
- });
387
- view.listenTo(this.view, 'change:top', () => view.updatePosition());
388
- view.listenTo(this.view, 'change:left', () => view.updatePosition());
389
- this.editor.ui.view.body.add(view);
390
- return view;
391
- }
392
- /**
393
- * Sets the view as the content of the balloon and attaches the balloon using position
394
- * options of the first view.
395
- *
396
- * @param data Configuration.
397
- * @param data.view The view to show in the balloon.
398
- * @param data.balloonClassName Additional class name which will be added to the {@link #view balloon}.
399
- * @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow.
400
- */
401
- _showView({ view, balloonClassName = '', withArrow = true, singleViewMode = false }) {
402
- this.view.class = balloonClassName;
403
- this.view.withArrow = withArrow;
404
- this._rotatorView.showView(view);
405
- this.visibleView = view;
406
- this.view.pin(this.getPositionOptions());
407
- this._fakePanelsView.updatePosition();
408
- if (singleViewMode) {
409
- this._singleViewMode = true;
410
- }
411
- }
412
- }
413
- /**
414
- * Rotator view is a helper class for the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon}.
415
- * It is used for displaying the last view from the current stack and providing navigation buttons for switching stacks.
416
- * See the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon} documentation to learn more.
417
- * @internal
418
- */
419
- export class RotatorView extends View {
420
- /**
421
- * Used for checking if a view is focused or not.
422
- */
423
- focusTracker;
424
- /**
425
- * Navigation button for switching the stack to the previous one.
426
- */
427
- buttonPrevView;
428
- /**
429
- * Navigation button for switching the stack to the next one.
430
- */
431
- buttonNextView;
432
- /**
433
- * A collection of the child views that creates the rotator content.
434
- */
435
- content;
436
- /**
437
- * @inheritDoc
438
- */
439
- constructor(locale) {
440
- super(locale);
441
- const t = locale.t;
442
- const bind = this.bindTemplate;
443
- this.set('isNavigationVisible', true);
444
- this.focusTracker = new FocusTracker();
445
- this.buttonPrevView = this._createButtonView(t('Previous'), IconPreviousArrow);
446
- this.buttonNextView = this._createButtonView(t('Next'), IconNextArrow);
447
- this.content = this.createCollection();
448
- this.setTemplate({
449
- tag: 'div',
450
- attributes: {
451
- class: [
452
- 'ck',
453
- 'ck-balloon-rotator'
454
- ],
455
- 'z-index': '-1'
456
- },
457
- children: [
458
- {
459
- tag: 'div',
460
- attributes: {
461
- class: [
462
- 'ck-balloon-rotator__navigation',
463
- bind.to('isNavigationVisible', value => value ? '' : 'ck-hidden')
464
- ]
465
- },
466
- children: [
467
- this.buttonPrevView,
468
- {
469
- tag: 'span',
470
- attributes: {
471
- class: [
472
- 'ck-balloon-rotator__counter'
473
- ]
474
- },
475
- children: [
476
- {
477
- text: bind.to('counter')
478
- }
479
- ]
480
- },
481
- this.buttonNextView
482
- ]
483
- },
484
- {
485
- tag: 'div',
486
- attributes: {
487
- class: 'ck-balloon-rotator__content'
488
- },
489
- children: this.content
490
- }
491
- ]
492
- });
493
- }
494
- /**
495
- * @inheritDoc
496
- */
497
- render() {
498
- super.render();
499
- this.focusTracker.add(this.element);
500
- }
501
- /**
502
- * @inheritDoc
503
- */
504
- destroy() {
505
- super.destroy();
506
- this.focusTracker.destroy();
507
- }
508
- /**
509
- * Shows a given view.
510
- *
511
- * @param view The view to show.
512
- */
513
- showView(view) {
514
- this.hideView();
515
- this.content.add(view);
516
- }
517
- /**
518
- * Hides the currently displayed view.
519
- */
520
- hideView() {
521
- this.content.clear();
522
- }
523
- /**
524
- * Creates a navigation button view.
525
- *
526
- * @param label The button label.
527
- * @param icon The button icon.
528
- */
529
- _createButtonView(label, icon) {
530
- const view = new ButtonView(this.locale);
531
- view.set({
532
- label,
533
- icon,
534
- tooltip: true
535
- });
536
- return view;
537
- }
538
- }
539
- /**
540
- * Displays additional layers under the balloon when multiple stacks are added to the balloon.
541
- */
542
- class FakePanelsView extends View {
543
- /**
544
- * Collection of the child views which creates fake panel content.
545
- */
546
- content;
547
- /**
548
- * Context.
549
- */
550
- _balloonPanelView;
551
- /**
552
- * @inheritDoc
553
- */
554
- constructor(locale, balloonPanelView) {
555
- super(locale);
556
- const bind = this.bindTemplate;
557
- this.set('top', 0);
558
- this.set('left', 0);
559
- this.set('height', 0);
560
- this.set('width', 0);
561
- this.set('numberOfPanels', 0);
562
- this.content = this.createCollection();
563
- this._balloonPanelView = balloonPanelView;
564
- this.setTemplate({
565
- tag: 'div',
566
- attributes: {
567
- class: [
568
- 'ck-fake-panel',
569
- bind.to('numberOfPanels', number => number ? '' : 'ck-hidden')
570
- ],
571
- style: {
572
- top: bind.to('top', toPx),
573
- left: bind.to('left', toPx),
574
- width: bind.to('width', toPx),
575
- height: bind.to('height', toPx)
576
- }
577
- },
578
- children: this.content
579
- });
580
- this.on('change:numberOfPanels', (evt, name, next, prev) => {
581
- if (next > prev) {
582
- this._addPanels(next - prev);
583
- }
584
- else {
585
- this._removePanels(prev - next);
586
- }
587
- this.updatePosition();
588
- });
589
- }
590
- _addPanels(number) {
591
- while (number--) {
592
- const view = new View();
593
- view.setTemplate({ tag: 'div' });
594
- this.content.add(view);
595
- this.registerChild(view);
596
- }
597
- }
598
- _removePanels(number) {
599
- while (number--) {
600
- const view = this.content.last;
601
- this.content.remove(view);
602
- this.deregisterChild(view);
603
- view.destroy();
604
- }
605
- }
606
- /**
607
- * Updates coordinates of fake panels.
608
- */
609
- updatePosition() {
610
- if (this.numberOfPanels) {
611
- const { top, left } = this._balloonPanelView;
612
- const { width, height } = new Rect(this._balloonPanelView.element);
613
- Object.assign(this, { top, left, width, height });
614
- }
615
- }
616
- }