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,67 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
@import "./snippet.css";
|
6
|
+
.ck-content .table {
|
7
|
+
/* Give the table widget some air and center it horizontally */
|
8
|
+
/* The first value should be equal to --ck-spacing-large variable if used in the editor context
|
9
|
+
to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */
|
10
|
+
margin: 0.9em auto;
|
11
|
+
display: table;
|
12
|
+
|
13
|
+
& table {
|
14
|
+
/* The table cells should have slight borders */
|
15
|
+
border-collapse: collapse;
|
16
|
+
border-spacing: 0;
|
17
|
+
|
18
|
+
/* Table width and height are set on the parent <figure>. Make sure the table inside stretches
|
19
|
+
to the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */
|
20
|
+
width: 100%;
|
21
|
+
height: 100%;
|
22
|
+
|
23
|
+
/* The outer border of the table should be slightly darker than the inner lines.
|
24
|
+
Also see https://github.com/ckeditor/ckeditor5-table/issues/50. */
|
25
|
+
border: 1px double hsl(0, 0%, 70%);
|
26
|
+
|
27
|
+
& td,
|
28
|
+
& th {
|
29
|
+
min-width: 2em;
|
30
|
+
padding: 0.4em;
|
31
|
+
|
32
|
+
/* The border is inherited from .ck-editor__nested-editable styles, so theoretically it's not necessary here.
|
33
|
+
However, the border is a content style, so it should use .ck-content (so it works outside the editor).
|
34
|
+
Hence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */
|
35
|
+
border: 1px solid hsl(0, 0%, 75%);
|
36
|
+
}
|
37
|
+
|
38
|
+
& th {
|
39
|
+
font-weight: bold;
|
40
|
+
background: hsla(0, 0%, 0%, 5%);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
/* Text alignment of the table header should match the editor settings and override the native browser styling,
|
46
|
+
when content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */
|
47
|
+
.ck-content[dir="rtl"] .table th {
|
48
|
+
text-align: right;
|
49
|
+
}
|
50
|
+
|
51
|
+
.ck-content[dir="ltr"] .table th {
|
52
|
+
text-align: left;
|
53
|
+
}
|
54
|
+
|
55
|
+
.ck-editor__editable .ck-table-bogus-paragraph {
|
56
|
+
/*
|
57
|
+
* Use display:inline-block to force Chrome/Safari to limit text mutations to this element.
|
58
|
+
* See https://github.com/ckeditor/ckeditor5/issues/6062.
|
59
|
+
*/
|
60
|
+
display: inline-block;
|
61
|
+
|
62
|
+
/*
|
63
|
+
* Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width.
|
64
|
+
* See https://github.com/ckeditor/ckeditor5/issues/9117.
|
65
|
+
*/
|
66
|
+
width: 100%;
|
67
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
:root {
|
7
|
+
--ck-color-table-caption-background: hsl(0, 0%, 97%);
|
8
|
+
--ck-color-table-caption-text: hsl(0, 0%, 20%);
|
9
|
+
--ck-color-table-caption-highlighted-background: hsl(52deg 100% 50%);
|
10
|
+
}
|
11
|
+
|
12
|
+
/* Content styles */
|
13
|
+
.ck-content .table > figcaption {
|
14
|
+
display: table-caption;
|
15
|
+
caption-side: top;
|
16
|
+
word-break: break-word;
|
17
|
+
text-align: center;
|
18
|
+
color: var(--ck-color-table-caption-text);
|
19
|
+
background-color: var(--ck-color-table-caption-background);
|
20
|
+
padding: .6em;
|
21
|
+
font-size: .75em;
|
22
|
+
outline-offset: -1px;
|
23
|
+
}
|
24
|
+
|
25
|
+
/* Editing styles */
|
26
|
+
.ck.ck-editor__editable .table > figcaption {
|
27
|
+
&.table__caption_highlighted {
|
28
|
+
animation: ck-table-caption-highlight .6s ease-out;
|
29
|
+
}
|
30
|
+
|
31
|
+
&.ck-placeholder::before {
|
32
|
+
padding-left: inherit;
|
33
|
+
padding-right: inherit;
|
34
|
+
|
35
|
+
/*
|
36
|
+
* Make sure the table caption placeholder doesn't overflow the placeholder area.
|
37
|
+
* See https://github.com/ckeditor/ckeditor5/issues/9162.
|
38
|
+
*/
|
39
|
+
white-space: nowrap;
|
40
|
+
overflow: hidden;
|
41
|
+
text-overflow: ellipsis;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
@keyframes ck-table-caption-highlight {
|
46
|
+
0% {
|
47
|
+
background-color: var(--ck-color-table-caption-highlighted-background);
|
48
|
+
}
|
49
|
+
|
50
|
+
100% {
|
51
|
+
background-color: var(--ck-color-table-caption-background);
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
.ck.ck-table-cell-properties-form {
|
7
|
+
& .ck-form__row {
|
8
|
+
&.ck-table-cell-properties-form__alignment-row {
|
9
|
+
flex-wrap: wrap;
|
10
|
+
|
11
|
+
& .ck.ck-toolbar {
|
12
|
+
&:first-of-type {
|
13
|
+
/* 4 buttons out of 7 (h-alignment + v-alignment) = 0.57 */
|
14
|
+
flex-grow: 0.57;
|
15
|
+
}
|
16
|
+
|
17
|
+
&:last-of-type {
|
18
|
+
/* 3 buttons out of 7 (h-alignment + v-alignment) = 0.43 */
|
19
|
+
flex-grow: 0.43;
|
20
|
+
}
|
21
|
+
|
22
|
+
& .ck-button {
|
23
|
+
flex-grow: 1;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
/*
|
7
|
+
* Note: This file should contain the wireframe styles only. But since there are no such styles,
|
8
|
+
* it acts as a message to the builder telling that it should look for the corresponding styles
|
9
|
+
* **in the theme** when compiling the editor.
|
10
|
+
*/
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
.ck.ck-table-form {
|
7
|
+
& .ck-form__row {
|
8
|
+
&.ck-table-form__border-row {
|
9
|
+
flex-wrap: wrap;
|
10
|
+
}
|
11
|
+
|
12
|
+
&.ck-table-form__background-row {
|
13
|
+
flex-wrap: wrap;
|
14
|
+
}
|
15
|
+
|
16
|
+
&.ck-table-form__dimensions-row {
|
17
|
+
flex-wrap: wrap;
|
18
|
+
align-items: center;
|
19
|
+
|
20
|
+
& .ck-labeled-field-view {
|
21
|
+
display: flex;
|
22
|
+
flex-direction: column-reverse;
|
23
|
+
align-items: center;
|
24
|
+
|
25
|
+
& .ck.ck-dropdown {
|
26
|
+
flex-grow: 0;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
& .ck-table-form__dimension-operator {
|
31
|
+
flex-grow: 0;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
& .ck.ck-labeled-field-view {
|
37
|
+
/* Allow absolute positioning of the status (error) balloons. */
|
38
|
+
position: relative;
|
39
|
+
|
40
|
+
& .ck.ck-labeled-field-view__status {
|
41
|
+
position: absolute;
|
42
|
+
left: 50%;
|
43
|
+
bottom: calc( -1 * var(--ck-table-properties-error-arrow-size) );
|
44
|
+
transform: translate(-50%,100%);
|
45
|
+
|
46
|
+
/* Make sure the balloon status stays on top of other form elements. */
|
47
|
+
z-index: 1;
|
48
|
+
|
49
|
+
/* The arrow pointing towards the field. */
|
50
|
+
&::after {
|
51
|
+
content: "";
|
52
|
+
position: absolute;
|
53
|
+
top: calc( -1 * var(--ck-table-properties-error-arrow-size) );
|
54
|
+
left: 50%;
|
55
|
+
transform: translateX( -50% );
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
.ck.ck-table-properties-form {
|
7
|
+
& .ck-form__row {
|
8
|
+
&.ck-table-properties-form__alignment-row {
|
9
|
+
flex-wrap: wrap;
|
10
|
+
flex-basis: 0;
|
11
|
+
align-content: baseline;
|
12
|
+
|
13
|
+
& .ck.ck-toolbar .ck-toolbar__items {
|
14
|
+
flex-wrap: nowrap;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
|
6
|
+
/*
|
7
|
+
* Note: This file should contain the wireframe styles only. But since there are no such styles,
|
8
|
+
* it acts as a message to the builder telling that it should look for the corresponding styles
|
9
|
+
* **in the theme** when compiling the editor.
|
10
|
+
*/
|
@@ -0,0 +1,343 @@
|
|
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/ui/colorinputview
|
8
|
+
*/
|
9
|
+
|
10
|
+
import { View, InputTextView, ButtonView, createDropdown, ColorGridView } from 'ckeditor5/src/ui';
|
11
|
+
import { icons } from 'ckeditor5/src/core';
|
12
|
+
|
13
|
+
import '../theme/colorinput.css';
|
14
|
+
|
15
|
+
/**
|
16
|
+
* The color input view class. It allows the user to type in a color (hex, rgb, etc.)
|
17
|
+
* or choose it from the configurable color palette with a preview.
|
18
|
+
*
|
19
|
+
* @private
|
20
|
+
* @extends module:ui/view~View
|
21
|
+
*/
|
22
|
+
export default class ColorInputView extends View {
|
23
|
+
/**
|
24
|
+
* Creates an instance of the color input view.
|
25
|
+
*
|
26
|
+
* @param {module:utils/locale~Locale} locale The locale instance.
|
27
|
+
* @param {Object} options The input options.
|
28
|
+
* @param {module:ui/colorgrid/colorgrid~ColorDefinition} options.colorDefinitions The colors to be displayed
|
29
|
+
* in the palette inside the input's dropdown.
|
30
|
+
* @param {Number} options.columns The number of columns in which the colors will be displayed.
|
31
|
+
*/
|
32
|
+
constructor( locale, options ) {
|
33
|
+
super( locale );
|
34
|
+
|
35
|
+
const bind = this.bindTemplate;
|
36
|
+
|
37
|
+
/**
|
38
|
+
* The value of the input.
|
39
|
+
*
|
40
|
+
* @observable
|
41
|
+
* @member {String} #value
|
42
|
+
* @default ''
|
43
|
+
*/
|
44
|
+
this.set( 'value', '' );
|
45
|
+
|
46
|
+
/**
|
47
|
+
* The `id` attribute of the input (i.e. to pair with the `<label>` element).
|
48
|
+
*
|
49
|
+
* @observable
|
50
|
+
* @member {String} #id
|
51
|
+
*/
|
52
|
+
this.set( 'id' );
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Controls whether the input view is in read-only mode.
|
56
|
+
*
|
57
|
+
* @observable
|
58
|
+
* @member {Boolean} #isReadOnly
|
59
|
+
* @default false
|
60
|
+
*/
|
61
|
+
this.set( 'isReadOnly', false );
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Set to `true` when the field has some error. Usually controlled via
|
65
|
+
* {@link module:ui/labeledinput/labeledinputview~LabeledInputView#errorText}.
|
66
|
+
*
|
67
|
+
* @observable
|
68
|
+
* @member {Boolean} #hasError
|
69
|
+
* @default false
|
70
|
+
*/
|
71
|
+
this.set( 'hasError', false );
|
72
|
+
|
73
|
+
/**
|
74
|
+
* An observable flag set to `true` when the input is focused by the user.
|
75
|
+
* `false` otherwise.
|
76
|
+
*
|
77
|
+
* @readonly
|
78
|
+
* @observable
|
79
|
+
* @member {Boolean} #isFocused
|
80
|
+
* @default false
|
81
|
+
*/
|
82
|
+
this.set( 'isFocused', false );
|
83
|
+
|
84
|
+
/**
|
85
|
+
* An observable flag set to `true` when the input contains no text.
|
86
|
+
*
|
87
|
+
* @readonly
|
88
|
+
* @observable
|
89
|
+
* @member {Boolean} #isEmpty
|
90
|
+
* @default true
|
91
|
+
*/
|
92
|
+
this.set( 'isEmpty', true );
|
93
|
+
|
94
|
+
/**
|
95
|
+
* The `id` of the element describing this field. When the field has
|
96
|
+
* some error, it helps screen readers read the error text.
|
97
|
+
*
|
98
|
+
* @observable
|
99
|
+
* @member {Boolean} #ariaDescribedById
|
100
|
+
*/
|
101
|
+
this.set( 'ariaDescribedById' );
|
102
|
+
|
103
|
+
/**
|
104
|
+
* A cached reference to the options passed to the constructor.
|
105
|
+
*
|
106
|
+
* @member {Object}
|
107
|
+
*/
|
108
|
+
this.options = options;
|
109
|
+
|
110
|
+
/**
|
111
|
+
* An instance of the dropdown allowing to select a color from a grid.
|
112
|
+
*
|
113
|
+
* @protected
|
114
|
+
* @member {module:ui/dropdown/dropdown~DropdownView}
|
115
|
+
*/
|
116
|
+
this._dropdownView = this._createDropdownView( locale );
|
117
|
+
|
118
|
+
/**
|
119
|
+
* An instance of the input allowing the user to type a color value.
|
120
|
+
*
|
121
|
+
* @protected
|
122
|
+
* @member {module:ui/inputtext/inputtextview~InputTextView}
|
123
|
+
*/
|
124
|
+
this._inputView = this._createInputTextView( locale );
|
125
|
+
|
126
|
+
/**
|
127
|
+
* The flag that indicates whether the user is still typing.
|
128
|
+
* If set to true, it means that the text input field ({@link #_inputView}) still has the focus.
|
129
|
+
* So, we should interrupt the user by replacing the input's value.
|
130
|
+
*
|
131
|
+
* @protected
|
132
|
+
* @member {Boolean}
|
133
|
+
*/
|
134
|
+
this._stillTyping = false;
|
135
|
+
|
136
|
+
this.setTemplate( {
|
137
|
+
tag: 'div',
|
138
|
+
attributes: {
|
139
|
+
class: [
|
140
|
+
'ck',
|
141
|
+
'ck-input-color',
|
142
|
+
bind.if( 'hasError', 'ck-error' )
|
143
|
+
],
|
144
|
+
id: bind.to( 'id' ),
|
145
|
+
'aria-invalid': bind.if( 'hasError', true ),
|
146
|
+
'aria-describedby': bind.to( 'ariaDescribedById' )
|
147
|
+
},
|
148
|
+
children: [
|
149
|
+
this._dropdownView,
|
150
|
+
this._inputView
|
151
|
+
]
|
152
|
+
} );
|
153
|
+
|
154
|
+
this.on( 'change:value', ( evt, name, inputValue ) => this._setInputValue( inputValue ) );
|
155
|
+
}
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Focuses the input.
|
159
|
+
*/
|
160
|
+
focus() {
|
161
|
+
this._inputView.focus();
|
162
|
+
}
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Creates and configures the {@link #_dropdownView}.
|
166
|
+
*
|
167
|
+
* @private
|
168
|
+
*/
|
169
|
+
_createDropdownView() {
|
170
|
+
const locale = this.locale;
|
171
|
+
const t = locale.t;
|
172
|
+
const bind = this.bindTemplate;
|
173
|
+
const colorGrid = this._createColorGrid( locale );
|
174
|
+
const dropdown = createDropdown( locale );
|
175
|
+
const colorPreview = new View();
|
176
|
+
const removeColorButton = this._createRemoveColorButton( locale );
|
177
|
+
|
178
|
+
colorPreview.setTemplate( {
|
179
|
+
tag: 'span',
|
180
|
+
attributes: {
|
181
|
+
class: [
|
182
|
+
'ck',
|
183
|
+
'ck-input-color__button__preview'
|
184
|
+
],
|
185
|
+
style: {
|
186
|
+
backgroundColor: bind.to( 'value' )
|
187
|
+
}
|
188
|
+
},
|
189
|
+
children: [ {
|
190
|
+
tag: 'span',
|
191
|
+
attributes: {
|
192
|
+
class: [
|
193
|
+
'ck',
|
194
|
+
'ck-input-color__button__preview__no-color-indicator',
|
195
|
+
bind.if( 'value', 'ck-hidden', value => value != '' )
|
196
|
+
]
|
197
|
+
}
|
198
|
+
} ]
|
199
|
+
} );
|
200
|
+
|
201
|
+
dropdown.buttonView.extendTemplate( {
|
202
|
+
attributes: {
|
203
|
+
class: 'ck-input-color__button'
|
204
|
+
}
|
205
|
+
} );
|
206
|
+
|
207
|
+
dropdown.buttonView.children.add( colorPreview );
|
208
|
+
dropdown.buttonView.tooltip = t( 'Color picker' );
|
209
|
+
|
210
|
+
dropdown.panelPosition = locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw';
|
211
|
+
dropdown.panelView.children.add( removeColorButton );
|
212
|
+
dropdown.panelView.children.add( colorGrid );
|
213
|
+
dropdown.bind( 'isEnabled' ).to( this, 'isReadOnly', value => !value );
|
214
|
+
|
215
|
+
return dropdown;
|
216
|
+
}
|
217
|
+
|
218
|
+
/**
|
219
|
+
* Creates and configures an instance of {@link module:ui/inputtext/inputtextview~InputTextView}.
|
220
|
+
*
|
221
|
+
* @private
|
222
|
+
* @returns {module:ui/inputtext/inputtextview~InputTextView} A configured instance to be set as {@link #_inputView}.
|
223
|
+
*/
|
224
|
+
_createInputTextView() {
|
225
|
+
const locale = this.locale;
|
226
|
+
const inputView = new InputTextView( locale );
|
227
|
+
|
228
|
+
inputView.extendTemplate( {
|
229
|
+
on: {
|
230
|
+
blur: inputView.bindTemplate.to( 'blur' )
|
231
|
+
}
|
232
|
+
} );
|
233
|
+
|
234
|
+
inputView.value = this.value;
|
235
|
+
inputView.bind( 'isReadOnly', 'hasError' ).to( this );
|
236
|
+
this.bind( 'isFocused', 'isEmpty' ).to( inputView );
|
237
|
+
|
238
|
+
inputView.on( 'input', () => {
|
239
|
+
const inputValue = inputView.element.value;
|
240
|
+
// Check if the value matches one of our defined colors' label.
|
241
|
+
const mappedColor = this.options.colorDefinitions.find( def => inputValue === def.label );
|
242
|
+
|
243
|
+
this._stillTyping = true;
|
244
|
+
this.value = mappedColor && mappedColor.color || inputValue;
|
245
|
+
} );
|
246
|
+
|
247
|
+
inputView.on( 'blur', () => {
|
248
|
+
this._stillTyping = false;
|
249
|
+
this._setInputValue( inputView.element.value );
|
250
|
+
} );
|
251
|
+
|
252
|
+
inputView.delegate( 'input' ).to( this );
|
253
|
+
|
254
|
+
return inputView;
|
255
|
+
}
|
256
|
+
|
257
|
+
/**
|
258
|
+
* Creates and configures the button that clears the color.
|
259
|
+
*
|
260
|
+
* @private
|
261
|
+
*/
|
262
|
+
_createRemoveColorButton() {
|
263
|
+
const locale = this.locale;
|
264
|
+
const t = locale.t;
|
265
|
+
const removeColorButton = new ButtonView( locale );
|
266
|
+
|
267
|
+
removeColorButton.class = 'ck-input-color__remove-color';
|
268
|
+
removeColorButton.withText = true;
|
269
|
+
removeColorButton.icon = icons.eraser;
|
270
|
+
removeColorButton.label = t( 'Remove color' );
|
271
|
+
removeColorButton.on( 'execute', () => {
|
272
|
+
this.value = '';
|
273
|
+
this._dropdownView.isOpen = false;
|
274
|
+
this.fire( 'input' );
|
275
|
+
} );
|
276
|
+
|
277
|
+
return removeColorButton;
|
278
|
+
}
|
279
|
+
|
280
|
+
/**
|
281
|
+
* Creates and configures the color grid inside the {@link #_dropdownView}.
|
282
|
+
*
|
283
|
+
* @private
|
284
|
+
*/
|
285
|
+
_createColorGrid( locale ) {
|
286
|
+
const colorGrid = new ColorGridView( locale, {
|
287
|
+
colorDefinitions: this.options.colorDefinitions,
|
288
|
+
columns: this.options.columns
|
289
|
+
} );
|
290
|
+
|
291
|
+
colorGrid.on( 'execute', ( evtData, data ) => {
|
292
|
+
this.value = data.value;
|
293
|
+
this._dropdownView.isOpen = false;
|
294
|
+
this.fire( 'input' );
|
295
|
+
} );
|
296
|
+
colorGrid.bind( 'selectedColor' ).to( this, 'value' );
|
297
|
+
|
298
|
+
return colorGrid;
|
299
|
+
}
|
300
|
+
|
301
|
+
/**
|
302
|
+
* Sets {@link #_inputView}'s value property to the color value or color label,
|
303
|
+
* if there is one and the user is not typing.
|
304
|
+
*
|
305
|
+
* Handles cases like:
|
306
|
+
*
|
307
|
+
* * Someone picks the color in the grid.
|
308
|
+
* * The color is set from the plugin level.
|
309
|
+
*
|
310
|
+
* @private
|
311
|
+
* @param {String} inputValue Color value to be set.
|
312
|
+
*/
|
313
|
+
_setInputValue( inputValue ) {
|
314
|
+
if ( !this._stillTyping ) {
|
315
|
+
const normalizedInputValue = normalizeColor( inputValue );
|
316
|
+
// Check if the value matches one of our defined colors.
|
317
|
+
const mappedColor = this.options.colorDefinitions.find( def => normalizedInputValue === normalizeColor( def.color ) );
|
318
|
+
|
319
|
+
if ( mappedColor ) {
|
320
|
+
this._inputView.value = mappedColor.label;
|
321
|
+
} else {
|
322
|
+
this._inputView.value = inputValue || '';
|
323
|
+
}
|
324
|
+
}
|
325
|
+
}
|
326
|
+
}
|
327
|
+
|
328
|
+
// Normalizes color value, by stripping extensive whitespace.
|
329
|
+
// For example., transforms:
|
330
|
+
// * ` rgb( 25 50 0 )` to `rgb(25 50 0)`,
|
331
|
+
// * "\t rgb( 25 , 50,0 ) " to `rgb(25 50 0)`.
|
332
|
+
//
|
333
|
+
// @param {String} colorString The value to be normalized.
|
334
|
+
// @returns {String}
|
335
|
+
function normalizeColor( colorString ) {
|
336
|
+
return colorString
|
337
|
+
// Remove any whitespace right after `(` or `,`.
|
338
|
+
.replace( /([(,])\s+/g, '$1' )
|
339
|
+
// Remove any whitespace at the beginning or right before the end, `)`, `,`, or another whitespace.
|
340
|
+
.replace( /^\s+|\s+(?=[),\s]|$)/g, '' )
|
341
|
+
// Then, replace `,` or whitespace with a single space.
|
342
|
+
.replace( /,|\s/g, ' ' );
|
343
|
+
}
|
@@ -0,0 +1,103 @@
|
|
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/ui/formrowview
|
8
|
+
*/
|
9
|
+
|
10
|
+
import { View } from 'ckeditor5/src/ui';
|
11
|
+
|
12
|
+
import '../theme/formrow.css';
|
13
|
+
|
14
|
+
/**
|
15
|
+
* The class representing a single row in a complex form,
|
16
|
+
* used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.
|
17
|
+
*
|
18
|
+
* **Note**: For now this class is private. When more use cases arrive (beyond ckeditor5-table),
|
19
|
+
* it will become a component in ckeditor5-ui.
|
20
|
+
*
|
21
|
+
* @private
|
22
|
+
* @extends module:ui/view~View
|
23
|
+
*/
|
24
|
+
export default class FormRowView extends View {
|
25
|
+
/**
|
26
|
+
* Creates an instance of the form row class.
|
27
|
+
*
|
28
|
+
* @param {module:utils/locale~Locale} locale The locale instance.
|
29
|
+
* @param {Object} options
|
30
|
+
* @param {Array.<module:ui/view~View>} options.children
|
31
|
+
* @param {String} [options.class]
|
32
|
+
* @param {module:ui/view~View} [options.labelView] When passed, the row gets the `group` and `aria-labelledby`
|
33
|
+
* DOM attributes and gets described by the label.
|
34
|
+
*/
|
35
|
+
constructor( locale, options = {} ) {
|
36
|
+
super( locale );
|
37
|
+
|
38
|
+
const bind = this.bindTemplate;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* An additional CSS class added to the {@link #element}.
|
42
|
+
*
|
43
|
+
* @observable
|
44
|
+
* @member {String} #class
|
45
|
+
*/
|
46
|
+
this.set( 'class', options.class || null );
|
47
|
+
|
48
|
+
/**
|
49
|
+
* A collection of row items (buttons, dropdowns, etc.).
|
50
|
+
*
|
51
|
+
* @readonly
|
52
|
+
* @member {module:ui/viewcollection~ViewCollection}
|
53
|
+
*/
|
54
|
+
this.children = this.createCollection();
|
55
|
+
|
56
|
+
if ( options.children ) {
|
57
|
+
options.children.forEach( child => this.children.add( child ) );
|
58
|
+
}
|
59
|
+
|
60
|
+
/**
|
61
|
+
* The role property reflected by the `role` DOM attribute of the {@link #element}.
|
62
|
+
*
|
63
|
+
* **Note**: Used only when a `labelView` is passed to constructor `options`.
|
64
|
+
*
|
65
|
+
* @private
|
66
|
+
* @observable
|
67
|
+
* @member {String} #role
|
68
|
+
*/
|
69
|
+
this.set( '_role', null );
|
70
|
+
|
71
|
+
/**
|
72
|
+
* The ARIA property reflected by the `aria-labelledby` DOM attribute of the {@link #element}.
|
73
|
+
*
|
74
|
+
* **Note**: Used only when a `labelView` is passed to constructor `options`.
|
75
|
+
*
|
76
|
+
* @private
|
77
|
+
* @observable
|
78
|
+
* @member {String} #ariaLabelledBy
|
79
|
+
*/
|
80
|
+
this.set( '_ariaLabelledBy', null );
|
81
|
+
|
82
|
+
if ( options.labelView ) {
|
83
|
+
this.set( {
|
84
|
+
_role: 'group',
|
85
|
+
_ariaLabelledBy: options.labelView.id
|
86
|
+
} );
|
87
|
+
}
|
88
|
+
|
89
|
+
this.setTemplate( {
|
90
|
+
tag: 'div',
|
91
|
+
attributes: {
|
92
|
+
class: [
|
93
|
+
'ck',
|
94
|
+
'ck-form__row',
|
95
|
+
bind.to( 'class' )
|
96
|
+
],
|
97
|
+
role: bind.to( '_role' ),
|
98
|
+
'aria-labelledby': bind.to( '_ariaLabelledBy' )
|
99
|
+
},
|
100
|
+
children: this.children
|
101
|
+
} );
|
102
|
+
}
|
103
|
+
}
|