qms-angular 1.0.88 → 1.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/bundles/qms-angular.umd.js +199 -100
  2. package/bundles/qms-angular.umd.js.map +1 -1
  3. package/esm2015/lib/common/themes.const.js +3 -0
  4. package/esm2015/lib/components/banner/models/qms-banner.model.js +9 -1
  5. package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.js +4 -3
  6. package/esm2015/lib/components/banner/qms-banner-confirm/qms-banner-confirm.module.js +7 -4
  7. package/esm2015/lib/components/button/button-toggle.js +1 -1
  8. package/esm2015/lib/components/button/button.js +3 -3
  9. package/esm2015/lib/components/comment/comment.js +1 -1
  10. package/esm2015/lib/components/list/list.js +5 -3
  11. package/esm2015/lib/components/related/content/related-content.component.js +1 -1
  12. package/esm2015/lib/components/related/list-other-related/list-related.component.js +1 -1
  13. package/esm2015/lib/components/related/popup/related-popup.component.js +1 -1
  14. package/esm2015/lib/components/related/risk/analysis/analysis.component.js +1 -1
  15. package/esm2015/lib/components/related/risk/list/list.component.js +1 -1
  16. package/esm2015/lib/components/related/risk/result/result.component.js +1 -1
  17. package/esm2015/lib/components/rich-text/rich-text.js +1 -1
  18. package/esm2015/lib/components/select-dialog/select-dialog.js +1 -1
  19. package/esm2015/lib/components/select-include-children/select-include-children.component.js +1 -1
  20. package/esm2015/lib/components/select-one/select-one.component.js +1 -1
  21. package/esm2015/lib/components/select-process-document/select-process-document.component.js +1 -1
  22. package/esm2015/lib/components/table/table-action.js +2 -2
  23. package/esm2015/lib/components/tree/tree.component.js +1 -1
  24. package/esm2015/lib/components/treeNew/tree.component.js +1 -1
  25. package/esm2015/lib/directives/text-truncate/text-truncate.directive.js +7 -3
  26. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.js +1 -1
  27. package/esm2015/lib/qms-ckeditor-components/common/functions/common.function.js +32 -1
  28. package/esm2015/lib/qms-ckeditor-components/common/helper/fileHelper.js +15 -0
  29. package/esm2015/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.js +1 -1
  30. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-about/qms-ckeditor-about.component.js +1 -1
  31. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +5 -18
  32. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.js +9 -3
  33. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +1 -1
  34. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +1 -1
  35. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +1 -1
  36. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +1 -1
  37. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +1 -1
  38. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +1 -1
  39. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +1 -1
  40. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +6 -4
  41. package/esm2015/lib/services/theming.service.js +36 -0
  42. package/esm2015/lib/shared.module.js +1 -1
  43. package/esm2015/public-api.js +3 -1
  44. package/fesm2015/qms-angular.js +157 -67
  45. package/fesm2015/qms-angular.js.map +1 -1
  46. package/lib/common/themes.const.d.ts +2 -0
  47. package/lib/components/banner/models/qms-banner.model.d.ts +7 -0
  48. package/lib/components/banner/qms-banner-confirm/qms-banner-confirm.component.d.ts +2 -1
  49. package/lib/components/list/list.d.ts +1 -1
  50. package/lib/directives/text-truncate/text-truncate.directive.d.ts +2 -1
  51. package/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.d.ts +1 -1
  52. package/lib/qms-ckeditor-components/common/functions/common.function.d.ts +12 -0
  53. package/lib/qms-ckeditor-components/common/helper/fileHelper.d.ts +1 -0
  54. package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.d.ts +0 -1
  55. package/lib/qms-ckeditor-components/components/qms-ckeditor-flowchart/qms-ckeditor-flowchart.component.d.ts +3 -1
  56. package/lib/services/theming.service.d.ts +7 -0
  57. package/lib.theme.scss +11 -9
  58. package/package.json +1 -1
  59. package/public-api.d.ts +2 -0
  60. package/qms-angular.metadata.json +1 -1
  61. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -1
  62. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
  63. package/src/assets/qms-ckeditor-plugin/build/translations/ar.js +1 -1
  64. package/src/assets/qms-ckeditor-plugin/build/translations/az.js +1 -1
  65. package/src/assets/qms-ckeditor-plugin/build/translations/bg.js +1 -1
  66. package/src/assets/qms-ckeditor-plugin/build/translations/ca.js +1 -1
  67. package/src/assets/qms-ckeditor-plugin/build/translations/cs.js +1 -1
  68. package/src/assets/qms-ckeditor-plugin/build/translations/da.js +1 -1
  69. package/src/assets/qms-ckeditor-plugin/build/translations/de.js +1 -1
  70. package/src/assets/qms-ckeditor-plugin/build/translations/el.js +1 -1
  71. package/src/assets/qms-ckeditor-plugin/build/translations/en-au.js +1 -1
  72. package/src/assets/qms-ckeditor-plugin/build/translations/en-gb.js +1 -1
  73. package/src/assets/qms-ckeditor-plugin/build/translations/eo.js +1 -1
  74. package/src/assets/qms-ckeditor-plugin/build/translations/es.js +1 -1
  75. package/src/assets/qms-ckeditor-plugin/build/translations/et.js +1 -1
  76. package/src/assets/qms-ckeditor-plugin/build/translations/eu.js +1 -1
  77. package/src/assets/qms-ckeditor-plugin/build/translations/fa.js +1 -1
  78. package/src/assets/qms-ckeditor-plugin/build/translations/fi.js +1 -1
  79. package/src/assets/qms-ckeditor-plugin/build/translations/fr.js +1 -1
  80. package/src/assets/qms-ckeditor-plugin/build/translations/gl.js +1 -1
  81. package/src/assets/qms-ckeditor-plugin/build/translations/he.js +1 -1
  82. package/src/assets/qms-ckeditor-plugin/build/translations/hi.js +1 -1
  83. package/src/assets/qms-ckeditor-plugin/build/translations/hr.js +1 -1
  84. package/src/assets/qms-ckeditor-plugin/build/translations/hu.js +1 -1
  85. package/src/assets/qms-ckeditor-plugin/build/translations/id.js +1 -1
  86. package/src/assets/qms-ckeditor-plugin/build/translations/it.js +1 -1
  87. package/src/assets/qms-ckeditor-plugin/build/translations/ja.js +1 -1
  88. package/src/assets/qms-ckeditor-plugin/build/translations/km.js +1 -1
  89. package/src/assets/qms-ckeditor-plugin/build/translations/kn.js +1 -1
  90. package/src/assets/qms-ckeditor-plugin/build/translations/ko.js +1 -1
  91. package/src/assets/qms-ckeditor-plugin/build/translations/ku.js +1 -1
  92. package/src/assets/qms-ckeditor-plugin/build/translations/lt.js +1 -1
  93. package/src/assets/qms-ckeditor-plugin/build/translations/lv.js +1 -1
  94. package/src/assets/qms-ckeditor-plugin/build/translations/nb.js +1 -1
  95. package/src/assets/qms-ckeditor-plugin/build/translations/ne.js +1 -1
  96. package/src/assets/qms-ckeditor-plugin/build/translations/nl.js +1 -1
  97. package/src/assets/qms-ckeditor-plugin/build/translations/no.js +1 -1
  98. package/src/assets/qms-ckeditor-plugin/build/translations/pl.js +1 -1
  99. package/src/assets/qms-ckeditor-plugin/build/translations/pt-br.js +1 -1
  100. package/src/assets/qms-ckeditor-plugin/build/translations/pt.js +1 -1
  101. package/src/assets/qms-ckeditor-plugin/build/translations/ro.js +1 -1
  102. package/src/assets/qms-ckeditor-plugin/build/translations/ru.js +1 -1
  103. package/src/assets/qms-ckeditor-plugin/build/translations/sk.js +1 -1
  104. package/src/assets/qms-ckeditor-plugin/build/translations/sl.js +1 -1
  105. package/src/assets/qms-ckeditor-plugin/build/translations/sq.js +1 -1
  106. package/src/assets/qms-ckeditor-plugin/build/translations/sr-latn.js +1 -1
  107. package/src/assets/qms-ckeditor-plugin/build/translations/sr.js +1 -1
  108. package/src/assets/qms-ckeditor-plugin/build/translations/sv.js +1 -1
  109. package/src/assets/qms-ckeditor-plugin/build/translations/th.js +1 -1
  110. package/src/assets/qms-ckeditor-plugin/build/translations/tk.js +1 -1
  111. package/src/assets/qms-ckeditor-plugin/build/translations/tr.js +1 -1
  112. package/src/assets/qms-ckeditor-plugin/build/translations/ug.js +1 -1
  113. package/src/assets/qms-ckeditor-plugin/build/translations/uk.js +1 -1
  114. package/src/assets/qms-ckeditor-plugin/build/translations/vi.js +1 -1
  115. package/src/assets/qms-ckeditor-plugin/build/translations/zh-cn.js +1 -1
  116. package/src/assets/qms-ckeditor-plugin/build/translations/zh.js +1 -1
  117. package/src/assets/qms-ckeditor-plugin/package-lock.json +0 -1
  118. package/src/assets/qms-ckeditor-plugin/package.json +0 -1
  119. package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +1 -1
  120. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/heading.js +119 -0
  121. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingbuttonsui.js +103 -0
  122. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingcommand.js +96 -0
  123. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingediting.js +163 -0
  124. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingui.js +115 -0
  125. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/index.js +22 -0
  126. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/heading.css +35 -0
  127. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading1.svg +1 -0
  128. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading2.svg +1 -0
  129. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading3.svg +1 -0
  130. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading4.svg +1 -0
  131. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading5.svg +1 -0
  132. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/icons/heading6.svg +1 -0
  133. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/title.js +598 -0
  134. package/src/assets/qms-ckeditor-plugin/src/plugins/heading/utils.js +42 -0
  135. package/src/lib/components/breadcrumb/breadcrumb.scss +2 -1
  136. package/src/lib/components/button/_button-base.scss +45 -52
  137. package/src/lib/components/button/_button-theme.scss +4 -2
  138. package/src/lib/components/button/button-icon.scss +17 -14
  139. package/src/lib/components/button/button-toggle.scss +64 -115
  140. package/src/lib/components/comment/comment.scss +3 -2
  141. package/src/lib/components/dialog/dialog.scss +2 -1
  142. package/src/lib/components/list/_list-base.scss +2 -2
  143. package/src/lib/components/list/_list-expansion.scss +37 -7
  144. package/src/lib/components/list/list.scss +21 -4
  145. package/src/lib/components/related/content/related-content.component.scss +4 -2
  146. package/src/lib/components/related/list-other-related/list-related.component.scss +7 -6
  147. package/src/lib/components/related/popup/related-popup.component.scss +10 -10
  148. package/src/lib/components/related/risk/analysis/analysis.component.scss +4 -3
  149. package/src/lib/components/related/risk/list/list.component.scss +7 -6
  150. package/src/lib/components/related/risk/result/result.component.scss +9 -8
  151. package/src/lib/components/rich-text/rich-text.scss +3 -2
  152. package/src/lib/components/select-dialog/select-dialog.scss +5 -5
  153. package/src/lib/components/select-include-children/select-include-children.component.scss +10 -10
  154. package/src/lib/components/select-one/select-one.component.scss +5 -4
  155. package/src/lib/components/select-process-document/select-process-document.component.scss +12 -13
  156. package/src/lib/components/substance-conflict/substance-conflict.component.scss +4 -3
  157. package/src/lib/components/table/table.scss +4 -3
  158. package/src/lib/components/tooltip/tooltip.scss +3 -1
  159. package/src/lib/components/tree/tree.component.scss +12 -12
  160. package/src/lib/components/treeNew/tree.component.scss +11 -18
  161. package/src/lib/qms-ckeditor-components/qms-ckeditor.component.scss +3 -2
  162. package/src/lib/qms-ckeditor-components/styles/_modules.scss +9 -0
  163. package/src/themes/_non-bg-scrollbar.scss +4 -3
  164. package/src/themes/core/_app-bar.scss +5 -4
  165. package/src/themes/core/_button.scss +14 -12
  166. package/src/themes/core/_checkbox.scss +9 -24
  167. package/src/themes/core/_chip-input.scss +29 -27
  168. package/src/themes/core/_chip.scss +12 -10
  169. package/src/themes/core/_date-picker.scss +9 -8
  170. package/src/themes/core/_dropdown-menu.scss +12 -11
  171. package/src/themes/core/_file-upload.scss +12 -11
  172. package/src/themes/core/_form-prefix.scss +6 -4
  173. package/src/themes/core/_form.scss +28 -27
  174. package/src/themes/core/_progress.scss +5 -3
  175. package/src/themes/core/_radio.scss +13 -15
  176. package/src/themes/core/_range-slider.scss +34 -33
  177. package/src/themes/core/_scrollbar.scss +25 -34
  178. package/src/themes/core/_search-field.scss +5 -3
  179. package/src/themes/core/_select.scss +5 -2
  180. package/src/themes/core/_slide-toggle.scss +10 -11
  181. package/src/themes/core/_styles.scss +19 -17
  182. package/src/themes/core/_tab.scss +88 -87
  183. package/src/themes/core/_table.scss +35 -19
  184. package/src/themes/core/_text-block.scss +3 -1
  185. package/src/themes/theme/_mixins.scss +18 -0
  186. package/src/themes/theme/_theme.scss +17 -0
  187. package/src/themes/theme/_variable.scss +303 -0
  188. package/src/themes/_color.scss +0 -61
  189. package/src/themes/_scrollbar.scss +0 -27
  190. package/src/themes/core/_colors.scss +0 -60
@@ -0,0 +1,163 @@
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 heading/headingediting
8
+ */
9
+
10
+ import { Plugin } from 'ckeditor5/src/core';
11
+ import { Paragraph } from 'ckeditor5/src/paragraph';
12
+ import { priorities } from 'ckeditor5/src/utils';
13
+
14
+ import HeadingCommand from './headingcommand';
15
+
16
+ const defaultModelElement = 'paragraph';
17
+
18
+ /**
19
+ * The headings engine feature. It handles switching between block formats – headings and paragraph.
20
+ * This class represents the engine part of the heading feature. See also {@link module:heading/heading~Heading}.
21
+ * It introduces `heading1`-`headingN` commands which allow to convert paragraphs into headings.
22
+ *
23
+ * @extends module:core/plugin~Plugin
24
+ */
25
+ export default class HeadingEditing extends Plugin {
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName() {
30
+ return 'HeadingEditing';
31
+ }
32
+
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ constructor( editor ) {
37
+ super( editor );
38
+
39
+ editor.config.define( 'heading', {
40
+ options: [
41
+ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
42
+ { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
43
+ { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
44
+ { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' }
45
+ ]
46
+ } );
47
+ }
48
+
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ static get requires() {
53
+ return [ Paragraph ];
54
+ }
55
+
56
+ /**
57
+ * @inheritDoc
58
+ */
59
+ init() {
60
+ const editor = this.editor;
61
+ const options = editor.config.get( 'heading.options' );
62
+
63
+ const modelElements = [];
64
+
65
+ for ( const option of options ) {
66
+ // Skip paragraph - it is defined in required Paragraph feature.
67
+ if ( option.model !== defaultModelElement ) {
68
+ // Schema.
69
+ editor.model.schema.register( option.model, {
70
+ allowIn: '$root',
71
+ inheritAllFrom: '$block'
72
+ } );
73
+
74
+ editor.conversion.elementToElement( option );
75
+
76
+ modelElements.push( option.model );
77
+ }
78
+ }
79
+
80
+ this._addClassToAllHeading( editor );
81
+
82
+ // Register the heading command for this option.
83
+ editor.commands.add( 'heading', new HeadingCommand( editor, modelElements ) );
84
+ }
85
+
86
+ /**
87
+ * @inheritDoc
88
+ */
89
+ afterInit() {
90
+ // If the enter command is added to the editor, alter its behavior.
91
+ // Enter at the end of a heading element should create a paragraph.
92
+ const editor = this.editor;
93
+ const enterCommand = editor.commands.get( 'enter' );
94
+ const options = editor.config.get( 'heading.options' );
95
+
96
+ if ( enterCommand ) {
97
+ this.listenTo( enterCommand, 'afterExecute', ( evt, data ) => {
98
+ const positionParent = editor.model.document.selection.getFirstPosition().parent;
99
+ const isHeading = options.some( option => positionParent.is( 'element', option.model ) );
100
+
101
+ if ( isHeading && !positionParent.is( 'element', defaultModelElement ) && positionParent.childCount === 0 ) {
102
+ data.writer.rename( positionParent, defaultModelElement );
103
+ }
104
+ } );
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Adds default conversion for `h1` -> `heading1` with a low priority.
110
+ *
111
+ * @private
112
+ * @param {module:core/editor/editor~Editor} editor Editor instance on which to add the `h1` conversion.
113
+ */
114
+ _addDefaultH1Conversion( editor ) {
115
+ editor.conversion.for( 'upcast' ).elementToElement( {
116
+ model: 'heading1',
117
+ view: 'h1',
118
+ // With a `low` priority, `paragraph` plugin autoparagraphing mechanism is executed. Make sure
119
+ // this listener is called before it. If not, `h1` will be transformed into a paragraph.
120
+ converterPriority: priorities.get( 'low' ) + 1
121
+ } )
122
+ }
123
+
124
+ /**
125
+ * This plugin brings customization to the downcast pipeline of the editor.
126
+ *
127
+ * @private
128
+ * @param {module:core/editor/editor~Editor} editor
129
+ */
130
+ _addClassToAllHeading( editor ) {
131
+ // Both the data and the editing pipelines are affected by this conversion.
132
+ editor.conversion.for( 'downcast' ).add( dispatcher => {
133
+ // Headings are represented in the model as a "heading1" element.
134
+ // Use the "low" listener priority to apply the changes after the headings feature.
135
+ dispatcher.on( 'insert:heading1', ( evt, data, conversionApi ) => {
136
+ const viewWriter = conversionApi.writer;
137
+
138
+ viewWriter.addClass( 'radEdH1', conversionApi.mapper.toViewElement( data.item ) );
139
+ }, { priority: 'low' } );
140
+ } );
141
+
142
+ editor.conversion.for( 'downcast' ).add( dispatcher => {
143
+ // Headings are represented in the model as a "heading2" element.
144
+ // Use the "low" listener priority to apply the changes after the headings feature.
145
+ dispatcher.on( 'insert:heading2', ( evt, data, conversionApi ) => {
146
+ const viewWriter = conversionApi.writer;
147
+
148
+ viewWriter.addClass( 'radEdH2', conversionApi.mapper.toViewElement( data.item ) );
149
+ }, { priority: 'low' } );
150
+ } );
151
+
152
+ editor.conversion.for( 'downcast' ).add( dispatcher => {
153
+ // Headings are represented in the model as a "heading3" element.
154
+ // Use the "low" listener priority to apply the changes after the headings feature.
155
+ dispatcher.on( 'insert:heading3', ( evt, data, conversionApi ) => {
156
+ const viewWriter = conversionApi.writer;
157
+
158
+ viewWriter.addClass( 'radEdH3', conversionApi.mapper.toViewElement( data.item ) );
159
+ }, { priority: 'low' } );
160
+ } );
161
+ }
162
+
163
+ }
@@ -0,0 +1,115 @@
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 heading/headingui
8
+ */
9
+
10
+ import { Plugin } from 'ckeditor5/src/core';
11
+ import { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
12
+ import { Collection } from 'ckeditor5/src/utils';
13
+
14
+ import { getLocalizedOptions } from './utils';
15
+
16
+ import './theme/heading.css';
17
+
18
+ /**
19
+ * The headings UI feature. It introduces the `headings` dropdown.
20
+ *
21
+ * @extends module:core/plugin~Plugin
22
+ */
23
+ export default class HeadingUI extends Plugin {
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName() {
28
+ return 'HeadingUI';
29
+ }
30
+
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ init() {
35
+ const editor = this.editor;
36
+ const t = editor.t;
37
+ const options = getLocalizedOptions( editor );
38
+ const defaultTitle = t( 'Choose heading' );
39
+ const dropdownTooltip = t( 'Heading' );
40
+
41
+ // Register UI component.
42
+ editor.ui.componentFactory.add( 'heading', locale => {
43
+ const titles = {};
44
+ const itemDefinitions = new Collection();
45
+
46
+ const headingCommand = editor.commands.get( 'heading' );
47
+ const paragraphCommand = editor.commands.get( 'paragraph' );
48
+
49
+ const commands = [ headingCommand ];
50
+
51
+ for ( const option of options ) {
52
+ const def = {
53
+ type: 'button',
54
+ model: new Model( {
55
+ label: option.title,
56
+ class: option.class,
57
+ withText: true
58
+ } )
59
+ };
60
+
61
+ if ( option.model === 'paragraph' ) {
62
+ def.model.bind( 'isOn' ).to( paragraphCommand, 'value' );
63
+ def.model.set( 'commandName', 'paragraph' );
64
+ commands.push( paragraphCommand );
65
+ } else {
66
+ def.model.bind( 'isOn' ).to( headingCommand, 'value', value => value === option.model );
67
+ def.model.set( {
68
+ commandName: 'heading',
69
+ commandValue: option.model
70
+ } );
71
+ }
72
+
73
+ // Add the option to the collection.
74
+ itemDefinitions.add( def );
75
+
76
+ titles[ option.model ] = option.title;
77
+ }
78
+
79
+ const dropdownView = createDropdown( locale );
80
+ addListToDropdown( dropdownView, itemDefinitions );
81
+
82
+ dropdownView.buttonView.set( {
83
+ isOn: false,
84
+ withText: true,
85
+ tooltip: dropdownTooltip
86
+ } );
87
+
88
+ dropdownView.extendTemplate( {
89
+ attributes: {
90
+ class: [
91
+ 'ck-heading-dropdown'
92
+ ]
93
+ }
94
+ } );
95
+
96
+ dropdownView.bind( 'isEnabled' ).toMany( commands, 'isEnabled', ( ...areEnabled ) => {
97
+ return areEnabled.some( isEnabled => isEnabled );
98
+ } );
99
+
100
+ dropdownView.buttonView.bind( 'label' ).to( headingCommand, 'value', paragraphCommand, 'value', ( value, para ) => {
101
+ const whichModel = value || para && 'paragraph';
102
+ // If none of the commands is active, display default title.
103
+ return titles[ whichModel ] ? titles[ whichModel ] : defaultTitle;
104
+ } );
105
+
106
+ // Execute command when an item from the dropdown is selected.
107
+ this.listenTo( dropdownView, 'execute', evt => {
108
+ editor.execute( evt.source.commandName, evt.source.commandValue ? { value: evt.source.commandValue } : undefined );
109
+ editor.editing.view.focus();
110
+ } );
111
+
112
+ return dropdownView;
113
+ } );
114
+ }
115
+ }
@@ -0,0 +1,22 @@
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 heading
8
+ */
9
+
10
+ import Heading from './heading';
11
+ import HeadingEditing from './headingediting';
12
+ import HeadingUI from './headingui';
13
+ import HeadingButtonsUI from './headingbuttonsui';
14
+ import Title from './title';
15
+
16
+ export default {
17
+ Heading,
18
+ HeadingEditing,
19
+ HeadingUI,
20
+ HeadingButtonsUI,
21
+ Title
22
+ };
@@ -0,0 +1,35 @@
1
+ /*
2
+ * 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
+ .ck.ck-heading_heading1 {
7
+ font-size: 20px;
8
+ }
9
+
10
+ .ck.ck-heading_heading2 {
11
+ font-size: 17px;
12
+ }
13
+
14
+ .ck.ck-heading_heading3 {
15
+ font-size: 14px;
16
+ }
17
+
18
+ .ck[class*="ck-heading_heading"] {
19
+ font-weight: bold;
20
+ }
21
+
22
+ .ck h1.radEdH1{
23
+ font: bold 14pt Cambria, sans-serif;
24
+ color: #003388;
25
+ }
26
+
27
+ .ck h2.radEdH2{
28
+ font: bold 13pt Cambria, sans-serif;
29
+ color: #003388;
30
+ }
31
+
32
+ .ck h3.radEdH3{
33
+ font: bold 12pt Cambria, sans-serif;
34
+ color: #003388;
35
+ }
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 9v10h-2v-8h-2V9h4zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v4.5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm16.076 8.343V18.5h-6.252c.067-.626.27-1.22.61-1.78.338-.561 1.006-1.305 2.005-2.232.804-.749 1.297-1.257 1.479-1.523.245-.368.368-.732.368-1.092 0-.398-.107-.703-.32-.917-.214-.214-.51-.32-.886-.32-.372 0-.669.111-.889.336-.22.224-.347.596-.38 1.117l-1.778-.178c.106-.982.438-1.686.997-2.114.558-.427 1.257-.64 2.095-.64.918 0 1.64.247 2.164.742.525.495.787 1.11.787 1.847 0 .419-.075.818-.225 1.197-.15.378-.388.775-.714 1.19-.216.275-.605.67-1.168 1.187-.563.516-.92.859-1.07 1.028a3.11 3.11 0 0 0-.365.495h3.542z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm9.989 7.53 1.726-.209c.055.44.203.777.445 1.01.24.232.533.349.876.349.368 0 .678-.14.93-.42.251-.279.377-.655.377-1.13 0-.448-.12-.803-.362-1.066a1.153 1.153 0 0 0-.882-.393c-.228 0-.501.044-.819.133l.197-1.453c.482.012.85-.092 1.105-.315.253-.222.38-.517.38-.885 0-.313-.093-.563-.279-.75-.186-.185-.434-.278-.743-.278a1.07 1.07 0 0 0-.78.317c-.216.212-.347.52-.394.927l-1.644-.28c.114-.562.287-1.012.517-1.348.231-.337.553-.601.965-.794a3.24 3.24 0 0 1 1.387-.289c.876 0 1.579.28 2.108.838.436.457.653.973.653 1.549 0 .817-.446 1.468-1.339 1.955.533.114.96.37 1.28.768.319.398.478.878.478 1.441 0 .817-.298 1.513-.895 2.088-.596.576-1.339.864-2.228.864-.842 0-1.54-.243-2.094-.727-.555-.485-.876-1.118-.965-1.901z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5H17.05zm0-3.44v-3.18l-2.14 3.18h2.14z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm9.578 7.607 1.777-.184c.05.402.201.72.45.955a1.223 1.223 0 0 0 1.81-.101c.258-.303.387-.759.387-1.368 0-.572-.128-1-.384-1.286-.256-.285-.59-.428-1-.428-.512 0-.971.226-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.697 2.697 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863c.55.576.825 1.323.825 2.241a3.36 3.36 0 0 1-.666 2.05c-.605.821-1.445 1.232-2.52 1.232-.86 0-1.56-.23-2.101-.692-.542-.461-.866-1.081-.971-1.86z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm15.595 2.973-1.726.19c-.043-.355-.153-.617-.33-.787-.178-.169-.409-.253-.692-.253-.377 0-.695.169-.956.507-.26.339-.424 1.043-.492 2.114.445-.525.997-.787 1.657-.787.745 0 1.383.284 1.914.85.531.568.797 1.3.797 2.197 0 .952-.28 1.716-.838 2.291-.559.576-1.276.864-2.152.864-.94 0-1.712-.365-2.317-1.095-.605-.73-.908-1.927-.908-3.59 0-1.705.316-2.935.946-3.688.63-.753 1.45-1.13 2.457-1.13.706 0 1.291.198 1.755.594.463.395.758.97.885 1.723zm-4.043 3.891c0 .58.133 1.028.4 1.343.266.315.57.473.914.473.33 0 .605-.13.825-.388.22-.258.33-.68.33-1.27 0-.604-.118-1.047-.355-1.329a1.115 1.115 0 0 0-.89-.422c-.342 0-.632.134-.869.403s-.355.666-.355 1.19z"/></svg>