@vcmap/ui 6.0.0-rc.2 → 6.0.0-rc.5
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/build.js +40 -60
- package/build/buildHelpers.js +62 -19
- package/build/bundle.js +1 -1
- package/build/info/conf.json +1 -1
- package/build/info/publish.js +25 -31
- package/build/lintTypes.js +5 -0
- package/config/base.config.json +2 -1
- package/config/dev.config.json +7 -1
- package/config/projects.config.json +2 -1
- package/config/splashscreen.config.json +45 -0
- package/config/www.config.json +25 -22
- package/dist/.htaccess +7 -0
- package/dist/assets/@mdi/font/README.md +25 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min-680621ca.css +3 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
- package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/dist/assets/{cesium.0b750d.js → cesium-126f111a.js} +272 -385
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.cbf44a.js → core-1c8b8674.js} +2015 -2019
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol.86e93c.js → ol-27f9b3f3.js} +42521 -44394
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-7214428e.css +1 -0
- package/dist/assets/{ui.7c276c.js → ui-7214428e.js} +13968 -13907
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue-c78a5f76.js +6083 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.4d18fe.css → vuetify-88a2fabe.css} +2 -2
- package/dist/assets/{vuetify.4d18fe.js → vuetify-88a2fabe.js} +7793 -7940
- package/dist/assets/vuetify.js +1 -1
- package/dist/index.html +11 -10
- package/index.d.ts +11 -11
- package/index.html +5 -5
- package/index.js +9 -7
- package/lib/olLib.js +84 -23
- package/package.json +19 -19
- package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +41 -1
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +71 -32
- package/plugins/@vcmap-show-case/form-inputs-example/src/exampleActions.js +7 -11
- package/plugins/@vcmap-show-case/form-inputs-example/src/index.js +2 -2
- package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +21 -8
- 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/style-input-example/src/StyleExample.vue +29 -90
- package/plugins/@vcmap-show-case/toolbox-example/src/index.js +2 -1
- package/plugins/package.json +3 -23
- package/public/assets/@mdi/font/README.md +25 -0
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +2 -2
- package/public/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
- package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/src/actions/StyleSelector.vue +1 -1
- package/src/actions/actionHelper.js +33 -22
- package/src/actions/flightActions.js +5 -5
- package/src/actions/listActions.d.ts +4 -11
- package/src/actions/listActions.js +6 -22
- package/src/actions/stateRefAction.js +2 -2
- package/src/application/VcsApp.vue +147 -57
- package/src/application/VcsApp.vue.d.ts +298 -4
- package/src/application/VcsAttributions.vue +2 -13
- package/src/application/VcsAttributionsFooter.vue +10 -11
- package/src/application/VcsContainer.vue +26 -9
- package/src/application/VcsContainer.vue.d.ts +237 -0
- package/src/application/VcsMainMap.vue +7 -7
- package/src/application/VcsMainMap.vue.d.ts +2 -2
- package/src/application/VcsNavbar.vue +5 -1
- package/src/application/VcsPositionDisplay.vue +8 -23
- package/src/application/VcsPositionDisplay.vue.d.ts +0 -1
- package/src/application/VcsSettings.vue +10 -17
- package/src/application/VcsSplashScreen.vue +21 -40
- package/src/application/VcsSplashScreen.vue.d.ts +0 -2
- package/src/application/VcsTextPage.vue +12 -43
- package/src/application/VcsTextPage.vue.d.ts +4 -8
- package/src/application/VcsTextPageFooter.vue +23 -40
- package/src/components/buttons/VcsActionButtonList.vue +59 -3
- package/src/components/buttons/VcsActionButtonList.vue.d.ts +28 -0
- package/src/components/extent/VcsExtentEditor.vue +1 -1
- package/src/components/flight/VcsFlightAnchorsComponent.vue +63 -36
- package/src/components/flight/VcsFlightComponent.vue +16 -21
- package/src/components/flight/VcsFlightPlayer.vue +27 -5
- package/src/components/form-inputs-controls/VcsCheckbox.vue +9 -5
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +15 -13
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +3 -4
- package/src/components/form-inputs-controls/VcsCoordinate.vue +17 -4
- package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +5 -2
- package/src/components/form-inputs-controls/VcsDatePicker.vue +34 -60
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +1 -63
- package/src/components/form-inputs-controls/VcsFileInput.vue +17 -18
- package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +17 -3
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +40 -31
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +5 -2
- package/src/components/form-inputs-controls/VcsSlider.vue +13 -1
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsTextArea.vue +27 -26
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +20 -4
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/VcsWizardStep.vue +3 -6
- package/src/components/form-inputs-controls/vcsTextField.scss +9 -12
- package/src/components/form-output/VcsFormattedNumber.vue +21 -5
- package/src/components/form-output/VcsFormattedNumber.vue.d.ts +9 -0
- 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 +4 -3
- package/src/components/import/VcsImportComponent.vue.d.ts +1 -2
- package/src/components/lists/VcsActionList.vue +11 -7
- package/src/components/lists/VcsList.vue +30 -52
- package/src/components/lists/VcsList.vue.d.ts +14 -59
- package/src/components/lists/{VcsListItem.vue → VcsListItemComponent.vue} +68 -22
- package/src/components/lists/VcsListItemComponent.vue.d.ts +69 -0
- package/src/components/lists/VcsTreeview.vue +43 -16
- package/src/components/lists/VcsTreeview.vue.d.ts +14 -3
- package/src/components/lists/VcsTreeviewLeaf.vue +15 -6
- package/src/components/lists/VcsTreeviewSearchbar.vue +2 -2
- package/src/components/notification/VcsHelp.vue +1 -1
- package/src/components/notification/VcsHelp.vue.d.ts +3 -2
- package/src/components/section/VcsExpansionPanel.vue +101 -0
- package/src/components/section/VcsExpansionPanel.vue.d.ts +19 -0
- package/src/components/{form-inputs-controls → section}/VcsFormSection.vue +10 -4
- package/src/components/{form-inputs-controls → section}/VcsFormSection.vue.d.ts +1 -2
- package/src/components/style/MenuWrapper.vue +24 -26
- package/src/components/style/MenuWrapper.vue.d.ts +4 -4
- package/src/components/style/VcsFillMenu.vue +9 -16
- package/src/components/style/VcsFillMenu.vue.d.ts +0 -18
- package/src/components/style/VcsFillSelector.vue +13 -16
- package/src/components/style/VcsImageMenu.vue +8 -25
- package/src/components/style/VcsImageMenu.vue.d.ts +0 -27
- package/src/components/style/VcsImageSelector.vue +102 -167
- package/src/components/style/VcsImageSelector.vue.d.ts +15 -15
- package/src/components/style/VcsStrokeMenu.vue +8 -15
- package/src/components/style/VcsStrokeMenu.vue.d.ts +0 -18
- package/src/components/style/VcsStrokeSelector.vue +11 -18
- package/src/components/style/VcsTextMenu.vue +9 -12
- package/src/components/style/VcsTextMenu.vue.d.ts +0 -9
- package/src/components/style/VcsTextSelector.vue +79 -95
- package/src/components/style/VcsTextSelector.vue.d.ts +20 -22
- package/src/components/style/VcsVectorStyleComponent.vue +8 -19
- package/src/components/style/VcsVectorStyleComponent.vue.d.ts +1 -1
- package/src/components/style/composables.d.ts +0 -14
- package/src/components/style/composables.js +0 -49
- package/src/components/tables/VcsDataTable.vue +28 -22
- 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 +43 -9
- package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +1 -1
- package/src/components/viewpoint/VcsViewpointComponent.vue +23 -10
- package/src/components/viewpoint/VcsViewpointEditor.vue +2 -1
- 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 +7 -7
- package/src/featureInfo/BalloonComponent.vue +14 -15
- package/src/featureInfo/MarkdownBalloonComponent.vue +4 -2
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
- package/src/featureInfo/abstractFeatureInfoView.d.ts +6 -0
- package/src/featureInfo/abstractFeatureInfoView.js +15 -7
- package/src/featureInfo/featureInfo.d.ts +5 -5
- package/src/featureInfo/featureInfo.js +59 -41
- 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/init.d.ts +5 -38
- package/src/init.js +19 -18
- package/src/legend/StyleLegendItem.vue +4 -9
- package/src/legend/VcsLegend.vue +28 -54
- package/src/manager/buttonManager.js +4 -4
- package/src/manager/collectionManager/CollectionComponent.vue +17 -42
- package/src/manager/collectionManager/CollectionComponent.vue.d.ts +4 -2
- package/src/manager/collectionManager/CollectionComponentContent.vue +7 -6
- package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +3 -1
- package/src/manager/collectionManager/CollectionComponentList.vue +11 -9
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +6 -4
- package/src/manager/collectionManager/CollectionComponentProvider.vue +1 -1
- package/src/manager/collectionManager/CollectionComponentStandalone.vue +3 -2
- package/src/manager/collectionManager/CollectionManager.vue +1 -1
- package/src/manager/collectionManager/collectionComponentClass.d.ts +1 -1
- package/src/manager/collectionManager/collectionComponentClass.js +7 -10
- package/src/manager/collectionManager/collectionManager.js +10 -10
- package/src/manager/collectionManager/editorCollectionComponentClass.js +6 -5
- package/src/manager/contextMenu/contextMenuManager.js +2 -2
- package/src/manager/navbarManager.js +2 -2
- 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 +18 -6
- package/src/manager/toolbox/GroupToolboxComponent.vue +8 -4
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +7 -4
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/ToolboxManager.vue +9 -6
- package/src/manager/toolbox/ToolboxManager.vue.d.ts +1 -0
- package/src/manager/toolbox/toolboxManager.js +10 -10
- package/src/manager/window/WindowComponent.vue +12 -8
- package/src/manager/window/WindowComponentHeader.vue +29 -8
- package/src/manager/window/WindowComponentHeader.vue.d.ts +2 -0
- package/src/manager/window/WindowManager.vue +2 -2
- package/src/manager/window/windowManager.d.ts +2 -2
- package/src/manager/window/windowManager.js +4 -4
- package/src/navigation/MapNavigation.vue +20 -0
- 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 +8 -14
- package/src/search/SearchComponent.vue.d.ts +1 -0
- package/src/search/search.js +2 -2
- package/src/siteConfig.js +9 -9
- package/src/state.js +4 -4
- package/src/styles/_typography.scss +0 -2
- package/src/styles/main.scss +0 -4
- package/src/uiConfig.d.ts +300 -5
- package/src/uiConfig.js +28 -16
- package/src/vcsUiApp.d.ts +21 -17
- package/src/vcsUiApp.js +11 -10
- package/src/vuePlugins/vuetify.d.ts +2 -0
- package/src/vuePlugins/vuetify.js +14 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
- package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +0 -3
- package/dist/assets/index-8eGauqjA.js +0 -1
- package/dist/assets/ui.7c276c.css +0 -1
- package/dist/assets/vue.a3cd64.js +0 -6096
- package/public/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
- package/src/application/VcsCustomScreen.vue +0 -45
- package/src/application/VcsCustomScreen.vue.d.ts +0 -15
- package/src/application/markdownHelper.d.ts +0 -12
- package/src/application/markdownHelper.js +0 -70
- package/src/components/lists/VcsListItem.vue.d.ts +0 -21
- 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/dist/assets/{favicon-128.4c4ce5.png → favicon-128-4c4ce5df.png} +0 -0
- /package/dist/assets/{favicon-180.5b99c0.png → favicon-180-4c4ce5df.png} +0 -0
- /package/dist/assets/{favicon-192.0e205e.png → favicon-192-4c4ce5df.png} +0 -0
- /package/dist/assets/{favicon-32.6b9add.png → favicon-32-4c4ce5df.png} +0 -0
- /package/dist/assets/{favicon.d5ec97.svg → favicon-4c4ce5df.svg} +0 -0
- /package/dist/assets/font/{TitilliumWeb-Regular.9ca076.woff2 → TitilliumWeb-Regular-9ca076be.woff2} +0 -0
- /package/dist/assets/style/{icon-marker.70960f.png → icon-marker-70960f05.png} +0 -0
- /package/dist/assets/style/{icon-marker-blue.534e37.png → icon-marker-blue-534e374b.png} +0 -0
- /package/dist/assets/style/{icon-marker-green.0b6a92.png → icon-marker-green-0b6a92bc.png} +0 -0
- /package/dist/assets/style/{icon-marker-o.036477.png → icon-marker-o-036477fa.png} +0 -0
- /package/dist/assets/style/{icon-marker-o-blue.7b6d62.png → icon-marker-o-blue-7b6d6279.png} +0 -0
- /package/dist/assets/style/{icon-marker-o-green.c863c0.png → icon-marker-o-green-c863c0fa.png} +0 -0
- /package/dist/assets/style/{icon-marker-o-red.93ff58.png → icon-marker-o-red-93ff58df.png} +0 -0
- /package/dist/assets/style/{icon-marker-red.313d03.png → icon-marker-red-313d03e8.png} +0 -0
- /package/dist/assets/style/{icon-pin.b7ce77.png → icon-pin-b7ce771e.png} +0 -0
- /package/dist/assets/style/{icon-pin-blue.7be369.png → icon-pin-blue-7be369a3.png} +0 -0
- /package/dist/assets/style/{icon-pin-green.cbb935.png → icon-pin-green-cbb935fe.png} +0 -0
- /package/dist/assets/style/{icon-pin-red.3f25b2.png → icon-pin-red-3f25b245.png} +0 -0
- /package/public/assets/{favicon-128.png → favicon-128-4c4ce5df.png} +0 -0
- /package/public/assets/{favicon-180.png → favicon-180-4c4ce5df.png} +0 -0
- /package/public/assets/{favicon-192.png → favicon-192-4c4ce5df.png} +0 -0
- /package/public/assets/{favicon-32.png → favicon-32-4c4ce5df.png} +0 -0
- /package/public/assets/{favicon.svg → favicon-4c4ce5df.svg} +0 -0
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { v4 as uuid } from 'uuid';
|
2
|
-
import { check,
|
2
|
+
import { check, maybe, oneOf, optional } from '@vcsuite/check';
|
3
3
|
import {
|
4
4
|
Collection,
|
5
5
|
Extent,
|
@@ -48,8 +48,8 @@ import SearchComponent from '../search/SearchComponent.vue';
|
|
48
48
|
*/
|
49
49
|
export function getActionFromOptions(options) {
|
50
50
|
check(options.name, String);
|
51
|
-
|
52
|
-
|
51
|
+
check(options.title, maybe(String));
|
52
|
+
check(options.icon, maybe(String));
|
53
53
|
check(options.callback, Function);
|
54
54
|
options.active = parseBoolean(options.active, false);
|
55
55
|
options.hasUpdate = parseBoolean(options.hasUpdate, false);
|
@@ -67,8 +67,8 @@ export function getActionFromOptions(options) {
|
|
67
67
|
export function createMapButtonAction(actionOptions, mapName, maps) {
|
68
68
|
check(actionOptions, {
|
69
69
|
name: String,
|
70
|
-
icon:
|
71
|
-
title:
|
70
|
+
icon: optional(String),
|
71
|
+
title: optional(String),
|
72
72
|
});
|
73
73
|
check(mapName, String);
|
74
74
|
check(maps, MapCollection);
|
@@ -104,12 +104,12 @@ export function createToggleAction(
|
|
104
104
|
) {
|
105
105
|
check(actionOptions, {
|
106
106
|
name: String,
|
107
|
-
icon:
|
108
|
-
title:
|
109
|
-
hasUpdate:
|
107
|
+
icon: optional(String),
|
108
|
+
title: optional(String),
|
109
|
+
hasUpdate: optional(Boolean),
|
110
110
|
});
|
111
111
|
check(windowComponent, { id: String });
|
112
|
-
check(owner,
|
112
|
+
check(owner, oneOf(String, vcsAppSymbol));
|
113
113
|
|
114
114
|
const action = reactive({
|
115
115
|
...actionOptions,
|
@@ -153,11 +153,17 @@ export function createToggleAction(
|
|
153
153
|
export function createSearchButtonAction(app) {
|
154
154
|
let destroyAction = () => {};
|
155
155
|
const searchAction = ref(null);
|
156
|
+
const uiConfig = app.uiConfig.config;
|
157
|
+
|
156
158
|
const determineAction = () => {
|
157
159
|
if (app.windowManager.has('searchId')) {
|
158
160
|
app.windowManager.remove('searchId');
|
159
161
|
}
|
160
|
-
if (
|
162
|
+
if (
|
163
|
+
!uiConfig.hideSearch &&
|
164
|
+
app.search.size > 0 &&
|
165
|
+
searchAction.value === null
|
166
|
+
) {
|
161
167
|
const action = createToggleAction(
|
162
168
|
{
|
163
169
|
name: 'search.title',
|
@@ -178,7 +184,10 @@ export function createSearchButtonAction(app) {
|
|
178
184
|
);
|
179
185
|
destroyAction = action.destroy;
|
180
186
|
searchAction.value = reactive(action.action);
|
181
|
-
} else if (
|
187
|
+
} else if (
|
188
|
+
(uiConfig.hideSearch || app.search.size === 0) &&
|
189
|
+
searchAction.value !== null
|
190
|
+
) {
|
182
191
|
destroyAction();
|
183
192
|
destroyAction = () => {};
|
184
193
|
searchAction.value = null;
|
@@ -186,6 +195,8 @@ export function createSearchButtonAction(app) {
|
|
186
195
|
};
|
187
196
|
determineAction();
|
188
197
|
const listeners = [
|
198
|
+
app.uiConfig.added.addEventListener(determineAction),
|
199
|
+
app.uiConfig.removed.addEventListener(determineAction),
|
189
200
|
app.search.added.addEventListener(determineAction),
|
190
201
|
app.search.removed.addEventListener(determineAction),
|
191
202
|
];
|
@@ -256,10 +267,10 @@ export function createOverviewMapAction(
|
|
256
267
|
export function createModalAction(actionOptions, modalComponent, app, owner) {
|
257
268
|
check(actionOptions, {
|
258
269
|
name: String,
|
259
|
-
icon:
|
260
|
-
title:
|
270
|
+
icon: optional(String),
|
271
|
+
title: optional(String),
|
261
272
|
});
|
262
|
-
check(owner,
|
273
|
+
check(owner, oneOf(String, vcsAppSymbol));
|
263
274
|
|
264
275
|
const id = uuid();
|
265
276
|
const { position: windowPositionOptions, ...component } = modalComponent;
|
@@ -334,10 +345,10 @@ export function createModalAction(actionOptions, modalComponent, app, owner) {
|
|
334
345
|
export function createLinkAction(actionOptions, url) {
|
335
346
|
check(actionOptions, {
|
336
347
|
name: String,
|
337
|
-
icon:
|
338
|
-
title:
|
348
|
+
icon: optional(String),
|
349
|
+
title: optional(String),
|
339
350
|
});
|
340
|
-
check(url,
|
351
|
+
check(url, oneOf(String, Function));
|
341
352
|
|
342
353
|
return {
|
343
354
|
...actionOptions,
|
@@ -369,10 +380,10 @@ export function createGoToViewpointAction(
|
|
369
380
|
) {
|
370
381
|
check(actionOptions, {
|
371
382
|
name: String,
|
372
|
-
icon:
|
373
|
-
title:
|
383
|
+
icon: optional(String),
|
384
|
+
title: optional(String),
|
374
385
|
});
|
375
|
-
check(viewpoint,
|
386
|
+
check(viewpoint, oneOf(Viewpoint, String));
|
376
387
|
check(viewpointCollection, Collection);
|
377
388
|
check(mapCollection, MapCollection);
|
378
389
|
|
@@ -422,8 +433,8 @@ export function createZoomToFeatureAction(
|
|
422
433
|
) {
|
423
434
|
check(actionOptions, {
|
424
435
|
name: String,
|
425
|
-
icon:
|
426
|
-
title:
|
436
|
+
icon: optional(String),
|
437
|
+
title: optional(String),
|
427
438
|
});
|
428
439
|
check(feature, Feature);
|
429
440
|
check(mapCollection, MapCollection);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { reactive } from 'vue';
|
2
|
-
import { check,
|
2
|
+
import { check, maybe, ofEnum } from '@vcsuite/check';
|
3
3
|
import {
|
4
4
|
createFlightVisualization,
|
5
5
|
exportFlightAsGeoJson,
|
@@ -87,7 +87,7 @@ export const PlayerDirection = {
|
|
87
87
|
* @returns {{action: import("./actionHelper.js").VcsAction, destroy: () => void}}
|
88
88
|
*/
|
89
89
|
export function createStepAction(app, instance, direction) {
|
90
|
-
check(direction,
|
90
|
+
check(direction, ofEnum(PlayerDirection));
|
91
91
|
|
92
92
|
let player;
|
93
93
|
const action = reactive({
|
@@ -123,7 +123,7 @@ export function createStepAction(app, instance, direction) {
|
|
123
123
|
* @returns {{ action: import("./actionHelper.js").VcsAction & { listeners:Object<string,()=>void>, destroy: () => void }}}
|
124
124
|
*/
|
125
125
|
export function createFastAction(app, instance, direction) {
|
126
|
-
check(direction,
|
126
|
+
check(direction, ofEnum(PlayerDirection));
|
127
127
|
|
128
128
|
let player;
|
129
129
|
const sign = direction === PlayerDirection.Forward ? 1 : -1;
|
@@ -421,8 +421,8 @@ export function createExportFlightAction(instance, isPathExport = false) {
|
|
421
421
|
* @returns {Promise<boolean>}
|
422
422
|
*/
|
423
423
|
export async function importFlights(app, files, moduleId, importSuccessCb) {
|
424
|
-
|
425
|
-
|
424
|
+
check(moduleId, maybe(String));
|
425
|
+
check(importSuccessCb, maybe(Function));
|
426
426
|
|
427
427
|
const { vueI18n } = app;
|
428
428
|
const results = await Promise.all(
|
@@ -1,10 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* Creates an action for renaming an item in a VcsList. Shows VcsTextfield in VcsList.
|
3
|
-
* @param {import("../components/lists/VcsList.vue").VcsListItem} item
|
4
|
-
* @param {Partial<import("./actionHelper.js").ActionOptions>} [actionOptions={}]
|
5
|
-
* @returns {import("./actionHelper.js").VcsAction}
|
6
|
-
*/
|
7
|
-
export function createListItemRenameAction(item: import("../components/lists/VcsList.vue").VcsListItem, actionOptions?: Partial<import("./actionHelper.js").ActionOptions> | undefined): import("./actionHelper.js").VcsAction;
|
8
1
|
/**
|
9
2
|
* Creates an action for renaming an item in a VcsList.
|
10
3
|
* @param {import("@vcmap/core").Collection<T>} collection
|
@@ -16,23 +9,23 @@ export function createListItemRenameAction(item: import("../components/lists/Vcs
|
|
16
9
|
export function createListItemDeleteAction<T extends Object>(collection: import("@vcmap/core").Collection<T>, item: T, actionOptions?: Partial<import("./actionHelper.js").ActionOptions> | undefined): import("./actionHelper.js").VcsAction;
|
17
10
|
/**
|
18
11
|
* Creates an action based on a provided selection
|
19
|
-
* @param {import("vue").Ref<Array<import("../components/lists/
|
12
|
+
* @param {import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>} selection
|
20
13
|
* @param {import("./actionHelper.js").ActionOptions & {callback:import("./actionHelper.js").ActionCallback}} [actionOptions]
|
21
14
|
* @returns {{action: import("vue").UnwrapRef<import("./actionHelper.js").VcsAction>, destroy: import("vue").WatchStopHandle}}
|
22
15
|
*/
|
23
|
-
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?: (import("./actionHelper.js").ActionOptions & {
|
24
17
|
callback: import("./actionHelper.js").ActionCallback;
|
25
18
|
}) | undefined): {
|
26
19
|
action: import("vue").UnwrapRef<import("./actionHelper.js").VcsAction>;
|
27
20
|
destroy: import("vue").WatchStopHandle;
|
28
21
|
};
|
29
22
|
/**
|
30
|
-
* @param {import("vue").Ref<Array<import("../components/lists/
|
23
|
+
* @param {import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>} selection
|
31
24
|
* @param {import("./actionHelper.js").ActionCallback} exportCallback
|
32
25
|
* @param {string|symbol} owner
|
33
26
|
* @returns {{action: import("../manager/collectionManager/collectionManager.js").OwnedAction, destroy: (function(): void)}}
|
34
27
|
*/
|
35
|
-
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): {
|
36
29
|
action: import("../manager/collectionManager/collectionManager.js").OwnedAction;
|
37
30
|
destroy: (() => void);
|
38
31
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { reactive, watch } from 'vue';
|
2
|
-
import { check } from '@vcsuite/check';
|
2
|
+
import { check, oneOf, optional } from '@vcsuite/check';
|
3
3
|
import { getLogger } from '@vcsuite/logger';
|
4
4
|
import { parseGeoJSON } from '@vcmap/core';
|
5
5
|
import VcsImportComponent from '../components/import/VcsImportComponent.vue';
|
@@ -8,22 +8,6 @@ import { WindowSlot } from '../manager/window/windowManager.js';
|
|
8
8
|
import { vcsAppSymbol } from '../pluginHelper.js';
|
9
9
|
import { NotificationType } from '../notifier/notifier.js';
|
10
10
|
|
11
|
-
/**
|
12
|
-
* Creates an action for renaming an item in a VcsList. Shows VcsTextfield in VcsList.
|
13
|
-
* @param {import("../components/lists/VcsList.vue").VcsListItem} item
|
14
|
-
* @param {Partial<import("./actionHelper.js").ActionOptions>} [actionOptions={}]
|
15
|
-
* @returns {import("./actionHelper.js").VcsAction}
|
16
|
-
*/
|
17
|
-
export function createListItemRenameAction(item, actionOptions = {}) {
|
18
|
-
return {
|
19
|
-
name: 'list.renameItem',
|
20
|
-
...actionOptions,
|
21
|
-
callback: () => {
|
22
|
-
item.rename = true;
|
23
|
-
},
|
24
|
-
};
|
25
|
-
}
|
26
|
-
|
27
11
|
/**
|
28
12
|
* Creates an action for renaming an item in a VcsList.
|
29
13
|
* @param {import("@vcmap/core").Collection<T>} collection
|
@@ -50,15 +34,15 @@ export function createListItemDeleteAction(
|
|
50
34
|
|
51
35
|
/**
|
52
36
|
* Creates an action based on a provided selection
|
53
|
-
* @param {import("vue").Ref<Array<import("../components/lists/
|
37
|
+
* @param {import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>} selection
|
54
38
|
* @param {import("./actionHelper.js").ActionOptions & {callback:import("./actionHelper.js").ActionCallback}} [actionOptions]
|
55
39
|
* @returns {{action: import("vue").UnwrapRef<import("./actionHelper.js").VcsAction>, destroy: import("vue").WatchStopHandle}}
|
56
40
|
*/
|
57
41
|
export function createListItemBulkAction(selection, actionOptions) {
|
58
42
|
check(actionOptions, {
|
59
43
|
name: String,
|
60
|
-
icon:
|
61
|
-
title:
|
44
|
+
icon: optional(String),
|
45
|
+
title: optional(String),
|
62
46
|
callback: Function,
|
63
47
|
});
|
64
48
|
|
@@ -75,7 +59,7 @@ export function createListItemBulkAction(selection, actionOptions) {
|
|
75
59
|
}
|
76
60
|
|
77
61
|
/**
|
78
|
-
* @param {import("vue").Ref<Array<import("../components/lists/
|
62
|
+
* @param {import("vue").Ref<Array<import("../components/lists/VcsListItemComponent.vue").VcsListItem>>} selection
|
79
63
|
* @param {import("./actionHelper.js").ActionCallback} exportCallback
|
80
64
|
* @param {string|symbol} owner
|
81
65
|
* @returns {{action: import("../manager/collectionManager/collectionManager.js").OwnedAction, destroy: (function(): void)}}
|
@@ -218,7 +202,7 @@ export function createListImportAction(
|
|
218
202
|
parentId,
|
219
203
|
) {
|
220
204
|
check(importCallback, Function);
|
221
|
-
check(owner,
|
205
|
+
check(owner, oneOf(String, vcsAppSymbol));
|
222
206
|
check(parentId, String);
|
223
207
|
|
224
208
|
const { action, destroy } = createToggleAction(
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { reactive, watch } from 'vue';
|
2
|
-
import { check } from '@vcsuite/check';
|
2
|
+
import { check, ofEnum } from '@vcsuite/check';
|
3
3
|
|
4
4
|
/**
|
5
5
|
* @enum {number}
|
@@ -28,7 +28,7 @@ const stateIconMap = {
|
|
28
28
|
*/
|
29
29
|
export function createStateRefAction(name, stateRef, callback) {
|
30
30
|
check(name, String);
|
31
|
-
check(stateRef?.value,
|
31
|
+
check(stateRef?.value, ofEnum(StateActionState));
|
32
32
|
check(callback, Function);
|
33
33
|
|
34
34
|
const currentState = stateRef.value;
|