@lblod/ember-rdfa-editor-lblod-plugins 33.4.0 → 34.0.1

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 (28) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/addon/components/variable-plugin/codelist/edit.gts +48 -9
  3. package/addon/components/variable-plugin/codelist/{insert.ts → insert.gts} +52 -7
  4. package/addon/components/variable-plugin/codelist/nodeview.gts +49 -0
  5. package/addon/components/variable-plugin/location/edit.ts +3 -4
  6. package/addon/plugins/roadsign-regulation-plugin/actions/insert-measure.ts +1 -1
  7. package/addon/plugins/roadsign-regulation-plugin/schemas/variable.ts +1 -1
  8. package/addon/plugins/variable-plugin/actions/create-codelist-variable.ts +57 -40
  9. package/addon/plugins/variable-plugin/actions/create-legacy-codelist-variable.ts +101 -0
  10. package/addon/plugins/variable-plugin/utils/codelist-utils.ts +38 -3
  11. package/addon/plugins/variable-plugin/utils/fetch-data.ts +37 -15
  12. package/addon/plugins/variable-plugin/variables/codelist.ts +101 -175
  13. package/addon/plugins/variable-plugin/variables/legacy-codelist.ts +261 -0
  14. package/declarations/addon/components/variable-plugin/codelist/edit.d.ts +2 -0
  15. package/declarations/addon/components/variable-plugin/codelist/insert.d.ts +15 -9
  16. package/declarations/addon/components/variable-plugin/codelist/nodeview.d.ts +18 -0
  17. package/declarations/addon/plugins/roadsign-regulation-plugin/queries/variable.d.ts +6 -6
  18. package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/variable-instance.d.ts +25 -25
  19. package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/variable.d.ts +36 -36
  20. package/declarations/addon/plugins/variable-plugin/actions/create-codelist-variable.d.ts +20 -11
  21. package/declarations/addon/plugins/variable-plugin/actions/create-legacy-codelist-variable.d.ts +28 -0
  22. package/declarations/addon/plugins/variable-plugin/utils/codelist-utils.d.ts +7 -0
  23. package/declarations/addon/plugins/variable-plugin/utils/fetch-data.d.ts +3 -2
  24. package/declarations/addon/plugins/variable-plugin/variables/codelist.d.ts +3 -1
  25. package/declarations/addon/plugins/variable-plugin/variables/legacy-codelist.d.ts +2 -0
  26. package/docs/plugins/variable.md +1 -0
  27. package/package.json +1 -1
  28. package/addon/components/variable-plugin/codelist/insert.hbs +0 -31
@@ -0,0 +1,261 @@
1
+ import {
2
+ getOutgoingTriple,
3
+ hasOutgoingNamedNodeTriple,
4
+ hasRDFaAttribute,
5
+ } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
6
+ import {
7
+ DCT,
8
+ EXT,
9
+ MOBILITEIT,
10
+ RDF,
11
+ VARIABLES,
12
+ XSD,
13
+ } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
14
+ import {
15
+ createEmberNodeSpec,
16
+ createEmberNodeView,
17
+ EmberNodeConfig,
18
+ } from '@lblod/ember-rdfa-editor/utils/ember-node';
19
+ import {
20
+ DOMOutputSpec,
21
+ PNode,
22
+ getRdfaAttrs,
23
+ rdfaAttrSpec,
24
+ } from '@lblod/ember-rdfa-editor';
25
+ import {
26
+ hasRdfaVariableType,
27
+ isVariable,
28
+ parseLabel,
29
+ parseVariableInstance,
30
+ parseVariableSource,
31
+ parseVariableType,
32
+ } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/variable-attribute-parsers';
33
+ import VariableNodeViewComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/variable/nodeview';
34
+ import type { ComponentLike } from '@glint/template';
35
+ import { renderRdfaAware } from '@lblod/ember-rdfa-editor/core/schema';
36
+ import { recreateVariableUris } from '../utils/recreate-variable-uris';
37
+ import { generateVariableInstanceUri } from '../utils/variable-helpers';
38
+ import getClassnamesFromNode from '@lblod/ember-rdfa-editor/utils/get-classnames-from-node';
39
+ import { createLegacyCodelistVariableAttrs } from '../actions/create-legacy-codelist-variable';
40
+
41
+ const CONTENT_SELECTOR = '[data-content-container="true"]';
42
+
43
+ const CONTENT_SELECTOR_LEGACY = `span[property~='${EXT('content').prefixed}'],
44
+ span[property~='${EXT('content').full}']`;
45
+ const rdfaAware = true;
46
+
47
+ const parseDOM = [
48
+ {
49
+ tag: 'span',
50
+ getAttrs: (node: HTMLElement) => {
51
+ const attrs = getRdfaAttrs(node, { rdfaAware });
52
+ if (!attrs) {
53
+ return false;
54
+ }
55
+ if (
56
+ node.dataset.sayVariable &&
57
+ (node.dataset.sayVariableType === 'codelist' ||
58
+ node.dataset.sayVariableType === 'legacy_codelist') &&
59
+ (!node.dataset.sayNodeVersion || node.dataset.sayNodeVersion === '1') &&
60
+ node.querySelector(CONTENT_SELECTOR)
61
+ ) {
62
+ const label = node.dataset.label;
63
+ const source = node.dataset.source;
64
+ const codelist = node.dataset.codelist;
65
+ const selectionStyle = node.dataset.selectionStyle;
66
+ return { ...attrs, label, source, codelist, selectionStyle };
67
+ }
68
+ return false;
69
+ },
70
+ contentElement: CONTENT_SELECTOR,
71
+ },
72
+ ];
73
+
74
+ const parseDOMLegacy = [
75
+ {
76
+ tag: 'span',
77
+ getAttrs: (node: HTMLElement) => {
78
+ const attrs = getRdfaAttrs(node, { rdfaAware });
79
+ if (!attrs || attrs.rdfaNodeType !== 'resource') {
80
+ return false;
81
+ }
82
+
83
+ if (
84
+ hasOutgoingNamedNodeTriple(
85
+ attrs,
86
+ RDF('type'),
87
+ VARIABLES('VariableInstance'),
88
+ ) &&
89
+ node.querySelector(CONTENT_SELECTOR) &&
90
+ hasRdfaVariableType(attrs, 'codelist')
91
+ ) {
92
+ const variableInstanceUri = attrs.subject;
93
+ const variableUri = getOutgoingTriple(attrs, VARIABLES('instanceOf'))
94
+ ?.object.value;
95
+ if (!variableInstanceUri || !variableUri) {
96
+ return false;
97
+ }
98
+
99
+ const codelistUri = getOutgoingTriple(attrs, MOBILITEIT('codelijst'))
100
+ ?.object.value;
101
+ const sourceUri = getOutgoingTriple(attrs, DCT('source'))?.object.value;
102
+ const selectionStyle = node.dataset.selectionStyle;
103
+ const label = getOutgoingTriple(attrs, DCT('title'))?.object.value;
104
+
105
+ return createLegacyCodelistVariableAttrs({
106
+ variable: variableUri,
107
+ variableInstance: variableInstanceUri,
108
+ label,
109
+ // These attrs are required but it's possible for older documents to get into a broken
110
+ // state. We mark these as unknown so we can push the user to fix this as we can't do it.
111
+ source: sourceUri,
112
+ codelist: codelistUri,
113
+ selectionStyle,
114
+ });
115
+ }
116
+ return false;
117
+ },
118
+ contentElement: CONTENT_SELECTOR,
119
+ },
120
+ {
121
+ tag: 'span',
122
+ getAttrs(node: HTMLElement) {
123
+ const attrs = getRdfaAttrs(node, { rdfaAware });
124
+ if (!attrs || attrs.rdfaNodeType !== 'resource') {
125
+ return false;
126
+ }
127
+
128
+ if (
129
+ hasOutgoingNamedNodeTriple(attrs, RDF('type'), EXT('Mapping')) &&
130
+ node.querySelector(CONTENT_SELECTOR) &&
131
+ hasRdfaVariableType(attrs, 'codelist')
132
+ ) {
133
+ const variableUri = attrs.subject;
134
+ const variableInstanceUri =
135
+ getOutgoingTriple(attrs, EXT('instance'))?.object.value ??
136
+ generateVariableInstanceUri();
137
+
138
+ const codelistUri = getOutgoingTriple(attrs, EXT('codelist'))?.object
139
+ .value;
140
+ const sourceUri = getOutgoingTriple(attrs, DCT('source'))?.object.value;
141
+ const selectionStyle = node.dataset.selectionStyle;
142
+ const label = getOutgoingTriple(attrs, EXT('label'))?.object.value;
143
+ return createLegacyCodelistVariableAttrs({
144
+ variable: variableUri,
145
+ variableInstance: variableInstanceUri,
146
+ label,
147
+ source: sourceUri,
148
+ codelist: codelistUri,
149
+ selectionStyle,
150
+ });
151
+ }
152
+ return false;
153
+ },
154
+ contentElement: CONTENT_SELECTOR,
155
+ },
156
+ {
157
+ tag: 'span',
158
+ getAttrs: (node: HTMLElement) => {
159
+ if (
160
+ isVariable(node) &&
161
+ node.querySelector(CONTENT_SELECTOR_LEGACY) &&
162
+ parseVariableType(node) === 'codelist'
163
+ ) {
164
+ const variableUri = node.getAttribute('resource');
165
+ if (!variableUri) {
166
+ return false;
167
+ }
168
+ const variableInstanceUri =
169
+ parseVariableInstance(node) ?? generateVariableInstanceUri();
170
+
171
+ const source = parseVariableSource(node) ?? undefined;
172
+ const selectionStyle = node.dataset.selectionStyle;
173
+ const codelistSpan = Array.from(node.children).find((el) =>
174
+ hasRDFaAttribute(el, 'property', EXT('codelist')),
175
+ );
176
+ const codelistUri =
177
+ codelistSpan?.getAttribute('resource') ??
178
+ codelistSpan?.getAttribute('content') ??
179
+ undefined;
180
+ const label = parseLabel(node) ?? undefined;
181
+
182
+ return createLegacyCodelistVariableAttrs({
183
+ variable: variableUri,
184
+ variableInstance: variableInstanceUri,
185
+ label,
186
+ source,
187
+ codelist: codelistUri,
188
+ selectionStyle,
189
+ });
190
+ }
191
+
192
+ return false;
193
+ },
194
+ contentElement: CONTENT_SELECTOR_LEGACY,
195
+ },
196
+ ];
197
+
198
+ const toDOM = (node: PNode): DOMOutputSpec => {
199
+ const { selectionStyle, label, codelist, source } = node.attrs;
200
+ const onlyContentType =
201
+ node.content.size === 1 && node.content.firstChild?.type;
202
+ const className =
203
+ onlyContentType &&
204
+ onlyContentType === onlyContentType.schema.nodes['placeholder']
205
+ ? ' say-variable'
206
+ : '';
207
+
208
+ return renderRdfaAware({
209
+ renderable: node,
210
+ attrs: {
211
+ class: `${getClassnamesFromNode(node)}${className}`,
212
+ 'data-say-variable': 'true',
213
+ 'data-say-variable-type': 'legacy_codelist',
214
+ 'data-say-node-version': '1',
215
+ 'data-selection-style': selectionStyle as string,
216
+ 'data-label': label as string | null,
217
+ 'data-codelist': codelist as string,
218
+ 'data-source': source as string,
219
+ },
220
+ tag: 'span',
221
+ content: 0,
222
+ });
223
+ };
224
+
225
+ const emberNodeConfig: EmberNodeConfig = {
226
+ name: 'legacy_codelist',
227
+ component: VariableNodeViewComponent as unknown as ComponentLike,
228
+ inline: true,
229
+ group: 'inline variable',
230
+ content: 'inline*',
231
+ atom: true,
232
+ editable: true,
233
+ recreateUriFunction: recreateVariableUris,
234
+ draggable: false,
235
+ needsFFKludge: true,
236
+ selectable: true,
237
+ attrs: {
238
+ ...rdfaAttrSpec({ rdfaAware }),
239
+ label: {
240
+ default: null,
241
+ },
242
+ codelist: {
243
+ default: 'UNKNOWN',
244
+ },
245
+ source: {
246
+ default: 'UNKNOWN',
247
+ },
248
+ selectionStyle: {
249
+ default: null,
250
+ },
251
+ datatype: {
252
+ default: XSD('string').namedNode,
253
+ },
254
+ },
255
+ classNames: ['say-codelist-variable'],
256
+ toDOM,
257
+ parseDOM: [...parseDOM, ...parseDOMLegacy],
258
+ };
259
+
260
+ export const legacy_codelist = createEmberNodeSpec(emberNodeConfig);
261
+ export const legacyCodelistView = createEmberNodeView(emberNodeConfig);
@@ -13,6 +13,7 @@ type Sig = {
13
13
  export default class CodelistEditComponent extends Component<Sig> {
14
14
  selectedCodelistOption?: CodeListOption | CodeListOption[];
15
15
  get controller(): SayController;
16
+ get isLegacyCodelist(): boolean;
16
17
  get selectedCodelist(): {
17
18
  node: import("prosemirror-model").Node;
18
19
  pos: number;
@@ -21,6 +22,7 @@ export default class CodelistEditComponent extends Component<Sig> {
21
22
  get codelistUri(): string | undefined;
22
23
  get showCard(): boolean;
23
24
  get label(): string | undefined;
25
+ get schema(): import("prosemirror-model").Schema<any, any>;
24
26
  codelistOptions: import("reactiveweb/function").State<Promise<CodeListOptions | undefined>>;
25
27
  get multiSelect(): boolean;
26
28
  insert(): void;
@@ -13,25 +13,31 @@ type Args = {
13
13
  };
14
14
  interface SelectStyle {
15
15
  label: string;
16
- value: string;
16
+ value: 'single' | 'multi';
17
17
  }
18
18
  export default class CodelistInsertComponent extends Component<Args> {
19
19
  intl: IntlService;
20
20
  selectedCodelist?: CodeList;
21
- label?: string;
22
- selectedStyleValue: string;
21
+ label: string;
22
+ selectedStyleValue: 'single' | 'multi';
23
23
  get controller(): SayController;
24
24
  get documentLanguage(): string;
25
25
  get schema(): import("prosemirror-model").Schema<any, any>;
26
26
  get publisher(): string | undefined;
27
27
  get endpoint(): string;
28
- get selectionStyles(): {
29
- label: string;
30
- value: string;
31
- }[];
28
+ get selectionStyles(): ({
29
+ readonly label: string;
30
+ readonly value: "single";
31
+ } | {
32
+ readonly label: string;
33
+ readonly value: "multi";
34
+ })[];
32
35
  get selectedStyle(): {
33
- label: string;
34
- value: string;
36
+ readonly label: string;
37
+ readonly value: "single";
38
+ } | {
39
+ readonly label: string;
40
+ readonly value: "multi";
35
41
  } | undefined;
36
42
  codelistData: import("reactiveweb/function").State<Promise<CodeList[]>>;
37
43
  updateLabel(event: InputEvent): void;
@@ -0,0 +1,18 @@
1
+ import Component from '@glimmer/component';
2
+ import { DecorationSource, PNode, SayController, SayView } from '@lblod/ember-rdfa-editor';
3
+ type Args = {
4
+ getPos: () => number | undefined;
5
+ node: PNode;
6
+ selectNode: () => void;
7
+ updateAttribute: (attr: string, value: unknown) => void;
8
+ controller: SayController;
9
+ view: SayView;
10
+ selected: boolean;
11
+ contentDecorations?: DecorationSource;
12
+ };
13
+ export default class CodelistNodeviewComponent extends Component<Args> {
14
+ get filled(): boolean;
15
+ get humanReadableCodelistOption(): any;
16
+ get class(): string;
17
+ }
18
+ export {};
@@ -7,38 +7,38 @@ type QueryOptions = {
7
7
  export declare function queryVariables(endpoint: string, options?: QueryOptions): Promise<({
8
8
  type: "text";
9
9
  label: string;
10
+ source: string;
10
11
  uri: string;
11
- source?: string | undefined;
12
12
  defaultValue?: string | undefined;
13
13
  } | {
14
14
  type: "number";
15
15
  label: string;
16
+ source: string;
16
17
  uri: string;
17
- source?: string | undefined;
18
18
  defaultValue?: number | undefined;
19
19
  } | {
20
20
  type: "date";
21
21
  label: string;
22
+ source: string;
22
23
  uri: string;
23
- source?: string | undefined;
24
24
  defaultValue?: Date | undefined;
25
25
  } | {
26
26
  type: "codelist";
27
27
  label: string;
28
+ source: string;
28
29
  uri: string;
29
30
  codelistUri: string;
30
- source?: string | undefined;
31
31
  defaultValue?: string | undefined;
32
32
  } | {
33
33
  type: "location";
34
34
  label: string;
35
+ source: string;
35
36
  uri: string;
36
- source?: string | undefined;
37
37
  defaultValue?: string | undefined;
38
38
  } | {
39
39
  type: "instruction";
40
40
  label: string;
41
+ source: string;
41
42
  uri: string;
42
- source?: string | undefined;
43
43
  })[]>;
44
44
  export {};
@@ -7,21 +7,21 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
7
7
  variable: z.ZodObject<z.objectUtil.extendShape<{
8
8
  uri: z.ZodString;
9
9
  label: z.ZodString;
10
- source: z.ZodOptional<z.ZodString>;
10
+ source: z.ZodString;
11
11
  }, {
12
12
  type: z.ZodLiteral<"text">;
13
13
  defaultValue: z.ZodOptional<z.ZodString>;
14
14
  }>, "strip", z.ZodTypeAny, {
15
15
  type: "text";
16
16
  label: string;
17
+ source: string;
17
18
  uri: string;
18
- source?: string | undefined;
19
19
  defaultValue?: string | undefined;
20
20
  }, {
21
21
  type: "text";
22
22
  label: string;
23
+ source: string;
23
24
  uri: string;
24
- source?: string | undefined;
25
25
  defaultValue?: string | undefined;
26
26
  }>;
27
27
  }>, "strip", z.ZodTypeAny, {
@@ -29,8 +29,8 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
29
29
  variable: {
30
30
  type: "text";
31
31
  label: string;
32
+ source: string;
32
33
  uri: string;
33
- source?: string | undefined;
34
34
  defaultValue?: string | undefined;
35
35
  };
36
36
  value?: string | undefined;
@@ -39,8 +39,8 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
39
39
  variable: {
40
40
  type: "text";
41
41
  label: string;
42
+ source: string;
42
43
  uri: string;
43
- source?: string | undefined;
44
44
  defaultValue?: string | undefined;
45
45
  };
46
46
  value?: string | undefined;
@@ -51,21 +51,21 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
51
51
  variable: z.ZodObject<z.objectUtil.extendShape<{
52
52
  uri: z.ZodString;
53
53
  label: z.ZodString;
54
- source: z.ZodOptional<z.ZodString>;
54
+ source: z.ZodString;
55
55
  }, {
56
56
  type: z.ZodLiteral<"number">;
57
57
  defaultValue: z.ZodOptional<z.ZodNumber>;
58
58
  }>, "strip", z.ZodTypeAny, {
59
59
  type: "number";
60
60
  label: string;
61
+ source: string;
61
62
  uri: string;
62
- source?: string | undefined;
63
63
  defaultValue?: number | undefined;
64
64
  }, {
65
65
  type: "number";
66
66
  label: string;
67
+ source: string;
67
68
  uri: string;
68
- source?: string | undefined;
69
69
  defaultValue?: number | undefined;
70
70
  }>;
71
71
  }>, "strip", z.ZodTypeAny, {
@@ -73,8 +73,8 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
73
73
  variable: {
74
74
  type: "number";
75
75
  label: string;
76
+ source: string;
76
77
  uri: string;
77
- source?: string | undefined;
78
78
  defaultValue?: number | undefined;
79
79
  };
80
80
  value?: number | undefined;
@@ -83,8 +83,8 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
83
83
  variable: {
84
84
  type: "number";
85
85
  label: string;
86
+ source: string;
86
87
  uri: string;
87
- source?: string | undefined;
88
88
  defaultValue?: number | undefined;
89
89
  };
90
90
  value?: number | undefined;
@@ -95,21 +95,21 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
95
95
  variable: z.ZodObject<z.objectUtil.extendShape<{
96
96
  uri: z.ZodString;
97
97
  label: z.ZodString;
98
- source: z.ZodOptional<z.ZodString>;
98
+ source: z.ZodString;
99
99
  }, {
100
100
  type: z.ZodLiteral<"date">;
101
101
  defaultValue: z.ZodOptional<z.ZodDate>;
102
102
  }>, "strip", z.ZodTypeAny, {
103
103
  type: "date";
104
104
  label: string;
105
+ source: string;
105
106
  uri: string;
106
- source?: string | undefined;
107
107
  defaultValue?: Date | undefined;
108
108
  }, {
109
109
  type: "date";
110
110
  label: string;
111
+ source: string;
111
112
  uri: string;
112
- source?: string | undefined;
113
113
  defaultValue?: Date | undefined;
114
114
  }>;
115
115
  }>, "strip", z.ZodTypeAny, {
@@ -117,8 +117,8 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
117
117
  variable: {
118
118
  type: "date";
119
119
  label: string;
120
+ source: string;
120
121
  uri: string;
121
- source?: string | undefined;
122
122
  defaultValue?: Date | undefined;
123
123
  };
124
124
  value?: Date | undefined;
@@ -127,8 +127,8 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
127
127
  variable: {
128
128
  type: "date";
129
129
  label: string;
130
+ source: string;
130
131
  uri: string;
131
- source?: string | undefined;
132
132
  defaultValue?: Date | undefined;
133
133
  };
134
134
  value?: Date | undefined;
@@ -139,21 +139,21 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
139
139
  variable: z.ZodObject<z.objectUtil.extendShape<{
140
140
  uri: z.ZodString;
141
141
  label: z.ZodString;
142
- source: z.ZodOptional<z.ZodString>;
142
+ source: z.ZodString;
143
143
  }, {
144
144
  type: z.ZodLiteral<"location">;
145
145
  defaultValue: z.ZodOptional<z.ZodString>;
146
146
  }>, "strip", z.ZodTypeAny, {
147
147
  type: "location";
148
148
  label: string;
149
+ source: string;
149
150
  uri: string;
150
- source?: string | undefined;
151
151
  defaultValue?: string | undefined;
152
152
  }, {
153
153
  type: "location";
154
154
  label: string;
155
+ source: string;
155
156
  uri: string;
156
- source?: string | undefined;
157
157
  defaultValue?: string | undefined;
158
158
  }>;
159
159
  }>, "strip", z.ZodTypeAny, {
@@ -161,8 +161,8 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
161
161
  variable: {
162
162
  type: "location";
163
163
  label: string;
164
+ source: string;
164
165
  uri: string;
165
- source?: string | undefined;
166
166
  defaultValue?: string | undefined;
167
167
  };
168
168
  value?: string | undefined;
@@ -171,8 +171,8 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
171
171
  variable: {
172
172
  type: "location";
173
173
  label: string;
174
+ source: string;
174
175
  uri: string;
175
- source?: string | undefined;
176
176
  defaultValue?: string | undefined;
177
177
  };
178
178
  value?: string | undefined;
@@ -183,7 +183,7 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
183
183
  variable: z.ZodObject<z.objectUtil.extendShape<{
184
184
  uri: z.ZodString;
185
185
  label: z.ZodString;
186
- source: z.ZodOptional<z.ZodString>;
186
+ source: z.ZodString;
187
187
  }, {
188
188
  type: z.ZodLiteral<"codelist">;
189
189
  defaultValue: z.ZodOptional<z.ZodString>;
@@ -191,16 +191,16 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
191
191
  }>, "strip", z.ZodTypeAny, {
192
192
  type: "codelist";
193
193
  label: string;
194
+ source: string;
194
195
  uri: string;
195
196
  codelistUri: string;
196
- source?: string | undefined;
197
197
  defaultValue?: string | undefined;
198
198
  }, {
199
199
  type: "codelist";
200
200
  label: string;
201
+ source: string;
201
202
  uri: string;
202
203
  codelistUri: string;
203
- source?: string | undefined;
204
204
  defaultValue?: string | undefined;
205
205
  }>;
206
206
  }>, "strip", z.ZodTypeAny, {
@@ -208,9 +208,9 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
208
208
  variable: {
209
209
  type: "codelist";
210
210
  label: string;
211
+ source: string;
211
212
  uri: string;
212
213
  codelistUri: string;
213
- source?: string | undefined;
214
214
  defaultValue?: string | undefined;
215
215
  };
216
216
  value?: string | undefined;
@@ -219,9 +219,9 @@ export declare const VariableInstanceSchema: z.ZodUnion<[z.ZodObject<z.objectUti
219
219
  variable: {
220
220
  type: "codelist";
221
221
  label: string;
222
+ source: string;
222
223
  uri: string;
223
224
  codelistUri: string;
224
- source?: string | undefined;
225
225
  defaultValue?: string | undefined;
226
226
  };
227
227
  value?: string | undefined;