@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
package/src/vcsUiApp.js
CHANGED
@@ -48,40 +48,46 @@ import { createVcsVuetify } from './vuePlugins/vuetify.js';
|
|
48
48
|
|
49
49
|
/**
|
50
50
|
* @typedef {import("@vcmap/core").VcsModuleConfig & {
|
51
|
-
* plugins?:
|
51
|
+
* plugins?: Record<string, unknown>[],
|
52
52
|
* contentTree?: import("./contentTree/contentTreeItem.js").ContentTreeItemOptions[],
|
53
53
|
* uiConfig?: import("./uiConfig.js").UiConfigurationItem<unknown>[],
|
54
54
|
* featureInfo?: import("./featureInfo/abstractFeatureInfoView.js").FeatureInfoViewOptions[],
|
55
|
-
* i18n?:
|
55
|
+
* i18n?: import("./i18n/i18nCollection.js").I18nConfigurationItem[]
|
56
56
|
* }} VcsUiModuleConfig
|
57
57
|
*/
|
58
58
|
|
59
59
|
/**
|
60
|
-
* @typedef {
|
60
|
+
* @typedef {{ name: string, entry?: string, version?: string}} PluginConfig
|
61
61
|
* @property {string} name
|
62
62
|
* @property {string|undefined} [entry] - path to the plugin's index.js
|
63
63
|
* @property {string|undefined} [version] - version or version range
|
64
64
|
*/
|
65
65
|
|
66
66
|
/**
|
67
|
-
* @typedef {import("vue").Component<{ getConfig():
|
68
|
-
* title?: string
|
69
|
-
* }} PluginConfigEditorComponent
|
67
|
+
* @typedef {import("vue").Component<{ getConfig(): Config, setConfig(config?: Config): void }>} PluginConfigEditorComponent
|
70
68
|
* @template {Object} Config
|
71
69
|
*/
|
72
70
|
|
73
71
|
/**
|
74
|
-
* @typedef {
|
75
|
-
*
|
72
|
+
* @typedef {{
|
73
|
+
* component: PluginConfigEditorComponent<Config>,
|
74
|
+
* title?: string,
|
75
|
+
* collectionName?: string,
|
76
|
+
* itemName?: string,
|
77
|
+
* infoUrlCallback?: () => string,
|
78
|
+
* }} PluginConfigEditor
|
79
|
+
* @template {Object} Config
|
80
|
+
* @property {PluginConfigEditorComponent<Config>} component - A editor component to configure a plugin or item
|
81
|
+
* @property {string} [title] - optional title to render in the window header & actions of this editor
|
76
82
|
* @property {string} [collectionName='plugins'] - The collection the item belongs to. Default is plugins collection.
|
77
83
|
* @property {string} [itemName] - The item the editor can be used for. Can be a name or className. Default is the plugin's name.
|
78
84
|
* @property {function():string} [infoUrlCallback] - An optional function returning an url referencing help or further information regarding the config editor.
|
79
85
|
*/
|
80
86
|
|
81
87
|
/**
|
82
|
-
* @typedef {function(
|
83
|
-
* @template {Object}
|
84
|
-
* @template {Object}
|
88
|
+
* @typedef {function(Config, string):VcsPlugin<Config, State>} createPlugin
|
89
|
+
* @template {Object} Config
|
90
|
+
* @template {Object} State
|
85
91
|
*/
|
86
92
|
|
87
93
|
/**
|
@@ -92,22 +98,22 @@ import { createVcsVuetify } from './vuePlugins/vuetify.js';
|
|
92
98
|
* version: string,
|
93
99
|
* mapVersion: string,
|
94
100
|
* i18n?: Object<string, unknown>,
|
95
|
-
* initialize?: function(import("@src/vcsUiApp.js").default,
|
101
|
+
* initialize?: function(import("@src/vcsUiApp.js").default, State=):void|Promise<void>,
|
96
102
|
* onVcsAppMounted?: function(import("@src/vcsUiApp.js").default):void,
|
97
|
-
* toJSON?: function():
|
98
|
-
* getDefaultOptions?: function():
|
99
|
-
* getState?: function(boolean=):
|
100
|
-
* getConfigEditors?: function():Array<PluginConfigEditor
|
103
|
+
* toJSON?: function(): Config,
|
104
|
+
* getDefaultOptions?: function(): Config,
|
105
|
+
* getState?: function(boolean=):State|Promise<State>,
|
106
|
+
* getConfigEditors?: function():Array<PluginConfigEditor<Config>>,
|
101
107
|
* destroy?: function(): void
|
102
108
|
* }} VcsPlugin
|
103
|
-
* @template {Object}
|
104
|
-
* @template {Object}
|
109
|
+
* @template {Object} Config
|
110
|
+
* @template {Object} State
|
105
111
|
* @property {Object<string, *>} [i18n] - the i18n messages of this plugin
|
106
|
-
* @property {function(import("@src/vcsUiApp.js").default,
|
112
|
+
* @property {function(import("@src/vcsUiApp.js").default, State=)} initialize - called on plugin added. Is passed the VcsUiApp and optionally, the state for the plugin
|
107
113
|
* @property {function(import("@src/vcsUiApp.js").default)} onVcsAppMounted - called on mounted of VcsApp.vue
|
108
|
-
* @property {function():
|
109
|
-
* @property {function():
|
110
|
-
* @property {function(boolean=):S|Promise<
|
114
|
+
* @property {function():Config} [toJSON] - should return the plugin's serialization excluding all default values
|
115
|
+
* @property {function():Config} [getDefaultOptions] - should return the plugin's default options
|
116
|
+
* @property {function(boolean=):S|Promise<State>} [getState] - should return the plugin's state or a promise for said state. is passed a "for url" flag. If true, only the state relevant for sharing a URL should be passed and short keys shall be used
|
111
117
|
* @property {Array<PluginConfigEditor>} [getConfigEditors] - should return components for configuring the plugin or custom items defined by the plugin
|
112
118
|
* @api
|
113
119
|
*/
|
@@ -164,7 +170,7 @@ class VcsUiApp extends VcsApp {
|
|
164
170
|
*/
|
165
171
|
this.themeChanged = new VcsEvent();
|
166
172
|
/**
|
167
|
-
* @type {import("@vcmap/core").OverrideCollection<VcsPlugin>}
|
173
|
+
* @type {import("@vcmap/core").OverrideCollection<VcsPlugin, Collection<VcsPlugin>, Object>}
|
168
174
|
* @private
|
169
175
|
*/
|
170
176
|
this._plugins = makeOverrideCollection(
|
@@ -260,13 +266,19 @@ class VcsUiApp extends VcsApp {
|
|
260
266
|
);
|
261
267
|
|
262
268
|
/**
|
263
|
-
* @type {import("@vcmap/core").OverrideClassRegistry<
|
269
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<typeof ContentTreeItem>}
|
264
270
|
* @private
|
265
271
|
*/
|
266
272
|
this._contentTreeClassRegistry = new OverrideClassRegistry(
|
267
273
|
contentTreeClassRegistry,
|
268
274
|
);
|
269
275
|
|
276
|
+
/**
|
277
|
+
* @type {import("@vcmap/core").OverrideCollection<import("./uiConfig.js").UiConfigurationItem<unknown>, UiConfig>}
|
278
|
+
* @private
|
279
|
+
*/
|
280
|
+
this._uiConfig = new UiConfig(() => this.dynamicModuleId);
|
281
|
+
|
270
282
|
/**
|
271
283
|
* @type {import("@vcmap/core").OverrideCollection<import("./contentTree/contentTreeItem.js").ContentTreeItem, import("./contentTree/contentTreeCollection.js").ContentTreeCollection>}
|
272
284
|
* @private
|
@@ -298,10 +310,11 @@ class VcsUiApp extends VcsApp {
|
|
298
310
|
this._navbarManager = new NavbarManager();
|
299
311
|
|
300
312
|
/**
|
301
|
-
* @type {
|
313
|
+
* @type {Search}
|
302
314
|
* @private
|
303
315
|
*/
|
304
|
-
this.
|
316
|
+
this._search = new Search(this);
|
317
|
+
|
305
318
|
/**
|
306
319
|
* @type {import("@vcmap/core").OverrideClassRegistry<AbstractFeatureInfoView>}
|
307
320
|
* @private
|
@@ -340,12 +353,6 @@ class VcsUiApp extends VcsApp {
|
|
340
353
|
*/
|
341
354
|
this._contextMenuManager = new ContextMenuManager(this);
|
342
355
|
|
343
|
-
/**
|
344
|
-
* @type {Search}
|
345
|
-
* @private
|
346
|
-
*/
|
347
|
-
this._search = new Search(this);
|
348
|
-
|
349
356
|
/**
|
350
357
|
* @type {Notifier}
|
351
358
|
* @private
|
@@ -368,7 +375,7 @@ class VcsUiApp extends VcsApp {
|
|
368
375
|
}
|
369
376
|
|
370
377
|
/**
|
371
|
-
* @type {import("@vcmap/core").OverrideCollection<VcsPlugin
|
378
|
+
* @type {import("@vcmap/core").OverrideCollection<VcsPlugin, Collection<VcsPlugin>, Object>}
|
372
379
|
*/
|
373
380
|
get plugins() {
|
374
381
|
return this._plugins;
|
@@ -382,21 +389,21 @@ class VcsUiApp extends VcsApp {
|
|
382
389
|
}
|
383
390
|
|
384
391
|
/**
|
385
|
-
* @type {import("@vcmap/core").OverrideClassRegistry<
|
392
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<typeof import("./callback/vcsCallback.js").default>}
|
386
393
|
*/
|
387
394
|
get callbackClassRegistry() {
|
388
395
|
return this._callbackClassRegistry;
|
389
396
|
}
|
390
397
|
|
391
398
|
/**
|
392
|
-
* @type {import("@vcmap/core").OverrideClassRegistry<
|
399
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<typeof ContentTreeItem>}
|
393
400
|
*/
|
394
401
|
get contentTreeClassRegistry() {
|
395
402
|
return this._contentTreeClassRegistry;
|
396
403
|
}
|
397
404
|
|
398
405
|
/**
|
399
|
-
* @type {import("@vcmap/core").OverrideClassRegistry<
|
406
|
+
* @type {import("@vcmap/core").OverrideClassRegistry<typeof AbstractFeatureInfoView>}
|
400
407
|
*/
|
401
408
|
get featureInfoClassRegistry() {
|
402
409
|
return this._featureInfoClassRegistry;
|
@@ -527,7 +534,7 @@ class VcsUiApp extends VcsApp {
|
|
527
534
|
)[0];
|
528
535
|
return () => {
|
529
536
|
const base =
|
530
|
-
this.uiConfig.config.
|
537
|
+
this.uiConfig.config.helpBaseUrl || 'https://help.vc.systems/';
|
531
538
|
const url = `${
|
532
539
|
this.locale
|
533
540
|
}/${subpage}/v${mayorMinorVersion}/${path.replace(/^\//, '')}`;
|
@@ -1,61 +1,54 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
'medium-emphasis-opacity': number;
|
53
|
-
'vcs-item-height': string;
|
54
|
-
'vcs-font-size': string;
|
55
|
-
'vcs-font-family': string;
|
56
|
-
};
|
57
|
-
};
|
58
|
-
};
|
1
|
+
/**
|
2
|
+
* @typedef {Object} VcsColors
|
3
|
+
* @property {string} [base]
|
4
|
+
* @property {string} [base-lighten-5]
|
5
|
+
* @property {string} [base-lighten-4]
|
6
|
+
* @property {string} [base-lighten-3]
|
7
|
+
* @property {string} [base-lighten-2]
|
8
|
+
* @property {string} [base-lighten-1]
|
9
|
+
* @property {string} [base-darken-1]
|
10
|
+
* @property {string} [base-darken-2]
|
11
|
+
* @property {string} [base-darken-3]
|
12
|
+
* @property {string} [base-darken-4]
|
13
|
+
* @property {string} [primary]
|
14
|
+
* @property {string} [warning]
|
15
|
+
* @property {string} [error]
|
16
|
+
* @property {string} [info]
|
17
|
+
* @property {string} [success]
|
18
|
+
* @property {string} [surface-light]
|
19
|
+
*/
|
20
|
+
/**
|
21
|
+
* @typedef {Object} VcsVariables
|
22
|
+
* @property {string} [hover-opacity]
|
23
|
+
* @property {string} [high-emphasis-opacity]
|
24
|
+
* @property {string} [medium-emphasis-opacity]
|
25
|
+
* @property {string} [vcs-font-size]
|
26
|
+
* @property {string} [vcs-font-family]
|
27
|
+
*/
|
28
|
+
/**
|
29
|
+
* @typedef {Object} VcsTheme
|
30
|
+
* @property {VcsColors} [colors]
|
31
|
+
* @property {VcsVariables} [variables]
|
32
|
+
*/
|
33
|
+
/**
|
34
|
+
* @typedef {Object} VcsThemes
|
35
|
+
* @property {VcsTheme} [dark]
|
36
|
+
* @property {VcsTheme} [light]
|
37
|
+
*/
|
38
|
+
/**
|
39
|
+
* @param {VcsThemes} [options]
|
40
|
+
* @param {{ dark:string, light:string }|string} [primaryColor]
|
41
|
+
* @returns {VcsThemes}
|
42
|
+
*/
|
43
|
+
export function createVcsThemes(options?: VcsThemes | undefined, primaryColor?: string | {
|
44
|
+
dark: string;
|
45
|
+
light: string;
|
46
|
+
} | undefined): VcsThemes;
|
47
|
+
/**
|
48
|
+
* @param {ReturnType<typeof import("vuetify").createVuetify>} vuetify
|
49
|
+
* @param {VcsThemes} theme
|
50
|
+
*/
|
51
|
+
export function setTheme(vuetify: ReturnType<typeof import("vuetify").createVuetify>, theme: VcsThemes): void;
|
59
52
|
/**
|
60
53
|
* @param {import("vue-i18n").I18n} i18n
|
61
54
|
* @returns {ReturnType<typeof import("vuetify").createVuetify>}
|
@@ -81,15 +74,15 @@ export function getDefaultPrimaryColor(app: import("../vcsUiApp.js").default): s
|
|
81
74
|
*/
|
82
75
|
export function getColorByKey(app: import("../vcsUiApp.js").default, value: string, variant?: string | undefined): string;
|
83
76
|
/**
|
84
|
-
* returns the
|
77
|
+
* returns the fontSize as a number
|
85
78
|
* @returns {import("vue").ComputedRef<number>}
|
86
79
|
*/
|
87
|
-
export function
|
80
|
+
export function useFontSize(): import("vue").ComputedRef<number>;
|
88
81
|
/**
|
89
|
-
* returns the
|
82
|
+
* returns the default IconSize as a number, value is based on the fontSize
|
90
83
|
* @returns {import("vue").ComputedRef<number>}
|
91
84
|
*/
|
92
|
-
export function
|
85
|
+
export function useIconSize(): import("vue").ComputedRef<number>;
|
93
86
|
/**
|
94
87
|
* @type {{light:string,dark:string}}
|
95
88
|
*/
|
@@ -97,3 +90,36 @@ export const defaultPrimaryColor: {
|
|
97
90
|
light: string;
|
98
91
|
dark: string;
|
99
92
|
};
|
93
|
+
export type VcsColors = {
|
94
|
+
base?: string | undefined;
|
95
|
+
"base-lighten-5"?: string | undefined;
|
96
|
+
"base-lighten-4"?: string | undefined;
|
97
|
+
"base-lighten-3"?: string | undefined;
|
98
|
+
"base-lighten-2"?: string | undefined;
|
99
|
+
"base-lighten-1"?: string | undefined;
|
100
|
+
"base-darken-1"?: string | undefined;
|
101
|
+
"base-darken-2"?: string | undefined;
|
102
|
+
"base-darken-3"?: string | undefined;
|
103
|
+
"base-darken-4"?: string | undefined;
|
104
|
+
primary?: string | undefined;
|
105
|
+
warning?: string | undefined;
|
106
|
+
error?: string | undefined;
|
107
|
+
info?: string | undefined;
|
108
|
+
success?: string | undefined;
|
109
|
+
"surface-light"?: string | undefined;
|
110
|
+
};
|
111
|
+
export type VcsVariables = {
|
112
|
+
"hover-opacity"?: string | undefined;
|
113
|
+
"high-emphasis-opacity"?: string | undefined;
|
114
|
+
"medium-emphasis-opacity"?: string | undefined;
|
115
|
+
"vcs-font-size"?: string | undefined;
|
116
|
+
"vcs-font-family"?: string | undefined;
|
117
|
+
};
|
118
|
+
export type VcsTheme = {
|
119
|
+
colors?: VcsColors | undefined;
|
120
|
+
variables?: VcsVariables | undefined;
|
121
|
+
};
|
122
|
+
export type VcsThemes = {
|
123
|
+
dark?: VcsTheme | undefined;
|
124
|
+
light?: VcsTheme | undefined;
|
125
|
+
};
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import { createVuetify, useTheme } from 'vuetify';
|
2
|
+
import { VSvgIcon } from 'vuetify/components';
|
2
3
|
import { useI18n } from 'vue-i18n';
|
3
4
|
import 'vuetify/styles';
|
4
5
|
import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n';
|
5
|
-
import { computed } from 'vue';
|
6
|
+
import { computed, h } from 'vue';
|
7
|
+
import DOMPurify from 'dompurify';
|
6
8
|
import Icons from '../components/icons/+all.js';
|
7
9
|
|
8
10
|
/**
|
@@ -13,7 +15,53 @@ export const defaultPrimaryColor = {
|
|
13
15
|
dark: '#27B97C',
|
14
16
|
};
|
15
17
|
|
16
|
-
|
18
|
+
/**
|
19
|
+
* @typedef {Object} VcsColors
|
20
|
+
* @property {string} [base]
|
21
|
+
* @property {string} [base-lighten-5]
|
22
|
+
* @property {string} [base-lighten-4]
|
23
|
+
* @property {string} [base-lighten-3]
|
24
|
+
* @property {string} [base-lighten-2]
|
25
|
+
* @property {string} [base-lighten-1]
|
26
|
+
* @property {string} [base-darken-1]
|
27
|
+
* @property {string} [base-darken-2]
|
28
|
+
* @property {string} [base-darken-3]
|
29
|
+
* @property {string} [base-darken-4]
|
30
|
+
* @property {string} [primary]
|
31
|
+
* @property {string} [warning]
|
32
|
+
* @property {string} [error]
|
33
|
+
* @property {string} [info]
|
34
|
+
* @property {string} [success]
|
35
|
+
* @property {string} [surface-light]
|
36
|
+
*/
|
37
|
+
|
38
|
+
/**
|
39
|
+
* @typedef {Object} VcsVariables
|
40
|
+
* @property {string} [hover-opacity]
|
41
|
+
* @property {string} [high-emphasis-opacity]
|
42
|
+
* @property {string} [medium-emphasis-opacity]
|
43
|
+
* @property {string} [vcs-font-size]
|
44
|
+
* @property {string} [vcs-font-family]
|
45
|
+
*/
|
46
|
+
|
47
|
+
/**
|
48
|
+
* @typedef {Object} VcsTheme
|
49
|
+
* @property {VcsColors} [colors]
|
50
|
+
* @property {VcsVariables} [variables]
|
51
|
+
*/
|
52
|
+
|
53
|
+
/**
|
54
|
+
* @typedef {Object} VcsThemes
|
55
|
+
* @property {VcsTheme} [dark]
|
56
|
+
* @property {VcsTheme} [light]
|
57
|
+
*/
|
58
|
+
|
59
|
+
/**
|
60
|
+
* @param {VcsThemes} [options]
|
61
|
+
* @param {{ dark:string, light:string }|string} [primaryColor]
|
62
|
+
* @returns {VcsThemes}
|
63
|
+
*/
|
64
|
+
export function createVcsThemes(options, primaryColor) {
|
17
65
|
return {
|
18
66
|
light: {
|
19
67
|
colors: {
|
@@ -27,20 +75,22 @@ export function createVcsThemes() {
|
|
27
75
|
'base-darken-2': '#6B6B6B',
|
28
76
|
'base-darken-3': '#525252',
|
29
77
|
'base-darken-4': '#383838',
|
30
|
-
primary:
|
78
|
+
primary:
|
79
|
+
primaryColor?.dark ?? primaryColor ?? defaultPrimaryColor.light,
|
31
80
|
warning: '#FFCE00',
|
32
81
|
error: '#AA0000',
|
33
82
|
info: '#2196F3',
|
34
83
|
success: '#4CAF50',
|
35
84
|
'surface-light': '#ffffff',
|
85
|
+
...options?.light?.colors,
|
36
86
|
},
|
37
87
|
variables: {
|
38
88
|
'hover-opacity': 0.16,
|
39
89
|
'high-emphasis-opacity': 1,
|
40
90
|
'medium-emphasis-opacity': 1,
|
41
|
-
'vcs-item-height': '32px',
|
42
91
|
'vcs-font-size': '13px',
|
43
92
|
'vcs-font-family': 'Titillium Web',
|
93
|
+
...options?.light?.variables,
|
44
94
|
},
|
45
95
|
},
|
46
96
|
dark: {
|
@@ -55,25 +105,71 @@ export function createVcsThemes() {
|
|
55
105
|
'base-darken-2': '#D0D0D0',
|
56
106
|
'base-darken-3': '#EBEBEB',
|
57
107
|
'base-darken-4': '#F8F8F8',
|
58
|
-
primary: defaultPrimaryColor.dark,
|
108
|
+
primary: primaryColor?.dark ?? primaryColor ?? defaultPrimaryColor.dark,
|
59
109
|
warning: '#FFCE00',
|
60
110
|
error: '#FF5252',
|
61
111
|
info: '#2196F3',
|
62
112
|
success: '#4CAF50',
|
63
113
|
'surface-light': '#222222',
|
114
|
+
...options?.dark?.colors,
|
64
115
|
},
|
65
116
|
variables: {
|
66
117
|
'hover-opacity': 0.16,
|
67
118
|
'high-emphasis-opacity': 1,
|
68
119
|
'medium-emphasis-opacity': 1,
|
69
|
-
'vcs-
|
70
|
-
'vcs-font-size': '15px',
|
120
|
+
'vcs-font-size': '13px',
|
71
121
|
'vcs-font-family': 'Titillium Web',
|
122
|
+
...options?.dark?.variables,
|
72
123
|
},
|
73
124
|
},
|
74
125
|
};
|
75
126
|
}
|
76
127
|
|
128
|
+
/**
|
129
|
+
* @param {ReturnType<typeof import("vuetify").createVuetify>} vuetify
|
130
|
+
* @param {VcsThemes} theme
|
131
|
+
*/
|
132
|
+
export function setTheme(vuetify, theme) {
|
133
|
+
Object.assign(vuetify.theme.themes.value.light.colors, theme?.light?.colors);
|
134
|
+
Object.assign(
|
135
|
+
vuetify.theme.themes.value.light.variables,
|
136
|
+
theme?.light?.variables,
|
137
|
+
);
|
138
|
+
Object.assign(vuetify.theme.themes.value.dark.colors, theme?.dark?.colors);
|
139
|
+
Object.assign(
|
140
|
+
vuetify.theme.themes.value.dark.variables,
|
141
|
+
theme?.dark?.variables,
|
142
|
+
);
|
143
|
+
}
|
144
|
+
|
145
|
+
const imageUrlSet = {
|
146
|
+
component: (props) =>
|
147
|
+
h(
|
148
|
+
props.tag,
|
149
|
+
h('img', {
|
150
|
+
src: props.icon,
|
151
|
+
alt: 'custom icon',
|
152
|
+
style: { width: 'auto', height: '100%' },
|
153
|
+
}),
|
154
|
+
),
|
155
|
+
};
|
156
|
+
|
157
|
+
const svgStringSet = {
|
158
|
+
component: (props) => {
|
159
|
+
const svg = new DOMParser()
|
160
|
+
.parseFromString(DOMPurify.sanitize(props.icon), 'image/svg+xml')
|
161
|
+
.querySelector('svg');
|
162
|
+
svg?.classList.add('v-icon__svg');
|
163
|
+
return h(props.tag, {
|
164
|
+
innerHTML: svg?.outerHTML,
|
165
|
+
});
|
166
|
+
},
|
167
|
+
};
|
168
|
+
|
169
|
+
const svgPathDataSet = {
|
170
|
+
component: VSvgIcon,
|
171
|
+
};
|
172
|
+
|
77
173
|
/**
|
78
174
|
* @param {import("vue-i18n").I18n} i18n
|
79
175
|
* @returns {ReturnType<typeof import("vuetify").createVuetify>}
|
@@ -103,9 +199,6 @@ export function createVcsVuetify(i18n) {
|
|
103
199
|
VBtn: {
|
104
200
|
ripple: false,
|
105
201
|
},
|
106
|
-
VIcon: {
|
107
|
-
size: 16,
|
108
|
-
},
|
109
202
|
VList: {
|
110
203
|
density: 'compact',
|
111
204
|
class: 'pa-0 vcsList',
|
@@ -135,6 +228,9 @@ export function createVcsVuetify(i18n) {
|
|
135
228
|
density: 'compact',
|
136
229
|
ripple: false,
|
137
230
|
},
|
231
|
+
VDataTable: {
|
232
|
+
density: 'compact',
|
233
|
+
},
|
138
234
|
VSelect: {
|
139
235
|
density: 'compact',
|
140
236
|
},
|
@@ -166,6 +262,11 @@ export function createVcsVuetify(i18n) {
|
|
166
262
|
aliases: {
|
167
263
|
...Icons,
|
168
264
|
},
|
265
|
+
sets: {
|
266
|
+
imageUrl: imageUrlSet,
|
267
|
+
svgString: svgStringSet,
|
268
|
+
svgPathData: svgPathDataSet,
|
269
|
+
},
|
169
270
|
},
|
170
271
|
locale: {
|
171
272
|
adapter: createVueI18nAdapter({ i18n, useI18n }),
|
@@ -209,27 +310,25 @@ export function getColorByKey(app, value, variant) {
|
|
209
310
|
}
|
210
311
|
|
211
312
|
/**
|
212
|
-
* returns the
|
313
|
+
* returns the fontSize as a number
|
213
314
|
* @returns {import("vue").ComputedRef<number>}
|
214
315
|
*/
|
215
|
-
export function
|
316
|
+
export function useFontSize() {
|
216
317
|
const theme = useTheme();
|
217
318
|
return computed(() => {
|
218
|
-
const
|
319
|
+
const fontSize = theme.current.value.variables['vcs-font-size'] ?? 13;
|
219
320
|
// get rid of `px`
|
220
|
-
return Number.parseFloat(
|
321
|
+
return Number.parseFloat(fontSize);
|
221
322
|
});
|
222
323
|
}
|
223
324
|
|
224
325
|
/**
|
225
|
-
* returns the
|
326
|
+
* returns the default IconSize as a number, value is based on the fontSize
|
226
327
|
* @returns {import("vue").ComputedRef<number>}
|
227
328
|
*/
|
228
|
-
export function
|
229
|
-
const
|
329
|
+
export function useIconSize() {
|
330
|
+
const fontSize = useFontSize();
|
230
331
|
return computed(() => {
|
231
|
-
|
232
|
-
// get rid of `px`
|
233
|
-
return Number.parseFloat(fontSize);
|
332
|
+
return fontSize.value * (1.2 + 0.1 / 3);
|
234
333
|
});
|
235
334
|
}
|