@vcmap/ui 6.0.0-rc.3 → 6.0.0-rc.6
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/buildHelpers.js +60 -11
- package/build/buildTypes.js +9 -5
- package/build/bundle.js +1 -1
- package/build/info/publish.js +25 -31
- package/build/lintTypes.js +5 -0
- package/config/base.config.json +2 -7
- package/config/dev.config.json +11 -1
- package/config/projects.config.json +2 -1
- package/config/theming.config.json +68 -0
- package/config/www.config.json +27 -23
- package/dist/assets/@mdi/font/css/{materialdesignicons.min-7a4f6be0.css → materialdesignicons.min-680621ca.css} +1 -1
- package/dist/assets/{cesium-cb4dbfba.js → cesium-ccb4cc30.js} +272 -385
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-72f21835.js → core-e06aa7a6.js} +2313 -2321
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-2d33bc8b.js → ol-e7981d5c.js} +233 -329
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-5dda32d2.css +1 -0
- package/dist/assets/{ui-2ab43a16.js → ui-5dda32d2.js} +11344 -11078
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue-87bc6efe.js +6083 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-760ced3b.css → vuetify-4c4e4217.css} +2 -2
- package/dist/assets/{vuetify-760ced3b.js → vuetify-4c4e4217.js} +8063 -8262
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +27 -17
- package/index.js +16 -8
- package/package.json +17 -17
- package/plugins/@vcmap-show-case/custom-icons-example/README.md +3 -0
- package/plugins/@vcmap-show-case/custom-icons-example/assets/imageExample.png +0 -0
- package/plugins/@vcmap-show-case/custom-icons-example/assets/svgExample.svg +1 -0
- package/plugins/@vcmap-show-case/custom-icons-example/package.json +5 -0
- package/plugins/@vcmap-show-case/custom-icons-example/src/CustomIconsExample.vue +90 -0
- package/plugins/@vcmap-show-case/custom-icons-example/src/index.js +45 -0
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +2 -3
- package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +11 -7
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +18 -11
- package/plugins/@vcmap-show-case/search-example/src/index.js +1 -0
- package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +35 -5
- package/plugins/@vcmap-show-case/theming-example/README.md +3 -0
- package/plugins/@vcmap-show-case/theming-example/package.json +5 -0
- package/plugins/@vcmap-show-case/theming-example/src/ThemingExample.vue +116 -0
- package/plugins/@vcmap-show-case/theming-example/src/index.js +53 -0
- package/plugins/@vcmap-show-case/toolbox-example/src/index.js +2 -1
- package/plugins/package.json +7 -23
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +1 -1
- package/src/actions/StyleSelector.vue +1 -1
- package/src/actions/actionHelper.d.ts +4 -11
- package/src/actions/actionHelper.js +15 -7
- package/src/actions/listActions.d.ts +5 -5
- package/src/actions/listActions.js +2 -2
- package/src/application/VcsApp.vue +113 -50
- package/src/application/VcsApp.vue.d.ts +301 -4
- package/src/application/VcsAttributionsFooter.vue.d.ts +1 -1
- package/src/application/VcsContainer.vue +27 -10
- package/src/application/VcsContainer.vue.d.ts +241 -0
- package/src/application/VcsMainMap.vue +7 -7
- package/src/application/VcsMainMap.vue.d.ts +2 -2
- package/src/application/VcsNavbar.vue +14 -2
- package/src/application/VcsNavbar.vue.d.ts +1 -0
- package/src/application/VcsSplashScreen.vue +33 -26
- package/src/application/VcsTextPageFooter.vue +2 -1
- package/src/application/attributionsHelper.d.ts +20 -22
- package/src/application/attributionsHelper.js +4 -4
- package/src/callback/vcsCallback.d.ts +2 -2
- package/src/callback/vcsCallback.js +1 -1
- package/src/components/buttons/VcsActionButtonList.vue +61 -6
- package/src/components/buttons/VcsActionButtonList.vue.d.ts +28 -0
- package/src/components/buttons/VcsButton.vue +2 -4
- package/src/components/buttons/VcsButton.vue.d.ts +1 -1
- package/src/components/buttons/VcsFormButton.vue +4 -4
- package/src/components/buttons/VcsToolButton.vue +4 -2
- package/src/components/buttons/VcsToolButton.vue.d.ts +2 -2
- package/src/components/composables.d.ts +5 -0
- package/src/components/composables.js +79 -9
- package/src/components/extent/VcsExtent.vue +10 -6
- package/src/components/extent/VcsExtent.vue.d.ts +1 -0
- package/src/components/flight/VcsFlightComponent.vue +13 -13
- package/src/components/flight/VcsFlightComponent.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +8 -3
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +13 -16
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsCoordinate.vue +4 -4
- package/src/components/form-inputs-controls/VcsFileInput.vue +1 -1
- package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +8 -6
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +2 -5
- package/src/components/form-inputs-controls/VcsSlider.vue +5 -6
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsTextArea.vue +2 -5
- package/src/components/form-inputs-controls/VcsTextField.vue +24 -1
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +11 -1
- package/src/components/form-inputs-controls/VcsWizard.vue +3 -3
- package/src/components/form-inputs-controls/VcsWizardStep.vue +6 -5
- package/src/components/form-inputs-controls/vcsTextField.scss +8 -5
- package/src/components/form-output/VcsFormattedNumber.vue +7 -5
- package/src/components/form-output/VcsMarkdown.vue +15 -12
- package/src/components/form-output/VcsMarkdown.vue.d.ts +1 -0
- package/src/components/form-output/markdownHelper.d.ts +30 -0
- package/src/components/form-output/markdownHelper.js +398 -0
- package/src/components/import/VcsFileDrop.vue +8 -5
- package/src/components/import/VcsImportComponent.vue +8 -4
- package/src/components/import/VcsImportComponent.vue.d.ts +1 -2
- package/src/components/lists/VcsActionList.vue +6 -6
- package/src/components/lists/VcsList.vue +22 -37
- package/src/components/lists/VcsList.vue.d.ts +14 -55
- package/src/components/lists/{VcsListItem.vue → VcsListItemComponent.vue} +37 -11
- package/src/components/lists/VcsListItemComponent.vue.d.ts +79 -0
- package/src/components/lists/VcsTreeview.vue +95 -26
- package/src/components/lists/VcsTreeview.vue.d.ts +16 -3
- package/src/components/lists/VcsTreeviewSearchbar.vue +16 -5
- package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +3 -1
- package/src/components/lists/VcsTreeviewTitle.vue +36 -0
- package/src/components/modelHelper.d.ts +10 -8
- package/src/components/modelHelper.js +8 -6
- package/src/components/notification/VcsHelp.vue +6 -7
- package/src/components/notification/VcsHelp.vue.d.ts +0 -8
- package/src/components/plugins/AbstractConfigEditor.vue +1 -22
- package/src/components/plugins/AbstractConfigEditor.vue.d.ts +6 -29
- package/src/components/section/VcsExpansionPanel.vue +9 -3
- package/src/components/section/VcsExpansionPanel.vue.d.ts +2 -2
- package/src/components/section/VcsFormSection.vue +13 -7
- package/src/components/section/VcsFormSection.vue.d.ts +2 -3
- package/src/components/style/VcsImageSelector.vue +14 -6
- package/src/components/style/VcsImageSelector.vue.d.ts +1 -0
- package/src/components/style/VcsStrokeSelector.vue +5 -2
- package/src/components/style/VcsStrokeSelector.vue.d.ts +1 -0
- package/src/components/style/VcsTextMenu.vue +3 -3
- package/src/components/style/VcsVectorStyleComponent.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +42 -32
- package/src/components/tables/VcsDataTable.vue.d.ts +1 -0
- package/src/components/tables/VcsTable.vue +45 -62
- package/src/components/tables/VcsTable.vue.d.ts +30 -17
- package/src/components/tables/VcsTableCell.vue +72 -0
- package/src/components/tables/VcsTableCell.vue.d.ts +13 -0
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +6 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +42 -31
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointComponent.vue +14 -11
- package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointEditor.vue +2 -2
- package/src/contentTree/LayerTree.vue +9 -27
- package/src/contentTree/LayerTree.vue.d.ts +1 -1
- package/src/contentTree/contentTreeCollection.d.ts +1 -0
- package/src/contentTree/contentTreeCollection.js +45 -11
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/contentTreeItem.js +1 -1
- package/src/featureInfo/BalloonComponent.vue +32 -25
- package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
- package/src/featureInfo/MarkdownBalloonComponent.vue +4 -2
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
- package/src/featureInfo/abstractFeatureInfoView.d.ts +10 -4
- package/src/featureInfo/abstractFeatureInfoView.js +19 -11
- package/src/featureInfo/featureInfo.d.ts +7 -7
- package/src/featureInfo/featureInfo.js +51 -31
- package/src/featureInfo/iframeFeatureInfoView.d.ts +8 -2
- package/src/featureInfo/iframeFeatureInfoView.js +15 -5
- package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -5
- package/src/featureInfo/markdownFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownFeatureInfoView.js +9 -11
- package/src/featureInfo/tableFeatureInfoView.js +13 -4
- package/src/i18n/i18nCollection.d.ts +9 -15
- package/src/i18n/i18nCollection.js +3 -3
- package/src/legend/VcsLegend.vue +6 -2
- package/src/legend/VcsLegend.vue.d.ts +1 -0
- package/src/manager/collectionManager/CollectionComponentList.vue +2 -2
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +2 -2
- package/src/manager/collectionManager/categoryManager.d.ts +1 -1
- package/src/manager/collectionManager/collectionComponentClass.d.ts +3 -3
- package/src/manager/collectionManager/collectionComponentClass.js +6 -6
- package/src/manager/collectionManager/collectionManager.d.ts +1 -1
- package/src/manager/collectionManager/editorCollectionComponentClass.js +2 -1
- package/src/manager/panel/PanelComponent.vue +2 -9
- package/src/manager/panel/PanelManagerComponent.vue +7 -3
- package/src/manager/panel/panelHelper.js +3 -3
- package/src/manager/panel/panelManager.d.ts +9 -1
- package/src/manager/panel/panelManager.js +15 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +11 -5
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +11 -6
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/{ToolboxManager.vue → ToolboxManagerComponent.vue} +13 -7
- package/src/manager/toolbox/{ToolboxManager.vue.d.ts → ToolboxManagerComponent.vue.d.ts} +1 -0
- package/src/manager/window/WindowComponent.vue +12 -8
- package/src/manager/window/WindowComponentHeader.vue +33 -9
- package/src/manager/window/WindowComponentHeader.vue.d.ts +3 -0
- package/src/manager/window/WindowManager.vue +2 -2
- package/src/manager/window/windowManager.d.ts +6 -6
- package/src/manager/window/windowManager.js +3 -3
- package/src/navigation/MapNavigation.vue +20 -0
- package/src/navigation/OrientationToolsButton.vue +2 -4
- package/src/navigation/TiltSlider.vue +3 -5
- package/src/navigation/locatorHelper.js +1 -1
- package/src/navigation/overviewMap.js +1 -1
- package/src/notifier/NotifierComponent.vue +18 -15
- package/src/search/ResultItem.vue +18 -6
- package/src/search/ResultsComponent.vue +31 -20
- package/src/search/ResultsComponent.vue.d.ts +2 -1
- package/src/search/SearchComponent.vue +11 -15
- package/src/search/SearchComponent.vue.d.ts +1 -0
- package/src/siteConfig.js +8 -8
- package/src/styles/_typography.scss +0 -2
- package/src/styles/main.scss +0 -4
- package/src/styles/vcsList.scss +1 -1
- package/src/uiConfig.d.ts +311 -7
- package/src/uiConfig.js +30 -17
- package/src/vcsUiApp.d.ts +48 -63
- package/src/vcsUiApp.js +44 -37
- package/src/vuePlugins/vuetify.d.ts +88 -62
- package/src/vuePlugins/vuetify.js +119 -20
- package/dist/assets/ui-2ab43a16.css +0 -1
- package/dist/assets/vue-03b265aa.js +0 -6096
- package/plugins/@vcmap-show-case/theme-changer/README.md +0 -23
- package/plugins/@vcmap-show-case/theme-changer/config.json +0 -69
- package/plugins/@vcmap-show-case/theme-changer/package.json +0 -11
- package/plugins/@vcmap-show-case/theme-changer/src/ThemeChangerComponent.vue +0 -120
- package/plugins/@vcmap-show-case/theme-changer/src/index.js +0 -108
- package/src/application/markdownHelper.d.ts +0 -12
- package/src/application/markdownHelper.js +0 -70
- package/src/components/lists/VcsListItem.vue.d.ts +0 -27
- package/src/components/lists/VcsTreeviewLeaf.vue +0 -83
- package/src/components/notification/VcsTooltip.vue +0 -156
- package/src/components/notification/VcsTooltip.vue.d.ts +0 -27
- package/src/featureInfo/MarkdownComponent.vue +0 -16
- package/src/featureInfo/MarkdownComponent.vue.d.ts +0 -7
- package/src/styles/_theming.scss +0 -73
- package/src/styles/settings.scss +0 -6
- package/src/styles/shades.scss +0 -4
- package/src/styles/variables.scss +0 -140
- package/src/styles/vcsFont.scss +0 -2
- package/src/styles/vcsGrid.scss +0 -3
- /package/src/components/lists/{VcsTreeviewLeaf.vue.d.ts → VcsTreeviewTitle.vue.d.ts} +0 -0
@@ -1,11 +1,8 @@
|
|
1
1
|
/**
|
2
|
-
* @typedef {
|
3
|
-
* @property {string} name
|
4
|
-
* @property {string} [title]
|
5
|
-
* @property {string} [icon]
|
2
|
+
* @typedef {Omit<VcsAction, 'callback'>} ActionOptions
|
6
3
|
*/
|
7
4
|
/**
|
8
|
-
* @typedef {
|
5
|
+
* @typedef {(p?: PointerEvent) => (void | Promise<void>)} ActionCallback
|
9
6
|
*/
|
10
7
|
/**
|
11
8
|
* @typedef {Object} VcsAction
|
@@ -110,12 +107,8 @@ export function getViewpointFromFeature(feature: import("ol").Feature): Viewpoin
|
|
110
107
|
* @returns {VcsAction|null} returns null if the feature does not have a geometry with a valid extent
|
111
108
|
*/
|
112
109
|
export function createZoomToFeatureAction(actionOptions: ActionOptions, feature: import("ol").Feature, mapCollection: import("@vcmap/core").MapCollection): VcsAction | null;
|
113
|
-
export type ActionOptions =
|
114
|
-
|
115
|
-
title?: string | undefined;
|
116
|
-
icon?: string | undefined;
|
117
|
-
};
|
118
|
-
export type ActionCallback = (arg0: PointerEvent) => void | Promise<void>;
|
110
|
+
export type ActionOptions = Omit<VcsAction, 'callback'>;
|
111
|
+
export type ActionCallback = (p?: PointerEvent) => (void | Promise<void>);
|
119
112
|
export type VcsAction = {
|
120
113
|
/**
|
121
114
|
* - reactive and translatable name rendered in overflow
|
@@ -19,14 +19,11 @@ import {
|
|
19
19
|
import SearchComponent from '../search/SearchComponent.vue';
|
20
20
|
|
21
21
|
/**
|
22
|
-
* @typedef {
|
23
|
-
* @property {string} name
|
24
|
-
* @property {string} [title]
|
25
|
-
* @property {string} [icon]
|
22
|
+
* @typedef {Omit<VcsAction, 'callback'>} ActionOptions
|
26
23
|
*/
|
27
24
|
|
28
25
|
/**
|
29
|
-
* @typedef {
|
26
|
+
* @typedef {(p?: PointerEvent) => (void | Promise<void>)} ActionCallback
|
30
27
|
*/
|
31
28
|
|
32
29
|
/**
|
@@ -153,11 +150,17 @@ export function createToggleAction(
|
|
153
150
|
export function createSearchButtonAction(app) {
|
154
151
|
let destroyAction = () => {};
|
155
152
|
const searchAction = ref(null);
|
153
|
+
const uiConfig = app.uiConfig.config;
|
154
|
+
|
156
155
|
const determineAction = () => {
|
157
156
|
if (app.windowManager.has('searchId')) {
|
158
157
|
app.windowManager.remove('searchId');
|
159
158
|
}
|
160
|
-
if (
|
159
|
+
if (
|
160
|
+
!uiConfig.hideSearch &&
|
161
|
+
app.search.size > 0 &&
|
162
|
+
searchAction.value === null
|
163
|
+
) {
|
161
164
|
const action = createToggleAction(
|
162
165
|
{
|
163
166
|
name: 'search.title',
|
@@ -178,7 +181,10 @@ export function createSearchButtonAction(app) {
|
|
178
181
|
);
|
179
182
|
destroyAction = action.destroy;
|
180
183
|
searchAction.value = reactive(action.action);
|
181
|
-
} else if (
|
184
|
+
} else if (
|
185
|
+
(uiConfig.hideSearch || app.search.size === 0) &&
|
186
|
+
searchAction.value !== null
|
187
|
+
) {
|
182
188
|
destroyAction();
|
183
189
|
destroyAction = () => {};
|
184
190
|
searchAction.value = null;
|
@@ -186,6 +192,8 @@ export function createSearchButtonAction(app) {
|
|
186
192
|
};
|
187
193
|
determineAction();
|
188
194
|
const listeners = [
|
195
|
+
app.uiConfig.added.addEventListener(determineAction),
|
196
|
+
app.uiConfig.removed.addEventListener(determineAction),
|
189
197
|
app.search.added.addEventListener(determineAction),
|
190
198
|
app.search.removed.addEventListener(determineAction),
|
191
199
|
];
|
@@ -6,26 +6,26 @@
|
|
6
6
|
* @template {Object} T
|
7
7
|
* @returns {import("./actionHelper.js").VcsAction}
|
8
8
|
*/
|
9
|
-
export function createListItemDeleteAction<T extends Object>(collection: import("@vcmap/core").Collection<T>, item: T, actionOptions?: Partial<import("./actionHelper.js").
|
9
|
+
export function createListItemDeleteAction<T extends Object>(collection: import("@vcmap/core").Collection<T>, item: T, actionOptions?: Partial<Omit<import("./actionHelper.js").VcsAction, "callback">> | undefined): import("./actionHelper.js").VcsAction;
|
10
10
|
/**
|
11
11
|
* Creates an action based on a provided selection
|
12
|
-
* @param {import("vue").Ref<Array<import("../components/lists/
|
12
|
+
* @param {import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>} selection
|
13
13
|
* @param {import("./actionHelper.js").ActionOptions & {callback:import("./actionHelper.js").ActionCallback}} [actionOptions]
|
14
14
|
* @returns {{action: import("vue").UnwrapRef<import("./actionHelper.js").VcsAction>, destroy: import("vue").WatchStopHandle}}
|
15
15
|
*/
|
16
|
-
export function createListItemBulkAction(selection: import("vue").Ref<Array<import("../components/lists/
|
16
|
+
export function createListItemBulkAction(selection: import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>, actionOptions?: (Omit<import("./actionHelper.js").VcsAction, "callback"> & {
|
17
17
|
callback: import("./actionHelper.js").ActionCallback;
|
18
18
|
}) | undefined): {
|
19
19
|
action: import("vue").UnwrapRef<import("./actionHelper.js").VcsAction>;
|
20
20
|
destroy: import("vue").WatchStopHandle;
|
21
21
|
};
|
22
22
|
/**
|
23
|
-
* @param {import("vue").Ref<Array<import("../components/lists/
|
23
|
+
* @param {import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>} selection
|
24
24
|
* @param {import("./actionHelper.js").ActionCallback} exportCallback
|
25
25
|
* @param {string|symbol} owner
|
26
26
|
* @returns {{action: import("../manager/collectionManager/collectionManager.js").OwnedAction, destroy: (function(): void)}}
|
27
27
|
*/
|
28
|
-
export function createListExportAction(selection: import("vue").Ref<Array<import("../components/lists/
|
28
|
+
export function createListExportAction(selection: import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>, exportCallback: import("./actionHelper.js").ActionCallback, owner: string | symbol): {
|
29
29
|
action: import("../manager/collectionManager/collectionManager.js").OwnedAction;
|
30
30
|
destroy: (() => void);
|
31
31
|
};
|
@@ -34,7 +34,7 @@ export function createListItemDeleteAction(
|
|
34
34
|
|
35
35
|
/**
|
36
36
|
* Creates an action based on a provided selection
|
37
|
-
* @param {import("vue").Ref<Array<import("../components/lists/
|
37
|
+
* @param {import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>} selection
|
38
38
|
* @param {import("./actionHelper.js").ActionOptions & {callback:import("./actionHelper.js").ActionCallback}} [actionOptions]
|
39
39
|
* @returns {{action: import("vue").UnwrapRef<import("./actionHelper.js").VcsAction>, destroy: import("vue").WatchStopHandle}}
|
40
40
|
*/
|
@@ -59,7 +59,7 @@ export function createListItemBulkAction(selection, actionOptions) {
|
|
59
59
|
}
|
60
60
|
|
61
61
|
/**
|
62
|
-
* @param {import("vue").Ref<Array<import("../components/lists/
|
62
|
+
* @param {import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>} selection
|
63
63
|
* @param {import("./actionHelper.js").ActionCallback} exportCallback
|
64
64
|
* @param {string|symbol} owner
|
65
65
|
* @returns {{action: import("../manager/collectionManager/collectionManager.js").OwnedAction, destroy: (function(): void)}}
|
@@ -5,10 +5,10 @@
|
|
5
5
|
:options="splashScreen"
|
6
6
|
v-model="splashScreenRef"
|
7
7
|
></VcsSplashScreen>
|
8
|
-
<VcsNavbar />
|
8
|
+
<VcsNavbar v-if="!config.hideHeader" />
|
9
9
|
<VcsContainer :attribution-action="attributionAction" />
|
10
10
|
<v-footer
|
11
|
-
v-if="
|
11
|
+
v-if="showFooter"
|
12
12
|
app
|
13
13
|
absolute
|
14
14
|
:height="footerHeight"
|
@@ -63,7 +63,11 @@
|
|
63
63
|
import VcsSettings from './VcsSettings.vue';
|
64
64
|
import { WindowSlot } from '../manager/window/windowManager.js';
|
65
65
|
import CollectionManager from '../manager/collectionManager/CollectionManager.vue';
|
66
|
-
import {
|
66
|
+
import {
|
67
|
+
createVcsThemes,
|
68
|
+
setTheme,
|
69
|
+
useFontSize,
|
70
|
+
} from '../vuePlugins/vuetify.js';
|
67
71
|
import VcsLegend from '../legend/VcsLegend.vue';
|
68
72
|
import { getLegendEntries } from '../legend/legendHelper.js';
|
69
73
|
import VcsAttributionsFooter from './VcsAttributionsFooter.vue';
|
@@ -75,6 +79,37 @@
|
|
75
79
|
import VcsDefaultLogoMobile from '../logo-mobile.svg';
|
76
80
|
import VcsPositionDisplay from './VcsPositionDisplay.vue';
|
77
81
|
|
82
|
+
/**
|
83
|
+
* This helper checks the uiConfig and depending on the value will setup/teardown the providedSetupFunction
|
84
|
+
* @param {import("../vcsUiApp.js").default} app
|
85
|
+
* @param {(import("../vcsUiApp.js").default) => () => void} setupFunction
|
86
|
+
* @param {string} configOption parameter name of a uiConfig parameter, for example `app.uiConfig.config.hideContentTree`
|
87
|
+
* @returns {function():void} - cleanup function
|
88
|
+
*/
|
89
|
+
export function setupUIConfigDependency(app, setupFunction, configOption) {
|
90
|
+
let destroyFunction = null;
|
91
|
+
function handler() {
|
92
|
+
if (!app.uiConfig.config[configOption] && !destroyFunction) {
|
93
|
+
destroyFunction = setupFunction(app);
|
94
|
+
} else if (app.uiConfig.config[configOption] && destroyFunction) {
|
95
|
+
destroyFunction();
|
96
|
+
destroyFunction = null;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
handler();
|
100
|
+
const listeners = [
|
101
|
+
app.uiConfig.added.addEventListener(handler),
|
102
|
+
app.uiConfig.added.addEventListener(handler),
|
103
|
+
];
|
104
|
+
|
105
|
+
return () => {
|
106
|
+
if (destroyFunction) {
|
107
|
+
destroyFunction();
|
108
|
+
}
|
109
|
+
listeners.forEach((cb) => cb());
|
110
|
+
};
|
111
|
+
}
|
112
|
+
|
78
113
|
/**
|
79
114
|
* You should call this function in the component providing the vcsUiApp to your
|
80
115
|
* application in the components mounted hook. This will call VcsAppMounted on all plugins in the app
|
@@ -109,6 +144,7 @@
|
|
109
144
|
/**
|
110
145
|
* This helper function will add a map action button based on the default icons
|
111
146
|
* to the apps NavbarManager. Furthermore, all maps on the app are synced for adding and removing.
|
147
|
+
* The buttons can be removed with the uiConfig hideMapButtons
|
112
148
|
* @param {import("../vcsUiApp.js").default} app
|
113
149
|
* @returns {function():void}
|
114
150
|
*/
|
@@ -231,8 +267,11 @@
|
|
231
267
|
if (layersWithLegend < 1 && stylesWithLegend < 1) {
|
232
268
|
app.navbarManager.remove('legend');
|
233
269
|
app.windowManager.remove('legend');
|
270
|
+
} else {
|
271
|
+
addLegend();
|
234
272
|
}
|
235
273
|
};
|
274
|
+
handleLegend();
|
236
275
|
|
237
276
|
const listeners = [
|
238
277
|
app.layers.added.addEventListener((layer) => {
|
@@ -250,6 +289,8 @@
|
|
250
289
|
];
|
251
290
|
|
252
291
|
return () => {
|
292
|
+
app.navbarManager.remove('legend');
|
293
|
+
app.windowManager.remove('legend');
|
253
294
|
destroy();
|
254
295
|
legendDestroy();
|
255
296
|
listeners.forEach((cb) => cb());
|
@@ -263,7 +304,7 @@
|
|
263
304
|
*/
|
264
305
|
function setupCustomScreen(app) {
|
265
306
|
function setupCustomScreenAction() {
|
266
|
-
const { customScreen } = app.uiConfig.config
|
307
|
+
const { customScreen } = app.uiConfig.config;
|
267
308
|
const { action: customScreenAction, destroy: customScreenDestroy } =
|
268
309
|
createToggleAction(
|
269
310
|
{
|
@@ -301,7 +342,7 @@
|
|
301
342
|
}
|
302
343
|
let customScreen;
|
303
344
|
const stopCustomScreenWatcher = watch(
|
304
|
-
() => app.uiConfig.config.
|
345
|
+
() => app.uiConfig.config.customScreen,
|
305
346
|
(newCustomScreen) => {
|
306
347
|
if (app.navbarManager.has('customScreenToggle')) {
|
307
348
|
app.navbarManager.remove('customScreenToggle');
|
@@ -327,7 +368,7 @@
|
|
327
368
|
*/
|
328
369
|
function setupSplashScreen(app, splashScreenRef) {
|
329
370
|
function setupSplashScreenAction() {
|
330
|
-
const { splashScreen } = app.uiConfig.config
|
371
|
+
const { splashScreen } = app.uiConfig.config;
|
331
372
|
if (splashScreen) {
|
332
373
|
splashScreenRef.value = true;
|
333
374
|
}
|
@@ -379,6 +420,7 @@
|
|
379
420
|
* @returns {function():void}
|
380
421
|
*/
|
381
422
|
export function setupSettingsWindow(app) {
|
423
|
+
const settingsWindowId = 'vcsSettings';
|
382
424
|
const { action: settingsAction, destroy: settingsDestroy } =
|
383
425
|
createToggleAction(
|
384
426
|
{
|
@@ -387,7 +429,7 @@
|
|
387
429
|
title: 'settings.tooltip',
|
388
430
|
},
|
389
431
|
{
|
390
|
-
id:
|
432
|
+
id: settingsWindowId,
|
391
433
|
component: VcsSettings,
|
392
434
|
state: { headerIcon: 'mdi-cog', headerTitle: 'settings.title' },
|
393
435
|
slot: WindowSlot.DYNAMIC_RIGHT,
|
@@ -397,13 +439,15 @@
|
|
397
439
|
);
|
398
440
|
app.navbarManager.add(
|
399
441
|
{
|
400
|
-
id:
|
442
|
+
id: settingsWindowId,
|
401
443
|
action: settingsAction,
|
402
444
|
},
|
403
445
|
vcsAppSymbol,
|
404
446
|
ButtonLocation.MENU,
|
405
447
|
);
|
406
448
|
return () => {
|
449
|
+
app.navbarManager.remove(settingsWindowId);
|
450
|
+
app.windowManager.remove(settingsWindowId);
|
407
451
|
settingsDestroy();
|
408
452
|
};
|
409
453
|
}
|
@@ -431,6 +475,11 @@
|
|
431
475
|
);
|
432
476
|
}
|
433
477
|
|
478
|
+
/**
|
479
|
+
* @type {string}
|
480
|
+
*/
|
481
|
+
export const categoryManagerWindowId = 'category-manager';
|
482
|
+
|
434
483
|
/**
|
435
484
|
* This helper function will add a category manager button to the navbar. The category Manager
|
436
485
|
* will only be shown if there is at least one category under management in the categoryManager.
|
@@ -438,15 +487,14 @@
|
|
438
487
|
* @returns {function():void}
|
439
488
|
*/
|
440
489
|
export function setupCategoryManagerWindow(app) {
|
441
|
-
const id = 'category-manager';
|
442
490
|
const { action: categoryManagerAction, destroy } = createToggleAction(
|
443
491
|
{
|
444
|
-
name:
|
492
|
+
name: categoryManagerWindowId,
|
445
493
|
icon: '$vcsComponents',
|
446
494
|
title: 'categoryManager.tooltip',
|
447
495
|
},
|
448
496
|
{
|
449
|
-
id,
|
497
|
+
id: categoryManagerWindowId,
|
450
498
|
state: {
|
451
499
|
headerTitle: 'categoryManager.title',
|
452
500
|
headerIcon: '$vcsComponents',
|
@@ -472,9 +520,9 @@
|
|
472
520
|
* @param {import("../manager/collectionManager/collectionComponentClass.js").default} collectionComponent
|
473
521
|
*/
|
474
522
|
function handleAdded(collectionComponent) {
|
475
|
-
if (!app.navbarManager.has(
|
523
|
+
if (!app.navbarManager.has(categoryManagerWindowId)) {
|
476
524
|
app.navbarManager.add(
|
477
|
-
{ id, action: categoryManagerAction },
|
525
|
+
{ id: categoryManagerWindowId, action: categoryManagerAction },
|
478
526
|
vcsAppSymbol,
|
479
527
|
ButtonLocation.CONTENT,
|
480
528
|
);
|
@@ -483,7 +531,7 @@
|
|
483
531
|
collectionComponent.id,
|
484
532
|
collectionComponent.collection.added.addEventListener((item) => {
|
485
533
|
if (
|
486
|
-
!app.windowManager.has(
|
534
|
+
!app.windowManager.has(categoryManagerWindowId) &&
|
487
535
|
item[moduleIdSymbol] === app.dynamicModuleId
|
488
536
|
) {
|
489
537
|
categoryManagerAction.hasUpdate = true;
|
@@ -502,8 +550,8 @@
|
|
502
550
|
collectionListeners.delete(collectionComponent.id);
|
503
551
|
|
504
552
|
if (!app.categoryManager.componentIds.length) {
|
505
|
-
app.windowManager.remove(
|
506
|
-
app.navbarManager.remove(
|
553
|
+
app.windowManager.remove(categoryManagerWindowId);
|
554
|
+
app.navbarManager.remove(categoryManagerWindowId);
|
507
555
|
categoryManagerAction.hasUpdate = false;
|
508
556
|
}
|
509
557
|
}
|
@@ -520,13 +568,15 @@
|
|
520
568
|
|
521
569
|
const windowListener = app.windowManager.added.addEventListener(
|
522
570
|
(windowComponent) => {
|
523
|
-
if (windowComponent.id ===
|
571
|
+
if (windowComponent.id === categoryManagerWindowId) {
|
524
572
|
categoryManagerAction.hasUpdate = false;
|
525
573
|
}
|
526
574
|
},
|
527
575
|
);
|
528
576
|
|
529
577
|
return () => {
|
578
|
+
app.windowManager.remove(categoryManagerWindowId);
|
579
|
+
app.navbarManager.remove(categoryManagerWindowId);
|
530
580
|
destroy();
|
531
581
|
addedListener();
|
532
582
|
removedListener();
|
@@ -544,25 +594,19 @@
|
|
544
594
|
* @returns {function():void} - call to stop syncing
|
545
595
|
*/
|
546
596
|
export function setupUiConfigTheming(app) {
|
597
|
+
function updateTheme(item) {
|
598
|
+
if (item.name === 'primaryColor' || item.name === 'vuetifyTheme') {
|
599
|
+
const mergedThemes = createVcsThemes(
|
600
|
+
app.uiConfig.getByKey('vuetifyTheme')?.value,
|
601
|
+
app.uiConfig.getByKey('primaryColor')?.value,
|
602
|
+
);
|
603
|
+
setTheme(app.vuetify, mergedThemes);
|
604
|
+
app.themeChanged.raiseEvent();
|
605
|
+
}
|
606
|
+
}
|
547
607
|
const listeners = [
|
548
|
-
app.uiConfig.added.addEventListener(
|
549
|
-
|
550
|
-
app.vuetify.theme.themes.value.dark.colors.primary =
|
551
|
-
item.value?.dark || item.value;
|
552
|
-
app.vuetify.theme.themes.value.light.colors.primary =
|
553
|
-
item.value?.light || item.value;
|
554
|
-
app.themeChanged.raiseEvent();
|
555
|
-
}
|
556
|
-
}),
|
557
|
-
app.uiConfig.removed.addEventListener((item) => {
|
558
|
-
if (item.name === 'primaryColor') {
|
559
|
-
app.vuetify.theme.themes.value.dark.colors.primary =
|
560
|
-
defaultPrimaryColor.dark;
|
561
|
-
app.vuetify.theme.themes.value.light.colors.primary =
|
562
|
-
defaultPrimaryColor.light;
|
563
|
-
app.themeChanged.raiseEvent();
|
564
|
-
}
|
565
|
-
}),
|
608
|
+
app.uiConfig.added.addEventListener(updateTheme),
|
609
|
+
app.uiConfig.removed.addEventListener(updateTheme),
|
566
610
|
];
|
567
611
|
const stopWatching = watch(
|
568
612
|
() => app.vuetify.theme.current.value.dark,
|
@@ -671,14 +715,30 @@
|
|
671
715
|
/** @type {import("../vcsUiApp.js").default} */
|
672
716
|
const app = getVcsAppById(props.appId);
|
673
717
|
provide('vcsApp', app);
|
674
|
-
const mapNavbarListener =
|
675
|
-
|
676
|
-
|
718
|
+
const mapNavbarListener = setupUIConfigDependency(
|
719
|
+
app,
|
720
|
+
setupMapNavbar,
|
721
|
+
'hideMapButtons',
|
722
|
+
);
|
723
|
+
const legendDestroy = setupUIConfigDependency(
|
724
|
+
app,
|
725
|
+
setupLegendWindow,
|
726
|
+
'hideLegend',
|
727
|
+
);
|
728
|
+
const settingsDestroy = setupUIConfigDependency(
|
729
|
+
app,
|
730
|
+
setupSettingsWindow,
|
731
|
+
'hideSettings',
|
732
|
+
);
|
677
733
|
const stopCustomScreen = setupCustomScreen(app);
|
678
734
|
const splashScreenRef = ref(true);
|
679
735
|
const stopSplashScreen = setupSplashScreen(app, splashScreenRef);
|
680
736
|
setupHelpButton(app);
|
681
|
-
const
|
737
|
+
const destroyMyWorkspace = setupUIConfigDependency(
|
738
|
+
app,
|
739
|
+
setupCategoryManagerWindow,
|
740
|
+
'hideMyWorkspace',
|
741
|
+
);
|
682
742
|
const destroyThemingListener = setupUiConfigTheming(app);
|
683
743
|
const destroyDisplayQualityListener = setupUiConfigDisplayQuality(app);
|
684
744
|
const { attributionEntries, attributionAction, destroyAttributions } =
|
@@ -698,10 +758,10 @@
|
|
698
758
|
settingsDestroy();
|
699
759
|
stopCustomScreen();
|
700
760
|
stopSplashScreen();
|
701
|
-
|
761
|
+
destroyMyWorkspace();
|
702
762
|
destroyThemingListener();
|
703
|
-
destroyAttributions();
|
704
763
|
destroyDisplayQualityListener();
|
764
|
+
destroyAttributions();
|
705
765
|
});
|
706
766
|
|
707
767
|
const { smAndUp } = useDisplay();
|
@@ -711,37 +771,40 @@
|
|
711
771
|
});
|
712
772
|
|
713
773
|
return {
|
714
|
-
|
774
|
+
config: app.uiConfig.config,
|
775
|
+
showFooter: computed(() => {
|
776
|
+
return !app.uiConfig.config.hideFooter && smAndUp.value;
|
777
|
+
}),
|
715
778
|
footerHeight,
|
716
779
|
mobileLogo: computed(
|
717
780
|
() =>
|
718
|
-
app.uiConfig.config.
|
719
|
-
app.uiConfig.config.
|
781
|
+
app.uiConfig.config.mobileLogo ??
|
782
|
+
app.uiConfig.config.logo ??
|
720
783
|
VcsDefaultLogoMobile,
|
721
784
|
),
|
722
785
|
imprint: computed(() => {
|
723
|
-
if (app.uiConfig.config.
|
786
|
+
if (app.uiConfig.config.imprint) {
|
724
787
|
return {
|
725
788
|
title: 'footer.imprint.title',
|
726
789
|
tooltip: 'footer.imprint.tooltip',
|
727
|
-
...app.uiConfig.config.
|
790
|
+
...app.uiConfig.config.imprint,
|
728
791
|
};
|
729
792
|
}
|
730
793
|
return undefined;
|
731
794
|
}),
|
732
795
|
dataProtection: computed(() => {
|
733
|
-
if (app.uiConfig.config.
|
796
|
+
if (app.uiConfig.config.dataProtection) {
|
734
797
|
return {
|
735
798
|
title: 'footer.dataProtection.title',
|
736
799
|
tooltip: 'footer.dataProtection.tooltip',
|
737
|
-
...app.uiConfig.config.
|
800
|
+
...app.uiConfig.config.dataProtection,
|
738
801
|
};
|
739
802
|
}
|
740
803
|
return undefined;
|
741
804
|
}),
|
742
805
|
splashScreenRef,
|
743
806
|
splashScreen: computed(() => {
|
744
|
-
if (app.uiConfig.config.
|
807
|
+
if (app.uiConfig.config.splashScreen) {
|
745
808
|
return {
|
746
809
|
title: 'components.splashScreen.name',
|
747
810
|
tooltip: 'components.splashScreen.tooltip',
|
@@ -749,7 +812,7 @@
|
|
749
812
|
width: '800px',
|
750
813
|
height: '400px',
|
751
814
|
},
|
752
|
-
...app.uiConfig.config.
|
815
|
+
...app.uiConfig.config.splashScreen,
|
753
816
|
};
|
754
817
|
}
|
755
818
|
return undefined;
|