@vcmap/ui 6.1.0-rc.7 → 6.1.0

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 (94) hide show
  1. package/config/base.config.json +7 -3
  2. package/config/cluster.config.json +1 -1
  3. package/config/dev.config.json +172 -56
  4. package/config/projects.config.json +2 -1
  5. package/config/vectorTile.config.json +42 -1
  6. package/dist/assets/cesium.js +1 -1
  7. package/dist/assets/{core-52c2ef11.js → core-841b71a4.js} +7544 -5485
  8. package/dist/assets/core.js +1 -1
  9. package/dist/assets/ol.js +1 -1
  10. package/dist/assets/{ui-dccb9009.css → ui-2fd6f47d.css} +1 -1
  11. package/dist/assets/{ui-dccb9009.js → ui-2fd6f47d.js} +21402 -20661
  12. package/dist/assets/ui.js +1 -1
  13. package/dist/assets/vue.js +1 -1
  14. package/dist/assets/{vuetify-43a20e18.css → vuetify-4bc77ff7.css} +2 -2
  15. package/dist/assets/{vuetify-43a20e18.js → vuetify-4bc77ff7.js} +6694 -6593
  16. package/dist/assets/vuetify.js +1 -1
  17. package/index.d.ts +13 -5
  18. package/index.js +13 -5
  19. package/package.json +9 -8
  20. package/plugins/@vcmap-show-case/vector-properties-example/src/LayerSettings.vue +39 -0
  21. package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +3 -0
  22. package/plugins/@vcmap-show-case/vector-properties-example/src/lib.js +13 -0
  23. package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +9 -0
  24. package/plugins/package.json +7 -5
  25. package/src/actions/actionHelper.d.ts +6 -0
  26. package/src/actions/actionHelper.js +22 -0
  27. package/src/actions/deepPickingAction.d.ts +23 -0
  28. package/src/actions/deepPickingAction.js +399 -0
  29. package/src/application/VcsApp.vue +3 -0
  30. package/src/application/VcsApp.vue.d.ts +4 -0
  31. package/src/application/VcsAttributionsFooter.vue +1 -0
  32. package/src/application/VcsContainer.vue +1 -0
  33. package/src/application/VcsContainer.vue.d.ts +4 -0
  34. package/src/application/VcsMobileMenuList.vue +34 -41
  35. package/src/application/VcsNavbar.vue +3 -0
  36. package/src/application/VcsNavbarMobile.vue +6 -18
  37. package/src/application/VcsNavbarMobile.vue.d.ts +0 -1
  38. package/src/application/VcsPositionDisplay.vue +1 -0
  39. package/src/components/buttons/VcsActionButtonList.vue +1 -0
  40. package/src/components/form-inputs-controls/VcsSelect.vue +8 -6
  41. package/src/components/icons/+all.d.ts +5 -0
  42. package/src/components/icons/+all.js +14 -0
  43. package/src/components/lists/VcsActionList.vue +1 -0
  44. package/src/components/lists/VcsGroupedList.vue +2 -1
  45. package/src/components/lists/VcsListItemComponent.vue +1 -0
  46. package/src/components/lists/VcsTreeNode.vue +5 -1
  47. package/src/components/lists/VcsTreeview.vue +4 -1
  48. package/src/components/style/{MenuWrapper.vue → StyleMenuWrapper.vue} +2 -1
  49. package/src/components/style/VcsFillMenu.vue +4 -4
  50. package/src/components/style/VcsImageMenu.vue +4 -4
  51. package/src/components/style/VcsStrokeMenu.vue +4 -4
  52. package/src/components/style/VcsTextMenu.vue +4 -4
  53. package/src/contentTree/LayerTree.vue +8 -46
  54. package/src/contentTree/LayerTree.vue.d.ts +1 -3
  55. package/src/contentTree/contentTreeCollection.d.ts +7 -0
  56. package/src/contentTree/contentTreeCollection.js +30 -10
  57. package/src/contentTree/contentTreeItem.d.ts +4 -4
  58. package/src/contentTree/contentTreeItem.js +2 -2
  59. package/src/contentTree/groupContentTreeItem.d.ts +5 -0
  60. package/src/contentTree/groupContentTreeItem.js +1 -1
  61. package/src/contentTree/layerContentTreeItem.js +1 -1
  62. package/src/contentTree/nodeContentTreeItem.d.ts +21 -0
  63. package/src/contentTree/nodeContentTreeItem.js +31 -2
  64. package/src/contentTree/wmsChildContentTreeItem.d.ts +56 -0
  65. package/src/contentTree/wmsChildContentTreeItem.js +159 -0
  66. package/src/contentTree/wmsGroupContentTreeItem.d.ts +171 -0
  67. package/src/contentTree/wmsGroupContentTreeItem.js +619 -0
  68. package/src/featureInfo/ClusterFeatureComponent.vue +47 -11
  69. package/src/featureInfo/ClusterFeatureComponent.vue.d.ts +1 -0
  70. package/src/featureInfo/balloonFeatureInfoView.d.ts +3 -0
  71. package/src/featureInfo/balloonFeatureInfoView.js +78 -11
  72. package/src/featureInfo/balloonHelper.js +8 -12
  73. package/src/featureInfo/featureInfo.d.ts +32 -7
  74. package/src/featureInfo/featureInfo.js +190 -90
  75. package/src/i18n/de.d.ts +22 -16
  76. package/src/i18n/de.js +4 -0
  77. package/src/i18n/en.d.ts +22 -16
  78. package/src/i18n/en.js +4 -0
  79. package/src/manager/toolbox/GroupToolboxComponent.vue +1 -0
  80. package/src/manager/toolbox/SelectToolboxComponent.vue +2 -0
  81. package/src/manager/toolbox/ToolboxManagerComponent.vue +1 -0
  82. package/src/manager/window/windowManager.d.ts +2 -2
  83. package/src/manager/window/windowManager.js +12 -10
  84. package/src/navigation/MapNavigation.vue +3 -1
  85. package/src/notifier/NotifierComponent.vue +1 -0
  86. package/src/search/search.js +3 -16
  87. package/src/state.d.ts +2 -1
  88. package/src/state.js +2 -1
  89. package/src/uiConfig.d.ts +9 -0
  90. package/src/uiConfig.js +1 -0
  91. /package/dist/assets/{cesium-6c6aa853.js → cesium-664ad022.js} +0 -0
  92. /package/dist/assets/{ol-b0589b0c.js → ol-2e095c08.js} +0 -0
  93. /package/dist/assets/{vue-f7a0b088.js → vue-71fd14e8.js} +0 -0
  94. /package/src/components/style/{MenuWrapper.vue.d.ts → StyleMenuWrapper.vue.d.ts} +0 -0
@@ -0,0 +1,56 @@
1
+ export default WmsChildContentTreeItem;
2
+ export type WMSChildItemOptions = import("./contentTreeItem.js").ContentTreeItemOptions & {
3
+ wmsEntry: import("./wmsGroupContentTreeItem.js").WMSEntry;
4
+ };
5
+ /**
6
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions &
7
+ * { wmsEntry:import("./wmsGroupContentTreeItem.js").WMSEntry }} WMSChildItemOptions
8
+ * @property {import("./wmsGroupContentTreeItem.js").WMSEntry} wmsEntry - the wmsEntry
9
+ * @property {boolean} showStyleSelector - show the style selector
10
+ */
11
+ /**
12
+ * A WMS child layer. Toggles this child in the parent WMS layer.
13
+ * @extends {ContentTreeItem}
14
+ * @class
15
+ */
16
+ declare class WmsChildContentTreeItem extends ContentTreeItem {
17
+ /**
18
+ * @param {WMSChildItemOptions} options
19
+ * @param {import("../vcsUiApp.js").default} app
20
+ */
21
+ constructor(options: WMSChildItemOptions, app: import("../vcsUiApp.js").default);
22
+ /**
23
+ * @type {import("./wmsGroupContentTreeItem.js").WMSEntry}
24
+ */
25
+ _wmsEntry: import("./wmsGroupContentTreeItem.js").WMSEntry;
26
+ /**
27
+ * @type {() => void}
28
+ */
29
+ _stateWatcher: () => void;
30
+ /**
31
+ * Event fires if the Item has been clicked
32
+ * @type {VcsEvent<void>}
33
+ */
34
+ clickedEvent: VcsEvent<void>;
35
+ /**
36
+ * Event fires if a style has been selected
37
+ * @type {VcsEvent<string>}
38
+ */
39
+ styleSelected: VcsEvent<string>;
40
+ /**
41
+ * @type {() => void}
42
+ */
43
+ _destroyStyleAction: () => void;
44
+ /**
45
+ * @type {import("./wmsGroupContentTreeItem.js").WMSEntry}
46
+ */
47
+ get wmsEntry(): import("./wmsGroupContentTreeItem.js").WMSEntry;
48
+ /**
49
+ * @param {number[]} [extent]
50
+ * @private
51
+ */
52
+ private _setExtentAction;
53
+ _setStyleAction(): void;
54
+ }
55
+ import ContentTreeItem from './contentTreeItem.js';
56
+ import { VcsEvent } from '@vcmap/core';
@@ -0,0 +1,159 @@
1
+ import { VcsEvent, Viewpoint } from '@vcmap/core';
2
+ import { reactive, computed, watch } from 'vue';
3
+ import {
4
+ createGoToViewpointAction,
5
+ createModalAction,
6
+ } from '../actions/actionHelper.js';
7
+ import { StateActionState } from '../actions/stateRefAction.js';
8
+ import ContentTreeItem from './contentTreeItem.js';
9
+ import VcsActionList from '../components/lists/VcsActionList.vue';
10
+ import { vcsAppSymbol } from '../pluginHelper.js';
11
+
12
+ /**
13
+ * @typedef {import("./contentTreeItem.js").ContentTreeItemOptions &
14
+ * { wmsEntry:import("./wmsGroupContentTreeItem.js").WMSEntry }} WMSChildItemOptions
15
+ * @property {import("./wmsGroupContentTreeItem.js").WMSEntry} wmsEntry - the wmsEntry
16
+ * @property {boolean} showStyleSelector - show the style selector
17
+ */
18
+
19
+ /**
20
+ * A WMS child layer. Toggles this child in the parent WMS layer.
21
+ * @extends {ContentTreeItem}
22
+ * @class
23
+ */
24
+ class WmsChildContentTreeItem extends ContentTreeItem {
25
+ static get className() {
26
+ return 'WmsChildContentTreeItem';
27
+ }
28
+
29
+ /**
30
+ * @param {WMSChildItemOptions} options
31
+ * @param {import("../vcsUiApp.js").default} app
32
+ */
33
+ constructor(options, app) {
34
+ super(options, app);
35
+
36
+ /**
37
+ * @type {import("./wmsGroupContentTreeItem.js").WMSEntry}
38
+ */
39
+ this._wmsEntry = options.wmsEntry;
40
+
41
+ /**
42
+ * @type {() => void}
43
+ */
44
+ this._stateWatcher = watch(
45
+ this._wmsEntry.active,
46
+ () => {
47
+ if (this._wmsEntry.active.value) {
48
+ this.state = StateActionState.ACTIVE;
49
+ } else {
50
+ this.state = StateActionState.INACTIVE;
51
+ }
52
+ },
53
+ { immediate: true },
54
+ );
55
+
56
+ /**
57
+ * Event fires if the Item has been clicked
58
+ * @type {VcsEvent<void>}
59
+ */
60
+ this.clickedEvent = new VcsEvent();
61
+
62
+ /**
63
+ * Event fires if a style has been selected
64
+ * @type {VcsEvent<string>}
65
+ */
66
+ this.styleSelected = new VcsEvent();
67
+
68
+ /**
69
+ * @type {() => void}
70
+ */
71
+ this._destroyStyleAction = () => {};
72
+
73
+ this._setExtentAction(this._wmsEntry.extent);
74
+ if (options.showStyleSelector) {
75
+ this._setStyleAction();
76
+ }
77
+ }
78
+
79
+ /**
80
+ * @type {import("./wmsGroupContentTreeItem.js").WMSEntry}
81
+ */
82
+ get wmsEntry() {
83
+ return this._wmsEntry;
84
+ }
85
+
86
+ /**
87
+ * @param {number[]} [extent]
88
+ * @private
89
+ */
90
+ _setExtentAction(extent) {
91
+ const name = 'content.layerExtentAction.name';
92
+ this.removeAction(name);
93
+ if (extent) {
94
+ const viewpoint = Viewpoint.createViewpointFromExtent(extent);
95
+ const action = createGoToViewpointAction(
96
+ {
97
+ name,
98
+ title: 'content.layerExtentAction.title',
99
+ },
100
+ viewpoint,
101
+ this._app.viewpoints,
102
+ this._app.maps,
103
+ );
104
+ this.addAction(action, 8);
105
+ }
106
+ }
107
+
108
+ _setStyleAction() {
109
+ const name = 'content.wmsStyleAction.name';
110
+ this.removeAction(name);
111
+ let modalAction = null;
112
+ if (this._wmsEntry.styles.length > 1) {
113
+ const styleActions = this._wmsEntry.styles.map((style) => {
114
+ return reactive({
115
+ name: style.title,
116
+ active: computed(
117
+ () => style.name === this.wmsEntry.activeStyle.value,
118
+ ),
119
+ callback: () => {
120
+ this.styleSelected.raiseEvent(style.name);
121
+ modalAction?.callback();
122
+ },
123
+ });
124
+ });
125
+ const { action, destroy } = createModalAction(
126
+ {
127
+ name,
128
+ icon: '$vcsColorSwatch',
129
+ title: 'content.styleAction.title',
130
+ },
131
+ {
132
+ component: VcsActionList,
133
+ position: { width: 200 },
134
+ props: { actions: styleActions },
135
+ },
136
+ this._app,
137
+ vcsAppSymbol,
138
+ );
139
+ modalAction = action;
140
+ this._destroyStyleAction = destroy;
141
+ this.addAction(action);
142
+ }
143
+ }
144
+
145
+ async clicked() {
146
+ await super.clicked();
147
+ this.clickedEvent.raiseEvent();
148
+ }
149
+
150
+ destroy() {
151
+ super.destroy();
152
+ this._stateWatcher();
153
+ this.clickedEvent.destroy();
154
+ this.styleSelected.destroy();
155
+ this._destroyStyleAction();
156
+ }
157
+ }
158
+
159
+ export default WmsChildContentTreeItem;
@@ -0,0 +1,171 @@
1
+ export default WMSGroupContentTreeItem;
2
+ export type WMSGroupContentTreeItemOptions = import('./contentTreeItem.js').ContentTreeItemOptions & {
3
+ layerName: string;
4
+ showWhenNotSupported?: boolean;
5
+ exclusiveLayers?: boolean;
6
+ editableStyle?: boolean;
7
+ allowedWMSLayers?: string[];
8
+ };
9
+ export type WMSStyleEntry = {
10
+ name: string;
11
+ title: string;
12
+ legend: import("../legend/legendHelper.js").LegendItem;
13
+ };
14
+ export type WMSEntry = {
15
+ name: string;
16
+ active: import("vue").Ref<boolean>;
17
+ activeStyle: import("vue").Ref<string>;
18
+ title: string;
19
+ extent: import("@vcmap/core").Extent;
20
+ styles: Array<WMSStyleEntry>;
21
+ };
22
+ /**
23
+ * @typedef {import('./contentTreeItem.js').ContentTreeItemOptions &
24
+ * { layerName: string, showWhenNotSupported?: boolean, exclusiveLayers?:boolean, editableStyle?:boolean, allowedWMSLayers?:string[]}} WMSGroupContentTreeItemOptions
25
+ * @property {boolean} showWhenNotSupported - optional flag to show the item even if it is not supported by the activeMap.
26
+ * @property {string} layerName - The name of the WMSLayer to show the children of.
27
+ * @property {boolean} [setWMSLayersExclusive=false] - Whether the WMSlayers are mutually exclusive.
28
+ * @property {boolean} [showStyleSelector=true] - Whether the layer style can be selected. Will add a StyleSelector action to compatible items if the Layer has more than one style.
29
+ * @property {string[]} allowedWMSLayers - The list of layers to be shown, other available layers will not be shown.
30
+ */
31
+ /**
32
+ * @typedef {Object} WMSStyleEntry
33
+ * @property {string} name
34
+ * @property {string} title
35
+ * @property {import("../legend/legendHelper.js").LegendItem} legend
36
+ */
37
+ /**
38
+ * @typedef {Object} WMSEntry
39
+ * @property {string} name
40
+ * @property {import("vue").Ref<boolean>} active
41
+ * @property {import("vue").Ref<string>} activeStyle
42
+ * @property {string} title
43
+ * @property {import("@vcmap/core").Extent} extent
44
+ * @property {Array<WMSStyleEntry>} styles
45
+ */
46
+ /**
47
+ * A WMSGroupItem, will take over a WMSLayer and request the Capabilities of the layer to show all available
48
+ * layers as child Items. The WMSGroupItem will also set the legend on the Layer based on the Capabilities,
49
+ * if the Layer does not have a legend configured.
50
+ * @extends {VcsObjectContentTreeItem<import("./vcsObjectContentTreeItem.js").VcsObjectContentTreeItemProperties>}
51
+ * @class
52
+ */
53
+ declare class WMSGroupContentTreeItem extends VcsObjectContentTreeItem<import("./vcsObjectContentTreeItem.js").VcsObjectContentTreeItemProperties> {
54
+ /**
55
+ * @param {WMSGroupContentTreeItemOptions} options
56
+ * @param {import("../vcsUiApp.js").default} app
57
+ */
58
+ constructor(options: WMSGroupContentTreeItemOptions, app: import("../vcsUiApp.js").default);
59
+ /**
60
+ * @type {string}
61
+ * @private
62
+ */
63
+ private _layerName;
64
+ /**
65
+ * @type {boolean}
66
+ * @private
67
+ */
68
+ private _showWhenNotSupported;
69
+ /**
70
+ * @type {boolean}
71
+ * @private
72
+ */
73
+ private _setWMSLayersExclusive;
74
+ /**
75
+ * @type {boolean}
76
+ * @private
77
+ */
78
+ private _showStyleSelector;
79
+ /**
80
+ * @type {boolean}
81
+ * @private
82
+ */
83
+ private _invalid;
84
+ /**
85
+ * The only allowed layers.
86
+ * @type {Array<string>|undefined}
87
+ * @private
88
+ */
89
+ private _allowedWMSLayers;
90
+ /**
91
+ * @type {Array<WMSEntry>}
92
+ * @private
93
+ */
94
+ private _availableWMSEntries;
95
+ /**
96
+ * references the current ChildItems, this WMSGroupContentTreeItem manages
97
+ * @type {Array<WmsChildContentTreeItem>}
98
+ * @private
99
+ */
100
+ private _childItems;
101
+ /**
102
+ * @type {Array<Function>}
103
+ * @private
104
+ */
105
+ private _listeners;
106
+ /**
107
+ * this flag is set to true, if the legend is already set, so we do not need to manage the legend
108
+ * @type {boolean}
109
+ * @private
110
+ */
111
+ private _legendSet;
112
+ /**
113
+ * pause the stateChangedListener, if the state is set from the Layer to the WMSGroupContentTreeItem
114
+ * @type {boolean}
115
+ * @private
116
+ */
117
+ private _pauseStateChangedListener;
118
+ /**
119
+ * readonly access, do not manipulate the entries directly.
120
+ * @type {Array<WMSEntry>}
121
+ */
122
+ get wmsEntries(): WMSEntry[];
123
+ /**
124
+ * @type {import("@vcmap/core").WMSLayer|undefined}
125
+ * @private
126
+ */
127
+ private get _layer();
128
+ _setState(): void;
129
+ /**
130
+ * Sets the Legend on the Layer, based on the active WMSLayers and the active Styles.
131
+ * @private
132
+ */
133
+ private _setLegend;
134
+ /**
135
+ * sets the State of to the underlying Layer
136
+ * @private
137
+ */
138
+ private _setStateToLayer;
139
+ /**
140
+ * this reacts to clickEvents from the ChildItem, and sets internal State correspondingly,
141
+ * and also sets the State to the Layer and the children.
142
+ * @param {WmsChildContentTreeItem} item
143
+ */
144
+ _handleChildClickedEvent(item: WmsChildContentTreeItem): void;
145
+ /**
146
+ * @param {WmsChildContentTreeItem} item
147
+ * @param {string} style
148
+ * @private
149
+ */
150
+ private _handleStyleSelectedEvent;
151
+ /**
152
+ * @private
153
+ */
154
+ private _clear;
155
+ /**
156
+ * syncs the State from the Layer to the WMSGroupContentTreeItem
157
+ * @private
158
+ */
159
+ private _setStateFromLayer;
160
+ /**
161
+ * @returns {Promise<void>}
162
+ * @private
163
+ */
164
+ private _setup;
165
+ /**
166
+ * @returns {WMSGroupContentTreeItemOptions}
167
+ */
168
+ toJSON(): WMSGroupContentTreeItemOptions;
169
+ }
170
+ import VcsObjectContentTreeItem from './vcsObjectContentTreeItem.js';
171
+ import WmsChildContentTreeItem from './wmsChildContentTreeItem.js';