@vcmap/ui 5.1.3 → 5.1.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.
- package/config/base.config.json +0 -2
- package/config/dev.config.json +4 -0
- package/config/www.config.json +0 -2
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.c815b8.js → core.a3bdf3.js} +2491 -2446
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-dccddacb.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.f85ce1.css → ui.f5e8c3.css} +2 -2
- package/dist/assets/{ui.f85ce1.js → ui.f5e8c3.js} +4461 -4276
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.bf2ba1.js → vuetify.4aa1eb.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +6 -2
- package/index.d.ts +1 -1
- package/index.html +5 -1
- package/index.js +1 -0
- package/package.json +2 -2
- package/src/actions/listActions.d.ts +59 -3
- package/src/actions/listActions.js +114 -2
- package/src/application/VcsApp.vue +20 -4
- package/src/application/VcsApp.vue.d.ts +8 -2
- package/src/application/VcsNavbar.vue +1 -1
- package/src/application/VcsTextPageFooter.vue +47 -30
- package/src/application/VcsTextPageFooter.vue.d.ts +5 -3
- package/src/components/form-inputs-controls/VcsTextArea.vue +11 -3
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +2 -0
- 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/components/viewpoint/VcsViewpointComponent.vue +27 -5
- package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +9 -0
- package/src/components/viewpoint/VcsViewpointEditor.vue +10 -1
- package/src/components/viewpoint/VcsViewpointEditor.vue.d.ts +11 -1
- package/src/contentTree/LayerTree.vue +22 -3
- package/src/featureInfo/abstractFeatureInfoView.d.ts +8 -0
- package/src/featureInfo/abstractFeatureInfoView.js +20 -1
- package/src/i18n/de.d.ts +6 -1
- package/src/i18n/de.js +6 -1
- package/src/i18n/en.d.ts +6 -1
- package/src/i18n/en.js +6 -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/src/siteConfig.d.ts +5 -0
- package/src/siteConfig.js +93 -0
- package/src/uiConfig.d.ts +16 -6
- package/src/uiConfig.js +5 -3
- package/src/vcsUiApp.d.ts +1 -0
- package/src/vcsUiApp.js +4 -0
- package/dist/assets/index-0abd9815.js +0 -1
- /package/dist/assets/{cesium.012009.js → cesium.a6cb0f.js} +0 -0
- /package/dist/assets/{ol.fbe9a4.js → ol.6a61cd.js} +0 -0
- /package/dist/assets/{vue.65726b.js → vue.7cc217.js} +0 -0
- /package/dist/assets/{vuetify.bf2ba1.css → vuetify.4aa1eb.css} +0 -0
@@ -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>
|
@@ -14,7 +14,13 @@
|
|
14
14
|
</VcsLabel>
|
15
15
|
</v-col>
|
16
16
|
<v-col>
|
17
|
-
<VcsTextField
|
17
|
+
<VcsTextField
|
18
|
+
id="name"
|
19
|
+
dense
|
20
|
+
clearable
|
21
|
+
v-model="name"
|
22
|
+
:rules="nameRules"
|
23
|
+
/>
|
18
24
|
</v-col>
|
19
25
|
</v-row>
|
20
26
|
<v-row no-gutters v-if="!hideTitle">
|
@@ -203,10 +209,16 @@
|
|
203
209
|
* @param {import("vue").emit} emit
|
204
210
|
* @param {() => import("@vcmap/core").ViewpointOptions} getModelValue
|
205
211
|
* @param {import("vue").Ref<boolean>} isCesiumMap
|
206
|
-
* @param {boolean}
|
212
|
+
* @param {boolean} startSync - whether to set up post render handler on creation
|
207
213
|
* @returns {{action: import("../../actions/actionHelper.js").VcsAction, destroy: function():void}}
|
208
214
|
*/
|
209
|
-
function createEditingAction(
|
215
|
+
function createEditingAction(
|
216
|
+
app,
|
217
|
+
emit,
|
218
|
+
getModelValue,
|
219
|
+
isCesiumMap,
|
220
|
+
startSync,
|
221
|
+
) {
|
210
222
|
let destroyPostRenderListener = () => {};
|
211
223
|
let cachedViewpoint = new Viewpoint(getModelValue());
|
212
224
|
|
@@ -231,11 +243,14 @@
|
|
231
243
|
}
|
232
244
|
}
|
233
245
|
|
246
|
+
const isObliqueMap = app.maps.activeMap?.className === ObliqueMap.className;
|
247
|
+
const active = isObliqueMap ? false : startSync;
|
248
|
+
|
234
249
|
const action = reactive({
|
235
250
|
name: 'edit-viewpoint-action',
|
236
251
|
icon: active ? 'mdi-sync' : 'mdi-sync-off',
|
237
252
|
title: 'components.viewpoint.syncOff',
|
238
|
-
disabled:
|
253
|
+
disabled: isObliqueMap,
|
239
254
|
active,
|
240
255
|
callback() {
|
241
256
|
this.active = !this.active;
|
@@ -322,6 +337,7 @@
|
|
322
337
|
* @vue-prop {boolean} hideTitle - Hide title input.
|
323
338
|
* @vue-prop {boolean} hideAnimate - Hide animate & duration input.
|
324
339
|
* @vue-prop {boolean} hideGeneral - Hide all general settings (name, title, animate).
|
340
|
+
* @vue-prop {Array<(v:string)=>(boolean|string)>} nameRules - Optional rules for name input.
|
325
341
|
*/
|
326
342
|
export default {
|
327
343
|
name: 'VcsViewpointComponent',
|
@@ -366,10 +382,16 @@
|
|
366
382
|
type: Boolean,
|
367
383
|
default: false,
|
368
384
|
},
|
385
|
+
nameRules: {
|
386
|
+
type: Array,
|
387
|
+
default: () => [],
|
388
|
+
},
|
369
389
|
},
|
370
390
|
setup(props, { emit }) {
|
371
391
|
const app = inject('vcsApp');
|
372
|
-
const isCesiumMap = ref(
|
392
|
+
const isCesiumMap = ref(
|
393
|
+
app.maps.activeMap?.className === CesiumMap.className,
|
394
|
+
);
|
373
395
|
|
374
396
|
const name = usePrimitiveProperty(() => props.value, 'name', emit);
|
375
397
|
const title = computed({
|
@@ -43,6 +43,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
43
43
|
type: BooleanConstructor;
|
44
44
|
default: boolean;
|
45
45
|
};
|
46
|
+
nameRules: {
|
47
|
+
type: ArrayConstructor;
|
48
|
+
default: () => never[];
|
49
|
+
};
|
46
50
|
}, {
|
47
51
|
isCesiumMap: import("vue").Ref<boolean>;
|
48
52
|
gotoViewpoint: () => Promise<void>;
|
@@ -114,6 +118,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
114
118
|
type: BooleanConstructor;
|
115
119
|
default: boolean;
|
116
120
|
};
|
121
|
+
nameRules: {
|
122
|
+
type: ArrayConstructor;
|
123
|
+
default: () => never[];
|
124
|
+
};
|
117
125
|
}>>, {
|
118
126
|
value: Record<string, any>;
|
119
127
|
expandable: boolean;
|
@@ -122,5 +130,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
122
130
|
hideTitle: boolean;
|
123
131
|
hideAnimate: boolean;
|
124
132
|
hideGeneral: boolean;
|
133
|
+
nameRules: unknown[];
|
125
134
|
}>;
|
126
135
|
export default _default;
|
@@ -6,7 +6,11 @@
|
|
6
6
|
:auto-close="false"
|
7
7
|
v-bind="{ ...$attrs, ...$props }"
|
8
8
|
>
|
9
|
-
<VcsViewpointComponent
|
9
|
+
<VcsViewpointComponent
|
10
|
+
v-model="localConfig"
|
11
|
+
hide-name
|
12
|
+
:name-rules="nameRules"
|
13
|
+
/>
|
10
14
|
</AbstractConfigEditor>
|
11
15
|
</template>
|
12
16
|
|
@@ -23,6 +27,7 @@
|
|
23
27
|
* An editor component for viewpoints using AbstractConfigEditor and VcsViewpointComponent
|
24
28
|
* @vue-prop {() => import("@vcmap/core").ViewpointOptions} getConfig
|
25
29
|
* @vue-prop {(import("@vcmap/core").ViewpointOptions) => Promise<void>} setConfig
|
30
|
+
* @vue-prop {Array<(v:string)=>(boolean|string)>} nameRules - Optional rules for name input.
|
26
31
|
*/
|
27
32
|
export default {
|
28
33
|
name: 'VcsViewpointEditor',
|
@@ -39,6 +44,10 @@
|
|
39
44
|
type: Function,
|
40
45
|
required: true,
|
41
46
|
},
|
47
|
+
nameRules: {
|
48
|
+
type: Array,
|
49
|
+
default: () => [],
|
50
|
+
},
|
42
51
|
},
|
43
52
|
setup(props, { emit }) {
|
44
53
|
const app = inject('vcsApp');
|
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
7
7
|
type: FunctionConstructor;
|
8
8
|
required: true;
|
9
9
|
};
|
10
|
+
nameRules: {
|
11
|
+
type: ArrayConstructor;
|
12
|
+
default: () => never[];
|
13
|
+
};
|
10
14
|
}, {
|
11
15
|
localConfig: any;
|
12
16
|
apply(): void;
|
@@ -21,5 +25,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
21
25
|
type: FunctionConstructor;
|
22
26
|
required: true;
|
23
27
|
};
|
24
|
-
|
28
|
+
nameRules: {
|
29
|
+
type: ArrayConstructor;
|
30
|
+
default: () => never[];
|
31
|
+
};
|
32
|
+
}>>, {
|
33
|
+
nameRules: unknown[];
|
34
|
+
}>;
|
25
35
|
export default _default;
|
@@ -15,13 +15,13 @@
|
|
15
15
|
</template>
|
16
16
|
|
17
17
|
<script>
|
18
|
-
import { inject } from 'vue';
|
18
|
+
import { inject, watch } from 'vue';
|
19
19
|
import { VSheet } from 'vuetify/lib';
|
20
20
|
import VcsTreeview from '../components/lists/VcsTreeview.vue';
|
21
21
|
|
22
22
|
/**
|
23
23
|
* @description
|
24
|
-
* Implements Treeview and shows
|
24
|
+
* Implements Treeview and shows content tree
|
25
25
|
*/
|
26
26
|
export default {
|
27
27
|
name: 'VcsLayerTree',
|
@@ -35,8 +35,27 @@
|
|
35
35
|
setup(props) {
|
36
36
|
const app = inject('vcsApp');
|
37
37
|
const open = app.contentTree.getTreeOpenStateRef(props.windowState.id);
|
38
|
+
|
39
|
+
const initOpen = app.contentTree
|
40
|
+
.getChildrenForSubTree(props.windowState.id)
|
41
|
+
.filter((i) => i.initOpen)
|
42
|
+
.map((i) => i.name);
|
43
|
+
|
44
|
+
const tree = app.contentTree.getComputedVisibleTree(props.windowState.id);
|
45
|
+
|
46
|
+
// watch for new visible children, which should start init open
|
47
|
+
watch(tree, (value, oldValue) => {
|
48
|
+
const changed = value
|
49
|
+
.filter(
|
50
|
+
({ name }) =>
|
51
|
+
!oldValue.find((o) => o.name === name) && initOpen.includes(name),
|
52
|
+
)
|
53
|
+
.map(({ name }) => name);
|
54
|
+
open.value.push(...changed);
|
55
|
+
});
|
56
|
+
|
38
57
|
return {
|
39
|
-
tree
|
58
|
+
tree,
|
40
59
|
open,
|
41
60
|
};
|
42
61
|
},
|
@@ -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
|
/**
|
package/src/i18n/de.d.ts
CHANGED
@@ -68,6 +68,11 @@ declare namespace messages {
|
|
68
68
|
export namespace _import {
|
69
69
|
let submit: string;
|
70
70
|
let fileDrop: string;
|
71
|
+
let failure: string;
|
72
|
+
let predicateFailure: string;
|
73
|
+
let addFailure: string;
|
74
|
+
let featuresAdded: string;
|
75
|
+
let nothingAdded: string;
|
71
76
|
}
|
72
77
|
export { _import as import };
|
73
78
|
export namespace vcsFormSection {
|
@@ -302,7 +307,7 @@ declare namespace messages {
|
|
302
307
|
let tooltip_8: string;
|
303
308
|
export { tooltip_8 as tooltip };
|
304
309
|
}
|
305
|
-
export namespace
|
310
|
+
export namespace dataProtection {
|
306
311
|
let title_17: string;
|
307
312
|
export { title_17 as title };
|
308
313
|
let tooltip_9: string;
|
package/src/i18n/de.js
CHANGED
@@ -61,6 +61,11 @@ const messages = {
|
|
61
61
|
import: {
|
62
62
|
submit: 'Importieren',
|
63
63
|
fileDrop: 'Dateien hierher ziehen',
|
64
|
+
failure: 'Datei {fileName} konnte nicht gelesen werden.',
|
65
|
+
predicateFailure: '{0} Feature entsprechen nicht den Anforderungen.',
|
66
|
+
addFailure: '{0} Feature existieren bereits.',
|
67
|
+
featuresAdded: '{0} Feature importiert.',
|
68
|
+
nothingAdded: 'Es konnten keine Feature importiert werden.',
|
64
69
|
},
|
65
70
|
vcsFormSection: {
|
66
71
|
help: 'Hilfe anzeigen',
|
@@ -263,7 +268,7 @@ const messages = {
|
|
263
268
|
title: 'Impressum',
|
264
269
|
tooltip: 'Öffne Impressumsfenster',
|
265
270
|
},
|
266
|
-
|
271
|
+
dataProtection: {
|
267
272
|
title: 'Datenschutz',
|
268
273
|
tooltip: 'Öffne Datenschutzfenster',
|
269
274
|
},
|
package/src/i18n/en.d.ts
CHANGED
@@ -68,6 +68,11 @@ declare namespace messages {
|
|
68
68
|
export namespace _import {
|
69
69
|
let submit: string;
|
70
70
|
let fileDrop: string;
|
71
|
+
let failure: string;
|
72
|
+
let predicateFailure: string;
|
73
|
+
let addFailure: string;
|
74
|
+
let featuresAdded: string;
|
75
|
+
let nothingAdded: string;
|
71
76
|
}
|
72
77
|
export { _import as import };
|
73
78
|
export namespace vcsFormSection {
|
@@ -301,7 +306,7 @@ declare namespace messages {
|
|
301
306
|
let tooltip_8: string;
|
302
307
|
export { tooltip_8 as tooltip };
|
303
308
|
}
|
304
|
-
export namespace
|
309
|
+
export namespace dataProtection {
|
305
310
|
let title_16: string;
|
306
311
|
export { title_16 as title };
|
307
312
|
let tooltip_9: string;
|
package/src/i18n/en.js
CHANGED
@@ -61,6 +61,11 @@ const messages = {
|
|
61
61
|
import: {
|
62
62
|
submit: 'Import',
|
63
63
|
fileDrop: 'Drop files here',
|
64
|
+
failure: 'File {fileName} could not be parsed.',
|
65
|
+
predicateFailure: '{0} features to not fullfill requirements.',
|
66
|
+
addFailure: '{0} feature are already exist.',
|
67
|
+
featuresAdded: '{0} feature imported.',
|
68
|
+
nothingAdded: 'No features could be imported.',
|
64
69
|
},
|
65
70
|
vcsFormSection: {
|
66
71
|
help: 'Show help',
|
@@ -263,7 +268,7 @@ const messages = {
|
|
263
268
|
title: 'Imprint',
|
264
269
|
tooltip: 'Open imprint window',
|
265
270
|
},
|
266
|
-
|
271
|
+
dataProtection: {
|
267
272
|
title: 'Data Protection',
|
268
273
|
tooltip: 'Open data protection window',
|
269
274
|
},
|
@@ -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;
|