@vcmap/ui 5.0.0-rc.10 → 5.0.0-rc.13

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.
Files changed (165) hide show
  1. package/README.md +12 -5
  2. package/build/build.js +6 -3
  3. package/build/buildHelpers.js +12 -4
  4. package/build/buildPreview.js +7 -0
  5. package/build/getPluginProxies.js +4 -0
  6. package/config/aerowest.config.json +13 -3
  7. package/config/base.config.json +398 -219
  8. package/config/codes.config.json +397 -0
  9. package/config/dev.config.json +375 -1
  10. package/config/graphFeatureInfo.config.json +100 -0
  11. package/config/www.config.json +1232 -0
  12. package/dist/assets/{cesium.eb5667.js → cesium.21663e.js} +0 -0
  13. package/dist/assets/cesium.js +1 -1
  14. package/dist/assets/core.63242d.js +4 -0
  15. package/dist/assets/core.js +1 -1
  16. package/dist/assets/font/OFL.txt +93 -0
  17. package/dist/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  18. package/dist/assets/{index.4ccd4433.js → index.44b91cfe.js} +1 -1
  19. package/dist/assets/{ol.ef03b1.js → ol.88ba9d.js} +0 -0
  20. package/dist/assets/ol.js +1 -1
  21. package/dist/assets/ui.3c2933.css +1 -0
  22. package/dist/assets/ui.3c2933.js +71 -0
  23. package/dist/assets/ui.js +1 -1
  24. package/dist/assets/vue.c897fc.js +9 -0
  25. package/dist/assets/vue.js +2 -1
  26. package/dist/assets/{vuetify.401a29.css → vuetify.147c3a.css} +1 -1
  27. package/dist/assets/{vuetify.401a29.js → vuetify.147c3a.js} +72 -72
  28. package/dist/assets/vuetify.js +2 -2
  29. package/dist/index.html +1 -5
  30. package/index.js +39 -5
  31. package/lib/vue.js +1 -0
  32. package/map.config.json +15 -6
  33. package/package.json +17 -8
  34. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +71 -0
  35. package/plugins/@vcmap/create-link/index.js +83 -0
  36. package/plugins/@vcmap/create-link/package.json +6 -0
  37. package/plugins/@vcmap/pluginExample/index.js +2 -2
  38. package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +20 -3
  39. package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +1 -1
  40. package/plugins/@vcmap/project-selector/index.js +1 -1
  41. package/plugins/@vcmap/project-selector/package.json +1 -2
  42. package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +1 -1
  43. package/plugins/@vcmap/theme-changer/index.js +1 -1
  44. package/plugins/@vcmap/theme-changer/package.json +1 -2
  45. package/plugins/categoryTest/Categories.vue +89 -1
  46. package/plugins/categoryTest/Category.vue +1 -1
  47. package/plugins/example/index.js +10 -23
  48. package/plugins/simple-graph/README.md +51 -0
  49. package/plugins/simple-graph/SimpleGraphComponent.vue +70 -0
  50. package/plugins/simple-graph/index.js +17 -0
  51. package/plugins/simple-graph/package.json +11 -0
  52. package/plugins/simple-graph/simpleGraphView.js +76 -0
  53. package/plugins/test/editor.vue +1 -1
  54. package/plugins/test/index.js +76 -9
  55. package/plugins/test/toolbox-data.js +82 -57
  56. package/plugins/test/windowManagerExample.vue +1 -1
  57. package/src/actions/stateRefAction.js +2 -2
  58. package/src/actions/styleSelector.vue +1 -1
  59. package/src/application/Navbar.vue +13 -2
  60. package/src/application/VcsApp.vue +301 -116
  61. package/src/application/VcsMap.vue +1 -1
  62. package/src/application/VcsSettings.vue +1 -1
  63. package/src/application/vcsAppWrapper.vue +1 -0
  64. package/src/assets/font/OFL.txt +93 -0
  65. package/src/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  66. package/src/components/form-inputs-controls/VcsCheckbox.vue +13 -0
  67. package/src/components/form-inputs-controls/VcsColorPicker.vue +1 -1
  68. package/src/components/form-inputs-controls/VcsRadio.vue +123 -0
  69. package/src/components/form-output/VcsFormattedNumber.vue +1 -1
  70. package/src/components/lists/VcsActionList.vue +22 -7
  71. package/src/components/lists/VcsTreeview.vue +4 -4
  72. package/src/components/lists/VcsTreeviewLeaf.vue +10 -3
  73. package/src/components/lists/VcsTreeviewSearchbar.vue +1 -2
  74. package/src/components/tables/VcsTable.vue +245 -0
  75. package/src/contentTree/LayerTree.vue +1 -1
  76. package/src/contentTree/contentTreeCollection.js +4 -4
  77. package/src/contentTree/contentTreeItem.js +9 -9
  78. package/src/contentTree/groupContentTreeItem.js +1 -1
  79. package/src/contentTree/layerContentTreeItem.js +15 -1
  80. package/src/contentTree/layerGroupContentTreeItem.js +21 -1
  81. package/src/contentTree/nodeContentTreeItem.js +1 -1
  82. package/src/featureInfo/AddressBalloonComponent.vue +47 -0
  83. package/src/featureInfo/BalloonComponent.vue +140 -0
  84. package/src/featureInfo/abstractFeatureInfoView.js +313 -0
  85. package/src/featureInfo/addressBalloonFeatureInfoView.js +118 -0
  86. package/src/featureInfo/balloonFeatureInfoView.js +151 -0
  87. package/src/featureInfo/balloonHelper.js +132 -0
  88. package/src/featureInfo/featureInfo.js +457 -0
  89. package/src/featureInfo/featureInfoInteraction.js +42 -0
  90. package/src/featureInfo/iframeFeatureInfoView.js +95 -0
  91. package/src/featureInfo/tableFeatureInfoView.js +106 -0
  92. package/src/i18n/de.js +26 -0
  93. package/src/i18n/en.js +26 -0
  94. package/src/i18n/i18nCollection.js +17 -0
  95. package/src/icons/+all.js +80 -0
  96. package/src/icons/ClippingHorizontalIcon.vue +7 -0
  97. package/src/icons/ClippingIcon.vue +7 -0
  98. package/src/icons/ClippingVerticalIcon.vue +7 -0
  99. package/src/icons/ColorPickerIcon.vue +7 -0
  100. package/src/icons/ComponentsIcon.vue +2 -2
  101. package/src/icons/DimensionsHouseIcon.vue +11 -9
  102. package/src/icons/EditIcon.vue +7 -0
  103. package/src/icons/GlobalTerrainIcon.vue +9 -0
  104. package/src/icons/GroundIcon.vue +18 -0
  105. package/src/icons/HideIcon.vue +12 -0
  106. package/src/icons/LogoutIcon.vue +7 -0
  107. package/src/icons/ObjectAttributeIcon.vue +2 -13
  108. package/src/icons/PedestrianIcon.vue +2 -3
  109. package/src/icons/PenIcon.vue +2 -9
  110. package/src/icons/PoiIcon.vue +5 -2
  111. package/src/icons/PointSelectIcon.vue +4 -2
  112. package/src/icons/QueryIcon.vue +6 -7
  113. package/src/icons/ScreenshotIcon.vue +16 -0
  114. package/src/icons/ShareIcon.vue +4 -16
  115. package/src/icons/SkipNextIcon.vue +3 -1
  116. package/src/icons/TerrainBoxIcon.vue +9 -0
  117. package/src/icons/ToolsIcon.vue +4 -30
  118. package/src/icons/UploadIcon.vue +2 -9
  119. package/src/icons/UserProfileIcon.vue +7 -0
  120. package/src/icons/UserShareIcon.vue +7 -0
  121. package/src/icons/VideoRecorderIcon.vue +5 -9
  122. package/src/icons/ViewpointFlightIcon.vue +11 -0
  123. package/src/icons/ViewpointIcon.vue +11 -0
  124. package/src/icons/Viewshed360Icon.vue +7 -0
  125. package/src/icons/ViewshedConeIcon.vue +7 -0
  126. package/src/icons/ViewshedIcon.vue +7 -0
  127. package/src/icons/WallIcon.vue +4 -9
  128. package/src/legend/legendHelper.js +193 -0
  129. package/src/legend/styleLegendItem.vue +129 -0
  130. package/src/legend/vcsLegend.vue +92 -0
  131. package/src/manager/buttonManager.js +7 -12
  132. package/src/manager/categoryManager/ComponentsManager.vue +30 -0
  133. package/src/manager/categoryManager/categoryManager.js +500 -0
  134. package/src/manager/contextMenu/contextMenuComponent.vue +43 -0
  135. package/src/manager/contextMenu/contextMenuInteraction.js +42 -0
  136. package/src/manager/contextMenu/contextMenuManager.js +197 -0
  137. package/src/manager/navbarManager.js +9 -9
  138. package/src/manager/toolbox/GroupToolboxComponent.vue +118 -0
  139. package/src/manager/toolbox/SelectToolboxComponent.vue +128 -0
  140. package/src/manager/toolbox/ToolboxManager.vue +116 -98
  141. package/src/manager/toolbox/toolboxManager.js +235 -86
  142. package/src/manager/window/WindowComponent.vue +1 -1
  143. package/src/manager/window/WindowManager.vue +5 -3
  144. package/src/manager/window/windowManager.js +118 -14
  145. package/src/navigation/mapNavigation.vue +3 -5
  146. package/src/navigation/overviewMap.js +28 -5
  147. package/src/navigation/vcsCompass.vue +1 -1
  148. package/src/pluginHelper.js +42 -10
  149. package/src/setup.js +0 -2
  150. package/src/state.js +256 -0
  151. package/src/styles/_theming.scss +0 -5
  152. package/src/styles/variables.scss +7 -0
  153. package/src/styles/vcsFont.scss +17 -0
  154. package/src/uiConfig.js +79 -0
  155. package/src/vcsUiApp.js +213 -22
  156. package/src/vuePlugins/vuetify.js +14 -4
  157. package/config/berlin.config.json +0 -510
  158. package/dist/assets/core.216494.js +0 -4
  159. package/dist/assets/ui.99a1a7.css +0 -1
  160. package/dist/assets/ui.99a1a7.js +0 -70
  161. package/dist/assets/vue-composition-api.c5aca1.js +0 -14
  162. package/dist/assets/vue-composition-api.js +0 -2
  163. package/dist/assets/vue.762edd.js +0 -9
  164. package/lib/vue-composition-api.js +0 -2
  165. package/src/manager/toolbox/ToolboxGroupComponent.vue +0 -128
@@ -2,7 +2,10 @@
2
2
  <v-container class="fill-height pa-0" absolute fluid>
3
3
  <Navbar />
4
4
  <v-container class="vcs-main pa-0" :class="{ 'vcs-main-xs': $vuetify.breakpoint.xs }" fluid absolute>
5
- <div v-if="$vuetify.breakpoint.smAndDown" class="company-logo-mobile" />
5
+ <template v-if="$vuetify.breakpoint.smAndDown">
6
+ <img v-if="mobileLogo" :src="mobileLogo" alt="Logo" class="mobile-logo">
7
+ <div v-else class="company-logo-mobile mobile-logo" />
8
+ </template>
6
9
  <VcsMap :map-id="mapId" />
7
10
  <MapNavigation />
8
11
  <ToolboxManagerComponent />
@@ -31,15 +34,27 @@
31
34
  bottom: 56px;
32
35
  }
33
36
 
37
+ .mobile-logo {
38
+ max-height: 40px;
39
+ max-width: 70px;
40
+ position: absolute;
41
+ top: 1rem;
42
+ left: 1rem;
43
+ z-index: 1;
44
+ }
45
+
34
46
  </style>
35
47
 
36
48
  <script>
37
49
  import { v4 as uuid } from 'uuid';
38
50
  import {
51
+ computed,
52
+ getCurrentInstance,
39
53
  onMounted,
40
54
  onUnmounted,
41
55
  provide,
42
- } from '@vue/composition-api';
56
+ watch,
57
+ } from 'vue';
43
58
  import { getVcsAppById } from '@vcmap/core';
44
59
  import WindowManagerComponent from '../manager/window/WindowManager.vue';
45
60
  import ToolboxManagerComponent from '../manager/toolbox/ToolboxManager.vue';
@@ -50,8 +65,275 @@
50
65
  import { createMapButtonAction, createToggleAction } from '../actions/actionHelper.js';
51
66
  import MapNavigation from '../navigation/mapNavigation.vue';
52
67
  import VcsSettings from './VcsSettings.vue';
53
- import { WindowSlot } from '../manager/window/windowManager';
68
+ import { WindowSlot } from '../manager/window/windowManager.js';
69
+ import ComponentsManager from '../manager/categoryManager/ComponentsManager.vue';
70
+ import { defaultPrimaryColor } from '../vuePlugins/vuetify.js';
71
+ import VcsLegend from '../legend/vcsLegend.vue';
72
+ import { getLegendEntries } from '../legend/legendHelper.js';
73
+
74
+ /**
75
+ * You should call this function in the component providing the vcsUiApp to your
76
+ * application in the components mounted hook. This will call VcsAppMounted on all plugins in the app
77
+ * and add a listener to call. Returns a destroy hook to stop listening to the added event. If you use the VcsApp
78
+ * component, do not call this function, since the component will do this for you.
79
+ * @param {VcsUiApp} app
80
+ * @returns {function():void}
81
+ */
82
+ export function setupPluginMountedListeners(app) {
83
+ [...app.plugins].forEach((plugin) => {
84
+ if (plugin.onVcsAppMounted) {
85
+ plugin.onVcsAppMounted(app);
86
+ }
87
+ });
88
+
89
+ return app.plugins.added.addEventListener((plugin) => {
90
+ if (plugin.onVcsAppMounted) {
91
+ plugin.onVcsAppMounted(app);
92
+ }
93
+ });
94
+ }
95
+
96
+ /**
97
+ * This helper function will add a map action button based on the default icons
98
+ * to the apps NavbarManager. Furthermore, all maps on the app are synced for adding and removing.
99
+ * @param {VcsUiApp} app
100
+ * @returns {function():void}
101
+ */
102
+ export function setupMapNavbar(app) {
103
+ const iconMap = {
104
+ OpenlayersMap: '$vcs2d',
105
+ CesiumMap: '$vcs3d',
106
+ ObliqueMap: '$vcsObliqueView',
107
+ };
108
+
109
+ const mapButtonActionDestroy = {};
110
+ const setupMap = ({ className, name }) => {
111
+ if (mapButtonActionDestroy[name]) {
112
+ mapButtonActionDestroy[name]();
113
+ }
114
+ const { action, destroy } = createMapButtonAction(
115
+ {
116
+ name,
117
+ icon: iconMap[className],
118
+ title: `navbar.maps.${className}`,
119
+ },
120
+ name,
121
+ app.maps,
122
+ );
123
+ app.navbarManager.add(
124
+ {
125
+ id: `mapButton-${name}`,
126
+ action,
127
+ },
128
+ vcsAppSymbol,
129
+ ButtonLocation.MAP,
130
+ );
131
+ mapButtonActionDestroy[name] = () => {
132
+ app.navbarManager.remove(`mapButton-${name}`);
133
+ destroy();
134
+ };
135
+ };
136
+ [...app.maps].forEach(setupMap);
137
+ const mapAddedListener = app.maps.added.addEventListener(setupMap);
138
+
139
+ const mapRemovedListener = app.maps.removed.addEventListener(({ name }) => {
140
+ if (mapButtonActionDestroy[name]) {
141
+ mapButtonActionDestroy[name]();
142
+ delete mapButtonActionDestroy[name];
143
+ }
144
+ });
145
+
146
+ return () => {
147
+ mapAddedListener();
148
+ mapRemovedListener();
149
+ Object.values(mapButtonActionDestroy).forEach(cb => cb());
150
+ };
151
+ }
152
+
153
+ /**
154
+ * This helper function will add a legend action button to the apps NavbarManager TOOL location, if legend entries are available.
155
+ * Watches number of legend entries.
156
+ * @param {VcsUiApp} app
157
+ * @returns {function():void}
158
+ */
159
+ export function setupLegendWindow(app) {
160
+ const { entries, destroy } = getLegendEntries(app);
161
+
162
+ const { action: legendAction, destroy: legendDestroy } = createToggleAction(
163
+ {
164
+ name: 'legendToggle',
165
+ icon: '$vcsLegend',
166
+ title: 'legend.tooltip',
167
+ },
168
+ {
169
+ id: 'legend',
170
+ component: VcsLegend,
171
+ state: { headerTitle: 'legend.title' },
172
+ slot: WindowSlot.DYNAMIC_RIGHT,
173
+ props: { entries },
174
+ },
175
+ app.windowManager,
176
+ vcsAppSymbol,
177
+ );
178
+
179
+ /**
180
+ * adds or removes the legend button, depending on the number of entries
181
+ * @param {import("vue").Reactive<{string,LegendEntry}>} newEntries
182
+ */
183
+ const handleLegendButton = (newEntries) => {
184
+ if (Object.keys(newEntries).length > 0) {
185
+ if (!app.navbarManager.has('legend')) {
186
+ app.navbarManager.add(
187
+ {
188
+ id: 'legend',
189
+ action: legendAction,
190
+ },
191
+ vcsAppSymbol,
192
+ ButtonLocation.TOOL,
193
+ );
194
+ }
195
+ } else {
196
+ app.navbarManager.remove('legend');
197
+ app.windowManager.remove('legend');
198
+ }
199
+ };
200
+ handleLegendButton(entries);
201
+
202
+ const stopWatching = watch(
203
+ entries,
204
+ handleLegendButton,
205
+ );
206
+
207
+ return () => {
208
+ destroy();
209
+ legendDestroy();
210
+ stopWatching();
211
+ };
212
+ }
213
+
214
+ /**
215
+ * This helper function will add a settings action button to the apps NavbarManager MENU location.
216
+ * @param {VcsUiApp} app
217
+ * @returns {function():void}
218
+ */
219
+ export function setupSettingsWindow(app) {
220
+ const { action: settingsAction, destroy: settingsDestroy } = createToggleAction(
221
+ {
222
+ name: 'settings.title',
223
+ icon: 'mdi-cog',
224
+ title: 'settings.tooltip',
225
+ },
226
+ {
227
+ id: 'settingsId',
228
+ component: VcsSettings,
229
+ state: { headerIcon: 'mdi-cog', headerTitle: 'settings.title' },
230
+ slot: WindowSlot.DYNAMIC_RIGHT,
231
+ },
232
+ app.windowManager,
233
+ vcsAppSymbol,
234
+ );
235
+ app.navbarManager.add(
236
+ {
237
+ id: 'settingsToggle',
238
+ action: settingsAction,
239
+ },
240
+ vcsAppSymbol,
241
+ ButtonLocation.MENU,
242
+ );
243
+ return () => {
244
+ settingsDestroy();
245
+ };
246
+ }
247
+
248
+ /**
249
+ * This helper function will add a Components manager button to the navbar. The Components Manager
250
+ * will only be shown if there is at least one category under management in the categoryManager.
251
+ * @param {VcsUiApp} app
252
+ * @returns {function():void}
253
+ */
254
+ export function setupComponentsWindow(app) {
255
+ const { action: componentsManagerAction, destroy: destroyComponentsManagerAction } = createToggleAction(
256
+ {
257
+ name: 'components-manager',
258
+ icon: '$vcsComponents',
259
+ title: 'components.tooltip',
260
+ },
261
+ {
262
+ id: 'component-manager',
263
+ state: {
264
+ headerTitle: 'components.title',
265
+ headerIcon: '$vcsComponents',
266
+ },
267
+ component: ComponentsManager,
268
+ slot: WindowSlot.STATIC,
269
+ },
270
+ app.windowManager,
271
+ vcsAppSymbol,
272
+ );
273
+
274
+ // only show Components Window if we have at least one managed Category
275
+ if (app.categoryManager.items.value.length > 0) {
276
+ app.navbarManager.add(
277
+ { id: 'component-manager', action: componentsManagerAction },
278
+ vcsAppSymbol,
279
+ ButtonLocation.CONTENT,
280
+ );
281
+ }
282
+ watch(app.categoryManager.items.value, () => {
283
+ if (app.categoryManager.items.value.length > 0) {
284
+ if (!app.navbarManager.has('component-manager')) {
285
+ app.navbarManager.add(
286
+ { id: 'component-manager', action: componentsManagerAction },
287
+ vcsAppSymbol,
288
+ ButtonLocation.CONTENT,
289
+ );
290
+ }
291
+ } else {
292
+ app.windowManager.remove('component-manager');
293
+ app.navbarManager.remove('component-manager');
294
+ }
295
+ });
296
+
297
+ return () => {
298
+ destroyComponentsManagerAction();
299
+ };
300
+ }
301
+
302
+ /**
303
+ * This helper sets up a listener to sync the theming relevant keys from the {@see UiConfigObject}
304
+ * with a given vuetify instance. Use this helper, if you do not use the VcsApp component and wish to evaluate
305
+ * the theming keys. Returns a function to stop syncing.
306
+ * @param {VcsUiApp} app
307
+ * @param {import("vuetify").Framework} vuetify
308
+ * @returns {function():void} - call to stop syncing
309
+ */
310
+ export function setupUiConfigTheming(app, vuetify) {
311
+ const listeners = [
312
+ app.uiConfig.added.addEventListener((item) => {
313
+ if (item.name === 'primaryColor') {
314
+ vuetify.theme.themes.dark.primary = item.value;
315
+ vuetify.theme.themes.light.primary = item.value;
316
+ }
317
+ }),
318
+ app.uiConfig.removed.addEventListener((item) => {
319
+ if (item.name === 'primaryColor') {
320
+ vuetify.theme.themes.dark.primary = defaultPrimaryColor;
321
+ vuetify.theme.themes.light.primary = defaultPrimaryColor;
322
+ }
323
+ }),
324
+ ];
54
325
 
326
+ return () => {
327
+ listeners.forEach((cb) => { cb(); });
328
+ listeners.splice(0);
329
+ };
330
+ }
331
+
332
+ /**
333
+ * The base component to setup the entire application. To embed the VcsApp, use this component.
334
+ * @vue-prop {string} appId - the id of the app to inject. this will setup listeners on the app to call vcsAppMounted on plugins
335
+ * @vue-provide
336
+ */
55
337
  export default {
56
338
  components: {
57
339
  MapNavigation,
@@ -65,137 +347,40 @@
65
347
  type: String,
66
348
  required: true,
67
349
  },
68
- app: {
69
- type: Boolean,
70
- default: true,
71
- },
72
350
  },
73
351
  setup(props) {
74
352
  const id = uuid();
75
353
  const mapId = `mapCollection-${id}`;
354
+ /** @type {VcsUiApp} */
76
355
  const app = getVcsAppById(props.appId);
77
356
  provide('vcsApp', app);
78
357
 
79
- const iconMap = {
80
- OpenlayersMap: '$vcs2d',
81
- CesiumMap: '$vcs3d',
82
- ObliqueMap: '$vcsObliqueView',
83
- };
84
-
85
- const mapButtonActionDestroy = {};
86
-
87
- const setupMap = ({ className, name }) => {
88
- if (mapButtonActionDestroy[name]) {
89
- mapButtonActionDestroy[name]();
90
- }
91
- const { action, destroy } = createMapButtonAction(
92
- {
93
- name,
94
- icon: iconMap[className],
95
- title: `navbar.maps.${className}`,
96
- },
97
- name,
98
- app.maps,
99
- );
100
- app.navbarManager.add(
101
- {
102
- id: `mapButton-${name}`,
103
- action,
104
- },
105
- vcsAppSymbol,
106
- ButtonLocation.MAP,
107
- );
108
- mapButtonActionDestroy[name] = () => {
109
- app.navbarManager.remove(`mapButton-${name}`);
110
- destroy();
111
- };
112
- };
113
-
114
- [...app.maps].forEach(setupMap);
115
- const mapAddedDestroy = app.maps.added.addEventListener(setupMap);
116
-
117
- const mapRemovedDestroy = app.maps.removed.addEventListener(({ name }) => {
118
- if (mapButtonActionDestroy[name]) {
119
- mapButtonActionDestroy[name]();
120
- delete mapButtonActionDestroy[name];
121
- }
122
- });
123
-
124
- const { action: settingsAction, destroy: settingsDestroy } = createToggleAction(
125
- {
126
- name: 'settings.title',
127
- icon: 'mdi-cog',
128
- title: 'settings.tooltip',
129
- },
130
- {
131
- id: 'settingsId',
132
- component: VcsSettings,
133
- state: { headerIcon: 'mdi-cog', headerTitle: 'settings.title' },
134
- slot: WindowSlot.DYNAMIC_RIGHT,
135
- },
136
- app.windowManager,
137
- vcsAppSymbol,
138
- );
139
- app.navbarManager.add(
140
- {
141
- id: 'settingsToggle',
142
- action: settingsAction,
143
- },
144
- vcsAppSymbol,
145
- ButtonLocation.MENU,
146
- );
147
-
148
- let pluginAdded;
149
- const pluginRemoved = app.plugins.removed.addEventListener(async (plugin) => {
150
- app.windowManager.removeOwner(plugin.name);
151
- app.navbarManager.removeOwner(plugin.name);
152
- app.toolboxManager.removeOwner(plugin.name);
153
- });
358
+ const mapNavbarListener = setupMapNavbar(app);
359
+ const legendDestroy = setupLegendWindow(app);
360
+ const settingsDestroy = setupSettingsWindow(app);
361
+ const destroyComponentsWindow = setupComponentsWindow(app);
362
+ const destroyThemingListener = setupUiConfigTheming(app, getCurrentInstance().proxy.$vuetify);
154
363
 
364
+ let pluginMountedListener;
155
365
  onMounted(() => {
156
- pluginAdded = app.plugins.added.addEventListener((plugin) => {
157
- app.windowManager.removeOwner(plugin.name);
158
- app.navbarManager.removeOwner(plugin.name);
159
- app.toolboxManager.removeOwner(plugin.name);
160
- if (plugin.onVcsAppMounted) {
161
- plugin.onVcsAppMounted(app);
162
- }
163
- });
164
- [...app.plugins].forEach((plugin) => {
165
- if (plugin.onVcsAppMounted) {
166
- plugin.onVcsAppMounted(app);
167
- }
168
- });
366
+ pluginMountedListener = setupPluginMountedListeners(app);
169
367
  app.maps.setTarget(mapId);
170
368
  });
171
369
 
172
370
  onUnmounted(() => {
173
- if (mapAddedDestroy) {
174
- mapAddedDestroy();
175
- }
176
- if (mapRemovedDestroy) {
177
- mapRemovedDestroy();
178
- }
179
- if (pluginAdded) {
180
- pluginAdded();
181
- }
182
- if (pluginRemoved) {
183
- pluginRemoved();
184
- }
185
- Object.values(mapButtonActionDestroy).forEach(cb => cb());
186
-
187
- if (settingsDestroy) {
188
- settingsDestroy();
371
+ if (pluginMountedListener) {
372
+ pluginMountedListener();
189
373
  }
374
+ mapNavbarListener();
375
+ legendDestroy();
376
+ settingsDestroy();
377
+ destroyComponentsWindow();
378
+ destroyThemingListener();
190
379
  });
191
380
 
192
381
  return {
193
382
  mapId,
194
- };
195
- },
196
- provide() {
197
- return {
198
- language: window.navigator.language.split('-')[0],
383
+ mobileLogo: computed(() => app.uiConfig.config.value.mobileLogo ?? app.uiConfig.config.value.logo),
199
384
  };
200
385
  },
201
386
  };
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :id="mapId" />
2
+ <div :id="mapId" @click.right.stop="(e) => { e.preventDefault(); }" />
3
3
  </template>
4
4
 
5
5
  <style lang="scss" scoped>
@@ -33,7 +33,7 @@
33
33
  <script>
34
34
  import {
35
35
  ref, inject, onUnmounted, getCurrentInstance, computed,
36
- } from '@vue/composition-api';
36
+ } from 'vue';
37
37
  import VcsLabel from '../components/form-inputs-controls/VcsLabel.vue';
38
38
  import VcsSelect from '../components/form-inputs-controls/VcsSelect.vue';
39
39
 
@@ -11,6 +11,7 @@
11
11
  * This component wraps the {@see VcsApp} component in a
12
12
  * v-app tag to ensure vuetify functionality. If you provide your own vuetify app,
13
13
  * do NOT use this wrapper, but use {@see VcsApp} directly, since you may only use v-app once.
14
+ * @vue-prop {string} appId - the app to wrap. will be passed to the VcsApp component
14
15
  */
15
16
  export default {
16
17
  name: 'VcsAppWrapper',
@@ -0,0 +1,93 @@
1
+ Copyright (c) 2009-2011 by Accademia di Belle Arti di Urbino and students of MA course of Visual design. Some rights reserved.
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -9,6 +9,7 @@
9
9
  <v-checkbox
10
10
  on-icon="$vcsCheckboxChecked"
11
11
  off-icon="$vcsCheckbox"
12
+ class="vcs-checkbox"
12
13
  hide-details
13
14
  indeterminate-icon="$vcsCheckboxIndeterminate"
14
15
  :dense="$attrs.dense!==false"
@@ -28,6 +29,18 @@
28
29
  </VcsTooltip>
29
30
  </template>
30
31
  <style lang="scss" scoped>
32
+ .vcs-checkbox {
33
+ ::v-deep {
34
+ label.v-label,
35
+ .v-icon.v-icon{
36
+ color: inherit;
37
+ }
38
+ .v-input--selection-controls__input {
39
+ margin: 0;
40
+ padding: 0;
41
+ }
42
+ }
43
+ }
31
44
  .v-input--selection-controls {
32
45
  margin: 0;
33
46
  padding: 0;
@@ -28,7 +28,7 @@
28
28
  import {
29
29
  onMounted,
30
30
  onUnmounted,
31
- } from '@vue/composition-api';
31
+ } from 'vue';
32
32
  import { Subject } from 'rxjs';
33
33
  import { debounceTime, takeUntil } from 'rxjs/operators';
34
34