@vcmap/ui 6.1.0-rc.5 → 6.1.0-rc.7

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 (100) hide show
  1. package/config/cluster.config.json +4 -13
  2. package/config/dev.config.json +6 -3
  3. package/config/splashscreen.config.json +6 -10
  4. package/dist/assets/{cesium-c486c93a.js → cesium-6c6aa853.js} +53 -23
  5. package/dist/assets/cesium.js +1 -1
  6. package/dist/assets/{core-69b76061.js → core-52c2ef11.js} +5982 -5411
  7. package/dist/assets/core.js +1 -1
  8. package/dist/assets/{ol-7f119acb.js → ol-b0589b0c.js} +87 -37
  9. package/dist/assets/ol.js +1 -1
  10. package/dist/assets/ui-dccb9009.css +1 -0
  11. package/dist/assets/{ui-fba0f81d.js → ui-dccb9009.js} +16053 -15481
  12. package/dist/assets/ui.js +1 -1
  13. package/dist/assets/vue.js +1 -1
  14. package/dist/assets/{vuetify-2b49bba6.css → vuetify-43a20e18.css} +1 -1
  15. package/dist/assets/{vuetify-2b49bba6.js → vuetify-43a20e18.js} +5004 -4958
  16. package/dist/assets/vuetify.js +1 -1
  17. package/dist/index.html +1 -1
  18. package/index.d.ts +2 -0
  19. package/index.html +1 -1
  20. package/index.js +1 -0
  21. package/package.json +6 -3
  22. package/plugins/@vcmap-show-case/theming-example/src/index.js +1 -0
  23. package/src/application/MapsGroupMobileMenu.vue +105 -0
  24. package/src/application/MapsGroupMobileMenu.vue.d.ts +7 -0
  25. package/src/application/VcsApp.vue +48 -24
  26. package/src/application/VcsApp.vue.d.ts +5 -2
  27. package/src/application/VcsContainer.vue +35 -13
  28. package/src/application/VcsContainer.vue.d.ts +3 -0
  29. package/src/application/VcsMobileMenuList.vue +118 -0
  30. package/src/application/VcsMobileMenuList.vue.d.ts +2 -0
  31. package/src/application/VcsNavbar.vue +12 -3
  32. package/src/application/VcsNavbarMobile.vue +218 -0
  33. package/src/application/VcsNavbarMobile.vue.d.ts +43 -0
  34. package/src/application/VcsSplashScreen.vue +39 -7
  35. package/src/application/VcsSplashScreen.vue.d.ts +6 -0
  36. package/src/application/uiConfigHelper.d.ts +12 -0
  37. package/src/application/uiConfigHelper.js +37 -0
  38. package/src/callback/closeSplashScreenCallback.js +1 -1
  39. package/src/callback/openSplashScreenCallback.js +1 -1
  40. package/src/components/buttons/VcsToolButton.vue +8 -1
  41. package/src/components/buttons/VcsToolButton.vue.d.ts +1 -0
  42. package/src/components/form-output/VcsTemplateMarkdown.vue +43 -0
  43. package/src/components/form-output/VcsTemplateMarkdown.vue.d.ts +9 -0
  44. package/src/components/lists/VcsTreeNode.vue +6 -1
  45. package/src/components/lists/VcsTreeview.vue +36 -2
  46. package/src/components/lists/VcsTreeview.vue.d.ts +1 -0
  47. package/src/components/lists/VcsTreeviewTitle.vue +8 -1
  48. package/src/contentTree/contentTreeCollection.js +1 -0
  49. package/src/contentTree/flightContentTreeItem.d.ts +8 -1
  50. package/src/contentTree/flightContentTreeItem.js +26 -3
  51. package/src/contentTree/groupContentTreeItem.d.ts +16 -0
  52. package/src/contentTree/groupContentTreeItem.js +31 -1
  53. package/src/contentTree/layerContentTreeItem.d.ts +8 -1
  54. package/src/contentTree/layerContentTreeItem.js +25 -3
  55. package/src/contentTree/layerGroupContentTreeItem.d.ts +6 -0
  56. package/src/contentTree/layerGroupContentTreeItem.js +27 -3
  57. package/src/contentTree/obliqueCollectionContentTreeItem.d.ts +6 -0
  58. package/src/contentTree/obliqueCollectionContentTreeItem.js +22 -2
  59. package/src/featureInfo/BalloonComponent.vue +6 -6
  60. package/src/featureInfo/MarkdownBalloonComponent.vue +3 -9
  61. package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +1 -11
  62. package/src/featureInfo/balloonHelper.js +1 -1
  63. package/src/featureInfo/featureInfo.js +2 -3
  64. package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +0 -6
  65. package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -14
  66. package/src/featureInfo/markdownFeatureInfoView.d.ts +2 -8
  67. package/src/featureInfo/markdownFeatureInfoView.js +6 -15
  68. package/src/i18n/de.d.ts +58 -50
  69. package/src/i18n/de.js +5 -0
  70. package/src/i18n/en.d.ts +58 -50
  71. package/src/i18n/en.js +5 -0
  72. package/src/legend/VcsLegend.vue +21 -2
  73. package/src/legend/VcsLegend.vue.d.ts +1 -0
  74. package/src/legend/legendHelper.d.ts +0 -13
  75. package/src/legend/legendHelper.js +3 -27
  76. package/src/manager/navbarManager.d.ts +14 -1
  77. package/src/manager/navbarManager.js +22 -2
  78. package/src/manager/toolbox/GroupToolboxComponent.vue +16 -3
  79. package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
  80. package/src/manager/toolbox/SelectToolboxComponent.vue +15 -3
  81. package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
  82. package/src/manager/toolbox/ToolboxManagerComponent.vue +44 -14
  83. package/src/manager/toolbox/ToolboxManagerComponent.vue.d.ts +9 -0
  84. package/src/manager/toolbox/toolboxManager.d.ts +2 -1
  85. package/src/manager/toolbox/toolboxManager.js +13 -1
  86. package/src/manager/window/WindowComponent.vue +3 -2
  87. package/src/manager/window/WindowComponentHeader.vue +9 -1
  88. package/src/manager/window/WindowComponentHeader.vue.d.ts +1 -0
  89. package/src/manager/window/WindowManager.vue +175 -30
  90. package/src/manager/window/WindowManager.vue.d.ts +5 -0
  91. package/src/navigation/MapNavigation.vue +27 -19
  92. package/src/navigation/MapNavigation.vue.d.ts +1 -0
  93. package/src/search/ResultsComponent.vue +44 -17
  94. package/src/search/ResultsComponent.vue.d.ts +11 -1
  95. package/src/search/SearchComponent.vue +60 -9
  96. package/src/search/SearchComponent.vue.d.ts +2 -0
  97. package/src/vuePlugins/vuetify.d.ts +4 -0
  98. package/src/vuePlugins/vuetify.js +49 -3
  99. package/dist/assets/ui-fba0f81d.css +0 -1
  100. /package/dist/assets/{vue-ef2b3f82.js → vue-f7a0b088.js} +0 -0
@@ -30,11 +30,18 @@
30
30
  .cursor-pointer {
31
31
  cursor: pointer;
32
32
  }
33
+ .disabled {
34
+ cursor: default;
35
+ opacity: var(--v-disabled-opacity);
36
+ }
33
37
  </style>
34
38
  <template>
35
39
  <div
36
40
  class="title-parent pr-2 vcs-treeview-title w-100"
37
- :class="{ 'cursor-pointer': cursorPointer }"
41
+ :class="{
42
+ 'cursor-pointer': cursorPointer && !item.disabled,
43
+ disabled: item.disabled,
44
+ }"
38
45
  ref="titleParent"
39
46
  >
40
47
  <span class="w-100">
@@ -212,6 +212,7 @@ class ContentTreeCollection extends IndexedCollection {
212
212
  { id, action, weight: subTreeViewItem[subTreeItemWeight] },
213
213
  vcsAppSymbol,
214
214
  ButtonLocation.CONTENT,
215
+ { mobile: true, desktop: true, tablet: true },
215
216
  );
216
217
  return () => {
217
218
  app.windowManager.remove(id);
@@ -1,9 +1,11 @@
1
1
  export default FlightContentTreeItem;
2
2
  export type FlightContentTreeItemOptions = import("./contentTreeItem.js").ContentTreeItemOptions & {
3
3
  flightName: string;
4
+ showWhenNotSupported?: boolean;
4
5
  };
5
6
  /**
6
- * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { flightName: string }} FlightContentTreeItemOptions
7
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { flightName: string, showWhenNotSupported?: boolean }} FlightContentTreeItemOptions
8
+ * @property {boolean} [showWhenNotSupported=false] - optional flag to show the item even if it is not supported by the activeMap.
7
9
  */
8
10
  /**
9
11
  * A flight item. Allows for playing a flight from the content tree.
@@ -23,6 +25,11 @@ declare class FlightContentTreeItem extends VcsObjectContentTreeItem<any> {
23
25
  * @private
24
26
  */
25
27
  private _flightName;
28
+ /**
29
+ * @type {boolean}
30
+ * @private
31
+ */
32
+ private _showWhenNotSupported;
26
33
  /**
27
34
  * @type {Array<Function>}
28
35
  * @private
@@ -1,11 +1,13 @@
1
1
  import { CesiumMap } from '@vcmap/core';
2
+ import { parseBoolean } from '@vcsuite/parsers';
2
3
  import { reactive } from 'vue';
3
4
  import VcsObjectContentTreeItem from './vcsObjectContentTreeItem.js';
4
5
  import { contentTreeClassRegistry } from './contentTreeItem.js';
5
6
  import { executeCallbacks } from '../callback/vcsCallback.js';
6
7
 
7
8
  /**
8
- * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { flightName: string }} FlightContentTreeItemOptions
9
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { flightName: string, showWhenNotSupported?: boolean }} FlightContentTreeItemOptions
10
+ * @property {boolean} [showWhenNotSupported=false] - optional flag to show the item even if it is not supported by the activeMap.
9
11
  */
10
12
 
11
13
  /**
@@ -36,6 +38,15 @@ class FlightContentTreeItem extends VcsObjectContentTreeItem {
36
38
  */
37
39
  this._flightName = options.flightName;
38
40
 
41
+ /**
42
+ * @type {boolean}
43
+ * @private
44
+ */
45
+ this._showWhenNotSupported = parseBoolean(
46
+ options.showWhenNotSupported,
47
+ false,
48
+ );
49
+
39
50
  /**
40
51
  * @type {Array<Function>}
41
52
  * @private
@@ -161,7 +172,12 @@ class FlightContentTreeItem extends VcsObjectContentTreeItem {
161
172
  this._app.flights.added.addEventListener(resetHandler),
162
173
  );
163
174
  } else {
164
- this.visible = this._app.maps.activeMap instanceof CesiumMap;
175
+ let isCesium = this._app.maps.activeMap instanceof CesiumMap;
176
+ this.visible = isCesium || this._showWhenNotSupported;
177
+
178
+ if (this._showWhenNotSupported) {
179
+ this.disabled = !isCesium;
180
+ }
165
181
  this._setupPlayer();
166
182
  this.setPropertiesFromObject(this._flight);
167
183
 
@@ -174,7 +190,11 @@ class FlightContentTreeItem extends VcsObjectContentTreeItem {
174
190
 
175
191
  this._listeners.push(
176
192
  this._app.maps.mapActivated.addEventListener(() => {
177
- this.visible = this._app.maps.activeMap instanceof CesiumMap;
193
+ isCesium = this._app.maps.activeMap instanceof CesiumMap;
194
+ this.visible = isCesium || this._showWhenNotSupported;
195
+ if (this._showWhenNotSupported) {
196
+ this.disabled = !isCesium;
197
+ }
178
198
  }),
179
199
  );
180
200
  }
@@ -186,6 +206,9 @@ class FlightContentTreeItem extends VcsObjectContentTreeItem {
186
206
  toJSON() {
187
207
  const config = super.toJSON();
188
208
  config.flightName = this._flightName;
209
+ if (this._showWhenNotSupported) {
210
+ config.showWhenNotSupported = this._showWhenNotSupported;
211
+ }
189
212
  return config;
190
213
  }
191
214
 
@@ -1,14 +1,30 @@
1
1
  export default GroupContentTreeItem;
2
+ export type GroupContentTreeItemOptions = import("./contentTreeItem.js").ContentTreeItemOptions & {
3
+ disableIfChildrenDisabled?: boolean;
4
+ };
5
+ /**
6
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { disableIfChildrenDisabled?: boolean }} GroupContentTreeItemOptions
7
+ * @property {boolean} [disableIfChildrenDisabled=false] - optional flag to disable the contentTreeItem if all children are disabled.
8
+ */
2
9
  /**
3
10
  * A clickable group item. When clicked, every child with a state not NONE will also be clicked.
4
11
  * @class
5
12
  * @extends {ContentTreeItem}
6
13
  */
7
14
  declare class GroupContentTreeItem extends ContentTreeItem {
15
+ /**
16
+ * @type {boolean}
17
+ * @private
18
+ */
19
+ private _disableIfChildrenDisabled;
8
20
  /**
9
21
  * @type {function():void}
10
22
  * @private
11
23
  */
12
24
  private _childWatcher;
25
+ /**
26
+ * @returns {GroupContentTreeItemOptions}
27
+ */
28
+ toJSON(): GroupContentTreeItemOptions;
13
29
  }
14
30
  import ContentTreeItem from './contentTreeItem.js';
@@ -1,9 +1,15 @@
1
1
  import { watch } from 'vue';
2
+ import { parseBoolean } from '@vcsuite/parsers';
2
3
  import ContentTreeItem, {
3
4
  contentTreeClassRegistry,
4
5
  } from './contentTreeItem.js';
5
6
  import { StateActionState } from '../actions/stateRefAction.js';
6
7
 
8
+ /**
9
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { disableIfChildrenDisabled?: boolean }} GroupContentTreeItemOptions
10
+ * @property {boolean} [disableIfChildrenDisabled=false] - optional flag to disable the contentTreeItem if all children are disabled.
11
+ */
12
+
7
13
  /**
8
14
  * A clickable group item. When clicked, every child with a state not NONE will also be clicked.
9
15
  * @class
@@ -24,6 +30,15 @@ class GroupContentTreeItem extends ContentTreeItem {
24
30
  constructor(options, app) {
25
31
  super(options, app);
26
32
 
33
+ /**
34
+ * @type {boolean}
35
+ * @private
36
+ */
37
+ this._disableIfChildrenDisabled = parseBoolean(
38
+ options.disableIfChildrenDisabled,
39
+ false,
40
+ );
41
+
27
42
  /**
28
43
  * @type {function():void}
29
44
  * @private
@@ -33,6 +48,10 @@ class GroupContentTreeItem extends ContentTreeItem {
33
48
  () => {
34
49
  const children = this._children.value;
35
50
  this.visible = children.some((c) => c.visible);
51
+
52
+ if (this._disableIfChildrenDisabled) {
53
+ this.disabled = children.every((c) => c.disabled);
54
+ }
36
55
  if (
37
56
  children.every((c) => c.state === StateActionState.NONE || !c.visible)
38
57
  ) {
@@ -74,11 +93,22 @@ class GroupContentTreeItem extends ContentTreeItem {
74
93
  state !== StateActionState.ACTIVE;
75
94
 
76
95
  const promises = this._children.value
77
- .filter((c) => c.visible && statePredicate(c.state))
96
+ .filter((c) => c.visible && !c.disabled && statePredicate(c.state))
78
97
  .map((c) => c.clicked());
79
98
  await Promise.all(promises);
80
99
  }
81
100
 
101
+ /**
102
+ * @returns {GroupContentTreeItemOptions}
103
+ */
104
+ toJSON() {
105
+ const config = super.toJSON();
106
+ if (this._disableIfChildrenDisabled) {
107
+ config.disableIfChildrenDisabled = this._disableIfChildrenDisabled;
108
+ }
109
+ return config;
110
+ }
111
+
82
112
  destroy() {
83
113
  this._childWatcher();
84
114
  super.destroy();
@@ -1,5 +1,6 @@
1
1
  /**
2
- * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { layerName: string }} LayerContentTreeItemOptions
2
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { layerName: string, showWhenNotSupported?: boolean }} LayerContentTreeItemOptions
3
+ * @property {boolean} [showWhenNotSupported=false] - optional flag to show the item even if it is not supported by the activeMap.
3
4
  */
4
5
  /**
5
6
  * @typedef {import("./vcsObjectContentTreeItem.js").VcsObjectContentTreeItemProperties & { availableStyles?: string[], defaultViewpoint?: string }} LayerContentTreeItemProperties
@@ -27,6 +28,7 @@ export function getStateFromLayer(layer: import("@vcmap/core").Layer): StateActi
27
28
  export default LayerContentTreeItem;
28
29
  export type LayerContentTreeItemOptions = import("./contentTreeItem.js").ContentTreeItemOptions & {
29
30
  layerName: string;
31
+ showWhenNotSupported?: boolean;
30
32
  };
31
33
  export type LayerContentTreeItemProperties = import("./vcsObjectContentTreeItem.js").VcsObjectContentTreeItemProperties & {
32
34
  availableStyles?: string[];
@@ -49,6 +51,11 @@ declare class LayerContentTreeItem extends VcsObjectContentTreeItem<LayerContent
49
51
  * @private
50
52
  */
51
53
  private _layerName;
54
+ /**
55
+ * @type {boolean}
56
+ * @private
57
+ */
58
+ private _showWhenNotSupported;
52
59
  /**
53
60
  * @type {Array<Function>}
54
61
  * @private
@@ -1,4 +1,5 @@
1
1
  import { Viewpoint } from '@vcmap/core';
2
+ import { parseBoolean } from '@vcsuite/parsers';
2
3
  import { reactive } from 'vue';
3
4
  import { StateActionState } from '../actions/stateRefAction.js';
4
5
  import {
@@ -12,7 +13,8 @@ import { contentTreeClassRegistry } from './contentTreeItem.js';
12
13
  import { executeCallbacks } from '../callback/vcsCallback.js';
13
14
 
14
15
  /**
15
- * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { layerName: string }} LayerContentTreeItemOptions
16
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { layerName: string, showWhenNotSupported?: boolean }} LayerContentTreeItemOptions
17
+ * @property {boolean} [showWhenNotSupported=false] - optional flag to show the item even if it is not supported by the activeMap.
16
18
  */
17
19
 
18
20
  /**
@@ -125,6 +127,15 @@ class LayerContentTreeItem extends VcsObjectContentTreeItem {
125
127
  */
126
128
  this._layerName = options.layerName;
127
129
 
130
+ /**
131
+ * @type {boolean}
132
+ * @private
133
+ */
134
+ this._showWhenNotSupported = parseBoolean(
135
+ options.showWhenNotSupported,
136
+ false,
137
+ );
138
+
128
139
  /**
129
140
  * @type {Array<Function>}
130
141
  * @private
@@ -215,7 +226,11 @@ class LayerContentTreeItem extends VcsObjectContentTreeItem {
215
226
  this._app.layers.added.addEventListener(resetHandler),
216
227
  );
217
228
  } else {
218
- this.visible = this._layer.isSupported(this._app.maps.activeMap);
229
+ let isSupported = this._layer.isSupported(this._app.maps.activeMap);
230
+ this.visible = isSupported || this._showWhenNotSupported;
231
+ if (this._showWhenNotSupported) {
232
+ this.disabled = !isSupported;
233
+ }
219
234
  this.state = getStateFromLayer(this._layer);
220
235
  this._setLayerExtentAction();
221
236
  this.setPropertiesFromObject(this._layer);
@@ -235,7 +250,11 @@ class LayerContentTreeItem extends VcsObjectContentTreeItem {
235
250
 
236
251
  this._listeners.push(
237
252
  this._app.maps.mapActivated.addEventListener(() => {
238
- this.visible = this._layer.isSupported(this._app.maps.activeMap);
253
+ isSupported = this._layer.isSupported(this._app.maps.activeMap);
254
+ this.visible = isSupported || this._showWhenNotSupported;
255
+ if (this._showWhenNotSupported) {
256
+ this.disabled = !isSupported;
257
+ }
239
258
  }),
240
259
  );
241
260
  }
@@ -260,6 +279,9 @@ class LayerContentTreeItem extends VcsObjectContentTreeItem {
260
279
  toJSON() {
261
280
  const config = super.toJSON();
262
281
  config.layerName = this._layerName;
282
+ if (this._showWhenNotSupported) {
283
+ config.showWhenNotSupported = this._showWhenNotSupported;
284
+ }
263
285
  return config;
264
286
  }
265
287
 
@@ -1,6 +1,7 @@
1
1
  export default LayerGroupContentTreeItem;
2
2
  export type LayerGroupContentTreeItemOptions = import("./contentTreeItem.js").ContentTreeItemOptions & {
3
3
  layerNames: string[];
4
+ showWhenNotSupported?: boolean;
4
5
  defaultViewpoint?: string;
5
6
  availableStyles?: string[];
6
7
  };
@@ -20,6 +21,11 @@ declare class LayerGroupContentTreeItem extends ContentTreeItem {
20
21
  * @private
21
22
  */
22
23
  private _layerNames;
24
+ /**
25
+ * @type {boolean}
26
+ * @private
27
+ */
28
+ private _showWhenNotSupported;
23
29
  /**
24
30
  * @type {Array<function():void>}
25
31
  * @private
@@ -1,3 +1,4 @@
1
+ import { parseBoolean } from '@vcsuite/parsers';
1
2
  import ContentTreeItem, {
2
3
  contentTreeClassRegistry,
3
4
  } from './contentTreeItem.js';
@@ -10,8 +11,9 @@ import { StateActionState } from '../actions/stateRefAction.js';
10
11
  import { executeCallbacks } from '../callback/vcsCallback.js';
11
12
 
12
13
  /**
13
- * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { layerNames: string[], defaultViewpoint?: string, availableStyles?: string[] }} LayerGroupContentTreeItemOptions
14
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { layerNames: string[], showWhenNotSupported?: boolean, defaultViewpoint?: string, availableStyles?: string[] }} LayerGroupContentTreeItemOptions
14
15
  * @property {Array<string>} layerNames list of LayerNames which should be activated on click
16
+ * @property {boolean} [showWhenNotSupported=false] - optional flag to show the item even if it is not supported by the activeMap.
15
17
  * @property {string} [defaultViewpoint] - the name of an optional default viewpoint
16
18
  */
17
19
 
@@ -63,6 +65,15 @@ class LayerGroupContentTreeItem extends ContentTreeItem {
63
65
  ? options.layerNames.slice()
64
66
  : [];
65
67
 
68
+ /**
69
+ * @type {boolean}
70
+ * @private
71
+ */
72
+ this._showWhenNotSupported = parseBoolean(
73
+ options.showWhenNotSupported,
74
+ false,
75
+ );
76
+
66
77
  /**
67
78
  * @type {Array<function():void>}
68
79
  * @private
@@ -121,8 +132,14 @@ class LayerGroupContentTreeItem extends ContentTreeItem {
121
132
  }
122
133
  };
123
134
  const layers = this._layers;
135
+ let isSupported = layers.some((l) =>
136
+ l.isSupported(this._app.maps.activeMap),
137
+ );
124
138
 
125
- this.visible = layers.some((l) => l.isSupported(this._app.maps.activeMap));
139
+ this.visible = isSupported || this._showWhenNotSupported;
140
+ if (this._showWhenNotSupported) {
141
+ this.disabled = !isSupported;
142
+ }
126
143
  this.state = getStateFromLayers(layers);
127
144
  setViewpointAction(this, this._app, this._defaultViewpoint);
128
145
  setStyleAction(
@@ -148,9 +165,13 @@ class LayerGroupContentTreeItem extends ContentTreeItem {
148
165
 
149
166
  this._listeners.push(
150
167
  this._app.maps.mapActivated.addEventListener(() => {
151
- this.visible = !!layers.find((l) =>
168
+ isSupported = layers.some((l) =>
152
169
  l.isSupported(this._app.maps.activeMap),
153
170
  );
171
+ this.visible = isSupported || this._showWhenNotSupported;
172
+ if (this._showWhenNotSupported) {
173
+ this.disabled = !isSupported;
174
+ }
154
175
  }),
155
176
  );
156
177
  }
@@ -179,6 +200,9 @@ class LayerGroupContentTreeItem extends ContentTreeItem {
179
200
  toJSON() {
180
201
  const config = super.toJSON();
181
202
  config.layerNames = this._layerNames.slice();
203
+ if (this._showWhenNotSupported) {
204
+ config.showWhenNotSupported = this._showWhenNotSupported;
205
+ }
182
206
  if (this._defaultViewpoint) {
183
207
  config.defaultViewpoint = this._defaultViewpoint;
184
208
  }
@@ -1,6 +1,7 @@
1
1
  export default ObliqueCollectionContentTreeItem;
2
2
  export type ObliqueCollectionContentTreeItemOptions = import("./contentTreeItem.js").ContentTreeItemOptions & {
3
3
  collectionName: string;
4
+ showWhenNotSupported?: boolean;
4
5
  };
5
6
  export type ObliqueCollectionContentTreeItemProperties = import("./vcsObjectContentTreeItem.js").VcsObjectContentTreeItemProperties & {
6
7
  defaultViewpoint: string;
@@ -20,6 +21,11 @@ declare class ObliqueCollectionContentTreeItem extends VcsObjectContentTreeItem<
20
21
  * @private
21
22
  */
22
23
  private _collectionName;
24
+ /**
25
+ * @type {boolean}
26
+ * @private
27
+ */
28
+ private _showWhenNotSupported;
23
29
  /**
24
30
  * @type {Array<function():void>}
25
31
  * @private
@@ -1,4 +1,5 @@
1
1
  import { ObliqueMap, DefaultObliqueCollection } from '@vcmap/core';
2
+ import { parseBoolean } from '@vcsuite/parsers';
2
3
  import VcsObjectContentTreeItem from './vcsObjectContentTreeItem.js';
3
4
  import { setViewpointAction } from './layerContentTreeItem.js';
4
5
  import { StateActionState } from '../actions/stateRefAction.js';
@@ -6,7 +7,8 @@ import { contentTreeClassRegistry } from './contentTreeItem.js';
6
7
  import { executeCallbacks } from '../callback/vcsCallback.js';
7
8
 
8
9
  /**
9
- * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { collectionName: string }} ObliqueCollectionContentTreeItemOptions
10
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions & { collectionName: string, showWhenNotSupported?: boolean }} ObliqueCollectionContentTreeItemOptions
11
+ * @property {boolean} [showWhenNotSupported=false] - optional flag to show the item even if it is not supported by the activeMap.
10
12
  */
11
13
 
12
14
  /**
@@ -43,6 +45,15 @@ class ObliqueCollectionContentTreeItem extends VcsObjectContentTreeItem {
43
45
  */
44
46
  this._collectionName = options.collectionName;
45
47
 
48
+ /**
49
+ * @type {boolean}
50
+ * @private
51
+ */
52
+ this._showWhenNotSupported = parseBoolean(
53
+ options.showWhenNotSupported,
54
+ false,
55
+ );
56
+
46
57
  /**
47
58
  * @type {Array<function():void>}
48
59
  * @private
@@ -105,6 +116,9 @@ class ObliqueCollectionContentTreeItem extends VcsObjectContentTreeItem {
105
116
  const map = this._app.maps.activeMap;
106
117
  if (map instanceof ObliqueMap) {
107
118
  this.visible = true;
119
+ if (this._showWhenNotSupported) {
120
+ this.disabled = false;
121
+ }
108
122
  this.state =
109
123
  map.collection === this._collection
110
124
  ? StateActionState.ACTIVE
@@ -118,7 +132,10 @@ class ObliqueCollectionContentTreeItem extends VcsObjectContentTreeItem {
118
132
  }),
119
133
  );
120
134
  } else {
121
- this.visible = false;
135
+ this.visible = this._showWhenNotSupported;
136
+ if (this._showWhenNotSupported) {
137
+ this.disabled = this._showWhenNotSupported;
138
+ }
122
139
  }
123
140
 
124
141
  this.setPropertiesFromObject(this._collection);
@@ -171,6 +188,9 @@ class ObliqueCollectionContentTreeItem extends VcsObjectContentTreeItem {
171
188
  toJSON() {
172
189
  const config = super.toJSON();
173
190
  config.collectionName = this._collectionName;
191
+ if (this._showWhenNotSupported) {
192
+ config.showWhenNotSupported = this._showWhenNotSupported;
193
+ }
174
194
  return config;
175
195
  }
176
196
 
@@ -177,13 +177,13 @@
177
177
  </script>
178
178
 
179
179
  <style lang="scss">
180
- .balloon {
180
+ :not(.mobile) > .balloon {
181
181
  z-index: 0 !important;
182
182
  }
183
- .balloon hr:first-child {
183
+ :not(.mobile) > .balloon hr:first-child {
184
184
  display: none;
185
185
  }
186
- .balloon:after {
186
+ :not(.mobile) > .balloon:after {
187
187
  content: '';
188
188
  position: absolute;
189
189
  bottom: -12px;
@@ -194,11 +194,11 @@
194
194
  width: 0;
195
195
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.3));
196
196
  }
197
- .balloon:after {
197
+ :not(.mobile) > .balloon:after {
198
198
  border-color: rgb(var(--v-theme-surface-light)) transparent;
199
199
  }
200
- .balloon .v-list-item .v-list-item__title,
201
- .balloon .v-list-item .v-list-item__subtitle {
200
+ :not(.mobile) > .balloon .v-list-item .v-list-item__title,
201
+ :not(.mobile) > .balloon .v-list-item .v-list-item__subtitle {
202
202
  line-height: 18px;
203
203
  }
204
204
  </style>
@@ -1,25 +1,19 @@
1
1
  <template>
2
2
  <BalloonComponent v-bind="{ ...$attrs }" class="markdown-balloon-component">
3
- <VcsMarkdown :content="content" />
3
+ <vcs-template-markdown v-bind="{ ...$attrs }" />
4
4
  </BalloonComponent>
5
5
  </template>
6
6
  <script>
7
7
  import BalloonComponent from './BalloonComponent.vue';
8
- import VcsMarkdown from '../components/form-output/VcsMarkdown.vue';
8
+ import VcsTemplateMarkdown from '../components/form-output/VcsTemplateMarkdown.vue';
9
9
 
10
10
  /**
11
11
  * @description A balloon showing markdown content
12
12
  */
13
13
  export default {
14
14
  name: 'MarkdownBalloonComponent',
15
- props: {
16
- content: {
17
- type: String,
18
- required: true,
19
- },
20
- },
21
15
  components: {
22
- VcsMarkdown,
16
+ VcsTemplateMarkdown,
23
17
  BalloonComponent,
24
18
  },
25
19
  };
@@ -1,12 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- content: {
3
- type: StringConstructor;
4
- required: true;
5
- };
6
- }, any, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
- content: {
8
- type: StringConstructor;
9
- required: true;
10
- };
11
- }>>, {}, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
12
2
  export default _default;
@@ -75,7 +75,7 @@ export async function getBalloonPosition(app, position) {
75
75
  * @param {HTMLElement} target - the map's target { @link @import("@vcmap/core").MapCollection }
76
76
  */
77
77
  export function setBalloonPosition(windowManager, id, windowPosition, target) {
78
- if (!windowPosition) {
78
+ if (!windowPosition || !windowManager.has(id)) {
79
79
  return;
80
80
  }
81
81
 
@@ -224,6 +224,7 @@ function setupFeatureInfoTool(app) {
224
224
  action,
225
225
  },
226
226
  vcsAppSymbol,
227
+ { desktop: true, tablet: true, mobile: true },
227
228
  );
228
229
  }
229
230
  }
@@ -662,9 +663,7 @@ class FeatureInfo extends Collection {
662
663
  clusterGroup.vectorProperties.getValuesForFeatures([feature]),
663
664
  [feature],
664
665
  );
665
- const clusterStyle = clusterGroup.style.createStyleFunction((layerName) =>
666
- this._app.layers.getByKey(layerName),
667
- )(clusterFeature, 1);
666
+ const clusterStyle = clusterGroup.styleFunction(clusterFeature, 1);
668
667
  const highlightStyle = getClusterHighlightStyle(
669
668
  clusterFeature,
670
669
  clusterGroup,
@@ -26,12 +26,6 @@ declare class MarkdownBalloonFeatureInfoView extends BalloonFeatureInfoView {
26
26
  * @type {string | string[]}
27
27
  */
28
28
  template: string | string[];
29
- /**
30
- * @param {Record<string, unknown>} attributes
31
- * @protected
32
- * @returns {string}
33
- */
34
- protected _renderTemplate(attributes: Record<string, unknown>): string;
35
29
  /**
36
30
  * Supports markdown templates (e.g. {{someProperty}}) and style expressions to derive markdown rendering
37
31
  * @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
@@ -1,5 +1,3 @@
1
- import { renderTemplate } from '@vcmap/core';
2
- import { parseAndSanitizeMarkdown } from '../components/form-output/markdownHelper.js';
3
1
  import BalloonFeatureInfoView from './balloonFeatureInfoView.js';
4
2
  import MarkdownBalloonComponent from './MarkdownBalloonComponent.vue';
5
3
 
@@ -39,15 +37,6 @@ class MarkdownBalloonFeatureInfoView extends BalloonFeatureInfoView {
39
37
  : options.template;
40
38
  }
41
39
 
42
- /**
43
- * @param {Record<string, unknown>} attributes
44
- * @protected
45
- * @returns {string}
46
- */
47
- _renderTemplate(attributes) {
48
- return renderTemplate(this.template, attributes);
49
- }
50
-
51
40
  /**
52
41
  * Supports markdown templates (e.g. {{someProperty}}) and style expressions to derive markdown rendering
53
42
  * @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
@@ -58,9 +47,11 @@ class MarkdownBalloonFeatureInfoView extends BalloonFeatureInfoView {
58
47
  const properties = super.getProperties(featureInfo, layer);
59
48
  return {
60
49
  ...properties,
61
- content: parseAndSanitizeMarkdown(
62
- this._renderTemplate({ ...properties, ...properties.attributes }),
63
- ),
50
+ template: this.template,
51
+ context: {
52
+ ...properties,
53
+ ...properties.attributes,
54
+ },
64
55
  };
65
56
  }
66
57