@vcmap/ui 5.0.0-rc.24 → 5.0.0-rc.25
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/build/build.js +132 -14
- package/build/buildHelpers.js +196 -92
- package/build/bundle.js +56 -0
- package/build/commonViteConfig.js +2 -2
- package/config/base.config.json +29 -2
- package/config/dev.config.json +29 -1
- package/config/www.config.json +81 -39
- package/dist/assets/@mdi/font/LICENSE +20 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +3 -0
- package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-85d9e53a.js → AxisAlignedBoundingBox-4140c51f.js} +1 -1
- package/dist/assets/cesium/Workers/{BoundingRectangle-1ee7eb47.js → BoundingRectangle-c714b156.js} +1 -1
- package/dist/assets/cesium/Workers/{BoxGeometry-3b2be784.js → BoxGeometry-6f3da43d.js} +1 -1
- package/dist/assets/cesium/Workers/{Color-f107c84d.js → Color-8a565ff2.js} +5 -5
- package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-78d71993.js → CoplanarPolygonGeometryLibrary-4b4d4096.js} +1 -1
- package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-50d99b33.js → CorridorGeometryLibrary-7b94502b.js} +1 -1
- package/dist/assets/cesium/Workers/{CylinderGeometry-51b0d9bf.js → CylinderGeometry-ca070b87.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometry-bcfb5d87.js → EllipseGeometry-122e51fa.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-e94f8472.js → EllipseGeometryLibrary-4d326efc.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-28e3a1bb.js → EllipseOutlineGeometry-16cc2bd7.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeometry-b222fa63.js → EllipsoidGeometry-cb148ca2.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-38a3fb5b.js → EllipsoidOutlineGeometry-0fa10c79.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidTangentPlane-8c89f28c.js → EllipsoidTangentPlane-6dd1b7af.js} +1 -1
- package/dist/assets/cesium/Workers/{FrustumGeometry-bdd3a04d.js → FrustumGeometry-ee73037c.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryAttribute-153115c5.js → GeometryAttribute-ff5b4fb1.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryPipeline-acb2399c.js → GeometryPipeline-1f8fbf05.js} +1 -1
- package/dist/assets/cesium/Workers/{IntersectionTests-271e513e.js → IntersectionTests-70d39ba9.js} +1 -1
- package/dist/assets/cesium/Workers/{OrientedBoundingBox-5e04e31f.js → OrientedBoundingBox-159cf1d6.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-6762b65b.js → PolygonGeometryLibrary-076a5d25.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonPipeline-7dc7a431.js → PolygonPipeline-b9f2810a.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylinePipeline-15fde655.js → PolylinePipeline-639192e0.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-ba7dfed5.js → PolylineVolumeGeometryLibrary-b73549fb.js} +1 -1
- package/dist/assets/cesium/Workers/{PrimitivePipeline-68f0b9a2.js → PrimitivePipeline-10ede1b6.js} +1 -1
- package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-8eaf23da.js → RectangleGeometryLibrary-c35a7356.js} +1 -1
- package/dist/assets/cesium/Workers/{TerrainEncoding-eb8a645a.js → TerrainEncoding-668d242f.js} +1 -1
- package/dist/assets/cesium/Workers/{Transforms-f6451f99.js → Transforms-a2a85221.js} +14 -0
- package/dist/assets/cesium/Workers/{WallGeometryLibrary-feef3109.js → WallGeometryLibrary-1938bf0d.js} +1 -1
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/package.js +1 -1
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/dist/assets/{cesium.253914.js → cesium.1457fa.js} +58656 -33170
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.47836f.js +19060 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-bb372634.js +1 -0
- package/dist/assets/{ol.1c946a.js → ol.9e4d23.js} +27344 -12118
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.6ed89d.css +5 -0
- package/dist/assets/ui.6ed89d.js +13461 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue.c1ece7.js → vue.7327e4.js} +834 -598
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.6efa21.css → vuetify.d2131d.css} +1 -1
- package/dist/assets/{vuetify.6efa21.js → vuetify.d2131d.js} +343 -103
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +7 -6
- package/index.html +14 -6
- package/index.js +17 -2
- package/lib/olLib.js +19 -16
- package/package.json +15 -14
- package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -2
- package/plugins/@vcmap/simple-graph/index.js +1 -1
- package/plugins/@vcmap-show-case/README.md +2 -1
- package/plugins/@vcmap-show-case/buttons-example/ButtonsExample.vue +55 -79
- package/plugins/@vcmap-show-case/category-tester/CategoriesExample.vue +135 -0
- package/plugins/@vcmap-show-case/category-tester/CollectionComponentOptions.vue +209 -0
- package/plugins/@vcmap-show-case/category-tester/index.js +19 -1
- package/plugins/@vcmap-show-case/collection-manager-example/CollectionManagerExample.vue +182 -0
- package/plugins/@vcmap-show-case/collection-manager-example/README.md +3 -0
- package/plugins/@vcmap-show-case/collection-manager-example/index.js +74 -0
- package/plugins/@vcmap-show-case/collection-manager-example/package.json +5 -0
- package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +20 -3
- package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +21 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/SwitchMapCallback.js +47 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/config.json +3 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/index.js +34 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +5 -0
- package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +0 -1
- package/plugins/package.json +3 -1
- package/public/assets/@mdi/font/LICENSE +20 -0
- package/public/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +3 -0
- package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/public/assets/favicon-128.png +0 -0
- package/public/assets/favicon-180.png +0 -0
- package/public/assets/favicon-192.png +0 -0
- package/public/assets/favicon-32.png +0 -0
- package/public/assets/logo-mobile.svg +9 -0
- package/public/assets/logo.svg +26 -0
- package/src/application/VcsApp.vue +34 -5
- package/src/application/VcsAttributions.vue +20 -5
- package/src/application/VcsAttributionsFooter.vue +0 -1
- package/src/application/VcsNavbar.vue +18 -13
- package/src/callback/activateLayersCallback.js +54 -0
- package/src/callback/applyLayerStyleCallback.js +63 -0
- package/src/callback/deactivateLayersCallback.js +54 -0
- package/src/callback/goToViewpointCallback.js +54 -0
- package/src/callback/vcsCallback.js +66 -0
- package/src/components/buttons/VcsActionButtonList.vue +28 -10
- package/src/components/buttons/VcsButton.vue +38 -100
- package/src/components/buttons/VcsFormButton.vue +6 -4
- package/src/components/buttons/VcsToolButton.vue +161 -0
- package/src/components/form-inputs-controls/VcsDatePicker.vue +19 -5
- package/src/components/form-inputs-controls/VcsFormSection.vue +0 -1
- package/src/components/form-inputs-controls/VcsSelect.vue +16 -2
- package/src/components/form-inputs-controls/VcsSlider.vue +72 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +24 -13
- package/src/components/form-inputs-controls/VcsWizard.vue +13 -14
- package/src/components/form-inputs-controls/VcsWizardStep.vue +0 -1
- package/src/components/lists/VcsList.vue +3 -2
- package/src/components/lists/VcsTreeviewLeaf.vue +0 -1
- package/src/components/tables/VcsDataTable.vue +2 -4
- package/src/contentTree/LayerTree.vue +15 -9
- package/src/contentTree/contentTreeCollection.js +1 -1
- package/src/contentTree/contentTreeItem.js +22 -3
- package/src/contentTree/groupContentTreeItem.js +1 -0
- package/src/contentTree/layerContentTreeItem.js +4 -14
- package/src/contentTree/layerGroupContentTreeItem.js +4 -14
- package/src/contentTree/obliqueCollectionContentTreeItem.js +4 -0
- package/src/contentTree/viewpointContentTreeItem.js +1 -0
- package/src/featureInfo/BalloonComponent.vue +0 -1
- package/src/featureInfo/abstractFeatureInfoView.js +16 -1
- package/src/featureInfo/featureInfo.js +45 -56
- package/src/i18n/de.js +5 -2
- package/src/i18n/en.js +5 -2
- package/src/i18n/i18nCollection.js +1 -2
- package/src/init.js +1 -4
- package/src/legend/vcsLegend.vue +1 -1
- package/src/manager/buttonManager.js +15 -0
- package/src/manager/{categoryManager/CategoryComponent.vue → collectionManager/CollectionComponent.vue} +57 -66
- package/src/manager/collectionManager/CollectionComponentList.vue +62 -0
- package/src/manager/collectionManager/CollectionComponentProvider.vue +38 -0
- package/src/manager/collectionManager/CollectionManager.vue +43 -0
- package/src/manager/collectionManager/categoryManager.js +83 -0
- package/src/manager/collectionManager/collectionComponent.js +453 -0
- package/src/manager/collectionManager/collectionManager.js +432 -0
- package/src/manager/navbarManager.js +5 -4
- package/src/manager/toolbox/GroupToolboxComponent.vue +5 -7
- package/src/manager/toolbox/SelectToolboxComponent.vue +6 -9
- package/src/manager/toolbox/ToolboxManager.vue +4 -5
- package/src/manager/window/WindowComponentHeader.vue +0 -4
- package/src/navigation/mapNavigation.vue +34 -8
- package/src/navigation/overviewMap.js +7 -1
- package/src/notifier/notifierComponent.vue +0 -1
- package/src/pluginHelper.js +5 -0
- package/src/search/resultItem.vue +0 -1
- package/src/search/searchComponent.vue +7 -9
- package/src/styles/_theming.scss +2 -2
- package/src/styles/_typography.scss +2 -2
- package/src/styles/main.scss +8 -0
- package/src/styles/vcsFont.scss +1 -22
- package/src/vcsUiApp.js +76 -12
- package/src/vuePlugins/i18n.js +18 -19
- package/src/vuePlugins/vuetify.js +0 -1
- package/dist/assets/core.3a8205.js +0 -18426
- package/dist/assets/index.91ae2d55.js +0 -1
- package/dist/assets/ui.0025be.css +0 -5
- package/dist/assets/ui.0025be.js +0 -18534
- package/plugins/@vcmap-show-case/category-tester/Categories.vue +0 -291
- package/plugins/@vcmap-show-case/category-tester/Category.vue +0 -164
- package/src/manager/categoryManager/CategoryComponentList.vue +0 -82
- package/src/manager/categoryManager/CategoryManager.vue +0 -47
- package/src/manager/categoryManager/categoryManager.js +0 -633
- package/start.js +0 -9
- /package/{src/assets/favicon-128.png → dist/assets/favicon-128.4c4ce5.png} +0 -0
- /package/{src/assets/favicon-180.png → dist/assets/favicon-180.5b99c0.png} +0 -0
- /package/{src/assets/favicon-192.png → dist/assets/favicon-192.0e205e.png} +0 -0
- /package/{src/assets/favicon-32.png → dist/assets/favicon-32.6b9add.png} +0 -0
- /package/dist/assets/{favicon.decf54cc.svg → favicon.d5ec97.svg} +0 -0
- /package/dist/assets/font/{TitilliumWeb-Regular.woff2 → TitilliumWeb-Regular.9ca076.woff2} +0 -0
- /package/{src/assets/logo-mobile.svg → dist/assets/logo-mobile.2d10a6.svg} +0 -0
- /package/{src/assets/logo.svg → dist/assets/logo.27089a.svg} +0 -0
- /package/{src → public}/assets/favicon.svg +0 -0
- /package/{src → public}/assets/font/OFL.txt +0 -0
- /package/{src → public}/assets/font/TitilliumWeb-Regular.woff2 +0 -0
@@ -0,0 +1,135 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<v-container class="pa-0">
|
4
|
+
<v-expansion-panels
|
5
|
+
accordion
|
6
|
+
multiple
|
7
|
+
v-if="componentIds.length > 0"
|
8
|
+
class="rounded-0"
|
9
|
+
>
|
10
|
+
<collection-component-provider
|
11
|
+
v-for="componentId in componentIds"
|
12
|
+
:component-id="componentId"
|
13
|
+
:key="componentId"
|
14
|
+
>
|
15
|
+
<collection-component-options />
|
16
|
+
</collection-component-provider>
|
17
|
+
</v-expansion-panels>
|
18
|
+
</v-container>
|
19
|
+
<div class="d-flex gap-2 px-2 pt-2 pb-1">
|
20
|
+
<div class="d-flex gap-2 w-full justify-end">
|
21
|
+
<VcsFormButton @click="newDialog = true" variant="filled"
|
22
|
+
>Request Category</VcsFormButton
|
23
|
+
>
|
24
|
+
<VcsFormButton @click="requestFoobar">Request Foobar</VcsFormButton>
|
25
|
+
<VcsFormButton @click="clear">Clear</VcsFormButton>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<v-dialog v-model="newDialog" width="200">
|
29
|
+
<v-card class="pa-2">
|
30
|
+
<v-form @submit.prevent="requestCategory">
|
31
|
+
<VcsTextField
|
32
|
+
v-model="categoryName"
|
33
|
+
:rules="[(value) => value !== '' || 'Please provide a name!']"
|
34
|
+
/>
|
35
|
+
<VcsFormButton type="submit"> Request </VcsFormButton>
|
36
|
+
</v-form>
|
37
|
+
</v-card>
|
38
|
+
</v-dialog>
|
39
|
+
</div>
|
40
|
+
</template>
|
41
|
+
|
42
|
+
<script>
|
43
|
+
import { inject, provide, ref } from 'vue';
|
44
|
+
import {
|
45
|
+
VcsFormButton,
|
46
|
+
VcsTextField,
|
47
|
+
CollectionComponentProvider,
|
48
|
+
} from '@vcmap/ui';
|
49
|
+
import {
|
50
|
+
VContainer,
|
51
|
+
VExpansionPanels,
|
52
|
+
VCard,
|
53
|
+
VForm,
|
54
|
+
VDialog,
|
55
|
+
} from 'vuetify/lib';
|
56
|
+
import { name as owner } from './package.json';
|
57
|
+
import CollectionComponentOptions from './CollectionComponentOptions.vue';
|
58
|
+
|
59
|
+
const foobarMappingFunction = (item, c, listItem) => {
|
60
|
+
listItem.title = item.name;
|
61
|
+
listItem.actions = [{ name: 'foobar', callback: () => {} }];
|
62
|
+
};
|
63
|
+
|
64
|
+
export default {
|
65
|
+
name: 'CategoriesExample',
|
66
|
+
components: {
|
67
|
+
CollectionComponentProvider,
|
68
|
+
CollectionComponentOptions,
|
69
|
+
VcsFormButton,
|
70
|
+
VcsTextField,
|
71
|
+
VContainer,
|
72
|
+
VExpansionPanels,
|
73
|
+
VCard,
|
74
|
+
VForm,
|
75
|
+
VDialog,
|
76
|
+
},
|
77
|
+
setup() {
|
78
|
+
const app = inject('vcsApp');
|
79
|
+
provide('collectionManager', app.categoryManager);
|
80
|
+
const componentIds = ref(app.categoryManager.componentIds);
|
81
|
+
const newDialog = ref(false);
|
82
|
+
const categoryName = ref('');
|
83
|
+
|
84
|
+
function requestCategory() {
|
85
|
+
app.categoryManager.requestCategory(
|
86
|
+
{ name: categoryName.value },
|
87
|
+
owner,
|
88
|
+
);
|
89
|
+
newDialog.value = false;
|
90
|
+
}
|
91
|
+
|
92
|
+
function clear() {
|
93
|
+
app.categoryManager.clear();
|
94
|
+
}
|
95
|
+
|
96
|
+
async function requestFoobar() {
|
97
|
+
const { collectionComponent, category } =
|
98
|
+
await app.categoryManager.requestCategory(
|
99
|
+
{
|
100
|
+
name: 'foobar',
|
101
|
+
title: 'Foobar',
|
102
|
+
},
|
103
|
+
owner,
|
104
|
+
{
|
105
|
+
actions: [{ name: 'foobar', callback: () => {} }],
|
106
|
+
draggable: true,
|
107
|
+
},
|
108
|
+
);
|
109
|
+
|
110
|
+
app.categoryManager.addMappingFunction(
|
111
|
+
() => true,
|
112
|
+
foobarMappingFunction,
|
113
|
+
owner,
|
114
|
+
[collectionComponent.id],
|
115
|
+
);
|
116
|
+
for (let i = 0; i <= 12; i++) {
|
117
|
+
category.collection.add({
|
118
|
+
name: `foobar-${i}`,
|
119
|
+
});
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
return {
|
124
|
+
componentIds,
|
125
|
+
categoryName,
|
126
|
+
newDialog,
|
127
|
+
requestCategory,
|
128
|
+
requestFoobar,
|
129
|
+
clear,
|
130
|
+
};
|
131
|
+
},
|
132
|
+
};
|
133
|
+
</script>
|
134
|
+
|
135
|
+
<style scoped></style>
|
@@ -0,0 +1,209 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<v-expansion-panel @change="active = !active">
|
4
|
+
<v-expansion-panel-header hide-actions class="px-2">
|
5
|
+
<template #default="{ open }">
|
6
|
+
<div class="d-flex justify-space-between">
|
7
|
+
<div class="d-flex align-center">
|
8
|
+
<v-icon class="mr-1" :class="{ rotate: !open }">
|
9
|
+
mdi-chevron-down
|
10
|
+
</v-icon>
|
11
|
+
{{ $t(title) }}
|
12
|
+
</div>
|
13
|
+
<VcsActionButtonList
|
14
|
+
v-if="actions?.length > 0"
|
15
|
+
:actions="actions"
|
16
|
+
/>
|
17
|
+
</div>
|
18
|
+
</template>
|
19
|
+
</v-expansion-panel-header>
|
20
|
+
<v-expansion-panel-content class="pb-1">
|
21
|
+
<v-container class="py-0 px-2">
|
22
|
+
<v-row no-gutters>
|
23
|
+
<v-col>
|
24
|
+
<VcsLabel html-for="title" dense>
|
25
|
+
{{ $t('categoryTester.title') }}
|
26
|
+
</VcsLabel>
|
27
|
+
</v-col>
|
28
|
+
<v-col>
|
29
|
+
<VcsTextField id="title" clearable dense v-model="title" />
|
30
|
+
</v-col>
|
31
|
+
</v-row>
|
32
|
+
<v-row no-gutters>
|
33
|
+
<v-col>
|
34
|
+
<VcsLabel html-for="draggable" dense>
|
35
|
+
{{ $t('categoryTester.draggable') }}
|
36
|
+
</VcsLabel>
|
37
|
+
</v-col>
|
38
|
+
<v-col>
|
39
|
+
<VcsCheckbox id="draggable" dense v-model="draggable" />
|
40
|
+
</v-col>
|
41
|
+
</v-row>
|
42
|
+
<v-row no-gutters>
|
43
|
+
<v-col>
|
44
|
+
<VcsLabel html-for="selectable" dense>
|
45
|
+
{{ $t('categoryTester.selectable') }}
|
46
|
+
</VcsLabel>
|
47
|
+
</v-col>
|
48
|
+
<v-col>
|
49
|
+
<VcsCheckbox id="selectable" dense v-model="selectable" />
|
50
|
+
</v-col>
|
51
|
+
</v-row>
|
52
|
+
<v-row no-gutters>
|
53
|
+
<v-col>
|
54
|
+
<VcsLabel html-for="singleSelect" dense>
|
55
|
+
{{ $t('categoryTester.singleSelect') }}
|
56
|
+
</VcsLabel>
|
57
|
+
</v-col>
|
58
|
+
<v-col>
|
59
|
+
<VcsCheckbox id="singleSelect" dense v-model="singleSelect" />
|
60
|
+
</v-col>
|
61
|
+
</v-row>
|
62
|
+
</v-container>
|
63
|
+
</v-expansion-panel-content>
|
64
|
+
</v-expansion-panel>
|
65
|
+
<v-dialog v-model="dialog" width="300">
|
66
|
+
<v-card class="pa-2">
|
67
|
+
<v-form @submit.prevent="addItem">
|
68
|
+
<vcs-text-area v-model="jsonString" />
|
69
|
+
<vcs-form-button type="submit"> Add </vcs-form-button>
|
70
|
+
</v-form>
|
71
|
+
</v-card>
|
72
|
+
</v-dialog>
|
73
|
+
</div>
|
74
|
+
</template>
|
75
|
+
|
76
|
+
<script>
|
77
|
+
import { inject, ref } from 'vue';
|
78
|
+
import {
|
79
|
+
VExpansionPanel,
|
80
|
+
VExpansionPanelHeader,
|
81
|
+
VExpansionPanelContent,
|
82
|
+
VIcon,
|
83
|
+
VContainer,
|
84
|
+
VRow,
|
85
|
+
VCol,
|
86
|
+
VDialog,
|
87
|
+
VCard,
|
88
|
+
VForm,
|
89
|
+
} from 'vuetify/lib';
|
90
|
+
import {
|
91
|
+
VcsCheckbox,
|
92
|
+
VcsLabel,
|
93
|
+
VcsTextField,
|
94
|
+
VcsTextArea,
|
95
|
+
VcsActionButtonList,
|
96
|
+
VcsFormButton,
|
97
|
+
downloadText,
|
98
|
+
} from '@vcmap/ui';
|
99
|
+
import { getObjectFromClassRegistry } from '@vcmap/core';
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Shows CollectionComponentOptions of a provided collectionComponent
|
103
|
+
*/
|
104
|
+
export default {
|
105
|
+
name: 'CollectionComponent',
|
106
|
+
components: {
|
107
|
+
VcsFormButton,
|
108
|
+
VcsActionButtonList,
|
109
|
+
VcsCheckbox,
|
110
|
+
VcsLabel,
|
111
|
+
VcsTextField,
|
112
|
+
VcsTextArea,
|
113
|
+
VExpansionPanel,
|
114
|
+
VExpansionPanelHeader,
|
115
|
+
VExpansionPanelContent,
|
116
|
+
VIcon,
|
117
|
+
VContainer,
|
118
|
+
VRow,
|
119
|
+
VCol,
|
120
|
+
VDialog,
|
121
|
+
VCard,
|
122
|
+
VForm,
|
123
|
+
},
|
124
|
+
setup() {
|
125
|
+
const app = inject('vcsApp');
|
126
|
+
/**
|
127
|
+
* @type {CollectionComponent}
|
128
|
+
*/
|
129
|
+
const collectionComponent = inject('collectionComponent');
|
130
|
+
const category = app.categories.getByKey(collectionComponent.id);
|
131
|
+
const active = ref(false);
|
132
|
+
const dialog = ref(false);
|
133
|
+
const jsonString = ref(JSON.stringify({ name: 'newItem' }, null, 2));
|
134
|
+
|
135
|
+
async function addItem() {
|
136
|
+
try {
|
137
|
+
const config = JSON.parse(jsonString.value);
|
138
|
+
if (category.classRegistryName) {
|
139
|
+
category.collection.add(
|
140
|
+
getObjectFromClassRegistry(
|
141
|
+
app[category.classRegistryName],
|
142
|
+
config,
|
143
|
+
),
|
144
|
+
);
|
145
|
+
} else {
|
146
|
+
category.collection.add(config);
|
147
|
+
}
|
148
|
+
jsonString.value = JSON.stringify({ name: 'newItem' }, null, 2);
|
149
|
+
} catch (e) {
|
150
|
+
// eslint-disable-next-line no-console
|
151
|
+
console.error('invalid JSON');
|
152
|
+
}
|
153
|
+
dialog.value = false;
|
154
|
+
}
|
155
|
+
|
156
|
+
function download() {
|
157
|
+
const stringObject = JSON.stringify(
|
158
|
+
category.serializeModule(app.dynamicModuleId),
|
159
|
+
null,
|
160
|
+
2,
|
161
|
+
);
|
162
|
+
downloadText(stringObject, `${category.name}.json`);
|
163
|
+
}
|
164
|
+
|
165
|
+
const actions = [
|
166
|
+
{
|
167
|
+
name: 'add',
|
168
|
+
icon: '$vcsPlus',
|
169
|
+
callback() {
|
170
|
+
dialog.value = true;
|
171
|
+
},
|
172
|
+
},
|
173
|
+
{
|
174
|
+
name: 'download',
|
175
|
+
icon: 'mdi-download',
|
176
|
+
callback: download,
|
177
|
+
},
|
178
|
+
];
|
179
|
+
|
180
|
+
return {
|
181
|
+
title: collectionComponent.title,
|
182
|
+
draggable: collectionComponent.draggable,
|
183
|
+
selectable: collectionComponent.selectable,
|
184
|
+
singleSelect: collectionComponent.singleSelect,
|
185
|
+
active,
|
186
|
+
dialog,
|
187
|
+
jsonString,
|
188
|
+
actions,
|
189
|
+
addItem,
|
190
|
+
};
|
191
|
+
},
|
192
|
+
};
|
193
|
+
</script>
|
194
|
+
|
195
|
+
<style lang="scss" scoped>
|
196
|
+
.rotate {
|
197
|
+
transform: rotate(-90deg);
|
198
|
+
}
|
199
|
+
.v-icon {
|
200
|
+
font-size: 16px;
|
201
|
+
}
|
202
|
+
::v-deep {
|
203
|
+
.v-list {
|
204
|
+
.v-list-item {
|
205
|
+
padding: 4px 8px 4px 28px;
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
</style>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ButtonLocation, createToggleAction, WindowSlot } from '@vcmap/ui';
|
2
2
|
import packageJSON from './package.json';
|
3
|
-
import Categories from './
|
3
|
+
import Categories from './CategoriesExample.vue';
|
4
4
|
|
5
5
|
/**
|
6
6
|
* @returns {VcsPlugin}
|
@@ -45,6 +45,24 @@ export default async function categoryTest() {
|
|
45
45
|
);
|
46
46
|
this._destroyAction = destroy;
|
47
47
|
},
|
48
|
+
i18n: {
|
49
|
+
de: {
|
50
|
+
categoryTester: {
|
51
|
+
title: 'Titel',
|
52
|
+
draggable: 'verschiebbar',
|
53
|
+
selectable: 'selektierbar',
|
54
|
+
singleSelect: 'Einfachauswahl',
|
55
|
+
},
|
56
|
+
},
|
57
|
+
en: {
|
58
|
+
categoryTester: {
|
59
|
+
title: 'Title',
|
60
|
+
draggable: 'draggable',
|
61
|
+
selectable: 'selectable',
|
62
|
+
singleSelect: 'single select',
|
63
|
+
},
|
64
|
+
},
|
65
|
+
},
|
48
66
|
destroy() {
|
49
67
|
if (this._destroyAction) {
|
50
68
|
this._destroyAction();
|
@@ -0,0 +1,182 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<VcsFormSection heading="Collection Manager" v-if="componentIds.length > 0">
|
4
|
+
<CollectionManagerComponent />
|
5
|
+
</VcsFormSection>
|
6
|
+
<VcsFormSection heading="Tester Settings">
|
7
|
+
<v-container class="py-0 px-1">
|
8
|
+
<v-row no-gutters>
|
9
|
+
<v-col>
|
10
|
+
<VcsLabel html-for="selectInput" dense>
|
11
|
+
{{ $t('collectionManagerExample.select') }}
|
12
|
+
</VcsLabel>
|
13
|
+
</v-col>
|
14
|
+
<v-col>
|
15
|
+
<VcsSelect
|
16
|
+
id="selectInput"
|
17
|
+
:items="appCollections"
|
18
|
+
dense
|
19
|
+
v-model="selected"
|
20
|
+
/>
|
21
|
+
</v-col>
|
22
|
+
</v-row>
|
23
|
+
<div class="d-flex gap-2 w-full justify-end">
|
24
|
+
<VcsFormButton @click="addCollection" variant="filled"
|
25
|
+
>Add Collection</VcsFormButton
|
26
|
+
>
|
27
|
+
<VcsFormButton @click="clear">Clear</VcsFormButton>
|
28
|
+
</div>
|
29
|
+
</v-container>
|
30
|
+
</VcsFormSection>
|
31
|
+
</div>
|
32
|
+
</template>
|
33
|
+
|
34
|
+
<script>
|
35
|
+
import { inject, onMounted, onUnmounted, ref } from 'vue';
|
36
|
+
import {
|
37
|
+
VcsFormSection,
|
38
|
+
CollectionManagerComponent,
|
39
|
+
VcsFormButton,
|
40
|
+
VcsSelect,
|
41
|
+
VcsLabel,
|
42
|
+
NotificationType,
|
43
|
+
} from '@vcmap/ui';
|
44
|
+
import { VContainer, VRow, VCol } from 'vuetify/lib';
|
45
|
+
import { name as owner } from './package.json';
|
46
|
+
|
47
|
+
/**
|
48
|
+
* a sample mapping function adding a console log to all list items
|
49
|
+
* @param {T} i
|
50
|
+
* @param {CollectionComponent} c
|
51
|
+
* @param {VcsListItem} l
|
52
|
+
*/
|
53
|
+
const mappingFunction = (i, c, l) => {
|
54
|
+
l.actions = [
|
55
|
+
...l.actions,
|
56
|
+
{
|
57
|
+
name: 'console.log',
|
58
|
+
title: 'log item, collectionComponent and listItem',
|
59
|
+
icon: 'mdi-printer',
|
60
|
+
callback: () => console.log(i, c, l),
|
61
|
+
},
|
62
|
+
];
|
63
|
+
};
|
64
|
+
|
65
|
+
export default {
|
66
|
+
name: 'CollectionManagerExample',
|
67
|
+
components: {
|
68
|
+
VcsFormSection,
|
69
|
+
CollectionManagerComponent,
|
70
|
+
VcsFormButton,
|
71
|
+
VcsLabel,
|
72
|
+
VcsSelect,
|
73
|
+
VContainer,
|
74
|
+
VRow,
|
75
|
+
VCol,
|
76
|
+
},
|
77
|
+
setup() {
|
78
|
+
const app = inject('vcsApp');
|
79
|
+
const collectionManager = inject('collectionManager');
|
80
|
+
const componentIds = ref(collectionManager.componentIds);
|
81
|
+
const appCollections = [
|
82
|
+
'maps',
|
83
|
+
'layers',
|
84
|
+
'obliqueCollections',
|
85
|
+
'styles',
|
86
|
+
'featureInfo',
|
87
|
+
'plugins',
|
88
|
+
'viewpoints',
|
89
|
+
];
|
90
|
+
const selected = ref(appCollections[0]);
|
91
|
+
|
92
|
+
onMounted(() => {
|
93
|
+
/**
|
94
|
+
* add general mapping function applied to all collections
|
95
|
+
*/
|
96
|
+
collectionManager.addMappingFunction(
|
97
|
+
() => true,
|
98
|
+
mappingFunction,
|
99
|
+
owner,
|
100
|
+
);
|
101
|
+
});
|
102
|
+
|
103
|
+
onUnmounted(() => {
|
104
|
+
collectionManager.removeMappingFunction(mappingFunction, owner);
|
105
|
+
});
|
106
|
+
|
107
|
+
/**
|
108
|
+
* add item filter to collection of provided id
|
109
|
+
* @param {string} id
|
110
|
+
*/
|
111
|
+
function addFilterActions(id) {
|
112
|
+
/**
|
113
|
+
* Filters all items having an 'a' within title or name
|
114
|
+
* @param {T} item
|
115
|
+
* @returns {boolean}
|
116
|
+
*/
|
117
|
+
const filterFunction = (item) =>
|
118
|
+
item?.properties?.title?.includes('a') || item.name.includes('a');
|
119
|
+
collectionManager.addActions(
|
120
|
+
[
|
121
|
+
{
|
122
|
+
name: 'addFilter',
|
123
|
+
title: 'show only items including an "a" in title or name',
|
124
|
+
icon: 'mdi-filter-plus',
|
125
|
+
callback: () => {
|
126
|
+
collectionManager.addFilterFunction(filterFunction, owner, [
|
127
|
+
id,
|
128
|
+
]);
|
129
|
+
},
|
130
|
+
},
|
131
|
+
{
|
132
|
+
name: 'removeFilter',
|
133
|
+
title: 'remove filtering',
|
134
|
+
icon: 'mdi-filter-remove',
|
135
|
+
callback: () => {
|
136
|
+
collectionManager.removeFilterFunction(filterFunction, owner);
|
137
|
+
},
|
138
|
+
},
|
139
|
+
],
|
140
|
+
owner,
|
141
|
+
[id],
|
142
|
+
);
|
143
|
+
}
|
144
|
+
|
145
|
+
/**
|
146
|
+
* add new collection to manager
|
147
|
+
*/
|
148
|
+
function addCollection() {
|
149
|
+
if (!collectionManager.has(selected.value)) {
|
150
|
+
collectionManager.add(
|
151
|
+
{
|
152
|
+
id: selected.value,
|
153
|
+
title: selected.value,
|
154
|
+
collection: app[selected.value],
|
155
|
+
},
|
156
|
+
owner,
|
157
|
+
);
|
158
|
+
addFilterActions(selected.value);
|
159
|
+
} else {
|
160
|
+
app.notifier.add({
|
161
|
+
message: 'collectionManagerExample.addFailed',
|
162
|
+
type: NotificationType.ERROR,
|
163
|
+
});
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
function clear() {
|
168
|
+
collectionManager.clear();
|
169
|
+
}
|
170
|
+
|
171
|
+
return {
|
172
|
+
componentIds,
|
173
|
+
appCollections,
|
174
|
+
selected,
|
175
|
+
addCollection,
|
176
|
+
clear,
|
177
|
+
};
|
178
|
+
},
|
179
|
+
};
|
180
|
+
</script>
|
181
|
+
|
182
|
+
<style scoped></style>
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import {
|
2
|
+
ButtonLocation,
|
3
|
+
createToggleAction,
|
4
|
+
WindowSlot,
|
5
|
+
CollectionManager,
|
6
|
+
} from '@vcmap/ui';
|
7
|
+
import packageJSON from './package.json';
|
8
|
+
import CollectionManagerExample from './CollectionManagerExample.vue';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @returns {VcsPlugin}
|
12
|
+
*/
|
13
|
+
export default async function collectionManagerExample() {
|
14
|
+
return {
|
15
|
+
get name() {
|
16
|
+
return packageJSON.name;
|
17
|
+
},
|
18
|
+
get version() {
|
19
|
+
return packageJSON.version;
|
20
|
+
},
|
21
|
+
get vcMapVersion() {
|
22
|
+
return packageJSON.vcMapVersion;
|
23
|
+
},
|
24
|
+
initialize(app) {
|
25
|
+
const collectionManager = new CollectionManager(app);
|
26
|
+
const { action, destroy } = createToggleAction(
|
27
|
+
{
|
28
|
+
name: 'Collection Manager Tester',
|
29
|
+
title: 'Collection Manager Tester',
|
30
|
+
icon: '$vcsPen',
|
31
|
+
},
|
32
|
+
{
|
33
|
+
id: 'collection-editor',
|
34
|
+
component: CollectionManagerExample,
|
35
|
+
slot: WindowSlot.DETACHED,
|
36
|
+
state: {
|
37
|
+
headerTitle: 'Collection Manager Tester',
|
38
|
+
headerIcon: '$vcsPen',
|
39
|
+
},
|
40
|
+
position: {
|
41
|
+
width: 500,
|
42
|
+
},
|
43
|
+
provides: {
|
44
|
+
collectionManager,
|
45
|
+
},
|
46
|
+
},
|
47
|
+
app.windowManager,
|
48
|
+
packageJSON.name,
|
49
|
+
);
|
50
|
+
app.navbarManager.add(
|
51
|
+
{ id: 'collection-editor', action },
|
52
|
+
packageJSON.name,
|
53
|
+
ButtonLocation.TOOL,
|
54
|
+
);
|
55
|
+
this._destroyAction = destroy;
|
56
|
+
},
|
57
|
+
i18n: {
|
58
|
+
de: {
|
59
|
+
select: 'Collection',
|
60
|
+
addFailed: 'Die gewählte Collection wurde bereits hinzugefügt!',
|
61
|
+
},
|
62
|
+
en: {
|
63
|
+
select: 'Collection',
|
64
|
+
addFailed: 'The selected collection is already added!',
|
65
|
+
},
|
66
|
+
},
|
67
|
+
destroy() {
|
68
|
+
if (this._destroyAction) {
|
69
|
+
this._destroyAction();
|
70
|
+
this._destroyAction = null;
|
71
|
+
}
|
72
|
+
},
|
73
|
+
};
|
74
|
+
}
|
@@ -18,19 +18,18 @@
|
|
18
18
|
<template #default v-if="showSection">
|
19
19
|
<v-container class="py-0 px-1">
|
20
20
|
<v-row no-gutters>
|
21
|
-
<v-col>
|
21
|
+
<v-col class="w-max-half">
|
22
22
|
<VcsLabel html-for="selectInput" :dense="dense">
|
23
23
|
{{ $t('form-inputs-example.select') }}
|
24
24
|
</VcsLabel>
|
25
25
|
</v-col>
|
26
|
-
<v-col>
|
26
|
+
<v-col class="w-max-half">
|
27
27
|
<VcsSelect
|
28
28
|
id="selectInput"
|
29
29
|
:items="selectOptions"
|
30
30
|
:dense="dense"
|
31
31
|
:rules="[(v) => v !== 'D' || 'D is not allowed']"
|
32
32
|
v-model="state.selected"
|
33
|
-
color="purple"
|
34
33
|
/>
|
35
34
|
</v-col>
|
36
35
|
</v-row>
|
@@ -161,6 +160,22 @@
|
|
161
160
|
/>
|
162
161
|
</v-col>
|
163
162
|
</v-row>
|
163
|
+
<v-row no-gutters class="align-center">
|
164
|
+
<v-col>
|
165
|
+
<VcsLabel html-for="sliderInput" :dense="dense">
|
166
|
+
Slider
|
167
|
+
</VcsLabel>
|
168
|
+
</v-col>
|
169
|
+
<v-col>
|
170
|
+
<VcsSlider
|
171
|
+
id="sliderInput"
|
172
|
+
:dense="dense"
|
173
|
+
type="number"
|
174
|
+
step="1"
|
175
|
+
v-model.number="state.numberInput"
|
176
|
+
/>
|
177
|
+
</v-col>
|
178
|
+
</v-row>
|
164
179
|
<v-row no-gutters>
|
165
180
|
<v-col>
|
166
181
|
<VcsLabel html-for="formattedNumber" :dense="dense">
|
@@ -355,6 +370,7 @@
|
|
355
370
|
VcsLabel,
|
356
371
|
VcsTextArea,
|
357
372
|
VcsDatePicker,
|
373
|
+
VcsSlider,
|
358
374
|
} from '@vcmap/ui';
|
359
375
|
import { VCol, VContainer, VForm, VRow } from 'vuetify/lib';
|
360
376
|
import packageJSON from './package.json';
|
@@ -377,6 +393,7 @@
|
|
377
393
|
VCol,
|
378
394
|
VContainer,
|
379
395
|
VcsDatePicker,
|
396
|
+
VcsSlider,
|
380
397
|
},
|
381
398
|
props: {
|
382
399
|
actions: {
|