qms-angular 1.0.87 → 1.0.90

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 (292) hide show
  1. package/README.md +5 -1
  2. package/bundles/qms-angular.umd.js +262 -87
  3. package/bundles/qms-angular.umd.js.map +1 -1
  4. package/esm2015/lib/common/themes.const.js +3 -0
  5. package/esm2015/lib/components/badges/qms-badges.component.js +1 -1
  6. package/esm2015/lib/components/banner/qms-banner/qms-banner.component.js +1 -1
  7. package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.js +1 -1
  8. package/esm2015/lib/components/banner/qms-banner-loading/qms-banner-loading.component.js +1 -1
  9. package/esm2015/lib/components/button/button-toggle.js +1 -1
  10. package/esm2015/lib/components/button/button.js +3 -3
  11. package/esm2015/lib/components/comment/comment.js +1 -1
  12. package/esm2015/lib/components/dialog/dialog.js +2 -2
  13. package/esm2015/lib/components/list/list.js +5 -3
  14. package/esm2015/lib/components/qms-paginator/qms-paginator.component.js +16 -7
  15. package/esm2015/lib/components/related/content/related-content.component.js +1 -1
  16. package/esm2015/lib/components/related/list-other-related/list-related.component.js +1 -1
  17. package/esm2015/lib/components/related/popup/related-popup.component.js +1 -1
  18. package/esm2015/lib/components/related/risk/analysis/analysis.component.js +1 -1
  19. package/esm2015/lib/components/related/risk/list/list.component.js +1 -1
  20. package/esm2015/lib/components/related/risk/result/result.component.js +1 -1
  21. package/esm2015/lib/components/rich-text/rich-text.js +1 -1
  22. package/esm2015/lib/components/select-dialog/select-dialog.js +1 -1
  23. package/esm2015/lib/components/select-include-children/select-include-children.component.js +1 -1
  24. package/esm2015/lib/components/select-one/select-one.component.js +1 -1
  25. package/esm2015/lib/components/select-process-document/select-process-document.component.js +1 -1
  26. package/esm2015/lib/components/table/table-action.js +2 -2
  27. package/esm2015/lib/components/tooltip/tooltip.js +1 -1
  28. package/esm2015/lib/components/tree/tree.component.js +1 -1
  29. package/esm2015/lib/components/treeNew/tree.component.js +18 -2
  30. package/esm2015/lib/directives/text-truncate/text-truncate.directive.js +58 -0
  31. package/esm2015/lib/qms-angular.module.js +4 -1
  32. package/esm2015/lib/qms-ckeditor-components/common/functions/common.function.js +34 -1
  33. package/esm2015/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.js +1 -1
  34. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.js +1 -1
  35. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +1 -1
  36. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +1 -1
  37. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +1 -1
  38. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +1 -1
  39. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +1 -1
  40. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +1 -1
  41. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +1 -1
  42. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +5 -3
  43. package/esm2015/lib/services/theming.service.js +36 -0
  44. package/esm2015/lib/shared.module.js +1 -1
  45. package/esm2015/public-api.js +4 -1
  46. package/fesm2015/qms-angular.js +212 -56
  47. package/fesm2015/qms-angular.js.map +1 -1
  48. package/lib/common/themes.const.d.ts +2 -0
  49. package/lib/components/list/list.d.ts +1 -1
  50. package/lib/components/qms-paginator/qms-paginator.component.d.ts +1 -0
  51. package/lib/components/treeNew/tree.component.d.ts +1 -0
  52. package/lib/directives/text-truncate/text-truncate.directive.d.ts +15 -0
  53. package/lib/qms-ckeditor-components/common/functions/common.function.d.ts +12 -0
  54. package/lib/services/theming.service.d.ts +7 -0
  55. package/lib.theme.scss +181 -4
  56. package/package.json +1 -1
  57. package/public-api.d.ts +3 -0
  58. package/qms-angular.metadata.json +1 -1
  59. package/src/assets/fonts/Material/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 +0 -0
  60. package/src/assets/fonts/Material/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUce.woff2 +0 -0
  61. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFUZ0bbck.woff2 +0 -0
  62. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFVZ0b.woff2 +0 -0
  63. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFVp0bbck.woff2 +0 -0
  64. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFW50bbck.woff2 +0 -0
  65. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWJ0bbck.woff2 +0 -0
  66. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWZ0bbck.woff2 +0 -0
  67. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWp0bbck.woff2 +0 -0
  68. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCFPrEHJA.woff2 +0 -0
  69. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2 +0 -0
  70. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCHPrEHJA.woff2 +0 -0
  71. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2 +0 -0
  72. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCMPrEHJA.woff2 +0 -0
  73. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -1
  74. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
  75. package/src/assets/qms-ckeditor-plugin/build/translations/ar.js +1 -1
  76. package/src/assets/qms-ckeditor-plugin/build/translations/az.js +1 -1
  77. package/src/assets/qms-ckeditor-plugin/build/translations/bg.js +1 -1
  78. package/src/assets/qms-ckeditor-plugin/build/translations/ca.js +1 -1
  79. package/src/assets/qms-ckeditor-plugin/build/translations/cs.js +1 -1
  80. package/src/assets/qms-ckeditor-plugin/build/translations/da.js +1 -1
  81. package/src/assets/qms-ckeditor-plugin/build/translations/de-ch.js +1 -1
  82. package/src/assets/qms-ckeditor-plugin/build/translations/de.js +1 -1
  83. package/src/assets/qms-ckeditor-plugin/build/translations/el.js +1 -1
  84. package/src/assets/qms-ckeditor-plugin/build/translations/en-au.js +1 -1
  85. package/src/assets/qms-ckeditor-plugin/build/translations/en-gb.js +1 -1
  86. package/src/assets/qms-ckeditor-plugin/build/translations/eo.js +1 -1
  87. package/src/assets/qms-ckeditor-plugin/build/translations/es.js +1 -1
  88. package/src/assets/qms-ckeditor-plugin/build/translations/et.js +1 -1
  89. package/src/assets/qms-ckeditor-plugin/build/translations/eu.js +1 -1
  90. package/src/assets/qms-ckeditor-plugin/build/translations/fa.js +1 -1
  91. package/src/assets/qms-ckeditor-plugin/build/translations/fi.js +1 -1
  92. package/src/assets/qms-ckeditor-plugin/build/translations/fr.js +1 -1
  93. package/src/assets/qms-ckeditor-plugin/build/translations/gl.js +1 -1
  94. package/src/assets/qms-ckeditor-plugin/build/translations/he.js +1 -1
  95. package/src/assets/qms-ckeditor-plugin/build/translations/hi.js +1 -1
  96. package/src/assets/qms-ckeditor-plugin/build/translations/hr.js +1 -1
  97. package/src/assets/qms-ckeditor-plugin/build/translations/hu.js +1 -1
  98. package/src/assets/qms-ckeditor-plugin/build/translations/id.js +1 -1
  99. package/src/assets/qms-ckeditor-plugin/build/translations/it.js +1 -1
  100. package/src/assets/qms-ckeditor-plugin/build/translations/ja.js +1 -1
  101. package/src/assets/qms-ckeditor-plugin/build/translations/km.js +1 -1
  102. package/src/assets/qms-ckeditor-plugin/build/translations/kn.js +1 -1
  103. package/src/assets/qms-ckeditor-plugin/build/translations/ko.js +1 -1
  104. package/src/assets/qms-ckeditor-plugin/build/translations/ku.js +1 -1
  105. package/src/assets/qms-ckeditor-plugin/build/translations/lt.js +1 -1
  106. package/src/assets/qms-ckeditor-plugin/build/translations/lv.js +1 -1
  107. package/src/assets/qms-ckeditor-plugin/build/translations/nb.js +1 -1
  108. package/src/assets/qms-ckeditor-plugin/build/translations/ne.js +1 -1
  109. package/src/assets/qms-ckeditor-plugin/build/translations/nl.js +1 -1
  110. package/src/assets/qms-ckeditor-plugin/build/translations/no.js +1 -1
  111. package/src/assets/qms-ckeditor-plugin/build/translations/pl.js +1 -1
  112. package/src/assets/qms-ckeditor-plugin/build/translations/pt-br.js +1 -1
  113. package/src/assets/qms-ckeditor-plugin/build/translations/pt.js +1 -1
  114. package/src/assets/qms-ckeditor-plugin/build/translations/ro.js +1 -1
  115. package/src/assets/qms-ckeditor-plugin/build/translations/ru.js +1 -1
  116. package/src/assets/qms-ckeditor-plugin/build/translations/sk.js +1 -1
  117. package/src/assets/qms-ckeditor-plugin/build/translations/sl.js +1 -1
  118. package/src/assets/qms-ckeditor-plugin/build/translations/sq.js +1 -1
  119. package/src/assets/qms-ckeditor-plugin/build/translations/sr-latn.js +1 -1
  120. package/src/assets/qms-ckeditor-plugin/build/translations/sr.js +1 -1
  121. package/src/assets/qms-ckeditor-plugin/build/translations/sv.js +1 -1
  122. package/src/assets/qms-ckeditor-plugin/build/translations/th.js +1 -1
  123. package/src/assets/qms-ckeditor-plugin/build/translations/tk.js +1 -1
  124. package/src/assets/qms-ckeditor-plugin/build/translations/tr.js +1 -1
  125. package/src/assets/qms-ckeditor-plugin/build/translations/ug.js +1 -1
  126. package/src/assets/qms-ckeditor-plugin/build/translations/uk.js +1 -1
  127. package/src/assets/qms-ckeditor-plugin/build/translations/vi.js +1 -1
  128. package/src/assets/qms-ckeditor-plugin/build/translations/zh-cn.js +1 -1
  129. package/src/assets/qms-ckeditor-plugin/build/translations/zh.js +1 -1
  130. package/src/assets/qms-ckeditor-plugin/package-lock.json +0 -2
  131. package/src/assets/qms-ckeditor-plugin/package.json +0 -2
  132. package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +6 -6
  133. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/heading.js +119 -0
  134. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingbuttonsui.js +103 -0
  135. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingcommand.js +96 -0
  136. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingediting.js +163 -0
  137. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingui.js +115 -0
  138. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/index.js +22 -0
  139. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/heading.css +35 -0
  140. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading1.svg +1 -0
  141. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading2.svg +1 -0
  142. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading3.svg +1 -0
  143. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading4.svg +1 -0
  144. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading5.svg +1 -0
  145. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading6.svg +1 -0
  146. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/title.js +598 -0
  147. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/utils.js +42 -0
  148. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/insertcolumncommand.js +83 -0
  149. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/insertrowcommand.js +82 -0
  150. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/inserttablecommand.js +76 -0
  151. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/mergecellcommand.js +272 -0
  152. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/mergecellscommand.js +122 -0
  153. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/removecolumncommand.js +122 -0
  154. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/removerowcommand.js +97 -0
  155. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/selectcolumncommand.js +63 -0
  156. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/selectrowcommand.js +56 -0
  157. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/setheadercolumncommand.js +95 -0
  158. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/setheaderrowcommand.js +105 -0
  159. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/splitcellcommand.js +68 -0
  160. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/downcast.js +529 -0
  161. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-cell-paragraph-post-fixer.js +136 -0
  162. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-cell-refresh-post-fixer.js +75 -0
  163. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-heading-rows-refresh-post-fixer.js +55 -0
  164. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-layout-post-fixer.js +399 -0
  165. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/tableproperties.js +126 -0
  166. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/upcasttable.js +211 -0
  167. package/src/assets/qms-ckeditor-plugin/src/plugins/table/index.js +42 -0
  168. package/src/assets/qms-ckeditor-plugin/src/plugins/table/table.js +103 -0
  169. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +35 -0
  170. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellbordercolorcommand.js +47 -0
  171. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellborderstylecommand.js +47 -0
  172. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellborderwidthcommand.js +62 -0
  173. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellheightcommand.js +51 -0
  174. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +35 -0
  175. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellpaddingcommand.js +62 -0
  176. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellpropertycommand.js +110 -0
  177. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellverticalalignmentcommand.js +43 -0
  178. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellwidthcommand.js +51 -0
  179. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/tablecellpropertiesediting.js +204 -0
  180. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/tablecellpropertiesui.js +401 -0
  181. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/ui/tablecellpropertiesview.js +829 -0
  182. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties.js +80 -0
  183. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableclipboard.js +586 -0
  184. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableediting.js +160 -0
  185. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablekeyboard.js +343 -0
  186. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablemouse/mouseeventsobserver.js +72 -0
  187. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablemouse.js +218 -0
  188. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablealignmentcommand.js +35 -0
  189. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablebackgroundcolorcommand.js +35 -0
  190. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablebordercolorcommand.js +47 -0
  191. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableborderstylecommand.js +47 -0
  192. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableborderwidthcommand.js +62 -0
  193. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableheightcommand.js +51 -0
  194. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablepropertycommand.js +98 -0
  195. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablewidthcommand.js +51 -0
  196. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/tablepropertiesediting.js +182 -0
  197. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/tablepropertiesui.js +397 -0
  198. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/ui/tablepropertiesview.js +714 -0
  199. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties.js +81 -0
  200. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableselection.js +357 -0
  201. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tabletoolbar.js +111 -0
  202. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableui.js +359 -0
  203. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableutils.js +909 -0
  204. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablewalker.js +538 -0
  205. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/colorinput.css +39 -0
  206. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/form.css +11 -0
  207. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/formrow.css +23 -0
  208. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-cell-properties.svg +1 -0
  209. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-column.svg +1 -0
  210. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-merge-cell.svg +1 -0
  211. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-properties.svg +1 -0
  212. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-row.svg +1 -0
  213. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table.svg +1 -0
  214. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/inserttable.css +10 -0
  215. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/snippet.css +3876 -0
  216. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/table.css +67 -0
  217. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tablecaption.css +53 -0
  218. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tablecellproperties.css +28 -0
  219. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableediting.css +10 -0
  220. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableform.css +59 -0
  221. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableproperties.css +18 -0
  222. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableselection.css +10 -0
  223. package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/colorinputview.js +343 -0
  224. package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/formrowview.js +103 -0
  225. package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/inserttableview.js +222 -0
  226. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/common.js +57 -0
  227. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/selection.js +276 -0
  228. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/structure.js +543 -0
  229. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/table-properties.js +66 -0
  230. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/contextualballoon.js +130 -0
  231. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/table-properties.js +397 -0
  232. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/widget.js +62 -0
  233. package/src/lib/components/breadcrumb/breadcrumb.scss +2 -1
  234. package/src/lib/components/button/_button-base.scss +45 -52
  235. package/src/lib/components/button/_button-theme.scss +4 -2
  236. package/src/lib/components/button/button-icon.scss +17 -14
  237. package/src/lib/components/button/button-toggle.scss +64 -115
  238. package/src/lib/components/comment/comment.scss +3 -2
  239. package/src/lib/components/dialog/dialog.scss +2 -1
  240. package/src/lib/components/list/_list-base.scss +2 -2
  241. package/src/lib/components/list/_list-expansion.scss +33 -7
  242. package/src/lib/components/list/list.scss +21 -4
  243. package/src/lib/components/qms-paginator/qms-paginator.component.scss +4 -1
  244. package/src/lib/components/related/content/related-content.component.scss +4 -2
  245. package/src/lib/components/related/list-other-related/list-related.component.scss +7 -6
  246. package/src/lib/components/related/popup/related-popup.component.scss +10 -9
  247. package/src/lib/components/related/risk/analysis/analysis.component.scss +4 -3
  248. package/src/lib/components/related/risk/list/list.component.scss +7 -6
  249. package/src/lib/components/related/risk/result/result.component.scss +9 -8
  250. package/src/lib/components/rich-text/rich-text.scss +3 -2
  251. package/src/lib/components/select-dialog/select-dialog.scss +5 -5
  252. package/src/lib/components/select-include-children/select-include-children.component.scss +10 -9
  253. package/src/lib/components/select-one/select-one.component.scss +5 -4
  254. package/src/lib/components/select-process-document/select-process-document.component.scss +12 -12
  255. package/src/lib/components/substance-conflict/substance-conflict.component.scss +4 -3
  256. package/src/lib/components/table/table.scss +4 -3
  257. package/src/lib/components/tooltip/tooltip.scss +3 -1
  258. package/src/lib/components/tree/tree.component.scss +12 -12
  259. package/src/lib/components/treeNew/tree.component.scss +11 -18
  260. package/src/lib/qms-ckeditor-components/qms-ckeditor.component.scss +3 -2
  261. package/src/lib/qms-ckeditor-components/styles/_modules.scss +9 -0
  262. package/src/themes/_non-bg-scrollbar.scss +4 -3
  263. package/src/themes/core/_app-bar.scss +5 -4
  264. package/src/themes/core/_button.scss +14 -12
  265. package/src/themes/core/_checkbox.scss +9 -24
  266. package/src/themes/core/_chip-input.scss +29 -27
  267. package/src/themes/core/_chip.scss +12 -10
  268. package/src/themes/core/_date-picker.scss +9 -8
  269. package/src/themes/core/_dropdown-menu.scss +12 -11
  270. package/src/themes/core/_file-upload.scss +12 -11
  271. package/src/themes/core/_form-prefix.scss +6 -4
  272. package/src/themes/core/_form.scss +28 -27
  273. package/src/themes/core/_mat-icon.scss +60 -60
  274. package/src/themes/core/_progress.scss +5 -3
  275. package/src/themes/core/_radio.scss +13 -15
  276. package/src/themes/core/_range-slider.scss +34 -33
  277. package/src/themes/core/_scrollbar.scss +25 -34
  278. package/src/themes/core/_search-field.scss +5 -3
  279. package/src/themes/core/_select.scss +5 -2
  280. package/src/themes/core/_slide-toggle.scss +10 -11
  281. package/src/themes/core/_styles.scss +19 -17
  282. package/src/themes/core/_tab.scss +88 -87
  283. package/src/themes/core/_table.scss +89 -20
  284. package/src/themes/core/_text-block.scss +3 -1
  285. package/src/themes/core/_typography.scss +108 -108
  286. package/src/themes/theme/_mixins.scss +18 -0
  287. package/src/themes/theme/_theme.scss +17 -0
  288. package/src/themes/theme/_variable.scss +303 -0
  289. package/src/assets/fonts/OpenSans/OpenSans.woff2 +0 -0
  290. package/src/themes/_color.scss +0 -61
  291. package/src/themes/_scrollbar.scss +0 -27
  292. package/src/themes/core/_colors.scss +0 -60
@@ -0,0 +1,160 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ /**
7
+ * @module table/tableediting
8
+ */
9
+
10
+ import { Plugin } from 'ckeditor5/src/core';
11
+
12
+ import upcastTable, { ensureParagraphInTableCell, skipEmptyTableRow } from './converters/upcasttable';
13
+ import {
14
+ convertParagraphInTableCell,
15
+ downcastInsertCell,
16
+ downcastInsertRow,
17
+ downcastInsertTable,
18
+ downcastRemoveRow,
19
+ downcastTableHeadingColumnsChange
20
+ } from './converters/downcast';
21
+
22
+ import InsertTableCommand from './commands/inserttablecommand';
23
+ import InsertRowCommand from './commands/insertrowcommand';
24
+ import InsertColumnCommand from './commands/insertcolumncommand';
25
+ import SplitCellCommand from './commands/splitcellcommand';
26
+ import MergeCellCommand from './commands/mergecellcommand';
27
+ import RemoveRowCommand from './commands/removerowcommand';
28
+ import RemoveColumnCommand from './commands/removecolumncommand';
29
+ import SetHeaderRowCommand from './commands/setheaderrowcommand';
30
+ import SetHeaderColumnCommand from './commands/setheadercolumncommand';
31
+ import MergeCellsCommand from './commands/mergecellscommand';
32
+ import SelectRowCommand from './commands/selectrowcommand';
33
+ import SelectColumnCommand from './commands/selectcolumncommand';
34
+ import TableUtils from '../table/tableutils';
35
+
36
+ import injectTableLayoutPostFixer from './converters/table-layout-post-fixer';
37
+ import injectTableCellParagraphPostFixer from './converters/table-cell-paragraph-post-fixer';
38
+ import injectTableCellRefreshPostFixer from './converters/table-cell-refresh-post-fixer';
39
+ import injectTableHeadingRowsRefreshPostFixer from './converters/table-heading-rows-refresh-post-fixer';
40
+
41
+ import './theme/tableediting.css';
42
+
43
+ /**
44
+ * The table editing feature.
45
+ *
46
+ * @extends module:core/plugin~Plugin
47
+ */
48
+ export default class TableEditing extends Plugin {
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ static get pluginName() {
53
+ return 'TableEditing';
54
+ }
55
+
56
+ /**
57
+ * @inheritDoc
58
+ */
59
+ init() {
60
+ const editor = this.editor;
61
+ const model = editor.model;
62
+ const schema = model.schema;
63
+ const conversion = editor.conversion;
64
+
65
+ schema.register( 'table', {
66
+ allowWhere: '$block',
67
+ allowAttributes: [ 'headingRows', 'headingColumns' ],
68
+ isObject: true,
69
+ isBlock: true
70
+ } );
71
+
72
+ schema.register( 'tableRow', {
73
+ allowIn: 'table',
74
+ isLimit: true
75
+ } );
76
+
77
+ schema.register( 'tableCell', {
78
+ allowIn: 'tableRow',
79
+ allowAttributes: [ 'colspan', 'rowspan' ],
80
+ isLimit: true,
81
+ isSelectable: true
82
+ } );
83
+
84
+ // Allow all $block content inside a table cell.
85
+ schema.extend( '$block', { allowIn: 'tableCell' } );
86
+
87
+ // Table conversion.
88
+ conversion.for( 'upcast' ).add( upcastTable() );
89
+
90
+ conversion.for( 'editingDowncast' ).add( downcastInsertTable( { asWidget: true } ) );
91
+ conversion.for( 'dataDowncast' ).add( downcastInsertTable() );
92
+
93
+ // Table row conversion.
94
+ conversion.for( 'upcast' ).elementToElement( { model: 'tableRow', view: 'tr' } );
95
+ conversion.for( 'upcast' ).add( skipEmptyTableRow() );
96
+
97
+ conversion.for( 'editingDowncast' ).add( downcastInsertRow() );
98
+ conversion.for( 'editingDowncast' ).add( downcastRemoveRow() );
99
+
100
+ // Table cell conversion.
101
+ conversion.for( 'upcast' ).elementToElement( { model: 'tableCell', view: 'td' } );
102
+ conversion.for( 'upcast' ).elementToElement( { model: 'tableCell', view: 'th' } );
103
+ conversion.for( 'upcast' ).add( ensureParagraphInTableCell( 'td' ) );
104
+ conversion.for( 'upcast' ).add( ensureParagraphInTableCell( 'th' ) );
105
+
106
+ conversion.for( 'editingDowncast' ).add( downcastInsertCell() );
107
+
108
+ // Duplicates code - needed to properly refresh paragraph inside a table cell.
109
+ editor.conversion.for( 'editingDowncast' ).elementToElement( {
110
+ model: 'paragraph',
111
+ view: convertParagraphInTableCell,
112
+ converterPriority: 'high'
113
+ } );
114
+
115
+ // Table attributes conversion.
116
+ conversion.attributeToAttribute( { model: 'colspan', view: 'colspan' } );
117
+ conversion.attributeToAttribute( { model: 'rowspan', view: 'rowspan' } );
118
+
119
+ // Table heading columns conversion (a change of heading rows requires a reconversion of the whole table).
120
+ conversion.for( 'editingDowncast' ).add( downcastTableHeadingColumnsChange() );
121
+
122
+ // Define all the commands.
123
+ editor.commands.add( 'insertTable', new InsertTableCommand( editor ) );
124
+ editor.commands.add( 'insertTableRowAbove', new InsertRowCommand( editor, { order: 'above' } ) );
125
+ editor.commands.add( 'insertTableRowBelow', new InsertRowCommand( editor, { order: 'below' } ) );
126
+ editor.commands.add( 'insertTableColumnLeft', new InsertColumnCommand( editor, { order: 'left' } ) );
127
+ editor.commands.add( 'insertTableColumnRight', new InsertColumnCommand( editor, { order: 'right' } ) );
128
+
129
+ editor.commands.add( 'removeTableRow', new RemoveRowCommand( editor ) );
130
+ editor.commands.add( 'removeTableColumn', new RemoveColumnCommand( editor ) );
131
+
132
+ editor.commands.add( 'splitTableCellVertically', new SplitCellCommand( editor, { direction: 'vertically' } ) );
133
+ editor.commands.add( 'splitTableCellHorizontally', new SplitCellCommand( editor, { direction: 'horizontally' } ) );
134
+
135
+ editor.commands.add( 'mergeTableCells', new MergeCellsCommand( editor ) );
136
+
137
+ editor.commands.add( 'mergeTableCellRight', new MergeCellCommand( editor, { direction: 'right' } ) );
138
+ editor.commands.add( 'mergeTableCellLeft', new MergeCellCommand( editor, { direction: 'left' } ) );
139
+ editor.commands.add( 'mergeTableCellDown', new MergeCellCommand( editor, { direction: 'down' } ) );
140
+ editor.commands.add( 'mergeTableCellUp', new MergeCellCommand( editor, { direction: 'up' } ) );
141
+
142
+ editor.commands.add( 'setTableColumnHeader', new SetHeaderColumnCommand( editor ) );
143
+ editor.commands.add( 'setTableRowHeader', new SetHeaderRowCommand( editor ) );
144
+
145
+ editor.commands.add( 'selectTableRow', new SelectRowCommand( editor ) );
146
+ editor.commands.add( 'selectTableColumn', new SelectColumnCommand( editor ) );
147
+
148
+ injectTableHeadingRowsRefreshPostFixer( model );
149
+ injectTableLayoutPostFixer( model );
150
+ injectTableCellRefreshPostFixer( model, editor.editing.mapper );
151
+ injectTableCellParagraphPostFixer( model );
152
+ }
153
+
154
+ /**
155
+ * @inheritDoc
156
+ */
157
+ static get requires() {
158
+ return [ TableUtils ];
159
+ }
160
+ }
@@ -0,0 +1,343 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ /**
7
+ * @module table/tablekeyboard
8
+ */
9
+
10
+ import TableSelection from './tableselection';
11
+ import TableWalker from './tablewalker';
12
+
13
+ import { Plugin } from 'ckeditor5/src/core';
14
+ import { getLocalizedArrowKeyCodeDirection } from 'ckeditor5/src/utils';
15
+ import { getSelectedTableCells, getTableCellsContainingSelection } from './utils/selection';
16
+
17
+ /**
18
+ * This plugin enables keyboard navigation for tables.
19
+ * It is loaded automatically by the {@link module:table/table~Table} plugin.
20
+ *
21
+ * @extends module:core/plugin~Plugin
22
+ */
23
+ export default class TableKeyboard extends Plugin {
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName() {
28
+ return 'TableKeyboard';
29
+ }
30
+
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ static get requires() {
35
+ return [ TableSelection ];
36
+ }
37
+
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ init() {
42
+ const view = this.editor.editing.view;
43
+ const viewDocument = view.document;
44
+
45
+ // Handle Tab key navigation.
46
+ this.editor.keystrokes.set( 'Tab', ( ...args ) => this._handleTabOnSelectedTable( ...args ), { priority: 'low' } );
47
+ this.editor.keystrokes.set( 'Tab', this._getTabHandler( true ), { priority: 'low' } );
48
+ this.editor.keystrokes.set( 'Shift+Tab', this._getTabHandler( false ), { priority: 'low' } );
49
+
50
+ this.listenTo( viewDocument, 'arrowKey', ( ...args ) => this._onArrowKey( ...args ), { context: 'table' } );
51
+ }
52
+
53
+ /**
54
+ * Handles {@link module:engine/view/document~Document#event:keydown keydown} events for the <kbd>Tab</kbd> key executed
55
+ * when the table widget is selected.
56
+ *
57
+ * @private
58
+ * @param {module:engine/view/observer/keyobserver~KeyEventData} data Key event data.
59
+ * @param {Function} cancel The stop/stopPropagation/preventDefault function.
60
+ */
61
+ _handleTabOnSelectedTable( data, cancel ) {
62
+ const editor = this.editor;
63
+ const selection = editor.model.document.selection;
64
+ const selectedElement = selection.getSelectedElement();
65
+
66
+ if ( !selectedElement || !selectedElement.is( 'element', 'table' ) ) {
67
+ return;
68
+ }
69
+
70
+ cancel();
71
+
72
+ editor.model.change( writer => {
73
+ writer.setSelection( writer.createRangeIn( selectedElement.getChild( 0 ).getChild( 0 ) ) );
74
+ } );
75
+ }
76
+
77
+ /**
78
+ * Returns a handler for {@link module:engine/view/document~Document#event:keydown keydown} events for the <kbd>Tab</kbd> key executed
79
+ * inside table cells.
80
+ *
81
+ * @private
82
+ * @param {Boolean} isForward Whether this handler will move the selection to the next or the previous cell.
83
+ */
84
+ _getTabHandler( isForward ) {
85
+ const editor = this.editor;
86
+
87
+ return ( domEventData, cancel ) => {
88
+ const selection = editor.model.document.selection;
89
+ let tableCell = getTableCellsContainingSelection( selection )[ 0 ];
90
+
91
+ if ( !tableCell ) {
92
+ tableCell = this.editor.plugins.get( 'TableSelection' ).getFocusCell();
93
+ }
94
+
95
+ if ( !tableCell ) {
96
+ return;
97
+ }
98
+
99
+ cancel();
100
+
101
+ const tableRow = tableCell.parent;
102
+ const table = tableRow.parent;
103
+
104
+ const currentRowIndex = table.getChildIndex( tableRow );
105
+ const currentCellIndex = tableRow.getChildIndex( tableCell );
106
+
107
+ const isFirstCellInRow = currentCellIndex === 0;
108
+
109
+ if ( !isForward && isFirstCellInRow && currentRowIndex === 0 ) {
110
+ // Set the selection over the whole table if the selection was in the first table cell.
111
+ editor.model.change( writer => {
112
+ writer.setSelection( writer.createRangeOn( table ) );
113
+ } );
114
+
115
+ return;
116
+ }
117
+
118
+ const isLastCellInRow = currentCellIndex === tableRow.childCount - 1;
119
+ const isLastRow = currentRowIndex === table.childCount - 1;
120
+
121
+ if ( isForward && isLastRow && isLastCellInRow ) {
122
+ editor.execute( 'insertTableRowBelow' );
123
+
124
+ // Check if the command actually added a row. If `insertTableRowBelow` execution didn't add a row (because it was disabled
125
+ // or it got overwritten) set the selection over the whole table to mirror the first cell case.
126
+ if ( currentRowIndex === table.childCount - 1 ) {
127
+ editor.model.change( writer => {
128
+ writer.setSelection( writer.createRangeOn( table ) );
129
+ } );
130
+
131
+ return;
132
+ }
133
+ }
134
+
135
+ let cellToFocus;
136
+
137
+ // Move to the first cell in the next row.
138
+ if ( isForward && isLastCellInRow ) {
139
+ const nextRow = table.getChild( currentRowIndex + 1 );
140
+
141
+ cellToFocus = nextRow.getChild( 0 );
142
+ }
143
+ // Move to the last cell in the previous row.
144
+ else if ( !isForward && isFirstCellInRow ) {
145
+ const previousRow = table.getChild( currentRowIndex - 1 );
146
+
147
+ cellToFocus = previousRow.getChild( previousRow.childCount - 1 );
148
+ }
149
+ // Move to the next/previous cell.
150
+ else {
151
+ cellToFocus = tableRow.getChild( currentCellIndex + ( isForward ? 1 : -1 ) );
152
+ }
153
+
154
+ editor.model.change( writer => {
155
+ writer.setSelection( writer.createRangeIn( cellToFocus ) );
156
+ } );
157
+ };
158
+ }
159
+
160
+ /**
161
+ * Handles {@link module:engine/view/document~Document#event:keydown keydown} events.
162
+ *
163
+ * @private
164
+ * @param {module:utils/eventinfo~EventInfo} eventInfo
165
+ * @param {module:engine/view/observer/domeventdata~DomEventData} domEventData
166
+ */
167
+ _onArrowKey( eventInfo, domEventData ) {
168
+ const editor = this.editor;
169
+ const keyCode = domEventData.keyCode;
170
+
171
+ const direction = getLocalizedArrowKeyCodeDirection( keyCode, editor.locale.contentLanguageDirection );
172
+ const wasHandled = this._handleArrowKeys( direction, domEventData.shiftKey );
173
+
174
+ if ( wasHandled ) {
175
+ domEventData.preventDefault();
176
+ domEventData.stopPropagation();
177
+ eventInfo.stop();
178
+ }
179
+ }
180
+
181
+ /**
182
+ * Handles arrow keys to move the selection around the table.
183
+ *
184
+ * @private
185
+ * @param {'left'|'up'|'right'|'down'} direction The direction of the arrow key.
186
+ * @param {Boolean} expandSelection If the current selection should be expanded.
187
+ * @returns {Boolean} Returns `true` if key was handled.
188
+ */
189
+ _handleArrowKeys( direction, expandSelection ) {
190
+ const model = this.editor.model;
191
+ const selection = model.document.selection;
192
+ const isForward = [ 'right', 'down' ].includes( direction );
193
+
194
+ // In case one or more table cells are selected (from outside),
195
+ // move the selection to a cell adjacent to the selected table fragment.
196
+ const selectedCells = getSelectedTableCells( selection );
197
+
198
+ if ( selectedCells.length ) {
199
+ let focusCell;
200
+
201
+ if ( expandSelection ) {
202
+ focusCell = this.editor.plugins.get( 'TableSelection' ).getFocusCell();
203
+ } else {
204
+ focusCell = isForward ? selectedCells[ selectedCells.length - 1 ] : selectedCells[ 0 ];
205
+ }
206
+
207
+ this._navigateFromCellInDirection( focusCell, direction, expandSelection );
208
+
209
+ return true;
210
+ }
211
+
212
+ // Abort if we're not in a table cell.
213
+ const tableCell = selection.focus.findAncestor( 'tableCell' );
214
+
215
+ /* istanbul ignore if: paranoid check */
216
+ if ( !tableCell ) {
217
+ return false;
218
+ }
219
+
220
+ // Navigation is in the opposite direction than the selection direction so this is shrinking of the selection.
221
+ // Selection for sure will not approach cell edge.
222
+ if ( expandSelection && !selection.isCollapsed && selection.isBackward == isForward ) {
223
+ return false;
224
+ }
225
+
226
+ // Let's check if the selection is at the beginning/end of the cell.
227
+ if ( this._isSelectionAtCellEdge( selection, tableCell, isForward ) ) {
228
+ this._navigateFromCellInDirection( tableCell, direction, expandSelection );
229
+
230
+ return true;
231
+ }
232
+
233
+ return false;
234
+ }
235
+
236
+ /**
237
+ * Returns `true` if the selection is at the boundary of a table cell according to the navigation direction.
238
+ *
239
+ * @private
240
+ * @param {module:engine/model/selection~Selection} selection The current selection.
241
+ * @param {module:engine/model/element~Element} tableCell The current table cell element.
242
+ * @param {Boolean} isForward The expected navigation direction.
243
+ * @returns {Boolean}
244
+ */
245
+ _isSelectionAtCellEdge( selection, tableCell, isForward ) {
246
+ const model = this.editor.model;
247
+ const schema = this.editor.model.schema;
248
+
249
+ const focus = isForward ? selection.getLastPosition() : selection.getFirstPosition();
250
+
251
+ // If the current limit element is not table cell we are for sure not at the cell edge.
252
+ // Also `modifySelection` will not let us out of it.
253
+ if ( !schema.getLimitElement( focus ).is( 'element', 'tableCell' ) ) {
254
+ const boundaryPosition = model.createPositionAt( tableCell, isForward ? 'end' : 0 );
255
+
256
+ return boundaryPosition.isTouching( focus );
257
+ }
258
+
259
+ const probe = model.createSelection( focus );
260
+
261
+ model.modifySelection( probe, { direction: isForward ? 'forward' : 'backward' } );
262
+
263
+ // If there was no change in the focus position, then it's not possible to move the selection there.
264
+ return focus.isEqual( probe.focus );
265
+ }
266
+
267
+ /**
268
+ * Moves the selection from the given table cell in the specified direction.
269
+ *
270
+ * @protected
271
+ * @param {module:engine/model/element~Element} focusCell The table cell that is current multi-cell selection focus.
272
+ * @param {'left'|'up'|'right'|'down'} direction Direction in which selection should move.
273
+ * @param {Boolean} [expandSelection=false] If the current selection should be expanded.
274
+ */
275
+ _navigateFromCellInDirection( focusCell, direction, expandSelection = false ) {
276
+ const model = this.editor.model;
277
+
278
+ const table = focusCell.findAncestor( 'table' );
279
+ const tableMap = [ ...new TableWalker( table, { includeAllSlots: true } ) ];
280
+ const { row: lastRow, column: lastColumn } = tableMap[ tableMap.length - 1 ];
281
+
282
+ const currentCellInfo = tableMap.find( ( { cell } ) => cell == focusCell );
283
+ let { row, column } = currentCellInfo;
284
+
285
+ switch ( direction ) {
286
+ case 'left':
287
+ column--;
288
+ break;
289
+
290
+ case 'up':
291
+ row--;
292
+ break;
293
+
294
+ case 'right':
295
+ column += currentCellInfo.cellWidth;
296
+ break;
297
+
298
+ case 'down':
299
+ row += currentCellInfo.cellHeight;
300
+ break;
301
+ }
302
+
303
+ const isOutsideVertically = row < 0 || row > lastRow;
304
+ const isBeforeFirstCell = column < 0 && row <= 0;
305
+ const isAfterLastCell = column > lastColumn && row >= lastRow;
306
+
307
+ // Note that if the table cell at the end of a row is row-spanned then isAfterLastCell will never be true.
308
+ // However, we don't know if user was navigating on the last row or not, so let's stay in the table.
309
+
310
+ if ( isOutsideVertically || isBeforeFirstCell || isAfterLastCell ) {
311
+ model.change( writer => {
312
+ writer.setSelection( writer.createRangeOn( table ) );
313
+ } );
314
+
315
+ return;
316
+ }
317
+
318
+ if ( column < 0 ) {
319
+ column = expandSelection ? 0 : lastColumn;
320
+ row--;
321
+ } else if ( column > lastColumn ) {
322
+ column = expandSelection ? lastColumn : 0;
323
+ row++;
324
+ }
325
+
326
+ const cellToSelect = tableMap.find( cellInfo => cellInfo.row == row && cellInfo.column == column ).cell;
327
+ const isForward = [ 'right', 'down' ].includes( direction );
328
+ const tableSelection = this.editor.plugins.get( 'TableSelection' );
329
+
330
+ if ( expandSelection && tableSelection.isEnabled ) {
331
+ const anchorCell = tableSelection.getAnchorCell() || focusCell;
332
+
333
+ tableSelection.setCellSelection( anchorCell, cellToSelect );
334
+ } else {
335
+ const positionToSelect = model.createPositionAt( cellToSelect, isForward ? 0 : 'end' );
336
+
337
+ model.change( writer => {
338
+ writer.setSelection( positionToSelect );
339
+ } );
340
+ }
341
+ }
342
+ }
343
+
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ /**
7
+ * @module table/tableselection/mouseeventsobserver
8
+ */
9
+
10
+ import { DomEventObserver } from 'ckeditor5/src/engine';
11
+
12
+ /**
13
+ * The mouse selection event observer.
14
+ *
15
+ * It registers listeners for the following DOM events:
16
+ *
17
+ * - `'mousemove'`
18
+ * - `'mouseup'`
19
+ * - `'mouseleave'`
20
+ *
21
+ * Note that this observer is disabled by default. To enable this observer, it needs to be added to
22
+ * {@link module:engine/view/view~View} using the {@link module:engine/view/view~View#addObserver} method.
23
+ *
24
+ * The observer is registered by the {@link module:table/tableselection~TableSelection} plugin.
25
+ *
26
+ * @extends module:engine/view/observer/domeventobserver~DomEventObserver
27
+ */
28
+ export default class MouseEventsObserver extends DomEventObserver {
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ constructor( view ) {
33
+ super( view );
34
+
35
+ this.domEventType = [ 'mousemove', 'mouseleave' ];
36
+ }
37
+
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ onDomEvent( domEvent ) {
42
+ this.fire( domEvent.type, domEvent );
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Fired when the mouse is moved over one of the editables.
48
+ *
49
+ * Introduced by {@link module:table/tableselection/mouseeventsobserver~MouseEventsObserver}.
50
+ *
51
+ * Note that this event is not available by default. To make it available,
52
+ * {@link module:table/tableselection/mouseeventsobserver~MouseEventsObserver} needs to be added
53
+ * to {@link module:engine/view/view~View} using the {@link module:engine/view/view~View#addObserver} method.
54
+ *
55
+ * @see module:table/tableselection/mouseeventsobserver~MouseEventsObserver
56
+ * @event module:engine/view/document~Document#event:mousemove
57
+ * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.
58
+ */
59
+
60
+ /**
61
+ * Fired when the mouse is moved out of one of the editables.
62
+ *
63
+ * Introduced by {@link module:table/tableselection/mouseeventsobserver~MouseEventsObserver}.
64
+ *
65
+ * Note that this event is not available by default. To make it available,
66
+ * {@link module:table/tableselection/mouseeventsobserver~MouseEventsObserver} needs to be added
67
+ * to {@link module:engine/view/view~View} using the {@link module:engine/view/view~View#addObserver} method.
68
+ *
69
+ * @see module:table/tableselection/mouseeventsobserver~MouseEventsObserver
70
+ * @event module:engine/view/document~Document#event:mouseleave
71
+ * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.
72
+ */