qms-angular 1.0.50 → 1.0.54

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 (414) hide show
  1. package/bundles/qms-angular.umd.js +19558 -11339
  2. package/bundles/qms-angular.umd.js.map +1 -1
  3. package/esm2015/lib/components/app-icon/app-icon.module.js +29 -16
  4. package/esm2015/lib/components/app-icon/icon-registry.service.js +9 -7
  5. package/esm2015/lib/components/badges/index.js +2 -0
  6. package/esm2015/lib/components/badges/models/qms-badges.model.js +13 -0
  7. package/esm2015/lib/components/badges/public_api.js +3 -0
  8. package/esm2015/lib/components/badges/qms-badges.component.js +38 -0
  9. package/esm2015/lib/components/badges/qms-badges.module.js +41 -0
  10. package/esm2015/lib/components/banner/qms-banner/qms-banner.component.js +28 -16
  11. package/esm2015/lib/components/banner/qms-banner/qms-banner.module.js +36 -19
  12. package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.js +28 -16
  13. package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.module.js +36 -19
  14. package/esm2015/lib/components/banner/qms-banner-loading/qms-banner-loading.component.js +19 -13
  15. package/esm2015/lib/components/banner/qms-banner-loading/qms-banner-loading.module.js +30 -17
  16. package/esm2015/lib/components/breadcrumb/breadcrumb-direction-icon.directive.js +11 -10
  17. package/esm2015/lib/components/breadcrumb/breadcrumb-item.directive.js +20 -17
  18. package/esm2015/lib/components/breadcrumb/breadcrumb.js +40 -28
  19. package/esm2015/lib/components/breadcrumb/breadcrumb.module.js +50 -26
  20. package/esm2015/lib/components/button/button-toggle.js +120 -85
  21. package/esm2015/lib/components/button/button.js +86 -78
  22. package/esm2015/lib/components/button/button.module.js +51 -27
  23. package/esm2015/lib/components/comment/comment.js +29 -18
  24. package/esm2015/lib/components/dialog/dialog.js +38 -28
  25. package/esm2015/lib/components/edit-file-name-dialog/edit-file-name-dialog.js +24 -16
  26. package/esm2015/lib/components/edit-file-name-dialog/edit-file-name-dialog.module.js +71 -31
  27. package/esm2015/lib/components/list/list.js +101 -89
  28. package/esm2015/lib/components/list/list.module.js +94 -50
  29. package/esm2015/lib/components/qms-app-bar/qms-app-bar.component.js +55 -29
  30. package/esm2015/lib/components/qms-app-bar/qms-app-bar.module.js +39 -20
  31. package/esm2015/lib/components/qms-stepper/qms-stepper.component.js +32 -22
  32. package/esm2015/lib/components/qms-stepper/qms-stepper.module.js +35 -25
  33. package/esm2015/lib/components/related/content/related-content.component.js +19 -12
  34. package/esm2015/lib/components/related/list-other-related/list-related.component.js +29 -25
  35. package/esm2015/lib/components/related/popup/related-popup.component.js +50 -33
  36. package/esm2015/lib/components/related/related.module.js +97 -44
  37. package/esm2015/lib/components/related/risk/analysis/analysis.component.js +23 -17
  38. package/esm2015/lib/components/related/risk/list/list.component.js +22 -18
  39. package/esm2015/lib/components/related/risk/result/result.component.js +23 -16
  40. package/esm2015/lib/components/related/service/related-global.service.js +7 -6
  41. package/esm2015/lib/components/related/sidenav/sidenav.component.js +21 -12
  42. package/esm2015/lib/components/related/tree/tree.component.js +54 -41
  43. package/esm2015/lib/components/reports/qms-report-content-portrait/qms-report-content-portrait.component.js +22 -18
  44. package/esm2015/lib/components/reports/qms-report-cover-portrait/qms-report-cover-portrait.component.js +22 -18
  45. package/esm2015/lib/components/reports/qms-reports.module.js +29 -20
  46. package/esm2015/lib/components/rich-text/rich-text.js +47 -32
  47. package/esm2015/lib/components/rich-text/rich-text.module.js +35 -21
  48. package/esm2015/lib/components/select-dialog/select-dialog.js +31 -16
  49. package/esm2015/lib/components/suffix-field/suffix-field.directive.js +22 -21
  50. package/esm2015/lib/components/table/table-action.js +31 -31
  51. package/esm2015/lib/components/table/table.module.js +37 -21
  52. package/esm2015/lib/components/test-only/test-only.component.js +14 -11
  53. package/esm2015/lib/components/tooltip/tooltip.js +24 -19
  54. package/esm2015/lib/components/tooltip/tooltip.module.js +38 -20
  55. package/esm2015/lib/components/upload-file-error-dialog/upload-file-error-dialog.js +22 -16
  56. package/esm2015/lib/components/upload-file-error-dialog/upload-file-error-dialog.module.js +71 -31
  57. package/esm2015/lib/directives/chip-input/chip-input-chip-list.directive.js +13 -13
  58. package/esm2015/lib/directives/chip-input/chip-input-field.directive.js +11 -10
  59. package/esm2015/lib/directives/chip-input/chip-input-select-dropdown.directive.js +11 -10
  60. package/esm2015/lib/directives/chip-input/chip-input-select-field.directive.js +17 -14
  61. package/esm2015/lib/directives/chip-input/chip-input-select-trigger.directive.js +14 -13
  62. package/esm2015/lib/directives/chips/chip-body.directive.js +11 -10
  63. package/esm2015/lib/directives/chips/chip.directive.js +13 -13
  64. package/esm2015/lib/directives/dropdown-menu/dropdown-item.directive.js +16 -14
  65. package/esm2015/lib/directives/file-upload/file-upload-attachment-list.directive.js +11 -10
  66. package/esm2015/lib/directives/file-upload/file-upload-display.directive.js +19 -16
  67. package/esm2015/lib/directives/file-upload/file-upload-multiple-display.directive.js +16 -14
  68. package/esm2015/lib/directives/file-upload/file-upload-multiple-selector.directive.js +26 -20
  69. package/esm2015/lib/directives/file-upload/file-upload-multiple.directive.js +19 -15
  70. package/esm2015/lib/directives/file-upload/file-upload-scrollable-attachment-list.directive.js +11 -10
  71. package/esm2015/lib/directives/file-upload/file-upload-selector.directive.js +25 -18
  72. package/esm2015/lib/directives/file-upload/file-upload.directive.js +24 -20
  73. package/esm2015/lib/directives/form.directive.js +48 -51
  74. package/esm2015/lib/directives/margin.directive.js +15 -14
  75. package/esm2015/lib/directives/range-slider/range-slider-lockup.directive.js +11 -10
  76. package/esm2015/lib/directives/range-slider/range-slider.directive.js +17 -14
  77. package/esm2015/lib/directives/scroll-selected/scroll-to-selected.directive.js +16 -15
  78. package/esm2015/lib/directives/scrollbar/scrollbar.directive.js +13 -13
  79. package/esm2015/lib/directives/search-field.directive.js +21 -22
  80. package/esm2015/lib/directives/side-sheet/drawer-content.directive.js +11 -10
  81. package/esm2015/lib/directives/side-sheet/drawer-header-action.directive.js +11 -10
  82. package/esm2015/lib/directives/side-sheet/drawer-header.directive.js +11 -10
  83. package/esm2015/lib/directives/side-sheet/drawer.directive.js +11 -10
  84. package/esm2015/lib/directives/tab/tab-group-advanced.directive.js +15 -14
  85. package/esm2015/lib/directives/tab/tab-group.directive.js +11 -10
  86. package/esm2015/lib/directives/tab/tab-label.directive.js +11 -10
  87. package/esm2015/lib/directives/text-block/text-block-line.directive.js +20 -16
  88. package/esm2015/lib/directives/text-block/text-block.directive.js +17 -14
  89. package/esm2015/lib/directives/tooltip/tooltip-image.directive.js +14 -13
  90. package/esm2015/lib/directives/tooltip/tooltip-renderer.directive.js +35 -22
  91. package/esm2015/lib/material-module.js +35 -16
  92. package/esm2015/lib/model/en.js +35 -4
  93. package/esm2015/lib/model/no.js +34 -3
  94. package/esm2015/lib/pipe/dateFormat.pipe.js +11 -10
  95. package/esm2015/lib/qms-angular.component.js +13 -11
  96. package/esm2015/lib/qms-angular.module.js +232 -121
  97. package/esm2015/lib/qms-angular.service.js +9 -8
  98. package/esm2015/lib/qms-ckeditor-components/common/bpmn/toolbar.function.js +32 -12
  99. package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.js +5 -1
  100. package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorFlowchart.const.js +10 -1
  101. package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorLink.constant.js +7 -0
  102. package/esm2015/lib/qms-ckeditor-components/common/enums/document-type.enum.js +2 -1
  103. package/esm2015/lib/qms-ckeditor-components/common/enums/shape-flow-chart-connection-type.js +8 -0
  104. package/esm2015/lib/qms-ckeditor-components/common/flowchart/sample/sample-graphs.js +16 -0
  105. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/halo-service.js +105 -0
  106. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/inspector-service.js +3762 -0
  107. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/keyboard-service.js +68 -0
  108. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.js +372 -0
  109. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/stencil-service.js +1041 -0
  110. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/toolbar-service.js +326 -0
  111. package/esm2015/lib/qms-ckeditor-components/common/flowchart/shapes/app-shapes.js +318 -0
  112. package/esm2015/lib/qms-ckeditor-components/common/flowchart/themes/theme-picker.js +80 -0
  113. package/esm2015/lib/qms-ckeditor-components/common/functions/common.function.js +2 -2
  114. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart-template.model.js +9 -0
  115. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart.model.js +9 -0
  116. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.js +3 -0
  117. package/esm2015/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.js +23 -16
  118. package/esm2015/lib/qms-ckeditor-components/common/module/tree/qms-ckeditor-tree.component.js +34 -19
  119. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.js +43 -0
  120. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +577 -53
  121. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.js +69 -35
  122. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.js +322 -0
  123. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-fullscreen/qms-ckeditor-fullscreen.component.js +12 -8
  124. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +39 -30
  125. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +22 -18
  126. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +29 -20
  127. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +22 -18
  128. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +35 -23
  129. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +30 -20
  130. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +27 -18
  131. package/esm2015/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.js +8 -0
  132. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor-base.component.js +7 -4
  133. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +118 -44
  134. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.module.js +131 -55
  135. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-base.service.js +10 -10
  136. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn-api.service.js +9 -9
  137. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.js +66 -26
  138. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.js +26 -0
  139. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-global.service.js +9 -8
  140. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-link.service.js +9 -9
  141. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-tree.service.js +9 -9
  142. package/esm2015/lib/qms-ckeditor-components/services/qms-ckedtior-template.service.js +9 -9
  143. package/esm2015/lib/services/translation-registry.service.js +9 -8
  144. package/esm2015/lib/shared.module.js +9 -4
  145. package/esm2015/public-api.js +17 -1
  146. package/esm2015/qms-angular.js +1 -9
  147. package/fesm2015/qms-angular.js +10820 -2740
  148. package/fesm2015/qms-angular.js.map +1 -1
  149. package/lib/components/app-icon/app-icon.module.d.ts +7 -0
  150. package/lib/components/app-icon/icon-registry.service.d.ts +3 -0
  151. package/lib/components/badges/index.d.ts +1 -0
  152. package/lib/components/badges/models/qms-badges.model.d.ts +10 -0
  153. package/lib/components/badges/public_api.d.ts +2 -0
  154. package/lib/components/badges/qms-badges.component.d.ts +15 -0
  155. package/lib/components/badges/qms-badges.module.d.ts +11 -0
  156. package/lib/components/banner/qms-banner/qms-banner.component.d.ts +3 -0
  157. package/lib/components/banner/qms-banner/qms-banner.module.d.ts +10 -0
  158. package/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.d.ts +3 -0
  159. package/lib/components/banner/qms-banner-confirm/qms-banner-confirm.module.d.ts +10 -0
  160. package/lib/components/banner/qms-banner-loading/qms-banner-loading.component.d.ts +3 -0
  161. package/lib/components/banner/qms-banner-loading/qms-banner-loading.module.d.ts +8 -0
  162. package/lib/components/breadcrumb/breadcrumb-direction-icon.directive.d.ts +3 -0
  163. package/lib/components/breadcrumb/breadcrumb-item.directive.d.ts +3 -0
  164. package/lib/components/breadcrumb/breadcrumb.d.ts +3 -0
  165. package/lib/components/breadcrumb/breadcrumb.module.d.ts +13 -0
  166. package/lib/components/button/button-toggle.d.ts +5 -0
  167. package/lib/components/button/button.d.ts +7 -0
  168. package/lib/components/button/button.module.d.ts +9 -0
  169. package/lib/components/comment/comment.d.ts +3 -0
  170. package/lib/components/dialog/dialog.d.ts +5 -0
  171. package/lib/components/edit-file-name-dialog/edit-file-name-dialog.d.ts +3 -0
  172. package/lib/components/edit-file-name-dialog/edit-file-name-dialog.module.d.ts +16 -0
  173. package/lib/components/list/list.d.ts +15 -0
  174. package/lib/components/list/list.module.d.ts +11 -0
  175. package/lib/components/qms-app-bar/qms-app-bar.component.d.ts +3 -0
  176. package/lib/components/qms-app-bar/qms-app-bar.module.d.ts +12 -0
  177. package/lib/components/qms-stepper/qms-stepper.component.d.ts +3 -0
  178. package/lib/components/qms-stepper/qms-stepper.module.d.ts +8 -0
  179. package/lib/components/related/content/related-content.component.d.ts +3 -0
  180. package/lib/components/related/list-other-related/list-related.component.d.ts +3 -0
  181. package/lib/components/related/popup/related-popup.component.d.ts +3 -0
  182. package/lib/components/related/related.module.d.ts +29 -0
  183. package/lib/components/related/risk/analysis/analysis.component.d.ts +3 -0
  184. package/lib/components/related/risk/list/list.component.d.ts +3 -0
  185. package/lib/components/related/risk/result/result.component.d.ts +3 -0
  186. package/lib/components/related/service/related-global.service.d.ts +3 -0
  187. package/lib/components/related/sidenav/sidenav.component.d.ts +3 -0
  188. package/lib/components/related/tree/tree.component.d.ts +3 -0
  189. package/lib/components/reports/qms-report-content-portrait/qms-report-content-portrait.component.d.ts +3 -0
  190. package/lib/components/reports/qms-report-cover-portrait/qms-report-cover-portrait.component.d.ts +3 -0
  191. package/lib/components/reports/qms-reports.module.d.ts +7 -0
  192. package/lib/components/rich-text/rich-text.d.ts +3 -0
  193. package/lib/components/rich-text/rich-text.module.d.ts +8 -0
  194. package/lib/components/select-dialog/select-dialog.d.ts +3 -0
  195. package/lib/components/suffix-field/suffix-field.directive.d.ts +5 -0
  196. package/lib/components/table/table-action.d.ts +5 -0
  197. package/lib/components/table/table.module.d.ts +8 -0
  198. package/lib/components/test-only/test-only.component.d.ts +3 -0
  199. package/lib/components/tooltip/tooltip.d.ts +3 -0
  200. package/lib/components/tooltip/tooltip.module.d.ts +9 -0
  201. package/lib/components/upload-file-error-dialog/upload-file-error-dialog.d.ts +3 -0
  202. package/lib/components/upload-file-error-dialog/upload-file-error-dialog.module.d.ts +16 -0
  203. package/lib/directives/chip-input/chip-input-chip-list.directive.d.ts +3 -0
  204. package/lib/directives/chip-input/chip-input-field.directive.d.ts +3 -0
  205. package/lib/directives/chip-input/chip-input-select-dropdown.directive.d.ts +3 -0
  206. package/lib/directives/chip-input/chip-input-select-field.directive.d.ts +3 -0
  207. package/lib/directives/chip-input/chip-input-select-trigger.directive.d.ts +3 -0
  208. package/lib/directives/chips/chip-body.directive.d.ts +3 -0
  209. package/lib/directives/chips/chip.directive.d.ts +3 -0
  210. package/lib/directives/dropdown-menu/dropdown-item.directive.d.ts +3 -0
  211. package/lib/directives/file-upload/file-upload-attachment-list.directive.d.ts +3 -0
  212. package/lib/directives/file-upload/file-upload-display.directive.d.ts +3 -0
  213. package/lib/directives/file-upload/file-upload-multiple-display.directive.d.ts +3 -0
  214. package/lib/directives/file-upload/file-upload-multiple-selector.directive.d.ts +3 -0
  215. package/lib/directives/file-upload/file-upload-multiple.directive.d.ts +3 -0
  216. package/lib/directives/file-upload/file-upload-scrollable-attachment-list.directive.d.ts +3 -0
  217. package/lib/directives/file-upload/file-upload-selector.directive.d.ts +3 -0
  218. package/lib/directives/file-upload/file-upload.directive.d.ts +5 -0
  219. package/lib/directives/form.directive.d.ts +11 -0
  220. package/lib/directives/margin.directive.d.ts +3 -0
  221. package/lib/directives/range-slider/range-slider-lockup.directive.d.ts +3 -0
  222. package/lib/directives/range-slider/range-slider.directive.d.ts +3 -0
  223. package/lib/directives/scroll-selected/scroll-to-selected.directive.d.ts +3 -0
  224. package/lib/directives/scrollbar/scrollbar.directive.d.ts +3 -0
  225. package/lib/directives/search-field.directive.d.ts +5 -0
  226. package/lib/directives/side-sheet/drawer-content.directive.d.ts +3 -0
  227. package/lib/directives/side-sheet/drawer-header-action.directive.d.ts +3 -0
  228. package/lib/directives/side-sheet/drawer-header.directive.d.ts +3 -0
  229. package/lib/directives/side-sheet/drawer.directive.d.ts +3 -0
  230. package/lib/directives/tab/tab-group-advanced.directive.d.ts +3 -0
  231. package/lib/directives/tab/tab-group.directive.d.ts +3 -0
  232. package/lib/directives/tab/tab-label.directive.d.ts +3 -0
  233. package/lib/directives/text-block/text-block-line.directive.d.ts +3 -0
  234. package/lib/directives/text-block/text-block.directive.d.ts +3 -0
  235. package/lib/directives/tooltip/tooltip-image.directive.d.ts +3 -0
  236. package/lib/directives/tooltip/tooltip-renderer.directive.d.ts +3 -0
  237. package/lib/material-module.d.ts +12 -0
  238. package/lib/model/en.d.ts +31 -0
  239. package/lib/model/no.d.ts +31 -0
  240. package/lib/pipe/dateFormat.pipe.d.ts +3 -0
  241. package/lib/qms-angular.component.d.ts +3 -0
  242. package/lib/qms-angular.module.d.ts +49 -0
  243. package/lib/qms-angular.service.d.ts +3 -0
  244. package/lib/qms-ckeditor-components/common/bpmn/toolbar.function.d.ts +2 -2
  245. package/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.d.ts +4 -0
  246. package/lib/qms-ckeditor-components/common/constants/ckeditorFlowchart.const.d.ts +9 -0
  247. package/lib/qms-ckeditor-components/common/constants/ckeditorLink.constant.d.ts +6 -0
  248. package/lib/qms-ckeditor-components/common/enums/document-type.enum.d.ts +1 -0
  249. package/lib/qms-ckeditor-components/common/enums/shape-flow-chart-connection-type.d.ts +6 -0
  250. package/lib/qms-ckeditor-components/common/flowchart/sample/sample-graphs.d.ts +14 -0
  251. package/lib/qms-ckeditor-components/common/flowchart/service/halo-service.d.ts +48 -0
  252. package/lib/qms-ckeditor-components/common/flowchart/service/inspector-service.d.ts +18 -0
  253. package/lib/qms-ckeditor-components/common/flowchart/service/keyboard-service.d.ts +17 -0
  254. package/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.d.ts +62 -0
  255. package/lib/qms-ckeditor-components/common/flowchart/service/stencil-service.d.ts +1183 -0
  256. package/lib/qms-ckeditor-components/common/flowchart/service/toolbar-service.d.ts +216 -0
  257. package/lib/qms-ckeditor-components/common/flowchart/shapes/app-shapes.d.ts +61 -0
  258. package/lib/qms-ckeditor-components/common/flowchart/themes/theme-picker.d.ts +36 -0
  259. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart-template.model.d.ts +7 -0
  260. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart.model.d.ts +7 -0
  261. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.d.ts +7 -0
  262. package/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.d.ts +3 -0
  263. package/lib/qms-ckeditor-components/common/module/tree/qms-ckeditor-tree.component.d.ts +3 -0
  264. package/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.d.ts +18 -0
  265. package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.d.ts +88 -4
  266. package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.d.ts +11 -2
  267. package/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.d.ts +44 -0
  268. package/lib/qms-ckeditor-components/components/qms-ckeditor-fullscreen/qms-ckeditor-fullscreen.component.d.ts +3 -0
  269. package/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.d.ts +3 -0
  270. package/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.d.ts +3 -0
  271. package/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.d.ts +3 -0
  272. package/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.d.ts +3 -0
  273. package/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.d.ts +4 -0
  274. package/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.d.ts +3 -0
  275. package/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.d.ts +3 -0
  276. package/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.d.ts +7 -0
  277. package/lib/qms-ckeditor-components/qms-ckeditor-base.component.d.ts +3 -0
  278. package/lib/qms-ckeditor-components/qms-ckeditor.component.d.ts +8 -0
  279. package/lib/qms-ckeditor-components/qms-ckeditor.module.d.ts +44 -0
  280. package/lib/qms-ckeditor-components/services/qms-ckeditor-base.service.d.ts +3 -0
  281. package/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn-api.service.d.ts +3 -0
  282. package/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.d.ts +4 -0
  283. package/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.d.ts +13 -0
  284. package/lib/qms-ckeditor-components/services/qms-ckeditor-global.service.d.ts +3 -0
  285. package/lib/qms-ckeditor-components/services/qms-ckeditor-link.service.d.ts +3 -0
  286. package/lib/qms-ckeditor-components/services/qms-ckeditor-tree.service.d.ts +3 -0
  287. package/lib/qms-ckeditor-components/services/qms-ckedtior-template.service.d.ts +3 -0
  288. package/lib/services/translation-registry.service.d.ts +3 -0
  289. package/lib/shared.module.d.ts +4 -0
  290. package/lib.theme.scss +8 -0
  291. package/package.json +1 -2
  292. package/public-api.d.ts +15 -0
  293. package/qms-angular.d.ts +1 -8
  294. package/src/assets/images/ckeditor5.svg +1 -0
  295. package/src/assets/jointjs/fonts/Alegreya_Sans/AlegreyaSans-Bold.ttf +0 -0
  296. package/src/assets/jointjs/fonts/Alegreya_Sans/AlegreyaSans-Light.ttf +0 -0
  297. package/src/assets/jointjs/fonts/Alegreya_Sans/AlegreyaSans-Regular.ttf +0 -0
  298. package/src/assets/jointjs/fonts/Alegreya_Sans/OFL.txt +92 -0
  299. package/src/assets/jointjs/fonts/Averia_Libre/AveriaLibre-Bold.ttf +0 -0
  300. package/src/assets/jointjs/fonts/Averia_Libre/AveriaLibre-Light.ttf +0 -0
  301. package/src/assets/jointjs/fonts/Averia_Libre/AveriaLibre-Regular.ttf +0 -0
  302. package/src/assets/jointjs/fonts/Averia_Libre/OFL.txt +93 -0
  303. package/src/assets/jointjs/fonts/Roboto_Condensed/LICENSE.txt +202 -0
  304. package/src/assets/jointjs/fonts/Roboto_Condensed/RobotoCondensed-Bold.ttf +0 -0
  305. package/src/assets/jointjs/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf +0 -0
  306. package/src/assets/jointjs/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf +0 -0
  307. package/src/assets/jointjs/images/delete-icon-modern.png +0 -0
  308. package/src/assets/jointjs/images/image-icon1.svg +1 -0
  309. package/src/assets/jointjs/images/image-icon2.svg +6 -0
  310. package/src/assets/jointjs/images/image-icon3.svg +11 -0
  311. package/src/assets/jointjs/images/image-icon4.svg +8 -0
  312. package/src/assets/jointjs/images/member-female.png +0 -0
  313. package/src/assets/jointjs/images/member-male.png +0 -0
  314. package/src/assets/jointjs/images/no-color-icon.svg +72 -0
  315. package/src/assets/jointjs/images/reset-icon-modern.png +0 -0
  316. package/src/assets/jointjs/images/save-icon-modern.png +0 -0
  317. package/src/assets/jointjs/images/to-front-icon-modern.png +0 -0
  318. package/src/assets/jointjs/images/toback-icon-modern.png +0 -0
  319. package/src/assets/jointjs/images/toolbar-icons-dark.woff +0 -0
  320. package/src/assets/jointjs/images/toolbar-icons-material.png +0 -0
  321. package/src/assets/jointjs/images/toolbar-icons-modern.png +0 -0
  322. package/src/assets/jointjs/images/transparent-icon.svg +50 -0
  323. package/src/assets/jointjs/scss/bpmn.scss +36 -35
  324. package/src/assets/jointjs/scss/style.dark.scss +233 -0
  325. package/src/assets/jointjs/scss/style.material.scss +234 -0
  326. package/src/assets/jointjs/scss/style.modern.scss +225 -0
  327. package/src/assets/jointjs/scss/style.scss +216 -0
  328. package/src/assets/jointjs/scss/theme-picker.scss +21 -0
  329. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -2
  330. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
  331. package/src/assets/qms-ckeditor-plugin/build/translations/ar.js +1 -1
  332. package/src/assets/qms-ckeditor-plugin/build/translations/az.js +1 -1
  333. package/src/assets/qms-ckeditor-plugin/build/translations/bg.js +1 -1
  334. package/src/assets/qms-ckeditor-plugin/build/translations/cs.js +1 -1
  335. package/src/assets/qms-ckeditor-plugin/build/translations/da.js +1 -1
  336. package/src/assets/qms-ckeditor-plugin/build/translations/de-ch.js +1 -1
  337. package/src/assets/qms-ckeditor-plugin/build/translations/de.js +1 -1
  338. package/src/assets/qms-ckeditor-plugin/build/translations/en-au.js +1 -1
  339. package/src/assets/qms-ckeditor-plugin/build/translations/en-gb.js +1 -1
  340. package/src/assets/qms-ckeditor-plugin/build/translations/es.js +1 -1
  341. package/src/assets/qms-ckeditor-plugin/build/translations/et.js +1 -1
  342. package/src/assets/qms-ckeditor-plugin/build/translations/fa.js +1 -1
  343. package/src/assets/qms-ckeditor-plugin/build/translations/fi.js +1 -1
  344. package/src/assets/qms-ckeditor-plugin/build/translations/fr.js +1 -1
  345. package/src/assets/qms-ckeditor-plugin/build/translations/gl.js +1 -1
  346. package/src/assets/qms-ckeditor-plugin/build/translations/he.js +1 -1
  347. package/src/assets/qms-ckeditor-plugin/build/translations/hi.js +1 -1
  348. package/src/assets/qms-ckeditor-plugin/build/translations/hr.js +1 -1
  349. package/src/assets/qms-ckeditor-plugin/build/translations/hu.js +1 -1
  350. package/src/assets/qms-ckeditor-plugin/build/translations/id.js +1 -1
  351. package/src/assets/qms-ckeditor-plugin/build/translations/it.js +1 -1
  352. package/src/assets/qms-ckeditor-plugin/build/translations/ja.js +1 -1
  353. package/src/assets/qms-ckeditor-plugin/build/translations/ko.js +1 -1
  354. package/src/assets/qms-ckeditor-plugin/build/translations/ku.js +1 -1
  355. package/src/assets/qms-ckeditor-plugin/build/translations/lt.js +1 -1
  356. package/src/assets/qms-ckeditor-plugin/build/translations/lv.js +1 -1
  357. package/src/assets/qms-ckeditor-plugin/build/translations/nb.js +1 -1
  358. package/src/assets/qms-ckeditor-plugin/build/translations/ne.js +1 -1
  359. package/src/assets/qms-ckeditor-plugin/build/translations/nl.js +1 -1
  360. package/src/assets/qms-ckeditor-plugin/build/translations/no.js +1 -1
  361. package/src/assets/qms-ckeditor-plugin/build/translations/pl.js +1 -1
  362. package/src/assets/qms-ckeditor-plugin/build/translations/pt-br.js +1 -1
  363. package/src/assets/qms-ckeditor-plugin/build/translations/ro.js +1 -1
  364. package/src/assets/qms-ckeditor-plugin/build/translations/ru.js +1 -1
  365. package/src/assets/qms-ckeditor-plugin/build/translations/sk.js +1 -1
  366. package/src/assets/qms-ckeditor-plugin/build/translations/sl.js +1 -1
  367. package/src/assets/qms-ckeditor-plugin/build/translations/sq.js +1 -1
  368. package/src/assets/qms-ckeditor-plugin/build/translations/sr-latn.js +1 -1
  369. package/src/assets/qms-ckeditor-plugin/build/translations/sr.js +1 -1
  370. package/src/assets/qms-ckeditor-plugin/build/translations/sv.js +1 -1
  371. package/src/assets/qms-ckeditor-plugin/build/translations/th.js +1 -1
  372. package/src/assets/qms-ckeditor-plugin/build/translations/tk.js +1 -1
  373. package/src/assets/qms-ckeditor-plugin/build/translations/tr.js +1 -1
  374. package/src/assets/qms-ckeditor-plugin/build/translations/ug.js +1 -1
  375. package/src/assets/qms-ckeditor-plugin/build/translations/uk.js +1 -1
  376. package/src/assets/qms-ckeditor-plugin/build/translations/vi.js +1 -1
  377. package/src/assets/qms-ckeditor-plugin/build/translations/zh-cn.js +1 -1
  378. package/src/assets/qms-ckeditor-plugin/build/translations/zh.js +1 -1
  379. package/src/assets/qms-ckeditor-plugin/package-lock.json +12198 -9
  380. package/src/assets/qms-ckeditor-plugin/package.json +1 -0
  381. package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +22 -5
  382. package/src/assets/qms-ckeditor-plugin/src/dist/ckeditor.dev.js +173 -0
  383. package/src/assets/qms-ckeditor-plugin/src/plugins/aboutckeditor/aboutckeditor.js +28 -0
  384. package/src/assets/qms-ckeditor-plugin/src/plugins/bpmn/qmsCKEditorBpmnPlugin.js +24 -5
  385. package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorConstant.js +7 -1
  386. package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorService.js +20 -0
  387. package/src/assets/qms-ckeditor-plugin/src/plugins/flowchart/qmsCKEditorFlowchartPlugin.js +63 -0
  388. package/src/assets/qms-ckeditor-plugin/src/plugins/fullscreen/dist/qmsCKEditorFullscreenPlugin.dev.js +87 -0
  389. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapediting.js +47 -43
  390. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapui.js +1 -1
  391. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/insertimagemapcommand.js +72 -108
  392. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/openimagemapcommand.js +58 -0
  393. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/resizeimagemapcommand.js +4 -3
  394. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/utils.js +13 -0
  395. package/src/assets/qms-ckeditor-plugin/src/plugins/timestamp/timestamp.js +8 -8
  396. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipui.js +23 -24
  397. package/src/assets/qms-ckeditor-plugin/src/themes/icons/flowchart.svg +507 -0
  398. package/src/assets/qms-ckeditor-plugin/src/themes/icons/information.svg +1 -50
  399. package/src/assets/qms-ckeditor-plugin/src/themes/icons/timestamp.svg +1 -1
  400. package/src/assets/qms-ckeditor-plugin/src/themes/icons/tooltip.svg +1 -0
  401. package/src/lib/components/badges/_qms-badges-base.scss +122 -0
  402. package/src/lib/components/badges/qms-badges.component.scss +89 -0
  403. package/src/lib/components/list/_list-base.scss +1 -0
  404. package/src/lib/components/list/list.scss +2 -2
  405. package/src/lib/components/related/popup/related-popup.component.scss +1 -1
  406. package/src/lib/components/related/tree/tree.component.scss +1 -1
  407. package/src/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.scss +16 -0
  408. package/src/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.scss +15 -1
  409. package/src/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.scss +5 -0
  410. package/src/lib/qms-ckeditor-components/styles/_layout.scss +24 -0
  411. package/src/lib/qms-ckeditor-components/styles/_modules.scss +8 -0
  412. package/src/themes/_color.scss +1 -1
  413. package/src/themes/_scrollbar.scss +5 -5
  414. package/qms-angular.metadata.json +0 -1
@@ -1,6 +1,7 @@
1
1
  import { Plugin } from '@ckeditor/ckeditor5-core';
2
2
  import InsertImageMapCommand from './insertimagemapcommand';
3
3
  import ResizeImageMapCommand from './resizeimagemapcommand';
4
+ import OpenImageMapCommand from './openimagemapcommand';
4
5
  import { ImageMapAttributes, ImageMapElements, debounced, trimStart, drawMap, ImageMapCommands, HtmlAttributes, HtmlElements, findMapNodes } from './utils';
5
6
  import ImageLoadObserver from '@ckeditor/ckeditor5-image/src/image/imageloadobserver';
6
7
  import { downcastImageWidthAttribute, downcastImageHeightAttribute, downcastImageSavedSrcAttribute, downcastImageMapAttribute,
@@ -71,28 +72,32 @@ import { isWidget } from '@ckeditor/ckeditor5-widget/src/utils';
71
72
  editor.execute(ImageMapCommands.RESIZE);
72
73
  }, 100));
73
74
 
74
- // this.listenTo(editingView.document, 'delete', ( evt, data ) => {
75
- // this.allowDeleteMap = true;
76
- // }, { context: [isWidget] });
77
-
78
- // this.listenTo(model.document, 'change:data', (event) => {
79
- // if(this.allowDeleteMap == true){
80
- // this.allowDeleteMap == false;
81
- // OnImageDeleted(model, event);
82
- // }
83
- // });
84
-
75
+ this.listenTo(editingView.document, 'delete', ( evt, data ) => {
76
+ this.allowDeleteMap = true;
77
+ }, { context: [isWidget] });
78
+
85
79
  this.listenTo(editingView.document, 'imageLoaded', (evt, domEvent) => {
86
80
  onImageLoaded(domEvent);
87
81
  });
88
82
 
83
+ model.document.on('change:data', (evt, batch) => {
84
+ if(this.allowDeleteMap == true){
85
+ this.allowDeleteMap = false;
86
+ OnImageDeleted(model, batch);
87
+ }
88
+ } );
89
+
90
+ editor.commands.add(ImageMapCommands.OPEN, new OpenImageMapCommand(editor));
89
91
  editor.commands.add(ImageMapCommands.INSERT, new InsertImageMapCommand(editor));
90
92
  editor.commands.add(ImageMapCommands.RESIZE, new ResizeImageMapCommand(editor));
91
93
  }
92
94
  }
93
95
 
94
- function OnImageDeleted(model, event){
95
- const differ = event.source.differ;
96
+ function OnImageDeleted(model, batch){
97
+ if( batch.type == 'transparent'){
98
+ return;
99
+ }
100
+ const differ = model.document.differ;
96
101
  // if no difference
97
102
  if (differ.isEmpty) { return; }
98
103
  const changes = differ.getChanges({ includeChangesInGraveyard: true });
@@ -103,7 +108,7 @@ function OnImageDeleted(model, event){
103
108
  for (let i = 0; i < changes.length; i++){
104
109
  const change = changes[i]
105
110
  // if image remove exists
106
- if (change && change.type === 'remove' && change.name === 'image') {
111
+ if (change && change.type === 'remove' && change.name === ImageMapElements.IMAGE) {
107
112
  hasNoImageRemoved = false
108
113
  break
109
114
  }
@@ -112,7 +117,7 @@ function OnImageDeleted(model, event){
112
117
  // if not image remove stop execution
113
118
  if (hasNoImageRemoved) { return; }
114
119
  // get removed nodes
115
- const removedNodes = changes.filter(change => (change.type === 'insert' && change.name === 'image'))
120
+ const removedNodes = changes.filter(change => (change.type === 'insert' && change.name === ImageMapElements.IMAGE))
116
121
 
117
122
  // removed image nodes
118
123
  const removedMapNames = []
@@ -129,8 +134,7 @@ function OnImageDeleted(model, event){
129
134
  const existingMapElements = findMapNodes(removedMapNames, range);
130
135
 
131
136
  if(existingMapElements && existingMapElements.length > 0){
132
- const redoingBatch = model.createBatch( 'transparent' );
133
- model.enqueueChange(redoingBatch, writer => {
137
+ model.enqueueChange(batch, writer => {
134
138
  existingMapElements.forEach(element => {
135
139
  writer.remove(element);
136
140
  });
@@ -150,34 +154,34 @@ function onImageLoaded(domEvent){
150
154
 
151
155
  const originalSrc = domEvent.target.getAttribute(HtmlAttributes.SRC);
152
156
  const mapName = trimStart(domEvent.target.getAttribute(HtmlAttributes.USE_MAP), '#');
153
- const selector = `${HtmlElements.MAP}[${HtmlAttributes.NAME}='${mapName}']`;
154
- const map = document.querySelector(selector);
155
- if(map && map.childNodes){
156
- const areas = [];
157
- map.childNodes.forEach((child) =>{
158
- if(child.nodeName && child.nodeName.toLowerCase() === HtmlElements.AREA){
159
- let area = {};
160
- area[HtmlAttributes.COORDS] = child.getAttribute(HtmlAttributes.COORDS);
161
- area[HtmlAttributes.SHAPE] = child.getAttribute(HtmlAttributes.SHAPE) || '';
162
- areas.push(area);
157
+ const selector = `${HtmlElements.MAP}[${HtmlAttributes.NAME}='${mapName}']`;
158
+ const map = document.querySelector(selector);
159
+ if(map && map.childNodes){
160
+ const areas = [];
161
+ map.childNodes.forEach((child) =>{
162
+ if(child.nodeName && child.nodeName.toLowerCase() === HtmlElements.AREA){
163
+ let area = {};
164
+ area[HtmlAttributes.COORDS] = child.getAttribute(HtmlAttributes.COORDS);
165
+ area[HtmlAttributes.SHAPE] = child.getAttribute(HtmlAttributes.SHAPE) || '';
166
+ areas.push(area);
167
+ }
168
+ });
169
+ if(areas.length > 0){
170
+ const width = map.getAttribute(HtmlAttributes.WIDTH) || domEvent.target.width;
171
+ const height = map.getAttribute(HtmlAttributes.HEIGHT) || domEvent.target.height;
172
+ const target = domEvent.target;
173
+ drawMap(originalSrc, width, height, areas, (oldsrc, newsrc) => {
174
+ if(target){
175
+ target.setAttribute(HtmlAttributes.SRC, newsrc);
176
+ target.setAttribute(HtmlAttributes.SAVED_SRC, oldsrc);
163
177
  }
164
- });
165
- if(areas.length > 0){
166
- const width = map.getAttribute(HtmlAttributes.WIDTH) || domEvent.target.width;
167
- const height = map.getAttribute(HtmlAttributes.HEIGHT) || domEvent.target.height;
168
- const target = domEvent.target;
169
- drawMap(originalSrc, width, height, areas, (oldsrc, newsrc) => {
170
- if(target){
171
- target.setAttribute(HtmlAttributes.SRC, newsrc);
172
- target.setAttribute(HtmlAttributes.SAVED_SRC, oldsrc);
173
- }
174
178
 
175
- if(map){
176
- map.setAttribute(HtmlAttributes.WIDTH, width);
177
- map.setAttribute(HtmlAttributes.HEIGHT, height);
178
- }
179
- })
180
- }
179
+ if(map){
180
+ map.setAttribute(HtmlAttributes.WIDTH, width);
181
+ map.setAttribute(HtmlAttributes.HEIGHT, height);
182
+ }
183
+ })
181
184
  }
185
+ }
182
186
  }
183
187
  }
@@ -39,7 +39,7 @@ import { ImageMapCommands } from './utils';
39
39
  view.bind('isEnabled').to(command, 'isEnabled');
40
40
 
41
41
  this.listenTo(view, 'execute', () => {
42
- editor.execute(ImageMapCommands.INSERT, {});
42
+ editor.execute(ImageMapCommands.OPEN, {});
43
43
  });
44
44
 
45
45
  return view;
@@ -1,128 +1,92 @@
1
1
 
2
2
  import { Command } from '@ckeditor/ckeditor5-core';
3
3
  import { isImage } from '@ckeditor/ckeditor5-image/src/image/utils';
4
- import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
5
- import * as QMSCKEditorService from '../common/qmsCKEditorService';
6
- import { ImageMapAttributes, ImageMapElements, trimStart, parsePixelToFloat, findFirstMapNode, findMapNodes, drawMap } from './utils';
7
- import { getSelectedImageWidget } from '@ckeditor/ckeditor5-image/src/image/utils';
8
-
4
+ import { ImageMapAttributes, ImageMapElements, trimStart, findMapNodes, drawMap, createInsertedEvent, createRemovedEvent } from './utils';
5
+
9
6
  export default class InsertImageMapCommand extends Command {
10
-
11
- refresh() {
12
- const element = this.editor.model.document.selection.getSelectedElement();
13
- this.isEnabled = isImage(element);
14
- }
15
-
16
- execute() {
7
+ // refresh() {
8
+ // const element = this.editor.model.document.selection.getSelectedElement();
9
+ // this.isEnabled = isImage(element);
10
+ // }
11
+
12
+ execute( options = {} ) {
17
13
  const editor = this.editor;
18
14
  const model = editor.model;
19
- const view = editor.editing.view;
20
- const selectedElement = model.document.selection.getSelectedElement();
21
-
22
- const mapName = selectedElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP);
23
- let originalImageSrc = selectedElement.getAttribute(ImageMapAttributes.IMAGE_SRC);
24
- if(selectedElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC) && selectedElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
25
- originalImageSrc = selectedElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
26
- }
27
-
28
- const data = {'imageUrl': originalImageSrc, 'areas': [], imageWidth: null, imageHeight: null};
29
- const imageWidget = getSelectedImageWidget( view.document.selection);
30
- const widgetResizePlugin = editor.plugins.get('WidgetResize');
31
- const resizer = widgetResizePlugin.getResizerByViewElement( imageWidget );
15
+ model.change(writer => {
16
+ var newName = trimStart(options.name, '#');
17
+ const areas = options.areas;
18
+ const width = options.imageWidth;
19
+ const height = options.imageHeight;
20
+ const imageElement = model.document.selection.getSelectedElement();
21
+ if(!imageElement | !isImage(imageElement)){
22
+ return;
23
+ }
24
+ const oldName = imageElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP) || options.oldName;
32
25
 
33
- if(resizer){
34
- const resizerWrapper = resizer._viewResizerWrapper;
35
- data.imageWidth = parsePixelToFloat(resizerWrapper.getStyle('width', 0));
36
- data.imageHeight = parsePixelToFloat(resizerWrapper.getStyle('height', 0));
37
- }
38
-
39
- if(!!mapName){
40
- const range = model.createRangeIn(model.document.getRoot());
41
- const existingMapElement = findFirstMapNode(trimStart(mapName, '#'), range);
42
- if(existingMapElement){
43
- data.areas = JSON.parse(existingMapElement.getAttribute(ImageMapAttributes.MAP_AREAS) || []);
26
+ if(!!oldName){
27
+ const range = model.createRangeIn(model.document.getRoot());
28
+ const existingMapElements = findMapNodes([trimStart(oldName, '#')], range);
29
+ if(existingMapElements && existingMapElements.length > 0){
30
+ existingMapElements.forEach(element => {
31
+ writer.remove(element);
32
+ });
33
+ }
44
34
  }
45
- }
46
-
47
- QMSCKEditorService.imageMapNotify(data);
48
- window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = false;
49
- window.addEventListener(QMSCKEditorConstant.QMSCK_IMAGEMAP_PLUGIN_RESP, (evt) => {
50
- if (window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING]) {
51
- return;
52
- }
53
- window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = true;
54
- model.change(writer => {
55
- var newMapName = trimStart(evt.detail.name, '#');
56
- const areas = evt.detail.areas;
57
- const width = evt.detail.imageWidth;
58
- const height = evt.detail.imageHeight;
59
- const imageElement = model.document.selection.getSelectedElement();
60
- const oldMapName = imageElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP);
61
35
 
62
- if(!!oldMapName){
63
- const range = model.createRangeIn(model.document.getRoot());
64
- const existingMapElements = findMapNodes([trimStart(oldMapName, '#')], range);
65
- if(existingMapElements && existingMapElements.length > 0){
66
- existingMapElements.forEach(element => {
67
- writer.remove(element);
68
- });
69
- }
36
+ if(!!areas && areas.length > 0)
37
+ {
38
+ writer.setAttribute(ImageMapAttributes.IMAGE_USE_MAP, '#' + newName, imageElement);
39
+ writer.setAttribute(ImageMapAttributes.IMAGE_WIDTH, width, imageElement);
40
+ writer.setAttribute(ImageMapAttributes.IMAGE_HEIGHT, height, imageElement);
41
+
42
+ let originalImageSrc = imageElement.getAttribute(ImageMapAttributes.IMAGE_SRC);
43
+ if(!imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC) || !imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
44
+ writer.setAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, originalImageSrc, imageElement);
45
+ }
46
+ else{
47
+ originalImageSrc = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
70
48
  }
71
49
 
72
- if(!!areas && areas.length > 0)
73
- {
74
- writer.setAttribute(ImageMapAttributes.IMAGE_USE_MAP, '#' + newMapName, imageElement);
75
- writer.setAttribute(ImageMapAttributes.IMAGE_WIDTH, width, imageElement);
76
- writer.setAttribute(ImageMapAttributes.IMAGE_HEIGHT, height, imageElement);
50
+ let attrs = {};
51
+ attrs[ImageMapAttributes.MAP_NAME] = newName;
52
+ attrs[ImageMapAttributes.MAP_AREAS] = JSON.stringify(areas);
53
+ attrs[ImageMapAttributes.MAP_WIDTH] = width;
54
+ attrs[ImageMapAttributes.MAP_HEIGHT] = height;
55
+ const mapElement = writer.createElement(ImageMapElements.MAP, attrs);
77
56
 
78
- let originalImageSrc = imageElement.getAttribute(ImageMapAttributes.IMAGE_SRC);
79
- if(!imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC) || !imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
80
- writer.setAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, originalImageSrc, imageElement);
81
- }
82
- else{
83
- originalImageSrc = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
84
- }
85
-
86
- drawMap(originalImageSrc, width, height, areas, (oldsrc, newsrc) =>{
87
- model.enqueueChange(writer => {
88
- writer.setAttribute(ImageMapAttributes.IMAGE_SRC, newsrc, imageElement);
89
- } );
57
+ writer.insert(mapElement, writer.createPositionAt(imageElement, "after"));
58
+
59
+ drawMap(originalImageSrc, width, height, areas, (oldsrc, newsrc) =>{
60
+ model.enqueueChange(writer.batch, writer => {
61
+ writer.setAttribute(ImageMapAttributes.IMAGE_SRC, newsrc, imageElement);
62
+ this.fire(createInsertedEvent(newName));
90
63
  });
91
-
92
- let attrs = {};
93
- attrs[ImageMapAttributes.MAP_NAME] = newMapName;
94
- attrs[ImageMapAttributes.MAP_AREAS] = JSON.stringify(areas);
95
- attrs[ImageMapAttributes.MAP_WIDTH] = width;
96
- attrs[ImageMapAttributes.MAP_HEIGHT] = height;
97
- const mapElement = writer.createElement(ImageMapElements.MAP, attrs);
64
+ });
65
+ }
66
+ else {
67
+ if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_USE_MAP)){
68
+ writer.removeAttribute(ImageMapAttributes.IMAGE_USE_MAP, imageElement);
69
+ }
98
70
 
99
- writer.insert(mapElement, writer.createPositionAt(imageElement, "after"));
100
- }
101
- else {
102
- if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_USE_MAP)){
103
- writer.removeAttribute(ImageMapAttributes.IMAGE_USE_MAP, imageElement);
104
- }
105
-
106
- if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
107
-
108
- let src = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
109
- if(!!src){
110
- writer.setAttribute(ImageMapAttributes.IMAGE_SRC, src, imageElement);
111
- }
112
- writer.removeAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, imageElement);
113
- }
114
-
115
- if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_HEIGHT)){
116
- writer.removeAttribute(ImageMapAttributes.IMAGE_HEIGHT, imageElement);
117
- }
71
+ if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
118
72
 
119
- if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_WIDTH)){
120
- writer.removeAttribute(ImageMapAttributes.IMAGE_WIDTH, imageElement);
73
+ let src = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
74
+ if(!!src){
75
+ writer.setAttribute(ImageMapAttributes.IMAGE_SRC, src, imageElement);
121
76
  }
77
+ writer.removeAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, imageElement);
122
78
  }
123
- });
124
- },
125
- { once: true });
79
+
80
+ if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_HEIGHT)){
81
+ writer.removeAttribute(ImageMapAttributes.IMAGE_HEIGHT, imageElement);
82
+ }
83
+
84
+ if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_WIDTH)){
85
+ writer.removeAttribute(ImageMapAttributes.IMAGE_WIDTH, imageElement);
86
+ }
87
+ this.fire(createRemovedEvent(newName));
88
+ }
89
+ },{ once: true });
126
90
  }
127
91
  }
128
92
 
@@ -0,0 +1,58 @@
1
+
2
+ import { Command } from '@ckeditor/ckeditor5-core';
3
+ import { isImage } from '@ckeditor/ckeditor5-image/src/image/utils';
4
+ import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
5
+ import * as QMSCKEditorService from '../common/qmsCKEditorService';
6
+ import { ImageMapAttributes, ImageMapCommands, trimStart, parsePixelToFloat, findFirstMapNode } from './utils';
7
+ import { getSelectedImageWidget } from '@ckeditor/ckeditor5-image/src/image/utils';
8
+
9
+ export default class OpenImageMapCommand extends Command {
10
+
11
+ refresh() {
12
+ const element = this.editor.model.document.selection.getSelectedElement();
13
+ this.isEnabled = isImage(element);
14
+ }
15
+
16
+ execute() {
17
+ const editor = this.editor;
18
+ const model = editor.model;
19
+ const view = editor.editing.view;
20
+ const selectedElement = model.document.selection.getSelectedElement();
21
+
22
+ const mapName = selectedElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP);
23
+ let originalImageSrc = selectedElement.getAttribute(ImageMapAttributes.IMAGE_SRC);
24
+ if(selectedElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC) && selectedElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
25
+ originalImageSrc = selectedElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
26
+ }
27
+
28
+ const data = {'imageUrl': originalImageSrc, 'areas': [], imageWidth: null, imageHeight: null};
29
+ const imageWidget = getSelectedImageWidget( view.document.selection);
30
+ const widgetResizePlugin = editor.plugins.get('WidgetResize');
31
+ const resizer = widgetResizePlugin.getResizerByViewElement( imageWidget );
32
+
33
+ if(resizer){
34
+ const resizerWrapper = resizer._viewResizerWrapper;
35
+ data.imageWidth = parsePixelToFloat(resizerWrapper.getStyle('width', 0));
36
+ data.imageHeight = parsePixelToFloat(resizerWrapper.getStyle('height', 0));
37
+ }
38
+
39
+ if(!!mapName){
40
+ const range = model.createRangeIn(model.document.getRoot());
41
+ const existingMapElement = findFirstMapNode(trimStart(mapName, '#'), range);
42
+ if(existingMapElement){
43
+ data.areas = JSON.parse(existingMapElement.getAttribute(ImageMapAttributes.MAP_AREAS) || []);
44
+ }
45
+ }
46
+
47
+ QMSCKEditorService.imageMapNotify(data);
48
+ window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = false;
49
+ window.addEventListener(QMSCKEditorConstant.QMSCK_IMAGEMAP_PLUGIN_RESP, (evt) => {
50
+ if (window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING]) {
51
+ return;
52
+ }
53
+ window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = true;
54
+ editor.commands.get(ImageMapCommands.INSERT).execute(evt.detail);
55
+ });
56
+ }
57
+ }
58
+
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { Command } from '@ckeditor/ckeditor5-core';
3
3
  import { isImage } from '@ckeditor/ckeditor5-image/src/image/utils';
4
- import { ImageMapAttributes, trimStart, parsePixelToFloat, findFirstMapNode, drawMap, resizeAreaWidth, resizeAreaHeight } from './utils';
4
+ import { ImageMapAttributes, trimStart, parsePixelToFloat, findFirstMapNode, drawMap, resizeAreaWidth, resizeAreaHeight, createResizedEvent } from './utils';
5
5
  import { getSelectedImageWidget} from '@ckeditor/ckeditor5-image/src/image/utils';
6
6
 
7
7
  export default class ResizeImageMapCommand extends Command {
@@ -11,7 +11,7 @@ export default class ResizeImageMapCommand extends Command {
11
11
  this.isEnabled = isImage(element) && element.hasAttribute(ImageMapAttributes.IMAGE_USE_MAP);
12
12
  }
13
13
 
14
- execute() {
14
+ execute( options = {}) {
15
15
  const editor = this.editor;
16
16
  const model = editor.model;
17
17
  const view = this.editor.editing.view;
@@ -68,8 +68,9 @@ export default class ResizeImageMapCommand extends Command {
68
68
  writer.setAttribute(ImageMapAttributes.IMAGE_HEIGHT, newHeight, imageElement);
69
69
 
70
70
  drawMap(originalImageSrc, newWidth, newHeight, areas, (oldsrc, newsrc) =>{
71
- model.enqueueChange(writer => {
71
+ model.enqueueChange(writer.batch, writer => {
72
72
  writer.setAttribute(ImageMapAttributes.IMAGE_SRC, newsrc, imageElement);
73
+ this.fire(createResizedEvent(mapName));
73
74
  });
74
75
  });
75
76
  });
@@ -34,6 +34,7 @@ export const ImageMapAttributes = {
34
34
  }
35
35
 
36
36
  export const ImageMapCommands = {
37
+ OPEN: 'openImageMap',
37
38
  INSERT: 'insertImageMap',
38
39
  RESIZE: 'resizeImageMap'
39
40
  }
@@ -43,6 +44,18 @@ export const ImageMapElements = {
43
44
  IMAGE: 'image'//It is already defined by the image plugin
44
45
  }
45
46
 
47
+ export function createInsertedEvent(mapname){
48
+ return trimStart(mapname, '#') + '_inserted';
49
+ }
50
+
51
+ export function createRemovedEvent(mapname){
52
+ return trimStart(mapname, '#') + '_removed';
53
+ }
54
+
55
+ export function createResizedEvent(mapname){
56
+ return trimStart(mapname, '#') + '_resized';
57
+ }
58
+
46
59
  export function trimStart(text, charToRemove){
47
60
  if(text && text.length > 0){
48
61
  if(text.charAt(0) == charToRemove){
@@ -10,19 +10,19 @@ import { toMap } from '@ckeditor/ckeditor5-utils';
10
10
  * The default DateTime pattern is dd/MM/yyyy hh:mm:ss aaa
11
11
  *
12
12
  * DateTime Patterns:
13
- *
13
+ *
14
14
  * yy = 2-digit year; yyyy = full year
15
- *
15
+ *
16
16
  * M = digit month; MM = 2-digit month
17
- *
17
+ *
18
18
  * d = digit day; dd = 2-digit day
19
- *
19
+ *
20
20
  * h = hours am/pm; hh = 2-digit hours am/pm; H = hours; HH = 2-digit hours
21
- *
21
+ *
22
22
  * m = minutes; mm = 2-digit minutes; aaa = AM/PM
23
- *
23
+ *
24
24
  * s = seconds; ss = 2-digit seconds
25
- *
25
+ *
26
26
  * S = miliseconds
27
27
  */
28
28
  export default class Timestamp extends Plugin {
@@ -37,7 +37,7 @@ export default class Timestamp extends Plugin {
37
37
  buttonView.set( {
38
38
  label: t('Timestamp'),
39
39
  icon: timestampIcon,
40
- withText: true,
40
+ withText: false,
41
41
  tooltip: true
42
42
  } );
43
43
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
3
- import informationIcon from '../../themes/icons/information.svg';
3
+ import tooltipIcon from '../../themes/icons/tooltip.svg';
4
4
  import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
5
5
  import * as QMSCKEditorService from '../common/qmsCKEditorService';
6
6
  import ActionsView from './ui/actionsview';
@@ -12,7 +12,7 @@ export default class TooltipUI extends Plugin {
12
12
  static get requires() {
13
13
  return [ContextualBalloon];
14
14
  }
15
-
15
+
16
16
  static get pluginName() {
17
17
  return 'TooltipUI';
18
18
  }
@@ -24,25 +24,25 @@ export default class TooltipUI extends Plugin {
24
24
  get _isInBalloon() {
25
25
  return this._balloon.hasView(this._actionView);
26
26
  }
27
-
27
+
28
28
  init() {
29
29
  const editor = this.editor;
30
30
  const t = editor.t;
31
31
  const view = editor.editing.view;
32
-
32
+
33
33
  view.addObserver(ClickObserver);
34
34
  this._createActionsView();
35
-
35
+
36
36
  editor.ui.componentFactory.add('tooltip', locale => {
37
37
  const buttonView = new ButtonView(locale);
38
38
 
39
39
  buttonView.set({
40
40
  label: t('Tooltip'),
41
- icon: informationIcon,
42
- withText: true,
41
+ icon: tooltipIcon,
42
+ withText: false,
43
43
  tooltip: true
44
44
  });
45
-
45
+
46
46
  // Bind button to the command.
47
47
  const insertTooltipCommand = editor.commands.get(INSERT_TOOLTIP_COMMAND);
48
48
  buttonView.bind('isEnabled').to(insertTooltipCommand, 'isEnabled' );
@@ -55,26 +55,26 @@ export default class TooltipUI extends Plugin {
55
55
  return buttonView;
56
56
  });
57
57
  }
58
-
58
+
59
59
  destroy() {
60
60
  super.destroy();
61
61
  this._actionView.destroy();
62
62
  }
63
-
63
+
64
64
  _createActionsView() {
65
65
  const editor = this.editor;
66
66
  const view = editor.editing.view;
67
67
  const viewDocument = view.document;
68
68
  this._balloon = this.editor.plugins.get('ContextualBalloon');
69
- this._actionView = new ActionsView(editor.locale);
69
+ this._actionView = new ActionsView(editor.locale);
70
70
 
71
71
  const insertTooltipCommand = editor.commands.get(INSERT_TOOLTIP_COMMAND);
72
72
  const removeTooltipCommand = editor.commands.get(REMOVE_TOOLTIP_COMMAND);
73
-
73
+
74
74
  this._actionView.bind(TOOLTIP_ATTRIBUTE).to( insertTooltipCommand, 'value');
75
75
  this._actionView.editButtonView.bind('isEnabled').to(insertTooltipCommand);
76
76
  this._actionView.removeButtonView.bind('isEnabled').to(removeTooltipCommand);
77
-
77
+
78
78
  this.listenTo(this._actionView, 'edit', () => {
79
79
  const tooltip = { text: '', content: '' };
80
80
  const selectedElement = this._getSelectedTooltipElement();
@@ -93,7 +93,7 @@ export default class TooltipUI extends Plugin {
93
93
  editor.execute(REMOVE_TOOLTIP_COMMAND);
94
94
  this._hideActionsView(true);
95
95
  });
96
-
96
+
97
97
  this._actionView.keystrokes.set('Esc', (data, cancel) => {
98
98
  this._hideActionsView(true);
99
99
  cancel();
@@ -106,7 +106,7 @@ export default class TooltipUI extends Plugin {
106
106
  this._showActionsView();
107
107
  }
108
108
  });
109
-
109
+
110
110
  // Close on click outside of balloon panel element.
111
111
  clickOutsideHandler({
112
112
  emitter: this._actionView,
@@ -124,18 +124,18 @@ export default class TooltipUI extends Plugin {
124
124
  const viewDocument = editor.editing.view.document;
125
125
  //const command = editor.commands.get('imageTextAlternative');
126
126
  //const labeledInput = this._actionView.labeledInput;
127
-
127
+
128
128
  if (!this._isInBalloon) {
129
129
  this._balloon.add({
130
130
  view: this._actionView,
131
131
  position: this._getBalloonPositionData()
132
132
  });
133
133
  }
134
-
134
+
135
135
  // Reposition the balloon or hide the form if an tooltip is no longer selected.
136
136
  const prevSelectedElement = this._getSelectedTooltipElement();
137
137
  const prevSelectionParent = getSelectionParent(viewDocument);
138
-
138
+
139
139
  this.listenTo(editor.ui, 'update', () => {
140
140
  const selectedElement = this._getSelectedTooltipElement();
141
141
  const selectionParent = getSelectionParent(viewDocument);
@@ -143,9 +143,9 @@ export default class TooltipUI extends Plugin {
143
143
  if ((prevSelectedElement && !selectedElement) || (!prevSelectedElement && selectionParent !== prevSelectionParent)) {
144
144
  this._hideActionsView(true);
145
145
  }
146
- else if (this._isVisible)
146
+ else if (this._isVisible)
147
147
  {
148
- this._balloon.updatePosition(this._getBalloonPositionData());
148
+ this._balloon.updatePosition(this._getBalloonPositionData());
149
149
  }
150
150
  });
151
151
  }
@@ -162,7 +162,7 @@ export default class TooltipUI extends Plugin {
162
162
  if (!this._isInBalloon) {
163
163
  return;
164
164
  }
165
-
165
+
166
166
  if (this._actionView.focusTracker.isFocused) {
167
167
  this._actionView.removeButtonView.focus();
168
168
  }
@@ -179,7 +179,7 @@ export default class TooltipUI extends Plugin {
179
179
  const selection = view.document.selection;
180
180
  if (selection.isCollapsed) {
181
181
  return findTooltipElementAncestor(selection.getFirstPosition());
182
- }
182
+ }
183
183
  else {
184
184
  // The range for fully selected link is usually anchored in adjacent text nodes.
185
185
  // Trim it to get closer to the actual link element.
@@ -193,11 +193,10 @@ export default class TooltipUI extends Plugin {
193
193
  // Check if the link element is fully selected.
194
194
  if (view.createRangeIn(startTooltip).getTrimmed().isEqual(range)) {
195
195
  return startTooltip;
196
- }
196
+ }
197
197
  else {
198
198
  return null;
199
199
  }
200
200
  }
201
201
  }
202
202
  }
203
-