@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
|
@@ -3,13 +3,12 @@ import { getLogger } from '@vcsuite/logger';
|
|
|
3
3
|
import { v4 as uuidv4 } from 'uuid';
|
|
4
4
|
import { computed, ref, shallowRef, watch } from 'vue';
|
|
5
5
|
import { parseBoolean, parseNumber } from '@vcsuite/parsers';
|
|
6
|
-
import { check } from '@vcsuite/check';
|
|
6
|
+
import { check, oneOf } from '@vcsuite/check';
|
|
7
7
|
import { validateAction } from '../../components/lists/VcsActionList.vue';
|
|
8
8
|
import { sortByWeight } from '../buttonManager.js';
|
|
9
9
|
import {
|
|
10
10
|
createListItemBulkAction,
|
|
11
11
|
createListItemDeleteAction,
|
|
12
|
-
createListItemRenameAction,
|
|
13
12
|
} from '../../actions/listActions.js';
|
|
14
13
|
import { sortByOwner } from '../navbarManager.js';
|
|
15
14
|
|
|
@@ -37,7 +36,7 @@ import { sortByOwner } from '../navbarManager.js';
|
|
|
37
36
|
*/
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
|
-
* @typedef {import("../../components/lists/
|
|
39
|
+
* @typedef {import("../../components/lists/VcsListItemComponent.vue").VcsListItem & {
|
|
41
40
|
* actions: Array<import("../../actions/actionHelper.js").VcsAction & { weight?: number }>,
|
|
42
41
|
* clickedCallbacks: Array<function(PointerEvent):void>,
|
|
43
42
|
* destroy: function():void|undefined
|
|
@@ -56,7 +55,7 @@ function destroyListItem(listItem) {
|
|
|
56
55
|
/**
|
|
57
56
|
* Renames the title of an item for VcsObject based items.
|
|
58
57
|
* @param {import("@vcmap/core").VcsObject} item
|
|
59
|
-
* @param {import("../../components/lists/
|
|
58
|
+
* @param {import("../../components/lists/VcsListItemComponent.vue").VcsListItem} listItem
|
|
60
59
|
* @param {string} newTitle
|
|
61
60
|
*/
|
|
62
61
|
function titleChanged(item, listItem, newTitle) {
|
|
@@ -77,7 +76,7 @@ export function createSupportedMapMappingFunction(
|
|
|
77
76
|
supportedMaps,
|
|
78
77
|
mapCollection,
|
|
79
78
|
) {
|
|
80
|
-
check(supportedMaps, [
|
|
79
|
+
check(supportedMaps, oneOf([String], Function));
|
|
81
80
|
|
|
82
81
|
return (item, _c, listItem) => {
|
|
83
82
|
const mapNames =
|
|
@@ -359,11 +358,9 @@ class CollectionComponentClass {
|
|
|
359
358
|
destroyFunctions: [],
|
|
360
359
|
};
|
|
361
360
|
if (this.renamable.value) {
|
|
362
|
-
listItem.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}),
|
|
366
|
-
);
|
|
361
|
+
listItem.renamable = {
|
|
362
|
+
name: this._actionTitles.renameTitle,
|
|
363
|
+
};
|
|
367
364
|
listItem.titleChanged = (newTitle) =>
|
|
368
365
|
titleChanged(item, listItem, newTitle);
|
|
369
366
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VcsEvent, Collection } from '@vcmap/core';
|
|
2
2
|
import { reactive } from 'vue';
|
|
3
|
-
import { check,
|
|
3
|
+
import { check, maybe, oneOf } from '@vcsuite/check';
|
|
4
4
|
import { validateActions } from '../../components/lists/VcsActionList.vue';
|
|
5
5
|
import CollectionComponentClass from './collectionComponentClass.js';
|
|
6
6
|
|
|
@@ -133,7 +133,7 @@ class CollectionManager {
|
|
|
133
133
|
*/
|
|
134
134
|
add(collectionComponentOptions, owner) {
|
|
135
135
|
check(collectionComponentOptions, { collection: Collection });
|
|
136
|
-
check(owner,
|
|
136
|
+
check(owner, oneOf(String, Symbol));
|
|
137
137
|
|
|
138
138
|
if (
|
|
139
139
|
collectionComponentOptions.id &&
|
|
@@ -220,9 +220,9 @@ class CollectionManager {
|
|
|
220
220
|
owner,
|
|
221
221
|
collectionComponentIds = [],
|
|
222
222
|
) {
|
|
223
|
-
|
|
223
|
+
check(predicate, maybe(Function));
|
|
224
224
|
check(mappingFunction, Function);
|
|
225
|
-
check(owner,
|
|
225
|
+
check(owner, oneOf(String, Symbol));
|
|
226
226
|
check(collectionComponentIds, [String]);
|
|
227
227
|
|
|
228
228
|
/** @type {ItemMapping} */
|
|
@@ -260,7 +260,7 @@ class CollectionManager {
|
|
|
260
260
|
*/
|
|
261
261
|
removeMappingFunction(mappingFunction, owner) {
|
|
262
262
|
check(mappingFunction, Function);
|
|
263
|
-
check(owner,
|
|
263
|
+
check(owner, oneOf(String, Symbol));
|
|
264
264
|
|
|
265
265
|
[...this._collectionComponents.values()].forEach((collectionComponent) => {
|
|
266
266
|
collectionComponent.removeItemMapping({ mappingFunction, owner });
|
|
@@ -279,7 +279,7 @@ class CollectionManager {
|
|
|
279
279
|
*/
|
|
280
280
|
addFilterFunction(filterFunction, owner, collectionComponentIds = []) {
|
|
281
281
|
check(filterFunction, Function);
|
|
282
|
-
check(owner,
|
|
282
|
+
check(owner, oneOf(String, Symbol));
|
|
283
283
|
check(collectionComponentIds, [String]);
|
|
284
284
|
|
|
285
285
|
/** @type {ItemFilter} */
|
|
@@ -316,7 +316,7 @@ class CollectionManager {
|
|
|
316
316
|
*/
|
|
317
317
|
removeFilterFunction(filterFunction, owner) {
|
|
318
318
|
check(filterFunction, Function);
|
|
319
|
-
check(owner,
|
|
319
|
+
check(owner, oneOf(String, Symbol));
|
|
320
320
|
|
|
321
321
|
[...this._collectionComponents.values()].forEach((collectionComponent) => {
|
|
322
322
|
collectionComponent.removeItemFilter({ filterFunction, owner });
|
|
@@ -334,7 +334,7 @@ class CollectionManager {
|
|
|
334
334
|
* @param {Array<string>} [collectionComponentIds] list of collectionComponents this mappingFunction should be used on. If empty, actions are applied to all managed collectionComponents.
|
|
335
335
|
*/
|
|
336
336
|
addActions(actions, owner, collectionComponentIds = []) {
|
|
337
|
-
check(owner,
|
|
337
|
+
check(owner, oneOf(String, Symbol));
|
|
338
338
|
check(collectionComponentIds, [String]);
|
|
339
339
|
|
|
340
340
|
if (!validateActions(actions)) {
|
|
@@ -367,7 +367,7 @@ class CollectionManager {
|
|
|
367
367
|
* @param {string | symbol} owner
|
|
368
368
|
*/
|
|
369
369
|
removeActions(actions, owner) {
|
|
370
|
-
check(owner,
|
|
370
|
+
check(owner, oneOf(String, Symbol));
|
|
371
371
|
|
|
372
372
|
const idx = this._itemActions.findIndex((a) => a.actions === actions);
|
|
373
373
|
if (idx > -1) {
|
|
@@ -386,7 +386,7 @@ class CollectionManager {
|
|
|
386
386
|
* @param {string | symbol} owner
|
|
387
387
|
*/
|
|
388
388
|
removeOwner(owner) {
|
|
389
|
-
check(owner,
|
|
389
|
+
check(owner, oneOf(String, Symbol));
|
|
390
390
|
|
|
391
391
|
[...this._collectionComponents.values()].forEach((collectionComponent) => {
|
|
392
392
|
if (collectionComponent.owner === owner) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { nextTick, reactive, watch } from 'vue';
|
|
2
|
-
import { check,
|
|
2
|
+
import { check, maybe, oneOf } from '@vcsuite/check';
|
|
3
3
|
import { WindowSlot } from '../window/windowManager.js';
|
|
4
4
|
import CollectionComponentClass from './collectionComponentClass.js';
|
|
5
5
|
import { createListEditAction } from '../../actions/listActions.js';
|
|
6
|
+
import { categoryManagerWindowId } from '../../application/VcsApp.vue';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @typedef {Omit<import("../window/windowManager.js").WindowComponentOptions,"id"|"parentId"|"slot">} EditorWindowComponentOptions
|
|
@@ -62,12 +63,12 @@ export function makeEditorCollectionComponentClass(
|
|
|
62
63
|
app,
|
|
63
64
|
collectionComponent,
|
|
64
65
|
editingOptions,
|
|
65
|
-
parentId =
|
|
66
|
+
parentId = categoryManagerWindowId,
|
|
66
67
|
) {
|
|
67
68
|
check(collectionComponent, CollectionComponentClass);
|
|
68
|
-
check(editingOptions.editor,
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
check(editingOptions.editor, oneOf(Object, Function));
|
|
70
|
+
check(editingOptions.multiEditor, maybe(Object));
|
|
71
|
+
check(editingOptions.predicate, maybe(Function));
|
|
71
72
|
|
|
72
73
|
const editorCollectionComponent =
|
|
73
74
|
/** @type {EditorCollectionComponentClass} */ collectionComponent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CesiumMap, BaseOLMap, VcsEvent } from '@vcmap/core';
|
|
2
2
|
import { unByKey } from 'ol/Observable.js';
|
|
3
|
-
import { check } from '@vcsuite/check';
|
|
3
|
+
import { check, oneOf } from '@vcsuite/check';
|
|
4
4
|
import ContextMenuInteraction from './contextMenuInteraction.js';
|
|
5
5
|
import { vcsAppSymbol } from '../../pluginHelper.js';
|
|
6
6
|
import { validateAction } from '../../components/lists/VcsActionList.vue';
|
|
@@ -176,7 +176,7 @@ class ContextMenuManager {
|
|
|
176
176
|
*/
|
|
177
177
|
addEventHandler(handler, owner) {
|
|
178
178
|
check(handler, Function);
|
|
179
|
-
check(owner,
|
|
179
|
+
check(owner, oneOf(String, vcsAppSymbol));
|
|
180
180
|
|
|
181
181
|
this._ensureInteraction();
|
|
182
182
|
this._eventHandlers.push({ owner, handler });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { check } from '@vcsuite/check';
|
|
1
|
+
import { check, ofEnum } from '@vcsuite/check';
|
|
2
2
|
import ButtonManager, { sortByWeight } from './buttonManager.js';
|
|
3
3
|
import { vcsAppSymbol } from '../pluginHelper.js';
|
|
4
4
|
|
|
@@ -89,7 +89,7 @@ class NavbarManager extends ButtonManager {
|
|
|
89
89
|
* @returns {import("./buttonManager.js").ButtonComponent}
|
|
90
90
|
*/
|
|
91
91
|
add(buttonComponentOptions, owner, location) {
|
|
92
|
-
check(location,
|
|
92
|
+
check(location, ofEnum(ButtonLocation));
|
|
93
93
|
const buttonComponent = super.add(buttonComponentOptions, owner);
|
|
94
94
|
buttonComponent[locationSymbol] = location;
|
|
95
95
|
return buttonComponent;
|
|
@@ -18,20 +18,13 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<style scoped lang="scss">
|
|
21
|
-
@import '../../styles/shades.scss';
|
|
22
|
-
|
|
23
21
|
.panel-component {
|
|
24
22
|
padding: 0 4px;
|
|
25
23
|
}
|
|
26
|
-
.panel-component
|
|
27
|
-
content: '';
|
|
28
|
-
position: absolute;
|
|
29
|
-
background: map-get($shades, 'black');
|
|
30
|
-
}
|
|
31
|
-
.panel-component.theme--light::after {
|
|
24
|
+
.panel-component::after {
|
|
32
25
|
content: '';
|
|
33
26
|
position: absolute;
|
|
34
|
-
background:
|
|
27
|
+
background: rgb(var(--v-theme-surface-light));
|
|
35
28
|
}
|
|
36
29
|
|
|
37
30
|
.panel-component-left::after {
|
|
@@ -143,17 +143,21 @@
|
|
|
143
143
|
((panelFrameRef.value.offsetTop + e.y) /
|
|
144
144
|
panelFrameRef.value.parentElement.offsetHeight) *
|
|
145
145
|
100;
|
|
146
|
-
setPanelPosition(panel, {
|
|
146
|
+
setPanelPosition(panelManager, panel, {
|
|
147
|
+
height: `${Math.round(100 - height)}%`,
|
|
148
|
+
});
|
|
147
149
|
} else {
|
|
148
150
|
const width =
|
|
149
151
|
((panelFrameRef.value.offsetLeft + e.x) /
|
|
150
152
|
panelFrameRef.value.parentElement.offsetWidth) *
|
|
151
153
|
100;
|
|
152
154
|
if (panel[panelLocationSymbol] === PanelLocation.LEFT) {
|
|
153
|
-
setPanelPosition(panel, { width: `${width}%` });
|
|
155
|
+
setPanelPosition(panelManager, panel, { width: `${width}%` });
|
|
154
156
|
resizeKey = 'left';
|
|
155
157
|
} else if (panel[panelLocationSymbol] === PanelLocation.RIGHT) {
|
|
156
|
-
setPanelPosition(panel, {
|
|
158
|
+
setPanelPosition(panelManager, panel, {
|
|
159
|
+
width: `${Math.round(100 - width)}%`,
|
|
160
|
+
});
|
|
157
161
|
resizeKey = 'right';
|
|
158
162
|
}
|
|
159
163
|
}
|
|
@@ -239,7 +239,7 @@ export function updatePanelSizes(
|
|
|
239
239
|
},
|
|
240
240
|
targetSize,
|
|
241
241
|
);
|
|
242
|
-
setPanelPosition(leftPanel, updatedLeft);
|
|
242
|
+
setPanelPosition(panelManager, leftPanel, updatedLeft);
|
|
243
243
|
}
|
|
244
244
|
if (panelManager.hasLocation(PanelLocation.RIGHT) && resizeKey !== 'left') {
|
|
245
245
|
const updatedRight = handleSidePanel(
|
|
@@ -252,7 +252,7 @@ export function updatePanelSizes(
|
|
|
252
252
|
},
|
|
253
253
|
targetSize,
|
|
254
254
|
);
|
|
255
|
-
setPanelPosition(rightPanel, updatedRight);
|
|
255
|
+
setPanelPosition(panelManager, rightPanel, updatedRight);
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
const main = percentageFromPanelOptions(
|
|
@@ -267,6 +267,6 @@ export function updatePanelSizes(
|
|
|
267
267
|
return acc;
|
|
268
268
|
}, {});
|
|
269
269
|
if (Object.keys(toUpdate).length > 0) {
|
|
270
|
-
setPanelPosition(mainPanel, toUpdate);
|
|
270
|
+
setPanelPosition(panelManager, mainPanel, toUpdate);
|
|
271
271
|
}
|
|
272
272
|
}
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
*/
|
|
31
31
|
export function getPanelPosition(panelComponent: Partial<PanelComponent>): PanelPosition | undefined;
|
|
32
32
|
/**
|
|
33
|
+
* @param {PanelManager} panelManager
|
|
33
34
|
* @param {PanelComponent} panelComponent
|
|
34
35
|
* @param {Partial<PanelPosition>} panelPosition
|
|
35
36
|
*/
|
|
36
|
-
export function setPanelPosition(panelComponent: PanelComponent, panelPosition: Partial<PanelPosition>): void;
|
|
37
|
+
export function setPanelPosition(panelManager: PanelManager, panelComponent: PanelComponent, panelPosition: Partial<PanelPosition>): void;
|
|
37
38
|
export const panelLocationSymbol: unique symbol;
|
|
38
39
|
export const panelPositionSymbol: unique symbol;
|
|
39
40
|
/**
|
|
@@ -249,6 +250,13 @@ declare class PanelManager implements IPanelManager {
|
|
|
249
250
|
* @type {import("@vcmap/core").VcsEvent<PanelComponent>}
|
|
250
251
|
*/
|
|
251
252
|
removed: import("@vcmap/core").VcsEvent<PanelComponent>;
|
|
253
|
+
/**
|
|
254
|
+
* @type {import("@vcmap/core").VcsEvent<{panelId: string, panelPosition: PanelPosition}>}
|
|
255
|
+
*/
|
|
256
|
+
positionChanged: import("@vcmap/core").VcsEvent<{
|
|
257
|
+
panelId: string;
|
|
258
|
+
panelPosition: PanelPosition;
|
|
259
|
+
}>;
|
|
252
260
|
/**
|
|
253
261
|
* reactive ordered array of ids,
|
|
254
262
|
* @type {import("vue").UnwrapRef<string[]>}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reactive } from 'vue';
|
|
2
2
|
import { VcsEvent } from '@vcmap/core';
|
|
3
|
-
import { check } from '@vcsuite/check';
|
|
3
|
+
import { check, ofEnum, oneOf } from '@vcsuite/check';
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import { parseBoolean } from '@vcsuite/parsers';
|
|
6
6
|
import { vcsAppSymbol } from '../../pluginHelper.js';
|
|
@@ -114,10 +114,11 @@ export function getPanelPosition(panelComponent) {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
+
* @param {PanelManager} panelManager
|
|
117
118
|
* @param {PanelComponent} panelComponent
|
|
118
119
|
* @param {Partial<PanelPosition>} panelPosition
|
|
119
120
|
*/
|
|
120
|
-
export function setPanelPosition(panelComponent, panelPosition) {
|
|
121
|
+
export function setPanelPosition(panelManager, panelComponent, panelPosition) {
|
|
121
122
|
const position = getPanelPosition(panelComponent);
|
|
122
123
|
const toUpdate = Object.keys(panelPosition).reduce((acc, key) => {
|
|
123
124
|
if (position?.[key] !== panelPosition[key]) {
|
|
@@ -126,7 +127,14 @@ export function setPanelPosition(panelComponent, panelPosition) {
|
|
|
126
127
|
return acc;
|
|
127
128
|
}, {});
|
|
128
129
|
if (Object.keys(toUpdate).length > 0) {
|
|
129
|
-
Object.assign(
|
|
130
|
+
const newPosition = Object.assign(
|
|
131
|
+
panelComponent[panelPositionSymbol],
|
|
132
|
+
panelPosition,
|
|
133
|
+
);
|
|
134
|
+
panelManager.positionChanged.raiseEvent({
|
|
135
|
+
panelId: panelComponent.id,
|
|
136
|
+
panelPosition: newPosition,
|
|
137
|
+
});
|
|
130
138
|
}
|
|
131
139
|
}
|
|
132
140
|
|
|
@@ -149,6 +157,10 @@ class PanelManager {
|
|
|
149
157
|
* @type {import("@vcmap/core").VcsEvent<PanelComponent>}
|
|
150
158
|
*/
|
|
151
159
|
this.removed = new VcsEvent();
|
|
160
|
+
/**
|
|
161
|
+
* @type {import("@vcmap/core").VcsEvent<{panelId: string, panelPosition: PanelPosition}>}
|
|
162
|
+
*/
|
|
163
|
+
this.positionChanged = new VcsEvent();
|
|
152
164
|
/**
|
|
153
165
|
* reactive ordered array of ids,
|
|
154
166
|
* @type {import("vue").UnwrapRef<string[]>}
|
|
@@ -266,7 +278,7 @@ class PanelManager {
|
|
|
266
278
|
return acc;
|
|
267
279
|
}, {});
|
|
268
280
|
if (Object.keys(toUpdate).length > 0) {
|
|
269
|
-
setPanelPosition(panelComponent, toUpdate);
|
|
281
|
+
setPanelPosition(this, panelComponent, toUpdate);
|
|
270
282
|
}
|
|
271
283
|
}
|
|
272
284
|
}
|
|
@@ -279,8 +291,8 @@ class PanelManager {
|
|
|
279
291
|
* @returns {PanelComponent}
|
|
280
292
|
*/
|
|
281
293
|
add(panelComponentOptions, owner, location) {
|
|
282
|
-
check(owner,
|
|
283
|
-
check(location,
|
|
294
|
+
check(owner, oneOf(String, vcsAppSymbol));
|
|
295
|
+
check(location, ofEnum(PanelLocation));
|
|
284
296
|
|
|
285
297
|
const id = panelComponentOptions.id || uuidv4();
|
|
286
298
|
const { component, position: panelPosition } = panelComponentOptions;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:icon="group.icon"
|
|
14
14
|
:disabled="group.disabled"
|
|
15
15
|
:tooltip="group.title"
|
|
16
|
-
:active="
|
|
16
|
+
:active="hasActiveAction"
|
|
17
17
|
:color="hasActiveAction ? 'primary' : ''"
|
|
18
18
|
v-bind="props"
|
|
19
19
|
>
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
|
|
24
24
|
<v-toolbar
|
|
25
25
|
id="vcs-toolbox-toolbar--secondary"
|
|
26
|
-
class="mx-auto marginToTop
|
|
27
|
-
:height="
|
|
26
|
+
class="mx-auto marginToTop rounded-b elevation-4 opacity-80 px-1"
|
|
27
|
+
:height="itemHeight + 8"
|
|
28
28
|
>
|
|
29
29
|
<v-toolbar-items class="w-100">
|
|
30
|
-
<div class="d-flex align-center justify-space-between w-100">
|
|
30
|
+
<div class="d-flex align-center justify-space-between gc-1 w-100">
|
|
31
31
|
<VcsToolButton
|
|
32
32
|
v-for="{ id, action } in orderedButtons"
|
|
33
33
|
:key="id"
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
import { VMenu, VIcon, VToolbar, VToolbarItems } from 'vuetify/components';
|
|
55
55
|
import VcsToolButton from '../../components/buttons/VcsToolButton.vue';
|
|
56
56
|
import { getComponentsByOrder } from './toolboxManager.js';
|
|
57
|
+
import { useItemHeight } from '../../vuePlugins/vuetify.js';
|
|
57
58
|
|
|
58
59
|
/**
|
|
59
60
|
* @description
|
|
@@ -94,10 +95,13 @@
|
|
|
94
95
|
orderedButtons.value.some((a) => a.action.active),
|
|
95
96
|
);
|
|
96
97
|
|
|
98
|
+
const itemHeight = useItemHeight();
|
|
99
|
+
|
|
97
100
|
return {
|
|
98
101
|
open,
|
|
99
102
|
orderedButtons,
|
|
100
103
|
hasActiveAction,
|
|
104
|
+
itemHeight,
|
|
101
105
|
};
|
|
102
106
|
},
|
|
103
107
|
};
|
|
@@ -7,6 +7,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
open: import("vue").Ref<boolean>;
|
|
8
8
|
orderedButtons: import("vue").ComputedRef<(import("../buttonManager.js", { with: { "resolution-mode": "import" } }).ButtonComponent | import("./toolboxManager.js", { with: { "resolution-mode": "import" } }).ToolboxComponent)[]>;
|
|
9
9
|
hasActiveAction: import("vue").ComputedRef<boolean>;
|
|
10
|
+
itemHeight: import("vue").ComputedRef<number>;
|
|
10
11
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
12
|
group: {
|
|
12
13
|
type: ObjectConstructor;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
:tooltip="group.action.title"
|
|
29
29
|
:disabled="group.action.disabled"
|
|
30
30
|
v-bind="props"
|
|
31
|
-
class="vcs-toolbox-action-select"
|
|
31
|
+
class="vcs-toolbox-action-select px-0"
|
|
32
32
|
:min-width="16"
|
|
33
33
|
:width="16"
|
|
34
34
|
>
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<v-toolbar
|
|
40
|
-
class="vcs-toolbox-2 mx-auto marginToTop rounded-b opacity-80 px-1"
|
|
41
|
-
:height="
|
|
40
|
+
class="vcs-toolbox-2 mx-auto marginToTop rounded-b elevation-4 opacity-80 px-1"
|
|
41
|
+
:height="itemHeight + 8"
|
|
42
42
|
dense
|
|
43
43
|
>
|
|
44
44
|
<v-toolbar-items class="w-100">
|
|
45
|
-
<div class="d-flex align-center justify-space-between w-100">
|
|
45
|
+
<div class="d-flex align-center justify-space-between gc-1 w-100">
|
|
46
46
|
<VcsToolButton
|
|
47
47
|
v-for="(item, index) in group.action.tools"
|
|
48
48
|
:key="`${item.name}-${index}`"
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
import { ref } from 'vue';
|
|
68
68
|
import { VMenu, VIcon, VToolbar, VToolbarItems } from 'vuetify/components';
|
|
69
69
|
import VcsToolButton from '../../components/buttons/VcsToolButton.vue';
|
|
70
|
+
import { useItemHeight } from '../../vuePlugins/vuetify.js';
|
|
70
71
|
|
|
71
72
|
/**
|
|
72
73
|
* @description
|
|
@@ -90,9 +91,11 @@
|
|
|
90
91
|
},
|
|
91
92
|
setup() {
|
|
92
93
|
const open = ref(false);
|
|
94
|
+
const itemHeight = useItemHeight();
|
|
93
95
|
|
|
94
96
|
return {
|
|
95
97
|
open,
|
|
98
|
+
itemHeight,
|
|
96
99
|
};
|
|
97
100
|
},
|
|
98
101
|
};
|
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
};
|
|
6
6
|
}, {
|
|
7
7
|
open: import("vue").Ref<boolean>;
|
|
8
|
+
itemHeight: import("vue").ComputedRef<number>;
|
|
8
9
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
10
|
group: {
|
|
10
11
|
type: ObjectConstructor;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-toolbar
|
|
3
3
|
v-if="toolboxOpen && orderedGroups.length > 0 && mdAndUp"
|
|
4
|
-
class="vcs-toolbox mx-auto
|
|
4
|
+
class="vcs-toolbox mx-auto elevation-4 opacity-80"
|
|
5
5
|
:class="{
|
|
6
6
|
'rounded-b': !open,
|
|
7
7
|
}"
|
|
8
|
-
:height="
|
|
8
|
+
:height="itemHeight + 8"
|
|
9
9
|
:style="{ zIndex }"
|
|
10
10
|
@click.stop="bringToTop"
|
|
11
|
-
style="width: fit-content"
|
|
12
11
|
>
|
|
13
12
|
<v-toolbar-items class="w-100 px-4 gc-1">
|
|
14
13
|
<div
|
|
@@ -42,8 +41,9 @@
|
|
|
42
41
|
</template>
|
|
43
42
|
|
|
44
43
|
<style lang="scss" scoped>
|
|
45
|
-
.
|
|
44
|
+
.vcs-toolbox {
|
|
46
45
|
margin-top: 2px;
|
|
46
|
+
width: fit-content;
|
|
47
47
|
}
|
|
48
48
|
</style>
|
|
49
49
|
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
import VcsToolButton from '../../components/buttons/VcsToolButton.vue';
|
|
62
62
|
import { vcsAppSymbol } from '../../pluginHelper.js';
|
|
63
63
|
import { ButtonLocation } from '../navbarManager.js';
|
|
64
|
+
import { useItemHeight } from '../../vuePlugins/vuetify.js';
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
67
|
* @typedef {Object} ToolboxButtonGroup
|
|
@@ -163,12 +164,12 @@
|
|
|
163
164
|
}
|
|
164
165
|
handleToolboxButton();
|
|
165
166
|
|
|
166
|
-
|
|
167
|
+
watch(groups, () => handleToolboxButton());
|
|
167
168
|
|
|
168
169
|
onUnmounted(() => {
|
|
169
|
-
stopWatching();
|
|
170
170
|
nameChangeListener();
|
|
171
171
|
app.windowManager.removeExternalIdFromZIndex('toolbox');
|
|
172
|
+
app.navbarManager.remove('toolbox');
|
|
172
173
|
});
|
|
173
174
|
|
|
174
175
|
watch(toolboxOpen, () => {
|
|
@@ -183,6 +184,7 @@
|
|
|
183
184
|
};
|
|
184
185
|
|
|
185
186
|
const { mdAndUp } = useDisplay();
|
|
187
|
+
const itemHeight = useItemHeight();
|
|
186
188
|
return {
|
|
187
189
|
mdAndUp,
|
|
188
190
|
toolboxOpen,
|
|
@@ -200,6 +202,7 @@
|
|
|
200
202
|
bringToTop();
|
|
201
203
|
}
|
|
202
204
|
},
|
|
205
|
+
itemHeight,
|
|
203
206
|
};
|
|
204
207
|
},
|
|
205
208
|
};
|
|
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
12
12
|
open: import("vue").Ref<boolean>;
|
|
13
13
|
bringToTop: () => void;
|
|
14
14
|
openGroup(group: any): void;
|
|
15
|
+
itemHeight: import("vue").ComputedRef<number>;
|
|
15
16
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
16
17
|
export default _default;
|
|
17
18
|
export type ToolboxButtonGroup = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VcsEvent } from '@vcmap/core';
|
|
2
|
-
import { check,
|
|
2
|
+
import { check, maybe, ofEnum, oneOf, optional } from '@vcsuite/check';
|
|
3
3
|
import { v4 as uuidv4 } from 'uuid';
|
|
4
4
|
import { reactive, shallowReactive } from 'vue';
|
|
5
5
|
import { vcsAppSymbol } from '../../pluginHelper.js';
|
|
@@ -230,7 +230,7 @@ class ToolboxManager {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
set toolboxName(name) {
|
|
233
|
-
check(name,
|
|
233
|
+
check(name, oneOf(String, defaultToolboxName));
|
|
234
234
|
|
|
235
235
|
if (this._toolboxName !== name) {
|
|
236
236
|
this._toolboxName = name;
|
|
@@ -285,9 +285,9 @@ class ToolboxManager {
|
|
|
285
285
|
* @returns {SingleToolboxComponent|SelectToolboxComponent|import("vue").ShallowReactive<GroupToolboxComponent>}
|
|
286
286
|
*/
|
|
287
287
|
add(toolboxComponentOptions, owner) {
|
|
288
|
-
|
|
289
|
-
check(toolboxComponentOptions.type,
|
|
290
|
-
check(owner,
|
|
288
|
+
check(toolboxComponentOptions.id, maybe(String));
|
|
289
|
+
check(toolboxComponentOptions.type, ofEnum(ToolboxType));
|
|
290
|
+
check(owner, oneOf(String, vcsAppSymbol));
|
|
291
291
|
|
|
292
292
|
if (toolboxComponentOptions.id && this.has(toolboxComponentOptions.id)) {
|
|
293
293
|
throw new Error(
|
|
@@ -335,13 +335,13 @@ class ToolboxManager {
|
|
|
335
335
|
...ActionPattern,
|
|
336
336
|
selected: Function,
|
|
337
337
|
currentIndex: Number,
|
|
338
|
-
disabled:
|
|
338
|
+
disabled: optional(Boolean),
|
|
339
339
|
tools: [
|
|
340
340
|
{
|
|
341
341
|
name: String,
|
|
342
|
-
title:
|
|
342
|
+
title: optional(String),
|
|
343
343
|
icon: String,
|
|
344
|
-
disabled:
|
|
344
|
+
disabled: optional(Boolean),
|
|
345
345
|
},
|
|
346
346
|
],
|
|
347
347
|
});
|
|
@@ -357,8 +357,8 @@ class ToolboxManager {
|
|
|
357
357
|
};
|
|
358
358
|
} else {
|
|
359
359
|
check(toolboxComponentOptions.icon, String);
|
|
360
|
-
|
|
361
|
-
|
|
360
|
+
check(toolboxComponentOptions.title, maybe(String));
|
|
361
|
+
check(toolboxComponentOptions.disabled, maybe(Boolean));
|
|
362
362
|
const {
|
|
363
363
|
icon,
|
|
364
364
|
title = undefined,
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
:class="{
|
|
10
10
|
rounded: !isDocked,
|
|
11
11
|
marginToTop: isDocked || !isChild,
|
|
12
|
-
'rounded-
|
|
13
|
-
'rounded-
|
|
12
|
+
'rounded-be': isDynamicLeft,
|
|
13
|
+
'rounded-bs': isDynamicRight,
|
|
14
14
|
}"
|
|
15
15
|
>
|
|
16
16
|
<div
|
|
@@ -89,17 +89,21 @@
|
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
const isChild = computed(() => !!props.windowState.parentId);
|
|
92
|
-
const isDynamic = computed(
|
|
93
|
-
|
|
92
|
+
const isDynamic = computed(
|
|
93
|
+
() => props.slotWindow.value !== WindowSlot.STATIC,
|
|
94
|
+
);
|
|
95
|
+
const isDocked = computed(
|
|
96
|
+
() => props.slotWindow.value !== WindowSlot.DETACHED,
|
|
97
|
+
);
|
|
94
98
|
const isDockedLeft = computed(() => {
|
|
95
99
|
return (
|
|
96
|
-
props.slotWindow === WindowSlot.STATIC ||
|
|
97
|
-
props.slotWindow === WindowSlot.DYNAMIC_LEFT ||
|
|
98
|
-
props.slotWindow === WindowSlot.DYNAMIC_CHILD
|
|
100
|
+
props.slotWindow.value === WindowSlot.STATIC ||
|
|
101
|
+
props.slotWindow.value === WindowSlot.DYNAMIC_LEFT ||
|
|
102
|
+
props.slotWindow.value === WindowSlot.DYNAMIC_CHILD
|
|
99
103
|
);
|
|
100
104
|
});
|
|
101
105
|
const isDockedRight = computed(
|
|
102
|
-
() => props.slotWindow === WindowSlot.DYNAMIC_RIGHT,
|
|
106
|
+
() => props.slotWindow.value === WindowSlot.DYNAMIC_RIGHT,
|
|
103
107
|
);
|
|
104
108
|
const isDraggable = ref(false);
|
|
105
109
|
/**
|