@geode/opengeodeweb-front 10.18.0-rc.4 → 10.18.1-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/app/components/Loading/EcoMessages.vue +3 -3
- package/app/components/Loading/Header.vue +15 -6
- package/app/components/Loading/Progress.vue +1 -1
- package/app/components/Loading.vue +13 -10
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +13 -2
- package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +2 -2
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +16 -0
- package/app/components/Viewer/ObjectTree/Views/ModelComponents.vue +16 -0
- package/app/composables/virtual_tree.js +28 -6
- package/app/stores/treeview.js +19 -0
- package/package.json +1 -1
|
@@ -40,18 +40,18 @@ onUnmounted(() => {
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
<template>
|
|
43
|
-
<v-sheet color="transparent" height="160" class="position-relative overflow-visible mb-4">
|
|
43
|
+
<v-sheet color="transparent" min-height="160" class="position-relative overflow-visible mb-4">
|
|
44
44
|
<v-scroll-y-reverse-transition mode="out-in">
|
|
45
45
|
<v-card
|
|
46
46
|
:key="currentMessage"
|
|
47
47
|
rounded="lg"
|
|
48
|
-
class="pa-6 border mx-auto"
|
|
48
|
+
class="pa-4 pa-sm-6 border mx-auto"
|
|
49
49
|
color="rgba(255, 255, 255, 0.05)"
|
|
50
50
|
elevation="0"
|
|
51
51
|
style="border-color: rgba(255, 255, 255, 0.1) !important"
|
|
52
52
|
>
|
|
53
53
|
<v-card-title
|
|
54
|
-
class="d-flex align-center ga-3 pa-0 mb-3 text-subtitle-1 font-weight-bold text-white text-wrap"
|
|
54
|
+
class="d-flex align-center ga-3 pa-0 mb-2 mb-sm-3 text-body-1 text-sm-subtitle-1 font-weight-bold text-white text-wrap"
|
|
55
55
|
>
|
|
56
56
|
<v-icon
|
|
57
57
|
:icon="ecoMessages[currentMessage].icon"
|
|
@@ -8,18 +8,17 @@ const { logo } = defineProps({
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
|
-
<v-row justify="center" class="mb-8">
|
|
11
|
+
<v-row justify="center" class="mb-4 mb-sm-8">
|
|
12
12
|
<v-img
|
|
13
13
|
:src="logo"
|
|
14
|
-
|
|
15
|
-
width="180"
|
|
14
|
+
class="responsive-logo"
|
|
16
15
|
style="filter: drop-shadow(0 0 20px rgba(var(--v-theme-primary), 0.4))"
|
|
17
16
|
/>
|
|
18
17
|
</v-row>
|
|
19
18
|
|
|
20
|
-
<v-card color="transparent" elevation="0" class="mb-8 overflow-visible">
|
|
19
|
+
<v-card color="transparent" elevation="0" class="mb-4 mb-sm-8 overflow-visible">
|
|
21
20
|
<v-card-title
|
|
22
|
-
class="
|
|
21
|
+
class="font-weight-black text-white text-wrap pa-0 d-block responsive-title"
|
|
23
22
|
style="text-shadow: 0 0 20px rgba(255, 255, 255, 0.3)"
|
|
24
23
|
>
|
|
25
24
|
STARTING UP
|
|
@@ -35,7 +34,17 @@ const { logo } = defineProps({
|
|
|
35
34
|
</template>
|
|
36
35
|
|
|
37
36
|
<style scoped>
|
|
37
|
+
.responsive-logo {
|
|
38
|
+
width: clamp(100px, 20vw, 180px);
|
|
39
|
+
height: clamp(100px, 20vw, 180px);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.responsive-title {
|
|
43
|
+
font-size: clamp(2rem, 8vw, 4rem) !important;
|
|
44
|
+
line-height: 1.1 !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
38
47
|
.ls-widest {
|
|
39
|
-
letter-spacing: 0.6em !important;
|
|
48
|
+
letter-spacing: clamp(0.2em, 2vw, 0.6em) !important;
|
|
40
49
|
}
|
|
41
50
|
</style>
|
|
@@ -44,7 +44,7 @@ onUnmounted(() => {
|
|
|
44
44
|
<Teleport to="body">
|
|
45
45
|
<div
|
|
46
46
|
v-if="show"
|
|
47
|
-
class="
|
|
47
|
+
class="transition-swing overflow-y-auto"
|
|
48
48
|
style="
|
|
49
49
|
position: fixed;
|
|
50
50
|
inset: 0;
|
|
@@ -58,23 +58,26 @@ onUnmounted(() => {
|
|
|
58
58
|
>
|
|
59
59
|
<div
|
|
60
60
|
style="
|
|
61
|
-
position:
|
|
61
|
+
position: fixed;
|
|
62
62
|
inset: 0;
|
|
63
63
|
background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
|
|
64
64
|
background-size: 40px 40px;
|
|
65
65
|
background-position: center;
|
|
66
66
|
pointer-events: none;
|
|
67
|
+
z-index: -1;
|
|
67
68
|
"
|
|
68
69
|
/>
|
|
69
70
|
|
|
70
|
-
<div
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
<div class="d-flex align-center justify-center pa-6" style="min-height: 100%">
|
|
72
|
+
<div
|
|
73
|
+
class="d-flex flex-column align-center text-center w-100"
|
|
74
|
+
style="max-width: 650px; gap: clamp(1rem, 4vh, 2rem)"
|
|
75
|
+
>
|
|
76
|
+
<LoadingHeader :logo="logo" />
|
|
77
|
+
<LoadingEcoMessages :app-name="appName" />
|
|
78
|
+
<LoadingProgress :progress="progress" />
|
|
79
|
+
<LoadingFooter />
|
|
80
|
+
</div>
|
|
78
81
|
</div>
|
|
79
82
|
</div>
|
|
80
83
|
</Teleport>
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
import ActionButton from "@ogw_front/components/ActionButton.vue";
|
|
3
3
|
import SearchBar from "@ogw_front/components/SearchBar.vue";
|
|
4
4
|
|
|
5
|
-
const { search, sortType, filterOptions, availableFilterOptions } = defineProps({
|
|
5
|
+
const { search, sortType, filterOptions, availableFilterOptions, isCollapsed } = defineProps({
|
|
6
6
|
search: { type: String, required: true },
|
|
7
7
|
sortType: { type: String, required: true },
|
|
8
8
|
filterOptions: { type: Object, required: true },
|
|
9
9
|
availableFilterOptions: { type: Array, required: true },
|
|
10
|
+
isCollapsed: { type: Boolean, required: false, default: false },
|
|
10
11
|
});
|
|
11
12
|
|
|
12
|
-
const emit = defineEmits(["update:search", "toggle-sort", "collapse-all"]);
|
|
13
|
+
const emit = defineEmits(["update:search", "toggle-sort", "collapse-all", "expand-all"]);
|
|
13
14
|
|
|
14
15
|
const showSearch = ref(false);
|
|
15
16
|
|
|
@@ -98,6 +99,7 @@ watch(
|
|
|
98
99
|
</v-list>
|
|
99
100
|
</v-menu>
|
|
100
101
|
<ActionButton
|
|
102
|
+
v-if="!isCollapsed"
|
|
101
103
|
tooltip="Collapse All"
|
|
102
104
|
icon="mdi-collapse-all-outline"
|
|
103
105
|
variant="text"
|
|
@@ -105,6 +107,15 @@ watch(
|
|
|
105
107
|
tooltipLocation="bottom"
|
|
106
108
|
@click="emit('collapse-all')"
|
|
107
109
|
/>
|
|
110
|
+
<ActionButton
|
|
111
|
+
v-else
|
|
112
|
+
tooltip="Expand All"
|
|
113
|
+
icon="mdi-expand-all-outline"
|
|
114
|
+
variant="text"
|
|
115
|
+
color="black"
|
|
116
|
+
tooltipLocation="bottom"
|
|
117
|
+
@click="emit('expand-all')"
|
|
118
|
+
/>
|
|
108
119
|
</div>
|
|
109
120
|
</div>
|
|
110
121
|
</v-col>
|
|
@@ -34,10 +34,10 @@ const INDENT_STEP = 16;
|
|
|
34
34
|
v-if="selection.selectable"
|
|
35
35
|
:icon="
|
|
36
36
|
getIndeterminate(item.raw)
|
|
37
|
-
? 'mdi-eye-minus'
|
|
37
|
+
? 'mdi-eye-minus-outline'
|
|
38
38
|
: isSelected(item.raw)
|
|
39
39
|
? 'mdi-eye'
|
|
40
|
-
: 'mdi-eye-off'
|
|
40
|
+
: 'mdi-eye-off-outline'
|
|
41
41
|
"
|
|
42
42
|
variant="text"
|
|
43
43
|
density="compact"
|
|
@@ -99,6 +99,20 @@ function handleHoverLeave({ item }) {
|
|
|
99
99
|
}
|
|
100
100
|
onHoverLeave(actualItem.id);
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
function expandAll() {
|
|
104
|
+
const allIds = [];
|
|
105
|
+
function traverse(itemsList) {
|
|
106
|
+
for (const item of itemsList) {
|
|
107
|
+
if (item.children && item.children.length > 0) {
|
|
108
|
+
allIds.push(item.id);
|
|
109
|
+
traverse(item.children);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
traverse(treeviewStore.items);
|
|
114
|
+
opened.value = allIds;
|
|
115
|
+
}
|
|
102
116
|
</script>
|
|
103
117
|
|
|
104
118
|
<template>
|
|
@@ -108,8 +122,10 @@ function handleHoverLeave({ item }) {
|
|
|
108
122
|
:sort-type="sortType"
|
|
109
123
|
:filter-options="filterOptions"
|
|
110
124
|
:available-filter-options="availableFilterOptions"
|
|
125
|
+
:is-collapsed="opened.length === 0"
|
|
111
126
|
@toggle-sort="toggleSort"
|
|
112
127
|
@collapse-all="opened = []"
|
|
128
|
+
@expand-all="expandAll"
|
|
113
129
|
/>
|
|
114
130
|
|
|
115
131
|
<CommonTreeView
|
|
@@ -111,6 +111,20 @@ function handleHoverEnter({ item, immediate = false }) {
|
|
|
111
111
|
function handleHoverLeave() {
|
|
112
112
|
onHoverLeave(id);
|
|
113
113
|
}
|
|
114
|
+
|
|
115
|
+
function expandAll() {
|
|
116
|
+
const allIds = [];
|
|
117
|
+
function traverse(itemsList) {
|
|
118
|
+
for (const item of itemsList) {
|
|
119
|
+
if (item.children && item.children.length > 0) {
|
|
120
|
+
allIds.push(item.id);
|
|
121
|
+
traverse(item.children);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
traverse(itemsForTreeView.value);
|
|
126
|
+
opened.value = allIds;
|
|
127
|
+
}
|
|
114
128
|
</script>
|
|
115
129
|
|
|
116
130
|
<template>
|
|
@@ -120,8 +134,10 @@ function handleHoverLeave() {
|
|
|
120
134
|
:sort-type="sortType"
|
|
121
135
|
:filter-options="filterOptions"
|
|
122
136
|
:available-filter-options="availableFilterOptions"
|
|
137
|
+
:is-collapsed="opened.length === 0"
|
|
123
138
|
@toggle-sort="toggleSort"
|
|
124
139
|
@collapse-all="opened = []"
|
|
140
|
+
@expand-all="expandAll"
|
|
125
141
|
/>
|
|
126
142
|
|
|
127
143
|
<FetchingData v-if="rawItems === undefined" :size="48" :width="4" text="" />
|
|
@@ -112,10 +112,6 @@ export function useVirtualTree(propsIn, emit) {
|
|
|
112
112
|
: (item[actualItemProps.value.title] || "").toLowerCase().includes(lowerSearch) ||
|
|
113
113
|
String(id).toLowerCase().includes(lowerSearch);
|
|
114
114
|
|
|
115
|
-
if (!hasChildren && !matches) {
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
115
|
if (hasChildren) {
|
|
120
116
|
const subtree = [];
|
|
121
117
|
flattenTree(children, depth + 1, subtree);
|
|
@@ -127,10 +123,15 @@ export function useVirtualTree(propsIn, emit) {
|
|
|
127
123
|
raw: item,
|
|
128
124
|
id,
|
|
129
125
|
depth,
|
|
130
|
-
isOpen
|
|
126
|
+
isOpen,
|
|
131
127
|
isLeaf: false,
|
|
132
128
|
});
|
|
133
|
-
|
|
129
|
+
if (isOpen) {
|
|
130
|
+
result.push(...subtree);
|
|
131
|
+
}
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (!matches) {
|
|
134
135
|
continue;
|
|
135
136
|
}
|
|
136
137
|
}
|
|
@@ -150,8 +151,29 @@ export function useVirtualTree(propsIn, emit) {
|
|
|
150
151
|
return result;
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
function traverse(itemsList, allIds) {
|
|
155
|
+
for (const item of itemsList) {
|
|
156
|
+
const children = item[actualItemProps.value.children];
|
|
157
|
+
if (children && children.length > 0) {
|
|
158
|
+
allIds.push(item[actualItemProps.value.value]);
|
|
159
|
+
traverse(children, allIds);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
153
164
|
const displayItems = computed(() => flattenTree(props.value.items || []));
|
|
154
165
|
|
|
166
|
+
watch(
|
|
167
|
+
() => props.value.search,
|
|
168
|
+
(newSearch, oldSearch) => {
|
|
169
|
+
if (newSearch && !oldSearch) {
|
|
170
|
+
const allIds = [];
|
|
171
|
+
traverse(props.value.items || [], allIds);
|
|
172
|
+
emit("update:opened", [...new Set([...(props.value.opened || []), ...allIds])]);
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
);
|
|
176
|
+
|
|
155
177
|
return {
|
|
156
178
|
actualItemProps,
|
|
157
179
|
actualSelection,
|
package/app/stores/treeview.js
CHANGED
|
@@ -216,6 +216,24 @@ export const useTreeviewStore = defineStore("treeview", () => {
|
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
function renameItem(id, newName) {
|
|
220
|
+
for (const group of items.value) {
|
|
221
|
+
const child = group.children.find((childItem) => childItem.id === id);
|
|
222
|
+
if (child) {
|
|
223
|
+
child.title = newName;
|
|
224
|
+
const options = { numeric: true, sensitivity: "base" };
|
|
225
|
+
group.children.sort((childA, childB) =>
|
|
226
|
+
childA.title.localeCompare(childB.title, undefined, options),
|
|
227
|
+
);
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
const view = opened_views.value.find((openedView) => openedView.id === id);
|
|
232
|
+
if (view) {
|
|
233
|
+
view.title = newName;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
219
237
|
return {
|
|
220
238
|
items,
|
|
221
239
|
selection,
|
|
@@ -226,6 +244,7 @@ export const useTreeviewStore = defineStore("treeview", () => {
|
|
|
226
244
|
rowHeights,
|
|
227
245
|
addItem,
|
|
228
246
|
removeItem,
|
|
247
|
+
renameItem,
|
|
229
248
|
displayAdditionalTree,
|
|
230
249
|
closeView,
|
|
231
250
|
moveView,
|
package/package.json
CHANGED