@geode/opengeodeweb-front 10.20.0-rc.2 → 10.20.0-rc.4

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.
@@ -50,6 +50,12 @@ const camera_options = computed(() => [
50
50
  tooltip: "Highlight on hover",
51
51
  icon: "mdi-cursor-default-click",
52
52
  color: hybridViewerStore.is_hover_highlight ? "primary" : undefined,
53
+ action: hybridViewerStore.is_hover_highlight
54
+ ? () => {
55
+ hybridViewerStore.is_hover_highlight = false;
56
+ hybridViewerStore.clearHoverHighlight();
57
+ }
58
+ : undefined,
53
59
  menu: [
54
60
  {
55
61
  title: "Cells",
@@ -138,7 +144,11 @@ const camera_options = computed(() => [
138
144
  <v-container :class="[$style.floatToolbar, 'pa-0', 'view-toolbar']" width="auto">
139
145
  <v-row v-for="camera_option in camera_options" :key="camera_option.icon" dense>
140
146
  <v-col>
141
- <v-menu v-if="camera_option.menu" location="start" :close-on-content-click="false">
147
+ <v-menu
148
+ v-if="camera_option.menu && !camera_option.action"
149
+ location="start"
150
+ :close-on-content-click="false"
151
+ >
142
152
  <template #activator="{ props }">
143
153
  <ActionButton
144
154
  v-bind="props"
@@ -3,6 +3,7 @@ import OverlappingObjectsPicker from "@ogw_front/components/Viewer/OverlappingOb
3
3
  import ViewerContextMenu from "@ogw_front/components/Viewer/ContextMenu/ContextMenu";
4
4
  import ViewerObjectTreeLayout from "@ogw_front/components/Viewer/ObjectTree/Layout";
5
5
  import { getCurrentInstance } from "vue";
6
+ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
6
7
  import { useMenuStore } from "@ogw_front/stores/menu";
7
8
  import { useOverlappingPicker } from "@ogw_front/composables/use_overlapping_picker";
8
9
  import { useViewerStore } from "@ogw_front/stores/viewer";
@@ -16,6 +17,18 @@ const { displayMenu, containerWidth, containerHeight } = defineProps({
16
17
  const emit = defineEmits(["show-menu"]);
17
18
  const menuStore = useMenuStore();
18
19
  const viewerStore = useViewerStore();
20
+ const hybridViewerStore = useHybridViewerStore();
21
+
22
+ function stopHoverHighlight() {
23
+ hybridViewerStore.is_hover_highlight = false;
24
+ hybridViewerStore.clearHoverHighlight();
25
+ }
26
+
27
+ onKeyStroke("Escape", () => {
28
+ if (hybridViewerStore.is_hover_highlight) {
29
+ stopHoverHighlight();
30
+ }
31
+ });
19
32
 
20
33
  const {
21
34
  displayIntermediate,
@@ -91,6 +104,29 @@ defineExpose({ get_viewer_id });
91
104
  </v-chip>
92
105
  </div>
93
106
  </v-fade-transition>
107
+
108
+ <v-fade-transition>
109
+ <div
110
+ v-if="hybridViewerStore.is_hover_highlight"
111
+ class="picking-message-container d-flex justify-center w-100 pa-4"
112
+ >
113
+ <v-chip
114
+ color="primary"
115
+ elevation="8"
116
+ size="large"
117
+ variant="flat"
118
+ class="pick-pulse"
119
+ style="pointer-events: auto"
120
+ @click="stopHoverHighlight"
121
+ >
122
+ Highlight active ({{
123
+ hybridViewerStore.hover_highlight_field_type === "CELL" ? "Cells" : "Points"
124
+ }}) &middot; Esc to stop
125
+ <v-divider vertical class="mx-2 my-1" opacity="0.3" />
126
+ <v-icon icon="mdi-close" size="small" />
127
+ </v-chip>
128
+ </div>
129
+ </v-fade-transition>
94
130
  </template>
95
131
 
96
132
  <style scoped>
@@ -35,7 +35,7 @@ function autoDetectSeparator(content) {
35
35
  .slice(0, MAX_CONTENT_SLICE)
36
36
  .split(/\r?\n/u)
37
37
  .slice(0, MAX_LINES_FOR_DETECTION);
38
- const candidates = [",", ";", "\t", "|"];
38
+ const candidates = [",", ";", "\t", "|", " "];
39
39
  let best = ",";
40
40
  let maxCount = -1;
41
41
 
@@ -132,12 +132,23 @@ const computedResult = computed(() => {
132
132
  firstRow: firstRow.value,
133
133
  headerRow: headerRow.value,
134
134
  separator: separator.value,
135
- xColumn: xIndex === -1 ? 0 : xIndex,
136
- yColumn: yIndex === -1 ? 1 : yIndex,
137
- zColumn: zIndex === -1 ? 2 : zIndex,
135
+ xColumn: xIndex,
136
+ yColumn: yIndex,
137
+ zColumn: zIndex,
138
138
  };
139
139
  });
140
140
 
141
+ const isFormValid = computed(
142
+ () =>
143
+ separator.value !== "" &&
144
+ separator.value !== undefined &&
145
+ headerRow.value !== undefined &&
146
+ firstRow.value !== undefined &&
147
+ xColumn.value !== undefined &&
148
+ yColumn.value !== undefined &&
149
+ zColumn.value !== undefined,
150
+ );
151
+
141
152
  watch([separator, headerRow, firstRow], () => {
142
153
  parseContent();
143
154
  xColumn.value = undefined;
@@ -232,7 +243,7 @@ function onConfirm() {
232
243
  color="primary"
233
244
  class="text-none px-8 rounded-lg font-weight-bold"
234
245
  @click="onConfirm"
235
- :disabled="!previewHeaders.length"
246
+ :disabled="!previewHeaders.length || !isFormValid"
236
247
  >
237
248
  Confirm
238
249
  </v-btn>
@@ -22,12 +22,42 @@ const separators = [
22
22
  { title: "Comma (,)", value: "," },
23
23
  { title: "Semicolon (;)", value: ";" },
24
24
  { title: "Tab (\\t)", value: "\t" },
25
+ { title: "Space ( )", value: " " },
25
26
  { title: "Pipe (|)", value: "|" },
27
+ { title: "Custom", value: "custom" },
26
28
  ];
27
29
 
28
- const internalSeparator = computed({
29
- get: () => separator,
30
- set: (value) => emit("update:separator", value),
30
+ const selectedType = ref(",");
31
+ const customValue = ref("");
32
+
33
+ watch(
34
+ () => separator,
35
+ (newVal) => {
36
+ const predefined = separators.find((sep) => sep.value === newVal && sep.value !== "custom");
37
+ if (predefined) {
38
+ selectedType.value = predefined.value;
39
+ } else {
40
+ selectedType.value = "custom";
41
+ if (customValue.value !== newVal) {
42
+ customValue.value = newVal || "";
43
+ }
44
+ }
45
+ },
46
+ { immediate: true },
47
+ );
48
+
49
+ watch(selectedType, (newVal) => {
50
+ if (newVal === "custom") {
51
+ emit("update:separator", customValue.value);
52
+ } else {
53
+ emit("update:separator", newVal);
54
+ }
55
+ });
56
+
57
+ watch(customValue, (newVal) => {
58
+ if (selectedType.value === "custom") {
59
+ emit("update:separator", newVal);
60
+ }
31
61
  });
32
62
 
33
63
  const internalHeaderRow = computed({
@@ -61,8 +91,10 @@ const internalZColumn = computed({
61
91
  <div class="text-overline mb-4 text-primary font-weight-bold">Parser Settings</div>
62
92
 
63
93
  <v-select
64
- v-model="internalSeparator"
94
+ v-model="selectedType"
65
95
  :items="separators"
96
+ item-title="title"
97
+ item-value="value"
66
98
  label="Separator"
67
99
  variant="outlined"
68
100
  density="compact"
@@ -71,8 +103,8 @@ const internalZColumn = computed({
71
103
  />
72
104
 
73
105
  <v-text-field
74
- v-if="!separators.find((s) => s.value === separator)"
75
- v-model="internalSeparator"
106
+ v-if="selectedType === 'custom'"
107
+ v-model="customValue"
76
108
  label="Custom Separator"
77
109
  variant="outlined"
78
110
  density="compact"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.20.0-rc.2",
3
+ "version": "10.20.0-rc.4",
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": {