@vcmap/ui 6.0.0-rc.1 → 6.0.0-rc.3
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 +2 -8
- package/build/info/conf.json +1 -1
- package/config/base.config.json +4 -4
- package/config/projects.config.json +2 -1
- package/config/splashscreen.config.json +45 -0
- package/dist/.htaccess +7 -0
- package/dist/assets/@mdi/font/README.md +25 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min-7a4f6be0.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/Assets/approximateTerrainHeights.json +1 -1
- package/dist/assets/cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/assets/cesium/Workers/{chunk-ZA25DG4Y.js → chunk-3DRPXHZ4.js} +11 -11
- package/dist/assets/cesium/Workers/{chunk-OAVNIRB4.js → chunk-3GI7DWF7.js} +5 -7
- package/dist/assets/cesium/Workers/{chunk-TFC6TZ3S.js → chunk-4EW3HFFI.js} +33 -22
- package/dist/assets/cesium/Workers/{chunk-LLUNNUJV.js → chunk-4OX4RYLB.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-66QLLS45.js → chunk-4RJH3H6D.js} +11 -9
- package/dist/assets/cesium/Workers/{chunk-MPAZH4BF.js → chunk-5OUTANXX.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-WXTV4ATB.js → chunk-6DH5PLFD.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-A4JVFBQ3.js → chunk-6DXIYFX3.js} +2 -2
- package/dist/assets/cesium/Workers/chunk-A5C2A5O5.js +963 -0
- package/dist/assets/cesium/Workers/{chunk-HQF437NJ.js → chunk-AGTH5JMJ.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-RP2A7BR5.js → chunk-AVFIYUKX.js} +12 -14
- package/dist/assets/cesium/Workers/{chunk-227AJNOA.js → chunk-BAJAVGUF.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-N3JIFFX2.js → chunk-BPY4HDAK.js} +5 -6
- package/dist/assets/cesium/Workers/{chunk-ABADGKYE.js → chunk-D6PDWQXW.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-34YUDLRP.js → chunk-DR7LK6PG.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-OYFCF4PL.js → chunk-DTACCQDR.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-C3SXRKRW.js → chunk-EVU2UNBD.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-6BTKZDRG.js → chunk-F7IEM66T.js} +3 -5
- package/dist/assets/cesium/Workers/{chunk-QT3MPEMI.js → chunk-FSXNF76Y.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-PCJWUS4M.js → chunk-FYYT5EVH.js} +830 -14
- package/dist/assets/cesium/Workers/{chunk-QMEMZIJI.js → chunk-FZDKIUDT.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-XTY7B2N6.js → chunk-G6346EDR.js} +16 -16
- package/dist/assets/cesium/Workers/{chunk-CHHNOC2C.js → chunk-H7PSTL64.js} +95 -155
- package/dist/assets/cesium/Workers/{chunk-2R5O53JW.js → chunk-I67V66MN.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-JS3AW5BK.js → chunk-IALQGTA2.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-K36FEYS7.js → chunk-KNMGSIIN.js} +16 -12
- package/dist/assets/cesium/Workers/{chunk-J3JY6I2C.js → chunk-L4XQPD6P.js} +49 -88
- package/dist/assets/cesium/Workers/{chunk-X4SU25DT.js → chunk-LMTN7R7M.js} +10 -12
- package/dist/assets/cesium/Workers/{chunk-JB2LWGH4.js → chunk-LUYI3XCB.js} +14 -14
- package/dist/assets/cesium/Workers/{chunk-AFFLIKOH.js → chunk-N5MIFVXJ.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-MYZB7C4T.js → chunk-O7OUBDMZ.js} +10 -10
- package/dist/assets/cesium/Workers/{chunk-VLGOATD6.js → chunk-P24I5VUS.js} +22 -22
- package/dist/assets/cesium/Workers/{chunk-KD4Y7CZL.js → chunk-PIOKSAZH.js} +15 -17
- package/dist/assets/cesium/Workers/{chunk-3W63OHNJ.js → chunk-PRKEY4QK.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-O5AMBQ36.js → chunk-Q7PM4W34.js} +8 -8
- package/dist/assets/cesium/Workers/{chunk-GLZBE3ML.js → chunk-QLC66ZRL.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-OZJDGN5F.js → chunk-RRLGJV3Q.js} +16 -16
- package/dist/assets/cesium/Workers/{chunk-CCFQRR6D.js → chunk-S2UEXF6T.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-QIKODV5G.js → chunk-S4VTLNAJ.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-EW2GWJYB.js → chunk-SJC5PRDX.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-KTJSNCK4.js → chunk-T6TZXGG5.js} +230 -20
- package/dist/assets/cesium/Workers/{chunk-RW6LU2CJ.js → chunk-TLGODPEV.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-CTELOFLA.js → chunk-UC566ISB.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-ZFOBYDGF.js → chunk-UMX265HW.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-Z24VKNDO.js → chunk-V7WJDCPA.js} +12 -12
- package/dist/assets/cesium/Workers/{chunk-4MFFIWUA.js → chunk-VD6G7UPU.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-XY7MGBKC.js → chunk-WMVCLETM.js} +14 -16
- package/dist/assets/cesium/Workers/{chunk-IPA4EACJ.js → chunk-WOA6WSHH.js} +12 -12
- package/dist/assets/cesium/Workers/{chunk-PFQBCKBM.js → chunk-X67EJ6X6.js} +4398 -2722
- package/dist/assets/cesium/Workers/{chunk-V3NGATMV.js → chunk-XGI4FRXF.js} +11 -13
- package/dist/assets/cesium/Workers/{chunk-AHKEZ2OE.js → chunk-YFVI4SQI.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-HARLBUOL.js → chunk-YFYPR4MW.js} +11 -8
- package/dist/assets/cesium/Workers/combineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/createBoxGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +14 -15
- package/dist/assets/cesium/Workers/createCircleGeometry.js +29 -26
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +35 -36
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +27 -28
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +18 -19
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +17 -19
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +24 -25
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +18 -18
- package/dist/assets/cesium/Workers/createGeometry.js +52 -33
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +28 -29
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +14 -15
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +13 -14
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +451 -176
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +24 -25
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +31 -33
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +27 -29
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +30 -31
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +21 -24
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/createSphereGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +3 -3
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +14 -16
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +22 -23
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +12 -12
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +20 -21
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +14 -16
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +24 -25
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +25 -26
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -21
- package/dist/assets/cesium/Workers/createWallGeometry.js +23 -24
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/decodeDraco.js +11 -11
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +12 -19
- package/dist/assets/cesium/Workers/decodeI3S.js +600 -92
- package/dist/assets/cesium/Workers/transcodeKTX2.js +46 -82
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +21 -22
- package/dist/assets/{cesium.6b12b4.js → cesium-cb4dbfba.js} +151166 -145641
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.074b78.js → core-72f21835.js} +2299 -2225
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol.8b2e3a.js → ol-2d33bc8b.js} +42505 -44282
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-2ab43a16.css +1 -0
- package/dist/assets/{ui.715986.js → ui-2ab43a16.js} +12001 -11136
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.28d881.css → vuetify-760ced3b.css} +1 -1
- package/dist/assets/{vuetify.28d881.js → vuetify-760ced3b.js} +5720 -5662
- package/dist/assets/vuetify.js +1 -1
- package/dist/index.html +11 -10
- package/index.d.ts +9 -5
- package/index.html +5 -5
- package/index.js +4 -3
- package/lib/olLib.js +84 -23
- package/package.json +10 -9
- package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +41 -1
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +70 -30
- 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 +45 -94
- package/plugins/@vcmap-show-case/style-input-example/src/StyleExample.vue +29 -90
- package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +35 -10
- package/plugins/@vcmap-show-case/wizard-example/src/WizardExample.vue +40 -54
- 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/actionHelper.js +20 -20
- package/src/actions/flightActions.js +5 -5
- package/src/actions/listActions.d.ts +0 -7
- package/src/actions/listActions.js +4 -20
- package/src/actions/stateRefAction.js +2 -2
- package/src/application/VcsApp.vue +53 -29
- package/src/application/VcsApp.vue.d.ts +1 -0
- package/src/application/VcsAttributions.vue +2 -13
- package/src/application/VcsAttributionsFooter.vue +10 -11
- package/src/application/VcsNavbar.vue.d.ts +1 -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 +34 -54
- package/src/application/VcsSplashScreen.vue.d.ts +4 -6
- package/src/application/VcsTextPage.vue +13 -44
- package/src/application/VcsTextPage.vue.d.ts +4 -8
- package/src/application/VcsTextPageFooter.vue +22 -40
- package/src/application/markdownHelper.js +2 -17
- package/src/components/buttons/VcsButton.vue +1 -1
- package/src/components/buttons/VcsButton.vue.d.ts +3 -3
- package/src/components/buttons/VcsFormButton.vue +1 -1
- package/src/components/buttons/VcsFormButton.vue.d.ts +2 -2
- package/src/components/buttons/VcsToolButton.vue +1 -1
- package/src/components/buttons/VcsToolButton.vue.d.ts +4 -4
- package/src/components/composables.d.ts +7 -0
- package/src/components/composables.js +35 -1
- 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 +19 -11
- package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +1 -1
- package/src/components/form-inputs-controls/VcsCoordinate.vue +13 -1
- 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 +2 -64
- package/src/components/form-inputs-controls/VcsFileInput.vue +18 -19
- package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsLabel.vue +31 -1
- package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +21 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +19 -5
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +44 -41
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +7 -4
- package/src/components/form-inputs-controls/VcsSlider.vue +49 -10
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +28 -2
- package/src/components/form-inputs-controls/VcsTextArea.vue +54 -35
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +21 -14
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsWizard.vue +89 -112
- package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +3 -13
- package/src/components/form-inputs-controls/VcsWizardStep.vue +75 -57
- package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +24 -11
- package/src/components/form-inputs-controls/vcsTextField.scss +13 -8
- package/src/components/form-output/VcsFormattedNumber.vue +40 -10
- package/src/components/form-output/VcsFormattedNumber.vue.d.ts +27 -0
- package/src/components/form-output/VcsMarkdown.vue +53 -0
- package/src/{application/VcsCustomScreen.vue.d.ts → components/form-output/VcsMarkdown.vue.d.ts} +6 -5
- package/src/components/lists/VcsActionList.vue +50 -34
- package/src/components/lists/VcsActionList.vue.d.ts +3 -1
- package/src/components/lists/VcsList.vue +82 -158
- package/src/components/lists/VcsList.vue.d.ts +7 -14
- package/src/components/lists/VcsListItem.vue +184 -0
- package/src/components/lists/VcsListItem.vue.d.ts +27 -0
- package/src/components/lists/VcsTreeviewLeaf.vue +1 -1
- package/src/components/modelHelper.d.ts +11 -0
- package/src/components/modelHelper.js +42 -2
- package/src/components/section/VcsExpansionPanel.vue +101 -0
- package/src/components/section/VcsExpansionPanel.vue.d.ts +19 -0
- 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 +7 -18
- 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/vector-properties/VcsFeatureEditingWindow.vue +53 -12
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +3 -3
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +475 -586
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +193 -22
- package/src/components/viewpoint/VcsViewpointComponent.vue +21 -8
- package/src/components/viewpoint/VcsViewpointEditor.vue +1 -0
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/contentTreeItem.js +7 -7
- package/src/featureInfo/featureInfo.js +8 -10
- 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 +10 -8
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +4 -2
- 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.js +6 -9
- package/src/manager/collectionManager/collectionManager.js +10 -10
- package/src/manager/collectionManager/editorCollectionComponentClass.js +4 -4
- package/src/manager/contextMenu/contextMenuManager.js +2 -2
- package/src/manager/navbarManager.js +2 -2
- package/src/manager/panel/panelManager.js +3 -3
- package/src/manager/toolbox/toolboxManager.js +10 -10
- package/src/manager/window/windowManager.d.ts +6 -6
- package/src/manager/window/windowManager.js +6 -6
- package/src/navigation/MapNavigation.vue +6 -3
- package/src/navigation/OrientationToolsButton.vue +39 -26
- package/src/navigation/OrientationToolsButton.vue.d.ts +5 -1
- package/src/navigation/TiltSlider.vue +83 -88
- package/src/navigation/TiltSlider.vue.d.ts +10 -7
- package/src/navigation/VcsCompass.vue +17 -11
- package/src/navigation/VcsCompass.vue.d.ts +2 -0
- package/src/search/search.js +2 -2
- package/src/siteConfig.js +1 -1
- package/src/state.js +4 -4
- package/src/styles/_typography.scss +1 -0
- package/src/vcsUiApp.d.ts +24 -26
- package/src/vcsUiApp.js +11 -4
- package/src/vuePlugins/i18n.js +7 -0
- package/src/vuePlugins/vuetify.d.ts +2 -0
- package/src/vuePlugins/vuetify.js +15 -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/cesium/Workers/chunk-DUHWWBQQ.js +0 -3273
- package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +0 -73
- package/dist/assets/index-ca7EmZ3d.js +0 -1
- package/dist/assets/ui.715986.css +0 -1
- package/public/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
- package/src/application/VcsCustomScreen.vue +0 -45
- package/src/components/vector-properties/composables.d.ts +0 -33
- package/src/components/vector-properties/composables.js +0 -100
- 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/dist/assets/{vue.0f2c53.js → vue-03b265aa.js} +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
- package/src/components/{form-inputs-controls → section}/VcsFormSection.vue +0 -0
- package/src/components/{form-inputs-controls → section}/VcsFormSection.vue.d.ts +1 -1
@@ -7,13 +7,14 @@
|
|
7
7
|
>
|
8
8
|
<v-container class="py-0 px-0">
|
9
9
|
<v-sheet v-if="items.length < 1" class="ma-2 pl-2">
|
10
|
-
{{ $t('components.flight.noAnchor') }}
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
<p>{{ $t('components.flight.noAnchor') }}</p>
|
11
|
+
<div class="d-flex justify-center">
|
12
|
+
<VcsButton
|
13
|
+
:icon="addAnchorAction.icon"
|
14
|
+
:tooltip="addAnchorAction.title"
|
15
|
+
@click.stop="addAnchorAction.callback()"
|
16
|
+
/>
|
17
|
+
</div>
|
17
18
|
</v-sheet>
|
18
19
|
<VcsList
|
19
20
|
v-else
|
@@ -22,32 +23,35 @@
|
|
22
23
|
:show-title="false"
|
23
24
|
@item-moved="move"
|
24
25
|
>
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
v-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
26
|
+
<template #item.title="{ item, index }">
|
27
|
+
<div class="d-flex align-center">
|
28
|
+
<span>{{ $st(item.title) }}</span>
|
29
|
+
<v-spacer />
|
30
|
+
<div class="duration-input">
|
31
|
+
<VcsTextField
|
32
|
+
v-if="showDuration(index)"
|
33
|
+
v-model.number="item.duration"
|
34
|
+
:hide-spin-buttons="true"
|
35
|
+
type="number"
|
36
|
+
unit="s"
|
37
|
+
step="1"
|
38
|
+
:decimals="2"
|
39
|
+
:rules="[durationRule]"
|
40
|
+
no-padding
|
41
|
+
class="ml-auto"
|
42
|
+
/>
|
43
|
+
</div>
|
44
|
+
</div>
|
40
45
|
</template>
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
/>
|
46
|
+
<template #item.intermediate="{ index }">
|
47
|
+
<div class="d-flex justify-center h-0">
|
48
|
+
<VcsButton
|
49
|
+
:icon="addAnchorAction.icon"
|
50
|
+
:tooltip="addAnchorAction.title"
|
51
|
+
@click.stop="addAnchorAction.callback(index + 1)"
|
52
|
+
class="z-index-99 mx-auto add-in-button"
|
53
|
+
/>
|
54
|
+
</div>
|
51
55
|
</template>
|
52
56
|
</VcsList>
|
53
57
|
</v-container>
|
@@ -55,7 +59,7 @@
|
|
55
59
|
</template>
|
56
60
|
<script>
|
57
61
|
import { computed, inject, onMounted, onUnmounted, ref } from 'vue';
|
58
|
-
import { VContainer, VSheet } from 'vuetify/components';
|
62
|
+
import { VContainer, VSheet, VSpacer } from 'vuetify/components';
|
59
63
|
import {
|
60
64
|
anchorFromViewpoint,
|
61
65
|
anchorToViewpoint,
|
@@ -63,7 +67,7 @@
|
|
63
67
|
} from '@vcmap/core';
|
64
68
|
import { Cartesian3 } from '@vcmap-cesium/engine';
|
65
69
|
import { createToggleAction } from '../../actions/actionHelper.js';
|
66
|
-
import VcsFormSection from '../
|
70
|
+
import VcsFormSection from '../section/VcsFormSection.vue';
|
67
71
|
import VcsList from '../lists/VcsList.vue';
|
68
72
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
69
73
|
import VcsButton from '../buttons/VcsButton.vue';
|
@@ -197,7 +201,8 @@
|
|
197
201
|
}
|
198
202
|
|
199
203
|
export function durationRule(value) {
|
200
|
-
|
204
|
+
const v = Number.parseFloat(value);
|
205
|
+
if (Number.isFinite(v) && v > 0) {
|
201
206
|
return true;
|
202
207
|
}
|
203
208
|
return 'components.flight.invalidDuration';
|
@@ -217,6 +222,7 @@
|
|
217
222
|
VcsTextField,
|
218
223
|
VContainer,
|
219
224
|
VSheet,
|
225
|
+
VSpacer,
|
220
226
|
VcsFormSection,
|
221
227
|
VcsList,
|
222
228
|
},
|
@@ -242,6 +248,14 @@
|
|
242
248
|
flightInstance.propertyChanged.addEventListener((prop) => {
|
243
249
|
if (prop === 'loop') {
|
244
250
|
loop.value = flightInstance.loop;
|
251
|
+
// update last anchor's duration
|
252
|
+
const lastAnchor = flightInstance.anchors.get(
|
253
|
+
flightInstance.anchors.size - 1,
|
254
|
+
);
|
255
|
+
lastAnchor.duration = calculateDuration(
|
256
|
+
lastAnchor,
|
257
|
+
flightInstance.anchors.get(0),
|
258
|
+
);
|
245
259
|
}
|
246
260
|
});
|
247
261
|
|
@@ -328,7 +342,20 @@
|
|
328
342
|
};
|
329
343
|
</script>
|
330
344
|
<style scoped lang="scss">
|
345
|
+
:deep(.v-list-item) {
|
346
|
+
padding: 0 8px 0 16px;
|
347
|
+
}
|
348
|
+
:deep(.v-list) {
|
349
|
+
overflow: visible;
|
350
|
+
}
|
351
|
+
.duration-input {
|
352
|
+
width: 60px;
|
353
|
+
}
|
331
354
|
.z-index-99 {
|
332
|
-
z-index: 99;
|
355
|
+
z-index: 99 !important;
|
356
|
+
}
|
357
|
+
.add-in-button {
|
358
|
+
min-height: 0 !important;
|
359
|
+
margin-top: -8px;
|
333
360
|
}
|
334
361
|
</style>
|
@@ -18,24 +18,23 @@
|
|
18
18
|
<v-container class="py-0 px-1">
|
19
19
|
<v-row no-gutters v-if="!hideName">
|
20
20
|
<v-col cols="6">
|
21
|
-
<VcsLabel html-for="name"
|
21
|
+
<VcsLabel html-for="name" required>
|
22
22
|
{{ $t('components.flight.name') }}
|
23
23
|
</VcsLabel>
|
24
24
|
</v-col>
|
25
25
|
<v-col>
|
26
|
-
<VcsTextField id="name"
|
26
|
+
<VcsTextField id="name" clearable v-model="name" />
|
27
27
|
</v-col>
|
28
28
|
</v-row>
|
29
29
|
<v-row no-gutters v-if="!hideTitle">
|
30
30
|
<v-col cols="6">
|
31
|
-
<VcsLabel html-for="title"
|
31
|
+
<VcsLabel html-for="title">
|
32
32
|
{{ $t('components.flight.title') }}
|
33
33
|
</VcsLabel>
|
34
34
|
</v-col>
|
35
35
|
<v-col>
|
36
36
|
<VcsTextField
|
37
37
|
id="title"
|
38
|
-
dense
|
39
38
|
clearable
|
40
39
|
:placeholder="$t('components.flight.titlePlaceholder')"
|
41
40
|
v-model="title"
|
@@ -44,17 +43,16 @@
|
|
44
43
|
</v-row>
|
45
44
|
<v-row no-gutters v-if="!hideInterpolation">
|
46
45
|
<v-col cols="6">
|
47
|
-
<VcsLabel html-for="interpolation"
|
46
|
+
<VcsLabel html-for="interpolation">
|
48
47
|
{{ $t('components.flight.interpolation') }}
|
49
48
|
</VcsLabel>
|
50
49
|
</v-col>
|
51
50
|
<v-col>
|
52
51
|
<VcsSelect
|
53
52
|
id="title"
|
54
|
-
dense
|
55
53
|
:items="[
|
56
|
-
{ value: 'spline',
|
57
|
-
{ value: 'linear',
|
54
|
+
{ value: 'spline', title: 'components.flight.spline' },
|
55
|
+
{ value: 'linear', title: 'components.flight.linear' },
|
58
56
|
]"
|
59
57
|
v-model="interpolation"
|
60
58
|
/>
|
@@ -62,18 +60,17 @@
|
|
62
60
|
</v-row>
|
63
61
|
<v-row no-gutters v-if="!hideDuration">
|
64
62
|
<v-col cols="6">
|
65
|
-
<VcsLabel html-for="duration"
|
63
|
+
<VcsLabel html-for="duration">
|
66
64
|
{{ $t('components.flight.duration') }}
|
67
65
|
</VcsLabel>
|
68
66
|
</v-col>
|
69
67
|
<v-col>
|
70
68
|
<VcsTextField
|
71
69
|
id="duration"
|
72
|
-
v-model
|
70
|
+
v-model="duration"
|
73
71
|
:hide-spin-buttons="true"
|
74
72
|
type="number"
|
75
73
|
unit="s"
|
76
|
-
step="1"
|
77
74
|
:decimals="2"
|
78
75
|
:disabled="disablePlayer"
|
79
76
|
:rules="[durationRule]"
|
@@ -85,7 +82,6 @@
|
|
85
82
|
<VcsCheckbox
|
86
83
|
id="animate"
|
87
84
|
label="components.flight.loop"
|
88
|
-
dense
|
89
85
|
v-model="loop"
|
90
86
|
/>
|
91
87
|
</v-col>
|
@@ -106,7 +102,7 @@
|
|
106
102
|
import { computed, onUnmounted, ref, inject } from 'vue';
|
107
103
|
import { VSheet, VContainer, VRow, VCol, VDivider } from 'vuetify/components';
|
108
104
|
import { getSplineAndTimesForInstance } from '@vcmap/core';
|
109
|
-
import VcsFormSection from '../
|
105
|
+
import VcsFormSection from '../section/VcsFormSection.vue';
|
110
106
|
import VcsLabel from '../form-inputs-controls/VcsLabel.vue';
|
111
107
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
112
108
|
import VcsSelect from '../form-inputs-controls/VcsSelect.vue';
|
@@ -128,7 +124,7 @@
|
|
128
124
|
function getFlightDuration(instance) {
|
129
125
|
if (instance.isValid()) {
|
130
126
|
const { times } = getSplineAndTimesForInstance(instance);
|
131
|
-
return times.at(-1);
|
127
|
+
return Math.round(times.at(-1) * 100) / 100;
|
132
128
|
}
|
133
129
|
return 0;
|
134
130
|
}
|
@@ -208,6 +204,7 @@
|
|
208
204
|
setup() {
|
209
205
|
const app = inject('vcsApp');
|
210
206
|
const flightInstance = getProvidedFlightInstance();
|
207
|
+
const loop = ref(flightInstance.loop);
|
211
208
|
const flightDuration = ref(getFlightDuration(flightInstance));
|
212
209
|
const disablePlayer = ref(!(flightDuration.value > 0));
|
213
210
|
const flightDurationListener = [
|
@@ -258,12 +255,9 @@
|
|
258
255
|
return flightDuration.value;
|
259
256
|
},
|
260
257
|
set(value) {
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
flightDuration.value > 0
|
265
|
-
) {
|
266
|
-
const factor = value / flightDuration.value;
|
258
|
+
const v = parseFloat(value);
|
259
|
+
if (Number.isFinite(v) && v > 0 && flightDuration.value > 0) {
|
260
|
+
const factor = v / flightDuration.value;
|
267
261
|
[...flightInstance.anchors].forEach((anchor) => {
|
268
262
|
anchor.duration *= factor;
|
269
263
|
});
|
@@ -273,9 +267,10 @@
|
|
273
267
|
durationRule,
|
274
268
|
loop: computed({
|
275
269
|
get() {
|
276
|
-
return
|
270
|
+
return loop.value;
|
277
271
|
},
|
278
272
|
set(value) {
|
273
|
+
loop.value = !!value;
|
279
274
|
flightInstance.loop = !!value;
|
280
275
|
},
|
281
276
|
}),
|
@@ -4,8 +4,8 @@
|
|
4
4
|
<VcsSlider
|
5
5
|
v-if="clock"
|
6
6
|
type="number"
|
7
|
-
|
8
|
-
@
|
7
|
+
:model-value="clock.currentTime"
|
8
|
+
@update:modelValue="setTime"
|
9
9
|
:step="0"
|
10
10
|
:min="clock.startTime"
|
11
11
|
:max="clock.endTime"
|
@@ -25,7 +25,8 @@
|
|
25
25
|
:has-update="btn.hasUpdate"
|
26
26
|
:background="btn.background"
|
27
27
|
@click.stop="btn.callback($event)"
|
28
|
-
v-bind="{ ...$attrs
|
28
|
+
v-bind="{ ...$attrs }"
|
29
|
+
v-on="btn.listeners ? btn.listeners : {}"
|
29
30
|
/>
|
30
31
|
<span>{{ clockTime(clock.endTime) }}</span>
|
31
32
|
</div>
|
@@ -49,6 +50,19 @@
|
|
49
50
|
};
|
50
51
|
}
|
51
52
|
|
53
|
+
/**
|
54
|
+
*
|
55
|
+
* @param {import("vue").Ref<Partial<import("@vcmap/core").FlightPlayerClock>>} clock
|
56
|
+
* @param {import("@vcmap/core").FlightPlayerClock} changed
|
57
|
+
*/
|
58
|
+
function syncClocks(clock, changed) {
|
59
|
+
Object.keys(getDefaultClock()).forEach((key) => {
|
60
|
+
if (clock.value[key] !== changed[key]) {
|
61
|
+
clock.value[key] = changed[key];
|
62
|
+
}
|
63
|
+
});
|
64
|
+
}
|
65
|
+
|
52
66
|
/**
|
53
67
|
* @description A component for editing flight anchors.
|
54
68
|
* Requires a flightInstance to be provided via vue-provide.
|
@@ -79,12 +93,19 @@
|
|
79
93
|
flightInstance,
|
80
94
|
);
|
81
95
|
|
96
|
+
let clockChangedListener = () => {};
|
82
97
|
const playerChangedListener = app.flights.playerChanged.addEventListener(
|
83
98
|
(player) => {
|
99
|
+
clockChangedListener();
|
84
100
|
if (player?.flightInstanceName === flightInstance.name) {
|
85
101
|
isCurrentPlayer.value = true;
|
86
102
|
flightInstancePlayer = player;
|
87
|
-
clock
|
103
|
+
syncClocks(clock, player.clock);
|
104
|
+
clockChangedListener = player.clock.changed.addEventListener(
|
105
|
+
(changed) => {
|
106
|
+
syncClocks(clock, changed);
|
107
|
+
},
|
108
|
+
);
|
88
109
|
} else {
|
89
110
|
isCurrentPlayer.value = false;
|
90
111
|
flightInstancePlayer = undefined;
|
@@ -96,7 +117,7 @@
|
|
96
117
|
onMounted(async () => {
|
97
118
|
flightInstancePlayer =
|
98
119
|
await app.flights.setPlayerForFlight(flightInstance);
|
99
|
-
clock
|
120
|
+
syncClocks(clock, flightInstancePlayer.clock);
|
100
121
|
});
|
101
122
|
|
102
123
|
onUnmounted(() => {
|
@@ -114,6 +135,7 @@
|
|
114
135
|
return `${mins}:${secs < 10 ? 0 : ''}${secs}`;
|
115
136
|
},
|
116
137
|
setTime(seconds) {
|
138
|
+
clock.value.currentTime = seconds;
|
117
139
|
flightInstancePlayer?.goToTime(seconds);
|
118
140
|
},
|
119
141
|
};
|
@@ -5,38 +5,45 @@
|
|
5
5
|
false-icon="$vcsCheckbox"
|
6
6
|
indeterminate-icon="$vcsCheckboxIndeterminate"
|
7
7
|
:hide-details="false"
|
8
|
+
class="vcs-checkbox"
|
8
9
|
:class="{
|
9
10
|
'py-1': !paddingProvided,
|
10
11
|
}"
|
11
12
|
v-bind="$attrs"
|
12
13
|
>
|
13
|
-
<template #label>
|
14
|
-
<slot name="label"
|
15
|
-
<template v-if="!$slots.label">{{ $st($attrs.label) }}</template>
|
14
|
+
<template #label="scope">
|
15
|
+
<slot name="label" v-bind="scope ?? {}">{{ $st($attrs.label) }}</slot>
|
16
16
|
</template>
|
17
|
-
<template
|
17
|
+
<template v-for="slot of forwardSlots" #[slot]="scope">
|
18
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
19
|
+
</template>
|
20
|
+
<template #message="scope">
|
18
21
|
<v-tooltip
|
19
22
|
ref="errorTooltip"
|
20
23
|
:activator="checkbox"
|
21
|
-
v-if="message"
|
22
|
-
:text="message"
|
24
|
+
v-if="scope?.message"
|
25
|
+
:text="$st(scope?.message)"
|
23
26
|
content-class="bg-error"
|
24
27
|
:location="tooltipPosition"
|
25
28
|
/>
|
29
|
+
<slot name="message" v-bind="scope ?? {}"></slot>
|
26
30
|
</template>
|
27
31
|
<v-tooltip
|
28
32
|
v-if="tooltip && !errorTooltip"
|
29
33
|
:activator="checkbox"
|
30
34
|
:location="tooltipPosition"
|
31
|
-
:text="tooltip"
|
35
|
+
:text="$st(tooltip)"
|
32
36
|
></v-tooltip>
|
33
37
|
</v-checkbox>
|
34
38
|
</template>
|
35
39
|
<style lang="scss" scoped>
|
36
40
|
.v-input--density-compact :deep(.v-selection-control) {
|
37
|
-
--v-selection-control-size:
|
41
|
+
--v-selection-control-size: 20px;
|
38
42
|
--v-input-control-height: calc(var(--v-vcs-item-height) - 16px);
|
39
43
|
}
|
44
|
+
:deep(.v-input__control) {
|
45
|
+
height: calc(var(--v-vcs-item-height) - 8px);
|
46
|
+
}
|
40
47
|
// remove ripple effect
|
41
48
|
:deep(.v-selection-control__input::before) {
|
42
49
|
background-color: transparent;
|
@@ -49,7 +56,7 @@
|
|
49
56
|
<script>
|
50
57
|
import { ref } from 'vue';
|
51
58
|
import { VCheckbox, VTooltip } from 'vuetify/components';
|
52
|
-
import { usePadding } from '../composables.js';
|
59
|
+
import { useForwardSlots, usePadding } from '../composables.js';
|
53
60
|
|
54
61
|
/**
|
55
62
|
* @description Stylized wrapper around {@link https://vuetifyjs.com/en/api/v-checkbox/ |vuetify checkbox}.
|
@@ -76,12 +83,13 @@
|
|
76
83
|
default: 'right',
|
77
84
|
},
|
78
85
|
},
|
79
|
-
setup(props, { attrs }) {
|
86
|
+
setup(props, { attrs, slots }) {
|
80
87
|
const checkbox = ref();
|
81
88
|
const errorTooltip = ref();
|
82
89
|
const paddingProvided = usePadding(attrs);
|
83
|
-
|
90
|
+
const forwardSlots = useForwardSlots(slots, ['label', 'message']);
|
84
91
|
return {
|
92
|
+
forwardSlots,
|
85
93
|
paddingProvided,
|
86
94
|
checkbox,
|
87
95
|
errorTooltip,
|
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
8
8
|
default: string;
|
9
9
|
};
|
10
10
|
}, {
|
11
|
+
forwardSlots: import("vue").ComputedRef<string[]>;
|
11
12
|
paddingProvided: import("vue").ComputedRef<boolean>;
|
12
13
|
checkbox: import("vue").Ref<any>;
|
13
14
|
errorTooltip: import("vue").Ref<any>;
|
@@ -1,5 +1,12 @@
|
|
1
1
|
<template>
|
2
|
-
<v-row
|
2
|
+
<v-row
|
3
|
+
no-gutters
|
4
|
+
v-if="localValue"
|
5
|
+
class="vcs-coordinate"
|
6
|
+
:class="{
|
7
|
+
'py-1': !paddingProvided,
|
8
|
+
}"
|
9
|
+
>
|
3
10
|
<slot name="prepend" v-bind="{ ...$props }" />
|
4
11
|
<template v-for="(_, idx) in localValue">
|
5
12
|
<v-col :key="`${prefixes[idx]}-coordinate`" v-if="!hideZ || idx < 2">
|
@@ -7,6 +14,7 @@
|
|
7
14
|
:id="`${prefixes[idx]}-coordinate`"
|
8
15
|
:hide-spin-buttons="true"
|
9
16
|
type="number"
|
17
|
+
class="py-0"
|
10
18
|
:min="getRangeFromExtent(idx, extent)?.[0]"
|
11
19
|
:max="getRangeFromExtent(idx, extent)?.[1]"
|
12
20
|
:step="steps[idx]"
|
@@ -33,6 +41,7 @@
|
|
33
41
|
import { between } from '../style/composables.js';
|
34
42
|
import { useProxiedComplexModel } from '../modelHelper.js';
|
35
43
|
import { removeListenersFromAttrs } from '../attrsHelpers.js';
|
44
|
+
import { usePadding } from '../composables.js';
|
36
45
|
|
37
46
|
/**
|
38
47
|
*
|
@@ -114,11 +123,14 @@
|
|
114
123
|
default: () => [[], [], []],
|
115
124
|
},
|
116
125
|
},
|
126
|
+
emits: ['update:modelValue'],
|
117
127
|
setup(props, { attrs, emit }) {
|
118
128
|
const localValue = useProxiedComplexModel(props, 'modelValue', emit);
|
119
129
|
const noListenerAttrs = computed(() => removeListenersFromAttrs(attrs));
|
130
|
+
const paddingProvided = usePadding(attrs);
|
120
131
|
|
121
132
|
return {
|
133
|
+
paddingProvided,
|
122
134
|
localValue,
|
123
135
|
noListenerAttrs,
|
124
136
|
getRangeFromExtent,
|
@@ -32,11 +32,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
32
32
|
default: () => never[][];
|
33
33
|
};
|
34
34
|
}, {
|
35
|
+
paddingProvided: import("vue").ComputedRef<boolean>;
|
35
36
|
localValue: import("vue").Ref<any>;
|
36
37
|
noListenerAttrs: import("vue").ComputedRef<Record<string, unknown>>;
|
37
38
|
getRangeFromExtent: typeof getRangeFromExtent;
|
38
39
|
getRulesForAxis(idx: any): any[];
|
39
|
-
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
40
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
40
41
|
modelValue: {
|
41
42
|
type: ArrayConstructor;
|
42
43
|
default: () => number[];
|
@@ -69,7 +70,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
69
70
|
type: ArrayConstructor;
|
70
71
|
default: () => never[][];
|
71
72
|
};
|
72
|
-
}
|
73
|
+
}>> & {
|
74
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
75
|
+
}, {
|
73
76
|
modelValue: unknown[];
|
74
77
|
decimals: unknown[];
|
75
78
|
extent: unknown[];
|
@@ -1,47 +1,45 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
<VcsTextField
|
3
|
+
:prepend-icon="icon"
|
4
|
+
class="vcs-date-picker"
|
5
|
+
readonly
|
6
|
+
v-bind="$attrs"
|
7
|
+
v-model="formattedDate"
|
8
8
|
>
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
v-bind="props"
|
17
|
-
v-model="formattedDate"
|
18
|
-
/>
|
19
|
-
</template>
|
20
|
-
<v-date-picker
|
21
|
-
v-model="date"
|
22
|
-
hide-header
|
23
|
-
@update:model-value="menuOpen = false"
|
24
|
-
color="primary"
|
9
|
+
<v-menu
|
10
|
+
activator="parent"
|
11
|
+
v-model="menuOpen"
|
12
|
+
:close-on-content-click="false"
|
13
|
+
transition="scale-transition"
|
14
|
+
max-width="290px"
|
15
|
+
min-width="290px"
|
25
16
|
>
|
26
|
-
<
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
17
|
+
<v-date-picker
|
18
|
+
v-model="localValue"
|
19
|
+
hide-header
|
20
|
+
@update:model-value="menuOpen = false"
|
21
|
+
color="primary"
|
22
|
+
>
|
23
|
+
<template #actions>
|
24
|
+
<v-btn color="primary" @click="goToToday">
|
25
|
+
{{ $t('datePicker.today') }}
|
26
|
+
</v-btn>
|
27
|
+
</template>
|
28
|
+
</v-date-picker>
|
29
|
+
</v-menu>
|
30
|
+
</VcsTextField>
|
33
31
|
</template>
|
34
32
|
<style lang="scss" scoped></style>
|
35
33
|
<script>
|
36
|
-
import { computed, ref
|
34
|
+
import { computed, ref } from 'vue';
|
37
35
|
import { VMenu, VDatePicker, VBtn } from 'vuetify/components';
|
38
36
|
import { useI18n } from 'vue-i18n';
|
39
|
-
import { getLogger } from '@vcsuite/logger';
|
40
37
|
import VcsTextField from './VcsTextField.vue';
|
38
|
+
import { useProxiedAtomicModel } from '../modelHelper.js';
|
41
39
|
|
42
40
|
/**
|
43
|
-
* @description stylized wrapper around {@link https://
|
44
|
-
* @vue-prop {
|
41
|
+
* @description stylized wrapper around {@link https://vuetifyjs.com/en/components/date-pickers/#internationalization}.
|
42
|
+
* @vue-prop {Date} modelValue - value of the date picker as a Date (changes to the Date Object are not tracked, handled as atomic value)
|
45
43
|
* @vue-prop {string} [icon] - specify optional prepend icon, defaults to mdi-calendar
|
46
44
|
*/
|
47
45
|
export default {
|
@@ -65,27 +63,14 @@
|
|
65
63
|
emits: ['update:modelValue'],
|
66
64
|
setup(props, { emit }) {
|
67
65
|
const i18n = useI18n();
|
68
|
-
const localValue =
|
66
|
+
const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
|
69
67
|
const menuOpen = ref(false);
|
70
68
|
|
71
|
-
const isValid = (date) => !Number.isNaN(date.getTime());
|
72
|
-
const setFromValue = () => {
|
73
|
-
if (isValid(props.modelValue)) {
|
74
|
-
localValue.value = props.modelValue;
|
75
|
-
} else if (localValue.value) {
|
76
|
-
getLogger('VcsDatePicker').error(
|
77
|
-
'Invalid date provided: ',
|
78
|
-
props.modelValue,
|
79
|
-
);
|
80
|
-
}
|
81
|
-
};
|
82
|
-
onBeforeMount(() => setFromValue());
|
83
|
-
|
84
69
|
const formatDate = (date) => {
|
85
70
|
if (date) {
|
86
71
|
return new Intl.DateTimeFormat(i18n.locale.value, {
|
87
72
|
dateStyle: 'short',
|
88
|
-
}).format(
|
73
|
+
}).format(date);
|
89
74
|
}
|
90
75
|
return '';
|
91
76
|
};
|
@@ -93,27 +78,16 @@
|
|
93
78
|
localValue.value = new Date();
|
94
79
|
menuOpen.value = false;
|
95
80
|
};
|
96
|
-
watch(
|
97
|
-
() => props.modelValue,
|
98
|
-
() => setFromValue(),
|
99
|
-
);
|
100
81
|
const formattedDate = computed({
|
101
82
|
get: () => {
|
102
83
|
return formatDate(localValue.value);
|
103
84
|
},
|
104
85
|
set: () => {},
|
105
86
|
});
|
106
|
-
const date = computed({
|
107
|
-
get: () => localValue.value,
|
108
|
-
set: (nv) => {
|
109
|
-
localValue.value = nv;
|
110
|
-
emit('update:modelValue', localValue.value);
|
111
|
-
},
|
112
|
-
});
|
113
87
|
|
114
88
|
return {
|
115
89
|
formattedDate,
|
116
|
-
|
90
|
+
localValue,
|
117
91
|
menuOpen,
|
118
92
|
formatDate,
|
119
93
|
goToToday,
|