qms-angular 1.0.86 → 1.0.89

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 (289) hide show
  1. package/README.md +5 -1
  2. package/bundles/qms-angular.umd.js +6943 -219
  3. package/bundles/qms-angular.umd.js.map +1 -1
  4. package/esm2015/lib/components/badges/qms-badges.component.js +1 -1
  5. package/esm2015/lib/components/banner/qms-banner/qms-banner.component.js +1 -1
  6. package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.js +1 -1
  7. package/esm2015/lib/components/banner/qms-banner-loading/qms-banner-loading.component.js +1 -1
  8. package/esm2015/lib/components/button/button-toggle.js +1 -1
  9. package/esm2015/lib/components/button/button.js +3 -3
  10. package/esm2015/lib/components/comment/comment.js +6 -3
  11. package/esm2015/lib/components/dialog/dialog.js +2 -2
  12. package/esm2015/lib/components/list/list.js +2 -2
  13. package/esm2015/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.js +3 -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 +2 -2
  16. package/esm2015/lib/components/related/list-other-related/list-related.component.js +1 -1
  17. package/esm2015/lib/components/related/risk/list/list.component.js +1 -1
  18. package/esm2015/lib/components/related/risk/result/result.component.js +1 -1
  19. package/esm2015/lib/components/rich-text/rich-text.js +1 -1
  20. package/esm2015/lib/components/table/table-action.js +2 -2
  21. package/esm2015/lib/components/table/table.module.js +4 -4
  22. package/esm2015/lib/components/tooltip/tooltip.js +1 -1
  23. package/esm2015/lib/components/tree/tree.component.js +1 -1
  24. package/esm2015/lib/components/treeNew/tree.component.js +18 -2
  25. package/esm2015/lib/directives/file-upload/file-upload-multiple-selector.directive.js +3 -1
  26. package/esm2015/lib/directives/file-upload/file-upload-selector.directive.js +3 -1
  27. package/esm2015/lib/directives/file-upload/file-upload.directive.js +1 -1
  28. package/esm2015/lib/directives/text-truncate/text-truncate.directive.js +58 -0
  29. package/esm2015/lib/model/en.js +63 -2
  30. package/esm2015/lib/model/no.js +63 -2
  31. package/esm2015/lib/qms-angular.module.js +4 -1
  32. package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/halo.function.js +87 -0
  33. package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/inspector.function.js +3767 -0
  34. package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/selection.function.js +56 -0
  35. package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/stencil.function.js +1003 -0
  36. package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/toolbar.function.js +302 -0
  37. package/esm2015/lib/qms-ckeditor-components/common/flowchart/models/app-shapes.js +320 -0
  38. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/keyboard-service.js +69 -0
  39. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.js +412 -0
  40. package/esm2015/lib/qms-ckeditor-components/common/flowchart/themes/theme-picker.js +80 -0
  41. package/esm2015/lib/qms-ckeditor-components/common/functions/common.function.js +34 -1
  42. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.js +1 -1
  43. package/esm2015/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.js +3 -3
  44. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.js +1 -1
  45. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +2 -2
  46. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.js +2 -2
  47. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.js +317 -0
  48. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +3 -3
  49. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +3 -3
  50. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +3 -3
  51. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +3 -3
  52. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +3 -3
  53. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +3 -3
  54. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +3 -3
  55. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +35 -3
  56. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.module.js +4 -2
  57. package/esm2015/public-api.js +8 -1
  58. package/esm2015/qms-angular.js +2 -1
  59. package/fesm2015/qms-angular.js +6882 -213
  60. package/fesm2015/qms-angular.js.map +1 -1
  61. package/lib/components/comment/comment.d.ts +1 -0
  62. package/lib/components/qms-paginator/qms-paginator.component.d.ts +1 -0
  63. package/lib/components/treeNew/tree.component.d.ts +1 -0
  64. package/lib/directives/text-truncate/text-truncate.directive.d.ts +15 -0
  65. package/lib/model/en.d.ts +61 -0
  66. package/lib/model/no.d.ts +61 -0
  67. package/lib/qms-ckeditor-components/common/flowchart/config/halo.function.d.ts +37 -0
  68. package/lib/qms-ckeditor-components/common/flowchart/config/inspector.function.d.ts +7 -0
  69. package/lib/qms-ckeditor-components/common/flowchart/config/selection.function.d.ts +39 -0
  70. package/lib/qms-ckeditor-components/common/flowchart/config/stencil.function.d.ts +11 -0
  71. package/lib/qms-ckeditor-components/common/flowchart/config/toolbar.function.d.ts +224 -0
  72. package/lib/qms-ckeditor-components/common/flowchart/models/app-shapes.d.ts +58 -0
  73. package/lib/qms-ckeditor-components/common/flowchart/service/keyboard-service.d.ts +16 -0
  74. package/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.d.ts +56 -0
  75. package/lib/qms-ckeditor-components/common/flowchart/themes/theme-picker.d.ts +35 -0
  76. package/lib/qms-ckeditor-components/common/functions/common.function.d.ts +12 -0
  77. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.d.ts +2 -0
  78. package/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.d.ts +41 -0
  79. package/lib/qms-ckeditor-components/qms-ckeditor.component.d.ts +4 -0
  80. package/lib.theme.scss +179 -0
  81. package/package.json +1 -1
  82. package/public-api.d.ts +7 -0
  83. package/qms-angular.d.ts +1 -0
  84. package/qms-angular.metadata.json +1 -1
  85. package/src/assets/fonts/Material/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 +0 -0
  86. package/src/assets/fonts/Material/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUce.woff2 +0 -0
  87. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFUZ0bbck.woff2 +0 -0
  88. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFVZ0b.woff2 +0 -0
  89. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFVp0bbck.woff2 +0 -0
  90. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFW50bbck.woff2 +0 -0
  91. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWJ0bbck.woff2 +0 -0
  92. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWZ0bbck.woff2 +0 -0
  93. package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWp0bbck.woff2 +0 -0
  94. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCFPrEHJA.woff2 +0 -0
  95. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2 +0 -0
  96. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCHPrEHJA.woff2 +0 -0
  97. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2 +0 -0
  98. package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCMPrEHJA.woff2 +0 -0
  99. package/src/assets/jointjs/images/delete-icon-modern.png +0 -0
  100. package/src/assets/jointjs/images/reset-icon-modern.png +0 -0
  101. package/src/assets/jointjs/images/save-icon-modern.png +0 -0
  102. package/src/assets/jointjs/images/to-front-icon-modern.png +0 -0
  103. package/src/assets/jointjs/images/toback-icon-modern.png +0 -0
  104. package/src/assets/jointjs/images/toolbar-icons-material.png +0 -0
  105. package/src/assets/jointjs/images/toolbar-icons-modern.png +0 -0
  106. package/src/assets/jointjs/scss/rappid.scss +326 -0
  107. package/src/assets/jointjs/scss/theme-picker.scss +22 -0
  108. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -1
  109. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
  110. package/src/assets/qms-ckeditor-plugin/build/translations/ar.js +1 -1
  111. package/src/assets/qms-ckeditor-plugin/build/translations/az.js +1 -1
  112. package/src/assets/qms-ckeditor-plugin/build/translations/bg.js +1 -1
  113. package/src/assets/qms-ckeditor-plugin/build/translations/ca.js +1 -1
  114. package/src/assets/qms-ckeditor-plugin/build/translations/cs.js +1 -1
  115. package/src/assets/qms-ckeditor-plugin/build/translations/da.js +1 -1
  116. package/src/assets/qms-ckeditor-plugin/build/translations/de-ch.js +1 -1
  117. package/src/assets/qms-ckeditor-plugin/build/translations/de.js +1 -1
  118. package/src/assets/qms-ckeditor-plugin/build/translations/el.js +1 -1
  119. package/src/assets/qms-ckeditor-plugin/build/translations/en-au.js +1 -1
  120. package/src/assets/qms-ckeditor-plugin/build/translations/en-gb.js +1 -1
  121. package/src/assets/qms-ckeditor-plugin/build/translations/eo.js +1 -1
  122. package/src/assets/qms-ckeditor-plugin/build/translations/es.js +1 -1
  123. package/src/assets/qms-ckeditor-plugin/build/translations/et.js +1 -1
  124. package/src/assets/qms-ckeditor-plugin/build/translations/eu.js +1 -1
  125. package/src/assets/qms-ckeditor-plugin/build/translations/fa.js +1 -1
  126. package/src/assets/qms-ckeditor-plugin/build/translations/fi.js +1 -1
  127. package/src/assets/qms-ckeditor-plugin/build/translations/fr.js +1 -1
  128. package/src/assets/qms-ckeditor-plugin/build/translations/gl.js +1 -1
  129. package/src/assets/qms-ckeditor-plugin/build/translations/he.js +1 -1
  130. package/src/assets/qms-ckeditor-plugin/build/translations/hi.js +1 -1
  131. package/src/assets/qms-ckeditor-plugin/build/translations/hr.js +1 -1
  132. package/src/assets/qms-ckeditor-plugin/build/translations/hu.js +1 -1
  133. package/src/assets/qms-ckeditor-plugin/build/translations/id.js +1 -1
  134. package/src/assets/qms-ckeditor-plugin/build/translations/it.js +1 -1
  135. package/src/assets/qms-ckeditor-plugin/build/translations/ja.js +1 -1
  136. package/src/assets/qms-ckeditor-plugin/build/translations/km.js +1 -1
  137. package/src/assets/qms-ckeditor-plugin/build/translations/kn.js +1 -1
  138. package/src/assets/qms-ckeditor-plugin/build/translations/ko.js +1 -1
  139. package/src/assets/qms-ckeditor-plugin/build/translations/ku.js +1 -1
  140. package/src/assets/qms-ckeditor-plugin/build/translations/lt.js +1 -1
  141. package/src/assets/qms-ckeditor-plugin/build/translations/lv.js +1 -1
  142. package/src/assets/qms-ckeditor-plugin/build/translations/nb.js +1 -1
  143. package/src/assets/qms-ckeditor-plugin/build/translations/ne.js +1 -1
  144. package/src/assets/qms-ckeditor-plugin/build/translations/nl.js +1 -1
  145. package/src/assets/qms-ckeditor-plugin/build/translations/no.js +1 -1
  146. package/src/assets/qms-ckeditor-plugin/build/translations/pl.js +1 -1
  147. package/src/assets/qms-ckeditor-plugin/build/translations/pt-br.js +1 -1
  148. package/src/assets/qms-ckeditor-plugin/build/translations/pt.js +1 -1
  149. package/src/assets/qms-ckeditor-plugin/build/translations/ro.js +1 -1
  150. package/src/assets/qms-ckeditor-plugin/build/translations/ru.js +1 -1
  151. package/src/assets/qms-ckeditor-plugin/build/translations/sk.js +1 -1
  152. package/src/assets/qms-ckeditor-plugin/build/translations/sl.js +1 -1
  153. package/src/assets/qms-ckeditor-plugin/build/translations/sq.js +1 -1
  154. package/src/assets/qms-ckeditor-plugin/build/translations/sr-latn.js +1 -1
  155. package/src/assets/qms-ckeditor-plugin/build/translations/sr.js +1 -1
  156. package/src/assets/qms-ckeditor-plugin/build/translations/sv.js +1 -1
  157. package/src/assets/qms-ckeditor-plugin/build/translations/th.js +1 -1
  158. package/src/assets/qms-ckeditor-plugin/build/translations/tk.js +1 -1
  159. package/src/assets/qms-ckeditor-plugin/build/translations/tr.js +1 -1
  160. package/src/assets/qms-ckeditor-plugin/build/translations/ug.js +1 -1
  161. package/src/assets/qms-ckeditor-plugin/build/translations/uk.js +1 -1
  162. package/src/assets/qms-ckeditor-plugin/build/translations/vi.js +1 -1
  163. package/src/assets/qms-ckeditor-plugin/build/translations/zh-cn.js +1 -1
  164. package/src/assets/qms-ckeditor-plugin/build/translations/zh.js +1 -1
  165. package/src/assets/qms-ckeditor-plugin/package-lock.json +12632 -345
  166. package/src/assets/qms-ckeditor-plugin/package.json +0 -2
  167. package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +8 -8
  168. package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorService.js +9 -0
  169. package/src/assets/qms-ckeditor-plugin/src/plugins/flowchart/flowchartdialogcommand.js +47 -0
  170. package/src/assets/qms-ckeditor-plugin/src/plugins/flowchart/qmsCKEditorFlowchartPlugin.js +30 -0
  171. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/heading.js +119 -0
  172. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingbuttonsui.js +103 -0
  173. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingcommand.js +96 -0
  174. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingediting.js +163 -0
  175. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingui.js +115 -0
  176. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/index.js +22 -0
  177. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/heading.css +35 -0
  178. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading1.svg +1 -0
  179. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading2.svg +1 -0
  180. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading3.svg +1 -0
  181. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading4.svg +1 -0
  182. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading5.svg +1 -0
  183. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading6.svg +1 -0
  184. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/title.js +598 -0
  185. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/utils.js +42 -0
  186. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/insertcolumncommand.js +83 -0
  187. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/insertrowcommand.js +82 -0
  188. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/inserttablecommand.js +76 -0
  189. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/mergecellcommand.js +272 -0
  190. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/mergecellscommand.js +122 -0
  191. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/removecolumncommand.js +122 -0
  192. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/removerowcommand.js +97 -0
  193. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/selectcolumncommand.js +63 -0
  194. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/selectrowcommand.js +56 -0
  195. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/setheadercolumncommand.js +95 -0
  196. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/setheaderrowcommand.js +105 -0
  197. package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/splitcellcommand.js +68 -0
  198. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/downcast.js +529 -0
  199. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-cell-paragraph-post-fixer.js +136 -0
  200. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-cell-refresh-post-fixer.js +75 -0
  201. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-heading-rows-refresh-post-fixer.js +55 -0
  202. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-layout-post-fixer.js +399 -0
  203. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/tableproperties.js +126 -0
  204. package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/upcasttable.js +211 -0
  205. package/src/assets/qms-ckeditor-plugin/src/plugins/table/index.js +42 -0
  206. package/src/assets/qms-ckeditor-plugin/src/plugins/table/table.js +103 -0
  207. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +35 -0
  208. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellbordercolorcommand.js +47 -0
  209. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellborderstylecommand.js +47 -0
  210. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellborderwidthcommand.js +62 -0
  211. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellheightcommand.js +51 -0
  212. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +35 -0
  213. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellpaddingcommand.js +62 -0
  214. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellpropertycommand.js +110 -0
  215. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellverticalalignmentcommand.js +43 -0
  216. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellwidthcommand.js +51 -0
  217. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/tablecellpropertiesediting.js +204 -0
  218. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/tablecellpropertiesui.js +401 -0
  219. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/ui/tablecellpropertiesview.js +829 -0
  220. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties.js +80 -0
  221. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableclipboard.js +586 -0
  222. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableediting.js +160 -0
  223. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablekeyboard.js +343 -0
  224. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablemouse/mouseeventsobserver.js +72 -0
  225. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablemouse.js +218 -0
  226. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablealignmentcommand.js +35 -0
  227. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablebackgroundcolorcommand.js +35 -0
  228. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablebordercolorcommand.js +47 -0
  229. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableborderstylecommand.js +47 -0
  230. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableborderwidthcommand.js +62 -0
  231. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableheightcommand.js +51 -0
  232. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablepropertycommand.js +98 -0
  233. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablewidthcommand.js +51 -0
  234. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/tablepropertiesediting.js +182 -0
  235. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/tablepropertiesui.js +397 -0
  236. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/ui/tablepropertiesview.js +714 -0
  237. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties.js +81 -0
  238. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableselection.js +357 -0
  239. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tabletoolbar.js +111 -0
  240. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableui.js +359 -0
  241. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableutils.js +909 -0
  242. package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablewalker.js +538 -0
  243. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/colorinput.css +39 -0
  244. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/form.css +11 -0
  245. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/formrow.css +23 -0
  246. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-cell-properties.svg +1 -0
  247. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-column.svg +1 -0
  248. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-merge-cell.svg +1 -0
  249. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-properties.svg +1 -0
  250. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-row.svg +1 -0
  251. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table.svg +1 -0
  252. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/inserttable.css +10 -0
  253. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/snippet.css +3876 -0
  254. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/table.css +67 -0
  255. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tablecaption.css +53 -0
  256. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tablecellproperties.css +28 -0
  257. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableediting.css +10 -0
  258. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableform.css +59 -0
  259. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableproperties.css +18 -0
  260. package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableselection.css +10 -0
  261. package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/colorinputview.js +343 -0
  262. package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/formrowview.js +103 -0
  263. package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/inserttableview.js +222 -0
  264. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/common.js +57 -0
  265. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/selection.js +276 -0
  266. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/structure.js +543 -0
  267. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/table-properties.js +66 -0
  268. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/contextualballoon.js +130 -0
  269. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/table-properties.js +397 -0
  270. package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/widget.js +62 -0
  271. package/src/assets/qms-ckeditor-plugin/src/themes/icons/flowchart.svg +507 -0
  272. package/src/lib/components/comment/comment.scss +1 -0
  273. package/src/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.scss +1 -0
  274. package/src/lib/components/qms-paginator/qms-paginator.component.scss +4 -1
  275. package/src/lib/qms-ckeditor-components/common/flowchart/assets/image-icon1.svg +1 -0
  276. package/src/lib/qms-ckeditor-components/common/flowchart/assets/image-icon2.svg +6 -0
  277. package/src/lib/qms-ckeditor-components/common/flowchart/assets/image-icon3.svg +11 -0
  278. package/src/lib/qms-ckeditor-components/common/flowchart/assets/image-icon4.svg +8 -0
  279. package/src/lib/qms-ckeditor-components/common/flowchart/assets/member-female.png +0 -0
  280. package/src/lib/qms-ckeditor-components/common/flowchart/assets/member-male.png +0 -0
  281. package/src/lib/qms-ckeditor-components/common/flowchart/assets/no-color-icon.svg +72 -0
  282. package/src/lib/qms-ckeditor-components/common/flowchart/assets/toolbar-icons-material.png +0 -0
  283. package/src/lib/qms-ckeditor-components/common/flowchart/assets/toolbar-icons-modern.png +0 -0
  284. package/src/lib/qms-ckeditor-components/common/flowchart/assets/transparent-icon.svg +50 -0
  285. package/src/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.scss +68 -0
  286. package/src/lib/qms-ckeditor-components/styles/_modules.scss +9 -0
  287. package/src/themes/core/_mat-icon.scss +60 -60
  288. package/src/themes/core/_table.scss +72 -4
  289. package/src/themes/core/_typography.scss +108 -108
@@ -0,0 +1,211 @@
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/converters/upcasttable
8
+ */
9
+
10
+ import { createEmptyTableCell } from '../utils/common';
11
+
12
+ /**
13
+ * View table element to model table element conversion helper.
14
+ *
15
+ * This conversion helper converts the table element as well as table rows.
16
+ *
17
+ * @returns {Function} Conversion helper.
18
+ */
19
+ export default function upcastTable() {
20
+ return dispatcher => {
21
+ dispatcher.on( 'element:table', ( evt, data, conversionApi ) => {
22
+ const viewTable = data.viewItem;
23
+
24
+ // When element was already consumed then skip it.
25
+ if ( !conversionApi.consumable.test( viewTable, { name: true } ) ) {
26
+ return;
27
+ }
28
+
29
+ const { rows, headingRows, headingColumns } = scanTable( viewTable );
30
+
31
+ // Only set attributes if values is greater then 0.
32
+ const attributes = {};
33
+
34
+ if ( headingColumns ) {
35
+ attributes.headingColumns = headingColumns;
36
+ }
37
+
38
+ if ( headingRows ) {
39
+ attributes.headingRows = headingRows;
40
+ }
41
+
42
+ const table = conversionApi.writer.createElement( 'table', attributes );
43
+
44
+ if ( !conversionApi.safeInsert( table, data.modelCursor ) ) {
45
+ return;
46
+ }
47
+
48
+ conversionApi.consumable.consume( viewTable, { name: true } );
49
+
50
+ // Upcast table rows in proper order (heading rows first).
51
+ rows.forEach( row => conversionApi.convertItem( row, conversionApi.writer.createPositionAt( table, 'end' ) ) );
52
+
53
+ // Create one row and one table cell for empty table.
54
+ if ( table.isEmpty ) {
55
+ const row = conversionApi.writer.createElement( 'tableRow' );
56
+ conversionApi.writer.insert( row, conversionApi.writer.createPositionAt( table, 'end' ) );
57
+
58
+ createEmptyTableCell( conversionApi.writer, conversionApi.writer.createPositionAt( row, 'end' ) );
59
+ }
60
+
61
+ conversionApi.updateConversionResult( table, data );
62
+ } );
63
+ };
64
+ }
65
+
66
+ /**
67
+ * A conversion helper that skips empty <tr> elements from upcasting at the beginning of the table.
68
+ *
69
+ * An empty row is considered a table model error but when handling clipboard data there could be rows that contain only row-spanned cells
70
+ * and empty TR-s are used to maintain the table structure (also {@link module:table/tablewalker~TableWalker} assumes that there are only
71
+ * rows that have related `tableRow` elements).
72
+ *
73
+ * *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue
74
+ * of an improper table with all empty rows.
75
+ *
76
+ * @returns {Function} Conversion helper.
77
+ */
78
+ export function skipEmptyTableRow() {
79
+ return dispatcher => {
80
+ dispatcher.on( 'element:tr', ( evt, data ) => {
81
+ if ( data.viewItem.isEmpty && data.modelCursor.index == 0 ) {
82
+ evt.stop();
83
+ }
84
+ }, { priority: 'high' } );
85
+ };
86
+ }
87
+
88
+ /**
89
+ * A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.
90
+ *
91
+ * @returns {Function} Conversion helper.
92
+ */
93
+ export function ensureParagraphInTableCell( elementName ) {
94
+ return dispatcher => {
95
+ dispatcher.on( `element:${ elementName }`, ( evt, data, conversionApi ) => {
96
+ // The default converter will create a model range on converted table cell.
97
+ if ( !data.modelRange ) {
98
+ return;
99
+ }
100
+
101
+ // Ensure a paragraph in the model for empty table cells for converted table cells.
102
+ if ( data.viewItem.isEmpty ) {
103
+ const tableCell = data.modelRange.start.nodeAfter;
104
+ const modelCursor = conversionApi.writer.createPositionAt( tableCell, 0 );
105
+
106
+ conversionApi.writer.insertElement( 'paragraph', modelCursor );
107
+ }
108
+ }, { priority: 'low' } );
109
+ };
110
+ }
111
+
112
+ // Scans table rows and extracts required metadata from the table:
113
+ //
114
+ // headingRows - The number of rows that go as table headers.
115
+ // headingColumns - The maximum number of row headings.
116
+ // rows - Sorted `<tr>` elements as they should go into the model - ie. if `<thead>` is inserted after `<tbody>` in the view.
117
+ //
118
+ // @param {module:engine/view/element~Element} viewTable
119
+ // @returns {{headingRows, headingColumns, rows}}
120
+ function scanTable( viewTable ) {
121
+ const tableMeta = {
122
+ headingRows: 0,
123
+ headingColumns: 0
124
+ };
125
+
126
+ // The `<tbody>` and `<thead>` sections in the DOM do not have to be in order `<thead>` -> `<tbody>` and there might be more than one
127
+ // of them.
128
+ // As the model does not have these sections, rows from different sections must be sorted.
129
+ // For example, below is a valid HTML table:
130
+ //
131
+ // <table>
132
+ // <tbody><tr><td>2</td></tr></tbody>
133
+ // <thead><tr><td>1</td></tr></thead>
134
+ // <tbody><tr><td>3</td></tr></tbody>
135
+ // </table>
136
+ //
137
+ // But browsers will render rows in order as: 1 as the heading and 2 and 3 as the body.
138
+ const headRows = [];
139
+ const bodyRows = [];
140
+
141
+ // Currently the editor does not support more then one <thead> section.
142
+ // Only the first <thead> from the view will be used as a heading row and the others will be converted to body rows.
143
+ let firstTheadElement;
144
+
145
+ for ( const tableChild of Array.from( viewTable.getChildren() ) ) {
146
+ // Only `<thead>`, `<tbody>` & `<tfoot>` from allowed table children can have `<tr>`s.
147
+ // The else is for future purposes (mainly `<caption>`).
148
+ if ( tableChild.name === 'tbody' || tableChild.name === 'thead' || tableChild.name === 'tfoot' ) {
149
+ // Save the first `<thead>` in the table as table header - all other ones will be converted to table body rows.
150
+ if ( tableChild.name === 'thead' && !firstTheadElement ) {
151
+ firstTheadElement = tableChild;
152
+ }
153
+
154
+ // There might be some extra empty text nodes between the `<tr>`s.
155
+ // Make sure further code operates on `tr`s only. (#145)
156
+ const trs = Array.from( tableChild.getChildren() ).filter( el => el.is( 'element', 'tr' ) );
157
+
158
+ for ( const tr of trs ) {
159
+ // This <tr> is a child of a first <thead> element.
160
+ if ( tr.parent.name === 'thead' && tr.parent === firstTheadElement ) {
161
+ tableMeta.headingRows++;
162
+ headRows.push( tr );
163
+ } else {
164
+ bodyRows.push( tr );
165
+ // For other rows check how many column headings this row has.
166
+
167
+ const headingCols = scanRowForHeadingColumns( tr, tableMeta, firstTheadElement );
168
+
169
+ if ( headingCols > tableMeta.headingColumns ) {
170
+ tableMeta.headingColumns = headingCols;
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+
177
+ tableMeta.rows = [ ...headRows, ...bodyRows ];
178
+
179
+ return tableMeta;
180
+ }
181
+
182
+ // Scans a `<tr>` element and its children for metadata:
183
+ // - For heading row:
184
+ // - Adds this row to either the heading or the body rows.
185
+ // - Updates the number of heading rows.
186
+ // - For body rows:
187
+ // - Calculates the number of column headings.
188
+ //
189
+ // @param {module:engine/view/element~Element} tr
190
+ // @returns {Number}
191
+ function scanRowForHeadingColumns( tr ) {
192
+ let headingColumns = 0;
193
+ let index = 0;
194
+
195
+ // Filter out empty text nodes from tr children.
196
+ const children = Array.from( tr.getChildren() )
197
+ .filter( child => child.name === 'th' || child.name === 'td' );
198
+
199
+ // Count starting adjacent <th> elements of a <tr>.
200
+ while ( index < children.length && children[ index ].name === 'th' ) {
201
+ const th = children[ index ];
202
+
203
+ // Adjust columns calculation by the number of spanned columns.
204
+ const colspan = parseInt( th.getAttribute( 'colspan' ) || 1 );
205
+
206
+ headingColumns = headingColumns + colspan;
207
+ index++;
208
+ }
209
+
210
+ return headingColumns;
211
+ }
@@ -0,0 +1,42 @@
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
8
+ */
9
+
10
+ import Table from './table';
11
+ import TableEditing from './tableediting';
12
+ import TableUI from './tableui';
13
+ import TableToolbar from './tabletoolbar';
14
+ import TableCellProperties from './tablecellproperties';
15
+ import TableCellPropertiesEditing from './tablecellproperties/tablecellpropertiesediting';
16
+ import TableCellPropertiesUI from './tablecellproperties/tablecellpropertiesui';
17
+ import TableProperties from './tableproperties';
18
+ import TablePropertiesEditing from './tableproperties/tablepropertiesediting';
19
+ import TablePropertiesUI from './tableproperties/tablepropertiesui';
20
+ import TableClipboard from './tableclipboard';
21
+ import TableMouse from './tablemouse';
22
+ import TableKeyboard from './tablekeyboard';
23
+ import TableSelection from './tableselection';
24
+ import TableUtils from './tableutils';
25
+
26
+ export default {
27
+ Table,
28
+ TableEditing,
29
+ TableUI,
30
+ TableToolbar,
31
+ TableCellProperties,
32
+ TableCellPropertiesEditing,
33
+ TableCellPropertiesUI,
34
+ TableProperties,
35
+ TablePropertiesEditing,
36
+ TablePropertiesUI,
37
+ TableMouse,
38
+ TableClipboard,
39
+ TableKeyboard,
40
+ TableSelection,
41
+ TableUtils
42
+ };
@@ -0,0 +1,103 @@
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/table
8
+ */
9
+
10
+ import { Plugin } from 'ckeditor5/src/core';
11
+ import { Widget } from 'ckeditor5/src/widget';
12
+
13
+ import TableEditing from './tableediting';
14
+ import TableUI from './tableui';
15
+ import TableSelection from './tableselection';
16
+ import TableClipboard from './tableclipboard';
17
+ import TableKeyboard from './tablekeyboard';
18
+ import TableMouse from './tablemouse';
19
+
20
+ import './theme/table.css';
21
+
22
+ /**
23
+ * The table plugin.
24
+ *
25
+ * For a detailed overview, check the {@glink features/table Table feature documentation}.
26
+ *
27
+ * This is a "glue" plugin that loads the following table features:
28
+ *
29
+ * * {@link module:table/tableediting~TableEditing editing feature},
30
+ * * {@link module:table/tableselection~TableSelection selection feature},
31
+ * * {@link module:table/tablekeyboard~TableKeyboard keyboard navigation feature},
32
+ * * {@link module:table/tablemouse~TableMouse mouse selection feature},
33
+ * * {@link module:table/tableclipboard~TableClipboard clipboard feature},
34
+ * * {@link module:table/tableui~TableUI UI feature}.
35
+ *
36
+ * @extends module:core/plugin~Plugin
37
+ */
38
+ export default class Table extends Plugin {
39
+ /**
40
+ * @inheritDoc
41
+ */
42
+ static get requires() {
43
+ return [ TableEditing, TableUI, TableSelection, TableMouse, TableKeyboard, TableClipboard, Widget ];
44
+ }
45
+
46
+ /**
47
+ * @inheritDoc
48
+ */
49
+ static get pluginName() {
50
+ return 'Table';
51
+ }
52
+ }
53
+
54
+ /**
55
+ * The configuration of the table feature. Used by the table feature in the `@ckeditor/ckeditor5-table` package.
56
+ *
57
+ * ClassicEditor
58
+ * .create( editorElement, {
59
+ * table: ... // Table feature options.
60
+ * } )
61
+ * .then( ... )
62
+ * .catch( ... );
63
+ *
64
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
65
+ *
66
+ * @interface TableConfig
67
+ */
68
+
69
+ /**
70
+ * The configuration of the {@link module:table/table~Table} feature.
71
+ *
72
+ * Read more in {@link module:table/table~TableConfig}.
73
+ *
74
+ * @member {module:table/table~TableConfig} module:core/editor/editorconfig~EditorConfig#table
75
+ */
76
+
77
+ /**
78
+ * An array of color definitions (either strings or objects).
79
+ *
80
+ * const colors = [
81
+ * {
82
+ * color: 'hsl(0, 0%, 60%)',
83
+ * label: 'Grey'
84
+ * },
85
+ * 'hsl(0, 0%, 80%)',
86
+ * {
87
+ * color: 'hsl(0, 0%, 90%)',
88
+ * label: 'Light grey'
89
+ * },
90
+ * {
91
+ * color: 'hsl(0, 0%, 100%)',
92
+ * label: 'White',
93
+ * hasBorder: true
94
+ * },
95
+ * '#FF0000'
96
+ * ]
97
+ *
98
+ * Usually used as a configuration parameter, for instance in
99
+ * {@link module:table/table~TableConfig#tableProperties `config.table.tableProperties`}
100
+ * or {@link module:table/table~TableConfig#tableCellProperties `config.table.tableCellProperties`}.
101
+ *
102
+ * @typedef {Array.<String|Object>} module:table/table~TableColorConfig
103
+ */
@@ -0,0 +1,35 @@
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/tablecellproperties/commands/tablecellbackgroundcolorcommand
8
+ */
9
+
10
+ import TableCellPropertyCommand from './tablecellpropertycommand';
11
+
12
+ /**
13
+ * The table cell background color command.
14
+ *
15
+ * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
16
+ * the `'tableCellBackgroundColor'` editor command.
17
+ *
18
+ * To change the background color of selected cells, execute the command:
19
+ *
20
+ * editor.execute( 'tableCellBackgroundColor', {
21
+ * value: '#f00'
22
+ * } );
23
+ *
24
+ * @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
25
+ */
26
+ export default class TableCellBackgroundColorCommand extends TableCellPropertyCommand {
27
+ /**
28
+ * Creates a new `TableCellBackgroundColorCommand` instance.
29
+ *
30
+ * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
31
+ */
32
+ constructor( editor ) {
33
+ super( editor, 'backgroundColor' );
34
+ }
35
+ }
@@ -0,0 +1,47 @@
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/tablecellproperties/commands/tablecellbordercolorcommand
8
+ */
9
+
10
+ import TableCellPropertyCommand from './tablecellpropertycommand';
11
+ import { getSingleValue } from '../../utils/table-properties';
12
+
13
+ /**
14
+ * The table cell border color command.
15
+ *
16
+ * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
17
+ * the `'tableCellBorderColor'` editor command.
18
+ *
19
+ * To change the border color of selected cells, execute the command:
20
+ *
21
+ * editor.execute( 'tableCellBorderColor', {
22
+ * value: '#f00'
23
+ * } );
24
+ *
25
+ * @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
26
+ */
27
+ export default class TableCellBorderColorCommand extends TableCellPropertyCommand {
28
+ /**
29
+ * Creates a new `TableCellBorderColorCommand` instance.
30
+ *
31
+ * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
32
+ */
33
+ constructor( editor ) {
34
+ super( editor, 'borderColor' );
35
+ }
36
+
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ _getAttribute( tableCell ) {
41
+ if ( !tableCell ) {
42
+ return;
43
+ }
44
+
45
+ return getSingleValue( tableCell.getAttribute( this.attributeName ) );
46
+ }
47
+ }
@@ -0,0 +1,47 @@
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/tablecellproperties/commands/tablecellborderstylecommand
8
+ */
9
+
10
+ import TableCellPropertyCommand from './tablecellpropertycommand';
11
+ import { getSingleValue } from '../../utils/table-properties';
12
+
13
+ /**
14
+ * The table cell border style command.
15
+ *
16
+ * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
17
+ * the `'tableCellBorderStyle'` editor command.
18
+ *
19
+ * To change the border style of selected cells, execute the command:
20
+ *
21
+ * editor.execute( 'tableCellBorderStyle', {
22
+ * value: 'dashed'
23
+ * } );
24
+ *
25
+ * @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
26
+ */
27
+ export default class TableCellBorderStyleCommand extends TableCellPropertyCommand {
28
+ /**
29
+ * Creates a new `TableCellBorderStyleCommand` instance.
30
+ *
31
+ * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
32
+ */
33
+ constructor( editor ) {
34
+ super( editor, 'borderStyle' );
35
+ }
36
+
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ _getAttribute( tableCell ) {
41
+ if ( !tableCell ) {
42
+ return;
43
+ }
44
+
45
+ return getSingleValue( tableCell.getAttribute( this.attributeName ) );
46
+ }
47
+ }
@@ -0,0 +1,62 @@
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/tablecellproperties/commands/tablecellborderwidthcommand
8
+ */
9
+
10
+ import TableCellPropertyCommand from './tablecellpropertycommand';
11
+ import { addDefaultUnitToNumericValue, getSingleValue } from '../../utils/table-properties';
12
+
13
+ /**
14
+ * The table cell border width command.
15
+ *
16
+ * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
17
+ * the `'tableCellBorderWidth'` editor command.
18
+ *
19
+ * To change the border width of selected cells, execute the command:
20
+ *
21
+ * editor.execute( 'tableCellBorderWidth', {
22
+ * value: '5px'
23
+ * } );
24
+ *
25
+ * **Note**: This command adds the default `'px'` unit to numeric values. Executing:
26
+ *
27
+ * editor.execute( 'tableCellBorderWidth', {
28
+ * value: '5'
29
+ * } );
30
+ *
31
+ * will set the `borderWidth` attribute to `'5px'` in the model.
32
+ *
33
+ * @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
34
+ */
35
+ export default class TableCellBorderWidthCommand extends TableCellPropertyCommand {
36
+ /**
37
+ * Creates a new `TableCellBorderWidthCommand` instance.
38
+ *
39
+ * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
40
+ */
41
+ constructor( editor ) {
42
+ super( editor, 'borderWidth' );
43
+ }
44
+
45
+ /**
46
+ * @inheritDoc
47
+ */
48
+ _getAttribute( tableCell ) {
49
+ if ( !tableCell ) {
50
+ return;
51
+ }
52
+
53
+ return getSingleValue( tableCell.getAttribute( this.attributeName ) );
54
+ }
55
+
56
+ /**
57
+ * @inheritDoc
58
+ */
59
+ _getValueToSet( value ) {
60
+ return addDefaultUnitToNumericValue( value, 'px' );
61
+ }
62
+ }
@@ -0,0 +1,51 @@
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/tablecellproperties/commands/tablecellheightcommand
8
+ */
9
+
10
+ import TableCellPropertyCommand from './tablecellpropertycommand';
11
+ import { addDefaultUnitToNumericValue } from '../../utils/table-properties';
12
+
13
+ /**
14
+ * The table cell height command.
15
+ *
16
+ * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
17
+ * the `'tableCellHeight'` editor command.
18
+ *
19
+ * To change the height of selected cells, execute the command:
20
+ *
21
+ * editor.execute( 'tableCellHeight', {
22
+ * value: '50px'
23
+ * } );
24
+ *
25
+ * **Note**: This command adds the default `'px'` unit to numeric values. Executing:
26
+ *
27
+ * editor.execute( 'tableCellHeight', {
28
+ * value: '50'
29
+ * } );
30
+ *
31
+ * will set the `height` attribute to `'50px'` in the model.
32
+ *
33
+ * @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
34
+ */
35
+ export default class TableCellHeightCommand extends TableCellPropertyCommand {
36
+ /**
37
+ * Creates a new `TableCellHeightCommand` instance.
38
+ *
39
+ * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
40
+ */
41
+ constructor( editor ) {
42
+ super( editor, 'height' );
43
+ }
44
+
45
+ /**
46
+ * @inheritDoc
47
+ */
48
+ _getValueToSet( value ) {
49
+ return addDefaultUnitToNumericValue( value, 'px' );
50
+ }
51
+ }
@@ -0,0 +1,35 @@
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/tablecellproperties/commands/tablecellhorizontalalignmentcommand
8
+ */
9
+
10
+ import TableCellPropertyCommand from './tablecellpropertycommand';
11
+
12
+ /**
13
+ * The table cell horizontal alignment command.
14
+ *
15
+ * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
16
+ * the `'tableCellHorizontalAlignment'` editor command.
17
+ *
18
+ * To change the horizontal text alignment of selected cells, execute the command:
19
+ *
20
+ * editor.execute( 'tableCellHorizontalAlignment', {
21
+ * value: 'right'
22
+ * } );
23
+ *
24
+ * @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
25
+ */
26
+ export default class TableCellHorizontalAlignmentCommand extends TableCellPropertyCommand {
27
+ /**
28
+ * Creates a new `TableCellHorizontalAlignmentCommand` instance.
29
+ *
30
+ * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
31
+ */
32
+ constructor( editor ) {
33
+ super( editor, 'horizontalAlignment' );
34
+ }
35
+ }