@geode/opengeodeweb-front 10.20.0-rc.3 → 10.20.0-rc.5

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.
@@ -67,9 +67,17 @@ const vertex_attribute_color_map = computed({
67
67
  });
68
68
  </script>
69
69
  <template>
70
- <ViewerContextMenuItem :itemProps="itemProps" :btn_image="PointSetPoints">
70
+ <ViewerContextMenuItem
71
+ data-testid="meshPointsMenu"
72
+ :itemProps="itemProps"
73
+ :btn_image="PointSetPoints"
74
+ tooltip="Points options"
75
+ >
71
76
  <template #options>
72
- <ViewerOptionsVisibilitySwitch v-model="visibility" />
77
+ <ViewerOptionsVisibilitySwitch
78
+ data-testid="meshPointsVisibilitySwitch"
79
+ v-model="visibility"
80
+ />
73
81
  <template v-if="visibility">
74
82
  <v-row class="pa-0" align="center">
75
83
  <v-divider />
@@ -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.3",
3
+ "version": "10.20.0-rc.5",
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": {