@vcmap/ui 6.0.14 → 6.1.0-rc.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.
- package/config/base.config.json +25 -3
- package/config/dev.config.json +17 -3
- package/config/splashscreen.config.json +13 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-882e211a.js → core-fd079400.js} +6861 -5788
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-5135917c.css +1 -0
- package/dist/assets/{ui-b6bff1d9.js → ui-5135917c.js} +16764 -18447
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-2d64c180.js → vuetify-f02b7bb9.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +13 -1
- package/index.js +7 -0
- package/package.json +2 -2
- package/plugins/@vcmap-show-case/dev-tools/package.json +5 -0
- package/plugins/@vcmap-show-case/dev-tools/src/eventLogger.js +35 -0
- package/plugins/@vcmap-show-case/dev-tools/src/index.js +59 -0
- package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +10 -0
- package/src/application/VcsApp.vue.d.ts +26 -0
- package/src/application/VcsContainer.vue +5 -3
- package/src/application/VcsContainer.vue.d.ts +21 -0
- package/src/application/VcsNavbar.vue +10 -6
- package/src/application/VcsNavbar.vue.d.ts +2 -0
- package/src/application/VcsSplashScreen.vue +35 -28
- package/src/application/VcsSplashScreen.vue.d.ts +1 -0
- package/src/callback/addModuleCallback.d.ts +29 -0
- package/src/callback/addModuleCallback.js +61 -0
- package/src/callback/removeModuleCallback.d.ts +29 -0
- package/src/callback/removeModuleCallback.js +53 -0
- package/src/callback/startRotationCallback.d.ts +37 -0
- package/src/callback/startRotationCallback.js +67 -0
- package/src/callback/stopRotationCallback.d.ts +8 -0
- package/src/callback/stopRotationCallback.js +37 -0
- package/src/components/buttons/VcsActionButtonList.vue +6 -4
- package/src/components/buttons/VcsToolButton.vue +0 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue +7 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/VcsTextArea.vue +1 -1
- package/src/components/icons/+all.js +4 -0
- package/src/components/icons/View360Icon.vue +55 -0
- package/src/components/icons/View360Icon.vue.d.ts +2 -0
- package/src/components/import/VcsImportComponent.vue +2 -0
- package/src/components/lists/VcsList.vue +15 -11
- package/src/components/lists/VcsList.vue.d.ts +9 -0
- package/src/components/lists/VcsTreeNode.vue +244 -0
- package/src/components/lists/VcsTreeNode.vue.d.ts +31 -0
- package/src/components/lists/VcsTreeview.vue +111 -173
- package/src/components/lists/VcsTreeview.vue.d.ts +58 -4
- package/src/components/lists/VcsTreeviewTitle.vue +10 -3
- package/src/components/lists/VcsTreeviewTitle.vue.d.ts +2 -0
- package/src/components/tables/VcsDataTable.vue +14 -3
- package/src/components/tables/VcsDataTable.vue.d.ts +9 -0
- package/src/featureInfo/BalloonComponent.vue +18 -47
- package/src/featureInfo/BalloonComponent.vue.d.ts +0 -1
- package/src/featureInfo/IframeComponent.vue +1 -32
- package/src/featureInfo/IframeComponent.vue.d.ts +1 -4
- package/src/i18n/de.d.ts +1 -0
- package/src/i18n/de.js +1 -0
- package/src/i18n/en.d.ts +1 -0
- package/src/i18n/en.js +1 -0
- package/src/init.d.ts +6 -0
- package/src/init.js +26 -14
- package/src/legend/VcsLegend.vue +1 -1
- package/src/manager/toolbox/ToolboxManagerComponent.vue +4 -4
- package/src/manager/toolbox/ToolboxManagerComponent.vue.d.ts +2 -2
- package/src/manager/toolbox/toolboxManager.d.ts +5 -0
- package/src/manager/toolbox/toolboxManager.js +7 -1
- package/src/manager/window/WindowComponent.vue +11 -1
- package/src/manager/window/WindowComponent.vue.d.ts +1 -0
- package/src/manager/window/WindowManager.vue +14 -4
- package/src/manager/window/WindowManager.vue.d.ts +1 -0
- package/src/navigation/MapNavigation.vue +87 -5
- package/src/navigation/MapNavigation.vue.d.ts +3 -1
- package/src/navigation/overviewMap.d.ts +6 -0
- package/src/navigation/overviewMap.js +14 -1
- package/src/pluginHelper.d.ts +0 -7
- package/src/pluginHelper.js +4 -18
- package/src/search/ResultItem.vue +1 -10
- package/src/search/ResultsComponent.vue +11 -1
- package/src/search/ResultsComponent.vue.d.ts +9 -0
- package/src/search/SearchComponent.vue +88 -11
- package/src/search/SearchComponent.vue.d.ts +7 -0
- package/src/search/markText.d.ts +1 -1
- package/src/search/markText.js +4 -4
- package/src/search/search.d.ts +3 -0
- package/src/search/search.js +3 -2
- package/src/state.d.ts +2 -4
- package/src/state.js +31 -54
- package/src/uiConfig.d.ts +40 -0
- package/src/uiConfig.js +6 -0
- package/src/vcsUiApp.js +11 -7
- package/src/vuePlugins/vuetify.js +2 -0
- package/dist/assets/ui-b6bff1d9.css +0 -1
- /package/dist/assets/{cesium-615823f2.js → cesium-57fbd309.js} +0 -0
- /package/dist/assets/{ol-7fc05707.js → ol-50dfef96.js} +0 -0
- /package/dist/assets/{vue-74e8343e.js → vue-c3c55d88.js} +0 -0
- /package/dist/assets/{vuetify-2d64c180.css → vuetify-f02b7bb9.css} +0 -0
@@ -3,6 +3,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
type: ArrayConstructor;
|
4
4
|
default: () => never[];
|
5
5
|
};
|
6
|
+
opened: {
|
7
|
+
type: ArrayConstructor;
|
8
|
+
default: () => never[];
|
9
|
+
};
|
10
|
+
itemChildren: {
|
11
|
+
type: StringConstructor;
|
12
|
+
default: string;
|
13
|
+
};
|
14
|
+
openAll: {
|
15
|
+
type: BooleanConstructor;
|
16
|
+
default: boolean;
|
17
|
+
};
|
18
|
+
openOnClick: {
|
19
|
+
type: BooleanConstructor;
|
20
|
+
default: boolean;
|
21
|
+
};
|
6
22
|
search: {
|
7
23
|
type: StringConstructor;
|
8
24
|
default: string;
|
@@ -15,17 +31,41 @@ declare const _default: import("vue").DefineComponent<{
|
|
15
31
|
type: StringConstructor;
|
16
32
|
default: undefined;
|
17
33
|
};
|
34
|
+
/**
|
35
|
+
* @param {import("./VcsTreeNode.vue").VcsTreeNodeItem} item The item to filter.
|
36
|
+
* @param {string} search The query value.
|
37
|
+
*/
|
38
|
+
customFilter: {
|
39
|
+
type: FunctionConstructor;
|
40
|
+
default: undefined;
|
41
|
+
};
|
18
42
|
}, {
|
19
|
-
iconSize: import("vue").ComputedRef<number>;
|
20
43
|
localSearchValue: import("vue").Ref<any>;
|
21
|
-
|
44
|
+
localOpenedItems: import("vue").Ref<any>;
|
22
45
|
forwardSlots: string[];
|
23
|
-
|
24
|
-
|
46
|
+
itemToggled: (itemName: any) => void;
|
47
|
+
itemClicked(item: any, event: any): void;
|
48
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:opened" | "update:search")[], "update:opened" | "update:search", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
25
49
|
items: {
|
26
50
|
type: ArrayConstructor;
|
27
51
|
default: () => never[];
|
28
52
|
};
|
53
|
+
opened: {
|
54
|
+
type: ArrayConstructor;
|
55
|
+
default: () => never[];
|
56
|
+
};
|
57
|
+
itemChildren: {
|
58
|
+
type: StringConstructor;
|
59
|
+
default: string;
|
60
|
+
};
|
61
|
+
openAll: {
|
62
|
+
type: BooleanConstructor;
|
63
|
+
default: boolean;
|
64
|
+
};
|
65
|
+
openOnClick: {
|
66
|
+
type: BooleanConstructor;
|
67
|
+
default: boolean;
|
68
|
+
};
|
29
69
|
search: {
|
30
70
|
type: StringConstructor;
|
31
71
|
default: string;
|
@@ -38,11 +78,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
38
78
|
type: StringConstructor;
|
39
79
|
default: undefined;
|
40
80
|
};
|
81
|
+
/**
|
82
|
+
* @param {import("./VcsTreeNode.vue").VcsTreeNodeItem} item The item to filter.
|
83
|
+
* @param {string} search The query value.
|
84
|
+
*/
|
85
|
+
customFilter: {
|
86
|
+
type: FunctionConstructor;
|
87
|
+
default: undefined;
|
88
|
+
};
|
41
89
|
}>> & {
|
90
|
+
"onUpdate:opened"?: ((...args: any[]) => any) | undefined;
|
42
91
|
"onUpdate:search"?: ((...args: any[]) => any) | undefined;
|
43
92
|
}, {
|
44
93
|
search: string;
|
94
|
+
openOnClick: boolean;
|
45
95
|
items: unknown[];
|
96
|
+
opened: unknown[];
|
97
|
+
itemChildren: string;
|
98
|
+
customFilter: Function;
|
99
|
+
openAll: boolean;
|
46
100
|
showSearchbar: boolean;
|
47
101
|
searchbarPlaceholder: string;
|
48
102
|
}, {}>;
|
@@ -8,6 +8,10 @@
|
|
8
8
|
type: Object,
|
9
9
|
default: undefined,
|
10
10
|
},
|
11
|
+
cursorPointer: {
|
12
|
+
type: Boolean,
|
13
|
+
default: false,
|
14
|
+
},
|
11
15
|
});
|
12
16
|
|
13
17
|
const titleParent = ref();
|
@@ -23,14 +27,17 @@
|
|
23
27
|
overflow: hidden;
|
24
28
|
text-overflow: ellipsis;
|
25
29
|
}
|
30
|
+
.cursor-pointer {
|
31
|
+
cursor: pointer;
|
32
|
+
}
|
26
33
|
</style>
|
27
34
|
<template>
|
28
35
|
<div
|
29
|
-
class="title-parent pr-2 vcs-treeview-title"
|
36
|
+
class="title-parent pr-2 vcs-treeview-title w-100"
|
37
|
+
:class="{ 'cursor-pointer': cursorPointer }"
|
30
38
|
ref="titleParent"
|
31
|
-
@click.stop="item.clicked && !item.disabled && item.clicked($event)"
|
32
39
|
>
|
33
|
-
<span>
|
40
|
+
<span class="w-100">
|
34
41
|
{{ $st(item.title || item.name) }}
|
35
42
|
</span>
|
36
43
|
<v-tooltip v-if="tooltip" activator="parent">
|
@@ -1,6 +1,8 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
2
|
+
cursorPointer: boolean;
|
2
3
|
item?: Record<string, any> | undefined;
|
3
4
|
$props: {
|
5
|
+
readonly cursorPointer?: boolean | undefined;
|
4
6
|
readonly item?: Record<string, any> | undefined;
|
5
7
|
};
|
6
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
@@ -168,6 +168,7 @@
|
|
168
168
|
* @vue-prop {boolean} [showSearchbar=true] - whether to show searchbar
|
169
169
|
* @vue-prop {string} [searchbarPlaceholder] - placeholder for searchbar
|
170
170
|
* @vue-prop {string} [itemSelectable='isSelectable'] - The property on each item that is used to determine if it is selectable or not. Non-selectable items are automatically disabled.
|
171
|
+
* @vue-prop {function(any, string|undefined, TableItem):boolean} [customFilter] - a function to customize filtering when searching. The first parameter represents the item values, with the function called for each of them. The second is the search term. The third is the complete item.
|
171
172
|
* @vue-event {UpdateItemsEvent} update:items - Emits when one of the options properties is updated or on search input. Can be used to update items via API call to a server.
|
172
173
|
* @vue-computed {Array<TableItem>} filteredItems - array of items with search filter applied on. If search string is empty, same as items array.
|
173
174
|
* @vue-computed {Array<import("vuetify").DataTableHeader>} translatedHeaders - array of translated header items.
|
@@ -232,6 +233,10 @@
|
|
232
233
|
type: String,
|
233
234
|
default: 'isSelectable',
|
234
235
|
},
|
236
|
+
customFilter: {
|
237
|
+
type: Function,
|
238
|
+
default: undefined,
|
239
|
+
},
|
235
240
|
},
|
236
241
|
setup(props, { attrs, emit, slots }) {
|
237
242
|
const vm = getCurrentInstance().proxy;
|
@@ -272,6 +277,9 @@
|
|
272
277
|
* @returns {boolean}
|
273
278
|
*/
|
274
279
|
const handleFilter = (value, filter, item) => {
|
280
|
+
if (props.customFilter) {
|
281
|
+
return props.customFilter(value, filter, item.raw);
|
282
|
+
}
|
275
283
|
return handleFilterInternal(value, filter, item.raw);
|
276
284
|
};
|
277
285
|
|
@@ -300,9 +308,12 @@
|
|
300
308
|
* @type {ComputedRef<Array<Object>>}
|
301
309
|
*/
|
302
310
|
const filteredItems = computed(() =>
|
303
|
-
props.items.filter((item) =>
|
304
|
-
|
305
|
-
|
311
|
+
props.items.filter((item) => {
|
312
|
+
if (props.customFilter) {
|
313
|
+
return props.customFilter(item.value, search.value, item);
|
314
|
+
}
|
315
|
+
return handleFilterInternal(item.value, search.value, item);
|
316
|
+
}),
|
306
317
|
);
|
307
318
|
const numberOfItems = computed(() => {
|
308
319
|
if (props.serverItemsLength > -1) {
|
@@ -40,6 +40,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
type: StringConstructor;
|
41
41
|
default: string;
|
42
42
|
};
|
43
|
+
customFilter: {
|
44
|
+
type: FunctionConstructor;
|
45
|
+
default: undefined;
|
46
|
+
};
|
43
47
|
}, {
|
44
48
|
hovering: import("vue").Ref<null>;
|
45
49
|
search: Ref<UnwrapRef<string>>;
|
@@ -102,8 +106,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
102
106
|
type: StringConstructor;
|
103
107
|
default: string;
|
104
108
|
};
|
109
|
+
customFilter: {
|
110
|
+
type: FunctionConstructor;
|
111
|
+
default: undefined;
|
112
|
+
};
|
105
113
|
}>>, {
|
106
114
|
items: unknown[];
|
115
|
+
customFilter: Function;
|
107
116
|
showSearchbar: boolean;
|
108
117
|
searchbarPlaceholder: string;
|
109
118
|
headers: unknown[];
|
@@ -1,5 +1,8 @@
|
|
1
1
|
<template>
|
2
|
-
<v-
|
2
|
+
<v-sheet
|
3
|
+
class="balloon-component d-flex flex-column flex-grow-1"
|
4
|
+
v-if="position"
|
5
|
+
>
|
3
6
|
<slot name="balloon-header" :attrs="{ ...$props, ...$attrs }">
|
4
7
|
<v-list-item class="px-1">
|
5
8
|
<template #prepend="prependScope">
|
@@ -32,21 +35,17 @@
|
|
32
35
|
|
33
36
|
<v-divider />
|
34
37
|
|
35
|
-
<
|
36
|
-
class="overflow-y-auto
|
37
|
-
:max-height="maxHeight"
|
38
|
-
color="transparent"
|
38
|
+
<div
|
39
|
+
class="overflow-x-hidden overflow-y-auto d-flex flex-column flex-grow-1"
|
39
40
|
>
|
40
41
|
<slot :attrs="{ ...$props, ...$attrs }">
|
41
|
-
<v-list
|
42
|
-
v-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
{{ $st(key) }}
|
49
|
-
</v-list-item-title>
|
42
|
+
<v-list color="transparent" class="py-2">
|
43
|
+
<v-list-item
|
44
|
+
v-for="(value, key, index) in attributes"
|
45
|
+
:key="`attribute-${index}`"
|
46
|
+
class="px-2"
|
47
|
+
:title="$st(key)"
|
48
|
+
>
|
50
49
|
<v-list-item-subtitle
|
51
50
|
:tag="getTag(tags, key)"
|
52
51
|
v-bind="getTagOptions(tags, key)"
|
@@ -56,13 +55,13 @@
|
|
56
55
|
</v-list-item>
|
57
56
|
</v-list>
|
58
57
|
</slot>
|
59
|
-
</
|
60
|
-
</v-
|
58
|
+
</div>
|
59
|
+
</v-sheet>
|
61
60
|
</template>
|
62
61
|
<script>
|
63
|
-
import { inject, onMounted, onUnmounted,
|
62
|
+
import { inject, onMounted, onUnmounted, watch } from 'vue';
|
64
63
|
import {
|
65
|
-
|
64
|
+
VSheet,
|
66
65
|
VDivider,
|
67
66
|
VIcon,
|
68
67
|
VList,
|
@@ -70,10 +69,6 @@
|
|
70
69
|
VListItemSubtitle,
|
71
70
|
VListItemTitle,
|
72
71
|
} from 'vuetify/components';
|
73
|
-
import {
|
74
|
-
getTargetSize,
|
75
|
-
posToNumber,
|
76
|
-
} from '../manager/window/windowHelper.js';
|
77
72
|
import { setupBalloonPositionListener } from './balloonHelper.js';
|
78
73
|
import VcsButton from '../components/buttons/VcsButton.vue';
|
79
74
|
import { getTag, getTagOptions } from '../components/tables/VcsTable.vue';
|
@@ -97,7 +92,7 @@
|
|
97
92
|
name: 'BalloonComponent',
|
98
93
|
components: {
|
99
94
|
VcsButton,
|
100
|
-
|
95
|
+
VSheet,
|
101
96
|
VList,
|
102
97
|
VListItem,
|
103
98
|
VIcon,
|
@@ -134,28 +129,6 @@
|
|
134
129
|
setup(props, { attrs }) {
|
135
130
|
const app = inject('vcsApp');
|
136
131
|
const windowId = attrs['window-state'].id;
|
137
|
-
function getMaxHeight() {
|
138
|
-
if (app.windowManager.get(windowId)?.position?.maxHeight) {
|
139
|
-
return (
|
140
|
-
posToNumber(
|
141
|
-
app.windowManager.get(windowId).position.maxHeight,
|
142
|
-
'maxHeight',
|
143
|
-
getTargetSize(app.maps.target),
|
144
|
-
) - 49 // 44px header offset with padding 5px
|
145
|
-
);
|
146
|
-
}
|
147
|
-
if (app.windowManager.get(windowId)?.position?.height) {
|
148
|
-
return (
|
149
|
-
posToNumber(
|
150
|
-
app.windowManager.get(windowId).position.height,
|
151
|
-
'height',
|
152
|
-
getTargetSize(app.maps.target),
|
153
|
-
) - 49 // 44px header offset with padding 5px
|
154
|
-
);
|
155
|
-
}
|
156
|
-
return 250;
|
157
|
-
}
|
158
|
-
const maxHeight = ref(getMaxHeight());
|
159
132
|
|
160
133
|
let balloonPositionListener = null;
|
161
134
|
const destroyListener = () => {
|
@@ -181,7 +154,6 @@
|
|
181
154
|
windowId,
|
182
155
|
props.position,
|
183
156
|
);
|
184
|
-
maxHeight.value = getMaxHeight();
|
185
157
|
},
|
186
158
|
);
|
187
159
|
|
@@ -199,7 +171,6 @@
|
|
199
171
|
close,
|
200
172
|
getTag,
|
201
173
|
getTagOptions,
|
202
|
-
maxHeight,
|
203
174
|
};
|
204
175
|
},
|
205
176
|
};
|
@@ -28,7 +28,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
28
|
close: () => void;
|
29
29
|
getTag: typeof getTag;
|
30
30
|
getTagOptions: typeof getTagOptions;
|
31
|
-
maxHeight: import("vue").Ref<number>;
|
32
31
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
33
32
|
featureId: {
|
34
33
|
type: StringConstructor;
|
@@ -2,17 +2,10 @@
|
|
2
2
|
<iframe
|
3
3
|
:src="src"
|
4
4
|
:title="title"
|
5
|
-
|
6
|
-
class="iframe-component"
|
5
|
+
class="h-100 w-100 border-0 d-block flex-grow-1"
|
7
6
|
/>
|
8
7
|
</template>
|
9
8
|
<script>
|
10
|
-
import { inject } from 'vue';
|
11
|
-
import {
|
12
|
-
getTargetSize,
|
13
|
-
posToNumber,
|
14
|
-
} from '../manager/window/windowHelper.js';
|
15
|
-
|
16
9
|
/**
|
17
10
|
* @description An iframe component
|
18
11
|
* @vue-prop {string} src - Specifies the address of the document to embed in the <iframe>
|
@@ -38,30 +31,6 @@
|
|
38
31
|
default: () => {},
|
39
32
|
},
|
40
33
|
},
|
41
|
-
setup(props, { attrs }) {
|
42
|
-
const app = inject('vcsApp');
|
43
|
-
let { height, width } = app.windowManager.get(
|
44
|
-
attrs['window-state'].id,
|
45
|
-
).position;
|
46
|
-
|
47
|
-
// set iframe size to absolute px values
|
48
|
-
if (app.maps.target) {
|
49
|
-
const targetSize = getTargetSize(app.maps.target);
|
50
|
-
const heightNumber = posToNumber(height, 'height', targetSize);
|
51
|
-
if (heightNumber) {
|
52
|
-
height = `${heightNumber - 36}px`; // 32px header height + 4px margin
|
53
|
-
}
|
54
|
-
const widthNumber = posToNumber(width, 'width', targetSize);
|
55
|
-
if (widthNumber) {
|
56
|
-
width = `${widthNumber}px`;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
return {
|
61
|
-
height,
|
62
|
-
width,
|
63
|
-
};
|
64
|
-
},
|
65
34
|
};
|
66
35
|
</script>
|
67
36
|
|
@@ -14,10 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
14
14
|
type: ObjectConstructor;
|
15
15
|
default: () => void;
|
16
16
|
};
|
17
|
-
}, {
|
18
|
-
height: any;
|
19
|
-
width: any;
|
20
|
-
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
17
|
+
}, any, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
21
18
|
src: {
|
22
19
|
type: StringConstructor;
|
23
20
|
required: true;
|
package/src/i18n/de.d.ts
CHANGED
package/src/i18n/de.js
CHANGED
package/src/i18n/en.d.ts
CHANGED
package/src/i18n/en.js
CHANGED
package/src/init.d.ts
CHANGED
@@ -11,6 +11,12 @@ export default function initApp(mountTarget: string): Promise<import("@src/vcsUi
|
|
11
11
|
* @returns {Promise<import("@src/vcsUiApp.js").default>}
|
12
12
|
*/
|
13
13
|
export function initAppFromModule(mountTarget: string, configUrl?: string | undefined): Promise<import("@src/vcsUiApp.js").default>;
|
14
|
+
/**
|
15
|
+
* Creates a module from a config object or a url
|
16
|
+
* @param {import("@vcmap/core").VcsModuleConfig|string} c
|
17
|
+
* @returns {Promise<import("@vcmap/core").VcsModule|null>}
|
18
|
+
*/
|
19
|
+
export function createModuleFromObjectOrUrl(c: import("@vcmap/core").VcsModuleConfig | string): Promise<import("@vcmap/core").VcsModule | null>;
|
14
20
|
/**
|
15
21
|
* Initializes app with a map config containing a set of config urls
|
16
22
|
* @param {string} mountTarget
|
package/src/init.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { createApp } from 'vue';
|
2
2
|
import { check, is, maybe, oneOf, optional } from '@vcsuite/check';
|
3
3
|
import { VcsModule } from '@vcmap/core';
|
4
|
+
import { getLogger } from '@vcsuite/logger';
|
4
5
|
import VcsAppComponentWrapper from './application/VcsAppWrapper.vue';
|
5
6
|
import VcsUiApp from './vcsUiApp.js';
|
6
7
|
import { createSafeI18n } from './vuePlugins/i18n.js';
|
@@ -76,6 +77,30 @@ export async function initAppFromModule(mountTarget, configUrl) {
|
|
76
77
|
return app;
|
77
78
|
}
|
78
79
|
|
80
|
+
/**
|
81
|
+
* Creates a module from a config object or a url
|
82
|
+
* @param {import("@vcmap/core").VcsModuleConfig|string} c
|
83
|
+
* @returns {Promise<import("@vcmap/core").VcsModule|null>}
|
84
|
+
*/
|
85
|
+
export async function createModuleFromObjectOrUrl(c) {
|
86
|
+
if (is(c, Object)) {
|
87
|
+
if (!is(c, VcsUiAppConfigPattern)) {
|
88
|
+
getLogger('init').warning(
|
89
|
+
'Provided object is no valid VcsUiAppConfig',
|
90
|
+
c,
|
91
|
+
);
|
92
|
+
}
|
93
|
+
return new VcsModule(/** @type{import("@vcmap/core").VcsModuleConfig} */ c);
|
94
|
+
} else if (is(c, String)) {
|
95
|
+
const response = await fetch(c);
|
96
|
+
if (response.ok) {
|
97
|
+
const config = await response.json();
|
98
|
+
return new VcsModule(config);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
return null;
|
102
|
+
}
|
103
|
+
|
79
104
|
/**
|
80
105
|
* Initializes app with a map config containing a set of config urls
|
81
106
|
* @param {string} mountTarget
|
@@ -95,20 +120,7 @@ export async function initAppFromAppConfig(mountTarget, appUrl) {
|
|
95
120
|
check(appConfig.modules, [oneOf(String, Object)]);
|
96
121
|
|
97
122
|
const modules = await Promise.all(
|
98
|
-
appConfig.modules.map(
|
99
|
-
if (is(c, VcsUiAppConfigPattern)) {
|
100
|
-
return new VcsModule(
|
101
|
-
/** @type{import("@vcmap/core").VcsModuleConfig} */ c,
|
102
|
-
);
|
103
|
-
} else if (is(c, String)) {
|
104
|
-
const response = await fetch(c);
|
105
|
-
if (response.ok) {
|
106
|
-
const config = await response.json();
|
107
|
-
return new VcsModule(config);
|
108
|
-
}
|
109
|
-
}
|
110
|
-
return null;
|
111
|
-
}),
|
123
|
+
appConfig.modules.map(createModuleFromObjectOrUrl),
|
112
124
|
);
|
113
125
|
// eslint-disable-next-line no-restricted-syntax
|
114
126
|
for await (const module of modules) {
|
package/src/legend/VcsLegend.vue
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<v-toolbar
|
3
|
-
v-if="toolboxOpen && orderedGroups.length > 0 &&
|
3
|
+
v-if="toolboxOpen && orderedGroups.length > 0 && smAndUp"
|
4
4
|
class="vcs-toolbox mx-auto elevation-4 opacity-80 toolbox-manager-component"
|
5
5
|
:class="{
|
6
6
|
'rounded-b': !open,
|
@@ -150,7 +150,7 @@
|
|
150
150
|
.filter(filterFunc),
|
151
151
|
);
|
152
152
|
|
153
|
-
const toolboxOpen =
|
153
|
+
const toolboxOpen = app.toolboxManager.open;
|
154
154
|
const toolboxToggleAction = {
|
155
155
|
name: 'toolboxToggleAction',
|
156
156
|
icon: '$vcsTools',
|
@@ -199,13 +199,13 @@
|
|
199
199
|
app.windowManager.bringWindowToTop('toolbox');
|
200
200
|
};
|
201
201
|
|
202
|
-
const {
|
202
|
+
const { smAndUp } = useDisplay();
|
203
203
|
const fontSize = useFontSize();
|
204
204
|
const toolboxHeight = computed(() => {
|
205
205
|
return fontSize.value * 3 + 1;
|
206
206
|
});
|
207
207
|
return {
|
208
|
-
|
208
|
+
smAndUp,
|
209
209
|
toolboxOpen,
|
210
210
|
orderedGroups,
|
211
211
|
zIndex,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
2
|
-
|
3
|
-
toolboxOpen:
|
2
|
+
smAndUp: import("vue").Ref<boolean>;
|
3
|
+
toolboxOpen: any;
|
4
4
|
orderedGroups: import("vue").ComputedRef<(import("../buttonManager.js", { with: { "resolution-mode": "import" } }).ButtonComponent | import("./toolboxManager.js", { with: { "resolution-mode": "import" } }).ToolboxComponent)[]>;
|
5
5
|
zIndex: any;
|
6
6
|
isDefaultToolbox: import("vue").ComputedRef<boolean>;
|
@@ -117,6 +117,11 @@ declare class ToolboxManager implements IToolboxManager {
|
|
117
117
|
* @type {import("vue").UnwrapRef<string[]>}
|
118
118
|
*/
|
119
119
|
componentIds: import("vue").UnwrapRef<string[]>;
|
120
|
+
/**
|
121
|
+
* reative boolean to show or hide the toolbox
|
122
|
+
* @type {import("vue").Ref<boolean>}
|
123
|
+
*/
|
124
|
+
open: import("vue").Ref<boolean>;
|
120
125
|
/**
|
121
126
|
* @type {Map<string, ToolboxComponent>}
|
122
127
|
* @private
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { VcsEvent } from '@vcmap/core';
|
2
2
|
import { check, maybe, ofEnum, oneOf, optional } from '@vcsuite/check';
|
3
3
|
import { v4 as uuidv4 } from 'uuid';
|
4
|
-
import { reactive, shallowReactive } from 'vue';
|
4
|
+
import { reactive, ref, shallowReactive } from 'vue';
|
5
5
|
import { vcsAppSymbol } from '../../pluginHelper.js';
|
6
6
|
import ButtonManager from '../buttonManager.js';
|
7
7
|
import { ActionPattern } from '../../components/lists/VcsActionList.vue';
|
@@ -207,6 +207,12 @@ class ToolboxManager {
|
|
207
207
|
* @type {import("vue").UnwrapRef<string[]>}
|
208
208
|
*/
|
209
209
|
this.componentIds = reactive([]);
|
210
|
+
|
211
|
+
/**
|
212
|
+
* reative boolean to show or hide the toolbox
|
213
|
+
* @type {import("vue").Ref<boolean>}
|
214
|
+
*/
|
215
|
+
this.open = ref(true);
|
210
216
|
/**
|
211
217
|
* @type {Map<string, ToolboxComponent>}
|
212
218
|
* @private
|
@@ -9,6 +9,7 @@
|
|
9
9
|
:class="{
|
10
10
|
rounded: !isDocked,
|
11
11
|
marginToTop: isDocked || !isChild,
|
12
|
+
marginToTopTablet: isTabletWithOpenToolbar,
|
12
13
|
'rounded-be': isDynamicLeft,
|
13
14
|
'rounded-bs': isDynamicRight,
|
14
15
|
}"
|
@@ -27,7 +28,7 @@
|
|
27
28
|
</div>
|
28
29
|
<v-divider v-if="!windowState.hideHeader" />
|
29
30
|
<div
|
30
|
-
class="overflow-x-hidden mb-1"
|
31
|
+
class="overflow-x-hidden overflow-y-auto mb-1 d-flex flex-grow-1 flex-column"
|
31
32
|
:class="{
|
32
33
|
rounded: !isDocked,
|
33
34
|
}"
|
@@ -41,11 +42,15 @@
|
|
41
42
|
.marginToTop {
|
42
43
|
margin-top: 2px;
|
43
44
|
}
|
45
|
+
.marginToTopTablet {
|
46
|
+
margin-top: calc(var(--v-vcs-font-size) * 3 + 6px);
|
47
|
+
}
|
44
48
|
</style>
|
45
49
|
|
46
50
|
<script>
|
47
51
|
import { computed, inject, provide, ref } from 'vue';
|
48
52
|
import { VDivider, VSheet } from 'vuetify/components';
|
53
|
+
import { useDisplay } from 'vuetify';
|
49
54
|
import { WindowSlot } from './windowManager.js';
|
50
55
|
|
51
56
|
/**
|
@@ -95,6 +100,10 @@
|
|
95
100
|
const isDocked = computed(
|
96
101
|
() => props.slotWindow.value !== WindowSlot.DETACHED,
|
97
102
|
);
|
103
|
+
const display = useDisplay();
|
104
|
+
const isTabletWithOpenToolbar = computed(
|
105
|
+
() => app.toolboxManager.open.value && display.sm.value,
|
106
|
+
);
|
98
107
|
const isDockedLeft = computed(() => {
|
99
108
|
return (
|
100
109
|
props.slotWindow.value === WindowSlot.STATIC ||
|
@@ -156,6 +165,7 @@
|
|
156
165
|
isDynamic,
|
157
166
|
isChild,
|
158
167
|
isDocked,
|
168
|
+
isTabletWithOpenToolbar,
|
159
169
|
isDynamicLeft: isDockedLeft,
|
160
170
|
isDynamicRight: isDockedRight,
|
161
171
|
isDraggable,
|
@@ -16,6 +16,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
16
16
|
isDynamic: import("vue").ComputedRef<boolean>;
|
17
17
|
isChild: import("vue").ComputedRef<boolean>;
|
18
18
|
isDocked: import("vue").ComputedRef<boolean>;
|
19
|
+
isTabletWithOpenToolbar: import("vue").ComputedRef<any>;
|
19
20
|
isDynamicLeft: import("vue").ComputedRef<boolean>;
|
20
21
|
isDynamicRight: import("vue").ComputedRef<boolean>;
|
21
22
|
isDraggable: import("vue").Ref<boolean>;
|