@geode/opengeodeweb-front 10.9.0 → 10.10.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.
@@ -0,0 +1,45 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ width="17.400564mm"
4
+ height="14.617167mm"
5
+ viewBox="0 0 61.655541 51.793112"
6
+ version="1.1"
7
+ xmlns="http://www.w3.org/2000/svg">
8
+
9
+ <!-- Face du dessus : décalée vers le haut -->
10
+ <path
11
+ style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.7;stroke-linecap:butt;stroke-linejoin:miter;"
12
+ d="m 13.063,4.470 h 22.582 l 13.122,6.576 h -22.582 z" />
13
+
14
+ <!-- Face droite : décalée vers la droite -->
15
+ <rect
16
+ style="fill:#000000;fill-opacity:1;stroke:none;"
17
+ width="22.5"
18
+ height="22.4"
19
+ x="30.0"
20
+ y="13.5" />
21
+
22
+ <!-- Face gauche : semi-transparente, décalée vers la gauche -->
23
+ <path
24
+ style="fill:#000000;fill-opacity:0.45;stroke:none;"
25
+ d="m 6.755,12.474 14.814,7.424 v 21.143 l -14.814,-7.424 z" />
26
+
27
+ <!-- Arêtes de la face du dessus -->
28
+ <path
29
+ style="fill:none;stroke:#000000;stroke-width:0.7;stroke-linecap:butt;stroke-linejoin:miter;"
30
+ d="m 13.063,4.470 h 22.582 l 13.122,6.576 h -22.582 z" />
31
+
32
+ <!-- Arêtes face droite -->
33
+ <rect
34
+ style="fill:none;stroke:#000000;stroke-width:0.7;"
35
+ width="22.5"
36
+ height="22.4"
37
+ x="30.0"
38
+ y="13.5" />
39
+
40
+ <!-- Arêtes face gauche -->
41
+ <path
42
+ style="fill:none;stroke:#000000;stroke-width:0.7;stroke-linecap:butt;stroke-linejoin:miter;"
43
+ d="m 6.755,12.474 14.814,7.424 v 21.143 l -14.814,-7.424 z" />
44
+
45
+ </svg>
@@ -174,6 +174,7 @@ function getItemStyle(index) {
174
174
  :index="index"
175
175
  :itemProps="{
176
176
  id: id,
177
+ meta_data,
177
178
  tooltip_location: getTooltipLocation(index),
178
179
  tooltip_origin: getTooltipOrigin(index),
179
180
  totalItems: menuItemCount,
@@ -0,0 +1,38 @@
1
+ <script setup>
2
+ import ModelColor from "@ogw_front/assets/viewer_svgs/model_component_color.svg";
3
+ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem";
4
+ import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
5
+
6
+ import { useDataStyleStore } from "@ogw_front/stores/data_style";
7
+ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
8
+
9
+ const dataStyleStore = useDataStyleStore();
10
+ const hybridViewerStore = useHybridViewerStore();
11
+
12
+ const { itemProps } = defineProps({
13
+ itemProps: { type: Object, required: true },
14
+ });
15
+
16
+ const modelId = computed(() => itemProps.meta_data.modelId);
17
+ const componentId = computed(() => itemProps.id);
18
+
19
+ const color = computed({
20
+ get: () => dataStyleStore.getModelComponentColor(modelId.value, componentId.value),
21
+ set: async (newValue) => {
22
+ await dataStyleStore.setModelComponentsColor(modelId.value, [componentId.value], newValue);
23
+ hybridViewerStore.remoteRender();
24
+ },
25
+ });
26
+ </script>
27
+
28
+ <template>
29
+ <ViewerContextMenuItem :itemProps="itemProps" tooltip="Components color" :btn_image="ModelColor">
30
+ <template #options>
31
+ <v-row class="pa-0" align="center">
32
+ <v-col>
33
+ <ViewerOptionsColorPicker v-model="color" />
34
+ </v-col>
35
+ </v-row>
36
+ </template>
37
+ </ViewerContextMenuItem>
38
+ </template>
@@ -63,10 +63,10 @@ async function onSelectionChange(current) {
63
63
  }
64
64
 
65
65
  if (added.length > 0) {
66
- await dataStyleStore.setComponentsVisibility(id, added, true);
66
+ await dataStyleStore.setModelComponentsVisibility(id, added, true);
67
67
  }
68
68
  if (removed.length > 0) {
69
- await dataStyleStore.setComponentsVisibility(id, removed, false);
69
+ await dataStyleStore.setModelComponentsVisibility(id, removed, false);
70
70
  }
71
71
  hybridViewerStore.remoteRender();
72
72
  }
@@ -124,7 +124,14 @@ async function onSelectionChange(current) {
124
124
  <span
125
125
  class="treeview-item"
126
126
  :class="{ 'inactive-item': item.is_active === false }"
127
- @contextmenu.prevent.stop="emit('show-menu', { event: $event, itemId: item })"
127
+ @contextmenu.prevent.stop="
128
+ emit('show-menu', {
129
+ event: $event,
130
+ itemId: item.id,
131
+ context_type: 'model_component',
132
+ modelId: id,
133
+ })
134
+ "
128
135
  >
129
136
  {{ item.title }}
130
137
  <v-tooltip v-if="item.category" activator="parent" location="right">
@@ -1,12 +1,12 @@
1
1
  import { database } from "@ogw_internal/database/database.js";
2
2
  import { getDefaultStyle } from "@ogw_front/utils/default_styles";
3
3
  import { useDataStore } from "@ogw_front/stores/data";
4
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
4
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
5
5
  import { useMeshStyle } from "@ogw_internal/stores/data_style/mesh/index";
6
6
  import { useModelStyle } from "@ogw_internal/stores/data_style/model/index";
7
7
 
8
8
  export const useDataStyleStore = defineStore("dataStyle", () => {
9
- const dataStyleState = useDataStyleStateStore();
9
+ const dataStyleState = useDataStyleState();
10
10
  const meshStyleStore = useMeshStyle();
11
11
  const modelStyleStore = useModelStyle();
12
12
  const dataStore = useDataStore();
@@ -79,18 +79,14 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
79
79
  }
80
80
 
81
81
  return {
82
- styles: dataStyleState.styles,
83
- getStyle: dataStyleState.getStyle,
84
- objectVisibility: dataStyleState.objectVisibility,
85
- selectedObjects: dataStyleState.selectedObjects,
86
- ...meshStyleStore,
87
- ...modelStyleStore,
88
- setComponentsVisibility: modelStyleStore.setModelComponentsVisibility,
89
82
  addDataStyle,
90
83
  applyDefaultStyle,
91
84
  setVisibility,
92
85
  exportStores,
93
86
  importStores,
94
87
  applyAllStylesFromState,
88
+ ...dataStyleState,
89
+ ...meshStyleStore,
90
+ ...modelStyleStore,
95
91
  };
96
92
  });
@@ -36,6 +36,7 @@ import TetrahedralSolidTetrahedraOptions from "@ogw_front/components/Viewer/Tetr
36
36
  import TetrahedralSolidTrianglesOptions from "@ogw_front/components/Viewer/TetrahedralSolid/TrianglesOptions";
37
37
 
38
38
  // Model components
39
+ import ModelComponentsOptions from "@ogw_front/components/Viewer/Generic/Model/ModelComponentsOptions";
39
40
  import ModelEdgesOptions from "@ogw_front/components/Viewer/Generic/Model/EdgesOptions";
40
41
  import ModelPointsOptions from "@ogw_front/components/Viewer/Generic/Model/PointsOptions";
41
42
 
@@ -88,6 +89,8 @@ const Section_menu = [ModelEdgesOptions, ModelPointsOptions];
88
89
 
89
90
  const StructuralModel_menu = [ModelEdgesOptions, ModelPointsOptions];
90
91
 
92
+ const ModelComponent_menu = [ModelComponentsOptions];
93
+
91
94
  const menusData = {
92
95
  mesh: {
93
96
  EdgedCurve2D: EdgedCurve_menu,
@@ -114,6 +117,9 @@ const menusData = {
114
117
  Section: Section_menu,
115
118
  StructuralModel: StructuralModel_menu,
116
119
  },
120
+ model_component: {
121
+ component: ModelComponent_menu,
122
+ },
117
123
  };
118
124
 
119
125
  export const useMenuStore = defineStore("menu", () => {
@@ -1,16 +1,16 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
1
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useMeshCellsCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore();
4
+ const dataStyleState = useDataStyleState();
5
5
 
6
6
  function mutateMeshCellsStyle(id, values) {
7
- return dataStyleStateStore.mutateStyle(id, {
7
+ return dataStyleState.mutateStyle(id, {
8
8
  cells: values,
9
9
  });
10
10
  }
11
11
 
12
12
  function meshCellsStyle(id) {
13
- return dataStyleStateStore.getStyle(id).cells;
13
+ return dataStyleState.getStyle(id).cells;
14
14
  }
15
15
 
16
16
  function meshCellsColoring(id) {
@@ -1,16 +1,16 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
1
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useMeshEdgesCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore();
4
+ const dataStyleState = useDataStyleState();
5
5
 
6
6
  function mutateMeshEdgesStyle(id, values) {
7
- return dataStyleStateStore.mutateStyle(id, {
7
+ return dataStyleState.mutateStyle(id, {
8
8
  edges: values,
9
9
  });
10
10
  }
11
11
 
12
12
  function meshEdgesStyle(id) {
13
- return dataStyleStateStore.getStyle(id).edges;
13
+ return dataStyleState.getStyle(id).edges;
14
14
  }
15
15
 
16
16
  function meshEdgesColoring(id) {
@@ -5,7 +5,7 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schem
5
5
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
8
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
9
9
  import { useMeshCellsStyle } from "./cells";
10
10
  import { useMeshEdgesStyle } from "./edges";
11
11
  import { useMeshPointsStyle } from "./points";
@@ -18,7 +18,7 @@ const meshSchemas = viewer_schemas.opengeodeweb_viewer.mesh;
18
18
  export function useMeshStyle() {
19
19
  const hybridViewerStore = useHybridViewerStore();
20
20
  const viewerStore = useViewerStore();
21
- const dataStyleState = useDataStyleStateStore();
21
+ const dataStyleState = useDataStyleState();
22
22
  const meshPointsStyle = useMeshPointsStyle();
23
23
  const meshEdgesStyle = useMeshEdgesStyle();
24
24
  const meshCellsStyle = useMeshCellsStyle();
@@ -1,16 +1,16 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
1
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useMeshPointsCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore();
4
+ const dataStyleState = useDataStyleState();
5
5
 
6
6
  function mutateMeshPointsStyle(id, values) {
7
- return dataStyleStateStore.mutateStyle(id, {
7
+ return dataStyleState.mutateStyle(id, {
8
8
  points: values,
9
9
  });
10
10
  }
11
11
 
12
12
  function meshPointsStyle(id) {
13
- return dataStyleStateStore.getStyle(id).points;
13
+ return dataStyleState.getStyle(id).points;
14
14
  }
15
15
 
16
16
  function meshPointsColoring(id) {
@@ -1,16 +1,16 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
1
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useMeshPolygonsCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore();
4
+ const dataStyleState = useDataStyleState();
5
5
 
6
6
  function mutateMeshPolygonsStyle(id, values) {
7
- return dataStyleStateStore.mutateStyle(id, {
7
+ return dataStyleState.mutateStyle(id, {
8
8
  polygons: values,
9
9
  });
10
10
  }
11
11
 
12
12
  function meshPolygonsStyle(id) {
13
- return dataStyleStateStore.getStyle(id).polygons;
13
+ return dataStyleState.getStyle(id).polygons;
14
14
  }
15
15
 
16
16
  function meshPolygonsColoring(id) {
@@ -1,16 +1,16 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
1
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useMeshPolyhedraCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore();
4
+ const dataStyleState = useDataStyleState();
5
5
 
6
6
  function mutateMeshPolyhedraStyle(id, values) {
7
- return dataStyleStateStore.mutateStyle(id, {
7
+ return dataStyleState.mutateStyle(id, {
8
8
  polyhedra: values,
9
9
  });
10
10
  }
11
11
 
12
12
  function meshPolyhedraStyle(id) {
13
- return dataStyleStateStore.getStyle(id).polyhedra;
13
+ return dataStyleState.getStyle(id).polyhedra;
14
14
  }
15
15
 
16
16
  function meshPolyhedraColoring(id) {
@@ -1,25 +1,25 @@
1
1
  import merge from "lodash/merge";
2
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
2
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
3
3
 
4
4
  export function useModelBlocksCommonStyle() {
5
- const dataStyleStateStore = useDataStyleStateStore();
5
+ const dataStyleState = useDataStyleState();
6
6
 
7
7
  function modelBlocksStyle(id) {
8
- return dataStyleStateStore.getStyle(id).blocks;
8
+ return dataStyleState.getStyle(id).blocks;
9
9
  }
10
10
 
11
11
  function modelBlockStyle(id, block_id) {
12
12
  const groupStyle = modelBlocksStyle(id);
13
- const individualStyle = dataStyleStateStore.getComponentStyle(id, block_id);
13
+ const individualStyle = dataStyleState.getComponentStyle(id, block_id);
14
14
  return merge({}, groupStyle, individualStyle);
15
15
  }
16
16
 
17
17
  function mutateModelBlocksStyle(id, block_ids, values) {
18
- return dataStyleStateStore.mutateComponentStyles(id, block_ids, values);
18
+ return dataStyleState.mutateComponentStyles(id, block_ids, values);
19
19
  }
20
20
 
21
21
  function mutateModelBlockStyle(id, block_id, values) {
22
- return dataStyleStateStore.mutateComponentStyle(id, block_id, values);
22
+ return dataStyleState.mutateComponentStyle(id, block_id, values);
23
23
  }
24
24
 
25
25
  return {
@@ -1,25 +1,25 @@
1
1
  import merge from "lodash/merge";
2
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
2
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
3
3
 
4
4
  export function useModelCornersCommonStyle() {
5
- const dataStyleStateStore = useDataStyleStateStore();
5
+ const dataStyleState = useDataStyleState();
6
6
 
7
7
  function modelCornersStyle(id) {
8
- return dataStyleStateStore.getStyle(id).corners;
8
+ return dataStyleState.getStyle(id).corners;
9
9
  }
10
10
 
11
11
  function modelCornerStyle(id, corner_id) {
12
12
  const groupStyle = modelCornersStyle(id);
13
- const individualStyle = dataStyleStateStore.getComponentStyle(id, corner_id);
13
+ const individualStyle = dataStyleState.getComponentStyle(id, corner_id);
14
14
  return merge({}, groupStyle, individualStyle);
15
15
  }
16
16
 
17
17
  function mutateModelCornersStyle(id, corner_ids, values) {
18
- return dataStyleStateStore.mutateComponentStyles(id, corner_ids, values);
18
+ return dataStyleState.mutateComponentStyles(id, corner_ids, values);
19
19
  }
20
20
 
21
21
  function mutateModelCornerStyle(id, corner_id, values) {
22
- return dataStyleStateStore.mutateComponentStyle(id, corner_id, values);
22
+ return dataStyleState.mutateComponentStyle(id, corner_id, values);
23
23
  }
24
24
 
25
25
  return {
@@ -1,16 +1,16 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
1
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useModelEdgesCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore();
4
+ const dataStyleState = useDataStyleState();
5
5
 
6
6
  function mutateModelEdgesStyle(id, values) {
7
- return dataStyleStateStore.mutateStyle(id, {
7
+ return dataStyleState.mutateStyle(id, {
8
8
  edges: values,
9
9
  });
10
10
  }
11
11
 
12
12
  function modelEdgesStyle(id) {
13
- return dataStyleStateStore.getStyle(id).edges;
13
+ return dataStyleState.getStyle(id).edges;
14
14
  }
15
15
 
16
16
  return {
@@ -1,7 +1,7 @@
1
1
  import { database } from "@ogw_internal/database/database";
2
2
  import { liveQuery } from "dexie";
3
3
  import { useDataStore } from "@ogw_front/stores/data";
4
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
4
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
5
5
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
6
6
  import { useModelBlocksStyle } from "./blocks";
7
7
  import { useModelCornersStyle } from "./corners";
@@ -20,7 +20,7 @@ const MESH_TYPES = MESH_CONFIG.map((config) => config.type);
20
20
 
21
21
  export function useModelStyle() {
22
22
  const dataStore = useDataStore();
23
- const dataStyleStateStore = useDataStyleStateStore();
23
+ const dataStyleState = useDataStyleState();
24
24
  const modelCornersStyleStore = useModelCornersStyle();
25
25
  const modelBlocksStyleStore = useModelBlocksStyle();
26
26
  const modelEdgesStyleStore = useModelEdgesStyle();
@@ -38,7 +38,7 @@ export function useModelStyle() {
38
38
  }
39
39
  }
40
40
 
41
- const groupStyles = dataStyleStateStore.getStyle(modelId);
41
+ const groupStyles = dataStyleState.getStyle(modelId);
42
42
  const selection = [];
43
43
  for (const type of MESH_TYPES) {
44
44
  const typeComponents = componentsByType[type];
@@ -66,7 +66,7 @@ export function useModelStyle() {
66
66
  }
67
67
 
68
68
  function modelVisibility(modelId) {
69
- return dataStyleStateStore.getStyle(modelId).visibility;
69
+ return dataStyleState.getStyle(modelId).visibility;
70
70
  }
71
71
 
72
72
  function setModelVisibility(modelId, visibility) {
@@ -76,7 +76,7 @@ export function useModelStyle() {
76
76
  {
77
77
  response_function: async () => {
78
78
  await hybridViewerStore.setVisibility(modelId, visibility);
79
- await dataStyleStateStore.mutateStyle(modelId, { visibility });
79
+ await dataStyleState.mutateStyle(modelId, { visibility });
80
80
  return { id: modelId, visibility };
81
81
  },
82
82
  },
@@ -122,6 +122,10 @@ export function useModelStyle() {
122
122
  return selection;
123
123
  }
124
124
 
125
+ function getModelComponentColor(modelId, componentId) {
126
+ return dataStyleState.getComponentStyle(modelId, componentId).color;
127
+ }
128
+
125
129
  async function setModelComponentsVisibility(modelId, componentIds, visibility) {
126
130
  const allComponents = await database.model_components.where("id").equals(modelId).toArray();
127
131
  const componentsMap = Object.fromEntries(
@@ -145,13 +149,32 @@ export function useModelStyle() {
145
149
  const schema = model_schemas[`${type.toLowerCase()}s`].visibility;
146
150
  await viewerStore.request(schema, { id: modelId, block_ids: viewerIds, visibility });
147
151
  }
148
- return dataStyleStateStore.mutateComponentStyles(modelId, idsToUpdate, { visibility });
152
+ return dataStyleState.mutateComponentStyles(modelId, idsToUpdate, { visibility });
153
+ }),
154
+ );
155
+ }
156
+
157
+ async function setModelComponentsColor(modelId, componentIds, color) {
158
+ const allComponents = await database.model_components.where("id").equals(modelId).toArray();
159
+ const componentsMap = Object.fromEntries(
160
+ allComponents.map((component) => [component.geode_id, component]),
161
+ );
162
+ const handlers = {
163
+ Corner: (ids) => modelCornersStyleStore.setModelCornersColor(modelId, ids, color),
164
+ Line: (ids) => modelLinesStyleStore.setModelLinesColor(modelId, ids, color),
165
+ Surface: (ids) => modelSurfacesStyleStore.setModelSurfacesColor(modelId, ids, color),
166
+ Block: (ids) => modelBlocksStyleStore.setModelBlocksColor(modelId, ids, color),
167
+ };
168
+ return Promise.all(
169
+ MESH_TYPES.map((type) => {
170
+ const idsForType = componentIds.filter((id) => componentsMap[id]?.type === type);
171
+ return handlers[type](idsForType);
149
172
  }),
150
173
  );
151
174
  }
152
175
 
153
176
  function applyModelStyle(modelId) {
154
- const style = dataStyleStateStore.getStyle(modelId);
177
+ const style = dataStyleState.getStyle(modelId);
155
178
  const handlers = {
156
179
  visibility: () => setModelVisibility(modelId, style.visibility),
157
180
  corners: () => modelCornersStyleStore.applyModelCornersStyle(modelId),
@@ -194,13 +217,15 @@ export function useModelStyle() {
194
217
  visibleMeshComponents,
195
218
  setModelVisibility,
196
219
  setModelComponentsVisibility,
220
+ getModelComponentColor,
221
+ setModelComponentsColor,
197
222
  applyModelStyle,
198
223
  setModelMeshComponentsDefaultStyle,
199
- ...useModelBlocksStyle(),
200
- ...useModelCornersStyle(),
201
- ...useModelEdgesStyle(),
202
- ...useModelLinesStyle(),
203
- ...useModelPointsStyle(),
204
- ...useModelSurfacesStyle(),
224
+ ...modelBlocksStyleStore,
225
+ ...modelCornersStyleStore,
226
+ ...modelEdgesStyleStore,
227
+ ...modelLinesStyleStore,
228
+ ...modelPointsStyleStore,
229
+ ...modelSurfacesStyleStore,
205
230
  };
206
231
  }
@@ -1,25 +1,25 @@
1
1
  import merge from "lodash/merge";
2
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
2
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
3
3
 
4
4
  export function useModelLinesCommonStyle() {
5
- const dataStyleStateStore = useDataStyleStateStore();
5
+ const dataStyleState = useDataStyleState();
6
6
 
7
7
  function modelLinesStyle(id) {
8
- return dataStyleStateStore.getStyle(id).lines;
8
+ return dataStyleState.getStyle(id).lines;
9
9
  }
10
10
 
11
11
  function modelLineStyle(id, line_id) {
12
12
  const groupStyle = modelLinesStyle(id);
13
- const individualStyle = dataStyleStateStore.getComponentStyle(id, line_id);
13
+ const individualStyle = dataStyleState.getComponentStyle(id, line_id);
14
14
  return merge({}, groupStyle, individualStyle);
15
15
  }
16
16
 
17
17
  function mutateModelLinesStyle(id, line_ids, values) {
18
- return dataStyleStateStore.mutateComponentStyles(id, line_ids, values);
18
+ return dataStyleState.mutateComponentStyles(id, line_ids, values);
19
19
  }
20
20
 
21
21
  function mutateModelLineStyle(id, line_id, values) {
22
- return dataStyleStateStore.mutateComponentStyle(id, line_id, values);
22
+ return dataStyleState.mutateComponentStyle(id, line_id, values);
23
23
  }
24
24
 
25
25
  return {
@@ -1,16 +1,16 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
1
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useModelPointsCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore();
4
+ const dataStyleState = useDataStyleState();
5
5
 
6
6
  function mutateModelPointsStyle(id, values) {
7
- return dataStyleStateStore.mutateStyle(id, {
7
+ return dataStyleState.mutateStyle(id, {
8
8
  points: values,
9
9
  });
10
10
  }
11
11
 
12
12
  function modelPointsStyle(id) {
13
- return dataStyleStateStore.getStyle(id).points;
13
+ return dataStyleState.getStyle(id).points;
14
14
  }
15
15
 
16
16
  return {
@@ -1,25 +1,25 @@
1
1
  import merge from "lodash/merge";
2
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
2
+ import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
3
3
 
4
4
  export function useModelSurfacesCommonStyle() {
5
- const dataStyleStateStore = useDataStyleStateStore();
5
+ const dataStyleState = useDataStyleState();
6
6
 
7
7
  function modelSurfacesStyle(id) {
8
- return dataStyleStateStore.getStyle(id).surfaces;
8
+ return dataStyleState.getStyle(id).surfaces;
9
9
  }
10
10
 
11
11
  function modelSurfaceStyle(id, surface_id) {
12
12
  const groupStyle = modelSurfacesStyle(id);
13
- const individualStyle = dataStyleStateStore.getComponentStyle(id, surface_id);
13
+ const individualStyle = dataStyleState.getComponentStyle(id, surface_id);
14
14
  return merge({}, groupStyle, individualStyle);
15
15
  }
16
16
 
17
17
  function mutateModelSurfacesStyle(id, surface_ids, values) {
18
- return dataStyleStateStore.mutateComponentStyles(id, surface_ids, values);
18
+ return dataStyleState.mutateComponentStyles(id, surface_ids, values);
19
19
  }
20
20
 
21
21
  function mutateModelSurfaceStyle(id, surface_id, values) {
22
- return dataStyleStateStore.mutateComponentStyle(id, surface_id, values);
22
+ return dataStyleState.mutateComponentStyle(id, surface_id, values);
23
23
  }
24
24
 
25
25
  return {
@@ -3,7 +3,7 @@ import { liveQuery } from "dexie";
3
3
  import merge from "lodash/merge";
4
4
  import { useObservable } from "@vueuse/rxjs";
5
5
 
6
- export const useDataStyleStateStore = defineStore("dataStyleState", () => {
6
+ export function useDataStyleState() {
7
7
  const styles = useObservable(
8
8
  liveQuery(async () => {
9
9
  const allStyles = await database.data_style.toArray();
@@ -137,15 +137,15 @@ export const useDataStyleStateStore = defineStore("dataStyleState", () => {
137
137
  }
138
138
 
139
139
  return {
140
+ styles,
141
+ componentStyles,
142
+ objectVisibility,
143
+ selectedObjects,
140
144
  getStyle,
141
145
  mutateStyle,
142
146
  getComponentStyle,
143
147
  mutateComponentStyle,
144
148
  mutateComponentStyles,
145
- styles,
146
- componentStyles,
147
- objectVisibility,
148
- selectedObjects,
149
149
  clear,
150
150
  };
151
- });
151
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.9.0",
3
+ "version": "10.10.0-rc.1",
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": {
@@ -34,8 +34,8 @@
34
34
  "build": ""
35
35
  },
36
36
  "dependencies": {
37
- "@geode/opengeodeweb-back": "latest",
38
- "@geode/opengeodeweb-viewer": "latest",
37
+ "@geode/opengeodeweb-back": "next",
38
+ "@geode/opengeodeweb-viewer": "next",
39
39
  "@kitware/vtk.js": "33.3.0",
40
40
  "@mdi/font": "7.4.47",
41
41
  "@pinia/nuxt": "0.11.3",