qms-angular 1.0.70 → 1.0.74

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 (250) hide show
  1. package/bundles/qms-angular.umd.js +2010 -606
  2. package/bundles/qms-angular.umd.js.map +1 -1
  3. package/esm2015/lib/components/button/button.js +2 -2
  4. package/esm2015/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.js +5 -3
  5. package/esm2015/lib/components/qms-navigation-drawer/qms-navigation-drawer.module.js +4 -4
  6. package/esm2015/lib/components/qms-paginator/index.js +2 -0
  7. package/esm2015/lib/components/qms-paginator/public_api.js +3 -0
  8. package/esm2015/lib/components/qms-paginator/qms-paginator.component.js +173 -0
  9. package/esm2015/lib/components/qms-paginator/qms-paginator.module.js +34 -0
  10. package/esm2015/lib/components/qms-status-dropdown/qms-status-dropdown.component.js +2 -2
  11. package/esm2015/lib/components/range-slider/directives/range-slider-lockup.directive.js +20 -0
  12. package/esm2015/lib/components/range-slider/directives/range-slider.directive.js +34 -0
  13. package/esm2015/lib/components/range-slider/index.js +2 -0
  14. package/esm2015/lib/components/range-slider/public-api.js +4 -0
  15. package/esm2015/lib/components/range-slider/range-slider.module.js +22 -0
  16. package/esm2015/lib/components/related/popup/related-popup.component.js +1 -1
  17. package/esm2015/lib/components/select-include-children/select-include-children.component.js +112 -45
  18. package/esm2015/lib/components/select-one/select-one.component.js +50 -3
  19. package/esm2015/lib/components/side-sheet/directives/drawer-content.directive.js +20 -0
  20. package/esm2015/lib/components/side-sheet/directives/drawer-header-action.directive.js +20 -0
  21. package/esm2015/lib/components/side-sheet/directives/drawer-header.directive.js +20 -0
  22. package/esm2015/lib/components/side-sheet/directives/drawer.directive.js +20 -0
  23. package/esm2015/lib/components/side-sheet/index.js +2 -0
  24. package/esm2015/lib/components/side-sheet/public-api.js +6 -0
  25. package/esm2015/lib/components/side-sheet/side-sheet.module.js +28 -0
  26. package/esm2015/lib/components/tree/tree.component.js +15 -19
  27. package/esm2015/lib/components/treeNew/tree.component.js +6 -3
  28. package/esm2015/lib/directives/table/table-row.directive.js +42 -0
  29. package/esm2015/lib/directives/table/table.directive.js +13 -60
  30. package/esm2015/lib/model/en.js +38 -3
  31. package/esm2015/lib/model/no.js +37 -2
  32. package/esm2015/lib/qms-angular.module.js +5 -24
  33. package/esm2015/lib/qms-ckeditor-components/common/bpmn/inspector.function.js +68 -16
  34. package/esm2015/lib/qms-ckeditor-components/common/classes/qmsUploadAdapter.js +89 -0
  35. package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.js +7 -1
  36. package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorFlowchart.const.js +10 -1
  37. package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorLink.constant.js +7 -0
  38. package/esm2015/lib/qms-ckeditor-components/common/enums/document-type.enum.js +2 -1
  39. package/esm2015/lib/qms-ckeditor-components/common/enums/shape-flow-chart-connection-type.js +8 -0
  40. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-data.model.js +1 -1
  41. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart-template.model.js +9 -0
  42. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart.model.js +9 -0
  43. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.js +3 -0
  44. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-video-tree.model.js +4 -0
  45. package/esm2015/lib/qms-ckeditor-components/common/models/wproofreader-config.model.js +6 -0
  46. package/esm2015/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.js +1 -1
  47. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.js +38 -0
  48. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +564 -34
  49. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.js +46 -18
  50. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-fullscreen/qms-ckeditor-fullscreen.component.js +1 -46
  51. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +9 -8
  52. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +1 -1
  53. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +5 -2
  54. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +1 -1
  55. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +1 -1
  56. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +1 -1
  57. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +4 -5
  58. package/esm2015/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.js +8 -0
  59. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +184 -28
  60. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.module.js +8 -2
  61. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.js +58 -20
  62. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.js +26 -0
  63. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-tree.service.js +4 -1
  64. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-upload.service.js +20 -0
  65. package/esm2015/public-api.js +10 -7
  66. package/esm2015/qms-angular.js +12 -8
  67. package/fesm2015/qms-angular.js +1900 -572
  68. package/fesm2015/qms-angular.js.map +1 -1
  69. package/lib/components/button/button.d.ts +1 -1
  70. package/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.d.ts +1 -0
  71. package/lib/components/qms-paginator/index.d.ts +1 -0
  72. package/lib/components/qms-paginator/public_api.d.ts +2 -0
  73. package/lib/components/qms-paginator/qms-paginator.component.d.ts +51 -0
  74. package/lib/components/qms-paginator/qms-paginator.module.d.ts +2 -0
  75. package/lib/{directives/range-slider → components/range-slider/directives}/range-slider-lockup.directive.d.ts +0 -0
  76. package/lib/{directives/range-slider → components/range-slider/directives}/range-slider.directive.d.ts +0 -0
  77. package/lib/components/range-slider/index.d.ts +1 -0
  78. package/lib/components/range-slider/public-api.d.ts +3 -0
  79. package/lib/components/range-slider/range-slider.module.d.ts +2 -0
  80. package/lib/components/select-include-children/select-include-children.component.d.ts +2 -1
  81. package/lib/components/select-one/select-one.component.d.ts +4 -0
  82. package/lib/{directives/side-sheet → components/side-sheet/directives}/drawer-content.directive.d.ts +0 -0
  83. package/lib/{directives/side-sheet → components/side-sheet/directives}/drawer-header-action.directive.d.ts +0 -0
  84. package/lib/{directives/side-sheet → components/side-sheet/directives}/drawer-header.directive.d.ts +0 -0
  85. package/lib/{directives/side-sheet → components/side-sheet/directives}/drawer.directive.d.ts +0 -0
  86. package/lib/components/side-sheet/index.d.ts +1 -0
  87. package/lib/components/side-sheet/public-api.d.ts +5 -0
  88. package/lib/components/side-sheet/side-sheet.module.d.ts +2 -0
  89. package/lib/directives/table/table-row.directive.d.ts +13 -0
  90. package/lib/directives/table/table.directive.d.ts +1 -11
  91. package/lib/model/en.d.ts +35 -0
  92. package/lib/model/no.d.ts +35 -0
  93. package/lib/qms-ckeditor-components/common/bpmn/inspector.function.d.ts +28 -0
  94. package/lib/qms-ckeditor-components/common/classes/qmsUploadAdapter.d.ts +18 -0
  95. package/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.d.ts +6 -0
  96. package/lib/qms-ckeditor-components/common/constants/ckeditorFlowchart.const.d.ts +9 -0
  97. package/lib/qms-ckeditor-components/common/constants/ckeditorLink.constant.d.ts +6 -0
  98. package/lib/qms-ckeditor-components/common/enums/document-type.enum.d.ts +1 -0
  99. package/lib/qms-ckeditor-components/common/enums/shape-flow-chart-connection-type.d.ts +6 -0
  100. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-data.model.d.ts +5 -0
  101. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart-template.model.d.ts +7 -0
  102. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart.model.d.ts +7 -0
  103. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.d.ts +5 -0
  104. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-video-tree.model.d.ts +5 -0
  105. package/lib/qms-ckeditor-components/common/models/wproofreader-config.model.d.ts +25 -0
  106. package/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.d.ts +15 -0
  107. package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.d.ts +88 -4
  108. package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.d.ts +8 -2
  109. package/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.d.ts +2 -1
  110. package/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.d.ts +7 -0
  111. package/lib/qms-ckeditor-components/qms-ckeditor.component.d.ts +17 -5
  112. package/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.d.ts +1 -0
  113. package/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.d.ts +10 -0
  114. package/lib/qms-ckeditor-components/services/qms-ckeditor-tree.service.d.ts +2 -0
  115. package/lib/qms-ckeditor-components/services/qms-ckeditor-upload.service.d.ts +5 -0
  116. package/lib.theme.scss +1 -0
  117. package/package.json +1 -1
  118. package/public-api.d.ts +6 -6
  119. package/qms-angular.d.ts +11 -7
  120. package/qms-angular.metadata.json +1 -1
  121. package/src/assets/images/ckeditor5.svg +1 -0
  122. package/src/assets/jointjs/js/rappid.js +55919 -55836
  123. package/src/assets/jointjs/scss/bpmn.scss +2 -1
  124. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -1
  125. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
  126. package/src/assets/qms-ckeditor-plugin/build/translations/az.js +1 -1
  127. package/src/assets/qms-ckeditor-plugin/build/translations/cs.js +1 -1
  128. package/src/assets/qms-ckeditor-plugin/build/translations/da.js +1 -1
  129. package/src/assets/qms-ckeditor-plugin/build/translations/de-ch.js +1 -1
  130. package/src/assets/qms-ckeditor-plugin/build/translations/de.js +1 -1
  131. package/src/assets/qms-ckeditor-plugin/build/translations/en-au.js +1 -1
  132. package/src/assets/qms-ckeditor-plugin/build/translations/es.js +1 -1
  133. package/src/assets/qms-ckeditor-plugin/build/translations/et.js +1 -1
  134. package/src/assets/qms-ckeditor-plugin/build/translations/fa.js +1 -1
  135. package/src/assets/qms-ckeditor-plugin/build/translations/fr.js +1 -1
  136. package/src/assets/qms-ckeditor-plugin/build/translations/gl.js +1 -1
  137. package/src/assets/qms-ckeditor-plugin/build/translations/he.js +1 -1
  138. package/src/assets/qms-ckeditor-plugin/build/translations/hi.js +1 -1
  139. package/src/assets/qms-ckeditor-plugin/build/translations/hr.js +1 -1
  140. package/src/assets/qms-ckeditor-plugin/build/translations/hu.js +1 -1
  141. package/src/assets/qms-ckeditor-plugin/build/translations/id.js +1 -1
  142. package/src/assets/qms-ckeditor-plugin/build/translations/it.js +1 -1
  143. package/src/assets/qms-ckeditor-plugin/build/translations/ja.js +1 -1
  144. package/src/assets/qms-ckeditor-plugin/build/translations/ko.js +1 -1
  145. package/src/assets/qms-ckeditor-plugin/build/translations/ku.js +1 -1
  146. package/src/assets/qms-ckeditor-plugin/build/translations/lv.js +1 -1
  147. package/src/assets/qms-ckeditor-plugin/build/translations/nl.js +1 -1
  148. package/src/assets/qms-ckeditor-plugin/build/translations/no.js +1 -1
  149. package/src/assets/qms-ckeditor-plugin/build/translations/pl.js +1 -1
  150. package/src/assets/qms-ckeditor-plugin/build/translations/pt-br.js +1 -1
  151. package/src/assets/qms-ckeditor-plugin/build/translations/ru.js +1 -1
  152. package/src/assets/qms-ckeditor-plugin/build/translations/sk.js +1 -1
  153. package/src/assets/qms-ckeditor-plugin/build/translations/sl.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/th.js +1 -1
  157. package/src/assets/qms-ckeditor-plugin/build/translations/tk.js +1 -1
  158. package/src/assets/qms-ckeditor-plugin/build/translations/tr.js +1 -1
  159. package/src/assets/qms-ckeditor-plugin/build/translations/uk.js +1 -1
  160. package/src/assets/qms-ckeditor-plugin/build/translations/vi.js +1 -1
  161. package/src/assets/qms-ckeditor-plugin/build/translations/zh-cn.js +1 -1
  162. package/src/assets/qms-ckeditor-plugin/build/translations/zh.js +1 -1
  163. package/src/assets/qms-ckeditor-plugin/package-lock.json +23 -0
  164. package/src/assets/qms-ckeditor-plugin/package.json +2 -0
  165. package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +18 -4
  166. package/src/assets/qms-ckeditor-plugin/src/plugins/aboutckeditor/aboutckeditor.js +28 -0
  167. package/src/assets/qms-ckeditor-plugin/src/plugins/bpmn/bpmndialogcommand.js +74 -0
  168. package/src/assets/qms-ckeditor-plugin/src/plugins/bpmn/qmsCKEditorBpmnPlugin.js +6 -44
  169. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/lang/contexts.json +3 -0
  170. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/lang/translations/de.po +21 -0
  171. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/lang/translations/en.po +21 -0
  172. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/lang/translations/gl.po +21 -0
  173. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/lang/translations/hu.po +21 -0
  174. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/lang/translations/it.po +21 -0
  175. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/lang/translations/ru.po +21 -0
  176. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/lang/translations/zh.po +21 -0
  177. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/src/index.js +10 -0
  178. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/src/sourceediting.js +386 -0
  179. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/src/utils/formathtml.js +142 -0
  180. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/theme/icons/source-editing.svg +1 -0
  181. package/src/assets/qms-ckeditor-plugin/src/plugins/ckeditor5-source-editing/theme/sourceediting.css +48 -0
  182. package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorConstant.js +11 -1
  183. package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorService.js +21 -0
  184. package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorUtil.js +29 -7
  185. package/src/assets/qms-ckeditor-plugin/src/plugins/fullscreen/qmsCKEditorFullscreenPlugin.js +22 -15
  186. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/converters.js +93 -92
  187. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemap.js +4 -4
  188. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapcommand.js +93 -0
  189. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapdialogcommand.js +59 -0
  190. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapediting.js +92 -87
  191. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapui.js +13 -14
  192. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/resizeimagemapcommand.js +25 -24
  193. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/utils.js +40 -49
  194. package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkcommand.js +131 -176
  195. package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkdialogcommand.js +88 -0
  196. package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkediting.js +2 -0
  197. package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkui.js +41 -32
  198. package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/tableofcontents.js +14 -0
  199. package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/tableofcontentscommand.js +87 -0
  200. package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/tableofcontentsediting.js +59 -0
  201. package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/tableofcontentsui.js +35 -0
  202. package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/utils.js +62 -0
  203. package/src/assets/qms-ckeditor-plugin/src/plugins/template/loadtemplatedialogcommand.js +14 -0
  204. package/src/assets/qms-ckeditor-plugin/src/plugins/template/qmsCKEditorLoadTemplatePlugin.js +10 -12
  205. package/src/assets/qms-ckeditor-plugin/src/plugins/template/qmsCKEdtiorTemplatePlugin.js +10 -7
  206. package/src/assets/qms-ckeditor-plugin/src/plugins/template/templatedialogcommand.js +9 -0
  207. package/src/assets/qms-ckeditor-plugin/src/plugins/timestamp/timestamp.js +15 -18
  208. package/src/assets/qms-ckeditor-plugin/src/plugins/timestamp/timestampcommand.js +17 -0
  209. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/removetooltipcommand.js +42 -26
  210. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltip.js +3 -3
  211. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipcommand.js +75 -0
  212. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipdialogcommand.js +68 -0
  213. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipediting.js +206 -131
  214. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipui.js +424 -136
  215. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/ui/actionsview.js +67 -12
  216. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/utils.js +17 -55
  217. package/src/assets/qms-ckeditor-plugin/src/plugins/video/autovideo.js +1 -5
  218. package/src/assets/qms-ckeditor-plugin/src/plugins/video/video/videoediting.js +5 -2
  219. package/src/assets/qms-ckeditor-plugin/src/plugins/video/videoupload/browsevideodialogcommand.js +25 -0
  220. package/src/assets/qms-ckeditor-plugin/src/plugins/video/videoupload/uploadvideocommand.js +3 -16
  221. package/src/assets/qms-ckeditor-plugin/src/plugins/video/videoupload/videouploadediting.js +4 -0
  222. package/src/assets/qms-ckeditor-plugin/src/plugins/video/videoupload/videouploadui.js +12 -23
  223. package/src/assets/qms-ckeditor-plugin/src/themes/icons/fullscreen_exit.svg +1 -0
  224. package/src/assets/qms-ckeditor-plugin/src/themes/icons/information.svg +1 -50
  225. package/src/assets/qms-ckeditor-plugin/src/themes/icons/table-excel.svg +44 -0
  226. package/src/assets/qms-ckeditor-plugin/src/themes/icons/timestamp.svg +1 -1
  227. package/src/assets/qms-ckeditor-plugin/src/themes/icons/tooltip.svg +1 -0
  228. package/src/assets/qms-ckeditor-plugin/src/themes/styles/heading.css +54 -0
  229. package/src/assets/qms-ckeditor-plugin/src/themes/styles/tooltip.css +11 -53
  230. package/src/lib/components/button/button-icon.scss +5 -1
  231. package/src/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.scss +36 -22
  232. package/src/lib/components/qms-paginator/qms-paginator.component.scss +143 -0
  233. package/src/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.scss +16 -0
  234. package/src/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.scss +69 -17
  235. package/src/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.scss +26 -23
  236. package/src/lib/qms-ckeditor-components/qms-ckeditor.component.scss +24 -0
  237. package/src/lib/qms-ckeditor-components/styles/_modules.scss +9 -1
  238. package/src/themes/core/_range-slider.scss +61 -42
  239. package/src/themes/core/_side-sheet.scss +2 -2
  240. package/src/themes/core/_table.scss +158 -37
  241. package/esm2015/lib/directives/range-slider/range-slider-lockup.directive.js +0 -20
  242. package/esm2015/lib/directives/range-slider/range-slider.directive.js +0 -36
  243. package/esm2015/lib/directives/side-sheet/drawer-content.directive.js +0 -20
  244. package/esm2015/lib/directives/side-sheet/drawer-header-action.directive.js +0 -20
  245. package/esm2015/lib/directives/side-sheet/drawer-header.directive.js +0 -20
  246. package/esm2015/lib/directives/side-sheet/drawer.directive.js +0 -20
  247. package/esm2015/lib/qms-ckeditor-components/common/classes/uploadAdapter.js +0 -26
  248. package/lib/qms-ckeditor-components/common/classes/uploadAdapter.d.ts +0 -5
  249. package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/insertimagemapcommand.js +0 -128
  250. package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/inserttooltipcommand.js +0 -88
@@ -1,203 +1,491 @@
1
-
2
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
3
- import informationIcon from '../../themes/icons/information.svg';
4
- import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
5
- import * as QMSCKEditorService from '../common/qmsCKEditorService';
6
- import ActionsView from './ui/actionsview';
1
+
2
+ import { Plugin } from '@ckeditor/ckeditor5-core';
7
3
  import { ClickObserver } from '@ckeditor/ckeditor5-engine';
8
4
  import { ButtonView, ContextualBalloon, clickOutsideHandler } from '@ckeditor/ckeditor5-ui';
9
- import { TOOLTIP_ATTRIBUTE, findTooltipElementAncestor, getSelectionParent, INSERT_TOOLTIP_COMMAND, REMOVE_TOOLTIP_COMMAND} from './utils';
5
+ import tooltipIcon from '../../themes/icons/tooltip.svg';
6
+ import ActionsView from './ui/actionsview';
7
+ import { isTooltipElement, isImageAllowed, TOOLTIP_COMMANDS, HTML_ATTRIBUTE, HTML_CLASS, TOOLTIP_ATTRIBUTE, TOOLTIP_CUSTOM_PROPERTY} from './utils';
8
+ import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
9
+ import * as QMSCKEditorService from '../common/qmsCKEditorService';
10
10
 
11
+ const VISUAL_SELECTION_MARKER_NAME = 'tooltip-ui';
12
+
11
13
  export default class TooltipUI extends Plugin {
14
+ /**
15
+ * @inheritDoc
16
+ */
12
17
  static get requires() {
13
- return [ContextualBalloon];
18
+ return [ ContextualBalloon ];
14
19
  }
15
-
20
+
21
+ /**
22
+ * @inheritDoc
23
+ */
16
24
  static get pluginName() {
17
25
  return 'TooltipUI';
18
26
  }
19
27
 
20
- get _isVisible() {
21
- return this._balloon.visibleView === this._actionView;
22
- }
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ init() {
32
+ const editor = this.editor;
23
33
 
24
- get _isInBalloon() {
25
- return this._balloon.hasView(this._actionView);
26
- }
27
-
28
- init() {
29
- const editor = this.editor;
30
- const t = editor.t;
31
- const view = editor.editing.view;
32
-
33
- view.addObserver(ClickObserver);
34
- this._createActionsView();
35
-
36
- editor.ui.componentFactory.add('tooltip', locale => {
37
- const buttonView = new ButtonView(locale);
38
-
39
- buttonView.set({
40
- label: t('Tooltip'),
41
- icon: informationIcon,
42
- withText: true,
43
- tooltip: true
44
- });
34
+ editor.editing.view.addObserver(ClickObserver);
35
+
36
+ /**
37
+ * The actions view displayed inside of the balloon.
38
+ *
39
+ * @member {module:link/ui/TooltipActionView~TooltipActionView}
40
+ */
41
+ this.actionsView = this._createActionsView();
45
42
 
46
- // Bind button to the command.
47
- const insertTooltipCommand = editor.commands.get(INSERT_TOOLTIP_COMMAND);
48
- buttonView.bind('isEnabled').to(insertTooltipCommand, 'isEnabled' );
49
- buttonView.bind('isOn').to(insertTooltipCommand, 'value', value => !!value );
43
+ /**
44
+ * The contextual balloon plugin instance.
45
+ *
46
+ * @private
47
+ * @member {module:ui/panel/balloon/contextualballoon~ContextualBalloon}
48
+ */
49
+ this._balloon = editor.plugins.get(ContextualBalloon);
50
50
 
51
- buttonView.on('execute', () => {
52
- editor.execute(INSERT_TOOLTIP_COMMAND);
53
- });
51
+ // Create toolbar buttons.
52
+ this._createToolbarLinkButton();
54
53
 
55
- return buttonView;
56
- });
57
- }
58
-
54
+ // Attach lifecycle actions to the the balloon.
55
+ this._enableUserBalloonInteractions();
56
+
57
+ // Renders a fake visual selection marker on an expanded selection.
58
+ editor.conversion.for('editingDowncast').markerToHighlight({
59
+ model: VISUAL_SELECTION_MARKER_NAME,
60
+ view: {
61
+ classes: [ 'ck-fake-link-selection' ]
62
+ }
63
+ });
64
+
65
+ // Renders a fake visual selection marker on a collapsed selection.
66
+ editor.conversion.for('editingDowncast').markerToElement({
67
+ model: VISUAL_SELECTION_MARKER_NAME,
68
+ view: {
69
+ name: 'span',
70
+ classes: [ 'ck-fake-link-selection', 'ck-fake-link-selection_collapsed' ]
71
+ }
72
+ });
73
+ }
74
+
75
+ /**
76
+ * @inheritDoc
77
+ */
59
78
  destroy() {
60
79
  super.destroy();
61
- this._actionView.destroy();
62
80
  }
63
-
81
+
82
+ /**
83
+ * Creates the {@link module:link/ui/TooltipActionView~TooltipActionView} instance.
84
+ *
85
+ * @private
86
+ * @returns {module:link/ui/TooltipActionView~TooltipActionView} The link actions view instance.
87
+ */
64
88
  _createActionsView() {
65
89
  const editor = this.editor;
66
- const view = editor.editing.view;
67
- const viewDocument = view.document;
68
- this._balloon = this.editor.plugins.get('ContextualBalloon');
69
- this._actionView = new ActionsView(editor.locale);
90
+ const actionsView = new ActionsView(editor.locale);
91
+ const tooltipDialogCommand = editor.commands.get(TOOLTIP_COMMANDS.TOOLTIP_DIALOG);
92
+ const removeTooltipCommand = editor.commands.get(TOOLTIP_COMMANDS.REMOVE_TOOLTIP);
70
93
 
71
- const insertTooltipCommand = editor.commands.get(INSERT_TOOLTIP_COMMAND);
72
- const removeTooltipCommand = editor.commands.get(REMOVE_TOOLTIP_COMMAND);
73
-
74
- this._actionView.bind(TOOLTIP_ATTRIBUTE).to( insertTooltipCommand, 'value');
75
- this._actionView.editButtonView.bind('isEnabled').to(insertTooltipCommand);
76
- this._actionView.removeButtonView.bind('isEnabled').to(removeTooltipCommand);
77
-
78
- this.listenTo(this._actionView, 'edit', () => {
79
- const tooltip = { text: '', content: '' };
80
- const selectedElement = this._getSelectedTooltipElement();
81
- if(selectedElement){
82
- tooltip.content = selectedElement.getAttribute(TOOLTIP_ATTRIBUTE);
83
- if(selectedElement.childCount > 0){
84
- tooltip.text = selectedElement.getChild(0).data;
85
- }
86
- }
87
- QMSCKEditorService.tooltipNotify(tooltip);
88
- window[QMSCKEditorConstant.QMSCK_TOOLTIP_IS_PROCESSING] = false;
89
- this._hideActionsView(true);
94
+ actionsView.editButtonView.bind('isEnabled').to(tooltipDialogCommand);
95
+ actionsView.removeButtonView.bind('isEnabled').to(removeTooltipCommand);
96
+
97
+ // Execute unlink command after clicking on the "Edit" button.
98
+ this.listenTo(actionsView, 'edit', () => {
99
+ const tooltip = { text: '', content: '' };
100
+ const selectedElement = this._getSelectedTooltipElement();
101
+ if(selectedElement){
102
+ tooltip.content = selectedElement.getAttribute(HTML_ATTRIBUTE) || '';
103
+ if(selectedElement.childCount > 0){
104
+ tooltip.text = selectedElement.getChild(0).data;
105
+ }
106
+ }
107
+ QMSCKEditorService.tooltipNotify(tooltip);
108
+ window[QMSCKEditorConstant.QMSCK_TOOLTIP_IS_PROCESSING] = false;
109
+ window.addEventListener(QMSCKEditorConstant.QMSCK_TOOLTIP_PLUGIN_RESP, (evt) => {
110
+ if (window[QMSCKEditorConstant.QMSCK_TOOLTIP_IS_PROCESSING]) {
111
+ return;
112
+ }
113
+ window[QMSCKEditorConstant.QMSCK_TOOLTIP_IS_PROCESSING] = true;
114
+ const options = evt.detail;
115
+ editor.commands.get(TOOLTIP_COMMANDS.TOOLTIP).execute(options);
116
+ }, { once: true });
117
+ this._hideUI();
90
118
  });
91
119
 
92
- this.listenTo(this._actionView, 'remove', () => {
93
- editor.execute(REMOVE_TOOLTIP_COMMAND);
94
- this._hideActionsView(true);
120
+ // Execute unlink command after clicking on the "Unlink" button.
121
+ this.listenTo(actionsView, 'remove', () => {
122
+ editor.execute(TOOLTIP_COMMANDS.REMOVE_TOOLTIP);
123
+ this._hideUI();
95
124
  });
96
-
97
- this._actionView.keystrokes.set('Esc', (data, cancel) => {
98
- this._hideActionsView(true);
125
+
126
+ // Close the panel on esc key press when the **actions have focus**.
127
+ actionsView.keystrokes.set('Esc', (data, cancel) => {
128
+ this._hideUI();
99
129
  cancel();
100
130
  });
131
+
132
+ return actionsView;
133
+ }
134
+
135
+ /**
136
+ * Creates a toolbar Link button. Clicking this button will show
137
+ * a {@link #_balloon} attached to the selection.
138
+ *
139
+ * @private
140
+ */
141
+ _createToolbarLinkButton() {
142
+ const editor = this.editor;
143
+ const command = editor.commands.get(TOOLTIP_COMMANDS.TOOLTIP_DIALOG);
144
+ const t = editor.t;
145
+
146
+ editor.ui.componentFactory.add('tooltip', locale => {
147
+ const button = new ButtonView(locale);
148
+
149
+ button.isEnabled = true;
150
+ button.label = t('Tooltip');
151
+ button.icon = tooltipIcon;
152
+ button.tooltip = true;
153
+ button.isToggleable = true;
154
+
155
+ // Bind button to the command.
156
+ button.bind('isEnabled').to(command, 'isEnabled');
157
+ button.bind('isOn').to(command, 'value', value => !!value);
158
+
159
+ // Show the panel on button click.
160
+ button.on('execute', () => {
161
+ editor.execute(TOOLTIP_COMMANDS.TOOLTIP_DIALOG);
162
+ });
163
+
164
+ return button;
165
+ });
166
+ }
167
+
168
+ _enableUserBalloonInteractions() {
169
+ const viewDocument = this.editor.editing.view.document;
170
+
171
+ // Handle click on view document and show panel when selection is placed inside the link element.
172
+ // Keep panel open until selection will be inside the same link element.
173
+ this.listenTo(viewDocument, 'click', () => {
174
+ const parentLink = this._getSelectedTooltipElement();
101
175
 
102
- this.listenTo(viewDocument, 'click', () => {
103
- const selectedElement = this._getSelectedTooltipElement();
104
- if (!!selectedElement) {
176
+ if (parentLink) {
105
177
  // Then show panel but keep focus inside editor editable.
106
- this._showActionsView();
178
+ this._showUI();
107
179
  }
108
180
  });
109
-
181
+
182
+ // Focus the form if the balloon is visible and the Tab key has been pressed.
183
+ this.editor.keystrokes.set('Tab', (data, cancel) => {
184
+ if (this._areActionsVisible && !this.actionsView.focusTracker.isFocused) {
185
+ this.actionsView.focus();
186
+ cancel();
187
+ }
188
+ }, {
189
+ // Use the high priority because the link UI navigation is more important
190
+ // than other feature's actions, e.g. list indentation.
191
+ // https://github.com/ckeditor/ckeditor5-link/issues/146
192
+ priority: 'high'
193
+ });
194
+
195
+ // Close the panel on the Esc key press when the editable has focus and the balloon is visible.
196
+ this.editor.keystrokes.set('Esc', (data, cancel) => {
197
+ if (this._isUIVisible) {
198
+ this._hideUI();
199
+ cancel();
200
+ }
201
+ });
202
+
110
203
  // Close on click outside of balloon panel element.
111
204
  clickOutsideHandler({
112
- emitter: this._actionView,
113
- activator: () => this._isVisible,
205
+ emitter: this.actionsView,
206
+ activator: () => this._isUIInPanel,
114
207
  contextElements: [ this._balloon.view.element ],
115
- callback: () => this._hideActionsView()
208
+ callback: () => this._hideUI()
116
209
  });
117
210
  }
118
211
 
119
- _showActionsView() {
120
- if (this._isVisible) {
212
+ /**
213
+ * Adds the {@link #actionsView} to the {@link #_balloon}.
214
+ *
215
+ * @protected
216
+ */
217
+ _addActionsView() {
218
+ if (this._areActionsInPanel) {
121
219
  return;
122
220
  }
123
- const editor = this.editor;
124
- const viewDocument = editor.editing.view.document;
125
- //const command = editor.commands.get('imageTextAlternative');
126
- //const labeledInput = this._actionView.labeledInput;
127
-
128
- if (!this._isInBalloon) {
129
- this._balloon.add({
130
- view: this._actionView,
131
- position: this._getBalloonPositionData()
132
- });
133
- }
221
+
222
+ this._balloon.add({
223
+ view: this.actionsView,
224
+ position: this._getBalloonPositionData()
225
+ });
226
+ }
134
227
 
135
- // Reposition the balloon or hide the form if an tooltip is no longer selected.
136
- const prevSelectedElement = this._getSelectedTooltipElement();
137
- const prevSelectionParent = getSelectionParent(viewDocument);
138
-
139
- this.listenTo(editor.ui, 'update', () => {
140
- const selectedElement = this._getSelectedTooltipElement();
141
- const selectionParent = getSelectionParent(viewDocument);
228
+
229
+ _showUI(forceVisible = false) {
230
+ // When there's no link under the selection, go straight to the editing UI.
231
+ if (!this._getSelectedTooltipElement()) {
232
+ // Show visual selection on a text without a link when the contextual balloon is displayed.
233
+ // See https://github.com/ckeditor/ckeditor5/issues/4721.
234
+ this._showFakeVisualSelection();
235
+
236
+ this._addActionsView();
142
237
 
143
- if ((prevSelectedElement && !selectedElement) || (!prevSelectedElement && selectionParent !== prevSelectionParent)) {
144
- this._hideActionsView(true);
238
+ // Be sure panel with link is visible.
239
+ if (forceVisible) {
240
+ this._balloon.showStack('main');
145
241
  }
146
- else if (this._isVisible)
147
- {
148
- this._balloon.updatePosition(this._getBalloonPositionData());
242
+
243
+ }
244
+ // If there's a link under the selection...
245
+ else {
246
+ this._addActionsView();
247
+
248
+ // Be sure panel with link is visible.
249
+ if (forceVisible) {
250
+ this._balloon.showStack('main');
149
251
  }
150
- });
151
- }
252
+ }
152
253
 
153
- _getBalloonPositionData() {
154
- const editingView = this.editor.editing.view;
155
- const selectedElement = this._getSelectedTooltipElement();
156
- return {
157
- target: editingView.domConverter.viewToDom(selectedElement)
158
- };
159
- }
254
+ // Begin responding to ui#update once the UI is added.
255
+ this._startUpdatingUI();
256
+ }
160
257
 
161
- _hideActionsView(focusEditable) {
162
- if (!this._isInBalloon) {
258
+ _hideUI() {
259
+ if (!this._isUIInPanel) {
163
260
  return;
164
261
  }
262
+
263
+ const editor = this.editor;
264
+
265
+ this.stopListening(editor.ui, 'update');
266
+ this.stopListening(this._balloon, 'change:visibleView');
267
+
268
+ // Make sure the focus always gets back to the editable _before_ removing the focused form view.
269
+ // Doing otherwise causes issues in some browsers. See https://github.com/ckeditor/ckeditor5-link/issues/193.
270
+ editor.editing.view.focus();
165
271
 
166
- if (this._actionView.focusTracker.isFocused) {
167
- this._actionView.removeButtonView.focus();
272
+ // Then remove the actions view because it's beneath the form.
273
+ this._balloon.remove(this.actionsView);
274
+
275
+ this._hideFakeVisualSelection();
276
+ }
277
+
278
+ /**
279
+ * Makes the UI react to the {@link module:core/editor/editorui~EditorUI#event:update} event to
280
+ * reposition itself when the editor UI should be refreshed.
281
+ *
282
+ * See: {@link #_hideUI} to learn when the UI stops reacting to the `update` event.
283
+ *
284
+ * @protected
285
+ */
286
+ _startUpdatingUI() {
287
+ const editor = this.editor;
288
+ const viewDocument = editor.editing.view.document;
289
+
290
+ let prevSelectedLink = this._getSelectedTooltipElement();
291
+ let prevSelectionParent = getSelectionParent();
292
+
293
+ const update = () => {
294
+ const selectedLink = this._getSelectedTooltipElement();
295
+ const selectionParent = getSelectionParent();
296
+
297
+ // Hide the panel if:
298
+ //
299
+ // * the selection went out of the EXISTING link element. E.g. user moved the caret out
300
+ // of the link,
301
+ // * the selection went to a different parent when creating a NEW link. E.g. someone
302
+ // else modified the document.
303
+ // * the selection has expanded (e.g. displaying link actions then pressing SHIFT+Right arrow).
304
+ //
305
+ // Note: #_getSelectedTooltipElement will return a link for a non-collapsed selection only
306
+ // when fully selected.
307
+ if ((prevSelectedLink && !selectedLink) ||
308
+ (!prevSelectedLink && selectionParent !== prevSelectionParent)) {
309
+ this._hideUI();
310
+ }
311
+ // Update the position of the panel when:
312
+ // * link panel is in the visible stack
313
+ // * the selection remains in the original link element,
314
+ // * there was no link element in the first place, i.e. creating a new link
315
+ else if (this._isUIVisible) {
316
+ // If still in a link element, simply update the position of the balloon.
317
+ // If there was no link (e.g. inserting one), the balloon must be moved
318
+ // to the new position in the editing view (a new native DOM range).
319
+ this._balloon.updatePosition(this._getBalloonPositionData());
320
+ }
321
+
322
+ prevSelectedLink = selectedLink;
323
+ prevSelectionParent = selectionParent;
324
+ };
325
+
326
+ function getSelectionParent() {
327
+ return viewDocument.selection.focus.getAncestors()
328
+ .reverse()
329
+ .find(node => node.is('element'));
168
330
  }
169
- this.stopListening(this.editor.ui, 'update');
170
- this._balloon.remove(this._actionView);
171
331
 
172
- if (focusEditable) {
173
- this.editor.editing.view.focus();
332
+ this.listenTo(editor.ui, 'update', update);
333
+ this.listenTo(this._balloon, 'change:visibleView', update);
334
+ }
335
+
336
+ get _areActionsInPanel() {
337
+ return this._balloon.hasView(this.actionsView);
338
+ }
339
+
340
+ get _areActionsVisible() {
341
+ return this._balloon.visibleView === this.actionsView;
342
+ }
343
+
344
+ get _isUIInPanel() {
345
+ return this._areActionsInPanel;
346
+ }
347
+
348
+ get _isUIVisible() {
349
+ const visibleView = this._balloon.visibleView;
350
+
351
+ return visibleView == this._areActionsVisible;
352
+ }
353
+
354
+ /**
355
+ * Returns positioning options for the {@link #_balloon}. They control the way the balloon is attached
356
+ * to the target element or selection.
357
+ *
358
+ * If the selection is collapsed and inside a link element, the panel will be attached to the
359
+ * entire link element. Otherwise, it will be attached to the selection.
360
+ *
361
+ * @private
362
+ * @returns {module:utils/dom/position~Options}
363
+ */
364
+ _getBalloonPositionData() {
365
+ const view = this.editor.editing.view;
366
+ const model = this.editor.model;
367
+ const viewDocument = view.document;
368
+ let target = null;
369
+
370
+ if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {
371
+ // There are cases when we highlight selection using a marker (#7705, #4721).
372
+ const markerViewElements = Array.from(this.editor.editing.mapper.markerNameToElements(VISUAL_SELECTION_MARKER_NAME));
373
+ const newRange = view.createRange(
374
+ view.createPositionBefore(markerViewElements[ 0 ]),
375
+ view.createPositionAfter(markerViewElements[ markerViewElements.length - 1 ])
376
+ );
377
+
378
+ target = view.domConverter.viewRangeToDom(newRange);
379
+ } else {
380
+ const targetLink = this._getSelectedTooltipElement();
381
+ const range = viewDocument.selection.getFirstRange();
382
+
383
+ target = targetLink ?
384
+ // When selection is inside link element, then attach panel to this element.
385
+ view.domConverter.mapViewToDom(targetLink) :
386
+ // Otherwise attach panel to the selection.
387
+ view.domConverter.viewRangeToDom(range);
174
388
  }
389
+
390
+ return { target };
175
391
  }
176
392
 
177
- _getSelectedTooltipElement() {
393
+ /**
394
+ * Returns the link {@link module:engine/view/attributeelement~AttributeElement} under
395
+ * the {@link module:engine/view/document~Document editing view's} selection or `null`
396
+ * if there is none.
397
+ *
398
+ * **Note**: For a non–collapsed selection, the link element is only returned when **fully**
399
+ * selected and the **only** element within the selection boundaries.
400
+ *
401
+ * @private
402
+ * @returns {module:engine/view/attributeelement~AttributeElement|null}
403
+ */
404
+ _getSelectedTooltipElement() {
178
405
  const view = this.editor.editing.view;
179
406
  const selection = view.document.selection;
407
+
180
408
  if (selection.isCollapsed) {
181
409
  return findTooltipElementAncestor(selection.getFirstPosition());
182
- }
183
- else {
410
+ } else {
184
411
  // The range for fully selected link is usually anchored in adjacent text nodes.
185
412
  // Trim it to get closer to the actual link element.
186
413
  const range = selection.getFirstRange().getTrimmed();
187
- const startTooltip = findTooltipElementAncestor(range.start);
188
- const endTooltip = findTooltipElementAncestor(range.end);
189
- if (!startTooltip || startTooltip != endTooltip) {
414
+ const startLink = findTooltipElementAncestor(range.start);
415
+ const endLink = findTooltipElementAncestor(range.end);
416
+
417
+ if (!startLink || startLink != endLink) {
190
418
  return null;
191
419
  }
192
420
 
193
421
  // Check if the link element is fully selected.
194
- if (view.createRangeIn(startTooltip).getTrimmed().isEqual(range)) {
195
- return startTooltip;
196
- }
197
- else {
422
+ if (view.createRangeIn(startLink).getTrimmed().isEqual(range)) {
423
+ return startLink;
424
+ } else {
198
425
  return null;
199
426
  }
200
427
  }
201
428
  }
429
+
430
+ /**
431
+ * Displays a fake visual selection when the contextual balloon is displayed.
432
+ *
433
+ * This adds a 'link-ui' marker into the document that is rendered as a highlight on selected text fragment.
434
+ *
435
+ * @private
436
+ */
437
+ _showFakeVisualSelection() {
438
+ const model = this.editor.model;
439
+
440
+ model.change(writer => {
441
+ const range = model.document.selection.getFirstRange();
442
+
443
+ if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {
444
+ writer.updateMarker(VISUAL_SELECTION_MARKER_NAME, { range });
445
+ } else {
446
+ if (range.start.isAtEnd) {
447
+ const startPosition = range.start.getLastMatchingPosition(
448
+ ({ item }) => !model.schema.isContent(item),
449
+ { boundaries: range }
450
+ );
451
+
452
+ writer.addMarker(VISUAL_SELECTION_MARKER_NAME, {
453
+ usingOperation: false,
454
+ affectsData: false,
455
+ range: writer.createRange(startPosition, range.end)
456
+ });
457
+ } else {
458
+ writer.addMarker(VISUAL_SELECTION_MARKER_NAME, {
459
+ usingOperation: false,
460
+ affectsData: false,
461
+ range
462
+ });
463
+ }
464
+ }
465
+ });
466
+ }
467
+
468
+ /**
469
+ * Hides the fake visual selection created in {@link #_showFakeVisualSelection}.
470
+ *
471
+ * @private
472
+ */
473
+ _hideFakeVisualSelection() {
474
+ const model = this.editor.model;
475
+
476
+ if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {
477
+ model.change(writer => {
478
+ writer.removeMarker(VISUAL_SELECTION_MARKER_NAME);
479
+ });
480
+ }
481
+ }
482
+ }
483
+
484
+ // Returns a link element if there's one among the ancestors of the provided `Position`.
485
+ //
486
+ // @private
487
+ // @param {module:engine/view/position~Position} View position to analyze.
488
+ // @returns {module:engine/view/attributeelement~AttributeElement|null} Link element at the position or null.
489
+ function findTooltipElementAncestor(position) {
490
+ return position.getAncestors().find(ancestor => isTooltipElement(ancestor));
202
491
  }
203
-