@lblod/ember-rdfa-editor-lblod-plugins 5.0.0 → 5.0.1
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/CHANGELOG.md +10 -2
- package/addon/components/hover-tooltip.ts +15 -12
- package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.ts +16 -1
- package/addon/plugins/table-of-contents-plugin/index.ts +2 -0
- package/package.json +1 -1
- package/plugins/table-of-contents-plugin/index.d.ts +2 -0
- package/translations/nl-BE.yaml +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [5.0.1] - 2023-04-07
|
|
11
|
+
### Fixed
|
|
12
|
+
- fix deprecated use of modifier without specifying eagerness
|
|
13
|
+
- add missing translations
|
|
14
|
+
- make application route in dummy app a javascript file to avoid [issues](https://github.com/typed-ember/ember-cli-typescript/issues/780)
|
|
15
|
+
|
|
10
16
|
## [5.0.0] - 2023-04-07
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -18,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
18
24
|
- split out structure removal card into two buttons
|
|
19
25
|
|
|
20
26
|
### Fixed
|
|
21
|
-
- BREAKING:
|
|
27
|
+
- BREAKING: Rename decision title node from title to besluit_title to avoid conflicts
|
|
22
28
|
- properly initialize ember-intl
|
|
23
29
|
|
|
24
30
|
## [4.0.2] - 2023-04-04
|
|
@@ -49,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
49
55
|
- Update schema on dummy page to make articles insertable in empty document
|
|
50
56
|
- Add padding to structure card
|
|
51
57
|
- Placeholder text when inserting date
|
|
58
|
+
- Feature/improve toc scroll
|
|
52
59
|
|
|
53
60
|
### Removed:
|
|
54
61
|
- Removal of prosemirror-plugin dependency of `CitationPlugin::CitationInsert` component.
|
|
@@ -405,7 +412,8 @@ add onclick handler to pencil icon in variable plugin
|
|
|
405
412
|
|
|
406
413
|
# Changelog
|
|
407
414
|
|
|
408
|
-
[unreleased]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v5.0.
|
|
415
|
+
[unreleased]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v5.0.1...HEAD
|
|
416
|
+
[5.0.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v5.0.0...v5.0.1
|
|
409
417
|
[5.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v4.0.2...v5.0.0
|
|
410
418
|
[4.0.2]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v4.0.1...v4.0.2
|
|
411
419
|
[4.0.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v4.0.0...v4.0.1
|
|
@@ -7,18 +7,21 @@ interface Args {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export default class HoverTooltip extends Component<Args> {
|
|
10
|
-
hover = modifier(
|
|
11
|
-
element
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
hover = modifier(
|
|
11
|
+
(element) => {
|
|
12
|
+
element.addEventListener('mouseenter', this.showTooltip);
|
|
13
|
+
element.addEventListener('mouseleave', this.hideTooltip);
|
|
14
|
+
element.addEventListener('focus', this.showTooltip);
|
|
15
|
+
element.addEventListener('blur', this.hideTooltip);
|
|
16
|
+
return () => {
|
|
17
|
+
element.removeEventListener('mouseenter', this.showTooltip);
|
|
18
|
+
element.removeEventListener('mouseleave', this.hideTooltip);
|
|
19
|
+
element.removeEventListener('focus', this.showTooltip);
|
|
20
|
+
element.removeEventListener('blur', this.hideTooltip);
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
{ eager: false }
|
|
24
|
+
);
|
|
22
25
|
|
|
23
26
|
@tracked tooltipOpen = false;
|
|
24
27
|
|
|
@@ -83,7 +83,22 @@ export default class TableOfContentsComponent extends Component<EmberNodeArgs> {
|
|
|
83
83
|
const selection = Selection.near(resolvedPos, 1);
|
|
84
84
|
if (selection) {
|
|
85
85
|
tr.setSelection(selection);
|
|
86
|
-
|
|
86
|
+
const coords = this.controller.mainEditorView.coordsAtPos(
|
|
87
|
+
selection.from
|
|
88
|
+
);
|
|
89
|
+
const config = this.config[0];
|
|
90
|
+
if (config.scrollContainer) {
|
|
91
|
+
const scrollContainer: HTMLElement = config.scrollContainer;
|
|
92
|
+
const alreadyScrolled = scrollContainer.scrollTop;
|
|
93
|
+
const MAGIC_NUMBER_TOPBAR_HEIGHT: number =
|
|
94
|
+
config.scrollingPadding ?? 150;
|
|
95
|
+
scrollContainer.scrollTo(
|
|
96
|
+
0,
|
|
97
|
+
coords.top + alreadyScrolled - MAGIC_NUMBER_TOPBAR_HEIGHT
|
|
98
|
+
);
|
|
99
|
+
} else {
|
|
100
|
+
tr.scrollIntoView();
|
|
101
|
+
}
|
|
87
102
|
}
|
|
88
103
|
return tr;
|
|
89
104
|
});
|
package/package.json
CHANGED
package/translations/nl-BE.yaml
CHANGED
|
@@ -13,6 +13,7 @@ article-structure-plugin:
|
|
|
13
13
|
chapter: Hoofdstuk naar boven verplaatsen
|
|
14
14
|
section: Afdeling naar boven verplaatsen
|
|
15
15
|
subsection: Onderafdeling naar boven verplaatsen
|
|
16
|
+
default: Structuur naar boven verplaatsen
|
|
16
17
|
move-down:
|
|
17
18
|
paragraph: Paragraaf naar beneden verplaatsen
|
|
18
19
|
article: Artikel naar beneden verplaatsen
|
|
@@ -20,6 +21,7 @@ article-structure-plugin:
|
|
|
20
21
|
chapter: Hoofdstuk naar beneden verplaatsen
|
|
21
22
|
section: Afdeling naar beneden verplaatsen
|
|
22
23
|
subsection: Onderafdeling naar beneden verplaatsen
|
|
24
|
+
default: Structuur naar beneden verplaatsen
|
|
23
25
|
title:
|
|
24
26
|
structure-card: Structuur card
|
|
25
27
|
remove:
|
|
@@ -38,6 +40,7 @@ article-structure-plugin:
|
|
|
38
40
|
section: Afdeling en inhoud verwijderen
|
|
39
41
|
chapter: Hoofdstuk en inhoud verwijderen
|
|
40
42
|
title: Titel en inhoud verwijderen
|
|
43
|
+
paragraph: Paragraaf en inhoud verwijderen
|
|
41
44
|
help-text: Verwijder de hoofding, en alle inhoud tot aan de volgende hoofding van hetzelfde niveau
|
|
42
45
|
placeholder:
|
|
43
46
|
generic:
|