@ckeditor/ckeditor5-table 41.3.0-alpha.3 → 41.3.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 (324) hide show
  1. package/build/table.js +2 -2
  2. package/build/translations/ar.js +1 -1
  3. package/build/translations/az.js +1 -1
  4. package/build/translations/bg.js +1 -1
  5. package/build/translations/bn.js +1 -1
  6. package/build/translations/ca.js +1 -1
  7. package/build/translations/cs.js +1 -1
  8. package/build/translations/da.js +1 -1
  9. package/build/translations/de-ch.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/en-gb.js +1 -1
  14. package/build/translations/es.js +1 -1
  15. package/build/translations/et.js +1 -1
  16. package/build/translations/fa.js +1 -1
  17. package/build/translations/fi.js +1 -1
  18. package/build/translations/fr.js +1 -1
  19. package/build/translations/gl.js +1 -1
  20. package/build/translations/he.js +1 -1
  21. package/build/translations/hi.js +1 -1
  22. package/build/translations/hr.js +1 -1
  23. package/build/translations/hu.js +1 -1
  24. package/build/translations/hy.js +1 -1
  25. package/build/translations/id.js +1 -1
  26. package/build/translations/it.js +1 -1
  27. package/build/translations/ja.js +1 -1
  28. package/build/translations/ko.js +1 -1
  29. package/build/translations/ku.js +1 -1
  30. package/build/translations/lt.js +1 -1
  31. package/build/translations/lv.js +1 -1
  32. package/build/translations/ms.js +1 -1
  33. package/build/translations/nb.js +1 -1
  34. package/build/translations/ne.js +1 -1
  35. package/build/translations/nl.js +1 -1
  36. package/build/translations/no.js +1 -1
  37. package/build/translations/pl.js +1 -1
  38. package/build/translations/pt-br.js +1 -1
  39. package/build/translations/pt.js +1 -1
  40. package/build/translations/ro.js +1 -1
  41. package/build/translations/ru.js +1 -1
  42. package/build/translations/sk.js +1 -1
  43. package/build/translations/sl.js +1 -1
  44. package/build/translations/sq.js +1 -1
  45. package/build/translations/sr-latn.js +1 -1
  46. package/build/translations/sr.js +1 -1
  47. package/build/translations/sv.js +1 -1
  48. package/build/translations/th.js +1 -1
  49. package/build/translations/tk.js +1 -1
  50. package/build/translations/tr.js +1 -1
  51. package/build/translations/tt.js +1 -1
  52. package/build/translations/ug.js +1 -1
  53. package/build/translations/uk.js +1 -1
  54. package/build/translations/ur.js +1 -1
  55. package/build/translations/uz.js +1 -1
  56. package/build/translations/vi.js +1 -1
  57. package/build/translations/zh-cn.js +1 -1
  58. package/build/translations/zh.js +1 -1
  59. package/lang/contexts.json +2 -1
  60. package/lang/translations/ar.po +4 -0
  61. package/lang/translations/az.po +4 -0
  62. package/lang/translations/bg.po +4 -0
  63. package/lang/translations/bn.po +4 -0
  64. package/lang/translations/ca.po +4 -0
  65. package/lang/translations/cs.po +4 -0
  66. package/lang/translations/da.po +4 -0
  67. package/lang/translations/de-ch.po +4 -0
  68. package/lang/translations/de.po +4 -0
  69. package/lang/translations/el.po +4 -0
  70. package/lang/translations/en-au.po +4 -0
  71. package/lang/translations/en-gb.po +4 -0
  72. package/lang/translations/en.po +4 -0
  73. package/lang/translations/es.po +4 -0
  74. package/lang/translations/et.po +4 -0
  75. package/lang/translations/fa.po +4 -0
  76. package/lang/translations/fi.po +4 -0
  77. package/lang/translations/fr.po +4 -0
  78. package/lang/translations/gl.po +4 -0
  79. package/lang/translations/he.po +4 -0
  80. package/lang/translations/hi.po +4 -0
  81. package/lang/translations/hr.po +4 -0
  82. package/lang/translations/hu.po +4 -0
  83. package/lang/translations/hy.po +4 -0
  84. package/lang/translations/id.po +4 -0
  85. package/lang/translations/it.po +4 -0
  86. package/lang/translations/ja.po +4 -0
  87. package/lang/translations/ko.po +4 -0
  88. package/lang/translations/ku.po +4 -0
  89. package/lang/translations/lt.po +4 -0
  90. package/lang/translations/lv.po +4 -0
  91. package/lang/translations/ms.po +4 -0
  92. package/lang/translations/nb.po +4 -0
  93. package/lang/translations/ne.po +4 -0
  94. package/lang/translations/nl.po +4 -0
  95. package/lang/translations/no.po +4 -0
  96. package/lang/translations/pl.po +4 -0
  97. package/lang/translations/pt-br.po +4 -0
  98. package/lang/translations/pt.po +4 -0
  99. package/lang/translations/ro.po +4 -0
  100. package/lang/translations/ru.po +4 -0
  101. package/lang/translations/sk.po +4 -0
  102. package/lang/translations/sl.po +4 -0
  103. package/lang/translations/sq.po +4 -0
  104. package/lang/translations/sr-latn.po +4 -0
  105. package/lang/translations/sr.po +4 -0
  106. package/lang/translations/sv.po +4 -0
  107. package/lang/translations/th.po +4 -0
  108. package/lang/translations/tk.po +4 -0
  109. package/lang/translations/tr.po +4 -0
  110. package/lang/translations/tt.po +4 -0
  111. package/lang/translations/ug.po +4 -0
  112. package/lang/translations/uk.po +4 -0
  113. package/lang/translations/ur.po +4 -0
  114. package/lang/translations/uz.po +4 -0
  115. package/lang/translations/vi.po +4 -0
  116. package/lang/translations/zh-cn.po +4 -0
  117. package/lang/translations/zh.po +4 -0
  118. package/package.json +2 -3
  119. package/src/tableui.d.ts +1 -0
  120. package/src/tableui.js +24 -1
  121. package/src/ui/inserttableview.d.ts +4 -0
  122. package/src/ui/inserttableview.js +9 -0
  123. package/dist/content-index.css +0 -55
  124. package/dist/editor-index.css +0 -150
  125. package/dist/index.css +0 -362
  126. package/dist/index.css.map +0 -1
  127. package/dist/translations/ar.d.ts +0 -8
  128. package/dist/translations/ar.js +0 -5
  129. package/dist/translations/az.d.ts +0 -8
  130. package/dist/translations/az.js +0 -5
  131. package/dist/translations/bg.d.ts +0 -8
  132. package/dist/translations/bg.js +0 -5
  133. package/dist/translations/bn.d.ts +0 -8
  134. package/dist/translations/bn.js +0 -5
  135. package/dist/translations/ca.d.ts +0 -8
  136. package/dist/translations/ca.js +0 -5
  137. package/dist/translations/cs.d.ts +0 -8
  138. package/dist/translations/cs.js +0 -5
  139. package/dist/translations/da.d.ts +0 -8
  140. package/dist/translations/da.js +0 -5
  141. package/dist/translations/de-ch.d.ts +0 -8
  142. package/dist/translations/de-ch.js +0 -5
  143. package/dist/translations/de.d.ts +0 -8
  144. package/dist/translations/de.js +0 -5
  145. package/dist/translations/el.d.ts +0 -8
  146. package/dist/translations/el.js +0 -5
  147. package/dist/translations/en-au.d.ts +0 -8
  148. package/dist/translations/en-au.js +0 -5
  149. package/dist/translations/en-gb.d.ts +0 -8
  150. package/dist/translations/en-gb.js +0 -5
  151. package/dist/translations/en.d.ts +0 -8
  152. package/dist/translations/en.js +0 -5
  153. package/dist/translations/es.d.ts +0 -8
  154. package/dist/translations/es.js +0 -5
  155. package/dist/translations/et.d.ts +0 -8
  156. package/dist/translations/et.js +0 -5
  157. package/dist/translations/fa.d.ts +0 -8
  158. package/dist/translations/fa.js +0 -5
  159. package/dist/translations/fi.d.ts +0 -8
  160. package/dist/translations/fi.js +0 -5
  161. package/dist/translations/fr.d.ts +0 -8
  162. package/dist/translations/fr.js +0 -5
  163. package/dist/translations/gl.d.ts +0 -8
  164. package/dist/translations/gl.js +0 -5
  165. package/dist/translations/he.d.ts +0 -8
  166. package/dist/translations/he.js +0 -5
  167. package/dist/translations/hi.d.ts +0 -8
  168. package/dist/translations/hi.js +0 -5
  169. package/dist/translations/hr.d.ts +0 -8
  170. package/dist/translations/hr.js +0 -5
  171. package/dist/translations/hu.d.ts +0 -8
  172. package/dist/translations/hu.js +0 -5
  173. package/dist/translations/hy.d.ts +0 -8
  174. package/dist/translations/hy.js +0 -5
  175. package/dist/translations/id.d.ts +0 -8
  176. package/dist/translations/id.js +0 -5
  177. package/dist/translations/it.d.ts +0 -8
  178. package/dist/translations/it.js +0 -5
  179. package/dist/translations/ja.d.ts +0 -8
  180. package/dist/translations/ja.js +0 -5
  181. package/dist/translations/ko.d.ts +0 -8
  182. package/dist/translations/ko.js +0 -5
  183. package/dist/translations/ku.d.ts +0 -8
  184. package/dist/translations/ku.js +0 -5
  185. package/dist/translations/lt.d.ts +0 -8
  186. package/dist/translations/lt.js +0 -5
  187. package/dist/translations/lv.d.ts +0 -8
  188. package/dist/translations/lv.js +0 -5
  189. package/dist/translations/ms.d.ts +0 -8
  190. package/dist/translations/ms.js +0 -5
  191. package/dist/translations/nb.d.ts +0 -8
  192. package/dist/translations/nb.js +0 -5
  193. package/dist/translations/ne.d.ts +0 -8
  194. package/dist/translations/ne.js +0 -5
  195. package/dist/translations/nl.d.ts +0 -8
  196. package/dist/translations/nl.js +0 -5
  197. package/dist/translations/no.d.ts +0 -8
  198. package/dist/translations/no.js +0 -5
  199. package/dist/translations/pl.d.ts +0 -8
  200. package/dist/translations/pl.js +0 -5
  201. package/dist/translations/pt-br.d.ts +0 -8
  202. package/dist/translations/pt-br.js +0 -5
  203. package/dist/translations/pt.d.ts +0 -8
  204. package/dist/translations/pt.js +0 -5
  205. package/dist/translations/ro.d.ts +0 -8
  206. package/dist/translations/ro.js +0 -5
  207. package/dist/translations/ru.d.ts +0 -8
  208. package/dist/translations/ru.js +0 -5
  209. package/dist/translations/sk.d.ts +0 -8
  210. package/dist/translations/sk.js +0 -5
  211. package/dist/translations/sl.d.ts +0 -8
  212. package/dist/translations/sl.js +0 -5
  213. package/dist/translations/sq.d.ts +0 -8
  214. package/dist/translations/sq.js +0 -5
  215. package/dist/translations/sr-latn.d.ts +0 -8
  216. package/dist/translations/sr-latn.js +0 -5
  217. package/dist/translations/sr.d.ts +0 -8
  218. package/dist/translations/sr.js +0 -5
  219. package/dist/translations/sv.d.ts +0 -8
  220. package/dist/translations/sv.js +0 -5
  221. package/dist/translations/th.d.ts +0 -8
  222. package/dist/translations/th.js +0 -5
  223. package/dist/translations/tk.d.ts +0 -8
  224. package/dist/translations/tk.js +0 -5
  225. package/dist/translations/tr.d.ts +0 -8
  226. package/dist/translations/tr.js +0 -5
  227. package/dist/translations/tt.d.ts +0 -8
  228. package/dist/translations/tt.js +0 -5
  229. package/dist/translations/ug.d.ts +0 -8
  230. package/dist/translations/ug.js +0 -5
  231. package/dist/translations/uk.d.ts +0 -8
  232. package/dist/translations/uk.js +0 -5
  233. package/dist/translations/ur.d.ts +0 -8
  234. package/dist/translations/ur.js +0 -5
  235. package/dist/translations/uz.d.ts +0 -8
  236. package/dist/translations/uz.js +0 -5
  237. package/dist/translations/vi.d.ts +0 -8
  238. package/dist/translations/vi.js +0 -5
  239. package/dist/translations/zh-cn.d.ts +0 -8
  240. package/dist/translations/zh-cn.js +0 -5
  241. package/dist/translations/zh.d.ts +0 -8
  242. package/dist/translations/zh.js +0 -5
  243. package/dist/types/augmentation.d.ts +0 -80
  244. package/dist/types/commands/insertcolumncommand.d.ts +0 -59
  245. package/dist/types/commands/insertrowcommand.d.ts +0 -58
  246. package/dist/types/commands/inserttablecommand.d.ts +0 -48
  247. package/dist/types/commands/mergecellcommand.d.ts +0 -72
  248. package/dist/types/commands/mergecellscommand.d.ts +0 -32
  249. package/dist/types/commands/removecolumncommand.d.ts +0 -33
  250. package/dist/types/commands/removerowcommand.d.ts +0 -33
  251. package/dist/types/commands/selectcolumncommand.d.ts +0 -37
  252. package/dist/types/commands/selectrowcommand.d.ts +0 -37
  253. package/dist/types/commands/setheadercolumncommand.d.ts +0 -54
  254. package/dist/types/commands/setheaderrowcommand.d.ts +0 -57
  255. package/dist/types/commands/splitcellcommand.d.ts +0 -47
  256. package/dist/types/converters/downcast.d.ts +0 -67
  257. package/dist/types/converters/table-caption-post-fixer.d.ts +0 -24
  258. package/dist/types/converters/table-cell-paragraph-post-fixer.d.ts +0 -36
  259. package/dist/types/converters/table-cell-refresh-handler.d.ts +0 -22
  260. package/dist/types/converters/table-headings-refresh-handler.d.ts +0 -21
  261. package/dist/types/converters/table-layout-post-fixer.d.ts +0 -230
  262. package/dist/types/converters/tableproperties.d.ts +0 -58
  263. package/dist/types/converters/upcasttable.d.ts +0 -53
  264. package/dist/types/index.d.ts +0 -64
  265. package/dist/types/plaintableoutput.d.ts +0 -30
  266. package/dist/types/table.d.ts +0 -44
  267. package/dist/types/tablecaption/tablecaptionediting.d.ts +0 -67
  268. package/dist/types/tablecaption/tablecaptionui.d.ts +0 -25
  269. package/dist/types/tablecaption/toggletablecaptioncommand.d.ts +0 -72
  270. package/dist/types/tablecaption/utils.d.ts +0 -42
  271. package/dist/types/tablecaption.d.ts +0 -28
  272. package/dist/types/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +0 -36
  273. package/dist/types/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +0 -41
  274. package/dist/types/tablecellproperties/commands/tablecellborderstylecommand.d.ts +0 -41
  275. package/dist/types/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +0 -55
  276. package/dist/types/tablecellproperties/commands/tablecellheightcommand.d.ts +0 -50
  277. package/dist/types/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +0 -36
  278. package/dist/types/tablecellproperties/commands/tablecellpaddingcommand.d.ts +0 -55
  279. package/dist/types/tablecellproperties/commands/tablecellpropertycommand.d.ts +0 -66
  280. package/dist/types/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +0 -44
  281. package/dist/types/tablecellproperties/tablecellpropertiesediting.d.ts +0 -47
  282. package/dist/types/tablecellproperties/tablecellpropertiesui.d.ts +0 -116
  283. package/dist/types/tablecellproperties/ui/tablecellpropertiesview.d.ts +0 -232
  284. package/dist/types/tablecellproperties.d.ts +0 -34
  285. package/dist/types/tablecellwidth/commands/tablecellwidthcommand.d.ts +0 -50
  286. package/dist/types/tablecellwidth/tablecellwidthediting.d.ts +0 -33
  287. package/dist/types/tableclipboard.d.ts +0 -74
  288. package/dist/types/tablecolumnresize/constants.d.ts +0 -24
  289. package/dist/types/tablecolumnresize/converters.d.ts +0 -22
  290. package/dist/types/tablecolumnresize/tablecolumnresizeediting.d.ts +0 -143
  291. package/dist/types/tablecolumnresize/tablewidthscommand.d.ts +0 -42
  292. package/dist/types/tablecolumnresize/utils.d.ts +0 -152
  293. package/dist/types/tablecolumnresize.d.ts +0 -30
  294. package/dist/types/tableconfig.d.ts +0 -347
  295. package/dist/types/tableediting.d.ts +0 -102
  296. package/dist/types/tablekeyboard.d.ts +0 -72
  297. package/dist/types/tablemouse/mouseeventsobserver.d.ts +0 -66
  298. package/dist/types/tablemouse.d.ts +0 -52
  299. package/dist/types/tableproperties/commands/tablealignmentcommand.d.ts +0 -36
  300. package/dist/types/tableproperties/commands/tablebackgroundcolorcommand.d.ts +0 -36
  301. package/dist/types/tableproperties/commands/tablebordercolorcommand.d.ts +0 -41
  302. package/dist/types/tableproperties/commands/tableborderstylecommand.d.ts +0 -41
  303. package/dist/types/tableproperties/commands/tableborderwidthcommand.d.ts +0 -55
  304. package/dist/types/tableproperties/commands/tableheightcommand.d.ts +0 -50
  305. package/dist/types/tableproperties/commands/tablepropertycommand.d.ts +0 -65
  306. package/dist/types/tableproperties/commands/tablewidthcommand.d.ts +0 -50
  307. package/dist/types/tableproperties/tablepropertiesediting.d.ts +0 -44
  308. package/dist/types/tableproperties/tablepropertiesui.d.ts +0 -118
  309. package/dist/types/tableproperties/ui/tablepropertiesview.d.ts +0 -211
  310. package/dist/types/tableproperties.d.ts +0 -34
  311. package/dist/types/tableselection.d.ts +0 -111
  312. package/dist/types/tabletoolbar.d.ts +0 -36
  313. package/dist/types/tableui.d.ts +0 -57
  314. package/dist/types/tableutils.d.ts +0 -452
  315. package/dist/types/tablewalker.d.ts +0 -366
  316. package/dist/types/ui/colorinputview.d.ts +0 -144
  317. package/dist/types/ui/formrowview.d.ts +0 -65
  318. package/dist/types/ui/inserttableview.d.ts +0 -81
  319. package/dist/types/utils/common.d.ts +0 -50
  320. package/dist/types/utils/structure.d.ts +0 -249
  321. package/dist/types/utils/table-properties.d.ts +0 -71
  322. package/dist/types/utils/ui/contextualballoon.d.ts +0 -38
  323. package/dist/types/utils/ui/table-properties.d.ts +0 -199
  324. package/dist/types/utils/ui/widget.d.ts +0 -24
@@ -272,3 +272,7 @@ msgstr "Yeni bir tablo satırı ekle (tablonun son hücresindeyken)"
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr "Tabloda gezin"
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr "Tablo"
@@ -272,3 +272,7 @@ msgstr ""
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr ""
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr ""
@@ -272,3 +272,7 @@ msgstr ""
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr ""
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr ""
@@ -272,3 +272,7 @@ msgstr "Вставити новий рядок таблиці (якщо в ос
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr "Навігація по таблиці"
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr "Таблиця"
@@ -272,3 +272,7 @@ msgstr ""
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr ""
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr ""
@@ -272,3 +272,7 @@ msgstr ""
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr ""
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr ""
@@ -272,3 +272,7 @@ msgstr "Chèn một hàng mới trong bảng (khi ở ô cuối cùng của bả
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr "Điều hướng qua bảng"
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr "Bảng"
@@ -272,3 +272,7 @@ msgstr "插入新的表格行(当位于表格的最后一个单元格时)"
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr "在表格中进行导览"
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr "表格"
@@ -272,3 +272,7 @@ msgstr "插入新的表格橫排(當位於表格的最後一個單元格時)
272
272
  msgctxt "Keystroke description for assistive technologies: keystroke for navigating through the table."
273
273
  msgid "Navigate through the table"
274
274
  msgstr "在表格中移動"
275
+
276
+ msgctxt "The accessible label of the menu bar button that displays a user interface to insert a table into editor content."
277
+ msgid "Table"
278
+ msgstr "表格"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-table",
3
- "version": "41.3.0-alpha.3",
3
+ "version": "41.3.0",
4
4
  "description": "Table feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,7 +13,7 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "ckeditor5": "41.3.0-alpha.3",
16
+ "ckeditor5": "41.3.0",
17
17
  "lodash-es": "4.17.21"
18
18
  },
19
19
  "author": "CKSource (http://cksource.com/)",
@@ -26,7 +26,6 @@
26
26
  "directory": "packages/ckeditor5-table"
27
27
  },
28
28
  "files": [
29
- "dist",
30
29
  "lang",
31
30
  "src/**/*.js",
32
31
  "src/**/*.d.ts",
package/src/tableui.d.ts CHANGED
@@ -10,6 +10,7 @@ import { Plugin } from 'ckeditor5/src/core.js';
10
10
  * The table UI plugin. It introduces:
11
11
  *
12
12
  * * The `'insertTable'` dropdown,
13
+ * * The `'menuBar:insertTable'` menu bar menu,
13
14
  * * The `'tableColumn'` dropdown,
14
15
  * * The `'tableRow'` dropdown,
15
16
  * * The `'mergeTableCells'` split button.
package/src/tableui.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * @module table/tableui
7
7
  */
8
8
  import { icons, Plugin } from 'ckeditor5/src/core.js';
9
- import { addListToDropdown, createDropdown, ViewModel, SplitButtonView, SwitchButtonView } from 'ckeditor5/src/ui.js';
9
+ import { addListToDropdown, createDropdown, ViewModel, SplitButtonView, SwitchButtonView, MenuBarMenuView } from 'ckeditor5/src/ui.js';
10
10
  import { Collection } from 'ckeditor5/src/utils.js';
11
11
  import InsertTableView from './ui/inserttableview.js';
12
12
  import tableColumnIcon from './../theme/icons/table-column.svg';
@@ -16,6 +16,7 @@ import tableMergeCellIcon from './../theme/icons/table-merge-cell.svg';
16
16
  * The table UI plugin. It introduces:
17
17
  *
18
18
  * * The `'insertTable'` dropdown,
19
+ * * The `'menuBar:insertTable'` menu bar menu,
19
20
  * * The `'tableColumn'` dropdown,
20
21
  * * The `'tableRow'` dropdown,
21
22
  * * The `'mergeTableCells'` split button.
@@ -63,6 +64,28 @@ export default class TableUI extends Plugin {
63
64
  });
64
65
  return dropdownView;
65
66
  });
67
+ editor.ui.componentFactory.add('menuBar:insertTable', locale => {
68
+ const command = editor.commands.get('insertTable');
69
+ const menuView = new MenuBarMenuView(locale);
70
+ const insertTableView = new InsertTableView(locale);
71
+ insertTableView.delegate('execute').to(menuView);
72
+ menuView.on('change:isOpen', (event, name, isOpen) => {
73
+ if (!isOpen) {
74
+ insertTableView.reset();
75
+ }
76
+ });
77
+ insertTableView.on('execute', () => {
78
+ editor.execute('insertTable', { rows: insertTableView.rows, columns: insertTableView.columns });
79
+ editor.editing.view.focus();
80
+ });
81
+ menuView.buttonView.set({
82
+ label: t('Table'),
83
+ icon: icons.table
84
+ });
85
+ menuView.panelView.children.add(insertTableView);
86
+ menuView.bind('isEnabled').to(command);
87
+ return menuView;
88
+ });
66
89
  editor.ui.componentFactory.add('tableColumn', locale => {
67
90
  const options = [
68
91
  {
@@ -49,6 +49,10 @@ export default class InsertTableView extends View {
49
49
  */
50
50
  constructor(locale: Locale);
51
51
  render(): void;
52
+ /**
53
+ * Resets the rows and columns selection.
54
+ */
55
+ reset(): void;
52
56
  /**
53
57
  * @inheritDoc
54
58
  */
@@ -103,6 +103,15 @@ export default class InsertTableView extends View {
103
103
  }
104
104
  this.keystrokes.listenTo(this.element);
105
105
  }
106
+ /**
107
+ * Resets the rows and columns selection.
108
+ */
109
+ reset() {
110
+ this.set({
111
+ rows: 1,
112
+ columns: 1
113
+ });
114
+ }
106
115
  /**
107
116
  * @inheritDoc
108
117
  */
@@ -1,55 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- :root {
6
- --ck-color-selector-caption-background: hsl(0, 0%, 97%);
7
- --ck-color-selector-caption-text: hsl(0, 0%, 20%);
8
- }
9
- .ck-content .table {
10
- margin: 0.9em auto;
11
- display: table;
12
- }
13
- .ck-content .table table {
14
- border-collapse: collapse;
15
- border-spacing: 0;
16
- width: 100%;
17
- height: 100%;
18
- border: 1px double hsl(0, 0%, 70%);
19
- }
20
- .ck-content .table table td {
21
- min-width: 2em;
22
- padding: .4em;
23
- border: 1px solid hsl(0, 0%, 75%);
24
- }
25
- .ck-content .table table th {
26
- font-weight: bold;
27
- background: hsla(0, 0%, 0%, 5%);
28
- }
29
- .ck-content[dir="rtl"] .table th {
30
- text-align: right;
31
- }
32
- .ck-content[dir="ltr"] .table th {
33
- text-align: left;
34
- }
35
- .ck-content .table > figcaption {
36
- display: table-caption;
37
- caption-side: top;
38
- word-break: break-word;
39
- text-align: center;
40
- color: var(--ck-color-selector-caption-text);
41
- background-color: var(--ck-color-selector-caption-background);
42
- padding: .6em;
43
- font-size: .75em;
44
- outline-offset: -1px;
45
- }
46
- .ck-content .table .ck-table-resized {
47
- table-layout: fixed;
48
- }
49
- .ck-content .table table {
50
- overflow: hidden;
51
- }
52
- .ck-content .table td {
53
- overflow-wrap: break-word;
54
- position: relative;
55
- }
@@ -1,150 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- :root {
6
- --ck-color-selector-column-resizer-hover: var(--ck-color-base-active);
7
- --ck-table-column-resizer-width: 7px;
8
- --ck-table-column-resizer-position-offset: calc(var(--ck-table-column-resizer-width) * -0.5 - 0.5px);
9
- }
10
- .ck-editor__editable .ck-table-bogus-paragraph {
11
- display: inline-block;
12
- width: 100%;
13
- }
14
- .ck .ck-insert-table-dropdown__grid {
15
- display: flex;
16
- flex-direction: row;
17
- flex-wrap: wrap;
18
- }
19
- .ck.ck-form__row {
20
- display: flex;
21
- flex-direction: row;
22
- flex-wrap: nowrap;
23
- justify-content: space-between;
24
- }
25
- .ck.ck-form__row > *:not(.ck-label) {
26
- flex-grow: 1;
27
- }
28
- .ck.ck-form__row.ck-table-form__action-row .ck-button-save {
29
- justify-content: center;
30
- }
31
- .ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row {
32
- flex-wrap: wrap;
33
- }
34
- .ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type {
35
- flex-grow: 0.57;
36
- }
37
- .ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type {
38
- flex-grow: 0.43;
39
- }
40
- .ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button {
41
- flex-grow: 1;
42
- }
43
- .ck.ck-input-color {
44
- width: 100%;
45
- display: flex;
46
- flex-direction: row-reverse;
47
- }
48
- .ck.ck-input-color > input.ck.ck-input-text {
49
- min-width: auto;
50
- flex-grow: 1;
51
- }
52
- .ck.ck-input-color > div.ck.ck-dropdown {
53
- min-width: auto;
54
- }
55
- .ck.ck-input-color > div.ck.ck-dropdown > .ck-input-color__button .ck-dropdown__arrow {
56
- display: none;
57
- }
58
- .ck.ck-input-color .ck.ck-input-color__button {
59
- display: flex;
60
- }
61
- .ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview {
62
- position: relative;
63
- overflow: hidden;
64
- }
65
- .ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview > .ck.ck-input-color__button__preview__no-color-indicator {
66
- position: absolute;
67
- display: block;
68
- }
69
- .ck.ck-table-form .ck-form__row.ck-table-form__border-row {
70
- flex-wrap: wrap;
71
- }
72
- .ck.ck-table-form .ck-form__row.ck-table-form__background-row {
73
- flex-wrap: wrap;
74
- }
75
- .ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row {
76
- flex-wrap: wrap;
77
- align-items: center;
78
- }
79
- .ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view {
80
- display: flex;
81
- flex-direction: column-reverse;
82
- align-items: center;
83
- }
84
- .ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown {
85
- flex-grow: 0;
86
- }
87
- .ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator {
88
- flex-grow: 0;
89
- }
90
- .ck.ck-table-form .ck.ck-labeled-field-view {
91
- position: relative;
92
- }
93
- .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status {
94
- position: absolute;
95
- left: 50%;
96
- bottom: calc( -1 * var(--ck-table-properties-error-arrow-size) );
97
- transform: translate(-50%,100%);
98
- z-index: 1;
99
- }
100
- .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status::after {
101
- content: "";
102
- position: absolute;
103
- top: calc( -1 * var(--ck-table-properties-error-arrow-size) );
104
- left: 50%;
105
- transform: translateX( -50% );
106
- }
107
- .ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row {
108
- flex-wrap: wrap;
109
- flex-basis: 0;
110
- align-content: baseline;
111
- }
112
- .ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items {
113
- flex-wrap: nowrap;
114
- }
115
- .ck.ck-editor__editable .table > figcaption.table__caption_highlighted {
116
- animation: ck-table-caption-highlight .6s ease-out;
117
- }
118
- .ck.ck-editor__editable .table > figcaption.ck-placeholder::before {
119
- padding-left: inherit;
120
- padding-right: inherit;
121
- white-space: nowrap;
122
- overflow: hidden;
123
- text-overflow: ellipsis;
124
- }
125
- .ck.ck-editor__editable .table .ck-table-column-resizer {
126
- position: absolute;
127
- top: 0;
128
- bottom: 0;
129
- right: var(--ck-table-column-resizer-position-offset);
130
- width: var(--ck-table-column-resizer-width);
131
- cursor: col-resize;
132
- user-select: none;
133
- z-index: var(--ck-z-default);
134
- }
135
- .ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer {
136
- display: none;
137
- }
138
- .ck.ck-editor__editable .table[draggable] .ck-table-column-resizer {
139
- display: none;
140
- }
141
- .ck.ck-editor__editable .table .ck-table-column-resizer:hover {
142
- background-color: var(--ck-color-selector-column-resizer-hover);
143
- opacity: 0.25;
144
- top: -999999px;
145
- bottom: -999999px;
146
- }
147
- .ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer {
148
- left: var(--ck-table-column-resizer-position-offset);
149
- right: unset;
150
- }