@vcmap/ui 5.0.0-rc.28 → 5.0.0-rc.30
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/config/base.config.json +22 -0
- package/config/dev.config.json +4 -0
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/dist/assets/cesium/Workers/package.js +1 -1
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/{cesium.973919.js → cesium.eaf7cc.js} +149552 -149560
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.7a2173.js → core.b16511.js} +4077 -3965
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-c115e3a1.js +1 -0
- package/dist/assets/{ol.f6e2e4.js → ol.4bbf0f.js} +11405 -11126
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.bd7a9a.css → ui.ab815e.css} +2 -2
- package/dist/assets/{ui.bd7a9a.js → ui.ab815e.js} +4232 -3512
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.95f6c3.js → vuetify.ea3fa8.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.js +7 -0
- package/lib/olLib.js +6 -0
- package/package.json +3 -3
- package/plugins/@vcmap/search-nominatim/SearchNominatimEditor.vue +90 -0
- package/plugins/@vcmap/search-nominatim/index.js +37 -0
- package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +37 -1
- package/plugins/@vcmap-show-case/form-inputs-example/index.js +3 -0
- package/plugins/@vcmap-show-case/form-inputs-example/validation.js +11 -0
- package/plugins/@vcmap-show-case/style-input-example/styleExample.vue +0 -1
- package/plugins/@vcmap-show-case/vector-properties-example/index.js +40 -0
- package/plugins/@vcmap-show-case/vector-properties-example/package.json +5 -0
- package/plugins/@vcmap-show-case/vector-properties-example/vectorPropertiesExample.vue +109 -0
- package/plugins/@vcmap-show-case/window-tester/WindowExample.vue +27 -9
- package/plugins/@vcmap-show-case/window-tester/index.js +13 -1
- package/plugins/@vcmap-show-case/window-tester/windowExampleToggleChild.vue +11 -10
- package/src/actions/actionHelper.js +7 -3
- package/src/application/VcsApp.vue +31 -0
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +282 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +12 -5
- package/src/components/icons/+all.js +3 -3
- package/src/components/lists/VcsTreeviewLeaf.vue +1 -1
- package/src/components/lists/VcsTreeviewSearchbar.vue +9 -4
- package/src/components/plugins/AbstractConfigEditor.vue +84 -0
- package/src/components/style/VcsImageSelector.vue +6 -5
- package/src/components/style/VcsTextSelector.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +100 -13
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +737 -0
- package/src/components/vector-properties/composables.js +93 -0
- package/src/contentTree/contentTreeCollection.js +3 -0
- package/src/featureInfo/abstractFeatureInfoView.js +3 -1
- package/src/featureInfo/balloonFeatureInfoView.js +3 -2
- package/src/featureInfo/featureInfo.js +1 -0
- package/src/i18n/de.js +44 -9
- package/src/i18n/en.js +42 -7
- package/src/manager/collectionManager/collectionComponent.js +1 -1
- package/src/manager/window/WindowComponent.vue +4 -1
- package/src/manager/window/WindowComponentHeader.vue +25 -13
- package/src/manager/window/windowManager.js +6 -2
- package/src/navigation/overviewMap.js +1 -1
- package/src/pluginHelper.js +57 -17
- package/src/uiConfig.js +1 -0
- package/src/vcsUiApp.js +45 -34
- package/dist/assets/index-1b09f88d.js +0 -1
- /package/dist/assets/{vue.d4be99.js → vue.67e80f.js} +0 -0
- /package/dist/assets/{vuetify.95f6c3.css → vuetify.ea3fa8.css} +0 -0
- /package/src/components/icons/{PolygonIcon.vue → PointIcon.vue} +0 -0
package/src/vcsUiApp.js
CHANGED
@@ -1,24 +1,19 @@
|
|
1
1
|
import {
|
2
|
-
VcsApp,
|
3
|
-
moduleIdSymbol,
|
4
2
|
Collection,
|
5
|
-
makeOverrideCollection,
|
6
|
-
destroyCollection,
|
7
|
-
OverrideClassRegistry,
|
8
3
|
defaultDynamicModuleId,
|
4
|
+
destroyCollection,
|
5
|
+
getObjectFromClassRegistry,
|
6
|
+
makeOverrideCollection,
|
7
|
+
moduleIdSymbol,
|
9
8
|
ObliqueMap,
|
9
|
+
OverrideClassRegistry,
|
10
|
+
VcsApp,
|
11
|
+
VcsEvent,
|
10
12
|
Viewpoint,
|
11
13
|
volatileModuleId,
|
12
|
-
VcsEvent,
|
13
|
-
getObjectFromClassRegistry,
|
14
14
|
} from '@vcmap/core';
|
15
15
|
import { getLogger as getLoggerByName } from '@vcsuite/logger';
|
16
|
-
import {
|
17
|
-
isValidPackageName,
|
18
|
-
loadPlugin,
|
19
|
-
serializePlugin,
|
20
|
-
deserializePlugin,
|
21
|
-
} from './pluginHelper.js';
|
16
|
+
import { deserializePlugin, serializePlugin } from './pluginHelper.js';
|
22
17
|
import ToolboxManager, {
|
23
18
|
setupDefaultGroups,
|
24
19
|
} from './manager/toolbox/toolboxManager.js';
|
@@ -54,8 +49,15 @@ import { callbackClassRegistry } from './callback/vcsCallback.js';
|
|
54
49
|
/**
|
55
50
|
* @typedef {Object} PluginConfig
|
56
51
|
* @property {string} name
|
57
|
-
* @property {string|undefined} entry
|
58
|
-
* @property {string|undefined} version
|
52
|
+
* @property {string|undefined} entry - path to the plugin's index.js
|
53
|
+
* @property {string|undefined} version - version or version range
|
54
|
+
*/
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @typedef {Object} PluginConfigEditor
|
58
|
+
* @property {import("vue").Component} component - A editor component to configure a plugin or item
|
59
|
+
* @property {string} [collectionName='plugins'] - The collection the item belongs to. Default is plugins collection.
|
60
|
+
* @property {string} [itemName] - The item the editor can be used for. Can be a name or className. Default is the plugin's name.
|
59
61
|
*/
|
60
62
|
|
61
63
|
/**
|
@@ -67,6 +69,8 @@ import { callbackClassRegistry } from './callback/vcsCallback.js';
|
|
67
69
|
*/
|
68
70
|
|
69
71
|
/**
|
72
|
+
* Interface for VcsPlugins.
|
73
|
+
* The function implementing the interface should not throw!
|
70
74
|
* @interface VcsPlugin
|
71
75
|
* @template {Object} P
|
72
76
|
* @template {Object} S
|
@@ -75,9 +79,11 @@ import { callbackClassRegistry } from './callback/vcsCallback.js';
|
|
75
79
|
* @property {Object<string, *>} [i18n] - the i18n messages of this plugin
|
76
80
|
* @property {function(VcsUiApp, S=)} initialize - called on plugin added. Is passed the VcsUiApp and optionally, the state for the plugin
|
77
81
|
* @property {function(VcsUiApp)} onVcsAppMounted - called on mounted of VcsApp.vue
|
78
|
-
* @property {function():P} [toJSON] - serialization
|
82
|
+
* @property {function():P} [toJSON] - should return the plugin's serialization excluding all default values
|
83
|
+
* @property {function():P} [getDefaultOptions] - should return the plugin's default options
|
84
|
+
* @property {function(boolean=):S|Promise<S>} [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
|
85
|
+
* @property {Array<PluginConfigEditor>} [getConfigEditors] - should return components for configuring the plugin or custom items defined by the plugin
|
79
86
|
* @property {function():Promise<void>} destroy
|
80
|
-
* @property {function(boolean=):S|Promise<S>} [getState] - should return the plugins 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
|
81
87
|
* @api
|
82
88
|
*/
|
83
89
|
|
@@ -443,6 +449,27 @@ class VcsUiApp extends VcsApp {
|
|
443
449
|
return this._notifier;
|
444
450
|
}
|
445
451
|
|
452
|
+
/**
|
453
|
+
* Returns a callback function providing a URL to help page.
|
454
|
+
* The default helpBaseUrl can be changed by adding an 'helpBaseUrl' item to the UiConfig Collection.
|
455
|
+
* The callback derives the url from the VC Map mayor and minor version, the current app locale and a provided path pointing to a specific help section.
|
456
|
+
* This function can be used for the WindowState infoUrlCallback property.
|
457
|
+
* @param {string} [path] - the path to a help section
|
458
|
+
* @param {string} [subpage='vc-map'] - path to a subpage. Default is 'vc-map'.
|
459
|
+
* @returns {function():string}
|
460
|
+
*/
|
461
|
+
getHelpUrlCallback(path = '', subpage = 'vc-map') {
|
462
|
+
const mayorMinorVersion = /\d+\.\d+/.exec(VcsUiApp.getVersion())[0];
|
463
|
+
return () => {
|
464
|
+
const base =
|
465
|
+
this.uiConfig.config.value.helpBaseUrl || 'https://help.vc.systems/';
|
466
|
+
const url = `${subpage}-${this.locale}/v${mayorMinorVersion}/${path}`;
|
467
|
+
// const url = `${this.locale}/${subpage}/v${mayorMinorVersion}/${path}`;
|
468
|
+
const { href } = new URL(url, base);
|
469
|
+
return href.replace(/\/+/g, '/');
|
470
|
+
};
|
471
|
+
}
|
472
|
+
|
446
473
|
/**
|
447
474
|
* Get the state of the application. When passed the forUrl flag, only a minimal set of states shall be provided for a sharable link to the current state (to ensure
|
448
475
|
* the maximum URL length is not exceeded). This includes: layer active state & styling, active map, active viewpoint,
|
@@ -524,23 +551,7 @@ class VcsUiApp extends VcsApp {
|
|
524
551
|
async _parseModule(module) {
|
525
552
|
const { config } = module;
|
526
553
|
if (Array.isArray(config.plugins)) {
|
527
|
-
|
528
|
-
config.plugins.map(async (pluginConfig) => {
|
529
|
-
const plugin = await loadPlugin(pluginConfig.name, pluginConfig);
|
530
|
-
if (!plugin) {
|
531
|
-
return null;
|
532
|
-
}
|
533
|
-
if (!isValidPackageName(plugin.name)) {
|
534
|
-
getLogger().warning(
|
535
|
-
`plugin ${plugin.name} has no valid package name!`,
|
536
|
-
);
|
537
|
-
}
|
538
|
-
plugin[moduleIdSymbol] = module._id;
|
539
|
-
return plugin;
|
540
|
-
}),
|
541
|
-
);
|
542
|
-
|
543
|
-
plugins.filter((p) => p).map((p) => this._plugins.override(p));
|
554
|
+
await this._plugins.parseItems(config.plugins, module._id);
|
544
555
|
}
|
545
556
|
if (Array.isArray(config.i18n)) {
|
546
557
|
await this.i18n.parseItems(config.i18n, module._id);
|
@@ -1 +0,0 @@
|
|
1
|
-
import{initAppFromAppConfig as p}from"./ui.bd7a9a.js";p("#app","app.config.json");
|
File without changes
|
File without changes
|
File without changes
|