@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.
Files changed (320) hide show
  1. package/build/build.js +40 -60
  2. package/build/buildHelpers.js +2 -8
  3. package/build/info/conf.json +1 -1
  4. package/config/base.config.json +4 -4
  5. package/config/projects.config.json +2 -1
  6. package/config/splashscreen.config.json +45 -0
  7. package/dist/.htaccess +7 -0
  8. package/dist/assets/@mdi/font/README.md +25 -0
  9. package/dist/assets/@mdi/font/css/materialdesignicons.min-7a4f6be0.css +3 -0
  10. package/dist/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
  11. package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  12. package/dist/assets/cesium/Assets/approximateTerrainHeights.json +1 -1
  13. package/dist/assets/cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
  14. package/dist/assets/cesium/Workers/{chunk-ZA25DG4Y.js → chunk-3DRPXHZ4.js} +11 -11
  15. package/dist/assets/cesium/Workers/{chunk-OAVNIRB4.js → chunk-3GI7DWF7.js} +5 -7
  16. package/dist/assets/cesium/Workers/{chunk-TFC6TZ3S.js → chunk-4EW3HFFI.js} +33 -22
  17. package/dist/assets/cesium/Workers/{chunk-LLUNNUJV.js → chunk-4OX4RYLB.js} +5 -5
  18. package/dist/assets/cesium/Workers/{chunk-66QLLS45.js → chunk-4RJH3H6D.js} +11 -9
  19. package/dist/assets/cesium/Workers/{chunk-MPAZH4BF.js → chunk-5OUTANXX.js} +1 -1
  20. package/dist/assets/cesium/Workers/{chunk-WXTV4ATB.js → chunk-6DH5PLFD.js} +1 -1
  21. package/dist/assets/cesium/Workers/{chunk-A4JVFBQ3.js → chunk-6DXIYFX3.js} +2 -2
  22. package/dist/assets/cesium/Workers/chunk-A5C2A5O5.js +963 -0
  23. package/dist/assets/cesium/Workers/{chunk-HQF437NJ.js → chunk-AGTH5JMJ.js} +6 -6
  24. package/dist/assets/cesium/Workers/{chunk-RP2A7BR5.js → chunk-AVFIYUKX.js} +12 -14
  25. package/dist/assets/cesium/Workers/{chunk-227AJNOA.js → chunk-BAJAVGUF.js} +5 -5
  26. package/dist/assets/cesium/Workers/{chunk-N3JIFFX2.js → chunk-BPY4HDAK.js} +5 -6
  27. package/dist/assets/cesium/Workers/{chunk-ABADGKYE.js → chunk-D6PDWQXW.js} +2 -2
  28. package/dist/assets/cesium/Workers/{chunk-34YUDLRP.js → chunk-DR7LK6PG.js} +13 -13
  29. package/dist/assets/cesium/Workers/{chunk-OYFCF4PL.js → chunk-DTACCQDR.js} +6 -6
  30. package/dist/assets/cesium/Workers/{chunk-C3SXRKRW.js → chunk-EVU2UNBD.js} +7 -7
  31. package/dist/assets/cesium/Workers/{chunk-6BTKZDRG.js → chunk-F7IEM66T.js} +3 -5
  32. package/dist/assets/cesium/Workers/{chunk-QT3MPEMI.js → chunk-FSXNF76Y.js} +4 -4
  33. package/dist/assets/cesium/Workers/{chunk-PCJWUS4M.js → chunk-FYYT5EVH.js} +830 -14
  34. package/dist/assets/cesium/Workers/{chunk-QMEMZIJI.js → chunk-FZDKIUDT.js} +4 -4
  35. package/dist/assets/cesium/Workers/{chunk-XTY7B2N6.js → chunk-G6346EDR.js} +16 -16
  36. package/dist/assets/cesium/Workers/{chunk-CHHNOC2C.js → chunk-H7PSTL64.js} +95 -155
  37. package/dist/assets/cesium/Workers/{chunk-2R5O53JW.js → chunk-I67V66MN.js} +6 -6
  38. package/dist/assets/cesium/Workers/{chunk-JS3AW5BK.js → chunk-IALQGTA2.js} +6 -6
  39. package/dist/assets/cesium/Workers/{chunk-K36FEYS7.js → chunk-KNMGSIIN.js} +16 -12
  40. package/dist/assets/cesium/Workers/{chunk-J3JY6I2C.js → chunk-L4XQPD6P.js} +49 -88
  41. package/dist/assets/cesium/Workers/{chunk-X4SU25DT.js → chunk-LMTN7R7M.js} +10 -12
  42. package/dist/assets/cesium/Workers/{chunk-JB2LWGH4.js → chunk-LUYI3XCB.js} +14 -14
  43. package/dist/assets/cesium/Workers/{chunk-AFFLIKOH.js → chunk-N5MIFVXJ.js} +7 -7
  44. package/dist/assets/cesium/Workers/{chunk-MYZB7C4T.js → chunk-O7OUBDMZ.js} +10 -10
  45. package/dist/assets/cesium/Workers/{chunk-VLGOATD6.js → chunk-P24I5VUS.js} +22 -22
  46. package/dist/assets/cesium/Workers/{chunk-KD4Y7CZL.js → chunk-PIOKSAZH.js} +15 -17
  47. package/dist/assets/cesium/Workers/{chunk-3W63OHNJ.js → chunk-PRKEY4QK.js} +5 -5
  48. package/dist/assets/cesium/Workers/{chunk-O5AMBQ36.js → chunk-Q7PM4W34.js} +8 -8
  49. package/dist/assets/cesium/Workers/{chunk-GLZBE3ML.js → chunk-QLC66ZRL.js} +13 -13
  50. package/dist/assets/cesium/Workers/{chunk-OZJDGN5F.js → chunk-RRLGJV3Q.js} +16 -16
  51. package/dist/assets/cesium/Workers/{chunk-CCFQRR6D.js → chunk-S2UEXF6T.js} +1 -1
  52. package/dist/assets/cesium/Workers/{chunk-QIKODV5G.js → chunk-S4VTLNAJ.js} +4 -4
  53. package/dist/assets/cesium/Workers/{chunk-EW2GWJYB.js → chunk-SJC5PRDX.js} +2 -2
  54. package/dist/assets/cesium/Workers/{chunk-KTJSNCK4.js → chunk-T6TZXGG5.js} +230 -20
  55. package/dist/assets/cesium/Workers/{chunk-RW6LU2CJ.js → chunk-TLGODPEV.js} +5 -5
  56. package/dist/assets/cesium/Workers/{chunk-CTELOFLA.js → chunk-UC566ISB.js} +6 -6
  57. package/dist/assets/cesium/Workers/{chunk-ZFOBYDGF.js → chunk-UMX265HW.js} +2 -2
  58. package/dist/assets/cesium/Workers/{chunk-Z24VKNDO.js → chunk-V7WJDCPA.js} +12 -12
  59. package/dist/assets/cesium/Workers/{chunk-4MFFIWUA.js → chunk-VD6G7UPU.js} +2 -2
  60. package/dist/assets/cesium/Workers/{chunk-XY7MGBKC.js → chunk-WMVCLETM.js} +14 -16
  61. package/dist/assets/cesium/Workers/{chunk-IPA4EACJ.js → chunk-WOA6WSHH.js} +12 -12
  62. package/dist/assets/cesium/Workers/{chunk-PFQBCKBM.js → chunk-X67EJ6X6.js} +4398 -2722
  63. package/dist/assets/cesium/Workers/{chunk-V3NGATMV.js → chunk-XGI4FRXF.js} +11 -13
  64. package/dist/assets/cesium/Workers/{chunk-AHKEZ2OE.js → chunk-YFVI4SQI.js} +1 -1
  65. package/dist/assets/cesium/Workers/{chunk-HARLBUOL.js → chunk-YFYPR4MW.js} +11 -8
  66. package/dist/assets/cesium/Workers/combineGeometry.js +22 -23
  67. package/dist/assets/cesium/Workers/createBoxGeometry.js +16 -17
  68. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +14 -15
  69. package/dist/assets/cesium/Workers/createCircleGeometry.js +29 -26
  70. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +17 -18
  71. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +35 -36
  72. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +29 -30
  73. package/dist/assets/cesium/Workers/createCorridorGeometry.js +29 -30
  74. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +27 -28
  75. package/dist/assets/cesium/Workers/createCylinderGeometry.js +18 -19
  76. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +17 -19
  77. package/dist/assets/cesium/Workers/createEllipseGeometry.js +24 -25
  78. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +17 -18
  79. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +17 -18
  80. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +16 -17
  81. package/dist/assets/cesium/Workers/createFrustumGeometry.js +16 -17
  82. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +18 -18
  83. package/dist/assets/cesium/Workers/createGeometry.js +52 -33
  84. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +28 -29
  85. package/dist/assets/cesium/Workers/createPlaneGeometry.js +14 -15
  86. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +13 -14
  87. package/dist/assets/cesium/Workers/createPolygonGeometry.js +451 -176
  88. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +29 -30
  89. package/dist/assets/cesium/Workers/createPolylineGeometry.js +24 -25
  90. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +31 -33
  91. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +27 -29
  92. package/dist/assets/cesium/Workers/createRectangleGeometry.js +30 -31
  93. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +21 -24
  94. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +22 -23
  95. package/dist/assets/cesium/Workers/createSphereGeometry.js +17 -18
  96. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +16 -17
  97. package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +3 -3
  98. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +14 -16
  99. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +22 -23
  100. package/dist/assets/cesium/Workers/createVectorTilePoints.js +12 -12
  101. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +20 -21
  102. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +14 -16
  103. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +24 -25
  104. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +25 -26
  105. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -21
  106. package/dist/assets/cesium/Workers/createWallGeometry.js +23 -24
  107. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +22 -23
  108. package/dist/assets/cesium/Workers/decodeDraco.js +11 -11
  109. package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +12 -19
  110. package/dist/assets/cesium/Workers/decodeI3S.js +600 -92
  111. package/dist/assets/cesium/Workers/transcodeKTX2.js +46 -82
  112. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
  113. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +21 -22
  114. package/dist/assets/{cesium.6b12b4.js → cesium-cb4dbfba.js} +151166 -145641
  115. package/dist/assets/cesium.js +1 -1
  116. package/dist/assets/{core.074b78.js → core-72f21835.js} +2299 -2225
  117. package/dist/assets/core.js +1 -1
  118. package/dist/assets/{ol.8b2e3a.js → ol-2d33bc8b.js} +42505 -44282
  119. package/dist/assets/ol.js +1 -1
  120. package/dist/assets/ui-2ab43a16.css +1 -0
  121. package/dist/assets/{ui.715986.js → ui-2ab43a16.js} +12001 -11136
  122. package/dist/assets/ui.js +1 -1
  123. package/dist/assets/vue.js +1 -1
  124. package/dist/assets/{vuetify.28d881.css → vuetify-760ced3b.css} +1 -1
  125. package/dist/assets/{vuetify.28d881.js → vuetify-760ced3b.js} +5720 -5662
  126. package/dist/assets/vuetify.js +1 -1
  127. package/dist/index.html +11 -10
  128. package/index.d.ts +9 -5
  129. package/index.html +5 -5
  130. package/index.js +4 -3
  131. package/lib/olLib.js +84 -23
  132. package/package.json +10 -9
  133. package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +41 -1
  134. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +70 -30
  135. package/plugins/@vcmap-show-case/form-inputs-example/src/exampleActions.js +7 -11
  136. package/plugins/@vcmap-show-case/form-inputs-example/src/index.js +2 -2
  137. package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +45 -94
  138. package/plugins/@vcmap-show-case/style-input-example/src/StyleExample.vue +29 -90
  139. package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +35 -10
  140. package/plugins/@vcmap-show-case/wizard-example/src/WizardExample.vue +40 -54
  141. package/public/assets/@mdi/font/README.md +25 -0
  142. package/public/assets/@mdi/font/css/materialdesignicons.min.css +2 -2
  143. package/public/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
  144. package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  145. package/src/actions/actionHelper.js +20 -20
  146. package/src/actions/flightActions.js +5 -5
  147. package/src/actions/listActions.d.ts +0 -7
  148. package/src/actions/listActions.js +4 -20
  149. package/src/actions/stateRefAction.js +2 -2
  150. package/src/application/VcsApp.vue +53 -29
  151. package/src/application/VcsApp.vue.d.ts +1 -0
  152. package/src/application/VcsAttributions.vue +2 -13
  153. package/src/application/VcsAttributionsFooter.vue +10 -11
  154. package/src/application/VcsNavbar.vue.d.ts +1 -1
  155. package/src/application/VcsPositionDisplay.vue +8 -23
  156. package/src/application/VcsPositionDisplay.vue.d.ts +0 -1
  157. package/src/application/VcsSettings.vue +10 -17
  158. package/src/application/VcsSplashScreen.vue +34 -54
  159. package/src/application/VcsSplashScreen.vue.d.ts +4 -6
  160. package/src/application/VcsTextPage.vue +13 -44
  161. package/src/application/VcsTextPage.vue.d.ts +4 -8
  162. package/src/application/VcsTextPageFooter.vue +22 -40
  163. package/src/application/markdownHelper.js +2 -17
  164. package/src/components/buttons/VcsButton.vue +1 -1
  165. package/src/components/buttons/VcsButton.vue.d.ts +3 -3
  166. package/src/components/buttons/VcsFormButton.vue +1 -1
  167. package/src/components/buttons/VcsFormButton.vue.d.ts +2 -2
  168. package/src/components/buttons/VcsToolButton.vue +1 -1
  169. package/src/components/buttons/VcsToolButton.vue.d.ts +4 -4
  170. package/src/components/composables.d.ts +7 -0
  171. package/src/components/composables.js +35 -1
  172. package/src/components/extent/VcsExtentEditor.vue +1 -1
  173. package/src/components/flight/VcsFlightAnchorsComponent.vue +63 -36
  174. package/src/components/flight/VcsFlightComponent.vue +16 -21
  175. package/src/components/flight/VcsFlightPlayer.vue +27 -5
  176. package/src/components/form-inputs-controls/VcsCheckbox.vue +19 -11
  177. package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +1 -0
  178. package/src/components/form-inputs-controls/VcsChipArrayInput.vue +1 -1
  179. package/src/components/form-inputs-controls/VcsCoordinate.vue +13 -1
  180. package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +5 -2
  181. package/src/components/form-inputs-controls/VcsDatePicker.vue +34 -60
  182. package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +2 -64
  183. package/src/components/form-inputs-controls/VcsFileInput.vue +18 -19
  184. package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -0
  185. package/src/components/form-inputs-controls/VcsLabel.vue +31 -1
  186. package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +21 -1
  187. package/src/components/form-inputs-controls/VcsRadio.vue +19 -5
  188. package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
  189. package/src/components/form-inputs-controls/VcsSelect.vue +44 -41
  190. package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +7 -4
  191. package/src/components/form-inputs-controls/VcsSlider.vue +49 -10
  192. package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +28 -2
  193. package/src/components/form-inputs-controls/VcsTextArea.vue +54 -35
  194. package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -0
  195. package/src/components/form-inputs-controls/VcsTextField.vue +21 -14
  196. package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +1 -0
  197. package/src/components/form-inputs-controls/VcsWizard.vue +89 -112
  198. package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +3 -13
  199. package/src/components/form-inputs-controls/VcsWizardStep.vue +75 -57
  200. package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +24 -11
  201. package/src/components/form-inputs-controls/vcsTextField.scss +13 -8
  202. package/src/components/form-output/VcsFormattedNumber.vue +40 -10
  203. package/src/components/form-output/VcsFormattedNumber.vue.d.ts +27 -0
  204. package/src/components/form-output/VcsMarkdown.vue +53 -0
  205. package/src/{application/VcsCustomScreen.vue.d.ts → components/form-output/VcsMarkdown.vue.d.ts} +6 -5
  206. package/src/components/lists/VcsActionList.vue +50 -34
  207. package/src/components/lists/VcsActionList.vue.d.ts +3 -1
  208. package/src/components/lists/VcsList.vue +82 -158
  209. package/src/components/lists/VcsList.vue.d.ts +7 -14
  210. package/src/components/lists/VcsListItem.vue +184 -0
  211. package/src/components/lists/VcsListItem.vue.d.ts +27 -0
  212. package/src/components/lists/VcsTreeviewLeaf.vue +1 -1
  213. package/src/components/modelHelper.d.ts +11 -0
  214. package/src/components/modelHelper.js +42 -2
  215. package/src/components/section/VcsExpansionPanel.vue +101 -0
  216. package/src/components/section/VcsExpansionPanel.vue.d.ts +19 -0
  217. package/src/components/style/MenuWrapper.vue +24 -26
  218. package/src/components/style/MenuWrapper.vue.d.ts +4 -4
  219. package/src/components/style/VcsFillMenu.vue +9 -16
  220. package/src/components/style/VcsFillMenu.vue.d.ts +0 -18
  221. package/src/components/style/VcsFillSelector.vue +13 -16
  222. package/src/components/style/VcsImageMenu.vue +8 -25
  223. package/src/components/style/VcsImageMenu.vue.d.ts +0 -27
  224. package/src/components/style/VcsImageSelector.vue +102 -167
  225. package/src/components/style/VcsImageSelector.vue.d.ts +15 -15
  226. package/src/components/style/VcsStrokeMenu.vue +8 -15
  227. package/src/components/style/VcsStrokeMenu.vue.d.ts +0 -18
  228. package/src/components/style/VcsStrokeSelector.vue +11 -18
  229. package/src/components/style/VcsTextMenu.vue +9 -12
  230. package/src/components/style/VcsTextMenu.vue.d.ts +0 -9
  231. package/src/components/style/VcsTextSelector.vue +79 -95
  232. package/src/components/style/VcsTextSelector.vue.d.ts +20 -22
  233. package/src/components/style/VcsVectorStyleComponent.vue +7 -18
  234. package/src/components/style/VcsVectorStyleComponent.vue.d.ts +1 -1
  235. package/src/components/style/composables.d.ts +0 -14
  236. package/src/components/style/composables.js +0 -49
  237. package/src/components/vector-properties/VcsFeatureEditingWindow.vue +53 -12
  238. package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +3 -3
  239. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +475 -586
  240. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +193 -22
  241. package/src/components/viewpoint/VcsViewpointComponent.vue +21 -8
  242. package/src/components/viewpoint/VcsViewpointEditor.vue +1 -0
  243. package/src/contentTree/contentTreeItem.d.ts +2 -2
  244. package/src/contentTree/contentTreeItem.js +7 -7
  245. package/src/featureInfo/featureInfo.js +8 -10
  246. package/src/init.d.ts +5 -38
  247. package/src/init.js +19 -18
  248. package/src/legend/StyleLegendItem.vue +4 -9
  249. package/src/legend/VcsLegend.vue +28 -54
  250. package/src/manager/buttonManager.js +4 -4
  251. package/src/manager/collectionManager/CollectionComponent.vue +17 -42
  252. package/src/manager/collectionManager/CollectionComponent.vue.d.ts +4 -2
  253. package/src/manager/collectionManager/CollectionComponentContent.vue +7 -6
  254. package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +3 -1
  255. package/src/manager/collectionManager/CollectionComponentList.vue +10 -8
  256. package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +4 -2
  257. package/src/manager/collectionManager/CollectionComponentProvider.vue +1 -1
  258. package/src/manager/collectionManager/CollectionComponentStandalone.vue +3 -2
  259. package/src/manager/collectionManager/CollectionManager.vue +1 -1
  260. package/src/manager/collectionManager/collectionComponentClass.js +6 -9
  261. package/src/manager/collectionManager/collectionManager.js +10 -10
  262. package/src/manager/collectionManager/editorCollectionComponentClass.js +4 -4
  263. package/src/manager/contextMenu/contextMenuManager.js +2 -2
  264. package/src/manager/navbarManager.js +2 -2
  265. package/src/manager/panel/panelManager.js +3 -3
  266. package/src/manager/toolbox/toolboxManager.js +10 -10
  267. package/src/manager/window/windowManager.d.ts +6 -6
  268. package/src/manager/window/windowManager.js +6 -6
  269. package/src/navigation/MapNavigation.vue +6 -3
  270. package/src/navigation/OrientationToolsButton.vue +39 -26
  271. package/src/navigation/OrientationToolsButton.vue.d.ts +5 -1
  272. package/src/navigation/TiltSlider.vue +83 -88
  273. package/src/navigation/TiltSlider.vue.d.ts +10 -7
  274. package/src/navigation/VcsCompass.vue +17 -11
  275. package/src/navigation/VcsCompass.vue.d.ts +2 -0
  276. package/src/search/search.js +2 -2
  277. package/src/siteConfig.js +1 -1
  278. package/src/state.js +4 -4
  279. package/src/styles/_typography.scss +1 -0
  280. package/src/vcsUiApp.d.ts +24 -26
  281. package/src/vcsUiApp.js +11 -4
  282. package/src/vuePlugins/i18n.js +7 -0
  283. package/src/vuePlugins/vuetify.d.ts +2 -0
  284. package/src/vuePlugins/vuetify.js +15 -0
  285. package/dist/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
  286. package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +0 -3
  287. package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +0 -3273
  288. package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +0 -73
  289. package/dist/assets/index-ca7EmZ3d.js +0 -1
  290. package/dist/assets/ui.715986.css +0 -1
  291. package/public/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
  292. package/src/application/VcsCustomScreen.vue +0 -45
  293. package/src/components/vector-properties/composables.d.ts +0 -33
  294. package/src/components/vector-properties/composables.js +0 -100
  295. package/dist/assets/{favicon-128.4c4ce5.png → favicon-128-4c4ce5df.png} +0 -0
  296. package/dist/assets/{favicon-180.5b99c0.png → favicon-180-4c4ce5df.png} +0 -0
  297. package/dist/assets/{favicon-192.0e205e.png → favicon-192-4c4ce5df.png} +0 -0
  298. package/dist/assets/{favicon-32.6b9add.png → favicon-32-4c4ce5df.png} +0 -0
  299. package/dist/assets/{favicon.d5ec97.svg → favicon-4c4ce5df.svg} +0 -0
  300. package/dist/assets/font/{TitilliumWeb-Regular.9ca076.woff2 → TitilliumWeb-Regular-9ca076be.woff2} +0 -0
  301. package/dist/assets/style/{icon-marker.70960f.png → icon-marker-70960f05.png} +0 -0
  302. package/dist/assets/style/{icon-marker-blue.534e37.png → icon-marker-blue-534e374b.png} +0 -0
  303. package/dist/assets/style/{icon-marker-green.0b6a92.png → icon-marker-green-0b6a92bc.png} +0 -0
  304. package/dist/assets/style/{icon-marker-o.036477.png → icon-marker-o-036477fa.png} +0 -0
  305. package/dist/assets/style/{icon-marker-o-blue.7b6d62.png → icon-marker-o-blue-7b6d6279.png} +0 -0
  306. package/dist/assets/style/{icon-marker-o-green.c863c0.png → icon-marker-o-green-c863c0fa.png} +0 -0
  307. package/dist/assets/style/{icon-marker-o-red.93ff58.png → icon-marker-o-red-93ff58df.png} +0 -0
  308. package/dist/assets/style/{icon-marker-red.313d03.png → icon-marker-red-313d03e8.png} +0 -0
  309. package/dist/assets/style/{icon-pin.b7ce77.png → icon-pin-b7ce771e.png} +0 -0
  310. package/dist/assets/style/{icon-pin-blue.7be369.png → icon-pin-blue-7be369a3.png} +0 -0
  311. package/dist/assets/style/{icon-pin-green.cbb935.png → icon-pin-green-cbb935fe.png} +0 -0
  312. package/dist/assets/style/{icon-pin-red.3f25b2.png → icon-pin-red-3f25b245.png} +0 -0
  313. package/dist/assets/{vue.0f2c53.js → vue-03b265aa.js} +0 -0
  314. package/public/assets/{favicon-128.png → favicon-128-4c4ce5df.png} +0 -0
  315. package/public/assets/{favicon-180.png → favicon-180-4c4ce5df.png} +0 -0
  316. package/public/assets/{favicon-192.png → favicon-192-4c4ce5df.png} +0 -0
  317. package/public/assets/{favicon-32.png → favicon-32-4c4ce5df.png} +0 -0
  318. package/public/assets/{favicon.svg → favicon-4c4ce5df.svg} +0 -0
  319. package/src/components/{form-inputs-controls → section}/VcsFormSection.vue +0 -0
  320. package/src/components/{form-inputs-controls → section}/VcsFormSection.vue.d.ts +1 -1
@@ -25,13 +25,21 @@
25
25
  <v-divider />
26
26
  <v-container class="px-1 pt-1 pb-0">
27
27
  <VcsRadio
28
- v-model="selectedImage"
28
+ v-model="selectedIdx"
29
29
  :items="currentItems"
30
- :disabled="!value"
31
- item-value="src"
30
+ :disabled="!modelValue"
31
+ item-value="idx"
32
+ label-position="top"
33
+ inline
34
+ class="d-flex justify-center"
32
35
  >
33
- <template #top-label="{ item }" v-if="selectedType === ImageType.SHAPE">
34
- <v-icon size="24">{{ item.src }}</v-icon>
36
+ <template #label="{ item }">
37
+ <img
38
+ v-if="selectedType !== ImageType.SHAPE"
39
+ :src="item.src"
40
+ alt="shape"
41
+ />
42
+ <v-icon v-else size="24">{{ item.src }}</v-icon>
35
43
  </template>
36
44
  </VcsRadio>
37
45
  <div v-if="selectedType === ImageType.ICON">
@@ -44,7 +52,7 @@
44
52
  <v-col>
45
53
  <VcsSlider
46
54
  id="style-icon-opacity"
47
- v-model="selectedOpacity"
55
+ v-model="localValue.opacity"
48
56
  step="0.1"
49
57
  type="number"
50
58
  max="1"
@@ -58,18 +66,18 @@
58
66
  <v-row
59
67
  no-gutters
60
68
  v-for="input in shapeSingleValueInputs"
61
- :key="input.name"
69
+ :key="input.key"
62
70
  >
63
71
  <v-col>
64
- <VcsLabel>{{ $st(`components.style.${input.text}`) }}</VcsLabel>
72
+ <VcsLabel>{{ $st(`components.style.${input.key}`) }}</VcsLabel>
65
73
  </v-col>
66
74
  <v-col cols="3">
67
75
  <VcsTextField
68
- :id="`style-shape-${input.text}`"
76
+ :id="`style-shape-${input.key}`"
69
77
  :hide-spin-buttons="true"
70
78
  type="number"
71
79
  :unit="input.unit || ''"
72
- v-model.number="input.value.value"
80
+ v-model.number="localValue[input.key]"
73
81
  :disabled="currentType !== ImageType.SHAPE"
74
82
  :step="input.step || 1"
75
83
  :min="input.range?.[0] || 0"
@@ -110,22 +118,22 @@
110
118
  </v-row>
111
119
  <VcsStrokeMenu
112
120
  v-if="selectedType === ImageType.SHAPE"
113
- v-model="selectedStroke"
121
+ v-model="localValue.stroke"
114
122
  :value-default="valueDefault?.stroke"
115
- :disabled="!value || currentType !== ImageType.SHAPE"
123
+ :disabled="!localValue || currentType !== ImageType.SHAPE"
116
124
  />
117
125
  <VcsFillMenu
118
126
  v-if="selectedType === ImageType.SHAPE"
119
- v-model="selectedFill"
127
+ v-model="localValue.fill"
120
128
  :value-default="valueDefault?.fill"
121
- :disabled="!value || currentType !== ImageType.SHAPE"
129
+ :disabled="!localValue || currentType !== ImageType.SHAPE"
122
130
  />
123
131
  </v-container>
124
132
  </v-sheet>
125
133
  </template>
126
134
 
127
135
  <script>
128
- import { computed, onMounted, ref, watch } from 'vue';
136
+ import { computed, onMounted, ref, toRaw, watch } from 'vue';
129
137
  import {
130
138
  VSheet,
131
139
  VDivider,
@@ -136,16 +144,18 @@
136
144
  VTabs,
137
145
  VTab,
138
146
  } from 'vuetify/components';
139
- import { Circle, Fill, Icon, RegularShape, Stroke, Style } from 'ol/style.js';
147
+ import { Icon, Style } from 'ol/style.js';
140
148
  import { toContext } from 'ol/render.js';
141
149
  import { Point } from 'ol/geom.js';
150
+ import { getImageStyleFromOptions } from '@vcmap/core';
151
+ import { useProxiedComplexModel } from '../modelHelper.js';
142
152
  import VcsLabel from '../form-inputs-controls/VcsLabel.vue';
143
153
  import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
144
154
  import VcsSlider from '../form-inputs-controls/VcsSlider.vue';
145
155
  import VcsRadio from '../form-inputs-controls/VcsRadio.vue';
146
156
  import VcsFillMenu from './VcsFillMenu.vue';
147
157
  import VcsStrokeMenu from './VcsStrokeMenu.vue';
148
- import { useSelectedKey, between } from './composables.js';
158
+ import { between } from './composables.js';
149
159
 
150
160
  /**
151
161
  * @enum {string}
@@ -160,8 +170,8 @@
160
170
  /**
161
171
  * Draws an image style on a canvas.
162
172
  * @param {HTMLCanvasElement} canvas The canvas to draw on
163
- * @param {import("ol/style/Image").Options} imageOptions The JSON options of the image style.
164
- * @param {boolean} fitToCanvas If the circle, shape or icon should be fitted into the canvas or if it should be draw with it's actual size.
173
+ * @param {import("ol/style/Image").Options} [imageOptions] The JSON options of the image style.
174
+ * @param {boolean} [fitToCanvas=false] If the circle, shape or icon should be fitted into the canvas or if it should be draw with it's actual size.
165
175
  */
166
176
  export async function drawImageStyle(
167
177
  canvas,
@@ -177,37 +187,9 @@
177
187
  let imageStyle;
178
188
  let size;
179
189
  if (imageOptions.radius) {
180
- // TODO: Replace with getImageStyleFromOptions from styleHelpers.ts in @vcmap/core
181
190
  const { radius } = imageOptions;
182
191
  size = [radius * 2, radius * 2];
183
- const options = {
184
- stroke: new Stroke(
185
- imageOptions.stroke
186
- ? {
187
- color: imageOptions.stroke.color,
188
- width: imageOptions.stroke.width,
189
- }
190
- : null,
191
- ),
192
- fill: new Fill(
193
- imageOptions.fill
194
- ? {
195
- color: imageOptions.fill.color,
196
- }
197
- : null,
198
- ),
199
- radius,
200
- };
201
- if (imageOptions.points) {
202
- options.radius2 = imageOptions.radius2;
203
- options.angle = imageOptions.angle;
204
- options.points = imageOptions.points;
205
- options.rotation = imageOptions.rotation;
206
- options.scale = imageOptions.scale;
207
- imageStyle = new RegularShape(options);
208
- } else {
209
- imageStyle = new Circle(options);
210
- }
192
+ imageStyle = getImageStyleFromOptions(imageOptions);
211
193
  } else if (imageOptions.src) {
212
194
  // Somehow the icon does not load the img when providing the src. And icon.load() is not async.
213
195
  // Therefore the img first has to be loaded and then passed to new Icon
@@ -747,8 +729,8 @@
747
729
 
748
730
  /**
749
731
  * @description Allows to model a JSON representation of ol/style/Image style. It makes use of VcsStrokeMenu and VcsFillMenu.
750
- * @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} value - The Image options
751
- * @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} valueDefault - The default image options
732
+ * @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} [modelValue] - The Image options
733
+ * @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} [valueDefault] - The default image options
752
734
  * @vue-prop {Array<import("ol/style/Icon").Options>} [iconOptions] - The icon options too choose from. Scale and opacity are ignored. The defaults are 3 different shapes with 4 different colors.
753
735
  * @vue-prop {boolean} [extendedShapeSettings=false] - If true, there are all the input fields needed to create arbitrary ol RegularShapes.
754
736
  */
@@ -789,10 +771,11 @@
789
771
  },
790
772
  },
791
773
  setup(props, { emit }) {
774
+ const localValue = useProxiedComplexModel(props, 'modelValue', emit);
792
775
  const currentType = computed(() => {
793
- if (props.modelValue?.radius) {
776
+ if (localValue.value?.radius) {
794
777
  return ImageType.SHAPE;
795
- } else if (props.modelValue?.src) {
778
+ } else if (localValue.value?.src) {
796
779
  return ImageType.ICON;
797
780
  } else {
798
781
  return undefined;
@@ -814,136 +797,87 @@
814
797
  const canvas = ref();
815
798
 
816
799
  const shapeSingleValueInputs = computed(() => {
800
+ /**
801
+ * @type {[{key: string,isRequired?: boolean, unit?: string, range?: number[]}]}
802
+ */
817
803
  const inputs = [
818
- { name: 'radius', unit: 'px', range: [1, 100], isRequired: true },
804
+ { key: 'radius', unit: 'px', range: [1, 100], isRequired: true },
819
805
  ];
820
806
  if (props.extendedShapeSettings) {
821
- [
822
- { name: 'points', range: [0, 10] },
823
- { name: 'radius2', unit: 'px', range: [0, 100] },
824
- { name: 'angle', step: 0.1, unit: 'rad' },
825
- { name: 'rotation', step: 0.1, unit: 'rad' },
826
- ].forEach((entry) => inputs.push(entry));
807
+ inputs.push(
808
+ { key: 'points', range: [0, 10] },
809
+ { key: 'radius2', unit: 'px', range: [0, 100] },
810
+ { key: 'angle', step: 0.1, unit: 'rad' },
811
+ { key: 'rotation', step: 0.1, unit: 'rad' },
812
+ );
827
813
  }
828
- return inputs.map((input) => {
829
- return {
830
- text: input.name,
831
- value: useSelectedKey(
832
- () => props.modelValue,
833
- input.name,
834
- props.valueDefault[input.name],
835
- emit,
836
- input.range,
837
- input.isRequired,
838
- ),
839
- unit: input.unit,
840
- range: input.range,
841
- step: input.step,
842
- };
843
- });
814
+ return inputs;
844
815
  });
845
816
 
846
817
  const selectedScale = computed({
847
818
  get() {
848
- if (Array.isArray(props.modelValue?.scale)) {
849
- return props.modelValue.scale[0];
819
+ if (Array.isArray(localValue.value?.scale)) {
820
+ return localValue.value.scale[0];
850
821
  } else {
851
- return props.modelValue?.scale;
822
+ return localValue.value?.scale;
852
823
  }
853
824
  },
854
825
  set(value) {
855
- if (!value) {
856
- const newImage = structuredClone(props.modelValue);
857
- delete newImage.scale;
858
- emit('update:modelValue', newImage);
859
- } else if (value > 0) {
860
- const newImage = structuredClone(props.modelValue);
861
- emit(
862
- 'update:modelValue',
863
- Object.assign(newImage, { scale: value }),
864
- );
865
- }
826
+ localValue.value.scale = value;
866
827
  },
867
828
  });
868
829
 
869
- const selectedOpacity = useSelectedKey(
870
- () => props.modelValue,
871
- 'opacity',
872
- props.valueDefault.opacity,
873
- emit,
874
- );
830
+ const selectedIdx = ref(-1);
875
831
 
876
- const selectedFill = useSelectedKey(
877
- () => props.modelValue,
878
- 'fill',
879
- props.valueDefault.fill,
880
- emit,
881
- );
882
- const selectedStroke = useSelectedKey(
883
- () => props.modelValue,
884
- 'stroke',
885
- props.valueDefault.stroke,
886
- emit,
887
- );
832
+ watch(selectedType, () => {
833
+ // unset selection on tab change
834
+ if (currentType.value !== selectedType.value) {
835
+ selectedIdx.value = -1;
836
+ }
837
+ });
888
838
 
889
- const selectedImage = computed({
890
- get() {
891
- if (currentType.value !== selectedType.value) {
892
- return undefined;
893
- } else if (currentType.value === ImageType.SHAPE) {
894
- const equalShape = defaultShapes.find((preset) =>
895
- isEqualShape(props.modelValue, preset.value),
896
- );
897
- if (equalShape) {
898
- return equalShape.src;
899
- } else {
900
- return customIcon;
901
- }
839
+ watch(
840
+ localValue,
841
+ () => {
842
+ // derive selection on modelValue change
843
+ if (currentType.value === ImageType.SHAPE) {
844
+ const idx = defaultShapes
845
+ .map(({ value }) => value)
846
+ .findIndex((i) => isEqualShape(localValue.value, i));
847
+ // select custom (index 7), if no defaultShape found
848
+ selectedIdx.value = idx < 0 ? 7 : idx;
902
849
  } else if (currentType.value === ImageType.ICON) {
903
- return props.modelValue?.src;
904
- } else {
905
- return undefined;
850
+ selectedIdx.value = props.iconOptions.findIndex(
851
+ (i) => i.src === localValue.value.src,
852
+ );
906
853
  }
907
854
  },
908
- set(value) {
909
- let newImage = {};
910
- if (selectedType.value === ImageType.SHAPE) {
911
- const switchFromICON = currentType.value === ImageType.ICON;
912
- let newPreset;
913
- if (value === customIcon && !switchFromICON) {
914
- return;
915
- } else if (value === customIcon) {
916
- newPreset = defaultShapes[0];
917
- } else {
918
- newPreset = defaultShapes.find((preset) => preset.src === value);
919
- }
920
-
921
- if (newPreset) {
922
- let fill;
923
- let stroke;
855
+ { deep: true },
856
+ );
924
857
 
925
- if (switchFromICON) {
926
- fill = props.valueDefault?.fill;
927
- stroke = props.valueDefault?.stroke;
928
- } else {
929
- fill = selectedFill.value;
930
- stroke = selectedStroke.value;
931
- }
932
- newImage = JSON.parse(JSON.stringify(newPreset.value));
933
- Object.assign(newImage, {
934
- fill,
935
- stroke,
936
- });
937
- }
858
+ watch(selectedIdx, (idx) => {
859
+ // update modelValue on selection
860
+ if (idx > -1) {
861
+ if (
862
+ selectedType.value === ImageType.SHAPE &&
863
+ idx < defaultShapes.length
864
+ ) {
865
+ const switchFromICON = currentType.value === ImageType.ICON;
866
+ localValue.value = {
867
+ ...defaultShapes[idx]?.value,
868
+ fill: switchFromICON
869
+ ? props.valueDefault?.fill
870
+ : toRaw(localValue.value?.fill),
871
+ stroke: switchFromICON
872
+ ? props.valueDefault?.stroke
873
+ : toRaw(localValue.value?.stroke),
874
+ };
938
875
  } else if (selectedType.value === ImageType.ICON) {
939
- newImage = props.iconOptions.find((option) => option.src === value);
940
- Object.assign(newImage, {
941
- scale: selectedScale.value || 1,
942
- opacity: selectedOpacity.value || 1,
943
- });
876
+ localValue.value = {
877
+ ...props.iconOptions[idx],
878
+ };
944
879
  }
945
- emit('update:modelValue', JSON.parse(JSON.stringify(newImage)));
946
- },
880
+ }
947
881
  });
948
882
 
949
883
  const currentItems = computed(() => {
@@ -956,15 +890,18 @@
956
890
  } else if (selectedType.value === ImageType.ICON) {
957
891
  items = props.iconOptions;
958
892
  }
959
- return items;
893
+ return items.map(({ src }, idx) => ({
894
+ src,
895
+ idx,
896
+ }));
960
897
  });
961
898
 
962
899
  onMounted(() => {
963
- drawImageStyle(canvas.value, props.modelValue);
900
+ drawImageStyle(canvas.value, localValue.value);
964
901
  watch(
965
- () => props.modelValue,
902
+ localValue,
966
903
  () => {
967
- drawImageStyle(canvas.value, props.modelValue);
904
+ drawImageStyle(canvas.value, localValue.value);
968
905
  },
969
906
  { deep: true },
970
907
  );
@@ -972,15 +909,13 @@
972
909
 
973
910
  return {
974
911
  ImageType,
912
+ localValue,
975
913
  selectedType,
976
914
  currentType,
977
- selectedImage,
915
+ selectedIdx,
978
916
  canvas,
979
917
  shapeSingleValueInputs,
980
918
  selectedScale,
981
- selectedOpacity,
982
- selectedFill,
983
- selectedStroke,
984
919
  between,
985
920
  currentItems,
986
921
  selectedImageTypeTab,
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Draws an image style on a canvas.
3
3
  * @param {HTMLCanvasElement} canvas The canvas to draw on
4
- * @param {import("ol/style/Image").Options} imageOptions The JSON options of the image style.
5
- * @param {boolean} fitToCanvas If the circle, shape or icon should be fitted into the canvas or if it should be draw with it's actual size.
4
+ * @param {import("ol/style/Image").Options} [imageOptions] The JSON options of the image style.
5
+ * @param {boolean} [fitToCanvas=false] If the circle, shape or icon should be fitted into the canvas or if it should be draw with it's actual size.
6
6
  */
7
- export function drawImageStyle(canvas: HTMLCanvasElement, imageOptions: import("ol/style/Image").Options, fitToCanvas?: boolean): Promise<void>;
7
+ export function drawImageStyle(canvas: HTMLCanvasElement, imageOptions?: import("ol/style/Image", { with: { "resolution-mode": "import" } }).Options | undefined, fitToCanvas?: boolean | undefined): Promise<void>;
8
8
  /**
9
9
  * *
10
10
  */
@@ -80,23 +80,23 @@ declare const _default: import("vue").DefineComponent<{
80
80
  SHAPE: string;
81
81
  ICON: string;
82
82
  };
83
+ localValue: import("vue").Ref<any>;
83
84
  selectedType: import("vue").ComputedRef<string>;
84
85
  currentType: import("vue").ComputedRef<string | undefined>;
85
- selectedImage: import("vue").WritableComputedRef<any>;
86
+ selectedIdx: import("vue").Ref<number>;
86
87
  canvas: import("vue").Ref<any>;
87
- shapeSingleValueInputs: import("vue").ComputedRef<{
88
- text: string;
89
- value: import("vue").WritableComputedRef<unknown>;
90
- unit: string;
91
- range: number[];
92
- step: any;
93
- }[]>;
88
+ shapeSingleValueInputs: import("vue").ComputedRef<[{
89
+ key: string;
90
+ isRequired?: boolean | undefined;
91
+ unit?: string | undefined;
92
+ range?: number[] | undefined;
93
+ }]>;
94
94
  selectedScale: import("vue").WritableComputedRef<any>;
95
- selectedOpacity: import("vue").WritableComputedRef<unknown>;
96
- selectedFill: import("vue").WritableComputedRef<unknown>;
97
- selectedStroke: import("vue").WritableComputedRef<unknown>;
98
95
  between: typeof between;
99
- currentItems: import("vue").ComputedRef<any[]>;
96
+ currentItems: import("vue").ComputedRef<{
97
+ src: any;
98
+ idx: number;
99
+ }[]>;
100
100
  selectedImageTypeTab: import("vue").Ref<number>;
101
101
  }, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
102
102
  modelValue: {
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <MenuWrapper
3
- v-bind="{ ...$attrs, value, valueDefault, disabled }"
4
3
  :value-fallback="{ color: [0, 0, 0, 1], width: 1 }"
5
4
  name="components.style.stroke"
5
+ v-bind="{ ...$attrs, ...$props }"
6
6
  >
7
7
  <template #preview>
8
8
  <v-sheet
@@ -15,7 +15,7 @@
15
15
  />
16
16
  </template>
17
17
  <template #content>
18
- <VcsStrokeSelector :model-value="modelValue" v-bind="$attrs" />
18
+ <VcsStrokeSelector v-bind="{ ...$attrs, ...$props }" />
19
19
  </template>
20
20
  </MenuWrapper>
21
21
  </template>
@@ -23,16 +23,16 @@
23
23
  <script>
24
24
  import { computed } from 'vue';
25
25
  import { VSheet } from 'vuetify/components';
26
+ import { useProxiedAtomicModel } from '../modelHelper.js';
26
27
  import VcsStrokeSelector from './VcsStrokeSelector.vue';
27
28
  import MenuWrapper from './MenuWrapper.vue';
28
29
  import { useColorObject, rgbaObjectToString } from './composables.js';
29
30
 
30
31
  /**
31
32
  * @description A wrapper for the VcsStrokeSelector, that has a small color preview and a menu that pops up when clicking the preview, containing the stroke selector.
32
- * When clicking the reset button, the valueDefault is emitted, when unchecking the checkbox in front of the preview, null is emitted. If it is checked again, valueDefault is emitted. If the valueDefault is undefined or null, { color: [0, 0, 0, 1], width: 1 } is emitted.
33
+ * When clicking the reset button, the valueDefault is emitted, when unchecking the checkbox in front of the preview, null is emitted.
34
+ * If it is checked again, valueDefault is emitted. If the valueDefault is undefined or null, { color: [0, 0, 0, 1], width: 1 } is emitted.
33
35
  * @vue-prop {import("ol/style/Stroke").Options} [modelValue] - The Stroke Options
34
- * @vue-prop {import("ol/style/Stroke").Options} [valueDefault] - The default Stroke Options.
35
- * @vue-prop {boolean} [disabled=false] - Disable the input
36
36
  */
37
37
  export default {
38
38
  name: 'VcsStrokeMenu',
@@ -46,17 +46,10 @@
46
46
  type: Object,
47
47
  default: undefined,
48
48
  },
49
- valueDefault: {
50
- type: Object,
51
- default: undefined,
52
- },
53
- disabled: {
54
- type: Boolean,
55
- default: false,
56
- },
57
49
  },
58
- setup(props) {
59
- const rgbaObject = useColorObject(() => props.modelValue?.color);
50
+ setup(props, { emit }) {
51
+ const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
52
+ const rgbaObject = useColorObject(() => localValue.value?.color);
60
53
  return {
61
54
  rgbaString: computed(() => rgbaObjectToString(rgbaObject.value)),
62
55
  };
@@ -3,14 +3,6 @@ declare const _default: import("vue").DefineComponent<{
3
3
  type: ObjectConstructor;
4
4
  default: undefined;
5
5
  };
6
- valueDefault: {
7
- type: ObjectConstructor;
8
- default: undefined;
9
- };
10
- disabled: {
11
- type: BooleanConstructor;
12
- default: boolean;
13
- };
14
6
  }, {
15
7
  rgbaString: import("vue").ComputedRef<string>;
16
8
  }, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -18,17 +10,7 @@ declare const _default: import("vue").DefineComponent<{
18
10
  type: ObjectConstructor;
19
11
  default: undefined;
20
12
  };
21
- valueDefault: {
22
- type: ObjectConstructor;
23
- default: undefined;
24
- };
25
- disabled: {
26
- type: BooleanConstructor;
27
- default: boolean;
28
- };
29
13
  }>>, {
30
- disabled: boolean;
31
14
  modelValue: Record<string, any>;
32
- valueDefault: Record<string, any>;
33
15
  }, {}>;
34
16
  export default _default;
@@ -14,7 +14,7 @@
14
14
  :hide-spin-buttons="true"
15
15
  type="number"
16
16
  unit="px"
17
- :disabled="!value"
17
+ :disabled="!modelValue"
18
18
  />
19
19
  </v-col>
20
20
  </v-row>
@@ -23,7 +23,8 @@
23
23
  :model-value="rgbaObject"
24
24
  @update:model-value="updateColor"
25
25
  mode="rgba"
26
- :disabled="!value"
26
+ :disabled="!modelValue"
27
+ width="100%"
27
28
  />
28
29
  </v-sheet>
29
30
  </template>
@@ -40,10 +41,11 @@
40
41
  import VcsLabel from '../form-inputs-controls/VcsLabel.vue';
41
42
  import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
42
43
  import { useColorObject } from './composables.js';
44
+ import { useProxiedComplexModel } from '../modelHelper.js';
43
45
 
44
46
  /**
45
47
  * @description Allows to model a JSON representation of ol/Stroke vector style with a vuetify VColorPicker.
46
- * @vue-prop {import("ol/style/Stroke").Options} value - The Stroke Options
48
+ * @vue-prop {import("ol/style/Stroke").Options} [modelValue] - The Stroke Options
47
49
  */
48
50
  export default {
49
51
  name: 'VcsFillSelector',
@@ -63,30 +65,21 @@
63
65
  },
64
66
  },
65
67
  setup(props, { emit }) {
68
+ const localValue = useProxiedComplexModel(props, 'modelValue', emit);
66
69
  return {
67
- rgbaObject: useColorObject(() => props.modelValue?.color),
70
+ rgbaObject: useColorObject(() => localValue.value?.color),
68
71
  width: computed({
69
72
  get() {
70
- return props.modelValue?.width;
73
+ return localValue.value?.width;
71
74
  },
72
75
  set(value) {
73
- if (value > 0 && value !== props.modelValue?.width) {
74
- const stroke = {
75
- width: value,
76
- };
77
- if (props.modelValue?.color) {
78
- stroke.color = [...props.modelValue.color];
79
- }
80
- emit('update:modelValue', stroke);
76
+ if (value > 0 && value !== localValue.value?.width) {
77
+ localValue.value.width = value;
81
78
  }
82
79
  },
83
80
  }),
84
81
  updateColor(rgba) {
85
- const stroke = {
86
- color: [rgba.r, rgba.g, rgba.b, rgba.a],
87
- width: props.modelValue?.width,
88
- };
89
- emit('update:modelValue', stroke);
82
+ localValue.value.color = [rgba.r, rgba.g, rgba.b, rgba.a];
90
83
  },
91
84
  };
92
85
  },