@emuanalytics/flow-rdf-core 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +207 -4
- package/dist/index.d.ts +207 -4
- package/dist/index.mjs +3 -0
- package/dist/lib/map/flow-core-map.mjs +90 -8
- package/dist/lib/map/plugins/index.d.mts +252 -223
- package/dist/lib/map/plugins/index.d.ts +252 -223
- package/dist/lib/map/plugins/selection/selection.plugin.mjs +73 -7
- package/dist/lib/map/plugins/selection/source-selection.mjs +12 -0
- package/dist/lib/map-style/composite/builder.mjs +31 -0
- package/dist/lib/map-style/composite/editing.mjs +123 -0
- package/dist/lib/map-style/composite/expand.mjs +182 -0
- package/dist/lib/map-style/composite/stored-format.mjs +18 -0
- package/dist/lib/map-style/composite/validate.mjs +376 -0
- package/dist/lib/map-style/map-data-source.mjs +9 -0
- package/dist/lib/map-style/map-layer.mjs +206 -17
- package/dist/lib/map-style/map-style.mjs +125 -11
- package/dist/package.json.mjs +1 -1
- package/dist/shared/{flow-rdf-core.c45eb675.d.mts → flow-rdf-core.62a36d8b.d.mts} +589 -188
- package/dist/shared/{flow-rdf-core.c45eb675.d.ts → flow-rdf-core.62a36d8b.d.ts} +589 -188
- package/package.json +1 -1
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import * as maplibreSpec from '@emuanalytics/maplibre-gl-style-spec';
|
|
2
|
+
import { isPlainObject } from '../../utils/type-checks.mjs';
|
|
3
|
+
import { expressionParseError } from '../flow-style/literals.mjs';
|
|
4
|
+
import { validateFlowStyle } from '../flow-style/validate.mjs';
|
|
5
|
+
import { flowStyleVersion } from '../flow-style/values.mjs';
|
|
6
|
+
import { compositeLayerVersion } from './stored-format.mjs';
|
|
7
|
+
import { ReactiveExpression } from '../../expressions/reactive-expression.mjs';
|
|
8
|
+
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __publicField = (obj, key, value) => {
|
|
12
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
13
|
+
return value;
|
|
14
|
+
};
|
|
15
|
+
const SPEC_KEYS = ["version", "id", "layers", "dataSources"];
|
|
16
|
+
const SUB_LAYER_KEYS = [
|
|
17
|
+
"id",
|
|
18
|
+
"type",
|
|
19
|
+
"source",
|
|
20
|
+
"filter",
|
|
21
|
+
"interactive",
|
|
22
|
+
"minZoom",
|
|
23
|
+
"maxZoom",
|
|
24
|
+
"style"
|
|
25
|
+
];
|
|
26
|
+
const SUB_LAYER_KEYS_V1 = [...SUB_LAYER_KEYS, "above", "below"];
|
|
27
|
+
const FLOW_GEOMETRIES = ["circle", "line", "fill"];
|
|
28
|
+
const DATA_SOURCE_TYPES = ["vector", "geojson", "raster"];
|
|
29
|
+
const isString = (value) => typeof value === "string";
|
|
30
|
+
const isNumber = (value) => typeof value === "number" && Number.isFinite(value);
|
|
31
|
+
const isBoolean = (value) => typeof value === "boolean";
|
|
32
|
+
const DATA_SOURCE_OPTIONS = {
|
|
33
|
+
featureId: [isString, "a string"],
|
|
34
|
+
limit: [isNumber, "a number"],
|
|
35
|
+
apiKey: [isString, "a string"],
|
|
36
|
+
cluster: [isBoolean, "a boolean"],
|
|
37
|
+
clusterRadius: [isNumber, "a number"],
|
|
38
|
+
clusterMaxZoom: [isNumber, "a number"],
|
|
39
|
+
selectionMode: [(value) => ["single", "multi", "none"].includes(value), "'single', 'multi' or 'none'"],
|
|
40
|
+
selectionState: [isString, "a string"],
|
|
41
|
+
selectionClear: [(value) => isBoolean(value) || value === "group", "a boolean or 'group'"],
|
|
42
|
+
selectionGroup: [isString, "a string"]
|
|
43
|
+
};
|
|
44
|
+
const DATA_SOURCE_KEYS = ["id", "type", "src", ...Object.keys(DATA_SOURCE_OPTIONS)];
|
|
45
|
+
function validateCompositeLayer(spec) {
|
|
46
|
+
try {
|
|
47
|
+
return validate(spec);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
return [
|
|
50
|
+
{ path: "", message: `The spec could not be read: ${e?.message ?? String(e)}`, severity: "error" }
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
class Issues {
|
|
55
|
+
constructor() {
|
|
56
|
+
__publicField(this, "list", []);
|
|
57
|
+
}
|
|
58
|
+
error(path, message) {
|
|
59
|
+
this.list.push({ path, message, severity: "error" });
|
|
60
|
+
}
|
|
61
|
+
warning(path, message) {
|
|
62
|
+
this.list.push({ path, message, severity: "warning" });
|
|
63
|
+
}
|
|
64
|
+
unknownKeys(object, known, path) {
|
|
65
|
+
for (const key of Object.keys(object)) {
|
|
66
|
+
if (!known.includes(key)) {
|
|
67
|
+
this.warning(join(path, key), `Unknown key '${key}' is kept but not used.`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function validate(spec) {
|
|
73
|
+
const issues = new Issues();
|
|
74
|
+
if (!isObject(spec)) {
|
|
75
|
+
issues.error("", `A composite layer spec must be an object, not ${describe(spec)}.`);
|
|
76
|
+
return issues.list;
|
|
77
|
+
}
|
|
78
|
+
if (Object.keys(spec).length === 0) {
|
|
79
|
+
issues.error("", "The spec is empty: it needs `layers`. Nothing is rendered.");
|
|
80
|
+
return issues.list;
|
|
81
|
+
}
|
|
82
|
+
const version = compositeLayerVersion(spec);
|
|
83
|
+
if (version === void 0) {
|
|
84
|
+
issues.error(
|
|
85
|
+
"version",
|
|
86
|
+
`Unknown version ${describe(spec.version)}: expected 2, or none for version 1. Nothing is rendered.`
|
|
87
|
+
);
|
|
88
|
+
return issues.list;
|
|
89
|
+
}
|
|
90
|
+
issues.unknownKeys(spec, SPEC_KEYS, "");
|
|
91
|
+
const dataSourceIds = validateDataSources(version, spec.dataSources, issues);
|
|
92
|
+
const { layers } = spec;
|
|
93
|
+
if (layers === void 0) {
|
|
94
|
+
issues.error("layers", "The spec has no `layers`. Nothing is rendered.");
|
|
95
|
+
} else if (!Array.isArray(layers)) {
|
|
96
|
+
issues.error("layers", `\`layers\` must be an array, not ${describe(layers)}. Nothing is rendered.`);
|
|
97
|
+
} else if (layers.length === 0) {
|
|
98
|
+
issues.warning("layers", "`layers` is empty. Nothing is rendered.");
|
|
99
|
+
} else {
|
|
100
|
+
const layerIds = /* @__PURE__ */ new Set();
|
|
101
|
+
layers.forEach(
|
|
102
|
+
(layer, index) => validateSubLayer(version, layer, `layers[${index}]`, dataSourceIds, layerIds, issues)
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return issues.list;
|
|
106
|
+
}
|
|
107
|
+
function validateDataSources(version, dataSources, issues) {
|
|
108
|
+
const ids = /* @__PURE__ */ new Set();
|
|
109
|
+
const added = /* @__PURE__ */ new Set();
|
|
110
|
+
if (dataSources === void 0) {
|
|
111
|
+
return { all: ids, added };
|
|
112
|
+
}
|
|
113
|
+
if (!Array.isArray(dataSources)) {
|
|
114
|
+
issues.error(
|
|
115
|
+
"dataSources",
|
|
116
|
+
`\`dataSources\` must be an array, not ${describe(dataSources)}. No data sources are added.`
|
|
117
|
+
);
|
|
118
|
+
return { all: ids, added };
|
|
119
|
+
}
|
|
120
|
+
dataSources.forEach((source, index) => {
|
|
121
|
+
const path = `dataSources[${index}]`;
|
|
122
|
+
if (!isObject(source)) {
|
|
123
|
+
issues.error(path, `A data source must be an object, not ${describe(source)}. It isn't added.`);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const errorCount = issues.list.length;
|
|
127
|
+
if (!isStringFull(source.id)) {
|
|
128
|
+
issues.error(join(path, "id"), "A data source needs an `id` (a string). It isn't added.");
|
|
129
|
+
} else if (ids.has(source.id)) {
|
|
130
|
+
issues.error(join(path, "id"), `Duplicate data source id '${source.id}'. Only the first is used.`);
|
|
131
|
+
} else {
|
|
132
|
+
ids.add(source.id);
|
|
133
|
+
}
|
|
134
|
+
if (source.type === void 0 && version === 1) {
|
|
135
|
+
issues.warning(join(path, "type"), "The data source has no `type`: 'vector' is used, as in legacy.");
|
|
136
|
+
} else if (!DATA_SOURCE_TYPES.includes(source.type)) {
|
|
137
|
+
issues.error(
|
|
138
|
+
join(path, "type"),
|
|
139
|
+
`Unknown data source type ${describe(source.type)}: expected 'vector', 'geojson' or 'raster'. It isn't added.`
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
if (!isStringFull(source.src)) {
|
|
143
|
+
issues.error(
|
|
144
|
+
join(path, "src"),
|
|
145
|
+
"A data source needs a `src`: a dataset ID, tile source ID or URL. It isn't added."
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
if (!issues.list.slice(errorCount).some((issue) => issue.severity === "error")) {
|
|
149
|
+
added.add(source.id);
|
|
150
|
+
}
|
|
151
|
+
for (const [key, [check, expected]] of Object.entries(DATA_SOURCE_OPTIONS)) {
|
|
152
|
+
if (source[key] !== void 0 && !check(source[key])) {
|
|
153
|
+
issues.error(join(path, key), `\`${key}\` must be ${expected}, not ${describe(source[key])}. It isn't used.`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (source.selectionMode === "single" || source.selectionMode === "multi") {
|
|
157
|
+
if (source.type === "raster") {
|
|
158
|
+
issues.error(
|
|
159
|
+
join(path, "selectionMode"),
|
|
160
|
+
"Selection isn't supported on a raster data source. The selection options aren't used."
|
|
161
|
+
);
|
|
162
|
+
} else if (!isStringFull(source.featureId)) {
|
|
163
|
+
issues.error(
|
|
164
|
+
join(path, "selectionMode"),
|
|
165
|
+
"Selection needs `featureId`, to tell features apart. The selection options aren't used."
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
issues.unknownKeys(source, DATA_SOURCE_KEYS, path);
|
|
170
|
+
});
|
|
171
|
+
return { all: ids, added };
|
|
172
|
+
}
|
|
173
|
+
function validateSubLayer(version, layer, path, dataSourceIds, layerIds, issues) {
|
|
174
|
+
if (!isObject(layer)) {
|
|
175
|
+
issues.error(path, `A sub-layer must be an object, not ${describe(layer)}. It isn't rendered.`);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (!isStringFull(layer.id)) {
|
|
179
|
+
issues.error(join(path, "id"), "A sub-layer needs an `id` (a string). It isn't rendered.");
|
|
180
|
+
} else if (layerIds.has(layer.id)) {
|
|
181
|
+
issues.error(join(path, "id"), `Duplicate sub-layer id '${layer.id}'. Only the first is rendered.`);
|
|
182
|
+
} else {
|
|
183
|
+
layerIds.add(layer.id);
|
|
184
|
+
}
|
|
185
|
+
if (!isStringFull(layer.source)) {
|
|
186
|
+
issues.error(join(path, "source"), "A sub-layer needs a `source` (a data source ID). It isn't rendered.");
|
|
187
|
+
} else if (!dataSourceIds.added.has(layer.source)) {
|
|
188
|
+
const where = dataSourceIds.all.has(layer.source) ? "is in `dataSources` but isn't added (see its errors)" : "isn't in `dataSources`";
|
|
189
|
+
issues.warning(
|
|
190
|
+
join(path, "source"),
|
|
191
|
+
`Data source '${layer.source}' ${where}. The sub-layer is rendered only if the application has added it to the map.`
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
validateFilter(layer.filter, join(path, "filter"), issues);
|
|
195
|
+
validateZoom(layer, "minZoom", 0, path, issues);
|
|
196
|
+
validateZoom(layer, "maxZoom", 18, path, issues);
|
|
197
|
+
if (version === 1) {
|
|
198
|
+
validateStyleV1(layer, path, issues);
|
|
199
|
+
} else {
|
|
200
|
+
validateStyleV2(layer, path, issues);
|
|
201
|
+
}
|
|
202
|
+
issues.unknownKeys(layer, version === 1 ? SUB_LAYER_KEYS_V1 : SUB_LAYER_KEYS, path);
|
|
203
|
+
}
|
|
204
|
+
function validateFilter(filter, path, issues) {
|
|
205
|
+
if (filter === void 0 || filter === "") {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (typeof filter !== "string") {
|
|
209
|
+
issues.error(path, `A filter must be a reactive expression string, not ${describe(filter)}. It isn't used.`);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const parseError = expressionParseError(filter);
|
|
213
|
+
if (parseError) {
|
|
214
|
+
issues.error(path, `The filter \`${filter}\` does not parse: ${parseError}. The sub-layer isn't rendered.`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function validateZoom(layer, key, defaultZoom, path, issues) {
|
|
218
|
+
if (layer[key] !== void 0 && !isNumber(layer[key])) {
|
|
219
|
+
issues.error(
|
|
220
|
+
join(path, key),
|
|
221
|
+
`\`${key}\` must be a number, not ${describe(layer[key])}. The default, ${defaultZoom}, applies.`
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function validateStyleV1(layer, path, issues) {
|
|
226
|
+
const { type, style, interactive } = layer;
|
|
227
|
+
const stylePath = join(path, "style");
|
|
228
|
+
if (!isObject(style)) {
|
|
229
|
+
issues.error(
|
|
230
|
+
stylePath,
|
|
231
|
+
`A version 1 sub-layer's style must be \`{type: 'flow', \u2026}\` or \`{type: 'maplibre', style}\`, not ${describe(style)}. The sub-layer isn't rendered.`
|
|
232
|
+
);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
if (style.type === "flow") {
|
|
236
|
+
if (!FLOW_GEOMETRIES.includes(type)) {
|
|
237
|
+
issues.error(join(path, "type"), `${geometryProblemV1(type)} The sub-layer isn't rendered.`);
|
|
238
|
+
}
|
|
239
|
+
issues.list.push(...prefixIssues(validateFlowStyle(style), stylePath));
|
|
240
|
+
if (interactive !== void 0 && typeof interactive !== "boolean") {
|
|
241
|
+
issues.warning(
|
|
242
|
+
join(path, "interactive"),
|
|
243
|
+
`\`interactive\` must be a boolean, not ${describe(interactive)}. The default, true, applies, as in legacy.`
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
} else if (style.type === "maplibre") {
|
|
247
|
+
if (isMapLibreLayerType(type)) {
|
|
248
|
+
validateStyleProgram(type, style.style, join(stylePath, "style"), issues);
|
|
249
|
+
} else {
|
|
250
|
+
issues.error(
|
|
251
|
+
join(path, "type"),
|
|
252
|
+
`Unknown type ${describe(type)}: a MapLibre-style sub-layer needs a MapLibre layer type. The sub-layer isn't rendered.`
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
issues.unknownKeys(style, ["type", "style"], stylePath);
|
|
256
|
+
if (interactive !== void 0 && typeof interactive !== "boolean") {
|
|
257
|
+
issues.warning(
|
|
258
|
+
join(path, "interactive"),
|
|
259
|
+
`\`interactive\` must be a boolean, not ${describe(interactive)}. It is read as ${Boolean(interactive)}, as in legacy.`
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
} else {
|
|
263
|
+
issues.error(
|
|
264
|
+
join(stylePath, "type"),
|
|
265
|
+
`A version 1 sub-layer's style type must be 'flow' or 'maplibre', not ${describe(style.type)}. The sub-layer isn't rendered.`
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function geometryProblemV1(type) {
|
|
270
|
+
if (type === "symbol") {
|
|
271
|
+
return "A version 1 flow style can't draw a `symbol` sub-layer: use a MapLibre style, `{type: 'maplibre', style}`.";
|
|
272
|
+
}
|
|
273
|
+
if (type === "flow") {
|
|
274
|
+
return "`type: 'flow'` needs a version 2 spec (`version: 2`). A version 1 sub-layer's `type` is its geometry.";
|
|
275
|
+
}
|
|
276
|
+
return `Unknown geometry ${describe(type)} for a version 1 flow style: expected 'circle', 'line' or 'fill'.`;
|
|
277
|
+
}
|
|
278
|
+
function validateStyleV2(layer, path, issues) {
|
|
279
|
+
const { type, style, interactive } = layer;
|
|
280
|
+
const stylePath = join(path, "style");
|
|
281
|
+
if (interactive !== void 0 && typeof interactive !== "boolean") {
|
|
282
|
+
issues.warning(
|
|
283
|
+
join(path, "interactive"),
|
|
284
|
+
`\`interactive\` must be a boolean, not ${describe(interactive)}. The default, true, applies.`
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
if (type === "flow") {
|
|
288
|
+
if (!isObject(style)) {
|
|
289
|
+
issues.error(
|
|
290
|
+
stylePath,
|
|
291
|
+
`A flow sub-layer's style must be a flow style, not ${describe(style)}. It isn't rendered.`
|
|
292
|
+
);
|
|
293
|
+
} else if (flowStyleVersion(style) === 1 && style.type === "flow") {
|
|
294
|
+
issues.error(
|
|
295
|
+
join(stylePath, "version"),
|
|
296
|
+
"A flow sub-layer takes a version 2 flow style, with `version: 2` and its geometry as `type`. Build one with `flowLayerStyle()`. The sub-layer isn't rendered."
|
|
297
|
+
);
|
|
298
|
+
} else {
|
|
299
|
+
issues.list.push(...prefixIssues(validateFlowStyle(style), stylePath));
|
|
300
|
+
}
|
|
301
|
+
} else if (isMapLibreLayerType(type)) {
|
|
302
|
+
if (typeof style === "string") {
|
|
303
|
+
validateStyleProgram(type, style, stylePath, issues);
|
|
304
|
+
} else {
|
|
305
|
+
issues.error(
|
|
306
|
+
stylePath,
|
|
307
|
+
`A '${type}' sub-layer's style must be a style program string, not ${describe(style)}; a flow style needs \`type: 'flow'\`. The sub-layer isn't rendered.`
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
issues.error(
|
|
312
|
+
join(path, "type"),
|
|
313
|
+
`Unknown type ${describe(type)}: expected 'flow' or a MapLibre layer type. The sub-layer isn't rendered.`
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function validateStyleProgram(type, program, path, issues) {
|
|
318
|
+
if (typeof program !== "string") {
|
|
319
|
+
issues.error(path, `A style program must be a string, not ${describe(program)}. The sub-layer isn't rendered.`);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
let properties;
|
|
323
|
+
try {
|
|
324
|
+
properties = Object.keys(ReactiveExpression.parseProgram(program));
|
|
325
|
+
} catch (e) {
|
|
326
|
+
issues.error(
|
|
327
|
+
path,
|
|
328
|
+
`The style program does not parse: ${e?.message ?? String(e)}. The sub-layer isn't rendered.`
|
|
329
|
+
);
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
const spec = maplibreSpec.latest;
|
|
333
|
+
for (const property of properties) {
|
|
334
|
+
if (!(property in spec[`paint_${type}`]) && !(property in spec[`layout_${type}`])) {
|
|
335
|
+
issues.error(path, `Unknown property '${property}' for a '${type}' layer. The sub-layer isn't rendered.`);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function isMapLibreLayerType(type) {
|
|
340
|
+
return typeof type === "string" && Object.prototype.hasOwnProperty.call(maplibreSpec.latest.layer.type.values, type);
|
|
341
|
+
}
|
|
342
|
+
function prefixIssues(issues, prefix) {
|
|
343
|
+
return issues.map((issue) => ({ ...issue, path: join(prefix, issue.path) }));
|
|
344
|
+
}
|
|
345
|
+
function join(path, key) {
|
|
346
|
+
if (!path) {
|
|
347
|
+
return key;
|
|
348
|
+
}
|
|
349
|
+
return key ? `${path}.${key}` : path;
|
|
350
|
+
}
|
|
351
|
+
function isObject(value) {
|
|
352
|
+
return isPlainObject(value) && !Array.isArray(value);
|
|
353
|
+
}
|
|
354
|
+
function isStringFull(value) {
|
|
355
|
+
return typeof value === "string" && value.length > 0;
|
|
356
|
+
}
|
|
357
|
+
function describe(value) {
|
|
358
|
+
if (value === null) {
|
|
359
|
+
return "null";
|
|
360
|
+
}
|
|
361
|
+
if (Array.isArray(value)) {
|
|
362
|
+
return "an array";
|
|
363
|
+
}
|
|
364
|
+
if (typeof value === "string") {
|
|
365
|
+
return `'${value}'`;
|
|
366
|
+
}
|
|
367
|
+
if (typeof value === "object") {
|
|
368
|
+
return "an object";
|
|
369
|
+
}
|
|
370
|
+
if (typeof value === "function") {
|
|
371
|
+
return "a function";
|
|
372
|
+
}
|
|
373
|
+
return String(value);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export { prefixIssues, validateCompositeLayer };
|
|
@@ -49,6 +49,15 @@ const _MapDataSource = class _MapDataSource {
|
|
|
49
49
|
get featureId() {
|
|
50
50
|
return this._options.featureId;
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Selection options the data source declares, which the
|
|
54
|
+
* {@link flow-rdf-core/plugins!SelectionPlugin | SelectionPlugin} enables. See {@link MapDataSourceOptions.selection}.
|
|
55
|
+
*
|
|
56
|
+
* @experimental
|
|
57
|
+
*/
|
|
58
|
+
get selection() {
|
|
59
|
+
return this._options.selection;
|
|
60
|
+
}
|
|
52
61
|
get dataSourceSpecification() {
|
|
53
62
|
let src = this._srcExpression ? mobx.toJS(this._srcExpression.value) : this._options.src;
|
|
54
63
|
if (isString(src)) {
|