@lblod/ember-rdfa-editor-lblod-plugins 29.0.1 → 29.1.0
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/.woodpecker/.release.yml +7 -4
- package/CHANGELOG.md +12 -0
- package/addon/components/common/documents/preview.gts +1 -3
- package/addon/components/variable-plugin/location/edit.hbs +1 -0
- package/addon/plugins/location-plugin/node.ts +3 -0
- package/addon/plugins/roadsign-regulation-plugin/nodes.ts +24 -15
- package/addon/plugins/variable-plugin/variables/address.ts +3 -0
- package/addon/plugins/variable-plugin/variables/autofilled.ts +8 -0
- package/addon/plugins/variable-plugin/variables/codelist.ts +8 -0
- package/addon/plugins/variable-plugin/variables/date.ts +1 -0
- package/addon/plugins/variable-plugin/variables/location.ts +10 -1
- package/addon/plugins/variable-plugin/variables/number.ts +1 -0
- package/addon/plugins/variable-plugin/variables/person.ts +3 -1
- package/addon/plugins/variable-plugin/variables/text.ts +10 -1
- package/app/styles/variable-plugin.scss +41 -0
- package/package.json +2 -2
- package/pnpm-lock.yaml +6 -6
package/.woodpecker/.release.yml
CHANGED
|
@@ -10,12 +10,15 @@ steps:
|
|
|
10
10
|
token:
|
|
11
11
|
from_secret: npm_access_token
|
|
12
12
|
push-tagged-build:
|
|
13
|
-
image:
|
|
13
|
+
image: woodpeckerci/plugin-docker-buildx
|
|
14
14
|
settings:
|
|
15
15
|
repo: lblod/ember-rdfa-editor-lblod-plugins
|
|
16
16
|
tags: '${CI_COMMIT_TAG##v}'
|
|
17
17
|
purge: true
|
|
18
|
-
|
|
18
|
+
username:
|
|
19
|
+
from_secret: docker_username
|
|
20
|
+
password:
|
|
21
|
+
from_secret: docker_password
|
|
19
22
|
when:
|
|
20
|
-
event: tag
|
|
21
|
-
|
|
23
|
+
- event: tag
|
|
24
|
+
ref: refs/tags/v*
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @lblod/ember-rdfa-editor-lblod-plugins
|
|
2
2
|
|
|
3
|
+
## 29.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#559](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/559) [`34a85e1`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/34a85e14cf9ba4b4996e49c476a775afbe3ab6ac) Thanks [@piemonkey](https://github.com/piemonkey)! - Add style to highlight variables in serialized HTML
|
|
8
|
+
|
|
9
|
+
- [#555](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/555) [`da5057a`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/da5057ae7cc279c4b3214fd49370e82325ccd9de) Thanks [@elpoelma](https://github.com/elpoelma)! - `roadsign_regulation` node: introduce parse-rule which converts classic `roadsign_regulation` nodes to `block_rdfa` nodes
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#557](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/557) [`710302b`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/710302bf659028ae8c0e0cb665a5b414dd9f5b17) Thanks [@lagartoverde](https://github.com/lagartoverde)! - Solves bug with powerselect dropdown not displaying in place
|
|
14
|
+
|
|
3
15
|
## 29.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -111,9 +111,7 @@ export default class DocumentPreview<
|
|
|
111
111
|
|
|
112
112
|
</div>
|
|
113
113
|
{{#if this.isExpanded}}
|
|
114
|
-
<div
|
|
115
|
-
class='say-editor say-content rdfa-annotations rdfa-annotations-highlight rdfa-annotations-hover snippet-preview__content'
|
|
116
|
-
>
|
|
114
|
+
<div class='say-editor say-content snippet-preview__content'>
|
|
117
115
|
{{#if this.content}}
|
|
118
116
|
{{this.content}}
|
|
119
117
|
{{else if this.contentTask.isRunning}}
|
|
@@ -6,16 +6,17 @@ import {
|
|
|
6
6
|
PROV,
|
|
7
7
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
8
8
|
import { hasRDFaAttribute } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
9
|
+
import { sayDataFactory } from '@lblod/ember-rdfa-editor/core/say-data-factory';
|
|
9
10
|
|
|
10
11
|
const CONTENT_SELECTOR = `div[property~='${
|
|
11
12
|
DCT('description').full
|
|
12
13
|
}'],div[property~='${DCT('description').prefixed}']`;
|
|
13
|
-
|
|
14
|
+
|
|
14
15
|
export const roadsign_regulation: NodeSpec = {
|
|
15
16
|
content: 'block+',
|
|
16
17
|
group: 'block',
|
|
17
18
|
attrs: {
|
|
18
|
-
...rdfaAttrSpec({ rdfaAware }),
|
|
19
|
+
...rdfaAttrSpec({ rdfaAware: false }),
|
|
19
20
|
resourceUri: {},
|
|
20
21
|
measureUri: {},
|
|
21
22
|
zonality: {},
|
|
@@ -61,7 +62,12 @@ export const roadsign_regulation: NodeSpec = {
|
|
|
61
62
|
parseDOM: [
|
|
62
63
|
{
|
|
63
64
|
tag: 'div',
|
|
65
|
+
node: 'block_rdfa',
|
|
64
66
|
getAttrs(node: HTMLElement) {
|
|
67
|
+
const attrs = getRdfaAttrs(node, { rdfaAware: true });
|
|
68
|
+
if (!attrs || attrs.rdfaNodeType !== 'resource') {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
65
71
|
if (
|
|
66
72
|
hasRDFaAttribute(
|
|
67
73
|
node,
|
|
@@ -71,7 +77,7 @@ export const roadsign_regulation: NodeSpec = {
|
|
|
71
77
|
node.querySelector(CONTENT_SELECTOR)
|
|
72
78
|
) {
|
|
73
79
|
const resourceUri = node.getAttribute('resource');
|
|
74
|
-
const
|
|
80
|
+
const measureConceptUri = node
|
|
75
81
|
.querySelector(
|
|
76
82
|
`span[property~='${PROV('wasDerivedFrom').prefixed}'],
|
|
77
83
|
span[property~='${PROV('wasDerivedFrom').full}']`,
|
|
@@ -83,21 +89,24 @@ export const roadsign_regulation: NodeSpec = {
|
|
|
83
89
|
span[property~='${EXT('zonality').full}']`,
|
|
84
90
|
)
|
|
85
91
|
?.getAttribute('resource');
|
|
86
|
-
if (!resourceUri || !
|
|
92
|
+
if (!resourceUri || !measureConceptUri || !zonality) {
|
|
87
93
|
return false;
|
|
88
94
|
}
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
const { rdfaNodeType, properties, backlinks, __rdfaId } = attrs;
|
|
96
|
+
// We need to ensure that a content-literal for the description is added
|
|
97
|
+
const propertiesFiltered = properties.filter(
|
|
98
|
+
(prop) => !DCT('description').matches(prop.predicate),
|
|
99
|
+
);
|
|
100
|
+
propertiesFiltered.push({
|
|
101
|
+
predicate: DCT('description').full,
|
|
102
|
+
object: sayDataFactory.contentLiteral(),
|
|
103
|
+
});
|
|
95
104
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
rdfaNodeType,
|
|
106
|
+
__rdfaId,
|
|
107
|
+
properties: propertiesFiltered,
|
|
108
|
+
backlinks,
|
|
109
|
+
label: `Mobiliteitsmaatregel`,
|
|
101
110
|
};
|
|
102
111
|
}
|
|
103
112
|
return false;
|
|
@@ -103,10 +103,18 @@ const parseDOMLegacy = [
|
|
|
103
103
|
];
|
|
104
104
|
|
|
105
105
|
const toDOM = (node: PNode): DOMOutputSpec => {
|
|
106
|
+
const onlyContentType =
|
|
107
|
+
node.content.size === 1 && node.content.firstChild?.type;
|
|
108
|
+
const className =
|
|
109
|
+
onlyContentType &&
|
|
110
|
+
onlyContentType === onlyContentType.schema.nodes['placeholder']
|
|
111
|
+
? 'say-variable'
|
|
112
|
+
: '';
|
|
106
113
|
return renderRdfaAware({
|
|
107
114
|
renderable: node,
|
|
108
115
|
tag: 'span',
|
|
109
116
|
attrs: {
|
|
117
|
+
class: className,
|
|
110
118
|
'data-autofill-key': node.attrs.autofillKey,
|
|
111
119
|
'data-convert-to-string': node.attrs.convertToString,
|
|
112
120
|
'data-initialized': node.attrs.initialized,
|
|
@@ -152,10 +152,18 @@ const parseDOMLegacy = [
|
|
|
152
152
|
|
|
153
153
|
const toDOM = (node: PNode): DOMOutputSpec => {
|
|
154
154
|
const { selectionStyle } = node.attrs;
|
|
155
|
+
const onlyContentType =
|
|
156
|
+
node.content.size === 1 && node.content.firstChild?.type;
|
|
157
|
+
const className =
|
|
158
|
+
onlyContentType &&
|
|
159
|
+
onlyContentType === onlyContentType.schema.nodes['placeholder']
|
|
160
|
+
? 'say-variable'
|
|
161
|
+
: '';
|
|
155
162
|
|
|
156
163
|
return renderRdfaAware({
|
|
157
164
|
renderable: node,
|
|
158
165
|
attrs: {
|
|
166
|
+
class: className,
|
|
159
167
|
'data-selection-style': selectionStyle as string,
|
|
160
168
|
},
|
|
161
169
|
tag: 'span',
|
|
@@ -230,6 +230,7 @@ const serialize = (node: PNode, state: EditorState) => {
|
|
|
230
230
|
: t('date-plugin.insert.datetime', TRANSLATION_FALLBACKS.insertDateTime);
|
|
231
231
|
}
|
|
232
232
|
const dateAttrs = {
|
|
233
|
+
class: value ? '' : 'say-variable',
|
|
233
234
|
'data-format': format as string,
|
|
234
235
|
'data-custom': custom ? 'true' : 'false',
|
|
235
236
|
'data-custom-allowed': customAllowed ? 'true' : 'false',
|
|
@@ -97,9 +97,18 @@ const parseDOMLegacy = [
|
|
|
97
97
|
];
|
|
98
98
|
|
|
99
99
|
const toDOM = (node: PNode): DOMOutputSpec => {
|
|
100
|
+
const onlyContentType =
|
|
101
|
+
node.content.size === 1 && node.content.firstChild?.type;
|
|
102
|
+
const className =
|
|
103
|
+
onlyContentType &&
|
|
104
|
+
onlyContentType === onlyContentType.schema.nodes['placeholder']
|
|
105
|
+
? 'say-variable'
|
|
106
|
+
: '';
|
|
100
107
|
return renderRdfaAware({
|
|
101
108
|
renderable: node,
|
|
102
|
-
attrs: {
|
|
109
|
+
attrs: {
|
|
110
|
+
class: className,
|
|
111
|
+
},
|
|
103
112
|
tag: 'span',
|
|
104
113
|
content: 0,
|
|
105
114
|
});
|
|
@@ -184,6 +184,7 @@ const serialize = (node: PNode, state: EditorState): DOMOutputSpec => {
|
|
|
184
184
|
renderable: node,
|
|
185
185
|
tag: 'span',
|
|
186
186
|
attrs: {
|
|
187
|
+
class: value ? '' : 'say-variable',
|
|
187
188
|
'data-written-number': String(writtenNumber ?? false),
|
|
188
189
|
'data-minimum-value': (minimumValue as string) ?? null,
|
|
189
190
|
'data-maximum-value': (maximumValue as string) ?? null,
|
|
@@ -111,7 +111,9 @@ const serialize = (node: PNode, state: EditorState): DOMOutputSpec => {
|
|
|
111
111
|
return renderRdfaAware({
|
|
112
112
|
renderable: node,
|
|
113
113
|
tag: 'span',
|
|
114
|
-
attrs: {
|
|
114
|
+
attrs: {
|
|
115
|
+
class: person ? '' : 'say-variable',
|
|
116
|
+
},
|
|
115
117
|
content: person
|
|
116
118
|
? generatePersonHtml(person)
|
|
117
119
|
: t(
|
|
@@ -132,10 +132,19 @@ const parseDOMLegacy = [
|
|
|
132
132
|
];
|
|
133
133
|
|
|
134
134
|
const toDOM = (node: PNode): DOMOutputSpec => {
|
|
135
|
+
const onlyContentType =
|
|
136
|
+
node.content.size === 1 && node.content.firstChild?.type;
|
|
137
|
+
const className =
|
|
138
|
+
onlyContentType &&
|
|
139
|
+
onlyContentType === onlyContentType.schema.nodes['placeholder']
|
|
140
|
+
? 'say-variable'
|
|
141
|
+
: '';
|
|
135
142
|
return renderRdfaAware({
|
|
136
143
|
renderable: node,
|
|
137
144
|
tag: 'span',
|
|
138
|
-
attrs: {
|
|
145
|
+
attrs: {
|
|
146
|
+
class: className,
|
|
147
|
+
},
|
|
139
148
|
content: 0,
|
|
140
149
|
});
|
|
141
150
|
};
|
|
@@ -129,3 +129,44 @@
|
|
|
129
129
|
margin-top: 5px;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
+
|
|
133
|
+
@media only screen and (min-width: 2500px) {
|
|
134
|
+
#location-select,
|
|
135
|
+
.location-select-dropdown {
|
|
136
|
+
width: 600px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@media only screen and (max-width: 2500px) {
|
|
141
|
+
#location-select,
|
|
142
|
+
.location-select-dropdown {
|
|
143
|
+
width: 500px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@media only screen and (max-width: 2000px) {
|
|
148
|
+
#location-select,
|
|
149
|
+
.location-select-dropdown {
|
|
150
|
+
width: 400px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@media only screen and (max-width: 1700px) {
|
|
155
|
+
#location-select,
|
|
156
|
+
.location-select-dropdown {
|
|
157
|
+
width: 300px;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@media only screen and (max-width: 1400px) {
|
|
162
|
+
#location-select,
|
|
163
|
+
.location-select-dropdown {
|
|
164
|
+
width: 200px;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.say-variable {
|
|
169
|
+
color: var(--au-orange-700);
|
|
170
|
+
background-color: var(--au-orange-300);
|
|
171
|
+
font-style: italic;
|
|
172
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lblod/ember-rdfa-editor-lblod-plugins",
|
|
3
|
-
"version": "29.0
|
|
3
|
+
"version": "29.1.0",
|
|
4
4
|
"description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"@glint/template": "^1.5.0",
|
|
112
112
|
"@graphy/content.ttl.write": "^4.3.7",
|
|
113
113
|
"@graphy/memory.dataset.fast": "4.3.3",
|
|
114
|
-
"@lblod/ember-rdfa-editor": "11.
|
|
114
|
+
"@lblod/ember-rdfa-editor": "11.3.0",
|
|
115
115
|
"@rdfjs/types": "^1.1.0",
|
|
116
116
|
"@release-it/keep-a-changelog": "^4.0.0",
|
|
117
117
|
"@tsconfig/ember": "^3.0.8",
|
package/pnpm-lock.yaml
CHANGED
|
@@ -187,8 +187,8 @@ importers:
|
|
|
187
187
|
specifier: 4.3.3
|
|
188
188
|
version: 4.3.3
|
|
189
189
|
'@lblod/ember-rdfa-editor':
|
|
190
|
-
specifier: 11.
|
|
191
|
-
version: 11.
|
|
190
|
+
specifier: 11.3.0
|
|
191
|
+
version: 11.3.0(nlq6pvqp7wukmbrtxngdh43tfm)
|
|
192
192
|
'@rdfjs/types':
|
|
193
193
|
specifier: ^1.1.0
|
|
194
194
|
version: 1.1.0
|
|
@@ -1717,8 +1717,8 @@ packages:
|
|
|
1717
1717
|
'@jridgewell/trace-mapping@0.3.25':
|
|
1718
1718
|
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
|
|
1719
1719
|
|
|
1720
|
-
'@lblod/ember-rdfa-editor@11.
|
|
1721
|
-
resolution: {integrity: sha512-
|
|
1720
|
+
'@lblod/ember-rdfa-editor@11.3.0':
|
|
1721
|
+
resolution: {integrity: sha512-16tJ+HHqdTuLTV1EzhyJS3u/oJ3JoyJ3YfQlHkyymU49JmeNkqEjAWOJ+VpVLgzKtwOaRdIq78KKbJpVGpOmeg==}
|
|
1722
1722
|
peerDependencies:
|
|
1723
1723
|
'@appuniversum/ember-appuniversum': ^3.5.0
|
|
1724
1724
|
'@ember/test-helpers': ^2.9.4 || ^3.2.1 || ^4.0.2 || ^5.0.0
|
|
@@ -12052,7 +12052,7 @@ snapshots:
|
|
|
12052
12052
|
'@jridgewell/resolve-uri': 3.1.2
|
|
12053
12053
|
'@jridgewell/sourcemap-codec': 1.4.15
|
|
12054
12054
|
|
|
12055
|
-
'@lblod/ember-rdfa-editor@11.
|
|
12055
|
+
'@lblod/ember-rdfa-editor@11.3.0(nlq6pvqp7wukmbrtxngdh43tfm)':
|
|
12056
12056
|
dependencies:
|
|
12057
12057
|
'@appuniversum/ember-appuniversum': 3.5.0(@ember/test-helpers@3.3.1(@babel/core@7.26.0)(@glint/template@1.5.1)(ember-source@5.12.0(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(rsvp@4.8.5)(webpack@5.97.1))(webpack@5.97.1))(@glint/environment-ember-loose@1.5.1(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(@types/ember__array@4.0.10(@babel/core@7.26.0))(@types/ember__component@4.0.22(@babel/core@7.26.0))(@types/ember__controller@4.0.12(@babel/core@7.26.0))(@types/ember__object@4.0.12(@babel/core@7.26.0))(@types/ember__routing@4.0.22(@babel/core@7.26.0))(ember-cli-htmlbars@6.3.0)(ember-modifier@4.1.0(ember-source@5.12.0(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(rsvp@4.8.5)(webpack@5.97.1))))(@glint/template@1.5.1)(ember-source@5.12.0(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(rsvp@4.8.5)(webpack@5.97.1))(tracked-built-ins@3.3.0)(webpack@5.97.1)
|
|
12058
12058
|
'@codemirror/commands': 6.6.0
|
|
@@ -12065,7 +12065,7 @@ snapshots:
|
|
|
12065
12065
|
'@ember/render-modifiers': 2.1.0(@babel/core@7.26.0)(@glint/template@1.5.1)(ember-source@5.12.0(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(rsvp@4.8.5)(webpack@5.97.1))
|
|
12066
12066
|
'@ember/test-helpers': 3.3.1(@babel/core@7.26.0)(@glint/template@1.5.1)(ember-source@5.12.0(@glimmer/component@1.1.2(@babel/core@7.26.0))(@glint/template@1.5.1)(rsvp@4.8.5)(webpack@5.97.1))(webpack@5.97.1)
|
|
12067
12067
|
'@embroider/addon-shim': 1.9.0
|
|
12068
|
-
'@embroider/macros': 1.16.
|
|
12068
|
+
'@embroider/macros': 1.16.11(@glint/template@1.5.1)
|
|
12069
12069
|
'@floating-ui/dom': 1.6.7
|
|
12070
12070
|
'@glimmer/component': 1.1.2(@babel/core@7.26.0)
|
|
12071
12071
|
'@glimmer/tracking': 1.1.2
|