@geode/opengeodeweb-front 10.26.1 → 10.26.2

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 (30) hide show
  1. package/app/components/CameraManager/List.vue +1 -1
  2. package/app/components/CameraOrientation.vue +2 -2
  3. package/app/components/FileUploader.vue +1 -1
  4. package/app/components/HybridRenderingView.vue +6 -3
  5. package/app/components/HybridViewerTooltip.vue +20 -10
  6. package/app/components/Screenshot.vue +4 -4
  7. package/app/components/ViewToolbar.vue +3 -3
  8. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +1 -1
  9. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +1 -0
  10. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +8 -1
  11. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +8 -4
  12. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +4 -1
  13. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +1 -0
  14. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +1 -1
  15. package/app/components/Viewer/Generic/Model/CornersOptions.vue +2 -1
  16. package/app/components/Viewer/Generic/Model/LinesOptions.vue +1 -1
  17. package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +1 -1
  18. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +1 -1
  19. package/app/components/Viewer/Options/TextureItem.vue +6 -6
  20. package/app/components/Viewer/Options/TexturesSelector.vue +2 -3
  21. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +2 -1
  22. package/app/components/Viewer/Solid/PolygonsOptions.vue +5 -1
  23. package/app/components/Viewer/Ui.vue +1 -1
  24. package/app/utils/colormap.js +1 -0
  25. package/app/utils/default_styles/meshes.js +4 -2
  26. package/app/utils/local/cleanup.js +8 -3
  27. package/app/utils/local/microservices.js +1 -1
  28. package/app/utils/local/scripts.js +14 -6
  29. package/internal/stores/data_style/model/color.js +4 -4
  30. package/package.json +1 -1
@@ -54,7 +54,7 @@ async function saveRename() {
54
54
  color="success"
55
55
  size="x-small"
56
56
  class="mr-1"
57
- :data-testid="'restoreCameraPosition' + position.name + 'Button'"
57
+ :data-testid="`restoreCameraPosition${position.name}Button`"
58
58
  @click="restorePosition(position.id)"
59
59
  >
60
60
  <v-icon size="14">mdi-play</v-icon>
@@ -212,7 +212,7 @@ watch(hoveredFace, (newFace, oldFace) => {
212
212
  size="32"
213
213
  class="satellite-node position-absolute"
214
214
  :style="orientation.position"
215
- :data-testid="'cameraOrientation' + orientation.vtkKey + 'Button'"
215
+ :data-testid="`cameraOrientation${orientation.vtkKey}Button`"
216
216
  @mouseenter="hoveredFace = orientation.face"
217
217
  @mouseleave="hoveredFace = undefined"
218
218
  @click.stop="emit('select', orientation.value)"
@@ -242,7 +242,7 @@ watch(hoveredFace, (newFace, oldFace) => {
242
242
  size="32"
243
243
  variant="text"
244
244
  class="ma-1"
245
- :data-testid="'cameraOrientation' + orientation.vtkKey + 'Button'"
245
+ :data-testid="`cameraOrientation${orientation.vtkKey}Button`"
246
246
  @mouseenter="hoveredFace = orientation.face"
247
247
  @mouseleave="hoveredFace = undefined"
248
248
  @click.stop="emit('select', orientation.value)"
@@ -129,9 +129,9 @@ watch(
129
129
  />
130
130
  <DragAndDrop
131
131
  ref="dragAndDropRef"
132
- class="d-none"
133
132
  :multiple
134
133
  :accept
134
+ :inline="false"
135
135
  @files-selected="processSelectedFiles"
136
136
  />
137
137
  </template>
@@ -95,10 +95,13 @@ async function handleClick(event) {
95
95
  </ClientOnly>
96
96
  </template>
97
97
 
98
- <style scoped>
99
- :deep(img) {
100
- pointer-events: none;
98
+ <style>
99
+ [data-testid="hybridViewer"] img {
100
+ pointer-events: none !important;
101
101
  }
102
+ </style>
103
+
104
+ <style scoped>
102
105
  .picking-cursor {
103
106
  cursor: crosshair !important;
104
107
  }
@@ -63,6 +63,11 @@ const originalIndex = computed(() => {
63
63
  }
64
64
  return Math.floor(Number(originalId));
65
65
  });
66
+ const RESERVED_ATTRIBUTE_KEYS = new Set([
67
+ "coordinates",
68
+ "vtkOriginalCellIds",
69
+ "vtkOriginalPointIds",
70
+ ]);
66
71
 
67
72
  const hasOtherAttributes = computed(() => {
68
73
  const attributes = hybridViewerStore.hoverData?.attributes || {};
@@ -71,6 +76,16 @@ const hasOtherAttributes = computed(() => {
71
76
  );
72
77
  });
73
78
 
79
+ const sortedAttributes = computed(() => {
80
+ const attributes = hybridViewerStore.hoverData?.attributes || {};
81
+ return (
82
+ Object.entries(attributes)
83
+ .filter(([key]) => !RESERVED_ATTRIBUTE_KEYS.has(key))
84
+ // oxlint-disable-next-line unicorn/no-array-sort
85
+ .sort(([keyA], [keyB]) => keyA.localeCompare(keyB))
86
+ );
87
+ });
88
+
74
89
  function capitalize(val) {
75
90
  if (!val) {
76
91
  return "";
@@ -156,15 +171,8 @@ function formatAttributeValue(val) {
156
171
  {{ Number(hybridViewerStore.hoverData.attributes.coordinates[2]).toFixed(3) }} ]
157
172
  </span>
158
173
  </v-col>
159
- <template v-for="(val, name) in hybridViewerStore.hoverData.attributes" :key="name">
160
- <v-col
161
- v-if="
162
- name !== 'coordinates' &&
163
- name !== 'vtkOriginalCellIds' &&
164
- name !== 'vtkOriginalPointIds'
165
- "
166
- class="d-flex justify-space-between ga-3"
167
- >
174
+ <template v-for="[name, val] in sortedAttributes" :key="name">
175
+ <v-col class="d-flex justify-space-between ga-3">
168
176
  <span class="tooltip-label">{{ capitalize(name) }}:</span>
169
177
  <span class="tooltip-value font-mono">
170
178
  {{ formatAttributeValue(val) }}
@@ -183,7 +191,7 @@ function formatAttributeValue(val) {
183
191
  pointer-events: none;
184
192
  z-index: 4;
185
193
  min-width: 200px;
186
- max-width: 450px;
194
+ max-width: max-content;
187
195
  transition: opacity 0.15s ease;
188
196
  }
189
197
  .font-mono {
@@ -197,10 +205,12 @@ function formatAttributeValue(val) {
197
205
  .tooltip-label {
198
206
  color: #bdbdbd;
199
207
  font-weight: bold;
208
+ white-space: nowrap;
200
209
  }
201
210
  .tooltip-value {
202
211
  color: #a7ffeb;
203
212
  font-weight: 500;
213
+ white-space: nowrap;
204
214
  }
205
215
  .tooltip-value-dim {
206
216
  color: #eeeeee;
@@ -102,10 +102,10 @@ watch(screenshot_type, (value) => {
102
102
  File
103
103
  </v-btn>
104
104
  <v-btn
105
+ data-testid="screenshotClipboardButton"
105
106
  value="clipboard"
106
107
  prepend-icon="mdi-content-copy"
107
108
  size="small"
108
- data-testid="screenshotClipboardButton"
109
109
  class="text-caption text-none"
110
110
  >
111
111
  Clipboard
@@ -117,11 +117,11 @@ watch(screenshot_type, (value) => {
117
117
  <v-row dense v-if="screenshot_type === 'file'">
118
118
  <v-col cols="12" class="py-1">
119
119
  <v-text-field
120
+ data-testid="screenshotFileNameInput"
120
121
  v-model="filename"
121
122
  label="File name"
122
123
  variant="outlined"
123
124
  density="compact"
124
- data-testid="screenshotFileNameInput"
125
125
  hide-details
126
126
  class="text-caption"
127
127
  ></v-text-field>
@@ -144,10 +144,10 @@ watch(screenshot_type, (value) => {
144
144
  <v-row dense>
145
145
  <v-col cols="12" class="py-1">
146
146
  <v-switch
147
+ data-testid="screenshotIncludeBackgroundSwitch"
147
148
  v-model="include_background"
148
149
  :disabled="screenshot_type === 'file' && output_extension !== 'png'"
149
150
  label="Include background"
150
- data-testid="screenshotIncludeBackgroundSwitch"
151
151
  density="compact"
152
152
  hide-details
153
153
  inset
@@ -170,10 +170,10 @@ watch(screenshot_type, (value) => {
170
170
  Cancel
171
171
  </v-btn>
172
172
  <v-btn
173
+ data-testid="screenshotActionButton"
173
174
  variant="outlined"
174
175
  size="small"
175
176
  class="text-caption text-none"
176
- data-testid="screenshotActionButton"
177
177
  :disabled="(screenshot_type === 'file' && !filename) || !output_extension"
178
178
  color="white"
179
179
  @click="takeScreenshot()"
@@ -62,8 +62,8 @@ const camera_options = computed(() => [
62
62
  menu: [
63
63
  {
64
64
  title: "Cells",
65
- icon: "mdi-select-all",
66
65
  testId: "highlightOnHoverCellsButton",
66
+ icon: "mdi-select-all",
67
67
  action: () => {
68
68
  if (
69
69
  hybridViewerStore.is_hover_highlight &&
@@ -79,8 +79,8 @@ const camera_options = computed(() => [
79
79
  },
80
80
  {
81
81
  title: "Points",
82
- icon: "mdi-select-drag",
83
82
  testId: "highlightOnHoverPointsButton",
83
+ icon: "mdi-select-drag",
84
84
  action: () => {
85
85
  if (
86
86
  hybridViewerStore.is_hover_highlight &&
@@ -180,9 +180,9 @@ const camera_options = computed(() => [
180
180
  <v-row dense>
181
181
  <v-col v-for="item in camera_option.menu" :key="item.title">
182
182
  <ActionButton
183
+ :data-testid="item.testId"
183
184
  :icon="item.icon"
184
185
  :tooltip="item.title"
185
- :data-testid="item.testId"
186
186
  :color="
187
187
  hybridViewerStore.is_hover_highlight &&
188
188
  hybridViewerStore.hover_highlight_field_type ===
@@ -121,7 +121,7 @@ const edge_attribute_color_map = computed({
121
121
  <ViewerOptionsVisibilitySwitch data-testid="meshEdgesVisibilitySwitch" v-model="visibility" />
122
122
  <template v-if="visibility">
123
123
  <v-divider class="my-2" />
124
- <ViewerOptionsWidthSlider v-model="width" />
124
+ <ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="width" />
125
125
  <ViewerOptionsColoringTypeSelector
126
126
  :id="id"
127
127
  v-model:coloring_style_key="coloring_style_key"
@@ -121,6 +121,7 @@ const cell_attribute_color_map = computed({
121
121
  <template #options>
122
122
  <ViewerOptionsVisibilitySwitch data-testid="meshCellsVisibilitySwitch" v-model="visibility" />
123
123
  <template v-if="visibility">
124
+ <v-divider />
124
125
  <ViewerOptionsColoringTypeSelector
125
126
  :id="id"
126
127
  v-model:coloring_style_key="coloring_style_key"
@@ -66,7 +66,14 @@ const color = computed({
66
66
  :btnImage="btnImage"
67
67
  >
68
68
  <template #options>
69
- <ViewerOptionsVisibilitySwitch data-testid="meshEdgesVisibilitySwitch" v-model="visibility" />
69
+ <v-row>
70
+ <v-col>
71
+ <ViewerOptionsVisibilitySwitch
72
+ data-testid="meshEdgesVisibilitySwitch"
73
+ v-model="visibility"
74
+ />
75
+ </v-col>
76
+ </v-row>
70
77
  <template v-if="visibility">
71
78
  <v-divider class="my-2" />
72
79
  <ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="size" />
@@ -93,10 +93,14 @@ const vertex_attribute_color_map = computed({
93
93
  :btnImage="btnImage"
94
94
  >
95
95
  <template #options>
96
- <ViewerOptionsVisibilitySwitch
97
- data-testid="meshPointsVisibilitySwitch"
98
- v-model="visibility"
99
- />
96
+ <v-row class="pa-1">
97
+ <v-col>
98
+ <ViewerOptionsVisibilitySwitch
99
+ data-testid="meshPointsVisibilitySwitch"
100
+ v-model="visibility"
101
+ />
102
+ </v-col>
103
+ </v-row>
100
104
  <template v-if="visibility">
101
105
  <v-divider class="my-2" />
102
106
  <ViewerOptionsSizeSlider data-testid="meshPointsSizeSlider" v-model="size" />
@@ -11,10 +11,11 @@ const dataStyleStore = useDataStyleStore();
11
11
  const hybridViewerStore = useHybridViewerStore();
12
12
  const { applyBatchStyle } = useBatchStyle();
13
13
 
14
- const { itemProps, btnImage, tooltip } = defineProps({
14
+ const { itemProps, btnImage, tooltip, capabilities } = defineProps({
15
15
  itemProps: { type: Object, required: true },
16
16
  btnImage: { type: String, required: true },
17
17
  tooltip: { type: String, required: false, default: "Polygons options" },
18
+ capabilities: { type: Object, default: () => ({}) },
18
19
  });
19
20
 
20
21
  const id = toRef(() => itemProps.id);
@@ -70,11 +71,13 @@ const textures = computed({
70
71
  v-model="visibility"
71
72
  />
72
73
  <template v-if="visibility">
74
+ <v-divider />
73
75
  <ViewerOptionsColoringTypeSelector
74
76
  :id="id"
75
77
  v-model:coloring_style_key="coloring_style_key"
76
78
  v-model:color="color"
77
79
  v-model:textures="textures"
80
+ :capabilities="capabilities"
78
81
  />
79
82
  </template>
80
83
  </template>
@@ -117,6 +117,7 @@ const polyhedron_attribute_color_map = computed({
117
117
  v-model="visibility"
118
118
  />
119
119
  <template v-if="visibility">
120
+ <v-divider />
120
121
  <ViewerOptionsColoringTypeSelector
121
122
  :id="id"
122
123
  v-model:coloring_style_key="coloring_style_key"
@@ -203,7 +203,7 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr
203
203
 
204
204
  <template>
205
205
  <OptionsSection title="Blocks Options" class="mt-4">
206
- <VisibilitySwitch v-model="blocksVisibility" />
206
+ <VisibilitySwitch data-testid="modelBlocksVisibilitySwitch" v-model="blocksVisibility" />
207
207
  <ViewerOptionsColoringTypeSelector
208
208
  :id="modelId"
209
209
  :componentId="targetBlockIds[0]"
@@ -13,6 +13,7 @@ const { modelId, cornerId, targetCornerIds } = defineProps({
13
13
  });
14
14
 
15
15
  const dataStyleStore = useDataStyleStore();
16
+ console.log("CornersOptions setup!");
16
17
  const hybridViewerStore = useHybridViewerStore();
17
18
 
18
19
  // Visibility
@@ -140,7 +141,7 @@ const vertexSchema = back_schemas.opengeodeweb_back.model_component_vertex_attri
140
141
 
141
142
  <template>
142
143
  <OptionsSection title="Corners Options" class="mt-4">
143
- <VisibilitySwitch v-model="cornersVisibility" />
144
+ <VisibilitySwitch data-testid="modelCornersVisibilitySwitch" v-model="cornersVisibility" />
144
145
  <ViewerOptionsColoringTypeSelector
145
146
  :id="modelId"
146
147
  :componentId="targetCornerIds[0]"
@@ -199,7 +199,7 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
199
199
 
200
200
  <template>
201
201
  <OptionsSection title="Lines Options" class="mt-4">
202
- <VisibilitySwitch v-model="linesVisibility" />
202
+ <VisibilitySwitch data-testid="modelLinesVisibilitySwitch" v-model="linesVisibility" />
203
203
  <ViewerOptionsColoringTypeSelector
204
204
  :id="modelId"
205
205
  :componentId="targetLineIds[0]"
@@ -122,7 +122,7 @@ const modelComponentsColor = computed({
122
122
  <template>
123
123
  <v-sheet class="model-style-card" color="transparent">
124
124
  <OptionsSection title="Model Options">
125
- <VisibilitySwitch v-model="modelVisibility" />
125
+ <VisibilitySwitch data-testid="modelStyleVisibilitySwitch" v-model="modelVisibility" />
126
126
  </OptionsSection>
127
127
 
128
128
  <OptionsSection v-if="!componentType && !componentId" title="Components Options" class="mt-4">
@@ -207,7 +207,7 @@ const polygonSchema = back_schemas.opengeodeweb_back.model_component_polygon_att
207
207
 
208
208
  <template>
209
209
  <OptionsSection title="Surfaces Options" class="mt-4">
210
- <VisibilitySwitch v-model="surfacesVisibility" />
210
+ <VisibilitySwitch data-testid="modelSurfacesVisibilitySwitch" v-model="surfacesVisibility" />
211
211
  <ViewerOptionsColoringTypeSelector
212
212
  :id="modelId"
213
213
  :componentId="targetSurfaceIds[0]"
@@ -95,19 +95,19 @@ watch(textureId, (value) => {
95
95
  hide-details
96
96
  />
97
97
  </v-col>
98
- <v-badge :model-value="textureId != ''" color="white" floating dot offset-x="10" offset-y="10">
99
- <v-col cols="1" class="ma-1" justify="center" align="center">
98
+ <v-col cols="1" class="ma-1 d-flex justify-center align-center">
99
+ <v-badge :model-value="textureId !== ''" color="white" floating dot offset-x="10" offset-y="10">
100
100
  <FileUploader
101
- @files_uploaded="files_uploaded_event($event, index)"
101
+ @files_uploaded="files_uploaded_event($event)"
102
102
  :accept="['image/png', 'image/jpeg', 'image/bmp']"
103
103
  :autoUpload="true"
104
104
  :multiple="true"
105
105
  :mini="true"
106
106
  class="mt-2"
107
107
  />
108
- </v-col>
109
- </v-badge>
110
- <v-col v-if="textureName == '' || textureId == ''" cols="1">
108
+ </v-badge>
109
+ </v-col>
110
+ <v-col v-if="textureName === '' || textureId === ''" cols="1">
111
111
  <v-icon size="20" icon="mdi-close-circle" v-tooltip:bottom="'Invalid texture'" />
112
112
  </v-col>
113
113
  </template>
@@ -10,7 +10,7 @@ const { id } = defineProps({
10
10
  const internal_textures = ref([]);
11
11
 
12
12
  onMounted(() => {
13
- if (textures.value === null) {
13
+ if (textures.value === null || textures.value === undefined || textures.value.length === 0) {
14
14
  internal_textures.value = [{ id: "", texture_name: "" }];
15
15
  } else {
16
16
  internal_textures.value = textures.value;
@@ -29,8 +29,7 @@ function update_value_event($event, index) {
29
29
  </script>
30
30
 
31
31
  <template>
32
- <v-row v-for="(texture, index) in internal_textures" :key="texture" align="center">
33
- <br />
32
+ <v-row v-for="(texture, index) in internal_textures" :key="index" align="center" class="mt-2">
34
33
  <v-col cols="1" class="pa-0">
35
34
  <v-icon
36
35
  v-if="internal_textures.length > 1"
@@ -2,6 +2,7 @@
2
2
  import PointSetPoints from "@ogw_front/assets/viewer_svgs/point_set_points.svg";
3
3
  import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem";
4
4
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
5
+ import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size";
5
6
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
6
7
 
7
8
  import { useBatchStyle } from "@ogw_front/composables/batch_style";
@@ -96,7 +97,7 @@ const vertex_attribute_color_map = computed({
96
97
  />
97
98
  <template v-if="visibility">
98
99
  <v-divider class="my-2" />
99
- <ViewerOptionsSizeSlider v-model="size" />
100
+ <ViewerOptionsSizeSlider data-testid="meshPointsSizeSlider" v-model="size" />
100
101
  <ViewerOptionsColoringTypeSelector
101
102
  :id="id"
102
103
  v-model:coloring_style_key="coloring_style_key"
@@ -8,5 +8,9 @@ const { itemProps } = defineProps({
8
8
  </script>
9
9
 
10
10
  <template>
11
- <ViewerGenericMeshPolygonsOptions :itemProps="itemProps" :btnImage="SolidFacets" />
11
+ <ViewerGenericMeshPolygonsOptions
12
+ :itemProps="itemProps"
13
+ :btnImage="SolidFacets"
14
+ :capabilities="{ textures: { available: false } }"
15
+ />
12
16
  </template>
@@ -112,12 +112,12 @@ defineExpose({ get_viewer_id });
112
112
  class="picking-message-container d-flex justify-center w-100 pa-4"
113
113
  >
114
114
  <v-chip
115
+ data-testid="hoverHighlightChip"
115
116
  color="primary"
116
117
  elevation="8"
117
118
  size="large"
118
119
  variant="flat"
119
120
  class="pick-pulse"
120
- data-testid="hoverHighlightChip"
121
121
  style="pointer-events: auto"
122
122
  @click="stopHoverHighlight"
123
123
  >
@@ -1,3 +1,4 @@
1
+ // oxlint-disable unicorn/prefer-export-from
1
2
  import colormaps from "@ogw_front/assets/colormaps.json";
2
3
 
3
4
  import { newInstance as vtkColorTransferFunction } from "@kitware/vtk.js/Rendering/Core/ColorTransferFunction";
@@ -69,7 +69,8 @@ function meshCellsDefaultStyle(
69
69
  storedConfigs: {},
70
70
  },
71
71
  constant,
72
- textures: undefined,
72
+ // oxlint-disable-next-line unicorn/no-null
73
+ textures: null,
73
74
  vertex: {
74
75
  name: undefined,
75
76
  storedConfigs: {},
@@ -87,7 +88,8 @@ function meshPolygonsDefaultStyle(
87
88
  coloring: {
88
89
  active: MESH_DEFAULT_ACTIVE_COLORING,
89
90
  constant,
90
- textures: undefined,
91
+ // oxlint-disable-next-line unicorn/no-null
92
+ textures: null,
91
93
  polygon: {
92
94
  name: undefined,
93
95
  storedConfigs: {},
@@ -38,9 +38,14 @@ function killHttpMicroservice(microservice) {
38
38
  console.log("killHttpMicroservice", { ...microservice });
39
39
  const failMessage = `Failed to kill ${microservice.name}`;
40
40
  async function do_kill() {
41
- await fetch(microservice.url, {
42
- method: microservice.method,
43
- });
41
+ try {
42
+ const fetchFunc = typeof $fetch === "undefined" ? fetch : $fetch;
43
+ await fetchFunc(microservice.url, {
44
+ method: microservice.method,
45
+ });
46
+ } catch (error) {
47
+ console.log(`Expected error during kill of ${microservice.name}:`, error.message);
48
+ }
44
49
  }
45
50
  return pTimeout(do_kill(), {
46
51
  milliseconds: 5000,
@@ -13,7 +13,7 @@ import { commandExistsSync, waitForReady } from "./scripts.js";
13
13
  import { microservicesMetadatasPath, projectMicroservices } from "./cleanup.js";
14
14
  import { executablePath } from "./path.js";
15
15
 
16
- const DEFAULT_TIMEOUT_SECONDS = 60;
16
+ const DEFAULT_TIMEOUT_SECONDS = 120;
17
17
  const MILLISECONDS_PER_SECOND = 1000;
18
18
 
19
19
  function getAvailablePort() {
@@ -24,18 +24,26 @@ async function waitForReady(child, expectedResponse) {
24
24
  }
25
25
 
26
26
  async function waitNuxt(nuxtProcess) {
27
+ nuxtProcess.stderr.on("data", (data) => {
28
+ console.log("Nuxt STDERR:", data.toString().trim());
29
+ });
30
+ nuxtProcess.on("close", (code) => {
31
+ console.log(`Nuxt process closed with code ${code}`);
32
+ });
33
+
27
34
  for await (const [data] of on(nuxtProcess.stdout, "data")) {
28
35
  const output = data.toString();
29
- console.log("Nuxt:", output);
36
+ console.log("Nuxt STDOUT:", output.trim());
30
37
  const portMatch = output.match(/Listening on http:\/\/\[::\]:(?<port>\d+)/u);
31
38
  if (portMatch) {
32
- const [, nuxtPort] = portMatch;
33
-
34
- console.log("Nuxt listening on port", nuxtPort);
35
- return nuxtPort;
39
+ console.log("Nuxt listening on port", portMatch.groups.port);
40
+ nuxtProcess.stdout.on("data", (newData) => {
41
+ console.log("Nuxt STDOUT:", newData.toString().trim());
42
+ });
43
+ return portMatch.groups.port;
36
44
  }
37
45
  }
38
- throw new Error("Nuxt process closed without accepting connections");
46
+ throw new Error("Nuxt process closed");
39
47
  }
40
48
 
41
49
  async function runBrowser(scriptName) {
@@ -78,7 +78,7 @@ function useModelColorStyle(componentStyleFunctions) {
78
78
  };
79
79
 
80
80
  function getModelComponentColor(modelId, componentId) {
81
- return dataStyleState.getComponentStyle(modelId, componentId).coloring.constant;
81
+ return dataStyleState.getComponentStyle(modelId, componentId).coloring?.constant;
82
82
  }
83
83
 
84
84
  function getModelComponentEffectiveColor(modelId, componentId, type) {
@@ -90,19 +90,19 @@ function useModelColorStyle(componentStyleFunctions) {
90
90
  }
91
91
 
92
92
  function getModelComponentActiveColoring(modelId, componentId) {
93
- return dataStyleState.getComponentStyle(modelId, componentId).coloring.active;
93
+ return dataStyleState.getComponentStyle(modelId, componentId).coloring?.active;
94
94
  }
95
95
 
96
96
  function modelComponentTypeColor(modelId, type) {
97
97
  return (
98
- dataStyleState.getModelComponentTypeStyle(modelId, type).coloring.constant ||
98
+ dataStyleState.getModelComponentTypeStyle(modelId, type).coloring?.constant ||
99
99
  dataStyleState.getStyle(modelId)[`${type.toLowerCase()}s`].coloring.constant
100
100
  );
101
101
  }
102
102
 
103
103
  function getModelComponentTypeActiveColoring(modelId, type) {
104
104
  return (
105
- dataStyleState.getModelComponentTypeStyle(modelId, type).coloring.active ||
105
+ dataStyleState.getModelComponentTypeStyle(modelId, type).coloring?.active ||
106
106
  dataStyleState.getStyle(modelId)[`${type.toLowerCase()}s`].coloring.active
107
107
  );
108
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.26.1",
3
+ "version": "10.26.2",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {