qms-angular 1.0.50 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/qms-angular.umd.js +19558 -11339
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/components/app-icon/app-icon.module.js +29 -16
- package/esm2015/lib/components/app-icon/icon-registry.service.js +9 -7
- package/esm2015/lib/components/badges/index.js +2 -0
- package/esm2015/lib/components/badges/models/qms-badges.model.js +13 -0
- package/esm2015/lib/components/badges/public_api.js +3 -0
- package/esm2015/lib/components/badges/qms-badges.component.js +38 -0
- package/esm2015/lib/components/badges/qms-badges.module.js +41 -0
- package/esm2015/lib/components/banner/qms-banner/qms-banner.component.js +28 -16
- package/esm2015/lib/components/banner/qms-banner/qms-banner.module.js +36 -19
- package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.js +28 -16
- package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.module.js +36 -19
- package/esm2015/lib/components/banner/qms-banner-loading/qms-banner-loading.component.js +19 -13
- package/esm2015/lib/components/banner/qms-banner-loading/qms-banner-loading.module.js +30 -17
- package/esm2015/lib/components/breadcrumb/breadcrumb-direction-icon.directive.js +11 -10
- package/esm2015/lib/components/breadcrumb/breadcrumb-item.directive.js +20 -17
- package/esm2015/lib/components/breadcrumb/breadcrumb.js +40 -28
- package/esm2015/lib/components/breadcrumb/breadcrumb.module.js +50 -26
- package/esm2015/lib/components/button/button-toggle.js +120 -85
- package/esm2015/lib/components/button/button.js +86 -78
- package/esm2015/lib/components/button/button.module.js +51 -27
- package/esm2015/lib/components/comment/comment.js +29 -18
- package/esm2015/lib/components/dialog/dialog.js +38 -28
- package/esm2015/lib/components/edit-file-name-dialog/edit-file-name-dialog.js +24 -16
- package/esm2015/lib/components/edit-file-name-dialog/edit-file-name-dialog.module.js +71 -31
- package/esm2015/lib/components/list/list.js +101 -89
- package/esm2015/lib/components/list/list.module.js +94 -50
- package/esm2015/lib/components/qms-app-bar/qms-app-bar.component.js +55 -29
- package/esm2015/lib/components/qms-app-bar/qms-app-bar.module.js +39 -20
- package/esm2015/lib/components/qms-stepper/qms-stepper.component.js +32 -22
- package/esm2015/lib/components/qms-stepper/qms-stepper.module.js +35 -25
- package/esm2015/lib/components/related/content/related-content.component.js +19 -12
- package/esm2015/lib/components/related/list-other-related/list-related.component.js +29 -25
- package/esm2015/lib/components/related/popup/related-popup.component.js +50 -33
- package/esm2015/lib/components/related/related.module.js +97 -44
- package/esm2015/lib/components/related/risk/analysis/analysis.component.js +23 -17
- package/esm2015/lib/components/related/risk/list/list.component.js +22 -18
- package/esm2015/lib/components/related/risk/result/result.component.js +23 -16
- package/esm2015/lib/components/related/service/related-global.service.js +7 -6
- package/esm2015/lib/components/related/sidenav/sidenav.component.js +21 -12
- package/esm2015/lib/components/related/tree/tree.component.js +54 -41
- package/esm2015/lib/components/reports/qms-report-content-portrait/qms-report-content-portrait.component.js +22 -18
- package/esm2015/lib/components/reports/qms-report-cover-portrait/qms-report-cover-portrait.component.js +22 -18
- package/esm2015/lib/components/reports/qms-reports.module.js +29 -20
- package/esm2015/lib/components/rich-text/rich-text.js +47 -32
- package/esm2015/lib/components/rich-text/rich-text.module.js +35 -21
- package/esm2015/lib/components/select-dialog/select-dialog.js +31 -16
- package/esm2015/lib/components/suffix-field/suffix-field.directive.js +22 -21
- package/esm2015/lib/components/table/table-action.js +31 -31
- package/esm2015/lib/components/table/table.module.js +37 -21
- package/esm2015/lib/components/test-only/test-only.component.js +14 -11
- package/esm2015/lib/components/tooltip/tooltip.js +24 -19
- package/esm2015/lib/components/tooltip/tooltip.module.js +38 -20
- package/esm2015/lib/components/upload-file-error-dialog/upload-file-error-dialog.js +22 -16
- package/esm2015/lib/components/upload-file-error-dialog/upload-file-error-dialog.module.js +71 -31
- package/esm2015/lib/directives/chip-input/chip-input-chip-list.directive.js +13 -13
- package/esm2015/lib/directives/chip-input/chip-input-field.directive.js +11 -10
- package/esm2015/lib/directives/chip-input/chip-input-select-dropdown.directive.js +11 -10
- package/esm2015/lib/directives/chip-input/chip-input-select-field.directive.js +17 -14
- package/esm2015/lib/directives/chip-input/chip-input-select-trigger.directive.js +14 -13
- package/esm2015/lib/directives/chips/chip-body.directive.js +11 -10
- package/esm2015/lib/directives/chips/chip.directive.js +13 -13
- package/esm2015/lib/directives/dropdown-menu/dropdown-item.directive.js +16 -14
- package/esm2015/lib/directives/file-upload/file-upload-attachment-list.directive.js +11 -10
- package/esm2015/lib/directives/file-upload/file-upload-display.directive.js +19 -16
- package/esm2015/lib/directives/file-upload/file-upload-multiple-display.directive.js +16 -14
- package/esm2015/lib/directives/file-upload/file-upload-multiple-selector.directive.js +26 -20
- package/esm2015/lib/directives/file-upload/file-upload-multiple.directive.js +19 -15
- package/esm2015/lib/directives/file-upload/file-upload-scrollable-attachment-list.directive.js +11 -10
- package/esm2015/lib/directives/file-upload/file-upload-selector.directive.js +25 -18
- package/esm2015/lib/directives/file-upload/file-upload.directive.js +24 -20
- package/esm2015/lib/directives/form.directive.js +48 -51
- package/esm2015/lib/directives/margin.directive.js +15 -14
- package/esm2015/lib/directives/range-slider/range-slider-lockup.directive.js +11 -10
- package/esm2015/lib/directives/range-slider/range-slider.directive.js +17 -14
- package/esm2015/lib/directives/scroll-selected/scroll-to-selected.directive.js +16 -15
- package/esm2015/lib/directives/scrollbar/scrollbar.directive.js +13 -13
- package/esm2015/lib/directives/search-field.directive.js +21 -22
- package/esm2015/lib/directives/side-sheet/drawer-content.directive.js +11 -10
- package/esm2015/lib/directives/side-sheet/drawer-header-action.directive.js +11 -10
- package/esm2015/lib/directives/side-sheet/drawer-header.directive.js +11 -10
- package/esm2015/lib/directives/side-sheet/drawer.directive.js +11 -10
- package/esm2015/lib/directives/tab/tab-group-advanced.directive.js +15 -14
- package/esm2015/lib/directives/tab/tab-group.directive.js +11 -10
- package/esm2015/lib/directives/tab/tab-label.directive.js +11 -10
- package/esm2015/lib/directives/text-block/text-block-line.directive.js +20 -16
- package/esm2015/lib/directives/text-block/text-block.directive.js +17 -14
- package/esm2015/lib/directives/tooltip/tooltip-image.directive.js +14 -13
- package/esm2015/lib/directives/tooltip/tooltip-renderer.directive.js +35 -22
- package/esm2015/lib/material-module.js +35 -16
- package/esm2015/lib/model/en.js +35 -4
- package/esm2015/lib/model/no.js +34 -3
- package/esm2015/lib/pipe/dateFormat.pipe.js +11 -10
- package/esm2015/lib/qms-angular.component.js +13 -11
- package/esm2015/lib/qms-angular.module.js +232 -121
- package/esm2015/lib/qms-angular.service.js +9 -8
- package/esm2015/lib/qms-ckeditor-components/common/bpmn/toolbar.function.js +32 -12
- package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.js +5 -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/flowchart/sample/sample-graphs.js +16 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/halo-service.js +105 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/inspector-service.js +3762 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/keyboard-service.js +68 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.js +372 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/stencil-service.js +1041 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/toolbar-service.js +326 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/shapes/app-shapes.js +318 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/themes/theme-picker.js +80 -0
- package/esm2015/lib/qms-ckeditor-components/common/functions/common.function.js +2 -2
- 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/module/confirm/qms-ckeditor-confirm.component.js +23 -16
- package/esm2015/lib/qms-ckeditor-components/common/module/tree/qms-ckeditor-tree.component.js +34 -19
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.js +43 -0
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +577 -53
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.js +69 -35
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.js +322 -0
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-fullscreen/qms-ckeditor-fullscreen.component.js +12 -8
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +39 -30
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +22 -18
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +29 -20
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +22 -18
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +35 -23
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +30 -20
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +27 -18
- package/esm2015/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.js +8 -0
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor-base.component.js +7 -4
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +118 -44
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.module.js +131 -55
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-base.service.js +10 -10
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn-api.service.js +9 -9
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.js +66 -26
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.js +26 -0
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-global.service.js +9 -8
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-link.service.js +9 -9
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-tree.service.js +9 -9
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckedtior-template.service.js +9 -9
- package/esm2015/lib/services/translation-registry.service.js +9 -8
- package/esm2015/lib/shared.module.js +9 -4
- package/esm2015/public-api.js +17 -1
- package/esm2015/qms-angular.js +1 -9
- package/fesm2015/qms-angular.js +10820 -2740
- package/fesm2015/qms-angular.js.map +1 -1
- package/lib/components/app-icon/app-icon.module.d.ts +7 -0
- package/lib/components/app-icon/icon-registry.service.d.ts +3 -0
- package/lib/components/badges/index.d.ts +1 -0
- package/lib/components/badges/models/qms-badges.model.d.ts +10 -0
- package/lib/components/badges/public_api.d.ts +2 -0
- package/lib/components/badges/qms-badges.component.d.ts +15 -0
- package/lib/components/badges/qms-badges.module.d.ts +11 -0
- package/lib/components/banner/qms-banner/qms-banner.component.d.ts +3 -0
- package/lib/components/banner/qms-banner/qms-banner.module.d.ts +10 -0
- package/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.d.ts +3 -0
- package/lib/components/banner/qms-banner-confirm/qms-banner-confirm.module.d.ts +10 -0
- package/lib/components/banner/qms-banner-loading/qms-banner-loading.component.d.ts +3 -0
- package/lib/components/banner/qms-banner-loading/qms-banner-loading.module.d.ts +8 -0
- package/lib/components/breadcrumb/breadcrumb-direction-icon.directive.d.ts +3 -0
- package/lib/components/breadcrumb/breadcrumb-item.directive.d.ts +3 -0
- package/lib/components/breadcrumb/breadcrumb.d.ts +3 -0
- package/lib/components/breadcrumb/breadcrumb.module.d.ts +13 -0
- package/lib/components/button/button-toggle.d.ts +5 -0
- package/lib/components/button/button.d.ts +7 -0
- package/lib/components/button/button.module.d.ts +9 -0
- package/lib/components/comment/comment.d.ts +3 -0
- package/lib/components/dialog/dialog.d.ts +5 -0
- package/lib/components/edit-file-name-dialog/edit-file-name-dialog.d.ts +3 -0
- package/lib/components/edit-file-name-dialog/edit-file-name-dialog.module.d.ts +16 -0
- package/lib/components/list/list.d.ts +15 -0
- package/lib/components/list/list.module.d.ts +11 -0
- package/lib/components/qms-app-bar/qms-app-bar.component.d.ts +3 -0
- package/lib/components/qms-app-bar/qms-app-bar.module.d.ts +12 -0
- package/lib/components/qms-stepper/qms-stepper.component.d.ts +3 -0
- package/lib/components/qms-stepper/qms-stepper.module.d.ts +8 -0
- package/lib/components/related/content/related-content.component.d.ts +3 -0
- package/lib/components/related/list-other-related/list-related.component.d.ts +3 -0
- package/lib/components/related/popup/related-popup.component.d.ts +3 -0
- package/lib/components/related/related.module.d.ts +29 -0
- package/lib/components/related/risk/analysis/analysis.component.d.ts +3 -0
- package/lib/components/related/risk/list/list.component.d.ts +3 -0
- package/lib/components/related/risk/result/result.component.d.ts +3 -0
- package/lib/components/related/service/related-global.service.d.ts +3 -0
- package/lib/components/related/sidenav/sidenav.component.d.ts +3 -0
- package/lib/components/related/tree/tree.component.d.ts +3 -0
- package/lib/components/reports/qms-report-content-portrait/qms-report-content-portrait.component.d.ts +3 -0
- package/lib/components/reports/qms-report-cover-portrait/qms-report-cover-portrait.component.d.ts +3 -0
- package/lib/components/reports/qms-reports.module.d.ts +7 -0
- package/lib/components/rich-text/rich-text.d.ts +3 -0
- package/lib/components/rich-text/rich-text.module.d.ts +8 -0
- package/lib/components/select-dialog/select-dialog.d.ts +3 -0
- package/lib/components/suffix-field/suffix-field.directive.d.ts +5 -0
- package/lib/components/table/table-action.d.ts +5 -0
- package/lib/components/table/table.module.d.ts +8 -0
- package/lib/components/test-only/test-only.component.d.ts +3 -0
- package/lib/components/tooltip/tooltip.d.ts +3 -0
- package/lib/components/tooltip/tooltip.module.d.ts +9 -0
- package/lib/components/upload-file-error-dialog/upload-file-error-dialog.d.ts +3 -0
- package/lib/components/upload-file-error-dialog/upload-file-error-dialog.module.d.ts +16 -0
- package/lib/directives/chip-input/chip-input-chip-list.directive.d.ts +3 -0
- package/lib/directives/chip-input/chip-input-field.directive.d.ts +3 -0
- package/lib/directives/chip-input/chip-input-select-dropdown.directive.d.ts +3 -0
- package/lib/directives/chip-input/chip-input-select-field.directive.d.ts +3 -0
- package/lib/directives/chip-input/chip-input-select-trigger.directive.d.ts +3 -0
- package/lib/directives/chips/chip-body.directive.d.ts +3 -0
- package/lib/directives/chips/chip.directive.d.ts +3 -0
- package/lib/directives/dropdown-menu/dropdown-item.directive.d.ts +3 -0
- package/lib/directives/file-upload/file-upload-attachment-list.directive.d.ts +3 -0
- package/lib/directives/file-upload/file-upload-display.directive.d.ts +3 -0
- package/lib/directives/file-upload/file-upload-multiple-display.directive.d.ts +3 -0
- package/lib/directives/file-upload/file-upload-multiple-selector.directive.d.ts +3 -0
- package/lib/directives/file-upload/file-upload-multiple.directive.d.ts +3 -0
- package/lib/directives/file-upload/file-upload-scrollable-attachment-list.directive.d.ts +3 -0
- package/lib/directives/file-upload/file-upload-selector.directive.d.ts +3 -0
- package/lib/directives/file-upload/file-upload.directive.d.ts +5 -0
- package/lib/directives/form.directive.d.ts +11 -0
- package/lib/directives/margin.directive.d.ts +3 -0
- package/lib/directives/range-slider/range-slider-lockup.directive.d.ts +3 -0
- package/lib/directives/range-slider/range-slider.directive.d.ts +3 -0
- package/lib/directives/scroll-selected/scroll-to-selected.directive.d.ts +3 -0
- package/lib/directives/scrollbar/scrollbar.directive.d.ts +3 -0
- package/lib/directives/search-field.directive.d.ts +5 -0
- package/lib/directives/side-sheet/drawer-content.directive.d.ts +3 -0
- package/lib/directives/side-sheet/drawer-header-action.directive.d.ts +3 -0
- package/lib/directives/side-sheet/drawer-header.directive.d.ts +3 -0
- package/lib/directives/side-sheet/drawer.directive.d.ts +3 -0
- package/lib/directives/tab/tab-group-advanced.directive.d.ts +3 -0
- package/lib/directives/tab/tab-group.directive.d.ts +3 -0
- package/lib/directives/tab/tab-label.directive.d.ts +3 -0
- package/lib/directives/text-block/text-block-line.directive.d.ts +3 -0
- package/lib/directives/text-block/text-block.directive.d.ts +3 -0
- package/lib/directives/tooltip/tooltip-image.directive.d.ts +3 -0
- package/lib/directives/tooltip/tooltip-renderer.directive.d.ts +3 -0
- package/lib/material-module.d.ts +12 -0
- package/lib/model/en.d.ts +31 -0
- package/lib/model/no.d.ts +31 -0
- package/lib/pipe/dateFormat.pipe.d.ts +3 -0
- package/lib/qms-angular.component.d.ts +3 -0
- package/lib/qms-angular.module.d.ts +49 -0
- package/lib/qms-angular.service.d.ts +3 -0
- package/lib/qms-ckeditor-components/common/bpmn/toolbar.function.d.ts +2 -2
- package/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.d.ts +4 -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/flowchart/sample/sample-graphs.d.ts +14 -0
- package/lib/qms-ckeditor-components/common/flowchart/service/halo-service.d.ts +48 -0
- package/lib/qms-ckeditor-components/common/flowchart/service/inspector-service.d.ts +18 -0
- package/lib/qms-ckeditor-components/common/flowchart/service/keyboard-service.d.ts +17 -0
- package/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.d.ts +62 -0
- package/lib/qms-ckeditor-components/common/flowchart/service/stencil-service.d.ts +1183 -0
- package/lib/qms-ckeditor-components/common/flowchart/service/toolbar-service.d.ts +216 -0
- package/lib/qms-ckeditor-components/common/flowchart/shapes/app-shapes.d.ts +61 -0
- package/lib/qms-ckeditor-components/common/flowchart/themes/theme-picker.d.ts +36 -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 +7 -0
- package/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/common/module/tree/qms-ckeditor-tree.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.d.ts +18 -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 +11 -2
- package/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.d.ts +44 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-fullscreen/qms-ckeditor-fullscreen.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.d.ts +4 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.d.ts +7 -0
- package/lib/qms-ckeditor-components/qms-ckeditor-base.component.d.ts +3 -0
- package/lib/qms-ckeditor-components/qms-ckeditor.component.d.ts +8 -0
- package/lib/qms-ckeditor-components/qms-ckeditor.module.d.ts +44 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-base.service.d.ts +3 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn-api.service.d.ts +3 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.d.ts +4 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.d.ts +13 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-global.service.d.ts +3 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-link.service.d.ts +3 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-tree.service.d.ts +3 -0
- package/lib/qms-ckeditor-components/services/qms-ckedtior-template.service.d.ts +3 -0
- package/lib/services/translation-registry.service.d.ts +3 -0
- package/lib/shared.module.d.ts +4 -0
- package/lib.theme.scss +8 -0
- package/package.json +1 -2
- package/public-api.d.ts +15 -0
- package/qms-angular.d.ts +1 -8
- package/src/assets/images/ckeditor5.svg +1 -0
- package/src/assets/jointjs/fonts/Alegreya_Sans/AlegreyaSans-Bold.ttf +0 -0
- package/src/assets/jointjs/fonts/Alegreya_Sans/AlegreyaSans-Light.ttf +0 -0
- package/src/assets/jointjs/fonts/Alegreya_Sans/AlegreyaSans-Regular.ttf +0 -0
- package/src/assets/jointjs/fonts/Alegreya_Sans/OFL.txt +92 -0
- package/src/assets/jointjs/fonts/Averia_Libre/AveriaLibre-Bold.ttf +0 -0
- package/src/assets/jointjs/fonts/Averia_Libre/AveriaLibre-Light.ttf +0 -0
- package/src/assets/jointjs/fonts/Averia_Libre/AveriaLibre-Regular.ttf +0 -0
- package/src/assets/jointjs/fonts/Averia_Libre/OFL.txt +93 -0
- package/src/assets/jointjs/fonts/Roboto_Condensed/LICENSE.txt +202 -0
- package/src/assets/jointjs/fonts/Roboto_Condensed/RobotoCondensed-Bold.ttf +0 -0
- package/src/assets/jointjs/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf +0 -0
- package/src/assets/jointjs/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf +0 -0
- package/src/assets/jointjs/images/delete-icon-modern.png +0 -0
- package/src/assets/jointjs/images/image-icon1.svg +1 -0
- package/src/assets/jointjs/images/image-icon2.svg +6 -0
- package/src/assets/jointjs/images/image-icon3.svg +11 -0
- package/src/assets/jointjs/images/image-icon4.svg +8 -0
- package/src/assets/jointjs/images/member-female.png +0 -0
- package/src/assets/jointjs/images/member-male.png +0 -0
- package/src/assets/jointjs/images/no-color-icon.svg +72 -0
- package/src/assets/jointjs/images/reset-icon-modern.png +0 -0
- package/src/assets/jointjs/images/save-icon-modern.png +0 -0
- package/src/assets/jointjs/images/to-front-icon-modern.png +0 -0
- package/src/assets/jointjs/images/toback-icon-modern.png +0 -0
- package/src/assets/jointjs/images/toolbar-icons-dark.woff +0 -0
- package/src/assets/jointjs/images/toolbar-icons-material.png +0 -0
- package/src/assets/jointjs/images/toolbar-icons-modern.png +0 -0
- package/src/assets/jointjs/images/transparent-icon.svg +50 -0
- package/src/assets/jointjs/scss/bpmn.scss +36 -35
- package/src/assets/jointjs/scss/style.dark.scss +233 -0
- package/src/assets/jointjs/scss/style.material.scss +234 -0
- package/src/assets/jointjs/scss/style.modern.scss +225 -0
- package/src/assets/jointjs/scss/style.scss +216 -0
- package/src/assets/jointjs/scss/theme-picker.scss +21 -0
- package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -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 +12198 -9
- package/src/assets/qms-ckeditor-plugin/package.json +1 -0
- package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +22 -5
- package/src/assets/qms-ckeditor-plugin/src/dist/ckeditor.dev.js +173 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/aboutckeditor/aboutckeditor.js +28 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/bpmn/qmsCKEditorBpmnPlugin.js +24 -5
- package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorConstant.js +7 -1
- package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorService.js +20 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/flowchart/qmsCKEditorFlowchartPlugin.js +63 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/fullscreen/dist/qmsCKEditorFullscreenPlugin.dev.js +87 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapediting.js +47 -43
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapui.js +1 -1
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/insertimagemapcommand.js +72 -108
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/openimagemapcommand.js +58 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/resizeimagemapcommand.js +4 -3
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/utils.js +13 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/timestamp/timestamp.js +8 -8
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipui.js +23 -24
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/flowchart.svg +507 -0
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/information.svg +1 -50
- 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/lib/components/badges/_qms-badges-base.scss +122 -0
- package/src/lib/components/badges/qms-badges.component.scss +89 -0
- package/src/lib/components/list/_list-base.scss +1 -0
- package/src/lib/components/list/list.scss +2 -2
- package/src/lib/components/related/popup/related-popup.component.scss +1 -1
- package/src/lib/components/related/tree/tree.component.scss +1 -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 +15 -1
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.scss +5 -0
- package/src/lib/qms-ckeditor-components/styles/_layout.scss +24 -0
- package/src/lib/qms-ckeditor-components/styles/_modules.scss +8 -0
- package/src/themes/_color.scss +1 -1
- package/src/themes/_scrollbar.scss +5 -5
- package/qms-angular.metadata.json +0 -1
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
2
2
|
import InsertImageMapCommand from './insertimagemapcommand';
|
3
3
|
import ResizeImageMapCommand from './resizeimagemapcommand';
|
4
|
+
import OpenImageMapCommand from './openimagemapcommand';
|
4
5
|
import { ImageMapAttributes, ImageMapElements, debounced, trimStart, drawMap, ImageMapCommands, HtmlAttributes, HtmlElements, findMapNodes } from './utils';
|
5
6
|
import ImageLoadObserver from '@ckeditor/ckeditor5-image/src/image/imageloadobserver';
|
6
7
|
import { downcastImageWidthAttribute, downcastImageHeightAttribute, downcastImageSavedSrcAttribute, downcastImageMapAttribute,
|
@@ -71,28 +72,32 @@ import { isWidget } from '@ckeditor/ckeditor5-widget/src/utils';
|
|
71
72
|
editor.execute(ImageMapCommands.RESIZE);
|
72
73
|
}, 100));
|
73
74
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
// this.listenTo(model.document, 'change:data', (event) => {
|
79
|
-
// if(this.allowDeleteMap == true){
|
80
|
-
// this.allowDeleteMap == false;
|
81
|
-
// OnImageDeleted(model, event);
|
82
|
-
// }
|
83
|
-
// });
|
84
|
-
|
75
|
+
this.listenTo(editingView.document, 'delete', ( evt, data ) => {
|
76
|
+
this.allowDeleteMap = true;
|
77
|
+
}, { context: [isWidget] });
|
78
|
+
|
85
79
|
this.listenTo(editingView.document, 'imageLoaded', (evt, domEvent) => {
|
86
80
|
onImageLoaded(domEvent);
|
87
81
|
});
|
88
82
|
|
83
|
+
model.document.on('change:data', (evt, batch) => {
|
84
|
+
if(this.allowDeleteMap == true){
|
85
|
+
this.allowDeleteMap = false;
|
86
|
+
OnImageDeleted(model, batch);
|
87
|
+
}
|
88
|
+
} );
|
89
|
+
|
90
|
+
editor.commands.add(ImageMapCommands.OPEN, new OpenImageMapCommand(editor));
|
89
91
|
editor.commands.add(ImageMapCommands.INSERT, new InsertImageMapCommand(editor));
|
90
92
|
editor.commands.add(ImageMapCommands.RESIZE, new ResizeImageMapCommand(editor));
|
91
93
|
}
|
92
94
|
}
|
93
95
|
|
94
|
-
function OnImageDeleted(model,
|
95
|
-
|
96
|
+
function OnImageDeleted(model, batch){
|
97
|
+
if( batch.type == 'transparent'){
|
98
|
+
return;
|
99
|
+
}
|
100
|
+
const differ = model.document.differ;
|
96
101
|
// if no difference
|
97
102
|
if (differ.isEmpty) { return; }
|
98
103
|
const changes = differ.getChanges({ includeChangesInGraveyard: true });
|
@@ -103,7 +108,7 @@ function OnImageDeleted(model, event){
|
|
103
108
|
for (let i = 0; i < changes.length; i++){
|
104
109
|
const change = changes[i]
|
105
110
|
// if image remove exists
|
106
|
-
if (change && change.type === 'remove' && change.name ===
|
111
|
+
if (change && change.type === 'remove' && change.name === ImageMapElements.IMAGE) {
|
107
112
|
hasNoImageRemoved = false
|
108
113
|
break
|
109
114
|
}
|
@@ -112,7 +117,7 @@ function OnImageDeleted(model, event){
|
|
112
117
|
// if not image remove stop execution
|
113
118
|
if (hasNoImageRemoved) { return; }
|
114
119
|
// get removed nodes
|
115
|
-
const removedNodes = changes.filter(change => (change.type === 'insert' && change.name ===
|
120
|
+
const removedNodes = changes.filter(change => (change.type === 'insert' && change.name === ImageMapElements.IMAGE))
|
116
121
|
|
117
122
|
// removed image nodes
|
118
123
|
const removedMapNames = []
|
@@ -129,8 +134,7 @@ function OnImageDeleted(model, event){
|
|
129
134
|
const existingMapElements = findMapNodes(removedMapNames, range);
|
130
135
|
|
131
136
|
if(existingMapElements && existingMapElements.length > 0){
|
132
|
-
|
133
|
-
model.enqueueChange(redoingBatch, writer => {
|
137
|
+
model.enqueueChange(batch, writer => {
|
134
138
|
existingMapElements.forEach(element => {
|
135
139
|
writer.remove(element);
|
136
140
|
});
|
@@ -150,34 +154,34 @@ function onImageLoaded(domEvent){
|
|
150
154
|
|
151
155
|
const originalSrc = domEvent.target.getAttribute(HtmlAttributes.SRC);
|
152
156
|
const mapName = trimStart(domEvent.target.getAttribute(HtmlAttributes.USE_MAP), '#');
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
157
|
+
const selector = `${HtmlElements.MAP}[${HtmlAttributes.NAME}='${mapName}']`;
|
158
|
+
const map = document.querySelector(selector);
|
159
|
+
if(map && map.childNodes){
|
160
|
+
const areas = [];
|
161
|
+
map.childNodes.forEach((child) =>{
|
162
|
+
if(child.nodeName && child.nodeName.toLowerCase() === HtmlElements.AREA){
|
163
|
+
let area = {};
|
164
|
+
area[HtmlAttributes.COORDS] = child.getAttribute(HtmlAttributes.COORDS);
|
165
|
+
area[HtmlAttributes.SHAPE] = child.getAttribute(HtmlAttributes.SHAPE) || '';
|
166
|
+
areas.push(area);
|
167
|
+
}
|
168
|
+
});
|
169
|
+
if(areas.length > 0){
|
170
|
+
const width = map.getAttribute(HtmlAttributes.WIDTH) || domEvent.target.width;
|
171
|
+
const height = map.getAttribute(HtmlAttributes.HEIGHT) || domEvent.target.height;
|
172
|
+
const target = domEvent.target;
|
173
|
+
drawMap(originalSrc, width, height, areas, (oldsrc, newsrc) => {
|
174
|
+
if(target){
|
175
|
+
target.setAttribute(HtmlAttributes.SRC, newsrc);
|
176
|
+
target.setAttribute(HtmlAttributes.SAVED_SRC, oldsrc);
|
163
177
|
}
|
164
|
-
});
|
165
|
-
if(areas.length > 0){
|
166
|
-
const width = map.getAttribute(HtmlAttributes.WIDTH) || domEvent.target.width;
|
167
|
-
const height = map.getAttribute(HtmlAttributes.HEIGHT) || domEvent.target.height;
|
168
|
-
const target = domEvent.target;
|
169
|
-
drawMap(originalSrc, width, height, areas, (oldsrc, newsrc) => {
|
170
|
-
if(target){
|
171
|
-
target.setAttribute(HtmlAttributes.SRC, newsrc);
|
172
|
-
target.setAttribute(HtmlAttributes.SAVED_SRC, oldsrc);
|
173
|
-
}
|
174
178
|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
}
|
179
|
+
if(map){
|
180
|
+
map.setAttribute(HtmlAttributes.WIDTH, width);
|
181
|
+
map.setAttribute(HtmlAttributes.HEIGHT, height);
|
182
|
+
}
|
183
|
+
})
|
181
184
|
}
|
185
|
+
}
|
182
186
|
}
|
183
187
|
}
|
@@ -39,7 +39,7 @@ import { ImageMapCommands } from './utils';
|
|
39
39
|
view.bind('isEnabled').to(command, 'isEnabled');
|
40
40
|
|
41
41
|
this.listenTo(view, 'execute', () => {
|
42
|
-
editor.execute(ImageMapCommands.
|
42
|
+
editor.execute(ImageMapCommands.OPEN, {});
|
43
43
|
});
|
44
44
|
|
45
45
|
return view;
|
@@ -1,128 +1,92 @@
|
|
1
1
|
|
2
2
|
import { Command } from '@ckeditor/ckeditor5-core';
|
3
3
|
import { isImage } from '@ckeditor/ckeditor5-image/src/image/utils';
|
4
|
-
import
|
5
|
-
|
6
|
-
import { ImageMapAttributes, ImageMapElements, trimStart, parsePixelToFloat, findFirstMapNode, findMapNodes, drawMap } from './utils';
|
7
|
-
import { getSelectedImageWidget } from '@ckeditor/ckeditor5-image/src/image/utils';
|
8
|
-
|
4
|
+
import { ImageMapAttributes, ImageMapElements, trimStart, findMapNodes, drawMap, createInsertedEvent, createRemovedEvent } from './utils';
|
5
|
+
|
9
6
|
export default class InsertImageMapCommand extends Command {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
execute() {
|
7
|
+
// refresh() {
|
8
|
+
// const element = this.editor.model.document.selection.getSelectedElement();
|
9
|
+
// this.isEnabled = isImage(element);
|
10
|
+
// }
|
11
|
+
|
12
|
+
execute( options = {} ) {
|
17
13
|
const editor = this.editor;
|
18
14
|
const model = editor.model;
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
const imageWidget = getSelectedImageWidget( view.document.selection);
|
30
|
-
const widgetResizePlugin = editor.plugins.get('WidgetResize');
|
31
|
-
const resizer = widgetResizePlugin.getResizerByViewElement( imageWidget );
|
15
|
+
model.change(writer => {
|
16
|
+
var newName = trimStart(options.name, '#');
|
17
|
+
const areas = options.areas;
|
18
|
+
const width = options.imageWidth;
|
19
|
+
const height = options.imageHeight;
|
20
|
+
const imageElement = model.document.selection.getSelectedElement();
|
21
|
+
if(!imageElement | !isImage(imageElement)){
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
const oldName = imageElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP) || options.oldName;
|
32
25
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
const existingMapElement = findFirstMapNode(trimStart(mapName, '#'), range);
|
42
|
-
if(existingMapElement){
|
43
|
-
data.areas = JSON.parse(existingMapElement.getAttribute(ImageMapAttributes.MAP_AREAS) || []);
|
26
|
+
if(!!oldName){
|
27
|
+
const range = model.createRangeIn(model.document.getRoot());
|
28
|
+
const existingMapElements = findMapNodes([trimStart(oldName, '#')], range);
|
29
|
+
if(existingMapElements && existingMapElements.length > 0){
|
30
|
+
existingMapElements.forEach(element => {
|
31
|
+
writer.remove(element);
|
32
|
+
});
|
33
|
+
}
|
44
34
|
}
|
45
|
-
}
|
46
|
-
|
47
|
-
QMSCKEditorService.imageMapNotify(data);
|
48
|
-
window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = false;
|
49
|
-
window.addEventListener(QMSCKEditorConstant.QMSCK_IMAGEMAP_PLUGIN_RESP, (evt) => {
|
50
|
-
if (window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING]) {
|
51
|
-
return;
|
52
|
-
}
|
53
|
-
window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = true;
|
54
|
-
model.change(writer => {
|
55
|
-
var newMapName = trimStart(evt.detail.name, '#');
|
56
|
-
const areas = evt.detail.areas;
|
57
|
-
const width = evt.detail.imageWidth;
|
58
|
-
const height = evt.detail.imageHeight;
|
59
|
-
const imageElement = model.document.selection.getSelectedElement();
|
60
|
-
const oldMapName = imageElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP);
|
61
35
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
36
|
+
if(!!areas && areas.length > 0)
|
37
|
+
{
|
38
|
+
writer.setAttribute(ImageMapAttributes.IMAGE_USE_MAP, '#' + newName, imageElement);
|
39
|
+
writer.setAttribute(ImageMapAttributes.IMAGE_WIDTH, width, imageElement);
|
40
|
+
writer.setAttribute(ImageMapAttributes.IMAGE_HEIGHT, height, imageElement);
|
41
|
+
|
42
|
+
let originalImageSrc = imageElement.getAttribute(ImageMapAttributes.IMAGE_SRC);
|
43
|
+
if(!imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC) || !imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
|
44
|
+
writer.setAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, originalImageSrc, imageElement);
|
45
|
+
}
|
46
|
+
else{
|
47
|
+
originalImageSrc = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
|
70
48
|
}
|
71
49
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
50
|
+
let attrs = {};
|
51
|
+
attrs[ImageMapAttributes.MAP_NAME] = newName;
|
52
|
+
attrs[ImageMapAttributes.MAP_AREAS] = JSON.stringify(areas);
|
53
|
+
attrs[ImageMapAttributes.MAP_WIDTH] = width;
|
54
|
+
attrs[ImageMapAttributes.MAP_HEIGHT] = height;
|
55
|
+
const mapElement = writer.createElement(ImageMapElements.MAP, attrs);
|
77
56
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
}
|
85
|
-
|
86
|
-
drawMap(originalImageSrc, width, height, areas, (oldsrc, newsrc) =>{
|
87
|
-
model.enqueueChange(writer => {
|
88
|
-
writer.setAttribute(ImageMapAttributes.IMAGE_SRC, newsrc, imageElement);
|
89
|
-
} );
|
57
|
+
writer.insert(mapElement, writer.createPositionAt(imageElement, "after"));
|
58
|
+
|
59
|
+
drawMap(originalImageSrc, width, height, areas, (oldsrc, newsrc) =>{
|
60
|
+
model.enqueueChange(writer.batch, writer => {
|
61
|
+
writer.setAttribute(ImageMapAttributes.IMAGE_SRC, newsrc, imageElement);
|
62
|
+
this.fire(createInsertedEvent(newName));
|
90
63
|
});
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
const mapElement = writer.createElement(ImageMapElements.MAP, attrs);
|
64
|
+
});
|
65
|
+
}
|
66
|
+
else {
|
67
|
+
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_USE_MAP)){
|
68
|
+
writer.removeAttribute(ImageMapAttributes.IMAGE_USE_MAP, imageElement);
|
69
|
+
}
|
98
70
|
|
99
|
-
|
100
|
-
}
|
101
|
-
else {
|
102
|
-
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_USE_MAP)){
|
103
|
-
writer.removeAttribute(ImageMapAttributes.IMAGE_USE_MAP, imageElement);
|
104
|
-
}
|
105
|
-
|
106
|
-
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
|
107
|
-
|
108
|
-
let src = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
|
109
|
-
if(!!src){
|
110
|
-
writer.setAttribute(ImageMapAttributes.IMAGE_SRC, src, imageElement);
|
111
|
-
}
|
112
|
-
writer.removeAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, imageElement);
|
113
|
-
}
|
114
|
-
|
115
|
-
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_HEIGHT)){
|
116
|
-
writer.removeAttribute(ImageMapAttributes.IMAGE_HEIGHT, imageElement);
|
117
|
-
}
|
71
|
+
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
|
118
72
|
|
119
|
-
|
120
|
-
|
73
|
+
let src = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
|
74
|
+
if(!!src){
|
75
|
+
writer.setAttribute(ImageMapAttributes.IMAGE_SRC, src, imageElement);
|
121
76
|
}
|
77
|
+
writer.removeAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, imageElement);
|
122
78
|
}
|
123
|
-
|
124
|
-
|
125
|
-
|
79
|
+
|
80
|
+
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_HEIGHT)){
|
81
|
+
writer.removeAttribute(ImageMapAttributes.IMAGE_HEIGHT, imageElement);
|
82
|
+
}
|
83
|
+
|
84
|
+
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_WIDTH)){
|
85
|
+
writer.removeAttribute(ImageMapAttributes.IMAGE_WIDTH, imageElement);
|
86
|
+
}
|
87
|
+
this.fire(createRemovedEvent(newName));
|
88
|
+
}
|
89
|
+
},{ once: true });
|
126
90
|
}
|
127
91
|
}
|
128
92
|
|
@@ -0,0 +1,58 @@
|
|
1
|
+
|
2
|
+
import { Command } from '@ckeditor/ckeditor5-core';
|
3
|
+
import { isImage } from '@ckeditor/ckeditor5-image/src/image/utils';
|
4
|
+
import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
|
5
|
+
import * as QMSCKEditorService from '../common/qmsCKEditorService';
|
6
|
+
import { ImageMapAttributes, ImageMapCommands, trimStart, parsePixelToFloat, findFirstMapNode } from './utils';
|
7
|
+
import { getSelectedImageWidget } from '@ckeditor/ckeditor5-image/src/image/utils';
|
8
|
+
|
9
|
+
export default class OpenImageMapCommand extends Command {
|
10
|
+
|
11
|
+
refresh() {
|
12
|
+
const element = this.editor.model.document.selection.getSelectedElement();
|
13
|
+
this.isEnabled = isImage(element);
|
14
|
+
}
|
15
|
+
|
16
|
+
execute() {
|
17
|
+
const editor = this.editor;
|
18
|
+
const model = editor.model;
|
19
|
+
const view = editor.editing.view;
|
20
|
+
const selectedElement = model.document.selection.getSelectedElement();
|
21
|
+
|
22
|
+
const mapName = selectedElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP);
|
23
|
+
let originalImageSrc = selectedElement.getAttribute(ImageMapAttributes.IMAGE_SRC);
|
24
|
+
if(selectedElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC) && selectedElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
|
25
|
+
originalImageSrc = selectedElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
|
26
|
+
}
|
27
|
+
|
28
|
+
const data = {'imageUrl': originalImageSrc, 'areas': [], imageWidth: null, imageHeight: null};
|
29
|
+
const imageWidget = getSelectedImageWidget( view.document.selection);
|
30
|
+
const widgetResizePlugin = editor.plugins.get('WidgetResize');
|
31
|
+
const resizer = widgetResizePlugin.getResizerByViewElement( imageWidget );
|
32
|
+
|
33
|
+
if(resizer){
|
34
|
+
const resizerWrapper = resizer._viewResizerWrapper;
|
35
|
+
data.imageWidth = parsePixelToFloat(resizerWrapper.getStyle('width', 0));
|
36
|
+
data.imageHeight = parsePixelToFloat(resizerWrapper.getStyle('height', 0));
|
37
|
+
}
|
38
|
+
|
39
|
+
if(!!mapName){
|
40
|
+
const range = model.createRangeIn(model.document.getRoot());
|
41
|
+
const existingMapElement = findFirstMapNode(trimStart(mapName, '#'), range);
|
42
|
+
if(existingMapElement){
|
43
|
+
data.areas = JSON.parse(existingMapElement.getAttribute(ImageMapAttributes.MAP_AREAS) || []);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
QMSCKEditorService.imageMapNotify(data);
|
48
|
+
window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = false;
|
49
|
+
window.addEventListener(QMSCKEditorConstant.QMSCK_IMAGEMAP_PLUGIN_RESP, (evt) => {
|
50
|
+
if (window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING]) {
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = true;
|
54
|
+
editor.commands.get(ImageMapCommands.INSERT).execute(evt.detail);
|
55
|
+
});
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
import { Command } from '@ckeditor/ckeditor5-core';
|
3
3
|
import { isImage } from '@ckeditor/ckeditor5-image/src/image/utils';
|
4
|
-
import { ImageMapAttributes, trimStart, parsePixelToFloat, findFirstMapNode, drawMap, resizeAreaWidth, resizeAreaHeight } from './utils';
|
4
|
+
import { ImageMapAttributes, trimStart, parsePixelToFloat, findFirstMapNode, drawMap, resizeAreaWidth, resizeAreaHeight, createResizedEvent } from './utils';
|
5
5
|
import { getSelectedImageWidget} from '@ckeditor/ckeditor5-image/src/image/utils';
|
6
6
|
|
7
7
|
export default class ResizeImageMapCommand extends Command {
|
@@ -11,7 +11,7 @@ export default class ResizeImageMapCommand extends Command {
|
|
11
11
|
this.isEnabled = isImage(element) && element.hasAttribute(ImageMapAttributes.IMAGE_USE_MAP);
|
12
12
|
}
|
13
13
|
|
14
|
-
execute() {
|
14
|
+
execute( options = {}) {
|
15
15
|
const editor = this.editor;
|
16
16
|
const model = editor.model;
|
17
17
|
const view = this.editor.editing.view;
|
@@ -68,8 +68,9 @@ export default class ResizeImageMapCommand extends Command {
|
|
68
68
|
writer.setAttribute(ImageMapAttributes.IMAGE_HEIGHT, newHeight, imageElement);
|
69
69
|
|
70
70
|
drawMap(originalImageSrc, newWidth, newHeight, areas, (oldsrc, newsrc) =>{
|
71
|
-
model.enqueueChange(writer => {
|
71
|
+
model.enqueueChange(writer.batch, writer => {
|
72
72
|
writer.setAttribute(ImageMapAttributes.IMAGE_SRC, newsrc, imageElement);
|
73
|
+
this.fire(createResizedEvent(mapName));
|
73
74
|
});
|
74
75
|
});
|
75
76
|
});
|
@@ -34,6 +34,7 @@ export const ImageMapAttributes = {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
export const ImageMapCommands = {
|
37
|
+
OPEN: 'openImageMap',
|
37
38
|
INSERT: 'insertImageMap',
|
38
39
|
RESIZE: 'resizeImageMap'
|
39
40
|
}
|
@@ -43,6 +44,18 @@ export const ImageMapElements = {
|
|
43
44
|
IMAGE: 'image'//It is already defined by the image plugin
|
44
45
|
}
|
45
46
|
|
47
|
+
export function createInsertedEvent(mapname){
|
48
|
+
return trimStart(mapname, '#') + '_inserted';
|
49
|
+
}
|
50
|
+
|
51
|
+
export function createRemovedEvent(mapname){
|
52
|
+
return trimStart(mapname, '#') + '_removed';
|
53
|
+
}
|
54
|
+
|
55
|
+
export function createResizedEvent(mapname){
|
56
|
+
return trimStart(mapname, '#') + '_resized';
|
57
|
+
}
|
58
|
+
|
46
59
|
export function trimStart(text, charToRemove){
|
47
60
|
if(text && text.length > 0){
|
48
61
|
if(text.charAt(0) == charToRemove){
|
@@ -10,19 +10,19 @@ import { toMap } from '@ckeditor/ckeditor5-utils';
|
|
10
10
|
* The default DateTime pattern is dd/MM/yyyy hh:mm:ss aaa
|
11
11
|
*
|
12
12
|
* DateTime Patterns:
|
13
|
-
*
|
13
|
+
*
|
14
14
|
* yy = 2-digit year; yyyy = full year
|
15
|
-
*
|
15
|
+
*
|
16
16
|
* M = digit month; MM = 2-digit month
|
17
|
-
*
|
17
|
+
*
|
18
18
|
* d = digit day; dd = 2-digit day
|
19
|
-
*
|
19
|
+
*
|
20
20
|
* h = hours am/pm; hh = 2-digit hours am/pm; H = hours; HH = 2-digit hours
|
21
|
-
*
|
21
|
+
*
|
22
22
|
* m = minutes; mm = 2-digit minutes; aaa = AM/PM
|
23
|
-
*
|
23
|
+
*
|
24
24
|
* s = seconds; ss = 2-digit seconds
|
25
|
-
*
|
25
|
+
*
|
26
26
|
* S = miliseconds
|
27
27
|
*/
|
28
28
|
export default class Timestamp extends Plugin {
|
@@ -37,7 +37,7 @@ export default class Timestamp extends Plugin {
|
|
37
37
|
buttonView.set( {
|
38
38
|
label: t('Timestamp'),
|
39
39
|
icon: timestampIcon,
|
40
|
-
withText:
|
40
|
+
withText: false,
|
41
41
|
tooltip: true
|
42
42
|
} );
|
43
43
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
3
|
-
import
|
3
|
+
import tooltipIcon from '../../themes/icons/tooltip.svg';
|
4
4
|
import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
|
5
5
|
import * as QMSCKEditorService from '../common/qmsCKEditorService';
|
6
6
|
import ActionsView from './ui/actionsview';
|
@@ -12,7 +12,7 @@ export default class TooltipUI extends Plugin {
|
|
12
12
|
static get requires() {
|
13
13
|
return [ContextualBalloon];
|
14
14
|
}
|
15
|
-
|
15
|
+
|
16
16
|
static get pluginName() {
|
17
17
|
return 'TooltipUI';
|
18
18
|
}
|
@@ -24,25 +24,25 @@ export default class TooltipUI extends Plugin {
|
|
24
24
|
get _isInBalloon() {
|
25
25
|
return this._balloon.hasView(this._actionView);
|
26
26
|
}
|
27
|
-
|
27
|
+
|
28
28
|
init() {
|
29
29
|
const editor = this.editor;
|
30
30
|
const t = editor.t;
|
31
31
|
const view = editor.editing.view;
|
32
|
-
|
32
|
+
|
33
33
|
view.addObserver(ClickObserver);
|
34
34
|
this._createActionsView();
|
35
|
-
|
35
|
+
|
36
36
|
editor.ui.componentFactory.add('tooltip', locale => {
|
37
37
|
const buttonView = new ButtonView(locale);
|
38
38
|
|
39
39
|
buttonView.set({
|
40
40
|
label: t('Tooltip'),
|
41
|
-
icon:
|
42
|
-
withText:
|
41
|
+
icon: tooltipIcon,
|
42
|
+
withText: false,
|
43
43
|
tooltip: true
|
44
44
|
});
|
45
|
-
|
45
|
+
|
46
46
|
// Bind button to the command.
|
47
47
|
const insertTooltipCommand = editor.commands.get(INSERT_TOOLTIP_COMMAND);
|
48
48
|
buttonView.bind('isEnabled').to(insertTooltipCommand, 'isEnabled' );
|
@@ -55,26 +55,26 @@ export default class TooltipUI extends Plugin {
|
|
55
55
|
return buttonView;
|
56
56
|
});
|
57
57
|
}
|
58
|
-
|
58
|
+
|
59
59
|
destroy() {
|
60
60
|
super.destroy();
|
61
61
|
this._actionView.destroy();
|
62
62
|
}
|
63
|
-
|
63
|
+
|
64
64
|
_createActionsView() {
|
65
65
|
const editor = this.editor;
|
66
66
|
const view = editor.editing.view;
|
67
67
|
const viewDocument = view.document;
|
68
68
|
this._balloon = this.editor.plugins.get('ContextualBalloon');
|
69
|
-
this._actionView = new ActionsView(editor.locale);
|
69
|
+
this._actionView = new ActionsView(editor.locale);
|
70
70
|
|
71
71
|
const insertTooltipCommand = editor.commands.get(INSERT_TOOLTIP_COMMAND);
|
72
72
|
const removeTooltipCommand = editor.commands.get(REMOVE_TOOLTIP_COMMAND);
|
73
|
-
|
73
|
+
|
74
74
|
this._actionView.bind(TOOLTIP_ATTRIBUTE).to( insertTooltipCommand, 'value');
|
75
75
|
this._actionView.editButtonView.bind('isEnabled').to(insertTooltipCommand);
|
76
76
|
this._actionView.removeButtonView.bind('isEnabled').to(removeTooltipCommand);
|
77
|
-
|
77
|
+
|
78
78
|
this.listenTo(this._actionView, 'edit', () => {
|
79
79
|
const tooltip = { text: '', content: '' };
|
80
80
|
const selectedElement = this._getSelectedTooltipElement();
|
@@ -93,7 +93,7 @@ export default class TooltipUI extends Plugin {
|
|
93
93
|
editor.execute(REMOVE_TOOLTIP_COMMAND);
|
94
94
|
this._hideActionsView(true);
|
95
95
|
});
|
96
|
-
|
96
|
+
|
97
97
|
this._actionView.keystrokes.set('Esc', (data, cancel) => {
|
98
98
|
this._hideActionsView(true);
|
99
99
|
cancel();
|
@@ -106,7 +106,7 @@ export default class TooltipUI extends Plugin {
|
|
106
106
|
this._showActionsView();
|
107
107
|
}
|
108
108
|
});
|
109
|
-
|
109
|
+
|
110
110
|
// Close on click outside of balloon panel element.
|
111
111
|
clickOutsideHandler({
|
112
112
|
emitter: this._actionView,
|
@@ -124,18 +124,18 @@ export default class TooltipUI extends Plugin {
|
|
124
124
|
const viewDocument = editor.editing.view.document;
|
125
125
|
//const command = editor.commands.get('imageTextAlternative');
|
126
126
|
//const labeledInput = this._actionView.labeledInput;
|
127
|
-
|
127
|
+
|
128
128
|
if (!this._isInBalloon) {
|
129
129
|
this._balloon.add({
|
130
130
|
view: this._actionView,
|
131
131
|
position: this._getBalloonPositionData()
|
132
132
|
});
|
133
133
|
}
|
134
|
-
|
134
|
+
|
135
135
|
// Reposition the balloon or hide the form if an tooltip is no longer selected.
|
136
136
|
const prevSelectedElement = this._getSelectedTooltipElement();
|
137
137
|
const prevSelectionParent = getSelectionParent(viewDocument);
|
138
|
-
|
138
|
+
|
139
139
|
this.listenTo(editor.ui, 'update', () => {
|
140
140
|
const selectedElement = this._getSelectedTooltipElement();
|
141
141
|
const selectionParent = getSelectionParent(viewDocument);
|
@@ -143,9 +143,9 @@ export default class TooltipUI extends Plugin {
|
|
143
143
|
if ((prevSelectedElement && !selectedElement) || (!prevSelectedElement && selectionParent !== prevSelectionParent)) {
|
144
144
|
this._hideActionsView(true);
|
145
145
|
}
|
146
|
-
else if (this._isVisible)
|
146
|
+
else if (this._isVisible)
|
147
147
|
{
|
148
|
-
this._balloon.updatePosition(this._getBalloonPositionData());
|
148
|
+
this._balloon.updatePosition(this._getBalloonPositionData());
|
149
149
|
}
|
150
150
|
});
|
151
151
|
}
|
@@ -162,7 +162,7 @@ export default class TooltipUI extends Plugin {
|
|
162
162
|
if (!this._isInBalloon) {
|
163
163
|
return;
|
164
164
|
}
|
165
|
-
|
165
|
+
|
166
166
|
if (this._actionView.focusTracker.isFocused) {
|
167
167
|
this._actionView.removeButtonView.focus();
|
168
168
|
}
|
@@ -179,7 +179,7 @@ export default class TooltipUI extends Plugin {
|
|
179
179
|
const selection = view.document.selection;
|
180
180
|
if (selection.isCollapsed) {
|
181
181
|
return findTooltipElementAncestor(selection.getFirstPosition());
|
182
|
-
}
|
182
|
+
}
|
183
183
|
else {
|
184
184
|
// The range for fully selected link is usually anchored in adjacent text nodes.
|
185
185
|
// Trim it to get closer to the actual link element.
|
@@ -193,11 +193,10 @@ export default class TooltipUI extends Plugin {
|
|
193
193
|
// Check if the link element is fully selected.
|
194
194
|
if (view.createRangeIn(startTooltip).getTrimmed().isEqual(range)) {
|
195
195
|
return startTooltip;
|
196
|
-
}
|
196
|
+
}
|
197
197
|
else {
|
198
198
|
return null;
|
199
199
|
}
|
200
200
|
}
|
201
201
|
}
|
202
202
|
}
|
203
|
-
|