@lblod/ember-rdfa-editor-lblod-plugins 33.0.0 → 33.1.0-dev.367f7322beb7deee231dd44356f445bd1d6515fd

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.
Files changed (39) hide show
  1. package/.changeset/eleven-jeans-yell.md +5 -0
  2. package/CHANGELOG.md +10 -0
  3. package/addon/components/besluit-topic-plugin/besluit-topic-toolbar-dropdown.ts +1 -1
  4. package/addon/components/besluit-type-plugin/toolbar-dropdown.gts +1 -1
  5. package/addon/components/decision-plugin/decision-plugin-card.gts +3 -2
  6. package/addon/components/decision-plugin/insert-article.gts +1 -1
  7. package/addon/components/document-validation-plugin/card.gts +130 -33
  8. package/addon/components/lpdc-plugin/lpdc-insert.ts +1 -1
  9. package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.gts +1 -1
  10. package/addon/components/roadsign-regulation-plugin/roadsigns-modal.gts +1 -1
  11. package/addon/plugins/besluit-type-plugin/utils/besluit-type-instances.ts +1 -1
  12. package/addon/plugins/besluit-type-plugin/utils/set-besluit-type.ts +1 -1
  13. package/addon/plugins/decision-plugin/commands/insert-article-container.ts +14 -1
  14. package/addon/plugins/decision-plugin/commands/insert-description.ts +9 -1
  15. package/addon/plugins/decision-plugin/commands/insert-motivation.ts +9 -1
  16. package/addon/plugins/decision-plugin/commands/insert-title.ts +9 -1
  17. package/addon/plugins/document-validation-plugin/common-fixes.ts +125 -0
  18. package/addon/plugins/document-validation-plugin/index.ts +61 -32
  19. package/addon/plugins/roadsign-regulation-plugin/actions/insert-measure.ts +69 -18
  20. package/addon/plugins/roadsign-regulation-plugin/queries/mobility-measure-concept.ts +9 -1
  21. package/addon/plugins/roadsign-regulation-plugin/schemas/mobility-measure-preview.ts +22 -0
  22. package/addon/plugins/roadsign-regulation-plugin/schemas/traffic-signal.ts +18 -0
  23. package/addon/plugins/roadsign-regulation-plugin/schemas/variable-instance.ts +55 -0
  24. package/addon/plugins/roadsign-regulation-plugin/schemas/variable.ts +6 -6
  25. package/addon/{plugins/besluit-topic-plugin/utils/helpers.ts → utils/decision-utils.ts} +33 -9
  26. package/declarations/addon/components/document-validation-plugin/card.d.ts +51 -1
  27. package/declarations/addon/plugins/decision-plugin/commands/insert-article-container.d.ts +3 -1
  28. package/declarations/addon/plugins/document-validation-plugin/common-fixes.d.ts +6 -0
  29. package/declarations/addon/plugins/document-validation-plugin/index.d.ts +30 -6
  30. package/declarations/addon/plugins/roadsign-regulation-plugin/actions/insert-measure.d.ts +10 -5
  31. package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/mobility-measure-preview.d.ts +279 -0
  32. package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/traffic-signal.d.ts +90 -0
  33. package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/variable-instance.d.ts +246 -0
  34. package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/variable.d.ts +120 -0
  35. package/declarations/addon/{plugins/besluit-topic-plugin/utils/helpers.d.ts → utils/decision-utils.d.ts} +5 -1
  36. package/package.json +2 -2
  37. package/pnpm-lock.yaml +5 -5
  38. package/translations/en-US.yaml +1 -0
  39. package/translations/nl-BE.yaml +1 -0
@@ -0,0 +1,246 @@
1
+ import { z } from 'zod';
2
+ import { Variable } from './variable';
3
+ declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
4
+ uri: z.ZodString;
5
+ id: z.ZodString;
6
+ }, {
7
+ value: z.ZodOptional<z.ZodString>;
8
+ variable: z.ZodObject<z.objectUtil.extendShape<{
9
+ uri: z.ZodString;
10
+ label: z.ZodString;
11
+ source: z.ZodOptional<z.ZodString>;
12
+ }, {
13
+ type: z.ZodLiteral<"text">;
14
+ defaultValue: z.ZodOptional<z.ZodString>;
15
+ }>, "strip", z.ZodTypeAny, {
16
+ type: "text";
17
+ label: string;
18
+ uri: string;
19
+ source?: string | undefined;
20
+ defaultValue?: string | undefined;
21
+ }, {
22
+ type: "text";
23
+ label: string;
24
+ uri: string;
25
+ source?: string | undefined;
26
+ defaultValue?: string | undefined;
27
+ }>;
28
+ }>, "strip", z.ZodTypeAny, {
29
+ id: string;
30
+ uri: string;
31
+ variable: {
32
+ type: "text";
33
+ label: string;
34
+ uri: string;
35
+ source?: string | undefined;
36
+ defaultValue?: string | undefined;
37
+ };
38
+ value?: string | undefined;
39
+ }, {
40
+ id: string;
41
+ uri: string;
42
+ variable: {
43
+ type: "text";
44
+ label: string;
45
+ uri: string;
46
+ source?: string | undefined;
47
+ defaultValue?: string | undefined;
48
+ };
49
+ value?: string | undefined;
50
+ }>, z.ZodObject<z.objectUtil.extendShape<{
51
+ uri: z.ZodString;
52
+ id: z.ZodString;
53
+ }, {
54
+ value: z.ZodOptional<z.ZodNumber>;
55
+ variable: z.ZodObject<z.objectUtil.extendShape<{
56
+ uri: z.ZodString;
57
+ label: z.ZodString;
58
+ source: z.ZodOptional<z.ZodString>;
59
+ }, {
60
+ type: z.ZodLiteral<"number">;
61
+ defaultValue: z.ZodOptional<z.ZodNumber>;
62
+ }>, "strip", z.ZodTypeAny, {
63
+ type: "number";
64
+ label: string;
65
+ uri: string;
66
+ source?: string | undefined;
67
+ defaultValue?: number | undefined;
68
+ }, {
69
+ type: "number";
70
+ label: string;
71
+ uri: string;
72
+ source?: string | undefined;
73
+ defaultValue?: number | undefined;
74
+ }>;
75
+ }>, "strip", z.ZodTypeAny, {
76
+ id: string;
77
+ uri: string;
78
+ variable: {
79
+ type: "number";
80
+ label: string;
81
+ uri: string;
82
+ source?: string | undefined;
83
+ defaultValue?: number | undefined;
84
+ };
85
+ value?: number | undefined;
86
+ }, {
87
+ id: string;
88
+ uri: string;
89
+ variable: {
90
+ type: "number";
91
+ label: string;
92
+ uri: string;
93
+ source?: string | undefined;
94
+ defaultValue?: number | undefined;
95
+ };
96
+ value?: number | undefined;
97
+ }>, z.ZodObject<z.objectUtil.extendShape<{
98
+ uri: z.ZodString;
99
+ id: z.ZodString;
100
+ }, {
101
+ value: z.ZodOptional<z.ZodDate>;
102
+ variable: z.ZodObject<z.objectUtil.extendShape<{
103
+ uri: z.ZodString;
104
+ label: z.ZodString;
105
+ source: z.ZodOptional<z.ZodString>;
106
+ }, {
107
+ type: z.ZodLiteral<"date">;
108
+ defaultValue: z.ZodOptional<z.ZodDate>;
109
+ }>, "strip", z.ZodTypeAny, {
110
+ type: "date";
111
+ label: string;
112
+ uri: string;
113
+ source?: string | undefined;
114
+ defaultValue?: Date | undefined;
115
+ }, {
116
+ type: "date";
117
+ label: string;
118
+ uri: string;
119
+ source?: string | undefined;
120
+ defaultValue?: Date | undefined;
121
+ }>;
122
+ }>, "strip", z.ZodTypeAny, {
123
+ id: string;
124
+ uri: string;
125
+ variable: {
126
+ type: "date";
127
+ label: string;
128
+ uri: string;
129
+ source?: string | undefined;
130
+ defaultValue?: Date | undefined;
131
+ };
132
+ value?: Date | undefined;
133
+ }, {
134
+ id: string;
135
+ uri: string;
136
+ variable: {
137
+ type: "date";
138
+ label: string;
139
+ uri: string;
140
+ source?: string | undefined;
141
+ defaultValue?: Date | undefined;
142
+ };
143
+ value?: Date | undefined;
144
+ }>, z.ZodObject<z.objectUtil.extendShape<{
145
+ uri: z.ZodString;
146
+ id: z.ZodString;
147
+ }, {
148
+ value: z.ZodOptional<z.ZodString>;
149
+ variable: z.ZodObject<z.objectUtil.extendShape<{
150
+ uri: z.ZodString;
151
+ label: z.ZodString;
152
+ source: z.ZodOptional<z.ZodString>;
153
+ }, {
154
+ type: z.ZodLiteral<"location">;
155
+ defaultValue: z.ZodOptional<z.ZodString>;
156
+ }>, "strip", z.ZodTypeAny, {
157
+ type: "location";
158
+ label: string;
159
+ uri: string;
160
+ source?: string | undefined;
161
+ defaultValue?: string | undefined;
162
+ }, {
163
+ type: "location";
164
+ label: string;
165
+ uri: string;
166
+ source?: string | undefined;
167
+ defaultValue?: string | undefined;
168
+ }>;
169
+ }>, "strip", z.ZodTypeAny, {
170
+ id: string;
171
+ uri: string;
172
+ variable: {
173
+ type: "location";
174
+ label: string;
175
+ uri: string;
176
+ source?: string | undefined;
177
+ defaultValue?: string | undefined;
178
+ };
179
+ value?: string | undefined;
180
+ }, {
181
+ id: string;
182
+ uri: string;
183
+ variable: {
184
+ type: "location";
185
+ label: string;
186
+ uri: string;
187
+ source?: string | undefined;
188
+ defaultValue?: string | undefined;
189
+ };
190
+ value?: string | undefined;
191
+ }>, z.ZodObject<z.objectUtil.extendShape<{
192
+ uri: z.ZodString;
193
+ id: z.ZodString;
194
+ }, {
195
+ value: z.ZodOptional<z.ZodString>;
196
+ variable: z.ZodObject<z.objectUtil.extendShape<{
197
+ uri: z.ZodString;
198
+ label: z.ZodString;
199
+ source: z.ZodOptional<z.ZodString>;
200
+ }, {
201
+ type: z.ZodLiteral<"codelist">;
202
+ defaultValue: z.ZodOptional<z.ZodString>;
203
+ codelistUri: z.ZodString;
204
+ }>, "strip", z.ZodTypeAny, {
205
+ type: "codelist";
206
+ label: string;
207
+ uri: string;
208
+ codelistUri: string;
209
+ source?: string | undefined;
210
+ defaultValue?: string | undefined;
211
+ }, {
212
+ type: "codelist";
213
+ label: string;
214
+ uri: string;
215
+ codelistUri: string;
216
+ source?: string | undefined;
217
+ defaultValue?: string | undefined;
218
+ }>;
219
+ }>, "strip", z.ZodTypeAny, {
220
+ id: string;
221
+ uri: string;
222
+ variable: {
223
+ type: "codelist";
224
+ label: string;
225
+ uri: string;
226
+ codelistUri: string;
227
+ source?: string | undefined;
228
+ defaultValue?: string | undefined;
229
+ };
230
+ value?: string | undefined;
231
+ }, {
232
+ id: string;
233
+ uri: string;
234
+ variable: {
235
+ type: "codelist";
236
+ label: string;
237
+ uri: string;
238
+ codelistUri: string;
239
+ source?: string | undefined;
240
+ defaultValue?: string | undefined;
241
+ };
242
+ value?: string | undefined;
243
+ }>]>;
244
+ export type VariableInstance = z.infer<typeof VariableInstanceSchema>;
245
+ export declare function isVariableInstance(variableOrVariableInstance: Variable | VariableInstance): variableOrVariableInstance is VariableInstance;
246
+ export {};
@@ -1,4 +1,124 @@
1
1
  import { z } from 'zod';
2
+ export declare const TextVariableSchema: z.ZodObject<z.objectUtil.extendShape<{
3
+ uri: z.ZodString;
4
+ label: z.ZodString;
5
+ source: z.ZodOptional<z.ZodString>;
6
+ }, {
7
+ type: z.ZodLiteral<"text">;
8
+ defaultValue: z.ZodOptional<z.ZodString>;
9
+ }>, "strip", z.ZodTypeAny, {
10
+ type: "text";
11
+ label: string;
12
+ uri: string;
13
+ source?: string | undefined;
14
+ defaultValue?: string | undefined;
15
+ }, {
16
+ type: "text";
17
+ label: string;
18
+ uri: string;
19
+ source?: string | undefined;
20
+ defaultValue?: string | undefined;
21
+ }>;
22
+ export declare const NumberVariableSchema: z.ZodObject<z.objectUtil.extendShape<{
23
+ uri: z.ZodString;
24
+ label: z.ZodString;
25
+ source: z.ZodOptional<z.ZodString>;
26
+ }, {
27
+ type: z.ZodLiteral<"number">;
28
+ defaultValue: z.ZodOptional<z.ZodNumber>;
29
+ }>, "strip", z.ZodTypeAny, {
30
+ type: "number";
31
+ label: string;
32
+ uri: string;
33
+ source?: string | undefined;
34
+ defaultValue?: number | undefined;
35
+ }, {
36
+ type: "number";
37
+ label: string;
38
+ uri: string;
39
+ source?: string | undefined;
40
+ defaultValue?: number | undefined;
41
+ }>;
42
+ export declare const DateVariableSchema: z.ZodObject<z.objectUtil.extendShape<{
43
+ uri: z.ZodString;
44
+ label: z.ZodString;
45
+ source: z.ZodOptional<z.ZodString>;
46
+ }, {
47
+ type: z.ZodLiteral<"date">;
48
+ defaultValue: z.ZodOptional<z.ZodDate>;
49
+ }>, "strip", z.ZodTypeAny, {
50
+ type: "date";
51
+ label: string;
52
+ uri: string;
53
+ source?: string | undefined;
54
+ defaultValue?: Date | undefined;
55
+ }, {
56
+ type: "date";
57
+ label: string;
58
+ uri: string;
59
+ source?: string | undefined;
60
+ defaultValue?: Date | undefined;
61
+ }>;
62
+ export declare const CodelistVariableSchema: z.ZodObject<z.objectUtil.extendShape<{
63
+ uri: z.ZodString;
64
+ label: z.ZodString;
65
+ source: z.ZodOptional<z.ZodString>;
66
+ }, {
67
+ type: z.ZodLiteral<"codelist">;
68
+ defaultValue: z.ZodOptional<z.ZodString>;
69
+ codelistUri: z.ZodString;
70
+ }>, "strip", z.ZodTypeAny, {
71
+ type: "codelist";
72
+ label: string;
73
+ uri: string;
74
+ codelistUri: string;
75
+ source?: string | undefined;
76
+ defaultValue?: string | undefined;
77
+ }, {
78
+ type: "codelist";
79
+ label: string;
80
+ uri: string;
81
+ codelistUri: string;
82
+ source?: string | undefined;
83
+ defaultValue?: string | undefined;
84
+ }>;
85
+ export declare const LocationVariableSchema: z.ZodObject<z.objectUtil.extendShape<{
86
+ uri: z.ZodString;
87
+ label: z.ZodString;
88
+ source: z.ZodOptional<z.ZodString>;
89
+ }, {
90
+ type: z.ZodLiteral<"location">;
91
+ defaultValue: z.ZodOptional<z.ZodString>;
92
+ }>, "strip", z.ZodTypeAny, {
93
+ type: "location";
94
+ label: string;
95
+ uri: string;
96
+ source?: string | undefined;
97
+ defaultValue?: string | undefined;
98
+ }, {
99
+ type: "location";
100
+ label: string;
101
+ uri: string;
102
+ source?: string | undefined;
103
+ defaultValue?: string | undefined;
104
+ }>;
105
+ export declare const InstructionVariableSchema: z.ZodObject<z.objectUtil.extendShape<{
106
+ uri: z.ZodString;
107
+ label: z.ZodString;
108
+ source: z.ZodOptional<z.ZodString>;
109
+ }, {
110
+ type: z.ZodLiteral<"instruction">;
111
+ }>, "strip", z.ZodTypeAny, {
112
+ type: "instruction";
113
+ label: string;
114
+ uri: string;
115
+ source?: string | undefined;
116
+ }, {
117
+ type: "instruction";
118
+ label: string;
119
+ uri: string;
120
+ source?: string | undefined;
121
+ }>;
2
122
  export declare const VariableSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
3
123
  uri: z.ZodString;
4
124
  label: z.ZodString;
@@ -1,4 +1,8 @@
1
- import { EditorState, SayController } from '@lblod/ember-rdfa-editor';
1
+ import { EditorState, PNode, SayController } from '@lblod/ember-rdfa-editor';
2
2
  import { ElementPNode } from '@lblod/ember-rdfa-editor/plugins/datastore';
3
+ export declare function getDecisionNodeLocation(controller: SayController): {
4
+ pos: number;
5
+ node: PNode;
6
+ } | undefined;
3
7
  export declare const getCurrentBesluitRange: (controllerOrState: SayController | EditorState) => ElementPNode | undefined;
4
8
  export declare const getCurrentBesluitURI: (controllerOrState: SayController | EditorState) => string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "33.0.0",
3
+ "version": "33.1.0-dev.367f7322beb7deee231dd44356f445bd1d6515fd",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -75,7 +75,7 @@
75
75
  "ember-resources": "^7.0.2",
76
76
  "ember-template-imports": "^4.3.0",
77
77
  "ember-velcro": "^2.2.0",
78
- "@lblod/lib-decision-shapes": "^0.0.22",
78
+ "@lblod/lib-decision-shapes": "^0.0.25",
79
79
  "n2words": "^1.21.0",
80
80
  "n3": "^1.26.0",
81
81
  "process": "0.11.10",
package/pnpm-lock.yaml CHANGED
@@ -30,8 +30,8 @@ importers:
30
30
  specifier: ^1.16.5
31
31
  version: 1.19.2(@glint/template@1.5.1)
32
32
  '@lblod/lib-decision-shapes':
33
- specifier: ^0.0.22
34
- version: 0.0.22(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.14.9)(node-notifier@10.0.1))(typescript@5.7.3)
33
+ specifier: ^0.0.25
34
+ version: 0.0.25(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.14.9)(node-notifier@10.0.1))(typescript@5.7.3)
35
35
  '@lblod/marawa':
36
36
  specifier: 0.8.0-beta.6
37
37
  version: 0.8.0-beta.6
@@ -1753,8 +1753,8 @@ packages:
1753
1753
  '@glint/template':
1754
1754
  optional: true
1755
1755
 
1756
- '@lblod/lib-decision-shapes@0.0.22':
1757
- resolution: {integrity: sha512-8jNbj26lp75j1fEdx1PvFDZsEpw2a17unrmzYY4rRTfDqGbVnQwYyJLxfhBEudnMzYmjMXN+lDL00p/lavIW/Q==}
1756
+ '@lblod/lib-decision-shapes@0.0.25':
1757
+ resolution: {integrity: sha512-4pTmFBro+RLPtaN4SiWt5EYqZ2bbtDqpo+EYsNEDe1wtiMLg6RhOD4RwQwLQrH3mjbuJCyQd3DF3TaZBDcOiSQ==}
1758
1758
 
1759
1759
  '@lblod/marawa@0.8.0-beta.6':
1760
1760
  resolution: {integrity: sha512-BW3yCpeQlk9EPnQAEQnM9uViA8RC5DkuoiaPJzbuhMcLvKHfI4cjc6dTg9i8qAijbL/xObmQ/Aexko2Xcj9ktw==}
@@ -12152,7 +12152,7 @@ snapshots:
12152
12152
  - socks
12153
12153
  - supports-color
12154
12154
 
12155
- '@lblod/lib-decision-shapes@0.0.22(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.14.9)(node-notifier@10.0.1))(typescript@5.7.3)':
12155
+ '@lblod/lib-decision-shapes@0.0.25(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.14.9)(node-notifier@10.0.1))(typescript@5.7.3)':
12156
12156
  dependencies:
12157
12157
  ts-jest: 29.3.4(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.14.9)(node-notifier@10.0.1))(typescript@5.7.3)
12158
12158
  optionalDependencies:
@@ -515,3 +515,4 @@ document-validation-plugin:
515
515
  no-matching-rules: There is nothing to validate in the document
516
516
  see-related-node: See related node
517
517
  description: Some parts are required to allow our system to parse this document.
518
+ decision-node-not-found: Please put the cursor inside a decision node
@@ -512,3 +512,4 @@ document-validation-plugin:
512
512
  no-matching-rules: Er is niets te valideren in dit document
513
513
  see-related-node: Zie gerelateerde node
514
514
  description: Sommige onderdelen zijn nodig om ons systeem toe te laten dit document te ontleden.
515
+ decision-node-not-found: Plaats de cursor in een besluit