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,714 @@
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/tableproperties/ui/tablepropertiesview
8
+ */
9
+
10
+ import {
11
+ ButtonView,
12
+ FocusCycler,
13
+ FormHeaderView,
14
+ LabelView,
15
+ LabeledFieldView,
16
+ ToolbarView,
17
+ View,
18
+ ViewCollection,
19
+ addListToDropdown,
20
+ createLabeledDropdown,
21
+ createLabeledInputText,
22
+ submitHandler
23
+ } from 'ckeditor5/src/ui';
24
+ import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils';
25
+ import { icons } from 'ckeditor5/src/core';
26
+
27
+ import {
28
+ fillToolbar,
29
+ getBorderStyleDefinitions,
30
+ getBorderStyleLabels,
31
+ getLabeledColorInputCreator
32
+ } from '../../utils/ui/table-properties';
33
+ import FormRowView from '../../ui/formrowview';
34
+
35
+ import '../../theme/form.css';
36
+ import '../../theme/tableform.css';
37
+ import '../../theme/tableproperties.css';
38
+
39
+ const ALIGNMENT_ICONS = {
40
+ left: icons.objectLeft,
41
+ center: icons.objectCenter,
42
+ right: icons.objectRight
43
+ };
44
+
45
+ /**
46
+ * The class representing a table properties form, allowing users to customize
47
+ * certain style aspects of a table, for instance, border, background color, alignment, etc..
48
+ *
49
+ * @extends module:ui/view~View
50
+ */
51
+ export default class TablePropertiesView extends View {
52
+ /**
53
+ * @param {module:utils/locale~Locale} locale The {@link module:core/editor/editor~Editor#locale} instance.
54
+ * @param {Object} options Additional configuration of the view.
55
+ * @param {module:table/table~TableColorConfig} options.borderColors A configuration of the border
56
+ * color palette used by the
57
+ * {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView#borderColorInput}.
58
+ * @param {module:table/table~TableColorConfig} options.backgroundColors A configuration of the background
59
+ * color palette used by the
60
+ * {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView#backgroundInput}.
61
+ */
62
+ constructor( locale, options ) {
63
+ super( locale );
64
+
65
+ this.set( {
66
+ /**
67
+ * The value of the border style.
68
+ *
69
+ * @observable
70
+ * @default ''
71
+ * @member #borderStyle
72
+ */
73
+ borderStyle: '',
74
+
75
+ /**
76
+ * The value of the border width style.
77
+ *
78
+ * @observable
79
+ * @default ''
80
+ * @member #borderWidth
81
+ */
82
+ borderWidth: '',
83
+
84
+ /**
85
+ * The value of the border color style.
86
+ *
87
+ * @observable
88
+ * @default ''
89
+ * @member #borderColor
90
+ */
91
+ borderColor: '',
92
+
93
+ /**
94
+ * The value of the background color style.
95
+ *
96
+ * @observable
97
+ * @default ''
98
+ * @member #backgroundColor
99
+ */
100
+ backgroundColor: '',
101
+
102
+ /**
103
+ * The value of the table width style.
104
+ *
105
+ * @observable
106
+ * @default ''
107
+ * @member #width
108
+ */
109
+ width: '',
110
+
111
+ /**
112
+ * The value of the table height style.
113
+ *
114
+ * @observable
115
+ * @default ''
116
+ * @member #height
117
+ */
118
+ height: '',
119
+
120
+ /**
121
+ * The value of the table alignment style.
122
+ *
123
+ * @observable
124
+ * @default ''
125
+ * @member #alignment
126
+ */
127
+ alignment: ''
128
+ } );
129
+
130
+ /**
131
+ * Options passed to the view. See {@link #constructor} to learn more.
132
+ *
133
+ * @protected
134
+ * @member {Object}
135
+ */
136
+ this.options = options;
137
+
138
+ const { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();
139
+ const { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();
140
+ const { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();
141
+ const { alignmentToolbar, alignmentLabel } = this._createAlignmentFields();
142
+
143
+ /**
144
+ * Tracks information about the DOM focus in the form.
145
+ *
146
+ * @readonly
147
+ * @member {module:utils/focustracker~FocusTracker}
148
+ */
149
+ this.focusTracker = new FocusTracker();
150
+
151
+ /**
152
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
153
+ *
154
+ * @readonly
155
+ * @member {module:utils/keystrokehandler~KeystrokeHandler}
156
+ */
157
+ this.keystrokes = new KeystrokeHandler();
158
+
159
+ /**
160
+ * A collection of child views in the form.
161
+ *
162
+ * @readonly
163
+ * @type {module:ui/viewcollection~ViewCollection}
164
+ */
165
+ this.children = this.createCollection();
166
+
167
+ /**
168
+ * A dropdown that allows selecting the style of the table border.
169
+ *
170
+ * @readonly
171
+ * @member {module:ui/dropdown/dropdownview~DropdownView}
172
+ */
173
+ this.borderStyleDropdown = borderStyleDropdown;
174
+
175
+ /**
176
+ * An input that allows specifying the width of the table border.
177
+ *
178
+ * @readonly
179
+ * @member {module:ui/inputtext/inputtextview~InputTextView}
180
+ */
181
+ this.borderWidthInput = borderWidthInput;
182
+
183
+ /**
184
+ * An input that allows specifying the color of the table border.
185
+ *
186
+ * @readonly
187
+ * @member {module:table/ui/colorinputview~ColorInputView}
188
+ */
189
+ this.borderColorInput = borderColorInput;
190
+
191
+ /**
192
+ * An input that allows specifying the table background color.
193
+ *
194
+ * @readonly
195
+ * @member {module:table/ui/colorinputview~ColorInputView}
196
+ */
197
+ this.backgroundInput = backgroundInput;
198
+
199
+ /**
200
+ * An input that allows specifying the table width.
201
+ *
202
+ * @readonly
203
+ * @member {module:ui/inputtext/inputtextview~InputTextView}
204
+ */
205
+ this.widthInput = widthInput;
206
+
207
+ /**
208
+ * An input that allows specifying the table height.
209
+ *
210
+ * @readonly
211
+ * @member {module:ui/inputtext/inputtextview~InputTextView}
212
+ */
213
+ this.heightInput = heightInput;
214
+
215
+ /**
216
+ * A toolbar with buttons that allow changing the alignment of an entire table.
217
+ * @readonly
218
+ * @member {module:ui/toolbar/toolbar~ToolbarView}
219
+ */
220
+ this.alignmentToolbar = alignmentToolbar;
221
+
222
+ // Defer creating to make sure other fields are present and the Save button can
223
+ // bind its #isEnabled to their error messages so there's no way to save unless all
224
+ // fields are valid.
225
+ const { saveButtonView, cancelButtonView } = this._createActionButtons();
226
+
227
+ /**
228
+ * The "Save" button view.
229
+ *
230
+ * @member {module:ui/button/buttonview~ButtonView}
231
+ */
232
+ this.saveButtonView = saveButtonView;
233
+
234
+ /**
235
+ * The "Cancel" button view.
236
+ *
237
+ * @member {module:ui/button/buttonview~ButtonView}
238
+ */
239
+ this.cancelButtonView = cancelButtonView;
240
+
241
+ /**
242
+ * A collection of views that can be focused in the form.
243
+ *
244
+ * @readonly
245
+ * @protected
246
+ * @member {module:ui/viewcollection~ViewCollection}
247
+ */
248
+ this._focusables = new ViewCollection();
249
+
250
+ /**
251
+ * Helps cycling over {@link #_focusables} in the form.
252
+ *
253
+ * @readonly
254
+ * @protected
255
+ * @member {module:ui/focuscycler~FocusCycler}
256
+ */
257
+ this._focusCycler = new FocusCycler( {
258
+ focusables: this._focusables,
259
+ focusTracker: this.focusTracker,
260
+ keystrokeHandler: this.keystrokes,
261
+ actions: {
262
+ // Navigate form fields backwards using the Shift + Tab keystroke.
263
+ focusPrevious: 'shift + tab',
264
+
265
+ // Navigate form fields forwards using the Tab key.
266
+ focusNext: 'tab'
267
+ }
268
+ } );
269
+
270
+ // Form header.
271
+ this.children.add( new FormHeaderView( locale, {
272
+ label: this.t( 'Table properties' )
273
+ } ) );
274
+
275
+ // Border row.
276
+ this.children.add( new FormRowView( locale, {
277
+ labelView: borderRowLabel,
278
+ children: [
279
+ borderRowLabel,
280
+ borderStyleDropdown,
281
+ borderColorInput,
282
+ borderWidthInput
283
+ ],
284
+ class: 'ck-table-form__border-row'
285
+ } ) );
286
+
287
+ // Background row.
288
+ this.children.add( new FormRowView( locale, {
289
+ labelView: backgroundRowLabel,
290
+ children: [
291
+ backgroundRowLabel,
292
+ backgroundInput
293
+ ],
294
+ class: 'ck-table-form__background-row'
295
+ } ) );
296
+
297
+ this.children.add( new FormRowView( locale, {
298
+ children: [
299
+ // Dimensions row.
300
+ new FormRowView( locale, {
301
+ labelView: dimensionsLabel,
302
+ children: [
303
+ dimensionsLabel,
304
+ widthInput,
305
+ operatorLabel,
306
+ heightInput
307
+ ],
308
+ class: 'ck-table-form__dimensions-row'
309
+ } ),
310
+ // Alignment row.
311
+ new FormRowView( locale, {
312
+ labelView: alignmentLabel,
313
+ children: [
314
+ alignmentLabel,
315
+ alignmentToolbar
316
+ ],
317
+ class: 'ck-table-properties-form__alignment-row'
318
+ } )
319
+ ]
320
+ } ) );
321
+
322
+ // Action row.
323
+ this.children.add( new FormRowView( locale, {
324
+ children: [
325
+ this.saveButtonView,
326
+ this.cancelButtonView
327
+ ],
328
+ class: 'ck-table-form__action-row'
329
+ } ) );
330
+
331
+ this.setTemplate( {
332
+ tag: 'form',
333
+ attributes: {
334
+ class: [
335
+ 'ck',
336
+ 'ck-form',
337
+ 'ck-table-form',
338
+ 'ck-table-properties-form'
339
+ ],
340
+ // https://github.com/ckeditor/ckeditor5-link/issues/90
341
+ tabindex: '-1'
342
+ },
343
+ children: this.children
344
+ } );
345
+ }
346
+
347
+ /**
348
+ * @inheritDoc
349
+ */
350
+ render() {
351
+ super.render();
352
+
353
+ // Enable the "submit" event for this view. It can be triggered by the #saveButtonView
354
+ // which is of the "submit" DOM "type".
355
+ submitHandler( {
356
+ view: this
357
+ } );
358
+
359
+ [
360
+ this.borderStyleDropdown,
361
+ this.borderColorInput,
362
+ this.borderWidthInput,
363
+ this.backgroundInput,
364
+ this.widthInput,
365
+ this.heightInput,
366
+ this.alignmentToolbar,
367
+ this.saveButtonView,
368
+ this.cancelButtonView
369
+ ].forEach( view => {
370
+ // Register the view as focusable.
371
+ this._focusables.add( view );
372
+
373
+ // Register the view in the focus tracker.
374
+ this.focusTracker.add( view.element );
375
+ } );
376
+
377
+ // Mainly for closing using "Esc" and navigation using "Tab".
378
+ this.keystrokes.listenTo( this.element );
379
+ }
380
+
381
+ /**
382
+ * Focuses the fist focusable field in the form.
383
+ */
384
+ focus() {
385
+ this._focusCycler.focusFirst();
386
+ }
387
+
388
+ /**
389
+ * Creates the following form fields:
390
+ *
391
+ * * {@link #borderStyleDropdown},
392
+ * * {@link #borderWidthInput},
393
+ * * {@link #borderColorInput}.
394
+ *
395
+ * @private
396
+ * @returns {Object.<String,module:ui/view~View>}
397
+ */
398
+ _createBorderFields() {
399
+ const colorInputCreator = getLabeledColorInputCreator( {
400
+ colorConfig: this.options.borderColors,
401
+ columns: 5
402
+ } );
403
+ const locale = this.locale;
404
+ const t = this.t;
405
+
406
+ // -- Group label ---------------------------------------------
407
+
408
+ const borderRowLabel = new LabelView( locale );
409
+ borderRowLabel.text = t( 'Border' );
410
+
411
+ // -- Style ---------------------------------------------------
412
+
413
+ const styleLabels = getBorderStyleLabels( this.t );
414
+ const borderStyleDropdown = new LabeledFieldView( locale, createLabeledDropdown );
415
+ borderStyleDropdown.set( {
416
+ label: t( 'Style' ),
417
+ class: 'ck-table-form__border-style'
418
+ } );
419
+
420
+ borderStyleDropdown.fieldView.buttonView.set( {
421
+ isOn: false,
422
+ withText: true,
423
+ tooltip: t( 'Style' )
424
+ } );
425
+
426
+ borderStyleDropdown.fieldView.buttonView.bind( 'label' ).to( this, 'borderStyle', value => {
427
+ return styleLabels[ value ? value : 'none' ];
428
+ } );
429
+
430
+ borderStyleDropdown.fieldView.on( 'execute', evt => {
431
+ this.borderStyle = evt.source._borderStyleValue;
432
+ } );
433
+
434
+ borderStyleDropdown.bind( 'isEmpty' ).to( this, 'borderStyle', value => !value );
435
+
436
+ addListToDropdown( borderStyleDropdown.fieldView, getBorderStyleDefinitions( this ) );
437
+
438
+ // -- Width ---------------------------------------------------
439
+
440
+ const borderWidthInput = new LabeledFieldView( locale, createLabeledInputText );
441
+
442
+ borderWidthInput.set( {
443
+ label: t( 'Width' ),
444
+ class: 'ck-table-form__border-width'
445
+ } );
446
+
447
+ borderWidthInput.fieldView.bind( 'value' ).to( this, 'borderWidth' );
448
+ borderWidthInput.bind( 'isEnabled' ).to( this, 'borderStyle', isBorderStyleSet );
449
+ borderWidthInput.fieldView.on( 'input', () => {
450
+ this.borderWidth = borderWidthInput.fieldView.element.value;
451
+ } );
452
+
453
+ // -- Color ---------------------------------------------------
454
+
455
+ const borderColorInput = new LabeledFieldView( locale, colorInputCreator );
456
+
457
+ borderColorInput.set( {
458
+ label: t( 'Color' ),
459
+ class: 'ck-table-form__border-color'
460
+ } );
461
+
462
+ borderColorInput.fieldView.bind( 'value' ).to( this, 'borderColor' );
463
+ borderColorInput.bind( 'isEnabled' ).to( this, 'borderStyle', isBorderStyleSet );
464
+
465
+ borderColorInput.fieldView.on( 'input', () => {
466
+ this.borderColor = borderColorInput.fieldView.value;
467
+ } );
468
+
469
+ // Reset the border color and width fields when style is "none".
470
+ // https://github.com/ckeditor/ckeditor5/issues/6227
471
+ this.on( 'change:borderStyle', ( evt, name, value ) => {
472
+ if ( !isBorderStyleSet( value ) ) {
473
+ this.borderColor = '';
474
+ this.borderWidth = '';
475
+ }
476
+ } );
477
+
478
+ return {
479
+ borderRowLabel,
480
+ borderStyleDropdown,
481
+ borderColorInput,
482
+ borderWidthInput
483
+ };
484
+ }
485
+
486
+ /**
487
+ * Creates the following form fields:
488
+ *
489
+ * * {@link #backgroundInput}.
490
+ *
491
+ * @private
492
+ * @returns {Object.<String,module:ui/view~View>}
493
+ */
494
+ _createBackgroundFields() {
495
+ const locale = this.locale;
496
+ const t = this.t;
497
+
498
+ // -- Group label ---------------------------------------------
499
+
500
+ const backgroundRowLabel = new LabelView( locale );
501
+ backgroundRowLabel.text = t( 'Background' );
502
+
503
+ // -- Background color input -----------------------------------
504
+
505
+ const backgroundInputCreator = getLabeledColorInputCreator( {
506
+ colorConfig: this.options.backgroundColors,
507
+ columns: 5
508
+ } );
509
+
510
+ const backgroundInput = new LabeledFieldView( locale, backgroundInputCreator );
511
+
512
+ backgroundInput.set( {
513
+ label: t( 'Color' ),
514
+ class: 'ck-table-properties-form__background'
515
+ } );
516
+
517
+ backgroundInput.fieldView.bind( 'value' ).to( this, 'backgroundColor' );
518
+ backgroundInput.fieldView.on( 'input', () => {
519
+ this.backgroundColor = backgroundInput.fieldView.value;
520
+ } );
521
+
522
+ return {
523
+ backgroundRowLabel,
524
+ backgroundInput
525
+ };
526
+ }
527
+
528
+ /**
529
+ * Creates the following form fields:
530
+ *
531
+ * * {@link #widthInput}.
532
+ * * {@link #heightInput}.
533
+ *
534
+ * @private
535
+ * @returns {module:ui/labeledfield/labeledfieldview~LabeledFieldView}
536
+ */
537
+ _createDimensionFields() {
538
+ const locale = this.locale;
539
+ const t = this.t;
540
+
541
+ // -- Label ---------------------------------------------------
542
+
543
+ const dimensionsLabel = new LabelView( locale );
544
+ dimensionsLabel.text = t( 'Dimensions' );
545
+
546
+ // -- Width ---------------------------------------------------
547
+
548
+ const widthInput = new LabeledFieldView( locale, createLabeledInputText );
549
+
550
+ widthInput.set( {
551
+ label: t( 'Width' ),
552
+ class: 'ck-table-form__dimensions-row__width'
553
+ } );
554
+
555
+ widthInput.fieldView.bind( 'value' ).to( this, 'width' );
556
+ widthInput.fieldView.on( 'input', () => {
557
+ this.width = widthInput.fieldView.element.value;
558
+ } );
559
+
560
+ // -- Operator ---------------------------------------------------
561
+
562
+ const operatorLabel = new View( locale );
563
+ operatorLabel.setTemplate( {
564
+ tag: 'span',
565
+ attributes: {
566
+ class: [
567
+ 'ck-table-form__dimension-operator'
568
+ ]
569
+ },
570
+ children: [
571
+ { text: '×' }
572
+ ]
573
+ } );
574
+
575
+ // -- Height ---------------------------------------------------
576
+
577
+ const heightInput = new LabeledFieldView( locale, createLabeledInputText );
578
+
579
+ heightInput.set( {
580
+ label: t( 'Height' ),
581
+ class: 'ck-table-form__dimensions-row__height'
582
+ } );
583
+
584
+ heightInput.fieldView.bind( 'value' ).to( this, 'height' );
585
+ heightInput.fieldView.on( 'input', () => {
586
+ this.height = heightInput.fieldView.element.value;
587
+ } );
588
+
589
+ return {
590
+ dimensionsLabel,
591
+ widthInput,
592
+ operatorLabel,
593
+ heightInput
594
+ };
595
+ }
596
+
597
+ /**
598
+ * Creates the following form fields:
599
+ *
600
+ * * {@link #alignmentToolbar},
601
+ *
602
+ * @private
603
+ * @returns {Object.<String,module:ui/view~View>}
604
+ */
605
+ _createAlignmentFields() {
606
+ const locale = this.locale;
607
+ const t = this.t;
608
+
609
+ // -- Label ---------------------------------------------------
610
+
611
+ const alignmentLabel = new LabelView( locale );
612
+ alignmentLabel.text = t( 'Alignment' );
613
+
614
+ // -- Toolbar ---------------------------------------------------
615
+
616
+ const alignmentToolbar = new ToolbarView( locale );
617
+ alignmentToolbar.set( {
618
+ isCompact: true,
619
+ ariaLabel: t( 'Table alignment toolbar' )
620
+ } );
621
+
622
+ fillToolbar( {
623
+ view: this,
624
+ icons: ALIGNMENT_ICONS,
625
+ toolbar: alignmentToolbar,
626
+ labels: this._alignmentLabels,
627
+ propertyName: 'alignment',
628
+ nameToValue: name => {
629
+ return name === 'center' ? '' : name;
630
+ }
631
+ } );
632
+
633
+ return {
634
+ alignmentLabel,
635
+ alignmentToolbar
636
+ };
637
+ }
638
+
639
+ /**
640
+ * Creates the following form controls:
641
+ *
642
+ * * {@link #saveButtonView},
643
+ * * {@link #cancelButtonView}.
644
+ *
645
+ * @private
646
+ * @returns {Object.<String,module:ui/view~View>}
647
+ */
648
+ _createActionButtons() {
649
+ const locale = this.locale;
650
+ const t = this.t;
651
+
652
+ const saveButtonView = new ButtonView( locale );
653
+ const cancelButtonView = new ButtonView( locale );
654
+ const fieldsThatShouldValidateToSave = [
655
+ this.borderWidthInput,
656
+ this.borderColorInput,
657
+ this.backgroundInput,
658
+ this.widthInput,
659
+ this.heightInput
660
+ ];
661
+
662
+ saveButtonView.set( {
663
+ label: t( 'Save' ),
664
+ icon: icons.check,
665
+ class: 'ck-button-save',
666
+ type: 'submit',
667
+ withText: true
668
+ } );
669
+
670
+ saveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {
671
+ return errorTexts.every( errorText => !errorText );
672
+ } );
673
+
674
+ cancelButtonView.set( {
675
+ label: t( 'Cancel' ),
676
+ icon: icons.cancel,
677
+ class: 'ck-button-cancel',
678
+ type: 'cancel',
679
+ withText: true
680
+ } );
681
+
682
+ cancelButtonView.delegate( 'execute' ).to( this, 'cancel' );
683
+
684
+ return {
685
+ saveButtonView, cancelButtonView
686
+ };
687
+ }
688
+
689
+ /**
690
+ * Provides localized labels for {@link #alignmentToolbar} buttons.
691
+ *
692
+ * @private
693
+ * @type {Object.<String,String>}
694
+ */
695
+ get _alignmentLabels() {
696
+ const locale = this.locale;
697
+ const t = this.t;
698
+
699
+ const left = t( 'Align table to the left' );
700
+ const center = t( 'Center table' );
701
+ const right = t( 'Align table to the right' );
702
+
703
+ // Returns object with a proper order of labels.
704
+ if ( locale.uiLanguageDirection === 'rtl' ) {
705
+ return { right, center, left };
706
+ } else {
707
+ return { left, center, right };
708
+ }
709
+ }
710
+ }
711
+
712
+ function isBorderStyleSet( value ) {
713
+ return !!value;
714
+ }