@vcmap/ui 5.0.0-rc.21 → 5.0.0-rc.23
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/README.md +2 -2
- package/app.config.json +5 -0
- package/build/buildHelpers.js +1 -0
- package/build/buildPreview.js +2 -2
- package/build/commonViteConfig.js +1 -0
- package/config/aerowest.config.json +2 -0
- package/config/base.config.json +1 -0
- package/config/codes.config.json +2 -0
- package/config/dev.config.json +6 -0
- package/config/graphFeatureInfo.config.json +3 -1
- package/config/projects.config.json +27 -0
- package/config/www.config.json +27 -14
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.59d4d1.js → core.9342a1.js} +7912 -5474
- package/dist/assets/core.js +1 -1
- package/dist/assets/favicon.decf54cc.svg +10 -0
- package/dist/assets/index.fd041928.js +1 -0
- package/dist/assets/{ol.c1c512.js → ol.d2cba3.js} +12406 -12152
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.c27597.css +5 -0
- package/dist/assets/{ui.80175f.js → ui.c27597.js} +6508 -5169
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/vuetify.2f1432.css +5 -0
- package/dist/assets/{vuetify.efc158.js → vuetify.2f1432.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +6 -1
- package/index.html +5 -0
- package/index.js +7 -3
- package/lib/olLib.js +15 -1
- package/package.json +5 -4
- package/plugins/@vcmap/project-selector/{ContextsListComponent.vue → ModulesListComponent.vue} +10 -10
- package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +16 -16
- package/plugins/@vcmap/project-selector/README.md +15 -21
- package/plugins/@vcmap/project-selector/config.json +3 -3
- package/plugins/@vcmap/project-selector/de.json +3 -0
- package/plugins/@vcmap/project-selector/en.json +3 -0
- package/plugins/@vcmap/project-selector/index.js +76 -101
- package/plugins/@vcmap/simple-graph/index.js +1 -1
- package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +10 -4
- package/plugins/@vcmap-show-case/category-tester/Categories.vue +2 -2
- package/plugins/@vcmap-show-case/category-tester/Category.vue +1 -4
- package/plugins/@vcmap-show-case/config-editor/editor.vue +14 -14
- package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +92 -81
- package/plugins/@vcmap-show-case/form-inputs-example/index.js +8 -3
- package/plugins/@vcmap-show-case/form-inputs-example/validation.js +1 -1
- package/plugins/@vcmap-show-case/list-example/ListExample.vue +5 -2
- package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +202 -0
- package/plugins/@vcmap-show-case/table-example/README.md +3 -0
- package/plugins/@vcmap-show-case/table-example/index.js +47 -0
- package/plugins/@vcmap-show-case/table-example/package.json +5 -0
- package/plugins/@vcmap-show-case/wizard-example/wizardExample.vue +57 -23
- package/plugins/package.json +2 -1
- package/src/actions/actionHelper.js +16 -27
- package/src/actions/styleSelector.vue +26 -19
- package/src/application/VcsApp.vue +13 -5
- package/src/application/VcsAttributions.vue +2 -3
- package/src/application/VcsAttributionsFooter.vue +10 -16
- package/src/application/VcsNavbar.vue +1 -2
- package/src/application/VcsSettings.vue +21 -8
- package/src/assets/favicon-128.png +0 -0
- package/src/assets/favicon-180.png +0 -0
- package/src/assets/favicon-192.png +0 -0
- package/src/assets/favicon-32.png +0 -0
- package/src/assets/favicon.svg +10 -0
- package/src/components/buttons/VcsButton.vue +2 -3
- package/src/components/form-inputs-controls/VcsCheckbox.vue +46 -26
- package/src/components/form-inputs-controls/VcsDatePicker.vue +111 -0
- package/src/components/form-inputs-controls/VcsFormSection.vue +15 -13
- package/src/components/form-inputs-controls/VcsLabel.vue +10 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +38 -18
- package/src/components/form-inputs-controls/VcsSelect.vue +117 -59
- package/src/components/form-inputs-controls/VcsTextArea.vue +101 -60
- package/src/components/form-inputs-controls/VcsTextField.vue +182 -69
- package/src/components/form-inputs-controls/VcsWizard.vue +23 -15
- package/src/components/form-inputs-controls/VcsWizardStep.vue +18 -16
- package/src/components/form-inputs-controls/composables.js +26 -0
- package/src/components/form-output/VcsFormattedNumber.vue +1 -1
- package/src/components/icons/2DDistanceIcon.vue +0 -3
- package/src/components/icons/3DDistanceIcon.vue +0 -3
- package/src/components/icons/3DHeightIcon.vue +0 -3
- package/src/components/icons/CheckboxCheckedIcon.vue +4 -11
- package/src/components/icons/CheckboxIcon.vue +9 -2
- package/src/components/icons/CheckboxIndeterminateIcon.vue +4 -21
- package/src/components/icons/CommentIcon.vue +1 -5
- package/src/components/icons/LegendIcon.vue +10 -60
- package/src/components/icons/ObliqueViewIcon.vue +6 -8
- package/src/components/icons/SimpleCircleOutlinedIcon.vue +1 -1
- package/src/components/icons/SplitViewIcon.vue +0 -4
- package/src/components/icons/ToolsIcon.vue +2 -4
- package/src/components/lists/VcsActionList.vue +0 -1
- package/src/components/lists/VcsList.vue +30 -30
- package/src/components/lists/VcsTreeview.vue +2 -2
- package/src/components/lists/VcsTreeviewLeaf.vue +3 -9
- package/src/components/lists/VcsTreeviewSearchbar.vue +4 -4
- package/src/components/notification/VcsBadge.vue +6 -2
- package/src/components/notification/VcsHelp.vue +39 -0
- package/src/components/tables/VcsDataTable.vue +386 -0
- package/src/components/tables/VcsTable.vue +55 -254
- package/src/contentTree/contentTreeCollection.js +1 -1
- package/src/contentTree/layerContentTreeItem.js +3 -0
- package/src/downloadHelper.js +49 -0
- package/src/featureInfo/AddressBalloonComponent.vue +1 -1
- package/src/featureInfo/BalloonComponent.vue +21 -15
- package/src/featureInfo/abstractFeatureInfoView.js +1 -1
- package/src/featureInfo/featureInfo.js +27 -9
- package/src/featureInfo/tableFeatureInfoView.js +4 -0
- package/src/i18n/de.js +13 -1
- package/src/i18n/en.js +13 -1
- package/src/i18n/i18nCollection.js +22 -22
- package/src/init.js +90 -7
- package/src/legend/styleLegendItem.vue +24 -2
- package/src/legend/vcsLegend.vue +24 -31
- package/src/manager/categoryManager/CategoryComponent.vue +56 -47
- package/src/manager/categoryManager/CategoryManager.vue +23 -10
- package/src/manager/categoryManager/categoryManager.js +11 -11
- package/src/manager/navbarManager.js +18 -0
- package/src/manager/toolbox/GroupToolboxComponent.vue +2 -3
- package/src/manager/toolbox/SelectToolboxComponent.vue +11 -5
- package/src/manager/toolbox/ToolboxManager.vue +0 -7
- package/src/manager/window/WindowComponent.vue +10 -16
- package/src/manager/window/WindowComponentHeader.vue +6 -4
- package/src/manager/window/WindowManager.vue +14 -15
- package/src/manager/window/windowHelper.js +1 -1
- package/src/manager/window/windowManager.js +18 -7
- package/src/navigation/mapNavCompass.vue +1 -1
- package/src/navigation/mapNavigation.vue +6 -6
- package/src/navigation/obliqueRotation.vue +36 -13
- package/src/navigation/orientationToolsButton.vue +0 -1
- package/src/navigation/overviewMap.js +11 -20
- package/src/navigation/tiltSlider.vue +30 -6
- package/src/navigation/vcsZoomButton.vue +37 -11
- package/src/pluginHelper.js +20 -0
- package/src/search/resultsComponent.vue +0 -1
- package/src/search/search.js +19 -20
- package/src/search/searchComponent.vue +21 -7
- package/src/state.js +6 -6
- package/src/styles/_theming.scss +72 -3
- package/src/styles/_typography.scss +0 -5
- package/src/styles/main.scss +1 -0
- package/src/styles/shades.scss +2 -0
- package/src/styles/variables.scss +40 -4
- package/src/uiConfig.js +4 -3
- package/src/vcsUiApp.js +49 -40
- package/src/vuePlugins/i18n.js +1 -0
- package/src/vuePlugins/vuetify.js +59 -13
- package/start.js +8 -2
- package/dist/assets/index.a3861d4e.js +0 -1
- package/dist/assets/ui.80175f.css +0 -1
- package/dist/assets/vuetify.efc158.css +0 -5
- package/map.config.json +0 -44
- /package/dist/assets/{cesium.49585c.js → cesium.166f91.js} +0 -0
- /package/dist/assets/{vue.a08ab1.js → vue.5d00e9.js} +0 -0
package/src/vcsUiApp.js
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
import {
|
2
2
|
VcsApp,
|
3
|
-
|
3
|
+
moduleIdSymbol,
|
4
4
|
Collection,
|
5
5
|
makeOverrideCollection,
|
6
6
|
destroyCollection,
|
7
7
|
OverrideClassRegistry,
|
8
|
-
|
8
|
+
defaultDynamicModuleId,
|
9
9
|
ObliqueMap,
|
10
10
|
Viewpoint,
|
11
|
-
|
11
|
+
volatileModuleId,
|
12
|
+
VcsEvent,
|
12
13
|
} from '@vcmap/core';
|
13
14
|
import { getLogger as getLoggerByName } from '@vcsuite/logger';
|
14
15
|
import {
|
@@ -37,6 +38,9 @@ import Notifier from './notifier/notifier.js';
|
|
37
38
|
* @typedef {import("@vcmap/core").VcsAppConfig} VcsUiAppConfig
|
38
39
|
* @property {Array<Object>} [plugins]
|
39
40
|
* @property {Array<ContentTreeItemOptions>} [contentTree]
|
41
|
+
* @property {Array<UiConfigurationItem>} [uiConfig]
|
42
|
+
* @property {Array<FeatureInfoViewOptions>} [featureInfo]
|
43
|
+
* @property {Array<Object>} [i18n]
|
40
44
|
*/
|
41
45
|
|
42
46
|
/**
|
@@ -106,13 +110,18 @@ class VcsUiApp extends VcsApp {
|
|
106
110
|
|
107
111
|
constructor() {
|
108
112
|
super();
|
113
|
+
/**
|
114
|
+
* An event triggered when the vuetify theme mode changes or the primary color is updated by a new uiConfig entry.
|
115
|
+
* @type {VcsEvent<void>}
|
116
|
+
*/
|
117
|
+
this.themeChanged = new VcsEvent();
|
109
118
|
/**
|
110
119
|
* @type {import("@vcmap/core").OverrideCollection<VcsPlugin>}
|
111
120
|
* @private
|
112
121
|
*/
|
113
122
|
this._plugins = makeOverrideCollection(
|
114
123
|
new Collection(),
|
115
|
-
() => this.
|
124
|
+
() => this.dynamicModuleId,
|
116
125
|
serializePlugin,
|
117
126
|
deserializePlugin,
|
118
127
|
);
|
@@ -129,11 +138,11 @@ class VcsUiApp extends VcsApp {
|
|
129
138
|
this._contextMenuManager.removeOwner(plugin.name);
|
130
139
|
this._search.removeOwner(plugin.name);
|
131
140
|
if (plugin.i18n) {
|
132
|
-
this.i18n.addPluginMessages(plugin.name, plugin[
|
141
|
+
this.i18n.addPluginMessages(plugin.name, plugin[moduleIdSymbol], plugin.i18n);
|
133
142
|
}
|
134
143
|
if (plugin.initialize) {
|
135
144
|
let state;
|
136
|
-
if (this._cachedAppState.
|
145
|
+
if (this._cachedAppState.moduleIds.includes(plugin[moduleIdSymbol])) {
|
137
146
|
state = this._cachedAppState.plugins.find(s => s.name === plugin.name);
|
138
147
|
}
|
139
148
|
try {
|
@@ -150,7 +159,7 @@ class VcsUiApp extends VcsApp {
|
|
150
159
|
this._categoryManager.removeOwner(plugin.name);
|
151
160
|
this._contextMenuManager.removeOwner(plugin.name);
|
152
161
|
this._search.removeOwner(plugin.name);
|
153
|
-
this.i18n.removePluginMessages(plugin.name, plugin[
|
162
|
+
this.i18n.removePluginMessages(plugin.name, plugin[moduleIdSymbol]);
|
154
163
|
}),
|
155
164
|
];
|
156
165
|
|
@@ -187,7 +196,7 @@ class VcsUiApp extends VcsApp {
|
|
187
196
|
* @type {UiConfig}
|
188
197
|
* @private
|
189
198
|
*/
|
190
|
-
this._uiConfig = new UiConfig(() => this.
|
199
|
+
this._uiConfig = new UiConfig(() => this.dynamicModuleId);
|
191
200
|
/**
|
192
201
|
* @type {FeatureInfo}
|
193
202
|
* @private
|
@@ -204,7 +213,7 @@ class VcsUiApp extends VcsApp {
|
|
204
213
|
* @type {I18nCollection<Object>}
|
205
214
|
* @private
|
206
215
|
*/
|
207
|
-
this._i18n = new I18nCollection(() => this.
|
216
|
+
this._i18n = new I18nCollection(() => this.dynamicModuleId);
|
208
217
|
|
209
218
|
/**
|
210
219
|
* @type {CategoryManager}
|
@@ -336,17 +345,17 @@ class VcsUiApp extends VcsApp {
|
|
336
345
|
*/
|
337
346
|
async getState(forUrl) {
|
338
347
|
const state = createEmptyState();
|
339
|
-
state.
|
340
|
-
.filter(({
|
341
|
-
.map(({
|
348
|
+
state.moduleIds = this.modules
|
349
|
+
.filter(({ _id }) => _id !== defaultDynamicModuleId)
|
350
|
+
.map(({ _id }) => _id);
|
342
351
|
|
343
352
|
state.activeMap = this.maps.activeMap.name;
|
344
353
|
const viewpoint = await this.maps.activeMap.getViewpoint();
|
345
354
|
state.activeViewpoint = viewpoint?.isValid?.() ? viewpoint.toJSON() : undefined;
|
346
355
|
state.layers = [...this.layers]
|
347
356
|
.filter(l => l.isSupported(this.maps.activeMap) &&
|
348
|
-
l[
|
349
|
-
l[
|
357
|
+
l[moduleIdSymbol] !== defaultDynamicModuleId &&
|
358
|
+
l[moduleIdSymbol] !== volatileModuleId &&
|
350
359
|
(
|
351
360
|
((l.active || l.loading) && !l.activeOnStartup) ||
|
352
361
|
(!l.active && l.activeOnStartup) ||
|
@@ -361,8 +370,8 @@ class VcsUiApp extends VcsApp {
|
|
361
370
|
l.style &&
|
362
371
|
l.style.name !== l.defaultStyle.name &&
|
363
372
|
this.styles.has(l.style) &&
|
364
|
-
l.style[
|
365
|
-
l.style[
|
373
|
+
l.style[moduleIdSymbol] !== defaultDynamicModuleId &&
|
374
|
+
l.style[moduleIdSymbol] !== volatileModuleId
|
366
375
|
) {
|
367
376
|
layerState.styleName = l.style.name;
|
368
377
|
}
|
@@ -370,8 +379,8 @@ class VcsUiApp extends VcsApp {
|
|
370
379
|
});
|
371
380
|
|
372
381
|
state.plugins = await Promise.all([...this.plugins]
|
373
|
-
.filter(p => p[
|
374
|
-
p[
|
382
|
+
.filter(p => p[moduleIdSymbol] !== defaultDynamicModuleId &&
|
383
|
+
p[moduleIdSymbol] !== volatileModuleId &&
|
375
384
|
typeof p.getState === 'function')
|
376
385
|
.map(async p => ({ name: p.name, state: await p.getState(forUrl) })));
|
377
386
|
|
@@ -382,12 +391,12 @@ class VcsUiApp extends VcsApp {
|
|
382
391
|
}
|
383
392
|
|
384
393
|
/**
|
385
|
-
* @param {import("@vcmap/core").
|
394
|
+
* @param {import("@vcmap/core").VcsModule} module
|
386
395
|
* @returns {Promise<void>}
|
387
396
|
* @protected
|
388
397
|
*/
|
389
|
-
async
|
390
|
-
const { config } =
|
398
|
+
async _parseModule(module) {
|
399
|
+
const { config } = module;
|
391
400
|
if (Array.isArray(config.plugins)) {
|
392
401
|
const plugins = await Promise.all(config.plugins.map(async (pluginConfig) => {
|
393
402
|
const plugin = await loadPlugin(pluginConfig.name, pluginConfig);
|
@@ -397,7 +406,7 @@ class VcsUiApp extends VcsApp {
|
|
397
406
|
if (!isValidPackageName(plugin.name)) {
|
398
407
|
getLogger().warning(`plugin ${plugin.name} has no valid package name!`);
|
399
408
|
}
|
400
|
-
plugin[
|
409
|
+
plugin[moduleIdSymbol] = module._id;
|
401
410
|
return plugin;
|
402
411
|
}));
|
403
412
|
|
@@ -406,22 +415,22 @@ class VcsUiApp extends VcsApp {
|
|
406
415
|
.map(p => this._plugins.override(p));
|
407
416
|
}
|
408
417
|
if (Array.isArray(config.i18n)) {
|
409
|
-
await this.i18n.parseItems(config.i18n,
|
418
|
+
await this.i18n.parseItems(config.i18n, module._id);
|
410
419
|
}
|
411
|
-
await super.
|
412
|
-
await this._contentTree.parseItems(config.contentTree,
|
413
|
-
await this._uiConfig.parseItems(config.uiConfig,
|
414
|
-
await this._featureInfo.collection.parseItems(config.featureInfo,
|
420
|
+
await super._parseModule(module);
|
421
|
+
await this._contentTree.parseItems(config.contentTree, module._id);
|
422
|
+
await this._uiConfig.parseItems(config.uiConfig, module._id);
|
423
|
+
await this._featureInfo.collection.parseItems(config.featureInfo, module._id);
|
415
424
|
}
|
416
425
|
|
417
426
|
/**
|
418
|
-
* @param {import("@vcmap/core").
|
427
|
+
* @param {import("@vcmap/core").VcsModule} module
|
419
428
|
* @returns {Promise<void>}
|
420
429
|
* @protected
|
421
430
|
*/
|
422
|
-
async
|
423
|
-
await super.
|
424
|
-
if (this._cachedAppState.
|
431
|
+
async _setModuleState(module) {
|
432
|
+
await super._setModuleState(module);
|
433
|
+
if (this._cachedAppState.moduleIds.includes(module._id)) {
|
425
434
|
this._cachedAppState.layers.forEach((layerState) => {
|
426
435
|
const layer = this.layers.getByKey(layerState.name);
|
427
436
|
if (layer) {
|
@@ -451,23 +460,23 @@ class VcsUiApp extends VcsApp {
|
|
451
460
|
} else if (this._cachedAppState.activeViewpoint && this.maps.activeMap) {
|
452
461
|
await this.maps.activeMap.gotoViewpoint(new Viewpoint(this._cachedAppState.activeViewpoint));
|
453
462
|
}
|
454
|
-
this._cachedAppState.
|
463
|
+
this._cachedAppState.moduleIds.splice(this._cachedAppState.moduleIds.indexOf(module._id), 1);
|
455
464
|
}
|
456
465
|
}
|
457
466
|
|
458
467
|
/**
|
459
|
-
* @param {string}
|
468
|
+
* @param {string} moduleId
|
460
469
|
* @returns {Promise<void>}
|
461
470
|
* @protected
|
462
471
|
*/
|
463
|
-
async
|
472
|
+
async _removeModule(moduleId) {
|
464
473
|
await Promise.all([
|
465
|
-
super.
|
466
|
-
this._plugins.
|
467
|
-
this._i18n.
|
468
|
-
this._contentTree.
|
469
|
-
this._featureInfo.collection.
|
470
|
-
this._uiConfig.
|
474
|
+
super._removeModule(moduleId),
|
475
|
+
this._plugins.removeModule(moduleId),
|
476
|
+
this._i18n.removeModule(moduleId),
|
477
|
+
this._contentTree.removeModule(moduleId),
|
478
|
+
this._featureInfo.collection.removeModule(moduleId),
|
479
|
+
this._uiConfig.removeModule(moduleId),
|
471
480
|
]);
|
472
481
|
}
|
473
482
|
|
package/src/vuePlugins/i18n.js
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
import '@mdi/font/css/materialdesignicons.css';
|
2
2
|
import Vue from 'vue';
|
3
3
|
import Vuetify from 'vuetify/lib';
|
4
|
+
import { genVariations } from 'vuetify/lib/services/theme/utils.js';
|
5
|
+
import { colorToInt } from 'vuetify/lib/util/colorUtils.js';
|
4
6
|
import Icons from '../components/icons/+all.js';
|
5
7
|
|
6
8
|
Vue.use(Vuetify);
|
7
9
|
|
8
10
|
/**
|
9
|
-
* @type {string}
|
11
|
+
* @type {{light:string,dark:string}}
|
10
12
|
*/
|
11
|
-
export const defaultPrimaryColor =
|
13
|
+
export const defaultPrimaryColor = {
|
14
|
+
light: '#409D76',
|
15
|
+
dark: '#27B97C',
|
16
|
+
};
|
12
17
|
|
13
18
|
/**
|
14
19
|
* @returns {import("vuetify").default}
|
@@ -27,23 +32,38 @@ export function createVuetify() {
|
|
27
32
|
},
|
28
33
|
themes: {
|
29
34
|
light: {
|
30
|
-
|
31
|
-
|
32
|
-
|
35
|
+
base: {
|
36
|
+
base: '#9E9E9E',
|
37
|
+
lighten5: '#FFFFFF',
|
38
|
+
lighten4: '#F8F8F8',
|
39
|
+
lighten3: '#EBEBEB',
|
40
|
+
lighten2: '#D0D0D0',
|
41
|
+
lighten1: '#B8B8B8',
|
42
|
+
darken1: '#858585',
|
43
|
+
darken2: '#6B6B6B',
|
44
|
+
darken3: '#525252',
|
45
|
+
darken4: '#383838',
|
46
|
+
},
|
47
|
+
primary: defaultPrimaryColor.light,
|
33
48
|
warning: '#FFCE00',
|
34
|
-
'gray-200': '#DEDEDE',
|
35
|
-
gray: '#707070',
|
36
|
-
// todo: change remaining colors
|
37
|
-
secondary: '#222222',
|
38
49
|
error: '#AA0000',
|
39
50
|
info: '#2196F3',
|
40
51
|
success: '#4CAF50',
|
41
52
|
},
|
42
53
|
dark: {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
54
|
+
base: {
|
55
|
+
base: '#9E9E9E',
|
56
|
+
lighten5: '#FFFFFF',
|
57
|
+
lighten4: '#383838',
|
58
|
+
lighten3: '#525252',
|
59
|
+
lighten2: '#6B6B6B',
|
60
|
+
lighten1: '#858585',
|
61
|
+
darken1: '#B8B8B8',
|
62
|
+
darken2: '#D0D0D0',
|
63
|
+
darken3: '#EBEBEB',
|
64
|
+
darken4: '#F8F8F8',
|
65
|
+
},
|
66
|
+
primary: defaultPrimaryColor.dark,
|
47
67
|
warning: '#FFCE00',
|
48
68
|
error: '#FF5252',
|
49
69
|
info: '#2196F3',
|
@@ -64,3 +84,29 @@ export function createVuetify() {
|
|
64
84
|
* @type {import("vuetify").default}
|
65
85
|
*/
|
66
86
|
export const vuetify = createVuetify();
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Returns the default primary color depending on the selected theme mode
|
90
|
+
* @returns {string}
|
91
|
+
*/
|
92
|
+
export function getDefaultPrimaryColor() {
|
93
|
+
if (vuetify.framework.theme.isDark) {
|
94
|
+
return defaultPrimaryColor.dark;
|
95
|
+
}
|
96
|
+
return defaultPrimaryColor.light;
|
97
|
+
}
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Returns the color depending on the current theme mode
|
101
|
+
* @param {string} value - color key, e.g. 'primary'
|
102
|
+
* @param {string=} variant - color variant, e.g. 'lighten1', 'darken4', ...
|
103
|
+
* @returns {string}
|
104
|
+
*/
|
105
|
+
export function getColorByKey(value, variant) {
|
106
|
+
const mode = vuetify.framework.theme.isDark ? 'dark' : 'light';
|
107
|
+
const color = vuetify.framework.theme.themes[mode][value];
|
108
|
+
if (color && variant) {
|
109
|
+
return color[variant] ?? genVariations(value, colorToInt(color))[variant];
|
110
|
+
}
|
111
|
+
return color?.base ?? color;
|
112
|
+
}
|
package/start.js
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
-
|
1
|
+
// to load a app.config.json containing a set of configs
|
2
|
+
import { initAppFromAppConfig } from '@vcmap/ui';
|
2
3
|
|
3
|
-
|
4
|
+
initAppFromAppConfig('#app', 'app.config.json');
|
5
|
+
|
6
|
+
// to load a single module (config)
|
7
|
+
// import { initAppFromModule } from '@vcmap/ui';
|
8
|
+
|
9
|
+
// initAppFromModule('#app', 'config/projects.config.json');
|
@@ -1 +0,0 @@
|
|
1
|
-
import{initApp as s}from"./ui.80175f.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerpolicy&&(r.referrerPolicy=e.referrerpolicy),e.crossorigin==="use-credentials"?r.credentials="include":e.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();s("#app","map.config.json");
|