@lblod/ember-rdfa-editor-lblod-plugins 22.2.1 → 22.2.2-dev.67451d85f50c31bed802585e883a3bbc7c0a66fd
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @lblod/ember-rdfa-editor-lblod-plugins
|
|
2
2
|
|
|
3
|
+
## 22.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#465](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/465) [`83b95db`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/83b95db9991f6b5ef090cd77765d8c09eac90db7) Thanks [@lagartoverde](https://github.com/lagartoverde)! - Correctly export empty person nodes
|
|
8
|
+
|
|
9
|
+
- [#465](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/465) [`be233e8`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/be233e8bc70aee1db00644ad6f956157da8d3a20) Thanks [@lagartoverde](https://github.com/lagartoverde)! - Correctly export empty person node
|
|
10
|
+
|
|
3
11
|
## 22.2.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from '@lblod/ember-rdfa-editor/utils/ember-node';
|
|
10
10
|
import {
|
|
11
11
|
DOMOutputSpec,
|
|
12
|
+
EditorState,
|
|
12
13
|
getRdfaAttrs,
|
|
13
14
|
PNode,
|
|
14
15
|
rdfaAttrSpec,
|
|
@@ -19,6 +20,11 @@ import type { ComponentLike } from '@glint/template';
|
|
|
19
20
|
import { hasOutgoingNamedNodeTriple } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
20
21
|
import { renderRdfaAware } from '@lblod/ember-rdfa-editor/core/schema';
|
|
21
22
|
import Mandatee from '@lblod/ember-rdfa-editor-lblod-plugins/models/mandatee';
|
|
23
|
+
import { getTranslationFunction } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/translation';
|
|
24
|
+
|
|
25
|
+
const TRANSLATION_FALLBACKS = {
|
|
26
|
+
nodeview_placeholder: 'persoon',
|
|
27
|
+
};
|
|
22
28
|
|
|
23
29
|
const rdfaAware = true;
|
|
24
30
|
const parseDOM = [
|
|
@@ -50,7 +56,8 @@ const parseDOM = [
|
|
|
50
56
|
},
|
|
51
57
|
];
|
|
52
58
|
|
|
53
|
-
const
|
|
59
|
+
const serialize = (node: PNode, state: EditorState): DOMOutputSpec => {
|
|
60
|
+
const t = getTranslationFunction(state);
|
|
54
61
|
const mandatee = node.attrs.mandatee as Mandatee;
|
|
55
62
|
return renderRdfaAware({
|
|
56
63
|
renderable: node,
|
|
@@ -59,7 +66,12 @@ const toDOM = (node: PNode): DOMOutputSpec => {
|
|
|
59
66
|
...node.attrs,
|
|
60
67
|
'data-mandatee': JSON.stringify(mandatee),
|
|
61
68
|
},
|
|
62
|
-
content: mandatee
|
|
69
|
+
content: mandatee
|
|
70
|
+
? `${mandatee.fullName}`
|
|
71
|
+
: t(
|
|
72
|
+
'variable-plugin.person.nodeview-placeholder',
|
|
73
|
+
TRANSLATION_FALLBACKS.nodeview_placeholder,
|
|
74
|
+
),
|
|
63
75
|
});
|
|
64
76
|
};
|
|
65
77
|
|
|
@@ -85,7 +97,7 @@ const emberNodeConfig: EmberNodeConfig = {
|
|
|
85
97
|
default: null,
|
|
86
98
|
},
|
|
87
99
|
},
|
|
88
|
-
|
|
100
|
+
serialize,
|
|
89
101
|
parseDOM,
|
|
90
102
|
};
|
|
91
103
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lblod/ember-rdfa-editor-lblod-plugins",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.2-dev.67451d85f50c31bed802585e883a3bbc7c0a66fd",
|
|
4
4
|
"description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
package/translations/en-US.yaml
CHANGED