@lblod/ember-rdfa-editor-lblod-plugins 32.0.0 → 32.1.0-dev.57d72b6f4f4d02524f5e6e7e1256c11f3ee026d4
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/.changeset/chatty-beers-do.md +5 -0
- package/.changeset/early-badgers-sell.md +5 -0
- package/.changeset/plenty-rockets-tell.md +5 -0
- package/.changeset/sharp-turkeys-greet.md +5 -0
- package/CHANGELOG.md +11 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.gts +5 -2
- package/addon/components/snippet-plugin/nodes/snippet.gts +7 -2
- package/addon/components/structure-plugin/_private/structure.gts +17 -5
- package/addon/components/template-comments-plugin/template-comment.hbs +1 -3
- package/addon/plugins/location-plugin/utils/geo-helpers.ts +16 -1
- package/addon/plugins/roadsign-regulation-plugin/actions/insert-measure.ts +22 -2
- package/addon/plugins/roadsign-regulation-plugin/constants.ts +22 -6
- package/addon/plugins/roadsign-regulation-plugin/queries/road-sign-category.ts +6 -1
- package/addon/plugins/roadsign-regulation-plugin/queries/sign-concept.ts +19 -13
- package/addon/plugins/roadsign-regulation-plugin/schemas/sign-concept.ts +22 -8
- package/addon/plugins/snippet-plugin/nodes/snippet.ts +1 -0
- package/addon/plugins/structure-plugin/commands/insert-structure.ts +5 -9
- package/addon/plugins/structure-plugin/node.ts +37 -2
- package/addon/plugins/table-of-contents-plugin/index.ts +1 -1
- package/addon/plugins/template-comments-plugin/node.ts +1 -0
- package/addon/plugins/variable-plugin/plugins/autofiller.ts +1 -1
- package/addon/plugins/variable-plugin/variables/date.ts +1 -0
- package/app/styles/snippet-plugin.scss +22 -1
- package/app/styles/structure-plugin.scss +21 -1
- package/app/styles/template-comments-plugin.scss +1 -1
- package/declarations/addon/components/roadsign-regulation-plugin/roadsigns-modal.d.ts +20 -8
- package/declarations/addon/components/structure-plugin/_private/structure.d.ts +1 -0
- package/declarations/addon/plugins/location-plugin/utils/geo-helpers.d.ts +1 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/constants.d.ts +11 -5
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/mobility-measure-concept.d.ts +10 -4
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/road-sign-category.d.ts +1 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/sign-concept.d.ts +14 -4
- package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/mobility-measure-concept.d.ts +52 -21
- package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/sign-concept.d.ts +32 -13
- package/declarations/addon/plugins/table-of-contents-plugin/index.d.ts +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @lblod/ember-rdfa-editor-lblod-plugins
|
|
2
2
|
|
|
3
|
+
## 32.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#573](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/573) [`be9e2f4`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/be9e2f476266037926f43f2729aae7e969c55652) Thanks [@elpoelma](https://github.com/elpoelma)! - Roadsign-regulation-plugin: differentiate between 'Verkeersbord' and 'Onderbord' signs
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#576](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/576) [`c68bef3`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/c68bef3a3e215e0d721894b72f8e0754b9988ca9) Thanks [@elpoelma](https://github.com/elpoelma)! - Slightly readjust styling of `snippet` and `structure` nodes, to ensure better cursor behaviour in firefox.
|
|
12
|
+
Note: for the better cursor behaviour in firefox to work as expected, `@lblod/ember-rdfa-editor` version [12.8.0](https://github.com/lblod/ember-rdfa-editor/releases/tag/%40lblod%2Fember-rdfa-editor%4012.8.0) or higher needs to be installed.
|
|
13
|
+
|
|
3
14
|
## 32.0.0
|
|
4
15
|
|
|
5
16
|
### Major Changes
|
|
@@ -19,6 +19,7 @@ import { eq } from 'ember-truth-helpers';
|
|
|
19
19
|
import t from 'ember-intl/helpers/t';
|
|
20
20
|
import { on } from '@ember/modifier';
|
|
21
21
|
import { fn } from '@ember/helper';
|
|
22
|
+
import { SIGN_CONCEPT_TYPES } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/roadsign-regulation-plugin/constants';
|
|
22
23
|
|
|
23
24
|
type Signature = {
|
|
24
25
|
Args: {
|
|
@@ -44,8 +45,10 @@ export default class RoadSignsTable extends Component<Signature> {
|
|
|
44
45
|
categories = (measureConcept: MobilityMeasureConcept) => {
|
|
45
46
|
const categorySet: Set<string> = new Set();
|
|
46
47
|
for (const signConcept of measureConcept.signConcepts) {
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
if (signConcept.type === SIGN_CONCEPT_TYPES.ROAD_SIGN) {
|
|
49
|
+
const categoryLabels = signConcept.categories.map((cat) => cat.label);
|
|
50
|
+
addAll(categorySet, ...categoryLabels);
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
return [...categorySet].sort();
|
|
51
54
|
};
|
|
@@ -220,13 +220,18 @@ export default class SnippetNode extends Component<Signature> {
|
|
|
220
220
|
/>
|
|
221
221
|
{{else}}
|
|
222
222
|
<div class='say-snippet-card'>
|
|
223
|
-
<div
|
|
223
|
+
<div
|
|
224
|
+
class='say-snippet-title'
|
|
225
|
+
contenteditable='false'
|
|
226
|
+
{{! template-lint-disable no-invalid-interactive }}
|
|
227
|
+
{{on 'click' @selectNode}}
|
|
228
|
+
>
|
|
224
229
|
<span class='au-c-badge au-c-badge--small say-snippet-title-icon'>
|
|
225
230
|
<AuIcon @icon='plus-text' />
|
|
226
231
|
</span>
|
|
227
232
|
{{this.node.attrs.title}}
|
|
228
233
|
</div>
|
|
229
|
-
<div class='say-snippet-
|
|
234
|
+
<div class='say-snippet-body'>
|
|
230
235
|
{{yield}}
|
|
231
236
|
<div class='say-snippet-icons' contenteditable='false'>
|
|
232
237
|
<SnippetButton
|
|
@@ -204,14 +204,28 @@ export default class Structure extends Component<Sig> {
|
|
|
204
204
|
focusInner() {
|
|
205
205
|
this.innerView?.focus();
|
|
206
206
|
}
|
|
207
|
+
selectNode = (event: MouseEvent) => {
|
|
208
|
+
if (
|
|
209
|
+
!(event.target instanceof HTMLElement) ||
|
|
210
|
+
!event.target.classList.contains('say-structure__title')
|
|
211
|
+
) {
|
|
212
|
+
// Only select the node if we're not trying to edit the title...
|
|
213
|
+
this.args.selectNode();
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
|
|
207
217
|
<template>
|
|
208
218
|
<div
|
|
209
219
|
class='say-structure'
|
|
210
220
|
{{didUpdate this.onAttrsUpdate this.titleAttr}}
|
|
211
221
|
{{on 'focus' this.focusInner}}
|
|
212
222
|
>
|
|
213
|
-
<div
|
|
214
|
-
|
|
223
|
+
<div
|
|
224
|
+
class='say-structure__header'
|
|
225
|
+
contenteditable='false'
|
|
226
|
+
{{! template-lint-disable no-invalid-interactive }}
|
|
227
|
+
{{on 'click' this.selectNode}}
|
|
228
|
+
>
|
|
215
229
|
{{#let (element this.headerTag) as |Tag|}}
|
|
216
230
|
<Tag class='say-structure__header-element'><span
|
|
217
231
|
class='say-structure__name'
|
|
@@ -226,9 +240,7 @@ export default class Structure extends Component<Sig> {
|
|
|
226
240
|
</Tag>
|
|
227
241
|
{{/let}}
|
|
228
242
|
</div>
|
|
229
|
-
|
|
230
|
-
{{yield}}
|
|
231
|
-
</div>
|
|
243
|
+
{{yield}}
|
|
232
244
|
</div>
|
|
233
245
|
</template>
|
|
234
246
|
}
|
|
@@ -18,7 +18,13 @@ export class Polygon {
|
|
|
18
18
|
declare uri: string;
|
|
19
19
|
declare locations: GeoPos[];
|
|
20
20
|
constructor(args: Omit<Polygon, 'constructor' | 'formatted'>) {
|
|
21
|
-
|
|
21
|
+
this.uri = args.uri;
|
|
22
|
+
// The start and end points of a polygon should match
|
|
23
|
+
if (isSamePos(args.locations[0], args.locations.at(-1))) {
|
|
24
|
+
this.locations = args.locations;
|
|
25
|
+
} else {
|
|
26
|
+
this.locations = [...args.locations, args.locations[0]];
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
get formatted() {
|
|
@@ -109,6 +115,15 @@ export type GeoPos = {
|
|
|
109
115
|
lambert: Lambert72Coordinates;
|
|
110
116
|
};
|
|
111
117
|
|
|
118
|
+
export function isSamePos(
|
|
119
|
+
a: GeoPos | undefined,
|
|
120
|
+
b: GeoPos | undefined,
|
|
121
|
+
): boolean {
|
|
122
|
+
return (
|
|
123
|
+
!!a && !!b && a.lambert.x === b.lambert.x && a.lambert.y === b.lambert.y
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
112
127
|
export function constructLambert72GMLString({ x, y }: Lambert72Coordinates) {
|
|
113
128
|
return `<gml:Point srsName="http://www.opengis.net/def/crs/EPSG/0/31370" xmlns:gml="http://www.opengis.net/gml/3.2"><gml:pos>${x} ${y}</gml:pos></gml:Point>`;
|
|
114
129
|
}
|
|
@@ -25,7 +25,8 @@ import { buildArticleStructure } from '../../decision-plugin/utils/build-article
|
|
|
25
25
|
import { insertArticle } from '../../decision-plugin/actions/insert-article';
|
|
26
26
|
import { SignConcept } from '../schemas/sign-concept';
|
|
27
27
|
import {
|
|
28
|
-
|
|
28
|
+
ROAD_SIGN_CATEGORIES,
|
|
29
|
+
SIGN_CONCEPT_TYPES,
|
|
29
30
|
SIGN_TYPE_MAPPING,
|
|
30
31
|
SIGN_TYPES,
|
|
31
32
|
ZONALITY_OPTIONS,
|
|
@@ -190,9 +191,28 @@ function constructMeasureBody(
|
|
|
190
191
|
return schema.nodes.paragraph.create({}, nodes);
|
|
191
192
|
}
|
|
192
193
|
|
|
194
|
+
function determineSignLabel(signConcept: SignConcept) {
|
|
195
|
+
switch (signConcept.type) {
|
|
196
|
+
case SIGN_CONCEPT_TYPES.TRAFFIC_LIGHT:
|
|
197
|
+
return 'Verkeerslicht';
|
|
198
|
+
case SIGN_CONCEPT_TYPES.ROAD_MARKING:
|
|
199
|
+
return 'Wegmarkering';
|
|
200
|
+
case SIGN_CONCEPT_TYPES.ROAD_SIGN:
|
|
201
|
+
if (
|
|
202
|
+
signConcept.categories
|
|
203
|
+
.map((cat) => cat.uri)
|
|
204
|
+
.includes(ROAD_SIGN_CATEGORIES.ONDERBORD)
|
|
205
|
+
) {
|
|
206
|
+
return 'Onderbord';
|
|
207
|
+
} else {
|
|
208
|
+
return 'Verkeersbord';
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
193
213
|
function constructSignNode(signConcept: SignConcept, schema: Schema) {
|
|
194
214
|
const signUri = `http://data.lblod.info/verkeerstekens/${uuid()}`;
|
|
195
|
-
const prefix =
|
|
215
|
+
const prefix = determineSignLabel(signConcept);
|
|
196
216
|
const node = schema.nodes.inline_rdfa.create(
|
|
197
217
|
{
|
|
198
218
|
rdfaNodeType: 'resource',
|
|
@@ -29,9 +29,25 @@ export const SIGN_TYPE_MAPPING = {
|
|
|
29
29
|
[SIGN_CONCEPT_TYPES.ROAD_MARKING]: SIGN_TYPES.ROAD_MARKING,
|
|
30
30
|
} as const;
|
|
31
31
|
|
|
32
|
-
export const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
export const ROAD_SIGN_CATEGORIES = {
|
|
33
|
+
XXBORD:
|
|
34
|
+
'https://data.vlaanderen.be/id/concept/Verkeersbordcategorie/ae1b7231-1f31-492d-947a-25fc5d114492',
|
|
35
|
+
'XX-AWVBORD':
|
|
36
|
+
'https://data.vlaanderen.be/id/concept/Verkeersbordcategorie/8e302648-0eca-478b-8b48-67c3b0e39c0a',
|
|
37
|
+
GEVAARSBORD:
|
|
38
|
+
'http://data.vlaanderen.be/id/concept/Verkeersbordcategorie/2982567006d9e19f04063df73123f56f40e3a28941031a7ba6e6667f64740fa9',
|
|
39
|
+
STILSTAANPARKEERBORD:
|
|
40
|
+
'http://data.vlaanderen.be/id/concept/Verkeersbordcategorie/29ea3335e357e414d07229242607b352941c0c21e78760600cc0f5270f18c38b',
|
|
41
|
+
VOORRANGSBORD:
|
|
42
|
+
'http://data.vlaanderen.be/id/concept/Verkeersbordcategorie/737da5751bc7f311398a834f34df310dd95255a0b62afa2db2882c72d54b47d2',
|
|
43
|
+
ZONEBORD:
|
|
44
|
+
'http://data.vlaanderen.be/id/concept/Verkeersbordcategorie/86a67f3cba6512ae10c4b9b09ba35d8c80109189b44d37e848858af9efb37019',
|
|
45
|
+
VERBODSBORD:
|
|
46
|
+
'http://data.vlaanderen.be/id/concept/Verkeersbordcategorie/955a9adc73d076a2a424754cd540b73da8d15fb002ab6c9f115d080edddb57e8',
|
|
47
|
+
ONDERBORD:
|
|
48
|
+
'http://data.vlaanderen.be/id/concept/Verkeersbordcategorie/991b04b477b77bc7cf1414fb5d255cc4435dd9c1681e8de66f770710c1c83ad0',
|
|
49
|
+
GEBODSBORD:
|
|
50
|
+
'http://data.vlaanderen.be/id/concept/Verkeersbordcategorie/9d84069e70f192b7a474d02f07687bc3343ee324207ad9e093c0b2f5def647f8',
|
|
51
|
+
AANWIJSBORD:
|
|
52
|
+
'http://data.vlaanderen.be/id/concept/Verkeersbordcategorie/9ea8f8b421343370d20a8bd45d6226aadc48125bda8ddbbeeb53d99f181ee05a',
|
|
53
|
+
};
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
BindingObject,
|
|
3
3
|
executeQuery,
|
|
4
4
|
objectify,
|
|
5
|
+
sparqlEscapeUri,
|
|
5
6
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/sparql-helpers';
|
|
6
7
|
import {
|
|
7
8
|
RoadSignCategory,
|
|
@@ -10,16 +11,18 @@ import {
|
|
|
10
11
|
|
|
11
12
|
type QueryOptions = {
|
|
12
13
|
abortSignal?: AbortSignal;
|
|
14
|
+
roadSignConceptUri?: string;
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export default async function queryRoadSignCategories(
|
|
16
18
|
endpoint: string,
|
|
17
19
|
options: QueryOptions = {},
|
|
18
20
|
) {
|
|
19
|
-
const { abortSignal } = options;
|
|
21
|
+
const { abortSignal, roadSignConceptUri } = options;
|
|
20
22
|
const query = /* sparql */ `
|
|
21
23
|
PREFIX mobiliteit: <https://data.vlaanderen.be/ns/mobiliteit#>
|
|
22
24
|
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
25
|
+
PREFIX dct: <http://purl.org/dc/terms/>
|
|
23
26
|
|
|
24
27
|
SELECT DISTINCT
|
|
25
28
|
?uri
|
|
@@ -27,6 +30,8 @@ export default async function queryRoadSignCategories(
|
|
|
27
30
|
WHERE {
|
|
28
31
|
?uri a mobiliteit:Verkeersbordcategorie;
|
|
29
32
|
skos:prefLabel ?label.
|
|
33
|
+
|
|
34
|
+
${roadSignConceptUri ? `${sparqlEscapeUri(roadSignConceptUri)} dct:type ?uri` : ''}
|
|
30
35
|
}
|
|
31
36
|
`;
|
|
32
37
|
const queryResult = await executeQuery<BindingObject<RoadSignCategory>>({
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
sparqlEscapeUri,
|
|
7
7
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/sparql-helpers';
|
|
8
8
|
import { SignConcept, SignConceptSchema } from '../schemas/sign-concept';
|
|
9
|
+
import queryRoadSignCategories from './road-sign-category';
|
|
10
|
+
import { SIGN_CONCEPT_TYPES } from '../constants';
|
|
9
11
|
|
|
10
12
|
type QueryOptions = {
|
|
11
13
|
imageBaseUrl?: string;
|
|
@@ -31,7 +33,6 @@ export async function querySignConcepts(
|
|
|
31
33
|
?code
|
|
32
34
|
?zonality
|
|
33
35
|
(CONCAT(${sparqlEscapeString(imageBaseUrl ?? '')}, "/files/", ?imageId, "/download") AS ?image)
|
|
34
|
-
(GROUP_CONCAT(?classification; SEPARATOR="|") AS ?classifications)
|
|
35
36
|
WHERE {
|
|
36
37
|
?uri
|
|
37
38
|
a mobiliteit:Verkeerstekenconcept;
|
|
@@ -44,9 +45,6 @@ export async function querySignConcepts(
|
|
|
44
45
|
OPTIONAL {
|
|
45
46
|
?uri ext:zonality ?zonality.
|
|
46
47
|
}
|
|
47
|
-
OPTIONAL {
|
|
48
|
-
?uri dct:type/skos:prefLabel ?classification.
|
|
49
|
-
}
|
|
50
48
|
|
|
51
49
|
VALUES ?type {
|
|
52
50
|
<https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept>
|
|
@@ -63,13 +61,21 @@ export async function querySignConcepts(
|
|
|
63
61
|
abortSignal,
|
|
64
62
|
});
|
|
65
63
|
const bindings = queryResult.results.bindings;
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
const concepts = SignConceptSchema.array().parse(bindings.map(objectify));
|
|
65
|
+
const conceptsWithCategories = await Promise.all(
|
|
66
|
+
concepts.map(async (concept) => {
|
|
67
|
+
if (concept.type === SIGN_CONCEPT_TYPES.ROAD_SIGN) {
|
|
68
|
+
const categories = await queryRoadSignCategories(endpoint, {
|
|
69
|
+
roadSignConceptUri: concept.uri,
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
...concept,
|
|
73
|
+
categories,
|
|
74
|
+
};
|
|
75
|
+
} else {
|
|
76
|
+
return concept;
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
80
|
+
return conceptsWithCategories;
|
|
75
81
|
}
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SIGN_CONCEPT_TYPES, ZONALITY_OPTIONS } from '../constants';
|
|
3
|
+
import { RoadSignCategorySchema } from './road-sign-category';
|
|
3
4
|
|
|
4
|
-
export const SignConceptSchema = z
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export const SignConceptSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
uri: z.string(),
|
|
8
|
+
code: z.string(),
|
|
9
|
+
image: z.string(),
|
|
10
|
+
zonality: z.nativeEnum(ZONALITY_OPTIONS).optional(),
|
|
11
|
+
})
|
|
12
|
+
.and(
|
|
13
|
+
z.discriminatedUnion('type', [
|
|
14
|
+
z.object({
|
|
15
|
+
type: z.literal(SIGN_CONCEPT_TYPES.ROAD_SIGN),
|
|
16
|
+
categories: z.array(RoadSignCategorySchema).default([]),
|
|
17
|
+
}),
|
|
18
|
+
z.object({
|
|
19
|
+
type: z.enum([
|
|
20
|
+
SIGN_CONCEPT_TYPES.ROAD_MARKING,
|
|
21
|
+
SIGN_CONCEPT_TYPES.TRAFFIC_LIGHT,
|
|
22
|
+
]),
|
|
23
|
+
}),
|
|
24
|
+
]),
|
|
25
|
+
);
|
|
12
26
|
|
|
13
27
|
export type SignConcept = z.infer<typeof SignConceptSchema>;
|
|
@@ -175,6 +175,7 @@ const emberNodeConfig = (options: SnippetPluginConfig): EmberNodeConfig => ({
|
|
|
175
175
|
allowMultipleSnippets: { default: false },
|
|
176
176
|
},
|
|
177
177
|
component: SnippetComponent,
|
|
178
|
+
contentDomClassNames: ['say-snippet-content'],
|
|
178
179
|
content: options.allowedContent || DEFAULT_CONTENT_STRING,
|
|
179
180
|
serialize(node) {
|
|
180
181
|
const listNames = node.attrs.snippetListNames as string[];
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { Command } from '@lblod/ember-rdfa-editor';
|
|
2
|
-
import { transactionCombinator } from '@lblod/ember-rdfa-editor/utils/transaction-utils';
|
|
3
2
|
import {
|
|
4
3
|
type StructurePluginOptions,
|
|
5
4
|
type StructureType,
|
|
6
5
|
} from '../../structure-plugin/structure-types';
|
|
7
|
-
import { recalculateNumbers } from '../monads/recalculate-structure-numbers';
|
|
8
6
|
import { findHowToInsertStructure } from '../monads/insert-structure';
|
|
9
|
-
import { regenerateRdfaLinks } from '../monads/regenerate-rdfa-links';
|
|
10
7
|
import { closeHistory } from '@lblod/ember-rdfa-editor/plugins/history';
|
|
11
8
|
|
|
12
9
|
export const insertStructure = (
|
|
@@ -14,14 +11,13 @@ export const insertStructure = (
|
|
|
14
11
|
uriGenerator: Required<StructurePluginOptions>['uriGenerator'],
|
|
15
12
|
): Command => {
|
|
16
13
|
return (state, dispatch) => {
|
|
17
|
-
const { result, transaction } =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
]);
|
|
14
|
+
const { result, transaction } = findHowToInsertStructure(
|
|
15
|
+
structureType,
|
|
16
|
+
uriGenerator,
|
|
17
|
+
)(state, { sayIsDryRun: !dispatch });
|
|
22
18
|
|
|
23
19
|
transaction.scrollIntoView();
|
|
24
|
-
if (result
|
|
20
|
+
if (result) {
|
|
25
21
|
if (dispatch) {
|
|
26
22
|
// makes sure each structure insertion is undoable, even when quickly
|
|
27
23
|
// creating a bunch of them
|
|
@@ -42,8 +42,12 @@ import {
|
|
|
42
42
|
Option,
|
|
43
43
|
isSome,
|
|
44
44
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
|
|
45
|
+
import { recalculateNumbers } from './monads/recalculate-structure-numbers';
|
|
46
|
+
import { regenerateRdfaLinks } from './monads/regenerate-rdfa-links';
|
|
47
|
+
import { NodeSpecOnChanged } from '@lblod/ember-rdfa-editor/plugins/on-changed/plugin';
|
|
45
48
|
|
|
46
49
|
const rdfaAware = true;
|
|
50
|
+
const parser = new DOMParser();
|
|
47
51
|
|
|
48
52
|
const PARAGRAPH_SYMBOL = '§';
|
|
49
53
|
|
|
@@ -111,13 +115,20 @@ function buildTocEntry(node: PNode, state: EditorState) {
|
|
|
111
115
|
}
|
|
112
116
|
}
|
|
113
117
|
|
|
114
|
-
const
|
|
118
|
+
const onChanged: NodeSpecOnChanged = {
|
|
119
|
+
doOnce: true,
|
|
120
|
+
monadGenerator: () => {
|
|
121
|
+
return [recalculateNumbers, regenerateRdfaLinks];
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
|
|
115
125
|
export const emberNodeConfig: (
|
|
116
126
|
config?: StructurePluginOptions,
|
|
117
127
|
) => EmberNodeConfig = (config) => {
|
|
118
128
|
return {
|
|
119
129
|
name: 'structure',
|
|
120
130
|
component: Structure as unknown as ComponentLike,
|
|
131
|
+
contentDomClassNames: ['say-structure__content'],
|
|
121
132
|
inline: false,
|
|
122
133
|
group: 'block structure',
|
|
123
134
|
content: 'block+',
|
|
@@ -127,6 +138,29 @@ export const emberNodeConfig: (
|
|
|
127
138
|
atom: false,
|
|
128
139
|
editable: rdfaAware,
|
|
129
140
|
tocEntry: buildTocEntry,
|
|
141
|
+
// This stopEvent would prevent the issue where a cursor jumps temporarily inside a structure
|
|
142
|
+
// when it is selected (unless it's inside one that is already selected).
|
|
143
|
+
// Unfortunately, this has the side-effect that if a structure title anywhere in the document
|
|
144
|
+
// is selected, when any structure name is clicked, the selection remains where it is instead
|
|
145
|
+
// of moving. Due to the complexity of detecting this situation it seems better to leave the
|
|
146
|
+
// weird visual bug in place.
|
|
147
|
+
// stopEvent(event) {
|
|
148
|
+
// // Prevent mousedown events from jumping focus inside the ember-node temporarily when
|
|
149
|
+
// // selecting by clicking on the title
|
|
150
|
+
// if (event.type === 'mousedown') {
|
|
151
|
+
// const target = event.target;
|
|
152
|
+
// if (
|
|
153
|
+
// target instanceof HTMLElement &&
|
|
154
|
+
// (target.className.includes('say-structure__header') ||
|
|
155
|
+
// target.className.includes('say-structure__name'))
|
|
156
|
+
// ) {
|
|
157
|
+
// event.preventDefault();
|
|
158
|
+
// return true;
|
|
159
|
+
// }
|
|
160
|
+
// }
|
|
161
|
+
// // Follow default stopEvent logic
|
|
162
|
+
// return null;
|
|
163
|
+
// },
|
|
130
164
|
attrs: {
|
|
131
165
|
...rdfaAttrSpec({ rdfaAware }),
|
|
132
166
|
|
|
@@ -165,6 +199,7 @@ export const emberNodeConfig: (
|
|
|
165
199
|
: config?.onlyArticleSpecialName,
|
|
166
200
|
},
|
|
167
201
|
},
|
|
202
|
+
onChanged,
|
|
168
203
|
serialize(node: PNode, state: EditorState) {
|
|
169
204
|
const tag = node.attrs.headerTag;
|
|
170
205
|
const structureType = node.attrs.structureType as StructureType;
|
|
@@ -272,7 +307,7 @@ export const emberNodeConfig: (
|
|
|
272
307
|
headerSpec,
|
|
273
308
|
[
|
|
274
309
|
'div',
|
|
275
|
-
{ property: SAY('body').full, datatype: RDF('
|
|
310
|
+
{ property: SAY('body').full, datatype: RDF('HTML').full },
|
|
276
311
|
0,
|
|
277
312
|
],
|
|
278
313
|
],
|
|
@@ -22,6 +22,7 @@ export const emberNodeConfig: () => EmberNodeConfig = () => {
|
|
|
22
22
|
return {
|
|
23
23
|
name: 'template-comment',
|
|
24
24
|
component: TemplateCommentsComponent as unknown as ComponentLike,
|
|
25
|
+
contentDomClassNames: ['say-template-comment-content'],
|
|
25
26
|
inline: false,
|
|
26
27
|
group: 'block',
|
|
27
28
|
content: 'block+',
|
|
@@ -97,18 +97,25 @@
|
|
|
97
97
|
padding: 5px;
|
|
98
98
|
border-bottom: 1px solid var(--au-blue-300);
|
|
99
99
|
color: var(--au-blue-700);
|
|
100
|
+
cursor: pointer;
|
|
100
101
|
.say-snippet-title-icon {
|
|
101
102
|
background-color: var(--au-blue-300);
|
|
102
103
|
color: black;
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
|
|
106
|
+
|
|
107
|
+
.say-snippet-body {
|
|
106
108
|
position: relative;
|
|
109
|
+
margin-top: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.say-snippet-content {
|
|
107
113
|
padding: 20px;
|
|
108
114
|
min-height: 100px;
|
|
109
115
|
padding-right: 50px;
|
|
110
116
|
margin-top: 0;
|
|
111
117
|
}
|
|
118
|
+
|
|
112
119
|
.say-snippet-icons {
|
|
113
120
|
display: flex;
|
|
114
121
|
width: fit-content;
|
|
@@ -152,6 +159,18 @@
|
|
|
152
159
|
}
|
|
153
160
|
}
|
|
154
161
|
}
|
|
162
|
+
.ProseMirror-selectednode {
|
|
163
|
+
.say-snippet-content {
|
|
164
|
+
background-color: var(--au-blue-200);
|
|
165
|
+
}
|
|
166
|
+
.say-snippet-title {
|
|
167
|
+
background-color: var(--au-blue-300);
|
|
168
|
+
}
|
|
169
|
+
// Only grab if this exact snippet is selected
|
|
170
|
+
& > .say-snippet-card > .say-snippet-title {
|
|
171
|
+
cursor: grab;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
155
174
|
|
|
156
175
|
.ember-node.say-active:has(> .say-snippet-card) {
|
|
157
176
|
outline: none;
|
|
@@ -173,6 +192,7 @@
|
|
|
173
192
|
background-color: var(--au-orange-300);
|
|
174
193
|
border-radius: var(--au-radius);
|
|
175
194
|
border: 0.1rem solid var(--au-orange-500);
|
|
195
|
+
cursor: pointer;
|
|
176
196
|
|
|
177
197
|
.say-snippet-placeholder__icon {
|
|
178
198
|
background-color: var(--au-orange-500);
|
|
@@ -204,6 +224,7 @@
|
|
|
204
224
|
|
|
205
225
|
.ProseMirror-selectednode > .say-snippet-placeholder {
|
|
206
226
|
background-color: var(--au-blue-200);
|
|
227
|
+
cursor: grab;
|
|
207
228
|
}
|
|
208
229
|
|
|
209
230
|
.say-snippet-placeholder-node {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
padding-left: 0.7rem;
|
|
13
13
|
border-bottom: 1px solid var(--au-gray-300);
|
|
14
14
|
border-radius: 0.1em 0.1em 0 0;
|
|
15
|
+
cursor: pointer;
|
|
15
16
|
|
|
16
17
|
.say-structure__header-element {
|
|
17
18
|
margin: 0;
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
.say-structure__title {
|
|
32
33
|
flex: 1 1 100%;
|
|
33
34
|
|
|
35
|
+
cursor: text;
|
|
34
36
|
border: none;
|
|
35
37
|
flex-grow: 1;
|
|
36
38
|
display: inline-block;
|
|
@@ -71,10 +73,11 @@
|
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
.say-structure >
|
|
76
|
+
.say-structure > [data-slot] {
|
|
75
77
|
margin-top: 0;
|
|
76
78
|
}
|
|
77
79
|
.say-structure__content {
|
|
80
|
+
margin-top: 0;
|
|
78
81
|
padding: 0.7rem;
|
|
79
82
|
padding-right: 3rem;
|
|
80
83
|
|
|
@@ -98,3 +101,20 @@
|
|
|
98
101
|
border-bottom-width: 0.2rem;
|
|
99
102
|
}
|
|
100
103
|
}
|
|
104
|
+
|
|
105
|
+
// Don't highlight the whole node as selected if we're editing the title
|
|
106
|
+
.ember-node.ProseMirror-selectednode
|
|
107
|
+
> .say-structure:not(:has(.ProseMirror-focused)) {
|
|
108
|
+
background-color: var(--au-blue-200);
|
|
109
|
+
|
|
110
|
+
> .say-structure__header {
|
|
111
|
+
background-color: var(--au-blue-300);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
> .say-structure__header {
|
|
115
|
+
cursor: grab;
|
|
116
|
+
.say-structure__header {
|
|
117
|
+
cursor: text;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -84,14 +84,20 @@ export default class RoadsignsModal extends Component<Signature> {
|
|
|
84
84
|
zonality: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
|
|
85
85
|
preview: string;
|
|
86
86
|
variableSignage: boolean;
|
|
87
|
-
signConcepts: {
|
|
88
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
87
|
+
signConcepts: ({
|
|
89
88
|
code: string;
|
|
90
89
|
image: string;
|
|
91
90
|
uri: string;
|
|
92
|
-
classifications: string[];
|
|
93
91
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
94
|
-
}
|
|
92
|
+
} & ({
|
|
93
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
94
|
+
categories: {
|
|
95
|
+
label: string;
|
|
96
|
+
uri: string;
|
|
97
|
+
}[];
|
|
98
|
+
} | {
|
|
99
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
100
|
+
}))[];
|
|
95
101
|
}[];
|
|
96
102
|
count: number;
|
|
97
103
|
}>>;
|
|
@@ -105,14 +111,20 @@ export default class RoadsignsModal extends Component<Signature> {
|
|
|
105
111
|
zonality: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
|
|
106
112
|
preview: string;
|
|
107
113
|
variableSignage: boolean;
|
|
108
|
-
signConcepts: {
|
|
109
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
114
|
+
signConcepts: ({
|
|
110
115
|
code: string;
|
|
111
116
|
image: string;
|
|
112
117
|
uri: string;
|
|
113
|
-
classifications: string[];
|
|
114
118
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
115
|
-
}
|
|
119
|
+
} & ({
|
|
120
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
121
|
+
categories: {
|
|
122
|
+
label: string;
|
|
123
|
+
uri: string;
|
|
124
|
+
}[];
|
|
125
|
+
} | {
|
|
126
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
127
|
+
}))[];
|
|
116
128
|
}[] | undefined;
|
|
117
129
|
get measureConceptCount(): number | undefined;
|
|
118
130
|
insertMeasure: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, (concept: MobilityMeasureConcept, zonality: typeof ZONALITY_OPTIONS.ZONAL | typeof ZONALITY_OPTIONS.NON_ZONAL, temporal: boolean) => Promise<void>>;
|
|
@@ -63,6 +63,7 @@ export type GeoPos = {
|
|
|
63
63
|
global?: GlobalCoordinates;
|
|
64
64
|
lambert: Lambert72Coordinates;
|
|
65
65
|
};
|
|
66
|
+
export declare function isSamePos(a: GeoPos | undefined, b: GeoPos | undefined): boolean;
|
|
66
67
|
export declare function constructLambert72GMLString({ x, y }: Lambert72Coordinates): string;
|
|
67
68
|
/**
|
|
68
69
|
* Use a regex to parse a simple point as a GML string and return the coordinates.
|
|
@@ -21,9 +21,15 @@ export declare const SIGN_TYPE_MAPPING: {
|
|
|
21
21
|
readonly "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept": "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslicht";
|
|
22
22
|
readonly "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept": "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkering";
|
|
23
23
|
};
|
|
24
|
-
export declare const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export declare const ROAD_SIGN_CATEGORIES: {
|
|
25
|
+
XXBORD: string;
|
|
26
|
+
'XX-AWVBORD': string;
|
|
27
|
+
GEVAARSBORD: string;
|
|
28
|
+
STILSTAANPARKEERBORD: string;
|
|
29
|
+
VOORRANGSBORD: string;
|
|
30
|
+
ZONEBORD: string;
|
|
31
|
+
VERBODSBORD: string;
|
|
32
|
+
ONDERBORD: string;
|
|
33
|
+
GEBODSBORD: string;
|
|
34
|
+
AANWIJSBORD: string;
|
|
29
35
|
};
|
package/declarations/addon/plugins/roadsign-regulation-plugin/queries/mobility-measure-concept.d.ts
CHANGED
|
@@ -16,14 +16,20 @@ export declare function queryMobilityMeasures(endpoint: string, options?: Omit<Q
|
|
|
16
16
|
zonality: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
|
|
17
17
|
preview: string;
|
|
18
18
|
variableSignage: boolean;
|
|
19
|
-
signConcepts: {
|
|
20
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
19
|
+
signConcepts: ({
|
|
21
20
|
code: string;
|
|
22
21
|
image: string;
|
|
23
22
|
uri: string;
|
|
24
|
-
classifications: string[];
|
|
25
23
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
26
|
-
}
|
|
24
|
+
} & ({
|
|
25
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
26
|
+
categories: {
|
|
27
|
+
label: string;
|
|
28
|
+
uri: string;
|
|
29
|
+
}[];
|
|
30
|
+
} | {
|
|
31
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
32
|
+
}))[];
|
|
27
33
|
}[]>;
|
|
28
34
|
export declare function countMobilityMeasures(endpoint: string, options?: Omit<QueryOptions, 'count' | 'page' | 'pageSize'>): Promise<number>;
|
|
29
35
|
export {};
|
|
@@ -3,12 +3,22 @@ type QueryOptions = {
|
|
|
3
3
|
measureConceptUri?: string;
|
|
4
4
|
abortSignal?: AbortSignal;
|
|
5
5
|
};
|
|
6
|
-
export declare function querySignConcepts(endpoint: string, options?: QueryOptions): Promise<{
|
|
7
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
6
|
+
export declare function querySignConcepts(endpoint: string, options?: QueryOptions): Promise<(({
|
|
8
7
|
code: string;
|
|
9
8
|
image: string;
|
|
10
9
|
uri: string;
|
|
11
|
-
classifications: string[];
|
|
12
10
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
13
|
-
}
|
|
11
|
+
} & {
|
|
12
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
13
|
+
}) | {
|
|
14
|
+
categories: {
|
|
15
|
+
label: string;
|
|
16
|
+
uri: string;
|
|
17
|
+
}[];
|
|
18
|
+
code: string;
|
|
19
|
+
image: string;
|
|
20
|
+
uri: string;
|
|
21
|
+
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
22
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
23
|
+
})[]>;
|
|
14
24
|
export {};
|
package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/mobility-measure-concept.d.ts
CHANGED
|
@@ -9,64 +9,95 @@ export declare const MobilityMeasureConceptSchema: z.ZodObject<{
|
|
|
9
9
|
readonly NON_ZONAL: "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
|
|
10
10
|
}>;
|
|
11
11
|
variableSignage: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
-
signConcepts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12
|
+
signConcepts: z.ZodDefault<z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
13
13
|
uri: z.ZodString;
|
|
14
14
|
code: z.ZodString;
|
|
15
|
-
type: z.ZodNativeEnum<{
|
|
16
|
-
readonly TRAFFIC_SIGN: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept";
|
|
17
|
-
readonly ROAD_SIGN: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
18
|
-
readonly TRAFFIC_LIGHT: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept";
|
|
19
|
-
readonly ROAD_MARKING: "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
20
|
-
}>;
|
|
21
15
|
image: z.ZodString;
|
|
22
|
-
classifications: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
23
16
|
zonality: z.ZodOptional<z.ZodNativeEnum<{
|
|
24
17
|
readonly POTENTIALLY_ZONAL: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f";
|
|
25
18
|
readonly ZONAL: "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d";
|
|
26
19
|
readonly NON_ZONAL: "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
|
|
27
20
|
}>>;
|
|
28
21
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
30
22
|
code: string;
|
|
31
23
|
image: string;
|
|
32
24
|
uri: string;
|
|
33
|
-
classifications: string[];
|
|
34
25
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
35
26
|
}, {
|
|
36
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
37
27
|
code: string;
|
|
38
28
|
image: string;
|
|
39
29
|
uri: string;
|
|
40
|
-
classifications?: string[] | undefined;
|
|
41
30
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
42
|
-
}>, "
|
|
31
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept">;
|
|
33
|
+
categories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
34
|
+
uri: z.ZodString;
|
|
35
|
+
label: z.ZodString;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
label: string;
|
|
38
|
+
uri: string;
|
|
39
|
+
}, {
|
|
40
|
+
label: string;
|
|
41
|
+
uri: string;
|
|
42
|
+
}>, "many">>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
45
|
+
categories: {
|
|
46
|
+
label: string;
|
|
47
|
+
uri: string;
|
|
48
|
+
}[];
|
|
49
|
+
}, {
|
|
50
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
51
|
+
categories?: {
|
|
52
|
+
label: string;
|
|
53
|
+
uri: string;
|
|
54
|
+
}[] | undefined;
|
|
55
|
+
}>, z.ZodObject<{
|
|
56
|
+
type: z.ZodEnum<["https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept", "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept"]>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
59
|
+
}, {
|
|
60
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
61
|
+
}>]>>, "many">>;
|
|
43
62
|
}, "strip", z.ZodTypeAny, {
|
|
44
63
|
label: string;
|
|
45
64
|
uri: string;
|
|
46
65
|
zonality: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
|
|
47
66
|
preview: string;
|
|
48
67
|
variableSignage: boolean;
|
|
49
|
-
signConcepts: {
|
|
50
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
68
|
+
signConcepts: ({
|
|
51
69
|
code: string;
|
|
52
70
|
image: string;
|
|
53
71
|
uri: string;
|
|
54
|
-
classifications: string[];
|
|
55
72
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
56
|
-
}
|
|
73
|
+
} & ({
|
|
74
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
75
|
+
categories: {
|
|
76
|
+
label: string;
|
|
77
|
+
uri: string;
|
|
78
|
+
}[];
|
|
79
|
+
} | {
|
|
80
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
81
|
+
}))[];
|
|
57
82
|
}, {
|
|
58
83
|
label: string;
|
|
59
84
|
uri: string;
|
|
60
85
|
zonality: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
|
|
61
86
|
preview: string;
|
|
62
87
|
variableSignage?: boolean | undefined;
|
|
63
|
-
signConcepts?: {
|
|
64
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
88
|
+
signConcepts?: ({
|
|
65
89
|
code: string;
|
|
66
90
|
image: string;
|
|
67
91
|
uri: string;
|
|
68
|
-
classifications?: string[] | undefined;
|
|
69
92
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
70
|
-
}
|
|
93
|
+
} & ({
|
|
94
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
95
|
+
categories?: {
|
|
96
|
+
label: string;
|
|
97
|
+
uri: string;
|
|
98
|
+
}[] | undefined;
|
|
99
|
+
} | {
|
|
100
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
101
|
+
}))[] | undefined;
|
|
71
102
|
}>;
|
|
72
103
|
export type MobilityMeasureConcept = z.infer<typeof MobilityMeasureConceptSchema>;
|
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const SignConceptSchema: z.ZodObject<{
|
|
2
|
+
export declare const SignConceptSchema: z.ZodIntersection<z.ZodObject<{
|
|
3
3
|
uri: z.ZodString;
|
|
4
4
|
code: z.ZodString;
|
|
5
|
-
type: z.ZodNativeEnum<{
|
|
6
|
-
readonly TRAFFIC_SIGN: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept";
|
|
7
|
-
readonly ROAD_SIGN: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
8
|
-
readonly TRAFFIC_LIGHT: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept";
|
|
9
|
-
readonly ROAD_MARKING: "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
10
|
-
}>;
|
|
11
5
|
image: z.ZodString;
|
|
12
|
-
classifications: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
13
6
|
zonality: z.ZodOptional<z.ZodNativeEnum<{
|
|
14
7
|
readonly POTENTIALLY_ZONAL: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f";
|
|
15
8
|
readonly ZONAL: "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d";
|
|
16
9
|
readonly NON_ZONAL: "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
|
|
17
10
|
}>>;
|
|
18
11
|
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
20
12
|
code: string;
|
|
21
13
|
image: string;
|
|
22
14
|
uri: string;
|
|
23
|
-
classifications: string[];
|
|
24
15
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
25
16
|
}, {
|
|
26
|
-
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerstekenconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
27
17
|
code: string;
|
|
28
18
|
image: string;
|
|
29
19
|
uri: string;
|
|
30
|
-
classifications?: string[] | undefined;
|
|
31
20
|
zonality?: "http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f" | "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d" | "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc" | undefined;
|
|
32
|
-
}
|
|
21
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept">;
|
|
23
|
+
categories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
24
|
+
uri: z.ZodString;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
label: string;
|
|
28
|
+
uri: string;
|
|
29
|
+
}, {
|
|
30
|
+
label: string;
|
|
31
|
+
uri: string;
|
|
32
|
+
}>, "many">>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
35
|
+
categories: {
|
|
36
|
+
label: string;
|
|
37
|
+
uri: string;
|
|
38
|
+
}[];
|
|
39
|
+
}, {
|
|
40
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
|
|
41
|
+
categories?: {
|
|
42
|
+
label: string;
|
|
43
|
+
uri: string;
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
}>, z.ZodObject<{
|
|
46
|
+
type: z.ZodEnum<["https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept", "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept"]>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
49
|
+
}, {
|
|
50
|
+
type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
|
|
51
|
+
}>]>>;
|
|
33
52
|
export type SignConcept = z.infer<typeof SignConceptSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lblod/ember-rdfa-editor-lblod-plugins",
|
|
3
|
-
"version": "32.0.
|
|
3
|
+
"version": "32.1.0-dev.57d72b6f4f4d02524f5e6e7e1256c11f3ee026d4",
|
|
4
4
|
"description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@glint/template": "^1.5.0",
|
|
110
110
|
"@graphy/content.ttl.write": "^4.3.7",
|
|
111
111
|
"@graphy/memory.dataset.fast": "4.3.3",
|
|
112
|
-
"@lblod/ember-rdfa-editor": "12.
|
|
112
|
+
"@lblod/ember-rdfa-editor": "12.9.0",
|
|
113
113
|
"@rdfjs/types": "^1.1.0",
|
|
114
114
|
"@release-it/keep-a-changelog": "^4.0.0",
|
|
115
115
|
"@tsconfig/ember": "^3.0.8",
|
package/pnpm-lock.yaml
CHANGED
|
@@ -181,8 +181,8 @@ importers:
|
|
|
181
181
|
specifier: 4.3.3
|
|
182
182
|
version: 4.3.3
|
|
183
183
|
'@lblod/ember-rdfa-editor':
|
|
184
|
-
specifier: 12.
|
|
185
|
-
version: 12.
|
|
184
|
+
specifier: 12.9.0
|
|
185
|
+
version: 12.9.0(uyopq47zhjkpyroiqgd3grmn6i)
|
|
186
186
|
'@rdfjs/types':
|
|
187
187
|
specifier: ^1.1.0
|
|
188
188
|
version: 1.1.0
|
|
@@ -1708,8 +1708,8 @@ packages:
|
|
|
1708
1708
|
'@jridgewell/trace-mapping@0.3.25':
|
|
1709
1709
|
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
|
|
1710
1710
|
|
|
1711
|
-
'@lblod/ember-rdfa-editor@12.
|
|
1712
|
-
resolution: {integrity: sha512-
|
|
1711
|
+
'@lblod/ember-rdfa-editor@12.9.0':
|
|
1712
|
+
resolution: {integrity: sha512-T455Dtygw/IhCUn0a8mf+e8CUf7cI4hGY/oEa6+riGCXyOyfpH4/dZ0d5XSA34LjBnqzImG6wmhk9ws1iQYcPg==}
|
|
1713
1713
|
peerDependencies:
|
|
1714
1714
|
'@appuniversum/ember-appuniversum': ^3.5.0
|
|
1715
1715
|
'@ember/test-helpers': ^2.9.4 || ^3.2.1 || ^4.0.2 || ^5.0.0
|
|
@@ -11928,7 +11928,7 @@ snapshots:
|
|
|
11928
11928
|
'@jridgewell/resolve-uri': 3.1.2
|
|
11929
11929
|
'@jridgewell/sourcemap-codec': 1.4.15
|
|
11930
11930
|
|
|
11931
|
-
'@lblod/ember-rdfa-editor@12.
|
|
11931
|
+
'@lblod/ember-rdfa-editor@12.9.0(uyopq47zhjkpyroiqgd3grmn6i)':
|
|
11932
11932
|
dependencies:
|
|
11933
11933
|
'@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)
|
|
11934
11934
|
'@codemirror/commands': 6.6.0
|