qms-angular 1.0.86 → 1.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/bundles/qms-angular.umd.js +6943 -219
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/components/badges/qms-badges.component.js +1 -1
- package/esm2015/lib/components/banner/qms-banner/qms-banner.component.js +1 -1
- package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.js +1 -1
- package/esm2015/lib/components/banner/qms-banner-loading/qms-banner-loading.component.js +1 -1
- package/esm2015/lib/components/button/button-toggle.js +1 -1
- package/esm2015/lib/components/button/button.js +3 -3
- package/esm2015/lib/components/comment/comment.js +6 -3
- package/esm2015/lib/components/dialog/dialog.js +2 -2
- package/esm2015/lib/components/list/list.js +2 -2
- package/esm2015/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.js +3 -3
- package/esm2015/lib/components/qms-paginator/qms-paginator.component.js +16 -7
- package/esm2015/lib/components/related/content/related-content.component.js +2 -2
- package/esm2015/lib/components/related/list-other-related/list-related.component.js +1 -1
- package/esm2015/lib/components/related/risk/list/list.component.js +1 -1
- package/esm2015/lib/components/related/risk/result/result.component.js +1 -1
- package/esm2015/lib/components/rich-text/rich-text.js +1 -1
- package/esm2015/lib/components/table/table-action.js +2 -2
- package/esm2015/lib/components/table/table.module.js +4 -4
- package/esm2015/lib/components/tooltip/tooltip.js +1 -1
- package/esm2015/lib/components/tree/tree.component.js +1 -1
- package/esm2015/lib/components/treeNew/tree.component.js +18 -2
- package/esm2015/lib/directives/file-upload/file-upload-multiple-selector.directive.js +3 -1
- package/esm2015/lib/directives/file-upload/file-upload-selector.directive.js +3 -1
- package/esm2015/lib/directives/file-upload/file-upload.directive.js +1 -1
- package/esm2015/lib/directives/text-truncate/text-truncate.directive.js +58 -0
- package/esm2015/lib/model/en.js +63 -2
- package/esm2015/lib/model/no.js +63 -2
- package/esm2015/lib/qms-angular.module.js +4 -1
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/halo.function.js +87 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/inspector.function.js +3767 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/selection.function.js +56 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/stencil.function.js +1003 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/toolbar.function.js +302 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/models/app-shapes.js +320 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/keyboard-service.js +69 -0
- package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.js +412 -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 +34 -1
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +2 -2
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.js +2 -2
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.js +317 -0
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +35 -3
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.module.js +4 -2
- package/esm2015/public-api.js +8 -1
- package/esm2015/qms-angular.js +2 -1
- package/fesm2015/qms-angular.js +6882 -213
- package/fesm2015/qms-angular.js.map +1 -1
- package/lib/components/comment/comment.d.ts +1 -0
- package/lib/components/qms-paginator/qms-paginator.component.d.ts +1 -0
- package/lib/components/treeNew/tree.component.d.ts +1 -0
- package/lib/directives/text-truncate/text-truncate.directive.d.ts +15 -0
- package/lib/model/en.d.ts +61 -0
- package/lib/model/no.d.ts +61 -0
- package/lib/qms-ckeditor-components/common/flowchart/config/halo.function.d.ts +37 -0
- package/lib/qms-ckeditor-components/common/flowchart/config/inspector.function.d.ts +7 -0
- package/lib/qms-ckeditor-components/common/flowchart/config/selection.function.d.ts +39 -0
- package/lib/qms-ckeditor-components/common/flowchart/config/stencil.function.d.ts +11 -0
- package/lib/qms-ckeditor-components/common/flowchart/config/toolbar.function.d.ts +224 -0
- package/lib/qms-ckeditor-components/common/flowchart/models/app-shapes.d.ts +58 -0
- package/lib/qms-ckeditor-components/common/flowchart/service/keyboard-service.d.ts +16 -0
- package/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.d.ts +56 -0
- package/lib/qms-ckeditor-components/common/flowchart/themes/theme-picker.d.ts +35 -0
- package/lib/qms-ckeditor-components/common/functions/common.function.d.ts +12 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.d.ts +2 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.d.ts +41 -0
- package/lib/qms-ckeditor-components/qms-ckeditor.component.d.ts +4 -0
- package/lib.theme.scss +179 -0
- package/package.json +1 -1
- package/public-api.d.ts +7 -0
- package/qms-angular.d.ts +1 -0
- package/qms-angular.metadata.json +1 -1
- package/src/assets/fonts/Material/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 +0 -0
- package/src/assets/fonts/Material/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUce.woff2 +0 -0
- package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFUZ0bbck.woff2 +0 -0
- package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFVZ0b.woff2 +0 -0
- package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFVp0bbck.woff2 +0 -0
- package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFW50bbck.woff2 +0 -0
- package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWJ0bbck.woff2 +0 -0
- package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWZ0bbck.woff2 +0 -0
- package/src/assets/fonts/OpenSans/mem8YaGs126MiZpBA-UFWp0bbck.woff2 +0 -0
- package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCFPrEHJA.woff2 +0 -0
- package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2 +0 -0
- package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCHPrEHJA.woff2 +0 -0
- package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2 +0 -0
- package/src/assets/fonts/Raleway/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCMPrEHJA.woff2 +0 -0
- package/src/assets/jointjs/images/delete-icon-modern.png +0 -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-material.png +0 -0
- package/src/assets/jointjs/images/toolbar-icons-modern.png +0 -0
- package/src/assets/jointjs/scss/rappid.scss +326 -0
- package/src/assets/jointjs/scss/theme-picker.scss +22 -0
- package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -1
- 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/ca.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/el.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/eo.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/eu.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/km.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/translations/kn.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/pt.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 +12632 -345
- package/src/assets/qms-ckeditor-plugin/package.json +0 -2
- package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +8 -8
- package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorService.js +9 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/flowchart/flowchartdialogcommand.js +47 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/flowchart/qmsCKEditorFlowchartPlugin.js +30 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/heading.js +119 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingbuttonsui.js +103 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingcommand.js +96 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingediting.js +163 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingui.js +115 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/index.js +22 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/heading.css +35 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading1.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading2.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading3.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading4.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading5.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading6.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/title.js +598 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/utils.js +42 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/insertcolumncommand.js +83 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/insertrowcommand.js +82 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/inserttablecommand.js +76 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/mergecellcommand.js +272 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/mergecellscommand.js +122 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/removecolumncommand.js +122 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/removerowcommand.js +97 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/selectcolumncommand.js +63 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/selectrowcommand.js +56 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/setheadercolumncommand.js +95 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/setheaderrowcommand.js +105 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/splitcellcommand.js +68 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/downcast.js +529 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-cell-paragraph-post-fixer.js +136 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-cell-refresh-post-fixer.js +75 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-heading-rows-refresh-post-fixer.js +55 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/table-layout-post-fixer.js +399 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/tableproperties.js +126 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/upcasttable.js +211 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/index.js +42 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/table.js +103 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +35 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellbordercolorcommand.js +47 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellborderstylecommand.js +47 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellborderwidthcommand.js +62 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellheightcommand.js +51 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +35 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellpaddingcommand.js +62 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellpropertycommand.js +110 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellverticalalignmentcommand.js +43 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/commands/tablecellwidthcommand.js +51 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/tablecellpropertiesediting.js +204 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/tablecellpropertiesui.js +401 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties/ui/tablecellpropertiesview.js +829 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablecellproperties.js +80 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableclipboard.js +586 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableediting.js +160 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablekeyboard.js +343 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablemouse/mouseeventsobserver.js +72 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablemouse.js +218 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablealignmentcommand.js +35 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablebackgroundcolorcommand.js +35 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablebordercolorcommand.js +47 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableborderstylecommand.js +47 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableborderwidthcommand.js +62 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tableheightcommand.js +51 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablepropertycommand.js +98 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/commands/tablewidthcommand.js +51 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/tablepropertiesediting.js +182 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/tablepropertiesui.js +397 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties/ui/tablepropertiesview.js +714 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableproperties.js +81 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableselection.js +357 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tabletoolbar.js +111 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableui.js +359 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tableutils.js +909 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/tablewalker.js +538 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/colorinput.css +39 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/form.css +11 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/formrow.css +23 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-cell-properties.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-column.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-merge-cell.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-properties.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table-row.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/icons/table.svg +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/inserttable.css +10 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/snippet.css +3876 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/table.css +67 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tablecaption.css +53 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tablecellproperties.css +28 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableediting.css +10 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableform.css +59 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableproperties.css +18 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/tableselection.css +10 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/colorinputview.js +343 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/formrowview.js +103 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/ui/inserttableview.js +222 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/common.js +57 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/selection.js +276 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/structure.js +543 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/table-properties.js +66 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/contextualballoon.js +130 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/table-properties.js +397 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/utils/ui/widget.js +62 -0
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/flowchart.svg +507 -0
- package/src/lib/components/comment/comment.scss +1 -0
- package/src/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.scss +1 -0
- package/src/lib/components/qms-paginator/qms-paginator.component.scss +4 -1
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/image-icon1.svg +1 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/image-icon2.svg +6 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/image-icon3.svg +11 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/image-icon4.svg +8 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/member-female.png +0 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/member-male.png +0 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/no-color-icon.svg +72 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/toolbar-icons-material.png +0 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/toolbar-icons-modern.png +0 -0
- package/src/lib/qms-ckeditor-components/common/flowchart/assets/transparent-icon.svg +50 -0
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.scss +68 -0
- package/src/lib/qms-ckeditor-components/styles/_modules.scss +9 -0
- package/src/themes/core/_mat-icon.scss +60 -60
- package/src/themes/core/_table.scss +72 -4
- package/src/themes/core/_typography.scss +108 -108
@@ -0,0 +1,62 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @module table/tablecellproperties/commands/tablecellpaddingcommand
|
8
|
+
*/
|
9
|
+
|
10
|
+
import TableCellPropertyCommand from './tablecellpropertycommand';
|
11
|
+
import { addDefaultUnitToNumericValue, getSingleValue } from '../../utils/table-properties';
|
12
|
+
|
13
|
+
/**
|
14
|
+
* The table cell padding command.
|
15
|
+
*
|
16
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
17
|
+
* the `'tableCellPadding'` editor command.
|
18
|
+
*
|
19
|
+
* To change the padding of selected cells, execute the command:
|
20
|
+
*
|
21
|
+
* editor.execute( 'tableCellPadding', {
|
22
|
+
* value: '5px'
|
23
|
+
* } );
|
24
|
+
*
|
25
|
+
* **Note**: This command adds the default `'px'` unit to numeric values. Executing:
|
26
|
+
*
|
27
|
+
* editor.execute( 'tableCellPadding', {
|
28
|
+
* value: '5'
|
29
|
+
* } );
|
30
|
+
*
|
31
|
+
* will set the `padding` attribute to `'5px'` in the model.
|
32
|
+
*
|
33
|
+
* @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
|
34
|
+
*/
|
35
|
+
export default class TableCellPaddingCommand extends TableCellPropertyCommand {
|
36
|
+
/**
|
37
|
+
* Creates a new `TableCellPaddingCommand` instance.
|
38
|
+
*
|
39
|
+
* @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
|
40
|
+
*/
|
41
|
+
constructor( editor ) {
|
42
|
+
super( editor, 'padding' );
|
43
|
+
}
|
44
|
+
|
45
|
+
/**
|
46
|
+
* @inheritDoc
|
47
|
+
*/
|
48
|
+
_getAttribute( tableCell ) {
|
49
|
+
if ( !tableCell ) {
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
|
53
|
+
return getSingleValue( tableCell.getAttribute( this.attributeName ) );
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @inheritDoc
|
58
|
+
*/
|
59
|
+
_getValueToSet( value ) {
|
60
|
+
return addDefaultUnitToNumericValue( value, 'px' );
|
61
|
+
}
|
62
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @module table/tablecellproperties/commands/tablecellpropertycommand
|
8
|
+
*/
|
9
|
+
|
10
|
+
import { Command } from 'ckeditor5/src/core';
|
11
|
+
import { getSelectionAffectedTableCells } from '../../utils/selection';
|
12
|
+
|
13
|
+
/**
|
14
|
+
* The table cell attribute command.
|
15
|
+
*
|
16
|
+
* The command is a base command for other table cell property commands.
|
17
|
+
*
|
18
|
+
* @extends module:core/command~Command
|
19
|
+
*/
|
20
|
+
export default class TableCellPropertyCommand extends Command {
|
21
|
+
/**
|
22
|
+
* Creates a new `TableCellPropertyCommand` instance.
|
23
|
+
*
|
24
|
+
* @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
|
25
|
+
* @param {String} attributeName Table cell attribute name.
|
26
|
+
*/
|
27
|
+
constructor( editor, attributeName ) {
|
28
|
+
super( editor );
|
29
|
+
|
30
|
+
this.attributeName = attributeName;
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* @inheritDoc
|
35
|
+
*/
|
36
|
+
refresh() {
|
37
|
+
const editor = this.editor;
|
38
|
+
const selectedTableCells = getSelectionAffectedTableCells( editor.model.document.selection );
|
39
|
+
|
40
|
+
this.isEnabled = !!selectedTableCells.length;
|
41
|
+
this.value = this._getSingleValue( selectedTableCells );
|
42
|
+
}
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Executes the command.
|
46
|
+
*
|
47
|
+
* @fires execute
|
48
|
+
* @param {Object} [options]
|
49
|
+
* @param {*} [options.value] If set, the command will set the attribute on selected table cells.
|
50
|
+
* If it is not set, the command will remove the attribute from the selected table cells.
|
51
|
+
* @param {module:engine/model/batch~Batch} [options.batch] Pass the model batch instance to the command to aggregate changes,
|
52
|
+
* for example to allow a single undo step for multiple executions.
|
53
|
+
*/
|
54
|
+
execute( options = {} ) {
|
55
|
+
const { value, batch } = options;
|
56
|
+
const model = this.editor.model;
|
57
|
+
const tableCells = getSelectionAffectedTableCells( model.document.selection );
|
58
|
+
const valueToSet = this._getValueToSet( value );
|
59
|
+
|
60
|
+
model.enqueueChange( batch || 'default', writer => {
|
61
|
+
if ( valueToSet ) {
|
62
|
+
tableCells.forEach( tableCell => writer.setAttribute( this.attributeName, valueToSet, tableCell ) );
|
63
|
+
} else {
|
64
|
+
tableCells.forEach( tableCell => writer.removeAttribute( this.attributeName, tableCell ) );
|
65
|
+
}
|
66
|
+
} );
|
67
|
+
}
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Returns the attribute value for a table cell.
|
71
|
+
*
|
72
|
+
* @param {module:engine/model/element~Element} tableCell
|
73
|
+
* @returns {String|undefined}
|
74
|
+
* @private
|
75
|
+
*/
|
76
|
+
_getAttribute( tableCell ) {
|
77
|
+
if ( !tableCell ) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
|
81
|
+
return tableCell.getAttribute( this.attributeName );
|
82
|
+
}
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Returns the proper model value. It can be used to add a default unit to numeric values.
|
86
|
+
*
|
87
|
+
* @private
|
88
|
+
* @param {*} value
|
89
|
+
* @returns {*}
|
90
|
+
*/
|
91
|
+
_getValueToSet( value ) {
|
92
|
+
return value;
|
93
|
+
}
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Returns a single value for all selected table cells. If the value is the same for all cells,
|
97
|
+
* it will be returned (`undefined` otherwise).
|
98
|
+
*
|
99
|
+
* @param {Array.<module:engine/model/element~Element>} tableCell
|
100
|
+
* @returns {*}
|
101
|
+
* @private
|
102
|
+
*/
|
103
|
+
_getSingleValue( tableCell ) {
|
104
|
+
const firstCellValue = this._getAttribute( tableCell[ 0 ] );
|
105
|
+
|
106
|
+
const everyCellHasAttribute = tableCell.every( tableCell => this._getAttribute( tableCell ) === firstCellValue );
|
107
|
+
|
108
|
+
return everyCellHasAttribute ? firstCellValue : undefined;
|
109
|
+
}
|
110
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @module table/tablecellproperties/commands/tablecellverticalalignmentcommand
|
8
|
+
*/
|
9
|
+
|
10
|
+
import TableCellPropertyCommand from './tablecellpropertycommand';
|
11
|
+
|
12
|
+
/**
|
13
|
+
* The table cell vertical alignment command.
|
14
|
+
*
|
15
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
16
|
+
* the `'tableCellVerticalAlignment'` editor command.
|
17
|
+
*
|
18
|
+
* To change the vertical text alignment of selected cells, execute the command:
|
19
|
+
*
|
20
|
+
* editor.execute( 'tableCellVerticalAlignment', {
|
21
|
+
* value: 'top'
|
22
|
+
* } );
|
23
|
+
*
|
24
|
+
* The following values, corresponding to the
|
25
|
+
* [`vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align), are allowed:
|
26
|
+
*
|
27
|
+
* * `'top'`
|
28
|
+
* * `'bottom'`
|
29
|
+
*
|
30
|
+
* The `'middle'` value is the default one so there is no need to set it.
|
31
|
+
*
|
32
|
+
* @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
|
33
|
+
*/
|
34
|
+
export default class TableCellVerticalAlignmentCommand extends TableCellPropertyCommand {
|
35
|
+
/**
|
36
|
+
* Creates a new `TableCellVerticalAlignmentCommand` instance.
|
37
|
+
*
|
38
|
+
* @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
|
39
|
+
*/
|
40
|
+
constructor( editor ) {
|
41
|
+
super( editor, 'verticalAlignment' );
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @module table/tablecellproperties/commands/tablecellwidthcommand
|
8
|
+
*/
|
9
|
+
|
10
|
+
import TableCellPropertyCommand from './tablecellpropertycommand';
|
11
|
+
import { addDefaultUnitToNumericValue } from '../../utils/table-properties';
|
12
|
+
|
13
|
+
/**
|
14
|
+
* The table cell width command.
|
15
|
+
*
|
16
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
17
|
+
* the `'tableCellWidth'` editor command.
|
18
|
+
*
|
19
|
+
* To change the width of selected cells, execute the command:
|
20
|
+
*
|
21
|
+
* editor.execute( 'tableCellWidth', {
|
22
|
+
* value: '50px'
|
23
|
+
* } );
|
24
|
+
*
|
25
|
+
* **Note**: This command adds a default `'px'` unit to numeric values. Executing:
|
26
|
+
*
|
27
|
+
* editor.execute( 'tableCellWidth', {
|
28
|
+
* value: '50'
|
29
|
+
* } );
|
30
|
+
*
|
31
|
+
* will set the `width` attribute to `'50px'` in the model.
|
32
|
+
*
|
33
|
+
* @extends module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand
|
34
|
+
*/
|
35
|
+
export default class TableCellWidthCommand extends TableCellPropertyCommand {
|
36
|
+
/**
|
37
|
+
* Creates a new `TableCellWidthCommand` instance.
|
38
|
+
*
|
39
|
+
* @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
|
40
|
+
*/
|
41
|
+
constructor( editor ) {
|
42
|
+
super( editor, 'width' );
|
43
|
+
}
|
44
|
+
|
45
|
+
/**
|
46
|
+
* @inheritDoc
|
47
|
+
*/
|
48
|
+
_getValueToSet( value ) {
|
49
|
+
return addDefaultUnitToNumericValue( value, 'px' );
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,204 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @module table/tablecellproperties/tablecellpropertiesediting
|
8
|
+
*/
|
9
|
+
|
10
|
+
import { Plugin } from 'ckeditor5/src/core';
|
11
|
+
import { addBorderRules, addPaddingRules, addBackgroundRules } from 'ckeditor5/src/engine';
|
12
|
+
|
13
|
+
import { downcastAttributeToStyle, upcastStyleToAttribute, upcastBorderStyles } from './../converters/tableproperties';
|
14
|
+
import TableEditing from './../tableediting';
|
15
|
+
import TableCellPaddingCommand from './commands/tablecellpaddingcommand';
|
16
|
+
import TableCellWidthCommand from './commands/tablecellwidthcommand';
|
17
|
+
import TableCellHeightCommand from './commands/tablecellheightcommand';
|
18
|
+
import TableCellBackgroundColorCommand from './commands/tablecellbackgroundcolorcommand';
|
19
|
+
import TableCellVerticalAlignmentCommand from './commands/tablecellverticalalignmentcommand';
|
20
|
+
import TableCellHorizontalAlignmentCommand from './commands/tablecellhorizontalalignmentcommand';
|
21
|
+
import TableCellBorderStyleCommand from './commands/tablecellborderstylecommand';
|
22
|
+
import TableCellBorderColorCommand from './commands/tablecellbordercolorcommand';
|
23
|
+
import TableCellBorderWidthCommand from './commands/tablecellborderwidthcommand';
|
24
|
+
|
25
|
+
const VALIGN_VALUES_REG_EXP = /^(top|bottom)$/;
|
26
|
+
|
27
|
+
/**
|
28
|
+
* The table cell properties editing feature.
|
29
|
+
*
|
30
|
+
* Introduces table cell model attributes and their conversion:
|
31
|
+
*
|
32
|
+
* - border: `borderStyle`, `borderColor` and `borderWidth`
|
33
|
+
* - background color: `backgroundColor`
|
34
|
+
* - cell padding: `padding`
|
35
|
+
* - horizontal and vertical alignment: `horizontalAlignment`, `verticalAlignment`
|
36
|
+
* - cell width and height: `width`, `height`
|
37
|
+
*
|
38
|
+
* It also registers commands used to manipulate the above attributes:
|
39
|
+
*
|
40
|
+
* - border: the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` commands
|
41
|
+
* - background color: the `'tableCellBackgroundColor'` command
|
42
|
+
* - cell padding: the `'tableCellPadding'` command
|
43
|
+
* - horizontal and vertical alignment: the `'tableCellHorizontalAlignment'` and `'tableCellVerticalAlignment'` commands
|
44
|
+
* - width and height: the `'tableCellWidth'` and `'tableCellHeight'` commands
|
45
|
+
*
|
46
|
+
* @extends module:core/plugin~Plugin
|
47
|
+
*/
|
48
|
+
export default class TableCellPropertiesEditing extends Plugin {
|
49
|
+
/**
|
50
|
+
* @inheritDoc
|
51
|
+
*/
|
52
|
+
static get pluginName() {
|
53
|
+
return 'TableCellPropertiesEditing';
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @inheritDoc
|
58
|
+
*/
|
59
|
+
static get requires() {
|
60
|
+
return [ TableEditing ];
|
61
|
+
}
|
62
|
+
|
63
|
+
/**
|
64
|
+
* @inheritDoc
|
65
|
+
*/
|
66
|
+
init() {
|
67
|
+
const editor = this.editor;
|
68
|
+
const schema = editor.model.schema;
|
69
|
+
const conversion = editor.conversion;
|
70
|
+
const locale = editor.locale;
|
71
|
+
|
72
|
+
editor.data.addStyleProcessorRules( addBorderRules );
|
73
|
+
enableBorderProperties( schema, conversion );
|
74
|
+
editor.commands.add( 'tableCellBorderStyle', new TableCellBorderStyleCommand( editor ) );
|
75
|
+
editor.commands.add( 'tableCellBorderColor', new TableCellBorderColorCommand( editor ) );
|
76
|
+
editor.commands.add( 'tableCellBorderWidth', new TableCellBorderWidthCommand( editor ) );
|
77
|
+
|
78
|
+
enableHorizontalAlignmentProperty( schema, conversion, locale );
|
79
|
+
editor.commands.add( 'tableCellHorizontalAlignment', new TableCellHorizontalAlignmentCommand( editor ) );
|
80
|
+
|
81
|
+
enableProperty( schema, conversion, 'width', 'width' );
|
82
|
+
editor.commands.add( 'tableCellWidth', new TableCellWidthCommand( editor ) );
|
83
|
+
|
84
|
+
enableProperty( schema, conversion, 'height', 'height' );
|
85
|
+
editor.commands.add( 'tableCellHeight', new TableCellHeightCommand( editor ) );
|
86
|
+
|
87
|
+
editor.data.addStyleProcessorRules( addPaddingRules );
|
88
|
+
enableProperty( schema, conversion, 'padding', 'padding' );
|
89
|
+
editor.commands.add( 'tableCellPadding', new TableCellPaddingCommand( editor ) );
|
90
|
+
|
91
|
+
editor.data.addStyleProcessorRules( addBackgroundRules );
|
92
|
+
enableProperty( schema, conversion, 'backgroundColor', 'background-color' );
|
93
|
+
editor.commands.add( 'tableCellBackgroundColor', new TableCellBackgroundColorCommand( editor ) );
|
94
|
+
|
95
|
+
enableVerticalAlignmentProperty( schema, conversion );
|
96
|
+
editor.commands.add( 'tableCellVerticalAlignment', new TableCellVerticalAlignmentCommand( editor ) );
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
// Enables the `'borderStyle'`, `'borderColor'` and `'borderWidth'` attributes for table cells.
|
101
|
+
//
|
102
|
+
// @param {module:engine/model/schema~Schema} schema
|
103
|
+
// @param {module:engine/conversion/conversion~Conversion} conversion
|
104
|
+
function enableBorderProperties( schema, conversion ) {
|
105
|
+
schema.extend( 'tableCell', {
|
106
|
+
allowAttributes: [ 'borderWidth', 'borderColor', 'borderStyle' ]
|
107
|
+
} );
|
108
|
+
upcastBorderStyles( conversion, 'td' );
|
109
|
+
upcastBorderStyles( conversion, 'th' );
|
110
|
+
downcastAttributeToStyle( conversion, 'tableCell', 'borderStyle', 'border-style' );
|
111
|
+
downcastAttributeToStyle( conversion, 'tableCell', 'borderColor', 'border-color' );
|
112
|
+
downcastAttributeToStyle( conversion, 'tableCell', 'borderWidth', 'border-width' );
|
113
|
+
}
|
114
|
+
|
115
|
+
// Enables the `'horizontalAlignment'` attribute for table cells.
|
116
|
+
//
|
117
|
+
// @param {module:engine/model/schema~Schema} schema
|
118
|
+
// @param {module:engine/conversion/conversion~Conversion} conversion
|
119
|
+
// @param {module:utils/locale~Locale} locale The {@link module:core/editor/editor~Editor#locale} instance.
|
120
|
+
function enableHorizontalAlignmentProperty( schema, conversion, locale ) {
|
121
|
+
schema.extend( 'tableCell', {
|
122
|
+
allowAttributes: [ 'horizontalAlignment' ]
|
123
|
+
} );
|
124
|
+
|
125
|
+
const options = [ locale.contentLanguageDirection == 'rtl' ? 'left' : 'right', 'center', 'justify' ];
|
126
|
+
|
127
|
+
conversion.attributeToAttribute( {
|
128
|
+
model: {
|
129
|
+
name: 'tableCell',
|
130
|
+
key: 'horizontalAlignment',
|
131
|
+
values: options
|
132
|
+
},
|
133
|
+
view: options.reduce( ( result, option ) => ( {
|
134
|
+
...result,
|
135
|
+
[ option ]: {
|
136
|
+
key: 'style',
|
137
|
+
value: {
|
138
|
+
'text-align': option
|
139
|
+
}
|
140
|
+
}
|
141
|
+
} ), {} )
|
142
|
+
} );
|
143
|
+
}
|
144
|
+
|
145
|
+
// Enables the `'verticalAlignment'` attribute for table cells.
|
146
|
+
//
|
147
|
+
// @param {module:engine/model/schema~Schema} schema
|
148
|
+
// @param {module:engine/conversion/conversion~Conversion} conversion
|
149
|
+
function enableVerticalAlignmentProperty( schema, conversion ) {
|
150
|
+
schema.extend( 'tableCell', {
|
151
|
+
allowAttributes: [ 'verticalAlignment' ]
|
152
|
+
} );
|
153
|
+
|
154
|
+
conversion.attributeToAttribute( {
|
155
|
+
model: {
|
156
|
+
name: 'tableCell',
|
157
|
+
key: 'verticalAlignment',
|
158
|
+
values: [ 'top', 'bottom' ]
|
159
|
+
},
|
160
|
+
view: {
|
161
|
+
top: {
|
162
|
+
key: 'style',
|
163
|
+
value: {
|
164
|
+
'vertical-align': 'top'
|
165
|
+
}
|
166
|
+
},
|
167
|
+
bottom: {
|
168
|
+
key: 'style',
|
169
|
+
value: {
|
170
|
+
'vertical-align': 'bottom'
|
171
|
+
}
|
172
|
+
}
|
173
|
+
}
|
174
|
+
} );
|
175
|
+
|
176
|
+
conversion.for( 'upcast' )
|
177
|
+
// Support for backwards compatibility and pasting from other sources.
|
178
|
+
.attributeToAttribute( {
|
179
|
+
view: {
|
180
|
+
attributes: {
|
181
|
+
valign: VALIGN_VALUES_REG_EXP
|
182
|
+
}
|
183
|
+
},
|
184
|
+
model: {
|
185
|
+
name: 'tableCell',
|
186
|
+
key: 'verticalAlignment',
|
187
|
+
value: viewElement => viewElement.getAttribute( 'valign' )
|
188
|
+
}
|
189
|
+
} );
|
190
|
+
}
|
191
|
+
|
192
|
+
// Enables conversion for an attribute for simple view-model mappings.
|
193
|
+
//
|
194
|
+
// @param {String} modelAttribute
|
195
|
+
// @param {String} styleName
|
196
|
+
// @param {module:engine/model/schema~Schema} schema
|
197
|
+
// @param {module:engine/conversion/conversion~Conversion} conversion
|
198
|
+
function enableProperty( schema, conversion, modelAttribute, styleName ) {
|
199
|
+
schema.extend( 'tableCell', {
|
200
|
+
allowAttributes: [ modelAttribute ]
|
201
|
+
} );
|
202
|
+
upcastStyleToAttribute( conversion, 'tableCell', modelAttribute, styleName );
|
203
|
+
downcastAttributeToStyle( conversion, 'tableCell', modelAttribute, styleName );
|
204
|
+
}
|