qms-angular 1.1.76 → 1.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/qms-angular.umd.js +18 -7
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/model/en.js +6 -2
- package/esm2015/lib/model/no.js +6 -2
- package/esm2015/lib/qms-ckeditor-components/common/functions/resource.function.js +9 -6
- package/fesm2015/qms-angular.js +18 -7
- package/fesm2015/qms-angular.js.map +1 -1
- package/lib/model/en.d.ts +4 -0
- package/lib/model/no.d.ts +4 -0
- package/lib/qms-ckeditor-components/common/functions/resource.function.d.ts +8 -5
- package/package.json +1 -1
- package/qms-angular.metadata.json +1 -1
- package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +2 -2
- package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
- package/src/assets/qms-ckeditor-plugin/src/ckeditor.js +6 -2
- package/src/assets/qms-ckeditor-plugin/src/plugins/collapsible/collapsible.js +229 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/collapsible/collapsiblecommand.js +13 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingediting.js +165 -163
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/headingui.js +18 -8
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/ingress/ingress.js +63 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/ingress/ingresscommand.js +33 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/theme/heading.css +44 -35
- package/src/assets/qms-ckeditor-plugin/src/plugins/heading/utils.js +2 -1
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/setheadercolumncommand.js +99 -95
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/commands/setheaderrowcommand.js +110 -105
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/converters/downcast.js +529 -529
- package/src/assets/qms-ckeditor-plugin/src/plugins/table/theme/table.css +67 -67
- package/src/assets/qms-ckeditor-plugin/src/plugins/tooltip/tooltipcommand.js +74 -75
- package/src/assets/qms-ckeditor-plugin/src/themes/icons/angles-up-down.svg +1 -0
@@ -1,67 +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%,
|
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
|
-
}
|
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%, 10%);
|
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
|
+
}
|
@@ -1,75 +1,74 @@
|
|
1
|
-
import { Command } from '@ckeditor/ckeditor5-core';
|
2
|
-
import { findAttributeRange } from '@ckeditor/ckeditor5-typing';
|
3
|
-
import { toMap, first } from '@ckeditor/ckeditor5-utils';
|
4
|
-
import { isImageAllowed, TOOLTIP_ATTRIBUTE } from './utils';
|
5
|
-
|
6
|
-
export default class TooltipCommand extends Command {
|
7
|
-
|
8
|
-
refresh() {
|
9
|
-
const model = this.editor.model;
|
10
|
-
const doc = model.document;
|
11
|
-
const selectedElement = first(doc.selection.getSelectedBlocks());
|
12
|
-
|
13
|
-
// A check for the `LinkImage` plugin. If the selection contains an element, get values from the element.
|
14
|
-
// Currently the selection reads attributes from text nodes only. See #7429 and #7465.
|
15
|
-
if (isImageAllowed(selectedElement, model.schema)) {
|
16
|
-
this.isEnabled = model.schema.checkAttribute(selectedElement, TOOLTIP_ATTRIBUTE);
|
17
|
-
} else {
|
18
|
-
this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, TOOLTIP_ATTRIBUTE);
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
execute(options) {
|
23
|
-
const model = this.editor.model;
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
//
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
//
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
//
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
1
|
+
import { Command } from '@ckeditor/ckeditor5-core';
|
2
|
+
import { findAttributeRange } from '@ckeditor/ckeditor5-typing';
|
3
|
+
import { toMap, first } from '@ckeditor/ckeditor5-utils';
|
4
|
+
import { isImageAllowed, TOOLTIP_ATTRIBUTE } from './utils';
|
5
|
+
|
6
|
+
export default class TooltipCommand extends Command {
|
7
|
+
|
8
|
+
refresh() {
|
9
|
+
const model = this.editor.model;
|
10
|
+
const doc = model.document;
|
11
|
+
const selectedElement = first(doc.selection.getSelectedBlocks());
|
12
|
+
|
13
|
+
// A check for the `LinkImage` plugin. If the selection contains an element, get values from the element.
|
14
|
+
// Currently the selection reads attributes from text nodes only. See #7429 and #7465.
|
15
|
+
if (isImageAllowed(selectedElement, model.schema)) {
|
16
|
+
this.isEnabled = model.schema.checkAttribute(selectedElement, TOOLTIP_ATTRIBUTE);
|
17
|
+
} else {
|
18
|
+
this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, TOOLTIP_ATTRIBUTE);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
execute(options) {
|
23
|
+
const model = this.editor.model;
|
24
|
+
|
25
|
+
const selection = model.document.selection;
|
26
|
+
model.change(writer => {
|
27
|
+
// If selection is collapsed then update selected link or insert new one at the place of caret.
|
28
|
+
if (selection.isCollapsed) {
|
29
|
+
const position = selection.getFirstPosition();
|
30
|
+
|
31
|
+
// When selection is inside text with `qmsTooltip` attribute.
|
32
|
+
if (selection.hasAttribute(TOOLTIP_ATTRIBUTE)) {
|
33
|
+
// Then update `qmsTooltip` value.
|
34
|
+
const linkRange = findAttributeRange(position, TOOLTIP_ATTRIBUTE, selection.getAttribute(TOOLTIP_ATTRIBUTE), model);
|
35
|
+
|
36
|
+
const attributes = toMap(selection.getAttributes());
|
37
|
+
|
38
|
+
attributes.set(TOOLTIP_ATTRIBUTE, options.content);
|
39
|
+
|
40
|
+
const { end: positionAfter } = model.insertContent(writer.createText(options.text, attributes), linkRange);
|
41
|
+
|
42
|
+
// Put the selection at the end of the inserted link.
|
43
|
+
// Using end of range returned from insertContent in case nodes with the same attributes got merged.
|
44
|
+
writer.setSelection(positionAfter);
|
45
|
+
}
|
46
|
+
else if (options.text !== '') {
|
47
|
+
const attributes = toMap(selection.getAttributes());
|
48
|
+
|
49
|
+
attributes.set(TOOLTIP_ATTRIBUTE, options.content);
|
50
|
+
|
51
|
+
const { end: positionAfter } = model.insertContent(writer.createText(options.text, attributes), position);
|
52
|
+
|
53
|
+
// Put the selection at the end of the inserted link.
|
54
|
+
// Using end of range returned from insertContent in case nodes with the same attributes got merged.
|
55
|
+
writer.setSelection(positionAfter);
|
56
|
+
}
|
57
|
+
} else {
|
58
|
+
const attributes = toMap(selection.getAttributes());
|
59
|
+
|
60
|
+
attributes.set(TOOLTIP_ATTRIBUTE, options.content);
|
61
|
+
|
62
|
+
const { end: positionAfter } = model.insertContent(writer.createText(options.text, attributes), selection);
|
63
|
+
|
64
|
+
writer.setSelection(positionAfter);
|
65
|
+
}
|
66
|
+
// Remove the `qmsTooltip` attribute and all link decorators from the selection.
|
67
|
+
// It stops adding a new content into the link element.
|
68
|
+
[TOOLTIP_ATTRIBUTE].forEach(item => {
|
69
|
+
writer.removeSelectionAttribute(item);
|
70
|
+
});
|
71
|
+
});
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc. --><path d="M234 19.5c-5.8-4.7-14.1-4.7-20 0L54 147.5c-6.9 5.5-8 15.6-2.5 22.5s15.6 8 22.5 2.5l150-120 150 120c6.9 5.5 17 4.4 22.5-2.5s4.4-17-2.5-22.5L234 19.5zm160 345c6.9-5.5 8-15.6 2.5-22.5s-15.6-8-22.5-2.5l-150 120L74 339.5c-6.9-5.5-17-4.4-22.5 2.5s-4.4 17 2.5 22.5l160 128c5.8 4.7 14.1 4.7 20 0l160-128z"/></svg>
|