@geode/opengeodeweb-front 10.40.0 → 10.41.0-rc.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.
- package/.build/shared/utils/file.js +1 -1
- package/.build/shared/utils/response_handlers/load.js +19 -1
- package/app/components/MissingFilesSelector.vue +84 -11
- package/app/components/ObjectSelector.vue +147 -13
- package/app/components/ThresholdFilter.vue +25 -17
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +92 -29
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +12 -4
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +16 -5
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +16 -5
- package/app/components/Viewer/Options/AttributeRangeSelector.vue +42 -8
- package/app/components/Viewer/Options/AttributeSelector.vue +101 -47
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +32 -17
- package/app/components/csv-preview/CsvSettings.vue +1 -1
- package/app/composables/global_attribute_style.ts +20 -33
- package/app/utils/attribute_range.ts +56 -0
- package/app/utils/import_workflow.ts +13 -2
- package/internal/stores/data_style/model/blocks/polyhedron.ts +23 -20
- package/internal/utils/upload_file.ts +1 -1
- package/package.json +4 -4
- package/shared/utils/file.ts +1 -1
- package/shared/utils/response_handlers/load.ts +37 -1
|
@@ -30,6 +30,8 @@ const referenceBlockId = computed<string | undefined>(() =>
|
|
|
30
30
|
collections ? targetBlockIds[0] : undefined,
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
+
const blockComponentIds = computed<string[]>(() => (blockId === undefined ? [] : [blockId]));
|
|
34
|
+
|
|
33
35
|
// Visibility
|
|
34
36
|
const blocksVisibility = computed<boolean>({
|
|
35
37
|
get: () =>
|
|
@@ -184,8 +186,14 @@ const blocksPolyhedronAttributeName = computed<string | undefined>({
|
|
|
184
186
|
if (newValue === undefined) {
|
|
185
187
|
return;
|
|
186
188
|
}
|
|
187
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeName(
|
|
188
|
-
|
|
189
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeName(
|
|
190
|
+
modelId,
|
|
191
|
+
targetBlockIds,
|
|
192
|
+
newValue,
|
|
193
|
+
);
|
|
194
|
+
if (applied) {
|
|
195
|
+
hybridViewerStore.remoteRender();
|
|
196
|
+
}
|
|
189
197
|
},
|
|
190
198
|
});
|
|
191
199
|
|
|
@@ -195,20 +203,28 @@ const blocksPolyhedronAttributeTimeStep = computed<number | undefined>({
|
|
|
195
203
|
if (newValue === undefined) {
|
|
196
204
|
return;
|
|
197
205
|
}
|
|
198
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeTimeStep(
|
|
206
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeTimeStep(
|
|
199
207
|
modelId,
|
|
200
208
|
targetBlockIds,
|
|
201
209
|
newValue,
|
|
202
210
|
);
|
|
203
|
-
|
|
211
|
+
if (applied) {
|
|
212
|
+
hybridViewerStore.remoteRender();
|
|
213
|
+
}
|
|
204
214
|
},
|
|
205
215
|
});
|
|
206
216
|
|
|
207
217
|
const blocksPolyhedronAttributeItem = computed<string | undefined>({
|
|
208
218
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, referenceBlockId.value),
|
|
209
219
|
set: async (newValue) => {
|
|
210
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeItem(
|
|
211
|
-
|
|
220
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeItem(
|
|
221
|
+
modelId,
|
|
222
|
+
targetBlockIds,
|
|
223
|
+
newValue,
|
|
224
|
+
);
|
|
225
|
+
if (applied) {
|
|
226
|
+
hybridViewerStore.remoteRender();
|
|
227
|
+
}
|
|
212
228
|
},
|
|
213
229
|
});
|
|
214
230
|
|
|
@@ -219,25 +235,29 @@ const blocksPolyhedronAttributeRange = computed<[number, number] | undefined>({
|
|
|
219
235
|
if (minimum === undefined || maximum === undefined) {
|
|
220
236
|
return;
|
|
221
237
|
}
|
|
222
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeRange(
|
|
238
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeRange(
|
|
223
239
|
modelId,
|
|
224
240
|
targetBlockIds,
|
|
225
241
|
minimum,
|
|
226
242
|
maximum,
|
|
227
243
|
);
|
|
228
|
-
|
|
244
|
+
if (applied) {
|
|
245
|
+
hybridViewerStore.remoteRender();
|
|
246
|
+
}
|
|
229
247
|
},
|
|
230
248
|
});
|
|
231
249
|
|
|
232
250
|
const blocksPolyhedronAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
233
251
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeColorMap(modelId, referenceBlockId.value),
|
|
234
252
|
set: async (newValue) => {
|
|
235
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeColorMap(
|
|
253
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeColorMap(
|
|
236
254
|
modelId,
|
|
237
255
|
targetBlockIds,
|
|
238
256
|
newValue,
|
|
239
257
|
);
|
|
240
|
-
|
|
258
|
+
if (applied) {
|
|
259
|
+
hybridViewerStore.remoteRender();
|
|
260
|
+
}
|
|
241
261
|
},
|
|
242
262
|
});
|
|
243
263
|
|
|
@@ -245,12 +265,14 @@ const blocksPolyhedronAttributeNoDataColor = computed<RGBAColor>({
|
|
|
245
265
|
get: () =>
|
|
246
266
|
dataStyleStore.modelBlocksPolyhedronAttributeNoDataColor(modelId, referenceBlockId.value),
|
|
247
267
|
set: async (newValue) => {
|
|
248
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeNoDataColor(
|
|
268
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeNoDataColor(
|
|
249
269
|
modelId,
|
|
250
270
|
targetBlockIds,
|
|
251
271
|
newValue,
|
|
252
272
|
);
|
|
253
|
-
|
|
273
|
+
if (applied) {
|
|
274
|
+
hybridViewerStore.remoteRender();
|
|
275
|
+
}
|
|
254
276
|
},
|
|
255
277
|
});
|
|
256
278
|
|
|
@@ -328,8 +350,14 @@ const polyhedronAttributeName = computed<string | undefined>({
|
|
|
328
350
|
if (blockId === undefined || newValue === undefined) {
|
|
329
351
|
return;
|
|
330
352
|
}
|
|
331
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeName(
|
|
332
|
-
|
|
353
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeName(
|
|
354
|
+
modelId,
|
|
355
|
+
[blockId],
|
|
356
|
+
newValue,
|
|
357
|
+
);
|
|
358
|
+
if (applied) {
|
|
359
|
+
hybridViewerStore.remoteRender();
|
|
360
|
+
}
|
|
333
361
|
},
|
|
334
362
|
});
|
|
335
363
|
|
|
@@ -339,8 +367,14 @@ const polyhedronAttributeTimeStep = computed<number | undefined>({
|
|
|
339
367
|
if (blockId === undefined || newValue === undefined) {
|
|
340
368
|
return;
|
|
341
369
|
}
|
|
342
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeTimeStep(
|
|
343
|
-
|
|
370
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeTimeStep(
|
|
371
|
+
modelId,
|
|
372
|
+
[blockId],
|
|
373
|
+
newValue,
|
|
374
|
+
);
|
|
375
|
+
if (applied) {
|
|
376
|
+
hybridViewerStore.remoteRender();
|
|
377
|
+
}
|
|
344
378
|
},
|
|
345
379
|
});
|
|
346
380
|
|
|
@@ -350,8 +384,14 @@ const polyhedronAttributeItem = computed<string | undefined>({
|
|
|
350
384
|
if (blockId === undefined) {
|
|
351
385
|
return;
|
|
352
386
|
}
|
|
353
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeItem(
|
|
354
|
-
|
|
387
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeItem(
|
|
388
|
+
modelId,
|
|
389
|
+
[blockId],
|
|
390
|
+
newValue,
|
|
391
|
+
);
|
|
392
|
+
if (applied) {
|
|
393
|
+
hybridViewerStore.remoteRender();
|
|
394
|
+
}
|
|
355
395
|
},
|
|
356
396
|
});
|
|
357
397
|
|
|
@@ -362,13 +402,15 @@ const polyhedronAttributeRange = computed<[number, number] | undefined>({
|
|
|
362
402
|
if (blockId === undefined || minimum === undefined || maximum === undefined) {
|
|
363
403
|
return;
|
|
364
404
|
}
|
|
365
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeRange(
|
|
405
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeRange(
|
|
366
406
|
modelId,
|
|
367
407
|
[blockId],
|
|
368
408
|
minimum,
|
|
369
409
|
maximum,
|
|
370
410
|
);
|
|
371
|
-
|
|
411
|
+
if (applied) {
|
|
412
|
+
hybridViewerStore.remoteRender();
|
|
413
|
+
}
|
|
372
414
|
},
|
|
373
415
|
});
|
|
374
416
|
|
|
@@ -378,8 +420,14 @@ const polyhedronAttributeColorMap = computed<Map<string, RGBAColor> | undefined>
|
|
|
378
420
|
if (blockId === undefined) {
|
|
379
421
|
return;
|
|
380
422
|
}
|
|
381
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeColorMap(
|
|
382
|
-
|
|
423
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeColorMap(
|
|
424
|
+
modelId,
|
|
425
|
+
[blockId],
|
|
426
|
+
newValue,
|
|
427
|
+
);
|
|
428
|
+
if (applied) {
|
|
429
|
+
hybridViewerStore.remoteRender();
|
|
430
|
+
}
|
|
383
431
|
},
|
|
384
432
|
});
|
|
385
433
|
|
|
@@ -389,8 +437,14 @@ const polyhedronAttributeNoDataColor = computed<RGBAColor>({
|
|
|
389
437
|
if (blockId === undefined) {
|
|
390
438
|
return;
|
|
391
439
|
}
|
|
392
|
-
await dataStyleStore.setModelBlocksPolyhedronAttributeNoDataColor(
|
|
393
|
-
|
|
440
|
+
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeNoDataColor(
|
|
441
|
+
modelId,
|
|
442
|
+
[blockId],
|
|
443
|
+
newValue,
|
|
444
|
+
);
|
|
445
|
+
if (applied) {
|
|
446
|
+
hybridViewerStore.remoteRender();
|
|
447
|
+
}
|
|
394
448
|
},
|
|
395
449
|
});
|
|
396
450
|
|
|
@@ -404,8 +458,17 @@ const capabilities = {
|
|
|
404
458
|
polyhedron: { available: true },
|
|
405
459
|
};
|
|
406
460
|
|
|
407
|
-
const
|
|
408
|
-
const
|
|
461
|
+
const backSchemas = back_schemas.opengeodeweb_back;
|
|
462
|
+
const attributeSchemas = {
|
|
463
|
+
vertex: {
|
|
464
|
+
names: backSchemas.model_component_vertex_attribute_names,
|
|
465
|
+
range: backSchemas.model_component_vertex_attribute_range,
|
|
466
|
+
},
|
|
467
|
+
polyhedron: {
|
|
468
|
+
names: backSchemas.model_component_polyhedron_attribute_names,
|
|
469
|
+
range: backSchemas.model_component_polyhedron_attribute_range,
|
|
470
|
+
},
|
|
471
|
+
};
|
|
409
472
|
</script>
|
|
410
473
|
|
|
411
474
|
<template>
|
|
@@ -429,7 +492,7 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr
|
|
|
429
492
|
v-model:polyhedron_attribute_no_data_color="blocksPolyhedronAttributeNoDataColor"
|
|
430
493
|
v-model:polyhedron_attribute_time_step="blocksPolyhedronAttributeTimeStep"
|
|
431
494
|
:capabilities="capabilities"
|
|
432
|
-
:schemas="
|
|
495
|
+
:schemas="attributeSchemas"
|
|
433
496
|
:allowRandom="true"
|
|
434
497
|
/>
|
|
435
498
|
</OptionsSection>
|
|
@@ -443,7 +506,7 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr
|
|
|
443
506
|
<VisibilitySwitch v-model="blockVisibility" />
|
|
444
507
|
<ViewerOptionsColoringTypeSelector
|
|
445
508
|
:id="modelId"
|
|
446
|
-
:componentIds="
|
|
509
|
+
:componentIds="blockComponentIds"
|
|
447
510
|
v-model:coloring_style_key="blockActiveColoring"
|
|
448
511
|
v-model:color="blockColor"
|
|
449
512
|
v-model:vertex_attribute_name="vertexAttributeName"
|
|
@@ -459,7 +522,7 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr
|
|
|
459
522
|
v-model:polyhedron_attribute_no_data_color="polyhedronAttributeNoDataColor"
|
|
460
523
|
v-model:polyhedron_attribute_time_step="polyhedronAttributeTimeStep"
|
|
461
524
|
:capabilities="capabilities"
|
|
462
|
-
:schemas="
|
|
525
|
+
:schemas="attributeSchemas"
|
|
463
526
|
:allowRandom="true"
|
|
464
527
|
/>
|
|
465
528
|
</OptionsSection>
|
|
@@ -29,6 +29,8 @@ const referenceCornerId = computed<string | undefined>(() =>
|
|
|
29
29
|
collections ? targetCornerIds[0] : undefined,
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
+
const cornerComponentIds = computed<string[]>(() => (cornerId === undefined ? [] : [cornerId]));
|
|
33
|
+
|
|
32
34
|
// Visibility
|
|
33
35
|
const cornersVisibility = computed<boolean>({
|
|
34
36
|
get: () =>
|
|
@@ -258,7 +260,13 @@ const capabilities = {
|
|
|
258
260
|
polyhedron: { available: false },
|
|
259
261
|
};
|
|
260
262
|
|
|
261
|
-
const
|
|
263
|
+
const backSchemas = back_schemas.opengeodeweb_back;
|
|
264
|
+
const attributeSchemas = {
|
|
265
|
+
vertex: {
|
|
266
|
+
names: backSchemas.model_component_vertex_attribute_names,
|
|
267
|
+
range: backSchemas.model_component_vertex_attribute_range,
|
|
268
|
+
},
|
|
269
|
+
};
|
|
262
270
|
</script>
|
|
263
271
|
|
|
264
272
|
<template>
|
|
@@ -276,7 +284,7 @@ const vertexSchema = back_schemas.opengeodeweb_back.model_component_vertex_attri
|
|
|
276
284
|
v-model:vertex_attribute_no_data_color="cornersVertexAttributeNoDataColor"
|
|
277
285
|
v-model:vertex_attribute_time_step="cornersVertexAttributeTimeStep"
|
|
278
286
|
:capabilities="capabilities"
|
|
279
|
-
:schemas="
|
|
287
|
+
:schemas="attributeSchemas"
|
|
280
288
|
:allowRandom="true"
|
|
281
289
|
/>
|
|
282
290
|
</OptionsSection>
|
|
@@ -290,7 +298,7 @@ const vertexSchema = back_schemas.opengeodeweb_back.model_component_vertex_attri
|
|
|
290
298
|
<VisibilitySwitch v-model="cornerVisibility" />
|
|
291
299
|
<ViewerOptionsColoringTypeSelector
|
|
292
300
|
:id="modelId"
|
|
293
|
-
:componentIds="
|
|
301
|
+
:componentIds="cornerComponentIds"
|
|
294
302
|
v-model:coloring_style_key="cornerActiveColoring"
|
|
295
303
|
v-model:color="cornerColor"
|
|
296
304
|
v-model:vertex_attribute_name="vertexAttributeName"
|
|
@@ -300,7 +308,7 @@ const vertexSchema = back_schemas.opengeodeweb_back.model_component_vertex_attri
|
|
|
300
308
|
v-model:vertex_attribute_no_data_color="vertexAttributeNoDataColor"
|
|
301
309
|
v-model:vertex_attribute_time_step="vertexAttributeTimeStep"
|
|
302
310
|
:capabilities="capabilities"
|
|
303
|
-
:schemas="
|
|
311
|
+
:schemas="attributeSchemas"
|
|
304
312
|
:allowRandom="true"
|
|
305
313
|
/>
|
|
306
314
|
</OptionsSection>
|
|
@@ -29,6 +29,8 @@ const referenceLineId = computed<string | undefined>(() =>
|
|
|
29
29
|
collections ? targetLineIds[0] : undefined,
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
+
const lineComponentIds = computed<string[]>(() => (lineId === undefined ? [] : [lineId]));
|
|
33
|
+
|
|
32
34
|
// Visibility
|
|
33
35
|
const linesVisibility = computed<boolean>({
|
|
34
36
|
get: () =>
|
|
@@ -375,8 +377,17 @@ const capabilities = {
|
|
|
375
377
|
polyhedron: { available: false },
|
|
376
378
|
};
|
|
377
379
|
|
|
378
|
-
const
|
|
379
|
-
const
|
|
380
|
+
const backSchemas = back_schemas.opengeodeweb_back;
|
|
381
|
+
const attributeSchemas = {
|
|
382
|
+
vertex: {
|
|
383
|
+
names: backSchemas.model_component_vertex_attribute_names,
|
|
384
|
+
range: backSchemas.model_component_vertex_attribute_range,
|
|
385
|
+
},
|
|
386
|
+
edge: {
|
|
387
|
+
names: backSchemas.model_component_edge_attribute_names,
|
|
388
|
+
range: backSchemas.model_component_edge_attribute_range,
|
|
389
|
+
},
|
|
390
|
+
};
|
|
380
391
|
</script>
|
|
381
392
|
|
|
382
393
|
<template>
|
|
@@ -400,7 +411,7 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
|
|
|
400
411
|
v-model:edge_attribute_no_data_color="linesEdgeAttributeNoDataColor"
|
|
401
412
|
v-model:edge_attribute_time_step="linesEdgeAttributeTimeStep"
|
|
402
413
|
:capabilities="capabilities"
|
|
403
|
-
:schemas="
|
|
414
|
+
:schemas="attributeSchemas"
|
|
404
415
|
:allowRandom="true"
|
|
405
416
|
/>
|
|
406
417
|
</OptionsSection>
|
|
@@ -414,7 +425,7 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
|
|
|
414
425
|
<VisibilitySwitch v-model="lineVisibility" />
|
|
415
426
|
<ViewerOptionsColoringTypeSelector
|
|
416
427
|
:id="modelId"
|
|
417
|
-
:componentIds="
|
|
428
|
+
:componentIds="lineComponentIds"
|
|
418
429
|
v-model:coloring_style_key="lineActiveColoring"
|
|
419
430
|
v-model:color="lineColor"
|
|
420
431
|
v-model:vertex_attribute_name="vertexAttributeName"
|
|
@@ -430,7 +441,7 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
|
|
|
430
441
|
v-model:edge_attribute_no_data_color="edgeAttributeNoDataColor"
|
|
431
442
|
v-model:edge_attribute_time_step="edgeAttributeTimeStep"
|
|
432
443
|
:capabilities="capabilities"
|
|
433
|
-
:schemas="
|
|
444
|
+
:schemas="attributeSchemas"
|
|
434
445
|
:allowRandom="true"
|
|
435
446
|
/>
|
|
436
447
|
</OptionsSection>
|
|
@@ -30,6 +30,8 @@ const referenceSurfaceId = computed<string | undefined>(() =>
|
|
|
30
30
|
collections ? targetSurfaceIds[0] : undefined,
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
+
const surfaceComponentIds = computed<string[]>(() => (surfaceId === undefined ? [] : [surfaceId]));
|
|
34
|
+
|
|
33
35
|
// Visibility
|
|
34
36
|
const surfacesVisibility = computed<boolean>({
|
|
35
37
|
get: () =>
|
|
@@ -426,8 +428,17 @@ const capabilities = {
|
|
|
426
428
|
polyhedron: { available: false },
|
|
427
429
|
};
|
|
428
430
|
|
|
429
|
-
const
|
|
430
|
-
const
|
|
431
|
+
const backSchemas = back_schemas.opengeodeweb_back;
|
|
432
|
+
const attributeSchemas = {
|
|
433
|
+
vertex: {
|
|
434
|
+
names: backSchemas.model_component_vertex_attribute_names,
|
|
435
|
+
range: backSchemas.model_component_vertex_attribute_range,
|
|
436
|
+
},
|
|
437
|
+
polygon: {
|
|
438
|
+
names: backSchemas.model_component_polygon_attribute_names,
|
|
439
|
+
range: backSchemas.model_component_polygon_attribute_range,
|
|
440
|
+
},
|
|
441
|
+
};
|
|
431
442
|
</script>
|
|
432
443
|
|
|
433
444
|
<template>
|
|
@@ -451,7 +462,7 @@ const polygonSchema = back_schemas.opengeodeweb_back.model_component_polygon_att
|
|
|
451
462
|
v-model:polygon_attribute_no_data_color="surfacesPolygonAttributeNoDataColor"
|
|
452
463
|
v-model:polygon_attribute_time_step="surfacesPolygonAttributeTimeStep"
|
|
453
464
|
:capabilities="capabilities"
|
|
454
|
-
:schemas="
|
|
465
|
+
:schemas="attributeSchemas"
|
|
455
466
|
:allowRandom="true"
|
|
456
467
|
/>
|
|
457
468
|
</OptionsSection>
|
|
@@ -465,7 +476,7 @@ const polygonSchema = back_schemas.opengeodeweb_back.model_component_polygon_att
|
|
|
465
476
|
<VisibilitySwitch v-model="surfaceVisibility" />
|
|
466
477
|
<ViewerOptionsColoringTypeSelector
|
|
467
478
|
:id="modelId"
|
|
468
|
-
:componentIds="
|
|
479
|
+
:componentIds="surfaceComponentIds"
|
|
469
480
|
v-model:coloring_style_key="surfaceActiveColoring"
|
|
470
481
|
v-model:color="surfaceColor"
|
|
471
482
|
v-model:vertex_attribute_name="vertexAttributeName"
|
|
@@ -481,7 +492,7 @@ const polygonSchema = back_schemas.opengeodeweb_back.model_component_polygon_att
|
|
|
481
492
|
v-model:polygon_attribute_no_data_color="polygonAttributeNoDataColor"
|
|
482
493
|
v-model:polygon_attribute_time_step="polygonAttributeTimeStep"
|
|
483
494
|
:capabilities="capabilities"
|
|
484
|
-
:schemas="
|
|
495
|
+
:schemas="attributeSchemas"
|
|
485
496
|
:allowRandom="true"
|
|
486
497
|
/>
|
|
487
498
|
</OptionsSection>
|
|
@@ -7,6 +7,40 @@ const emit = defineEmits<Emits>();
|
|
|
7
7
|
|
|
8
8
|
const minimum = defineModel<number>("minimum");
|
|
9
9
|
const maximum = defineModel<number>("maximum");
|
|
10
|
+
|
|
11
|
+
const minimumText = ref<string>("");
|
|
12
|
+
const maximumText = ref<string>("");
|
|
13
|
+
|
|
14
|
+
watch(minimum, (value) => (minimumText.value = value === undefined ? "" : String(value)), {
|
|
15
|
+
immediate: true,
|
|
16
|
+
});
|
|
17
|
+
watch(maximum, (value) => (maximumText.value = value === undefined ? "" : String(value)), {
|
|
18
|
+
immediate: true,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Text inputs (not type="number") so scientific notation like 1.5e7 can be typed, committed on enter or blur.
|
|
22
|
+
function parseValue(text: string): number | undefined {
|
|
23
|
+
const value = Number(text.trim());
|
|
24
|
+
return text.trim() === "" || !Number.isFinite(value) ? undefined : value;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function commitMinimum(): void {
|
|
28
|
+
const value = parseValue(minimumText.value);
|
|
29
|
+
if (value === undefined) {
|
|
30
|
+
minimumText.value = minimum.value === undefined ? "" : String(minimum.value);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
minimum.value = value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function commitMaximum(): void {
|
|
37
|
+
const value = parseValue(maximumText.value);
|
|
38
|
+
if (value === undefined) {
|
|
39
|
+
maximumText.value = maximum.value === undefined ? "" : String(maximum.value);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
maximum.value = value;
|
|
43
|
+
}
|
|
10
44
|
</script>
|
|
11
45
|
|
|
12
46
|
<template>
|
|
@@ -14,11 +48,11 @@ const maximum = defineModel<number>("maximum");
|
|
|
14
48
|
<v-col cols="5" class="pe-1">
|
|
15
49
|
<v-text-field
|
|
16
50
|
data-testid="attributeMinInput"
|
|
17
|
-
|
|
18
|
-
@
|
|
51
|
+
v-model="minimumText"
|
|
52
|
+
@keydown.enter="commitMinimum"
|
|
53
|
+
@blur="commitMinimum"
|
|
19
54
|
label="Min"
|
|
20
|
-
|
|
21
|
-
:max="maximum"
|
|
55
|
+
inputmode="decimal"
|
|
22
56
|
density="compact"
|
|
23
57
|
hide-details
|
|
24
58
|
variant="outlined"
|
|
@@ -38,11 +72,11 @@ const maximum = defineModel<number>("maximum");
|
|
|
38
72
|
<v-col cols="5" class="ps-1">
|
|
39
73
|
<v-text-field
|
|
40
74
|
data-testid="attributeMaxInput"
|
|
41
|
-
|
|
42
|
-
@
|
|
75
|
+
v-model="maximumText"
|
|
76
|
+
@keydown.enter="commitMaximum"
|
|
77
|
+
@blur="commitMaximum"
|
|
43
78
|
label="Max"
|
|
44
|
-
|
|
45
|
-
:min="minimum"
|
|
79
|
+
inputmode="decimal"
|
|
46
80
|
density="compact"
|
|
47
81
|
hide-details
|
|
48
82
|
variant="outlined"
|