qms-angular 1.0.69 → 1.0.73
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.
- package/bundles/qms-angular.umd.js +2583 -530
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/components/badges/qms-badges.component.js +3 -3
- package/esm2015/lib/components/button/button.js +1 -1
- package/esm2015/lib/components/qms-app-bar/index.js +2 -0
- package/esm2015/lib/components/qms-app-bar/models/qms-app-bar.model.js +10 -0
- package/esm2015/lib/components/qms-app-bar/public_api.js +3 -0
- package/esm2015/lib/components/qms-app-bar/qms-app-bar.component.js +2 -2
- package/esm2015/lib/components/qms-navigation-drawer/index.js +2 -0
- package/esm2015/lib/components/qms-navigation-drawer/models/qms-navigation-drawer.model.js +3 -0
- package/esm2015/lib/components/qms-navigation-drawer/public_api.js +3 -0
- package/esm2015/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.js +350 -0
- package/esm2015/lib/components/qms-navigation-drawer/qms-navigation-drawer.module.js +31 -0
- package/esm2015/lib/components/qms-paginator/index.js +2 -0
- package/esm2015/lib/components/qms-paginator/public_api.js +3 -0
- package/esm2015/lib/components/qms-paginator/qms-paginator.component.js +173 -0
- package/esm2015/lib/components/qms-paginator/qms-paginator.module.js +34 -0
- package/esm2015/lib/components/qms-status-dropdown/qms-status-dropdown.component.js +3 -3
- package/esm2015/lib/components/qms-stepper/index.js +2 -0
- package/esm2015/lib/components/qms-stepper/models/qms-stepper.model.js +9 -0
- package/esm2015/lib/components/qms-stepper/public_api.js +3 -0
- package/esm2015/lib/components/qms-stepper/qms-stepper.component.js +3 -3
- package/esm2015/lib/components/range-slider/directives/range-slider-lockup.directive.js +20 -0
- package/esm2015/lib/components/range-slider/directives/range-slider.directive.js +34 -0
- package/esm2015/lib/components/range-slider/index.js +2 -0
- package/esm2015/lib/components/range-slider/public-api.js +4 -0
- package/esm2015/lib/components/range-slider/range-slider.module.js +22 -0
- package/esm2015/lib/components/related/popup/related-popup.component.js +2 -2
- package/esm2015/lib/components/select-include-children/model/select-popup-data.model.js +2 -1
- package/esm2015/lib/components/select-include-children/select-include-children.component.js +152 -85
- package/esm2015/lib/components/select-one/select-one.component.js +50 -3
- package/esm2015/lib/components/tab/directive/tab-group-advanced.directive.js +30 -0
- package/esm2015/lib/components/tab/directive/tab-group.directive.js +20 -0
- package/esm2015/lib/components/tab/directive/tab-label.directive.js +20 -0
- package/esm2015/lib/components/tab/index.js +2 -0
- package/esm2015/lib/components/tab/public-api.js +5 -0
- package/esm2015/lib/components/tab/tab.module.js +25 -0
- package/esm2015/lib/components/tree/tree.component.js +19 -20
- package/esm2015/lib/components/treeNew/tree.component.js +6 -3
- package/esm2015/lib/directives/table/table.directive.js +201 -0
- package/esm2015/lib/model/en.js +38 -3
- package/esm2015/lib/model/no.js +37 -2
- package/esm2015/lib/qms-angular.module.js +17 -17
- package/esm2015/lib/qms-ckeditor-components/common/bpmn/inspector.function.js +68 -16
- package/esm2015/lib/qms-ckeditor-components/common/classes/qmsUploadAdapter.js +89 -0
- package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.js +7 -1
- package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorFlowchart.const.js +10 -1
- package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorLink.constant.js +7 -0
- package/esm2015/lib/qms-ckeditor-components/common/enums/document-type.enum.js +2 -1
- package/esm2015/lib/qms-ckeditor-components/common/enums/shape-flow-chart-connection-type.js +8 -0
- package/esm2015/lib/qms-ckeditor-components/common/functions/common.function.js +2 -2
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-data.model.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart-template.model.js +9 -0
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart.model.js +9 -0
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.js +3 -0
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-video-tree.model.js +4 -0
- package/esm2015/lib/qms-ckeditor-components/common/models/wproofreader-config.model.js +6 -0
- package/esm2015/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.js +38 -0
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +564 -34
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.js +46 -18
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-fullscreen/qms-ckeditor-fullscreen.component.js +1 -46
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +9 -8
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +5 -2
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +4 -5
- package/esm2015/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.js +8 -0
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +184 -28
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.module.js +8 -2
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.js +58 -20
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.js +26 -0
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-tree.service.js +4 -1
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-upload.service.js +20 -0
- package/esm2015/public-api.js +14 -12
- package/esm2015/qms-angular.js +6 -3
- package/fesm2015/qms-angular.js +2393 -491
- package/fesm2015/qms-angular.js.map +1 -1
- package/lib/components/qms-app-bar/index.d.ts +1 -0
- package/lib/components/qms-app-bar/{qms-app-bar.model.d.ts → models/qms-app-bar.model.d.ts} +0 -0
- package/lib/components/qms-app-bar/public_api.d.ts +2 -0
- package/lib/components/qms-app-bar/qms-app-bar.component.d.ts +1 -1
- package/lib/components/qms-navigation-drawer/index.d.ts +1 -0
- package/lib/components/qms-navigation-drawer/models/qms-navigation-drawer.model.d.ts +19 -0
- package/lib/components/qms-navigation-drawer/public_api.d.ts +2 -0
- package/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.d.ts +106 -0
- package/lib/components/qms-navigation-drawer/qms-navigation-drawer.module.d.ts +2 -0
- package/lib/components/qms-paginator/index.d.ts +1 -0
- package/lib/components/qms-paginator/public_api.d.ts +2 -0
- package/lib/components/qms-paginator/qms-paginator.component.d.ts +51 -0
- package/lib/components/qms-paginator/qms-paginator.module.d.ts +2 -0
- package/lib/components/qms-stepper/index.d.ts +1 -0
- package/lib/components/qms-stepper/{qms-stepper.model.d.ts → models/qms-stepper.model.d.ts} +0 -0
- package/lib/components/qms-stepper/public_api.d.ts +2 -0
- package/lib/components/qms-stepper/qms-stepper.component.d.ts +1 -1
- package/lib/{directives/range-slider → components/range-slider/directives}/range-slider-lockup.directive.d.ts +0 -0
- package/lib/{directives/range-slider → components/range-slider/directives}/range-slider.directive.d.ts +0 -0
- package/lib/components/range-slider/index.d.ts +1 -0
- package/lib/components/range-slider/public-api.d.ts +3 -0
- package/lib/components/range-slider/range-slider.module.d.ts +2 -0
- package/lib/components/select-include-children/model/select-popup-data.model.d.ts +1 -0
- package/lib/components/select-include-children/select-include-children.component.d.ts +5 -3
- package/lib/components/select-one/select-one.component.d.ts +4 -0
- package/lib/{directives/tab → components/tab/directive}/tab-group-advanced.directive.d.ts +0 -0
- package/lib/{directives/tab → components/tab/directive}/tab-group.directive.d.ts +0 -0
- package/lib/{directives/tab → components/tab/directive}/tab-label.directive.d.ts +0 -0
- package/lib/components/tab/index.d.ts +1 -0
- package/lib/components/tab/public-api.d.ts +4 -0
- package/lib/components/tab/tab.module.d.ts +2 -0
- package/lib/directives/table/table.directive.d.ts +50 -0
- package/lib/model/en.d.ts +35 -0
- package/lib/model/no.d.ts +35 -0
- package/lib/qms-ckeditor-components/common/bpmn/inspector.function.d.ts +28 -0
- package/lib/qms-ckeditor-components/common/classes/qmsUploadAdapter.d.ts +18 -0
- package/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.d.ts +6 -0
- package/lib/qms-ckeditor-components/common/constants/ckeditorFlowchart.const.d.ts +9 -0
- package/lib/qms-ckeditor-components/common/constants/ckeditorLink.constant.d.ts +6 -0
- package/lib/qms-ckeditor-components/common/enums/document-type.enum.d.ts +1 -0
- package/lib/qms-ckeditor-components/common/enums/shape-flow-chart-connection-type.d.ts +6 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-data.model.d.ts +5 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart-template.model.d.ts +7 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart.model.d.ts +7 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.d.ts +5 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-video-tree.model.d.ts +5 -0
- package/lib/qms-ckeditor-components/common/models/wproofreader-config.model.d.ts +25 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.d.ts +15 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.d.ts +88 -4
- package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.d.ts +8 -2
- package/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.d.ts +2 -1
- package/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.d.ts +7 -0
- package/lib/qms-ckeditor-components/qms-ckeditor.component.d.ts +17 -5
- package/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.d.ts +1 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.d.ts +10 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-tree.service.d.ts +2 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-upload.service.d.ts +5 -0
- package/lib.theme.scss +2 -0
- package/package.json +4 -2
- package/public-api.d.ts +10 -11
- package/qms-angular.d.ts +5 -2
- package/qms-angular.metadata.json +1 -1
- package/src/assets/fonts/icomoon.eot +0 -0
- package/src/assets/fonts/icomoon.svg +203 -0
- package/src/assets/fonts/icomoon.ttf +0 -0
- package/src/assets/fonts/icomoon.woff +0 -0
- package/src/assets/images/ckeditor5.svg +1 -0
- package/src/assets/jointjs/js/rappid.js +55919 -55836
- package/src/assets/jointjs/scss/bpmn.scss +2 -1
- package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +2 -2
- package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/ar.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/az.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/bg.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/cs.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/da.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/de-ch.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/de.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/en-au.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/en-gb.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/es.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/et.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/fa.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/fi.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/fr.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/gl.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/he.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/hi.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/hr.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/hu.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/id.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/it.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/ja.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/ko.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/ku.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/lt.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/lv.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/nb.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/ne.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/nl.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/no.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/pl.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/pt-br.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/ro.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/ru.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/sk.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/sl.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/sq.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/sr-latn.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/sr.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/sv.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/th.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/tk.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/tr.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/ug.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/uk.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/vi.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/zh-cn.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/zh.js +1 -1
- package/src/assets/qms-ckeditor-plugin/package-lock.json +52 -1
- package/src/assets/qms-ckeditor-plugin/package.json +2 -0
- package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +22 -4
- package/src/assets/qms-ckeditor-plugin/src/plugins/aboutckeditor/aboutckeditor.js +28 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/bpmn/bpmndialogcommand.js +74 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/bpmn/qmsCKEditorBpmnPlugin.js +6 -44
- package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorConstant.js +11 -1
- package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorService.js +21 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorUtil.js +29 -7
- package/src/assets/qms-ckeditor-plugin/src/plugins/fullscreen/qmsCKEditorFullscreenPlugin.js +23 -12
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/converters.js +93 -92
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemap.js +4 -4
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapcommand.js +93 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapdialogcommand.js +59 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapediting.js +92 -87
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapui.js +13 -14
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/resizeimagemapcommand.js +25 -24
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/utils.js +40 -49
- package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkcommand.js +131 -176
- package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkdialogcommand.js +88 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkediting.js +2 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkui.js +41 -32
- package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/tableofcontents.js +14 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/tableofcontentscommand.js +87 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/tableofcontentsediting.js +59 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/tableofcontentsui.js +35 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/tableofcontents/utils.js +62 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/template/loadtemplatedialogcommand.js +14 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/template/qmsCKEditorLoadTemplatePlugin.js +10 -12
- package/src/assets/qms-ckeditor-plugin/src/plugins/template/qmsCKEdtiorTemplatePlugin.js +10 -7
- package/src/assets/qms-ckeditor-plugin/src/plugins/template/templatedialogcommand.js +9 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/timestamp/timestamp.js +15 -18
- package/src/assets/qms-ckeditor-plugin/src/plugins/timestamp/timestampcommand.js +17 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/removetooltipcommand.js +42 -26
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltip.js +3 -3
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipcommand.js +75 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipdialogcommand.js +68 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipediting.js +206 -131
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipui.js +424 -136
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/ui/actionsview.js +67 -12
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/utils.js +17 -55
- package/src/assets/qms-ckeditor-plugin/src/plugins/video/autovideo.js +1 -5
- package/src/assets/qms-ckeditor-plugin/src/plugins/video/video/videoediting.js +5 -2
- package/src/assets/qms-ckeditor-plugin/src/plugins/video/videoupload/browsevideodialogcommand.js +25 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/video/videoupload/uploadvideocommand.js +3 -16
- package/src/assets/qms-ckeditor-plugin/src/plugins/video/videoupload/videouploadediting.js +4 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/video/videoupload/videouploadui.js +12 -23
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/fullscreen_exit.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/information.svg +1 -50
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/table-excel.svg +44 -0
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/timestamp.svg +1 -1
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/tooltip.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/themes/styles/heading.css +54 -0
- package/src/assets/qms-ckeditor-plugin/src/themes/styles/tooltip.css +11 -53
- package/src/assets/svg-icons/acutely-toxic.svg +19 -0
- package/src/assets/svg-icons/add-column.svg +4 -0
- package/src/assets/svg-icons/add-tooltip.svg +6 -0
- package/src/assets/svg-icons/admin.svg +3 -0
- package/src/assets/svg-icons/annual-cycle.svg +10 -0
- package/src/assets/svg-icons/assignment-repete.svg +4 -0
- package/src/assets/svg-icons/barrier-add.svg +7 -0
- package/src/assets/svg-icons/barrier-edit.svg +7 -0
- package/src/assets/svg-icons/barrier-view.svg +3 -0
- package/src/assets/svg-icons/button-group.svg +5 -0
- package/src/assets/svg-icons/checklist.svg +8 -0
- package/src/assets/svg-icons/chemical-manager.svg +5 -0
- package/src/assets/svg-icons/chronic-health-hazard.svg +17 -0
- package/src/assets/svg-icons/contingency.svg +3 -0
- package/src/assets/svg-icons/corrosive.svg +23 -0
- package/src/assets/svg-icons/dashboard.svg +3 -0
- package/src/assets/svg-icons/database-sds.svg +4 -0
- package/src/assets/svg-icons/department-document.svg +4 -0
- package/src/assets/svg-icons/department-folder-closed.svg +4 -0
- package/src/assets/svg-icons/department-folder-open.svg +4 -0
- package/src/assets/svg-icons/description-add.svg +6 -0
- package/src/assets/svg-icons/description-edit.svg +6 -0
- package/src/assets/svg-icons/description-view.svg +3 -0
- package/src/assets/svg-icons/deviation.svg +3 -0
- package/src/assets/svg-icons/document-read.svg +5 -0
- package/src/assets/svg-icons/draft.svg +7 -0
- package/src/assets/svg-icons/dropdown-folder.svg +4 -0
- package/src/assets/svg-icons/enterprise-document.svg +4 -0
- package/src/assets/svg-icons/enterprise-folder-closed.svg +4 -0
- package/src/assets/svg-icons/enterprise-folder-open.svg +4 -0
- package/src/assets/svg-icons/expired-off.svg +3 -0
- package/src/assets/svg-icons/expired-on.svg +5 -0
- package/src/assets/svg-icons/explosive.svg +48 -0
- package/src/assets/svg-icons/file-excel.svg +3 -0
- package/src/assets/svg-icons/file-pdf-verified.svg +5 -0
- package/src/assets/svg-icons/file-pdf.svg +3 -0
- package/src/assets/svg-icons/file-word.svg +3 -0
- package/src/assets/svg-icons/filter-alt.svg +3 -0
- package/src/assets/svg-icons/flammable.svg +5 -0
- package/src/assets/svg-icons/flowchart-BPMN.svg +9 -0
- package/src/assets/svg-icons/folder-closed.svg +3 -0
- package/src/assets/svg-icons/folder-open.svg +3 -0
- package/src/assets/svg-icons/gas-under-pressure.svg +4 -0
- package/src/assets/svg-icons/health-hazard.svg +4 -0
- package/src/assets/svg-icons/keyboard_arrow_down.svg +1 -0
- package/src/assets/svg-icons/keyboard_arrow_up.svg +1 -0
- package/src/assets/svg-icons/line-break.svg +7 -0
- package/src/assets/svg-icons/local-document.svg +4 -0
- package/src/assets/svg-icons/local-folder-closed.svg +4 -0
- package/src/assets/svg-icons/local-folder-open.svg +4 -0
- package/src/assets/svg-icons/location.svg +3 -0
- package/src/assets/svg-icons/measure-add.svg +5 -0
- package/src/assets/svg-icons/measure-edit.svg +5 -0
- package/src/assets/svg-icons/measure-view.svg +3 -0
- package/src/assets/svg-icons/messages.svg +3 -0
- package/src/assets/svg-icons/monitoring.svg +5 -0
- package/src/assets/svg-icons/move.svg +3 -0
- package/src/assets/svg-icons/oxidizing.svg +6 -0
- package/src/assets/svg-icons/process-area-closed.svg +4 -0
- package/src/assets/svg-icons/process-area-open.svg +4 -0
- package/src/assets/svg-icons/process-linked.svg +4 -0
- package/src/assets/svg-icons/process.svg +3 -0
- package/src/assets/svg-icons/regional-document.svg +4 -0
- package/src/assets/svg-icons/regional-folder-closed.svg +4 -0
- package/src/assets/svg-icons/regional-folder-open.svg +4 -0
- package/src/assets/svg-icons/risk.svg +3 -0
- package/src/assets/svg-icons/search-in-file.svg +4 -0
- package/src/assets/svg-icons/sort-ascending.svg +3 -0
- package/src/assets/svg-icons/sort-descending.svg +3 -0
- package/src/assets/svg-icons/subscript.svg +4 -0
- package/src/assets/svg-icons/superscript.svg +4 -0
- package/src/assets/svg-icons/syncronice-favorites.svg +5 -0
- package/src/assets/svg-icons/system-settings.svg +3 -0
- package/src/assets/svg-icons/view-three-outlined.svg +5 -0
- package/src/assets/svg-icons/wiris.svg +9 -0
- package/src/assets/svg-icons/workplace-safety.svg +5 -0
- package/src/lib/components/badges/_qms-badges-base.scss +8 -7
- package/src/lib/components/badges/qms-badges.component.scss +1 -1
- package/src/lib/components/button/button-icon.scss +5 -1
- package/src/lib/components/qms-app-bar/qms-app-bar.component.scss +10 -0
- package/src/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.scss +182 -0
- package/src/lib/components/qms-paginator/qms-paginator.component.scss +128 -0
- package/src/lib/components/qms-status-dropdown/qms-status-dropdown.component.scss +6 -2
- package/src/lib/components/tree/tree.component.scss +3 -1
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.scss +16 -0
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.scss +69 -17
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.scss +26 -23
- package/src/lib/qms-ckeditor-components/qms-ckeditor.component.scss +24 -0
- package/src/lib/qms-ckeditor-components/styles/_modules.scss +9 -1
- package/src/themes/_qms-icon-font.scss +894 -0
- package/src/themes/core/_colors.scss +1 -0
- package/src/themes/core/_range-slider.scss +62 -39
- package/src/themes/core/_tab.scss +42 -1
- package/src/themes/core/_table.scss +55 -0
- package/esm2015/lib/components/qms-app-bar/qms-app-bar.model.js +0 -10
- package/esm2015/lib/components/qms-stepper/qms-stepper.model.js +0 -9
- package/esm2015/lib/directives/range-slider/range-slider-lockup.directive.js +0 -20
- package/esm2015/lib/directives/range-slider/range-slider.directive.js +0 -36
- package/esm2015/lib/directives/tab/tab-group-advanced.directive.js +0 -30
- package/esm2015/lib/directives/tab/tab-group.directive.js +0 -20
- package/esm2015/lib/directives/tab/tab-label.directive.js +0 -20
- package/esm2015/lib/qms-ckeditor-components/common/classes/uploadAdapter.js +0 -26
- package/lib/qms-ckeditor-components/common/classes/uploadAdapter.d.ts +0 -5
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/insertimagemapcommand.js +0 -128
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/inserttooltipcommand.js +0 -88
@@ -0,0 +1,59 @@
|
|
1
|
+
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
2
|
+
import { TOC_ATTRIBUTES, TOC_COMMAND, normalizeHeadingOptions } from './utils';
|
3
|
+
import TableOfContentsCommand from './tableofcontentscommand';
|
4
|
+
import '../../themes/styles/heading.css';
|
5
|
+
|
6
|
+
export default class TableOfContentsEditing extends Plugin {
|
7
|
+
static get pluginName() {
|
8
|
+
return 'TableOfContentsEditing';
|
9
|
+
}
|
10
|
+
|
11
|
+
init() {
|
12
|
+
const editor = this.editor;
|
13
|
+
const model = editor.model;
|
14
|
+
const supportedHeadings = normalizeHeadingOptions(editor.config.get('tableOfContents.supportedHeadings'));
|
15
|
+
model.schema.extend('$block', { allowAttributes: TOC_ATTRIBUTES.HEADING_CLASS } );
|
16
|
+
model.schema.setAttributeProperties(TOC_ATTRIBUTES.HEADING_CLASS, { isFormatting: true } );
|
17
|
+
editor.conversion.attributeToAttribute(buildClassDefinition(supportedHeadings));
|
18
|
+
editor.commands.add(TOC_COMMAND, new TableOfContentsCommand(editor));
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
function buildClassDefinition( supportedHeadings ) {
|
23
|
+
const options = [];
|
24
|
+
supportedHeadings.forEach((name) =>{
|
25
|
+
try{
|
26
|
+
/* Reference to the default config of the heading plugin
|
27
|
+
editor.config.define( 'heading', {
|
28
|
+
options: [
|
29
|
+
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
|
30
|
+
{ model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },
|
31
|
+
{ model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },
|
32
|
+
{ model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }
|
33
|
+
]
|
34
|
+
}); */
|
35
|
+
const level = parseInt(name.replace('heading', '')) + 1;
|
36
|
+
const className = 'h' + level;
|
37
|
+
options.push({ name, className });
|
38
|
+
}
|
39
|
+
catch{
|
40
|
+
|
41
|
+
}
|
42
|
+
});
|
43
|
+
|
44
|
+
const definition = {
|
45
|
+
model: {
|
46
|
+
key: TOC_ATTRIBUTES.HEADING_CLASS,
|
47
|
+
values: options.map(option => option.name)
|
48
|
+
},
|
49
|
+
view: {}
|
50
|
+
};
|
51
|
+
|
52
|
+
for (const option of options) {
|
53
|
+
definition.view[option.name] = {
|
54
|
+
key: 'class',
|
55
|
+
value: option.className
|
56
|
+
};
|
57
|
+
}
|
58
|
+
return definition;
|
59
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
2
|
+
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
|
3
|
+
import tableIcon from '../../themes/icons/table-excel.svg';
|
4
|
+
import { TOC_COMMAND, normalizeHeadingOptions } from './utils';
|
5
|
+
|
6
|
+
export default class TableOfContentsUI extends Plugin {
|
7
|
+
static get pluginName() {
|
8
|
+
return 'TableOfContentsUI';
|
9
|
+
}
|
10
|
+
|
11
|
+
init() {
|
12
|
+
const editor = this.editor;
|
13
|
+
const t = editor.t;
|
14
|
+
const supportedHeadings = normalizeHeadingOptions(editor.config.get('tableOfContents.supportedHeadings'));
|
15
|
+
editor.ui.componentFactory.add('tableOfContents', locale => {
|
16
|
+
const buttonView = new ButtonView( locale );
|
17
|
+
buttonView.set( {
|
18
|
+
label: t('Create Table of Contents'),
|
19
|
+
icon: tableIcon,
|
20
|
+
withText: false,
|
21
|
+
tooltip: true
|
22
|
+
} );
|
23
|
+
|
24
|
+
// Bind button to the command.
|
25
|
+
const tocCommand = editor.commands.get(TOC_COMMAND);
|
26
|
+
buttonView.bind('isEnabled').to(tocCommand, 'isEnabled' );
|
27
|
+
buttonView.bind('isOn').to(tocCommand, 'value', value => !!value );
|
28
|
+
|
29
|
+
buttonView.on('execute', () => {
|
30
|
+
editor.execute(TOC_COMMAND, { headings: supportedHeadings });
|
31
|
+
});
|
32
|
+
return buttonView;
|
33
|
+
});
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
|
2
|
+
export const DEFAULT_SUPPORTED_HEADINGS = ['heading1', 'heading2', 'heading3'];//It is already defined by the heading plugin
|
3
|
+
export const TOC_CUSTOM_PROPERTY = 'toc';
|
4
|
+
export const TOC_COMMAND = 'inserttoc';
|
5
|
+
export const TOC_ATTRIBUTES = {
|
6
|
+
HEADING_CLASS: 'headingClass',
|
7
|
+
ANCHOR_ID: 'anchorId', //It is already defined by the anchor plugin,
|
8
|
+
LINK_HREF: 'linkHref'//It is already defined by the link plugin
|
9
|
+
}
|
10
|
+
|
11
|
+
export const TOC_ELEMENTS = {
|
12
|
+
TOC: 'toc',
|
13
|
+
PARAGRAPH: 'paragraph' //It is already defined by the paragraph plugin
|
14
|
+
}
|
15
|
+
|
16
|
+
export function normalizeHeadingOptions(headingOptions) {
|
17
|
+
let headings = headingOptions || [];
|
18
|
+
headings = headings.map(value => value.toLowerCase()).filter(value => value.startsWith('heading'));
|
19
|
+
if(headings.length == 0){
|
20
|
+
headings = DEFAULT_SUPPORTED_HEADINGS;
|
21
|
+
}
|
22
|
+
return headings;
|
23
|
+
}
|
24
|
+
|
25
|
+
export function rangeToText(range) {
|
26
|
+
return Array.from(range.getItems()).reduce((rangeText, node) => {
|
27
|
+
if (!(node.is('text') || node.is('textProxy'))) {
|
28
|
+
return rangeText;
|
29
|
+
}
|
30
|
+
return rangeText + node.data;
|
31
|
+
}, '');
|
32
|
+
}
|
33
|
+
|
34
|
+
export function getAttributeValueOn(range, attributeName) {
|
35
|
+
for (const item of range.getItems()) {
|
36
|
+
for (const [ key, value ] of item.getAttributes()) {
|
37
|
+
if (key.toLowerCase() == attributeName.toLowerCase()) {
|
38
|
+
return value;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
return null;
|
43
|
+
}
|
44
|
+
|
45
|
+
export function setAttributeOn(range, schema, writer, attribute) {
|
46
|
+
for (const node of Array.from(range.getItems())) {
|
47
|
+
if (schema.checkAttribute(node, attribute.key)) {
|
48
|
+
writer.setAttribute(attribute.key, attribute.value, node);
|
49
|
+
return true;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
return false;
|
53
|
+
}
|
54
|
+
|
55
|
+
export function getTextNodeOn(range) {
|
56
|
+
for (const node of Array.from(range.getItems())) {
|
57
|
+
if (node.is('text') || node.is('textProxy')) {
|
58
|
+
return node;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
return null;
|
62
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Command } from '@ckeditor/ckeditor5-core';
|
2
|
+
import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
|
3
|
+
import * as QMSCKEditorService from '../common/qmsCKEditorService';
|
4
|
+
|
5
|
+
export default class LoadTemplateDialogCommand extends Command {
|
6
|
+
|
7
|
+
execute() {
|
8
|
+
QMSCKEditorService.loadTemplateNotify(null);
|
9
|
+
window.addEventListener(QMSCKEditorConstant.QMSCK_LOAD_TEMPLATE_PLUGIN_RESP, function (evt) {
|
10
|
+
editor.setData(evt.detail);
|
11
|
+
}, { once: true });
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
package/src/assets/qms-ckeditor-plugin/src/plugins/template/qmsCKEditorLoadTemplatePlugin.js
CHANGED
@@ -1,32 +1,30 @@
|
|
1
1
|
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
2
2
|
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
|
3
3
|
import TemplateIcon from '../../themes/icons/load_template.svg';
|
4
|
-
import
|
5
|
-
import * as QMSCKEditorService from '../common/qmsCKEditorService';
|
6
|
-
|
4
|
+
import LoadTemplateDialogCommand from './loadtemplatedialogcommand';
|
7
5
|
export default class QMSCKEditorLoadTemplatePlugin extends Plugin {
|
8
6
|
init() {
|
9
7
|
const editor = this.editor;
|
8
|
+
const t = editor.t;
|
10
9
|
|
11
10
|
editor.ui.componentFactory.add('qmsLoadTemplate', locale => {
|
12
11
|
const view = new ButtonView(locale);
|
13
|
-
|
12
|
+
const command = editor.commands.get('loadtemplateDialog');
|
14
13
|
view.set({
|
15
|
-
label: 'Templates',
|
14
|
+
label: t('Templates'),
|
16
15
|
icon: TemplateIcon,
|
17
16
|
tooltip: true
|
18
17
|
});
|
19
18
|
|
20
|
-
view.
|
21
|
-
QMSCKEditorService.loadTemplateNotify(null);
|
19
|
+
view.bind('isEnabled').to(command);
|
22
20
|
|
23
|
-
|
24
|
-
|
25
|
-
},
|
26
|
-
{ once: true });
|
21
|
+
view.on('execute', () => {
|
22
|
+
command.execute();
|
27
23
|
});
|
28
24
|
|
29
25
|
return view;
|
30
|
-
})
|
26
|
+
});
|
27
|
+
|
28
|
+
editor.commands.add('loadtemplateDialog', new LoadTemplateDialogCommand(editor));
|
31
29
|
}
|
32
30
|
}
|
@@ -1,26 +1,29 @@
|
|
1
1
|
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
2
2
|
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
|
3
3
|
import TemplateIcon from '../../themes/icons/template.svg';
|
4
|
-
import
|
5
|
-
|
4
|
+
import TemplateDialogCommand from './templatedialogcommand';
|
6
5
|
export default class QMSCKEditorTemplatePlugin extends Plugin {
|
7
6
|
init() {
|
8
7
|
const editor = this.editor;
|
9
|
-
|
8
|
+
const t = editor.t;
|
10
9
|
editor.ui.componentFactory.add('qmsTemplate', locale => {
|
11
10
|
const view = new ButtonView(locale);
|
12
|
-
|
11
|
+
const command = editor.commands.get('templateDialog');
|
13
12
|
view.set({
|
14
|
-
label: 'Add Template',
|
13
|
+
label: t('Add Template'),
|
15
14
|
icon: TemplateIcon,
|
16
15
|
tooltip: true
|
17
16
|
});
|
18
17
|
|
18
|
+
view.bind('isEnabled').to(command);
|
19
|
+
|
19
20
|
view.on('execute', () => {
|
20
|
-
|
21
|
+
command.execute();
|
21
22
|
});
|
22
23
|
|
23
24
|
return view;
|
24
|
-
})
|
25
|
+
});
|
26
|
+
|
27
|
+
editor.commands.add('templateDialog', new TemplateDialogCommand(editor));
|
25
28
|
}
|
26
29
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
2
2
|
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
|
3
3
|
import timestampIcon from '../../themes/icons/timestamp.svg';
|
4
|
-
import
|
5
|
-
import { toMap } from '@ckeditor/ckeditor5-utils';
|
4
|
+
import TimestampCommand from './timestampcommand';
|
6
5
|
|
7
6
|
/**
|
8
7
|
* Users can format the DateTime output based on a DateTime pattern
|
@@ -10,19 +9,19 @@ import { toMap } from '@ckeditor/ckeditor5-utils';
|
|
10
9
|
* The default DateTime pattern is dd/MM/yyyy hh:mm:ss aaa
|
11
10
|
*
|
12
11
|
* DateTime Patterns:
|
13
|
-
*
|
12
|
+
*
|
14
13
|
* yy = 2-digit year; yyyy = full year
|
15
|
-
*
|
14
|
+
*
|
16
15
|
* M = digit month; MM = 2-digit month
|
17
|
-
*
|
16
|
+
*
|
18
17
|
* d = digit day; dd = 2-digit day
|
19
|
-
*
|
18
|
+
*
|
20
19
|
* h = hours am/pm; hh = 2-digit hours am/pm; H = hours; HH = 2-digit hours
|
21
|
-
*
|
20
|
+
*
|
22
21
|
* m = minutes; mm = 2-digit minutes; aaa = AM/PM
|
23
|
-
*
|
22
|
+
*
|
24
23
|
* s = seconds; ss = 2-digit seconds
|
25
|
-
*
|
24
|
+
*
|
26
25
|
* S = miliseconds
|
27
26
|
*/
|
28
27
|
export default class Timestamp extends Plugin {
|
@@ -33,23 +32,21 @@ export default class Timestamp extends Plugin {
|
|
33
32
|
|
34
33
|
editor.ui.componentFactory.add('timestamp', locale => {
|
35
34
|
const buttonView = new ButtonView( locale );
|
36
|
-
|
35
|
+
const command = editor.commands.get('timestamp');
|
37
36
|
buttonView.set( {
|
38
37
|
label: t('Timestamp'),
|
39
38
|
icon: timestampIcon,
|
40
|
-
withText:
|
39
|
+
withText: false,
|
41
40
|
tooltip: true
|
42
|
-
}
|
41
|
+
});
|
42
|
+
buttonView.bind('isEnabled').to( command);
|
43
43
|
|
44
44
|
buttonView.on('execute', () => {
|
45
|
-
|
46
|
-
const attributes = toMap( editor.model.document.selection.getAttributes() );
|
47
|
-
const timestamp = writer.createText(formatDate(new Date(), datetimeformat), attributes);
|
48
|
-
editor.model.insertContent(timestamp, editor.model.document.selection );
|
49
|
-
} );
|
45
|
+
command.execute({ datetimeformat: datetimeformat })
|
50
46
|
} );
|
51
|
-
|
52
47
|
return buttonView;
|
53
48
|
} );
|
49
|
+
|
50
|
+
editor.commands.add('timestamp', new TimestampCommand(editor));
|
54
51
|
}
|
55
52
|
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Command } from '@ckeditor/ckeditor5-core';
|
2
|
+
import { formatDate } from '../common/qmsCKEditorUtil';
|
3
|
+
import { toMap } from '@ckeditor/ckeditor5-utils';
|
4
|
+
|
5
|
+
export default class TimestampCommand extends Command {
|
6
|
+
|
7
|
+
execute(options) {
|
8
|
+
const editor = this.editor;
|
9
|
+
const model = editor.model;
|
10
|
+
model.change( writer => {
|
11
|
+
const attributes = toMap(editor.model.document.selection.getAttributes());
|
12
|
+
const timestamp = writer.createText(formatDate(new Date(), options.datetimeformat), attributes);
|
13
|
+
model.insertContent(timestamp, editor.model.document.selection );
|
14
|
+
});
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
@@ -1,31 +1,47 @@
|
|
1
|
-
|
2
|
-
import { findAttributeRange } from 'ckeditor5/src/typing';
|
3
|
-
import { TOOLTIP_ATTRIBUTE } from './utils';
|
1
|
+
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
import { Command } from '@ckeditor/ckeditor5-core';
|
4
|
+
import { findAttributeRange } from '@ckeditor/ckeditor5-typing';
|
5
|
+
import { first } from '@ckeditor/ckeditor5-utils';
|
6
|
+
import { isImageAllowed } from './utils';
|
7
|
+
import { TOOLTIP_COMMANDS, HTML_ATTRIBUTE, HTML_CLASS, TOOLTIP_ATTRIBUTE, TOOLTIP_CUSTOM_PROPERTY } from './utils';
|
10
8
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
export default class RemoveTooltipCommand extends Command {
|
10
|
+
|
11
|
+
refresh() {
|
12
|
+
const model = this.editor.model;
|
13
|
+
const doc = model.document;
|
14
|
+
const selectedElement = first(doc.selection.getSelectedBlocks());
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
16
|
+
// A check for the `LinkImage` plugin. If the selection contains an image element, get values from the element.
|
17
|
+
// Currently the selection reads attributes from text nodes only. See #7429 and #7465.
|
18
|
+
if (isImageAllowed(selectedElement, model.schema)) {
|
19
|
+
this.isEnabled = model.schema.checkAttribute(selectedElement, TOOLTIP_ATTRIBUTE);
|
20
|
+
} else {
|
21
|
+
this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, TOOLTIP_ATTRIBUTE);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
execute() {
|
26
|
+
const editor = this.editor;
|
27
|
+
const model = editor.model;
|
28
|
+
const selection = model.document.selection;
|
29
|
+
|
30
|
+
model.change(writer => {
|
31
|
+
// Get ranges to unlink.
|
32
|
+
const rangesToUnlink = selection.isCollapsed ?
|
33
|
+
[findAttributeRange(
|
34
|
+
selection.getFirstPosition(),
|
35
|
+
TOOLTIP_ATTRIBUTE,
|
36
|
+
selection.getAttribute(TOOLTIP_ATTRIBUTE),
|
37
|
+
model
|
38
|
+
)] :
|
39
|
+
model.schema.getValidRanges(selection.getRanges(), TOOLTIP_ATTRIBUTE);
|
25
40
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
41
|
+
// Remove `qmsTooltip` attribute from specified ranges.
|
42
|
+
for (const range of rangesToUnlink) {
|
43
|
+
writer.removeAttribute(TOOLTIP_ATTRIBUTE, range);
|
44
|
+
}
|
45
|
+
});
|
46
|
+
}
|
31
47
|
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
1
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
3
2
|
import TooltipEditing from './tooltipediting';
|
4
3
|
import TooltipUI from './tooltipui';
|
5
4
|
|
6
5
|
export default class Tooltip extends Plugin {
|
6
|
+
|
7
7
|
static get requires() {
|
8
|
-
return [TooltipEditing, TooltipUI];
|
8
|
+
return [ TooltipEditing, TooltipUI ];
|
9
9
|
}
|
10
10
|
|
11
11
|
static get pluginName() {
|
12
12
|
return 'Tooltip';
|
13
13
|
}
|
14
|
-
}
|
14
|
+
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { Command } from '@ckeditor/ckeditor5-core';
|
2
|
+
import { findAttributeRange } from '@ckeditor/ckeditor5-typing';
|
3
|
+
import { toMap, first } from '@ckeditor/ckeditor5-utils';
|
4
|
+
import { isImageAllowed, TOOLTIP_ATTRIBUTE } from './utils';
|
5
|
+
|
6
|
+
export default class TooltipCommand extends Command {
|
7
|
+
|
8
|
+
refresh() {
|
9
|
+
const model = this.editor.model;
|
10
|
+
const doc = model.document;
|
11
|
+
const selectedElement = first(doc.selection.getSelectedBlocks());
|
12
|
+
|
13
|
+
// A check for the `LinkImage` plugin. If the selection contains an element, get values from the element.
|
14
|
+
// Currently the selection reads attributes from text nodes only. See #7429 and #7465.
|
15
|
+
if (isImageAllowed(selectedElement, model.schema)) {
|
16
|
+
this.isEnabled = model.schema.checkAttribute(selectedElement, TOOLTIP_ATTRIBUTE);
|
17
|
+
} else {
|
18
|
+
this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, TOOLTIP_ATTRIBUTE);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
execute(options) {
|
23
|
+
const model = this.editor.model;
|
24
|
+
const selection = model.document.selection;
|
25
|
+
model.change(writer => {
|
26
|
+
// If selection is collapsed then update selected link or insert new one at the place of caret.
|
27
|
+
if (selection.isCollapsed) {
|
28
|
+
const position = selection.getFirstPosition();
|
29
|
+
|
30
|
+
// When selection is inside text with `qmsTooltip` attribute.
|
31
|
+
if (selection.hasAttribute(TOOLTIP_ATTRIBUTE)) {
|
32
|
+
// Then update `qmsTooltip` value.
|
33
|
+
const linkRange = findAttributeRange(position, TOOLTIP_ATTRIBUTE, selection.getAttribute(TOOLTIP_ATTRIBUTE), model);
|
34
|
+
|
35
|
+
const attributes = toMap(selection.getAttributes());
|
36
|
+
|
37
|
+
attributes.set(TOOLTIP_ATTRIBUTE, options.content);
|
38
|
+
|
39
|
+
const { end: positionAfter } = model.insertContent(writer.createText(options.text, attributes), linkRange);
|
40
|
+
|
41
|
+
// Put the selection at the end of the inserted link.
|
42
|
+
// Using end of range returned from insertContent in case nodes with the same attributes got merged.
|
43
|
+
writer.setSelection(positionAfter);
|
44
|
+
}
|
45
|
+
else if (options.text !== '') {
|
46
|
+
const attributes = toMap(selection.getAttributes());
|
47
|
+
|
48
|
+
attributes.set(TOOLTIP_ATTRIBUTE, options.content);
|
49
|
+
|
50
|
+
const { end: positionAfter } = model.insertContent(writer.createText(options.text, attributes), position);
|
51
|
+
|
52
|
+
// Put the selection at the end of the inserted link.
|
53
|
+
// Using end of range returned from insertContent in case nodes with the same attributes got merged.
|
54
|
+
writer.setSelection(positionAfter);
|
55
|
+
}
|
56
|
+
} else {
|
57
|
+
const attributes = toMap(selection.getAttributes());
|
58
|
+
|
59
|
+
attributes.set(TOOLTIP_ATTRIBUTE, options.content);
|
60
|
+
|
61
|
+
const { end: positionAfter } = model.insertContent(writer.createText(options.text, attributes), selection);
|
62
|
+
|
63
|
+
writer.setSelection(positionAfter);
|
64
|
+
}
|
65
|
+
// Remove the `qmsTooltip` attribute and all link decorators from the selection.
|
66
|
+
// It stops adding a new content into the link element.
|
67
|
+
[TOOLTIP_ATTRIBUTE].forEach(item => {
|
68
|
+
writer.removeSelectionAttribute(item);
|
69
|
+
});
|
70
|
+
console.log('this.editor.getData()' + new Date().toISOString());
|
71
|
+
console.log(this.editor.getData());
|
72
|
+
});
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { Command } from '@ckeditor/ckeditor5-core';
|
2
|
+
import { findAttributeRange } from '@ckeditor/ckeditor5-typing';
|
3
|
+
import { first } from '@ckeditor/ckeditor5-utils';
|
4
|
+
import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
|
5
|
+
import * as QMSCKEditorService from '../common/qmsCKEditorService';
|
6
|
+
import { isImageAllowed, TOOLTIP_COMMANDS, TOOLTIP_ATTRIBUTE } from './utils';
|
7
|
+
|
8
|
+
export default class TooltipDialogCommand extends Command {
|
9
|
+
|
10
|
+
refresh() {
|
11
|
+
const model = this.editor.model;
|
12
|
+
const doc = model.document;
|
13
|
+
const selectedElement = first(doc.selection.getSelectedBlocks());
|
14
|
+
// A check for the `LinkImage` plugin. If the selection contains an element, get values from the element.
|
15
|
+
// Currently the selection reads attributes from text nodes only. See #7429 and #7465.
|
16
|
+
if (isImageAllowed(selectedElement, model.schema)) {
|
17
|
+
this.value = selectedElement.getAttribute(TOOLTIP_ATTRIBUTE);
|
18
|
+
this.isEnabled = model.schema.checkAttribute(selectedElement, TOOLTIP_ATTRIBUTE);
|
19
|
+
} else {
|
20
|
+
this.value = doc.selection.getAttribute(TOOLTIP_ATTRIBUTE);
|
21
|
+
this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, TOOLTIP_ATTRIBUTE);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
execute() {
|
26
|
+
const editor = this.editor;
|
27
|
+
const model = editor.model;
|
28
|
+
const selection = model.document.selection;
|
29
|
+
const tooltip = { text: '', content: '' };
|
30
|
+
if(selection.isCollapsed){
|
31
|
+
if(selection.hasAttribute(TOOLTIP_ATTRIBUTE)){
|
32
|
+
const linkRange = findAttributeRange(selection.getFirstPosition(), TOOLTIP_ATTRIBUTE, selection.getAttribute(TOOLTIP_ATTRIBUTE), model);
|
33
|
+
for (const node of linkRange.getItems()) {
|
34
|
+
if ((node.is('text') || node.is('textProxy')) && node.hasAttribute(TOOLTIP_ATTRIBUTE)) {
|
35
|
+
tooltip.text = node.data;
|
36
|
+
tooltip.content = node.getAttribute(TOOLTIP_ATTRIBUTE);
|
37
|
+
break;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
else
|
43
|
+
{
|
44
|
+
const ranges = selection.getFirstRange();
|
45
|
+
if(ranges)
|
46
|
+
{
|
47
|
+
for (const item of ranges.getItems()) {
|
48
|
+
if (item.data) {
|
49
|
+
tooltip.text = tooltip.text + item.data;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
QMSCKEditorService.tooltipNotify(tooltip);
|
56
|
+
window[QMSCKEditorConstant.QMSCK_TOOLTIP_IS_PROCESSING] = false;
|
57
|
+
|
58
|
+
window.addEventListener(QMSCKEditorConstant.QMSCK_TOOLTIP_PLUGIN_RESP, function (evt) {
|
59
|
+
if (window[QMSCKEditorConstant.QMSCK_TOOLTIP_IS_PROCESSING]) {
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
const options = evt.detail;
|
63
|
+
editor.commands.get(TOOLTIP_COMMANDS.TOOLTIP).execute(options);
|
64
|
+
window[QMSCKEditorConstant.QMSCK_TOOLTIP_IS_PROCESSING] = true;
|
65
|
+
}, { once: true });
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|