@vcmap/ui 5.1.3 → 5.1.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.
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.c815b8.js → core.8b769f.js} +2457 -2441
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-97b02a80.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.f85ce1.css → ui.576b59.css} +1 -1
- package/dist/assets/{ui.f85ce1.js → ui.576b59.js} +2363 -2314
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.bf2ba1.js → vuetify.515b3c.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/src/actions/listActions.d.ts +2 -1
- package/src/actions/listActions.js +3 -1
- package/src/components/icons/+all.js +8 -0
- package/src/components/icons/2DPointIcon.vue +22 -0
- package/src/components/icons/2DPointIcon.vue.d.ts +2 -0
- package/src/components/icons/3DPointIcon.vue +22 -0
- package/src/components/icons/3DPointIcon.vue.d.ts +2 -0
- package/src/components/icons/AxisIcon.vue +10 -15
- package/src/components/icons/PointMeasurementIcon.vue +7 -17
- package/src/featureInfo/abstractFeatureInfoView.d.ts +8 -0
- package/src/featureInfo/abstractFeatureInfoView.js +20 -1
- package/src/manager/collectionManager/collectionComponentClass.d.ts +14 -4
- package/src/manager/collectionManager/collectionComponentClass.js +40 -22
- package/src/manager/collectionManager/editorCollectionComponentClass.d.ts +7 -1
- package/src/manager/collectionManager/editorCollectionComponentClass.js +7 -2
- package/src/manager/contextMenu/contextMenuManager.d.ts +11 -0
- package/src/manager/contextMenu/contextMenuManager.js +22 -1
- package/src/navigation/MapNavigation.vue +7 -4
- package/src/navigation/overviewMap.js +24 -19
- package/dist/assets/index-0abd9815.js +0 -1
- /package/dist/assets/{cesium.012009.js → cesium.88a354.js} +0 -0
- /package/dist/assets/{ol.fbe9a4.js → ol.98520e.js} +0 -0
- /package/dist/assets/{vue.65726b.js → vue.e13c02.js} +0 -0
- /package/dist/assets/{vuetify.bf2ba1.css → vuetify.515b3c.css} +0 -0
package/dist/assets/ui.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./ui.
|
1
|
+
export * from "./ui.576b59.js";
|
package/dist/assets/vue.js
CHANGED
@@ -13,7 +13,7 @@ function loadCss(href) {
|
|
13
13
|
elem.onerror = reject;
|
14
14
|
document.head.appendChild(elem);
|
15
15
|
});
|
16
|
-
} await loadCss('./assets/vuetify.
|
16
|
+
} await loadCss('./assets/vuetify.515b3c.css');import v from "./vue.e13c02.js";
|
17
17
|
const Ne = v.extend().extend({
|
18
18
|
name: "themeable",
|
19
19
|
provide() {
|
package/dist/assets/vuetify.js
CHANGED
package/dist/index.html
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "5.1.
|
3
|
+
"version": "5.1.4",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -53,7 +53,7 @@
|
|
53
53
|
},
|
54
54
|
"peerDependencies": {
|
55
55
|
"@vcmap-cesium/engine": "^4.0.3",
|
56
|
-
"@vcmap/core": "^5.1.
|
56
|
+
"@vcmap/core": "^5.1.3",
|
57
57
|
"ol": "^7.5.2",
|
58
58
|
"vue": "~2.7.3",
|
59
59
|
"vuetify": "~2.6.7"
|
@@ -54,10 +54,11 @@ export function createListImportAction(importCallback: (arg0: File[]) => void |
|
|
54
54
|
* @param {import("../manager/window/windowManager.js").default} windowManager
|
55
55
|
* @param {string|symbol} owner
|
56
56
|
* @param {string} multiEditorId
|
57
|
+
* @param {string} [name="list.edit"]
|
57
58
|
* @template {Object} T
|
58
59
|
* @returns {{action: import("./actionHelper.js").VcsAction, destroy: function(): void}}
|
59
60
|
*/
|
60
|
-
export function createListEditAction<T extends Object>(selection: import("vue").Ref<Array<import("../manager/collectionManager/collectionComponentClass.js").CollectionComponentListItem>>, editCallback: (arg0: T) => void, windowManager: import("../manager/window/windowManager.js").default, owner: string | symbol, multiEditorId: string): {
|
61
|
+
export function createListEditAction<T extends Object>(selection: import("vue").Ref<Array<import("../manager/collectionManager/collectionComponentClass.js").CollectionComponentListItem>>, editCallback: (arg0: T) => void, windowManager: import("../manager/window/windowManager.js").default, owner: string | symbol, multiEditorId: string, name?: string | undefined): {
|
61
62
|
action: import("./actionHelper.js").VcsAction;
|
62
63
|
destroy: () => void;
|
63
64
|
};
|
@@ -148,6 +148,7 @@ export function createListImportAction(
|
|
148
148
|
* @param {import("../manager/window/windowManager.js").default} windowManager
|
149
149
|
* @param {string|symbol} owner
|
150
150
|
* @param {string} multiEditorId
|
151
|
+
* @param {string} [name="list.edit"]
|
151
152
|
* @template {Object} T
|
152
153
|
* @returns {{action: import("./actionHelper.js").VcsAction, destroy: function(): void}}
|
153
154
|
*/
|
@@ -157,11 +158,12 @@ export function createListEditAction(
|
|
157
158
|
windowManager,
|
158
159
|
owner,
|
159
160
|
multiEditorId,
|
161
|
+
name = 'list.edit',
|
160
162
|
) {
|
161
163
|
const { action, destroy: destroyEditSelected } = createListItemBulkAction(
|
162
164
|
selection,
|
163
165
|
{
|
164
|
-
name
|
166
|
+
name,
|
165
167
|
callback: editCallback,
|
166
168
|
},
|
167
169
|
);
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import TwoDAreaIcon from './2DAreaIcon.vue';
|
2
2
|
import TwoDDistanceIcon from './2DDistanceIcon.vue';
|
3
3
|
import TwoDHeightObliqueIcon from './2DHeightObliqueIcon.vue';
|
4
|
+
import TwoDPointIcon from './2DPointIcon.vue';
|
4
5
|
import ThreeDAreaIcon from './3DAreaIcon.vue';
|
5
6
|
import ThreeDDistanceIcon from './3DDistanceIcon.vue';
|
6
7
|
import ThreeDHeightIcon from './3DHeightIcon.vue';
|
8
|
+
import ThreeDPointIcon from './3DPointIcon.vue';
|
7
9
|
import AngleIcon from './AngleIcon.vue';
|
8
10
|
import AssociationsIcon from './AssociationsIcon.vue';
|
9
11
|
import AxisIcon from './AxisIcon.vue';
|
@@ -144,6 +146,9 @@ const IconMap = {
|
|
144
146
|
'2dHeightOblique': {
|
145
147
|
component: TwoDHeightObliqueIcon,
|
146
148
|
},
|
149
|
+
'2dPoint': {
|
150
|
+
component: TwoDPointIcon,
|
151
|
+
},
|
147
152
|
'3d': {
|
148
153
|
component: ThreeDimensionsIcon,
|
149
154
|
},
|
@@ -156,6 +161,9 @@ const IconMap = {
|
|
156
161
|
'3dHeight': {
|
157
162
|
component: ThreeDHeightIcon,
|
158
163
|
},
|
164
|
+
'3dPoint': {
|
165
|
+
component: ThreeDPointIcon,
|
166
|
+
},
|
159
167
|
angle: {
|
160
168
|
component: AngleIcon,
|
161
169
|
},
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg
|
5
|
+
id="icon_24_2D_point"
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
7
|
+
viewBox="0 0 24 24"
|
8
|
+
>
|
9
|
+
<rect id="size" x="0" y="0" width="24" height="24" fill="none" />
|
10
|
+
<path
|
11
|
+
id="ruler"
|
12
|
+
d="M.5,14.24c-.48-.6-.37-1.48.23-1.95h0L15.72.45c.6-.48,1.48-.37,1.95.23l2.15,2.72c.48.6.37,1.48-.23,1.95h0l-15,11.84c-.6.48-1.48.37-1.95-.23L.5,14.25h0ZM16.32,1.75L1.87,13.16c-.15.12-.18.34-.06.49l1.72,2.18c.12.15.34.18.49.06l1.77-1.39c.15-.12.18-.34.06-.49l-.43-.54c-.18-.23-.14-.55.09-.73s.55-.14.73.09l.43.54c.12.15.33.18.48.06l.55-.43c.15-.12.18-.33.06-.49l-.43-.54c-.17-.23-.11-.56.11-.73.22-.16.53-.12.7.08l.43.54c.12.15.34.18.49.06l.56-.44c.15-.12.18-.33.06-.49l-.43-.54c-.17-.23-.12-.56.11-.73.22-.16.53-.12.7.08l.43.54c.12.15.34.18.49.06l.54-.43c.15-.12.18-.34.06-.49l-.43-.54c-.17-.23-.11-.56.11-.73.22-.16.53-.12.7.08l.43.54c.12.15.34.18.49.06h0l.55-.43c.15-.12.18-.33.06-.49l-.43-.54c-.18-.23-.14-.55.09-.73s.55-.14.73.09l.43.54c.12.15.33.17.48.06l.55-.43c.15-.12.17-.33.06-.48l-.43-.55c-.18-.23-.14-.55.09-.73s.55-.14.73.09l.43.54c.12.15.33.17.48.06l1.77-1.4c.15-.12.18-.34.06-.49l-1.72-2.18c-.12-.15-.34-.18-.49-.06ZM16.14,3.21c.3-.24.73-.18.97.11s.18.73-.11.97-.73.18-.97-.11-.18-.73.11-.97h0Z"
|
13
|
+
fill="currentColor"
|
14
|
+
/>
|
15
|
+
<path
|
16
|
+
id="text2D"
|
17
|
+
d="M13.9,20.5h1.09c0-.15.01-.3.04-.45.03-.15.08-.29.15-.42.07-.12.16-.22.28-.3.13-.08.27-.12.42-.12.22,0,.44.07.6.23.16.17.25.4.24.64,0,.16-.04.32-.12.46-.08.13-.17.25-.29.36s-.24.21-.38.29c-.14.09-.27.17-.39.26-.24.17-.47.33-.68.49-.21.15-.4.33-.56.52-.16.19-.29.41-.38.64-.1.27-.15.56-.14.85h4.11v-.98h-2.64c.14-.19.3-.36.48-.5.18-.14.37-.28.56-.4.19-.12.38-.25.57-.38.18-.12.35-.27.51-.43.15-.16.27-.34.36-.54.1-.23.14-.48.14-.73s-.05-.51-.16-.75c-.1-.21-.24-.4-.42-.55s-.39-.27-.61-.34c-.24-.08-.48-.12-.73-.12-.31,0-.61.05-.89.17-.25.11-.47.27-.64.48s-.3.46-.38.72c-.09.29-.13.59-.11.9h-.03ZM19.86,22.89v-3.6h.9c.27,0,.53.04.78.13.2.08.38.21.51.38.13.18.23.38.28.6.06.26.09.52.08.78,0,.27-.03.54-.12.8-.07.2-.18.38-.32.53-.13.13-.28.23-.46.29-.17.06-.35.09-.53.08h-1.12ZM18.6,18.23v5.71h2.46c.39,0,.78-.07,1.14-.22.31-.14.59-.34.81-.6.22-.27.39-.58.48-.92.11-.37.16-.76.16-1.15,0-.42-.06-.84-.2-1.24-.12-.33-.3-.63-.54-.88-.23-.23-.51-.42-.82-.53-.33-.12-.68-.18-1.03-.18h-2.46,0Z"
|
18
|
+
fill="currentColor"
|
19
|
+
/>
|
20
|
+
<circle id="ellipse" cx="17.89" cy="12.96" r="3" fill="currentColor" />
|
21
|
+
</svg>
|
22
|
+
</template>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg
|
5
|
+
id="icon_24_3D_point"
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
7
|
+
viewBox="0 0 24 24"
|
8
|
+
>
|
9
|
+
<rect id="size" x="0" y="0" width="24" height="24" fill="none" />
|
10
|
+
<path
|
11
|
+
id="ruler"
|
12
|
+
d="M.5,14.24c-.48-.6-.37-1.48.23-1.95h0L15.72.45c.6-.48,1.48-.37,1.95.23l2.15,2.72c.48.6.37,1.48-.23,1.95h0l-15,11.84c-.6.48-1.48.37-1.95-.23L.5,14.25h0ZM16.32,1.75L1.87,13.16c-.15.12-.18.34-.06.49l1.72,2.18c.12.15.34.18.49.06l1.77-1.39c.15-.12.18-.34.06-.49l-.43-.54c-.18-.23-.14-.55.09-.73s.55-.14.73.09l.43.54c.12.15.33.18.48.06l.55-.43c.15-.12.18-.33.06-.49l-.43-.54c-.17-.23-.11-.56.11-.73.22-.16.53-.12.7.08l.43.54c.12.15.34.18.49.06l.56-.44c.15-.12.18-.33.06-.49l-.43-.54c-.17-.23-.12-.56.11-.73.22-.16.53-.12.7.08l.43.54c.12.15.34.18.49.06l.54-.43c.15-.12.18-.34.06-.49l-.43-.54c-.17-.23-.11-.56.11-.73.22-.16.53-.12.7.08l.43.54c.12.15.34.18.49.06h0l.55-.43c.15-.12.18-.33.06-.49l-.43-.54c-.18-.23-.14-.55.09-.73s.55-.14.73.09l.43.54c.12.15.33.17.48.06l.55-.43c.15-.12.17-.33.06-.48l-.43-.55c-.18-.23-.14-.55.09-.73s.55-.14.73.09l.43.54c.12.15.33.17.48.06l1.77-1.4c.15-.12.18-.34.06-.49l-1.72-2.18c-.12-.15-.34-.18-.49-.06ZM16.14,3.21c.3-.24.73-.18.97.11s.18.73-.11.97-.73.18-.97-.11-.18-.73.11-.97h0Z"
|
13
|
+
fill="currentColor"
|
14
|
+
/>
|
15
|
+
<circle id="ellipse" cx="17.89" cy="12.96" r="3" fill="currentColor" />
|
16
|
+
<path
|
17
|
+
id="text3D"
|
18
|
+
d="M15.32,20.55v.8c.14,0,.28,0,.44.01.14,0,.29.04.42.09.13.05.24.13.32.24.09.15.14.32.12.49.01.24-.08.48-.26.64-.18.16-.41.24-.65.24-.15,0-.3-.03-.43-.09-.12-.06-.22-.14-.3-.24-.08-.1-.14-.22-.18-.35-.04-.14-.07-.28-.07-.43h-1.08c-.01.29.04.59.14.86.09.24.24.46.42.64.19.18.41.32.66.4.28.09.57.13.86.13.27,0,.53-.04.78-.12.24-.07.47-.19.67-.35.19-.16.35-.35.46-.58.12-.24.18-.51.17-.78,0-.3-.09-.59-.26-.82-.18-.23-.44-.39-.73-.45v-.02c.24-.06.45-.21.59-.42.13-.22.2-.47.2-.72,0-.23-.05-.46-.17-.66-.11-.19-.26-.36-.44-.49-.18-.13-.38-.24-.6-.3-.22-.07-.44-.1-.67-.1-.27,0-.53.04-.78.14-.23.09-.43.23-.6.4-.17.18-.3.38-.39.61-.1.25-.15.52-.16.79h1.08c-.02-.26.05-.51.2-.72.16-.19.4-.3.65-.28.2,0,.4.07.55.19.16.14.25.34.24.55,0,.14-.03.27-.12.38-.08.1-.18.17-.3.22-.12.05-.25.08-.39.09-.13.01-.26.01-.39,0ZM19.76,22.83v-3.6h.9c.27,0,.53.04.78.13.2.08.38.21.51.38.13.18.23.38.28.6.06.26.09.52.08.78,0,.27-.03.54-.12.8-.07.2-.18.38-.32.53-.13.13-.28.23-.46.29-.17.06-.35.09-.53.08h-1.12ZM18.5,18.17v5.71h2.46c.39,0,.78-.07,1.14-.22.31-.14.59-.34.81-.6.22-.27.39-.58.48-.92.11-.37.16-.76.16-1.15,0-.42-.06-.84-.2-1.24-.12-.33-.3-.63-.54-.88-.23-.23-.51-.42-.82-.53-.33-.12-.68-.18-1.03-.18h-2.46Z"
|
19
|
+
fill="currentColor"
|
20
|
+
/>
|
21
|
+
</svg>
|
22
|
+
</template>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
@@ -2,33 +2,28 @@
|
|
2
2
|
|
3
3
|
<template>
|
4
4
|
<svg
|
5
|
+
id="vcsAxis"
|
5
6
|
xmlns="http://www.w3.org/2000/svg"
|
6
|
-
|
7
|
-
height="14.02"
|
8
|
-
viewBox="0 0 14.456 14.02"
|
7
|
+
viewBox="0 0 14.46 14.02"
|
9
8
|
>
|
10
9
|
<path
|
11
|
-
id="
|
12
|
-
d="
|
13
|
-
transform="translate(-0.114 14.02)"
|
10
|
+
id="Path_Z"
|
11
|
+
d="M5.37,1.13V0h3.18v1.13l-1.3,1.65v.1h1.3v1.14h-3.18v-1.08l1.33-1.7v-.1h-1.33Z"
|
14
12
|
fill="currentColor"
|
15
13
|
/>
|
16
14
|
<path
|
17
|
-
id="
|
18
|
-
d="
|
19
|
-
transform="translate(10.886 14.02)"
|
15
|
+
id="Path_X"
|
16
|
+
d="M12.25,10l.37,1.1.47-1.1h1.37l-.87,1.91.82,2.11h-1.43l-.35-1.07-.37,1.07h-1.42l.86-1.93-.86-2.09h1.42Z"
|
20
17
|
fill="currentColor"
|
21
18
|
/>
|
22
19
|
<path
|
23
|
-
id="
|
24
|
-
d="M2.
|
25
|
-
transform="translate(5.186 4.02)"
|
20
|
+
id="Path_Y"
|
21
|
+
d="M2.54,14.02h-1.39v-1.26l-1.15-2.76h1.48l.38,1.18.39-1.18h1.47l-1.18,2.76v1.26Z"
|
26
22
|
fill="currentColor"
|
27
23
|
/>
|
28
24
|
<path
|
29
|
-
id="
|
30
|
-
d="
|
31
|
-
transform="translate(-318.1 -1210.48)"
|
25
|
+
id="center"
|
26
|
+
d="M10.18,11.1l-2.78-1.85v-3.73c0-.28-.22-.5-.5-.5s-.5.22-.5.5v3.69l-2.66,1.9c-.22.16-.28.47-.12.7.09.13.25.21.41.21.1,0,.21-.03.29-.09l2.55-1.82,2.75,1.83c.23.15.54.09.69-.14.15-.23.09-.54-.14-.69Z"
|
32
27
|
fill="currentColor"
|
33
28
|
/>
|
34
29
|
</svg>
|
@@ -7,30 +7,20 @@
|
|
7
7
|
viewBox="0 0 24 24"
|
8
8
|
>
|
9
9
|
<path
|
10
|
-
id="
|
11
|
-
d="
|
10
|
+
id="Pfad_Z"
|
11
|
+
d="M9.61,2.64V.94h4.77v1.7l-1.95,2.47v.15h1.95v1.7h-4.77v-1.62l2-2.55v-.15h-2Z"
|
12
12
|
fill="currentColor"
|
13
|
-
stroke-width="0"
|
14
13
|
/>
|
15
14
|
<path
|
16
|
-
id="
|
17
|
-
d="
|
15
|
+
id="Pfad_X"
|
16
|
+
d="M20.05,16.47l.55,1.65.7-1.65h2.05l-1.3,2.87,1.22,3.16h-2.14l-.53-1.6-.55,1.6h-2.12l1.29-2.89-1.29-3.14s2.12,0,2.12,0Z"
|
18
17
|
fill="currentColor"
|
19
|
-
stroke-width="0"
|
20
18
|
/>
|
21
19
|
<path
|
22
|
-
id="
|
23
|
-
d="
|
20
|
+
id="Pfad_Y"
|
21
|
+
d="M4.67,22.5h-2.09v-1.89l-1.72-4.14h2.22l.57,1.77.58-1.77h2.21l-1.77,4.14s0,1.89,0,1.89Z"
|
24
22
|
fill="currentColor"
|
25
|
-
stroke-width="0"
|
26
|
-
/>
|
27
|
-
<circle
|
28
|
-
id="Ellipse_41"
|
29
|
-
cx="12"
|
30
|
-
cy="13.47"
|
31
|
-
r="3"
|
32
|
-
fill="currentColor"
|
33
|
-
stroke-width="0"
|
34
23
|
/>
|
24
|
+
<circle id="ellipse" cx="12" cy="13.47" r="3" fill="currentColor" />
|
35
25
|
</svg>
|
36
26
|
</template>
|
@@ -75,6 +75,14 @@ export function applyAttributeFilter(attributes: {
|
|
75
75
|
export function applyOlcsAttributeFilter(attributes: {
|
76
76
|
[x: string]: unknown;
|
77
77
|
}, keys?: Array<string>): Object;
|
78
|
+
/**
|
79
|
+
* Filters attributes having an empty object as value
|
80
|
+
* @param {Object<string, unknown>} attributes
|
81
|
+
* @returns {Object}
|
82
|
+
*/
|
83
|
+
export function applyEmptyAttributesFilter(attributes: {
|
84
|
+
[x: string]: unknown;
|
85
|
+
}): Object;
|
78
86
|
export default AbstractFeatureInfoView;
|
79
87
|
export type FeatureInfoProps = {
|
80
88
|
featureId: string;
|
@@ -218,6 +218,24 @@ export function applyOlcsAttributeFilter(attributes, keys = []) {
|
|
218
218
|
}, {});
|
219
219
|
}
|
220
220
|
|
221
|
+
/**
|
222
|
+
* Filters attributes having an empty object as value
|
223
|
+
* @param {Object<string, unknown>} attributes
|
224
|
+
* @returns {Object}
|
225
|
+
*/
|
226
|
+
export function applyEmptyAttributesFilter(attributes) {
|
227
|
+
return Object.keys(attributes).reduce((obj, key) => {
|
228
|
+
if (
|
229
|
+
typeof attributes[key] === 'object' &&
|
230
|
+
Object.keys(attributes[key]).length === 0
|
231
|
+
) {
|
232
|
+
return obj;
|
233
|
+
}
|
234
|
+
obj[key] = attributes[key];
|
235
|
+
return obj;
|
236
|
+
}, {});
|
237
|
+
}
|
238
|
+
|
221
239
|
/**
|
222
240
|
* Abstract class to be extended by FeatureInfoView classes
|
223
241
|
* Subclasses must always provide a component and may overwrite class methods.
|
@@ -314,7 +332,8 @@ class AbstractFeatureInfoView extends VcsObject {
|
|
314
332
|
if (this.keyMapping) {
|
315
333
|
applyKeyMapping(attributes, this.keyMapping);
|
316
334
|
}
|
317
|
-
|
335
|
+
attributes = applyOlcsAttributeFilter(attributes, this.attributeKeys);
|
336
|
+
return applyEmptyAttributesFilter(attributes);
|
318
337
|
}
|
319
338
|
|
320
339
|
/**
|
@@ -31,6 +31,9 @@ export type CollectionComponentUiOptions = {
|
|
31
31
|
* - limit number of items in rendered list (more items are rendered in extra window)
|
32
32
|
*/
|
33
33
|
limit?: number | undefined;
|
34
|
+
removeTitle?: string | undefined;
|
35
|
+
bulkRemoveTitle?: string | undefined;
|
36
|
+
renameTitle?: string | undefined;
|
34
37
|
};
|
35
38
|
export type CollectionComponentClassOptions<T extends Object> = CollectionComponentUiOptions & {
|
36
39
|
collection: import("@vcmap/core").Collection<T>;
|
@@ -133,6 +136,17 @@ declare class CollectionComponentClass<T extends Object | import("@vcmap/core/di
|
|
133
136
|
* @type {import("vue").Ref<Array<CollectionComponentListItem>>}
|
134
137
|
*/
|
135
138
|
selection: import("vue").Ref<Array<CollectionComponentListItem>>;
|
139
|
+
/**
|
140
|
+
*
|
141
|
+
* @type {{ removeTitle: string, bulkRemoveTitle: string, renameTitle: string }}
|
142
|
+
* @private
|
143
|
+
*/
|
144
|
+
private _actionTitles;
|
145
|
+
/**
|
146
|
+
* @tyep {() => void}
|
147
|
+
* @private
|
148
|
+
*/
|
149
|
+
private _removeBulkDeleteAction;
|
136
150
|
_resetWatchers: import("vue").WatchStopHandle[];
|
137
151
|
_destroyBulkDelete: () => void;
|
138
152
|
_listeners: (() => void)[];
|
@@ -169,10 +183,6 @@ declare class CollectionComponentClass<T extends Object | import("@vcmap/core/di
|
|
169
183
|
* @private
|
170
184
|
*/
|
171
185
|
private _addBulkDeleteAction;
|
172
|
-
/**
|
173
|
-
* @private
|
174
|
-
*/
|
175
|
-
private _removeBulkDeleteAction;
|
176
186
|
/**
|
177
187
|
* uses the itemMappings to transform the given Item to an CollectionComponentListItem usable in the VcsList
|
178
188
|
* @param {T} item
|
@@ -24,6 +24,9 @@ import { sortByOwner } from '../navbarManager.js';
|
|
24
24
|
* @property {boolean} [singleSelect=false]
|
25
25
|
* @property {number} [overflowCount=2] - number of header action buttons rendered until overflow
|
26
26
|
* @property {number} [limit=10] - limit number of items in rendered list (more items are rendered in extra window)
|
27
|
+
* @property {string} [removeTitle="list.deleteItem"]
|
28
|
+
* @property {string} [bulkRemoveTitle="list.delete"]
|
29
|
+
* @property {string} [renameTitle="list.renameItem"]
|
27
30
|
*/
|
28
31
|
|
29
32
|
/**
|
@@ -188,6 +191,23 @@ class CollectionComponentClass {
|
|
188
191
|
*/
|
189
192
|
this.selection = ref([]);
|
190
193
|
|
194
|
+
/**
|
195
|
+
*
|
196
|
+
* @type {{ removeTitle: string, bulkRemoveTitle: string, renameTitle: string }}
|
197
|
+
* @private
|
198
|
+
*/
|
199
|
+
this._actionTitles = {
|
200
|
+
removeTitle: options.removeTitle ?? 'list.deleteItem',
|
201
|
+
bulkRemoveTitle: options.bulkRemoveTitle ?? 'list.delete',
|
202
|
+
renameTitle: options.renameTitle ?? 'list.renameItem',
|
203
|
+
};
|
204
|
+
|
205
|
+
/**
|
206
|
+
* @tyep {() => void}
|
207
|
+
* @private
|
208
|
+
*/
|
209
|
+
this._removeBulkDeleteAction = () => {};
|
210
|
+
|
191
211
|
this._resetWatchers = [
|
192
212
|
watch(this.renamable, () => this.reset()),
|
193
213
|
watch([this.removable, this.selectable], () => {
|
@@ -293,7 +313,7 @@ class CollectionComponentClass {
|
|
293
313
|
*/
|
294
314
|
_addBulkDeleteAction() {
|
295
315
|
const { action, destroy } = createListItemBulkAction(this.selection, {
|
296
|
-
name:
|
316
|
+
name: this._actionTitles.bulkRemoveTitle,
|
297
317
|
callback: () => {
|
298
318
|
[...this.selection.value].forEach((listItem) => {
|
299
319
|
this._collection.remove(this._collection.getByKey(listItem.name));
|
@@ -301,26 +321,16 @@ class CollectionComponentClass {
|
|
301
321
|
},
|
302
322
|
});
|
303
323
|
this._destroyBulkDelete = destroy;
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
]);
|
311
|
-
}
|
324
|
+
const ownedAction = {
|
325
|
+
action,
|
326
|
+
owner: this._owner,
|
327
|
+
weight: 100,
|
328
|
+
};
|
329
|
+
this.addActions([ownedAction]);
|
312
330
|
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
_removeBulkDeleteAction() {
|
317
|
-
this._destroyBulkDelete();
|
318
|
-
const action = this._actions.value.find(
|
319
|
-
(a) => a.action.name === 'list.delete',
|
320
|
-
);
|
321
|
-
if (action) {
|
322
|
-
this.removeActions([action]);
|
323
|
-
}
|
331
|
+
this._removeBulkDeleteAction = () => {
|
332
|
+
this.removeActions([ownedAction]);
|
333
|
+
};
|
324
334
|
}
|
325
335
|
|
326
336
|
/**
|
@@ -349,12 +359,20 @@ class CollectionComponentClass {
|
|
349
359
|
destroyFunctions: [],
|
350
360
|
};
|
351
361
|
if (this.renamable.value) {
|
352
|
-
listItem.actions.push(
|
362
|
+
listItem.actions.push(
|
363
|
+
createListItemRenameAction(listItem, {
|
364
|
+
name: this._actionTitles.renameTitle,
|
365
|
+
}),
|
366
|
+
);
|
353
367
|
listItem.titleChanged = (newTitle) =>
|
354
368
|
titleChanged(item, listItem, newTitle);
|
355
369
|
}
|
356
370
|
if (this.removable.value) {
|
357
|
-
listItem.actions.push(
|
371
|
+
listItem.actions.push(
|
372
|
+
createListItemDeleteAction(this._collection, item, {
|
373
|
+
name: this._actionTitles.removeTitle,
|
374
|
+
}),
|
375
|
+
);
|
358
376
|
}
|
359
377
|
this._itemMappings.forEach((itemMapping) => {
|
360
378
|
if (
|
@@ -18,12 +18,16 @@ export function makeEditorCollectionComponentClass<T extends Object | import("@v
|
|
18
18
|
* editor: EditorWindowComponentOptions|function(T):EditorWindowComponentOptions|undefined,
|
19
19
|
* multiEditor?: EditorWindowComponentOptions,
|
20
20
|
* predicate?: import("./collectionManager.js").PredicateFunction<T>,
|
21
|
-
* selectionBased?: boolean
|
21
|
+
* selectionBased?: boolean,
|
22
|
+
* editTitle?: string,
|
23
|
+
* bulkEditTitle?: string
|
22
24
|
* }} EditingOptions
|
23
25
|
* @property {EditorWindowComponentOptions|function(T)|undefined} editor
|
24
26
|
* @property {EditorWindowComponentOptions} [multiEditor]
|
25
27
|
* @property {import("./collectionManager.js").PredicateFunction<T>} [predicate=()=>true] - Optional predicate function for editor
|
26
28
|
* @property {boolean} [selectionBased=true] - If true, editor windows are coupled to selection and editor windows are exclusive
|
29
|
+
* @property {string} [editTitle="list.editItem"]
|
30
|
+
* @property {string} [bulkEditTitle="list.edit"]
|
27
31
|
* @template {Object} T
|
28
32
|
*/
|
29
33
|
/**
|
@@ -49,6 +53,8 @@ export type EditingOptions<T extends Object> = {
|
|
49
53
|
multiEditor?: EditorWindowComponentOptions;
|
50
54
|
predicate?: import("./collectionManager.js").PredicateFunction<T>;
|
51
55
|
selectionBased?: boolean;
|
56
|
+
editTitle?: string;
|
57
|
+
bulkEditTitle?: string;
|
52
58
|
};
|
53
59
|
export type EditorCollectionComponentClass<T extends Object> = import("./collectionComponentClass.js").default<T> & {
|
54
60
|
getEditorWindowId: (arg0: T) => string;
|
@@ -13,12 +13,16 @@ import { createListEditAction } from '../../actions/listActions.js';
|
|
13
13
|
* editor: EditorWindowComponentOptions|function(T):EditorWindowComponentOptions|undefined,
|
14
14
|
* multiEditor?: EditorWindowComponentOptions,
|
15
15
|
* predicate?: import("./collectionManager.js").PredicateFunction<T>,
|
16
|
-
* selectionBased?: boolean
|
16
|
+
* selectionBased?: boolean,
|
17
|
+
* editTitle?: string,
|
18
|
+
* bulkEditTitle?: string
|
17
19
|
* }} EditingOptions
|
18
20
|
* @property {EditorWindowComponentOptions|function(T)|undefined} editor
|
19
21
|
* @property {EditorWindowComponentOptions} [multiEditor]
|
20
22
|
* @property {import("./collectionManager.js").PredicateFunction<T>} [predicate=()=>true] - Optional predicate function for editor
|
21
23
|
* @property {boolean} [selectionBased=true] - If true, editor windows are coupled to selection and editor windows are exclusive
|
24
|
+
* @property {string} [editTitle="list.editItem"]
|
25
|
+
* @property {string} [bulkEditTitle="list.edit"]
|
22
26
|
* @template {Object} T
|
23
27
|
*/
|
24
28
|
|
@@ -236,7 +240,7 @@ export function makeEditorCollectionComponentClass(
|
|
236
240
|
});
|
237
241
|
|
238
242
|
const editItemAction = {
|
239
|
-
name: 'list.editItem',
|
243
|
+
name: editingOptions.editTitle ?? 'list.editItem',
|
240
244
|
async callback() {
|
241
245
|
if (selectionBased) {
|
242
246
|
closeEditorWindows();
|
@@ -263,6 +267,7 @@ export function makeEditorCollectionComponentClass(
|
|
263
267
|
app.windowManager,
|
264
268
|
editorCollectionComponent.owner,
|
265
269
|
getMultiEditorWindowId(),
|
270
|
+
editingOptions.bulkEditTitle,
|
266
271
|
);
|
267
272
|
|
268
273
|
editorCollectionComponent.addActions([
|
@@ -38,6 +38,16 @@ declare class ContextMenuManager {
|
|
38
38
|
* @private
|
39
39
|
*/
|
40
40
|
private _listeners;
|
41
|
+
/**
|
42
|
+
* An event called when the context menu is closed
|
43
|
+
* @type {VcsEvent<void>}
|
44
|
+
*/
|
45
|
+
closed: VcsEvent<void>;
|
46
|
+
/**
|
47
|
+
* @type {() => void}
|
48
|
+
* @private
|
49
|
+
*/
|
50
|
+
private _closedListener;
|
41
51
|
_ensureInteraction(): void;
|
42
52
|
_setupListeners(): void;
|
43
53
|
/**
|
@@ -68,3 +78,4 @@ declare class ContextMenuManager {
|
|
68
78
|
clear(): void;
|
69
79
|
destroy(): void;
|
70
80
|
}
|
81
|
+
import { VcsEvent } from '@vcmap/core';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CesiumMap, BaseOLMap } from '@vcmap/core';
|
1
|
+
import { CesiumMap, BaseOLMap, VcsEvent } from '@vcmap/core';
|
2
2
|
import { unByKey } from 'ol/Observable.js';
|
3
3
|
import { check } from '@vcsuite/check';
|
4
4
|
import ContextMenuInteraction from './contextMenuInteraction.js';
|
@@ -81,6 +81,24 @@ class ContextMenuManager {
|
|
81
81
|
* @private
|
82
82
|
*/
|
83
83
|
this._listeners = [];
|
84
|
+
|
85
|
+
/**
|
86
|
+
* An event called when the context menu is closed
|
87
|
+
* @type {VcsEvent<void>}
|
88
|
+
*/
|
89
|
+
this.closed = new VcsEvent();
|
90
|
+
|
91
|
+
/**
|
92
|
+
* @type {() => void}
|
93
|
+
* @private
|
94
|
+
*/
|
95
|
+
this._closedListener = this._app.windowManager.removed.addEventListener(
|
96
|
+
(window) => {
|
97
|
+
if (window.id === contextMenuWindowId) {
|
98
|
+
this.closed.raiseEvent();
|
99
|
+
}
|
100
|
+
},
|
101
|
+
);
|
84
102
|
}
|
85
103
|
|
86
104
|
_ensureInteraction() {
|
@@ -208,12 +226,15 @@ class ContextMenuManager {
|
|
208
226
|
}
|
209
227
|
|
210
228
|
destroy() {
|
229
|
+
this.clear();
|
211
230
|
this._interaction.destroy();
|
212
231
|
if (this._interactionListener) {
|
213
232
|
this._interactionListener();
|
214
233
|
this._interactionListener = null;
|
215
234
|
}
|
216
235
|
this._eventHandlers = [];
|
236
|
+
this._closedListener();
|
237
|
+
this.closed.destroy();
|
217
238
|
}
|
218
239
|
}
|
219
240
|
|
@@ -64,7 +64,9 @@
|
|
64
64
|
} else {
|
65
65
|
listener = app.maps.mapActivated.addEventListener((map) => {
|
66
66
|
defaultViewpoint = map.getViewpointSync();
|
67
|
-
|
67
|
+
if (defaultViewpoint?.isValid()) {
|
68
|
+
listener();
|
69
|
+
}
|
68
70
|
});
|
69
71
|
}
|
70
72
|
|
@@ -88,9 +90,10 @@
|
|
88
90
|
title: 'navigation.homeButton',
|
89
91
|
icon: '$vcsHomePoint',
|
90
92
|
async callback() {
|
91
|
-
|
92
|
-
|
93
|
-
|
93
|
+
const vp = getStartingViewpoint() || defaultViewpoint;
|
94
|
+
if (app.maps.activeMap && vp?.isValid()) {
|
95
|
+
await app.maps.activeMap.gotoViewpoint(vp);
|
96
|
+
}
|
94
97
|
},
|
95
98
|
});
|
96
99
|
|