@lblod/ember-rdfa-editor-lblod-plugins 32.5.2 → 32.5.3-dev.169415abb930b020c0d7624cfb5197bd21e4d9c7

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.
@@ -0,0 +1,5 @@
1
+ ---
2
+ '@lblod/ember-rdfa-editor-lblod-plugins': patch
3
+ ---
4
+
5
+ Do not auto-focus variables unless they only contain a placeholder
@@ -0,0 +1,5 @@
1
+ ---
2
+ '@lblod/ember-rdfa-editor-lblod-plugins': minor
3
+ ---
4
+
5
+ Order traffic signals of a mobility measure based on their position
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @lblod/ember-rdfa-editor-lblod-plugins
2
2
 
3
+ ## 32.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#594](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/594) [`b732735`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/b732735c373e2cec7bb4ccce6974cc0934ae1f99) Thanks [@abeforgit](https://github.com/abeforgit)! - Fix parsing of articles
8
+
9
+ - [#595](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/595) [`eb0aea2`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/eb0aea28d0887ef5274aba72c6f6a7daa02aca24) Thanks [@piemonkey](https://github.com/piemonkey)! - Fix parsing of oslo locations to no longer incorrectly catch non-locations
10
+
11
+ - [#596](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/596) [`ece607c`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/ece607cf50f6480277f9b47893df71fbb85e4b82) Thanks [@piemonkey](https://github.com/piemonkey)! - Correctly parse the subject URI of roadsign_regulation nodes
12
+
3
13
  ## 32.5.2
4
14
 
5
15
  ### Patch Changes
@@ -28,8 +28,6 @@ export default class VariableNodeViewComponent extends Component<EmberNodeArgs>
28
28
  this.innerView?.dispatch(tr);
29
29
  }
30
30
  });
31
- } else {
32
- this.innerView.focus();
33
31
  }
34
32
  }
35
33
  }
@@ -109,13 +109,15 @@ const parseDOM = (config: LocationPluginConfig): TagParseRule[] => {
109
109
  nodeContentsUtils.address.parse(contentContainer.children[0]) ||
110
110
  nodeContentsUtils.place.parse(contentContainer.children[0]) ||
111
111
  nodeContentsUtils.area.parse(contentContainer.children[0]);
112
- // Ignore the properties for now, we handle these ourselves
113
- const properties: OutgoingTriple[] = [];
114
- return {
115
- ...attrs,
116
- properties,
117
- value: location,
118
- };
112
+ if (location) {
113
+ // Ignore the properties for now, we handle these ourselves
114
+ const properties: OutgoingTriple[] = [];
115
+ return {
116
+ ...attrs,
117
+ properties,
118
+ value: location,
119
+ };
120
+ }
119
121
  }
120
122
  return false;
121
123
  },
@@ -114,6 +114,7 @@ export const roadsign_regulation: NodeSpec = {
114
114
  __rdfaId,
115
115
  properties: propertiesFiltered,
116
116
  backlinks,
117
+ subject: resourceUri,
117
118
  label: `Mobiliteitsmaatregel`,
118
119
  };
119
120
  }
@@ -142,13 +142,12 @@ async function _queryMobilityMeasures<Count extends boolean>(
142
142
  );
143
143
  const conceptsWithSigns = await Promise.all(
144
144
  concepts.map(async (concept) => {
145
- const trafficSignalConcepts = await queryTrafficSignalConcepts(
146
- endpoint,
147
- {
145
+ const trafficSignalConcepts = (
146
+ await queryTrafficSignalConcepts(endpoint, {
148
147
  measureConceptUri: concept.uri,
149
148
  imageBaseUrl,
150
- },
151
- );
149
+ })
150
+ ).sort((a, b) => a.position - b.position);
152
151
  return {
153
152
  ...concept,
154
153
  trafficSignalConcepts,
@@ -14,13 +14,13 @@ import { TRAFFIC_SIGNAL_CONCEPT_TYPES } from '../constants';
14
14
 
15
15
  type QueryOptions = {
16
16
  imageBaseUrl?: string;
17
- measureConceptUri?: string;
17
+ measureConceptUri: string;
18
18
  abortSignal?: AbortSignal;
19
19
  };
20
20
 
21
21
  export async function queryTrafficSignalConcepts(
22
22
  endpoint: string,
23
- options: QueryOptions = {},
23
+ options: QueryOptions,
24
24
  ) {
25
25
  const { imageBaseUrl, measureConceptUri, abortSignal } = options;
26
26
  const query = /* sparql */ `
@@ -29,6 +29,7 @@ export async function queryTrafficSignalConcepts(
29
29
  PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
30
30
  PREFIX dct: <http://purl.org/dc/terms/>
31
31
  PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
32
+ PREFIX schema: <http://schema.org/>
32
33
 
33
34
  SELECT DISTINCT
34
35
  ?uri
@@ -36,11 +37,29 @@ export async function queryTrafficSignalConcepts(
36
37
  ?code
37
38
  ?zonality
38
39
  ?image
40
+ ?position
39
41
  WHERE {
40
42
  ?uri
41
43
  a mobiliteit:Verkeerstekenconcept;
42
44
  a ?type;
43
45
  skos:prefLabel ?code.
46
+ {
47
+ ${sparqlEscapeUri(measureConceptUri)}
48
+ mobiliteit:heeftVerkeerstekenLijstItem ?listItem.
49
+ ?listItem
50
+ schema:item ?uri;
51
+ schema:position ?position.
52
+ }
53
+ UNION
54
+ {
55
+ ?uri mobiliteit:heeftMaatregelconcept ${sparqlEscapeUri(measureConceptUri)}.
56
+ FILTER NOT EXISTS {
57
+ ${sparqlEscapeUri(measureConceptUri)}
58
+ mobiliteit:heeftVerkeerstekenLijstItem ?listItem.
59
+ ?listItem
60
+ schema:item ?uri.
61
+ }
62
+ }
44
63
 
45
64
  OPTIONAL {
46
65
  ?uri mobiliteit:grafischeWeergave/ext:hasFile/mu:uuid ?imageId.
@@ -56,8 +75,6 @@ export async function queryTrafficSignalConcepts(
56
75
  <https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept>
57
76
  <https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept>
58
77
  }
59
-
60
- ${measureConceptUri ? `?uri mobiliteit:heeftMaatregelconcept ${sparqlEscapeUri(measureConceptUri)}` : ''}
61
78
  }
62
79
  `;
63
80
  const queryResult = await executeQuery<BindingObject<TrafficSignalConcept>>({
@@ -8,6 +8,7 @@ export const TrafficSignalConceptSchema = z
8
8
  code: z.string(),
9
9
  image: z.string(),
10
10
  zonality: z.nativeEnum(ZONALITY_OPTIONS).optional(),
11
+ position: z.coerce.number().default(-1),
11
12
  })
12
13
  .and(
13
14
  z.discriminatedUnion('type', [
@@ -476,7 +476,7 @@ export const emberNodeConfig: (
476
476
  const body = Array.from(rdfaContent.children).find((child) =>
477
477
  SAY('body').matches(child.getAttribute('property') ?? ''),
478
478
  );
479
- return (body && getRdfaContentElement(body)) ?? (node as HTMLElement);
479
+ return (body && getRdfaContentElement(body)) ?? node;
480
480
  },
481
481
  },
482
482
  {
@@ -537,7 +537,7 @@ export const emberNodeConfig: (
537
537
  if (bodyNode) {
538
538
  return getRdfaContentElement(bodyNode);
539
539
  } else {
540
- return node as HTMLElement;
540
+ return node;
541
541
  }
542
542
  },
543
543
  },
@@ -90,6 +90,7 @@ export default class RoadsignsModal extends Component<Signature> {
90
90
  code: string;
91
91
  image: string;
92
92
  uri: string;
93
+ position: number;
93
94
  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
95
  } & ({
95
96
  type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
@@ -117,6 +118,7 @@ export default class RoadsignsModal extends Component<Signature> {
117
118
  code: string;
118
119
  image: string;
119
120
  uri: string;
121
+ position: number;
120
122
  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;
121
123
  } & ({
122
124
  type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
@@ -21,6 +21,7 @@ export declare function queryMobilityMeasures(endpoint: string, options?: Mobili
21
21
  code: string;
22
22
  image: string;
23
23
  uri: string;
24
+ position: number;
24
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;
25
26
  } & ({
26
27
  type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
@@ -1,12 +1,13 @@
1
1
  type QueryOptions = {
2
2
  imageBaseUrl?: string;
3
- measureConceptUri?: string;
3
+ measureConceptUri: string;
4
4
  abortSignal?: AbortSignal;
5
5
  };
6
- export declare function queryTrafficSignalConcepts(endpoint: string, options?: QueryOptions): Promise<(({
6
+ export declare function queryTrafficSignalConcepts(endpoint: string, options: QueryOptions): Promise<(({
7
7
  code: string;
8
8
  image: string;
9
9
  uri: string;
10
+ position: number;
10
11
  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;
11
12
  } & {
12
13
  type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeerslichtconcept" | "https://data.vlaanderen.be/ns/mobiliteit#Wegmarkeringconcept";
@@ -18,6 +19,7 @@ export declare function queryTrafficSignalConcepts(endpoint: string, options?: Q
18
19
  code: string;
19
20
  image: string;
20
21
  uri: string;
22
+ position: number;
21
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;
22
24
  type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
23
25
  })[]>;
@@ -18,15 +18,18 @@ export declare const MobilityMeasureConceptSchema: z.ZodObject<{
18
18
  readonly ZONAL: "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d";
19
19
  readonly NON_ZONAL: "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
20
20
  }>>;
21
+ position: z.ZodDefault<z.ZodNumber>;
21
22
  }, "strip", z.ZodTypeAny, {
22
23
  code: string;
23
24
  image: string;
24
25
  uri: string;
26
+ position: number;
25
27
  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
28
  }, {
27
29
  code: string;
28
30
  image: string;
29
31
  uri: string;
32
+ position?: number | undefined;
30
33
  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;
31
34
  }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
32
35
  type: z.ZodLiteral<"https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept">;
@@ -69,6 +72,7 @@ export declare const MobilityMeasureConceptSchema: z.ZodObject<{
69
72
  code: string;
70
73
  image: string;
71
74
  uri: string;
75
+ position: number;
72
76
  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;
73
77
  } & ({
74
78
  type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
@@ -89,6 +93,7 @@ export declare const MobilityMeasureConceptSchema: z.ZodObject<{
89
93
  code: string;
90
94
  image: string;
91
95
  uri: string;
96
+ position?: number | undefined;
92
97
  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;
93
98
  } & ({
94
99
  type: "https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept";
@@ -8,15 +8,18 @@ export declare const TrafficSignalConceptSchema: z.ZodIntersection<z.ZodObject<{
8
8
  readonly ZONAL: "http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d";
9
9
  readonly NON_ZONAL: "http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc";
10
10
  }>>;
11
+ position: z.ZodDefault<z.ZodNumber>;
11
12
  }, "strip", z.ZodTypeAny, {
12
13
  code: string;
13
14
  image: string;
14
15
  uri: string;
16
+ position: number;
15
17
  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;
16
18
  }, {
17
19
  code: string;
18
20
  image: string;
19
21
  uri: string;
22
+ position?: number | undefined;
20
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;
21
24
  }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
22
25
  type: z.ZodLiteral<"https://data.vlaanderen.be/ns/mobiliteit#Verkeersbordconcept">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "32.5.2",
3
+ "version": "32.5.3-dev.169415abb930b020c0d7624cfb5197bd21e4d9c7",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -112,7 +112,7 @@
112
112
  "@glint/template": "^1.5.0",
113
113
  "@graphy/content.ttl.write": "^4.3.7",
114
114
  "@graphy/memory.dataset.fast": "4.3.3",
115
- "@lblod/ember-rdfa-editor": "12.9.0",
115
+ "@lblod/ember-rdfa-editor": "^12.12.1",
116
116
  "@rdfjs/types": "^1.1.0",
117
117
  "@release-it/keep-a-changelog": "^4.0.0",
118
118
  "@tsconfig/ember": "^3.0.8",
@@ -183,7 +183,7 @@
183
183
  "@appuniversum/ember-appuniversum": "^3.12.0",
184
184
  "@ember/string": "3.x",
185
185
  "@glint/template": "^1.4.0",
186
- "@lblod/ember-rdfa-editor": "^12.1.0",
186
+ "@lblod/ember-rdfa-editor": "^12.12.1",
187
187
  "ember-concurrency": "^4.0.2",
188
188
  "ember-element-helper": "^0.8.6",
189
189
  "ember-intl": "^7.0.0",