@vcmap/ui 5.0.0-rc.23 → 5.0.0-rc.25

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 (479) hide show
  1. package/README.md +36 -18
  2. package/app.config.json +2 -4
  3. package/build/.eslintrc +3 -0
  4. package/build/build.js +302 -174
  5. package/build/buildCesium.js +32 -19
  6. package/build/buildHelpers.js +267 -94
  7. package/build/buildPreview.js +7 -4
  8. package/build/bundle.js +56 -0
  9. package/build/commonViteConfig.js +2 -4
  10. package/build/determineHost.js +17 -4
  11. package/build/generateOLLib.js +13 -16
  12. package/build/getPluginProxies.js +16 -3
  13. package/build/info/conf.json +21 -21
  14. package/build/info/publish.js +15 -4
  15. package/config/aerowest.config.json +16 -44
  16. package/config/base.config.json +100 -248
  17. package/config/codes.config.json +3 -1
  18. package/config/dev.config.json +34 -14
  19. package/config/graphFeatureInfo.config.json +55 -16
  20. package/config/projects.config.json +5 -2
  21. package/config/www.config.json +174 -333
  22. package/dist/assets/@mdi/font/LICENSE +20 -0
  23. package/dist/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
  24. package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +3 -0
  25. package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  26. package/dist/assets/cesium/Workers/{ArcType-ce2e50ab.js → ArcType-2d9abbbc.js} +4 -4
  27. package/dist/assets/cesium/Workers/{AttributeCompression-b646d393.js → AttributeCompression-f9f6c717.js} +24 -24
  28. package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-ff186ccc.js → AxisAlignedBoundingBox-4140c51f.js} +3 -3
  29. package/dist/assets/cesium/Workers/{BoundingRectangle-be5924f4.js → BoundingRectangle-c714b156.js} +18 -18
  30. package/dist/assets/cesium/Workers/{BoxGeometry-12eeccaf.js → BoxGeometry-6f3da43d.js} +9 -9
  31. package/dist/assets/cesium/Workers/{Check-666ab1a0.js → Check-6ede7e26.js} +22 -22
  32. package/dist/assets/cesium/Workers/{Color-a84038cb.js → Color-8a565ff2.js} +63 -63
  33. package/dist/assets/cesium/Workers/{ComponentDatatype-f7b11d02.js → ComponentDatatype-cf1fa08e.js} +16 -16
  34. package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-3272c1b3.js → CoplanarPolygonGeometryLibrary-4b4d4096.js} +1 -1
  35. package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-0170e093.js → CorridorGeometryLibrary-7b94502b.js} +1 -1
  36. package/dist/assets/cesium/Workers/{CylinderGeometry-7c5da648.js → CylinderGeometry-ca070b87.js} +12 -12
  37. package/dist/assets/cesium/Workers/{CylinderGeometryLibrary-372c07d8.js → CylinderGeometryLibrary-7bf291b4.js} +1 -1
  38. package/dist/assets/cesium/Workers/{EllipseGeometry-797d580e.js → EllipseGeometry-122e51fa.js} +20 -20
  39. package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-2939e1dc.js → EllipseGeometryLibrary-4d326efc.js} +1 -1
  40. package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-8b50870f.js → EllipseOutlineGeometry-16cc2bd7.js} +15 -15
  41. package/dist/assets/cesium/Workers/{EllipsoidGeodesic-98c62a56.js → EllipsoidGeodesic-5b3623dc.js} +6 -6
  42. package/dist/assets/cesium/Workers/{EllipsoidGeometry-21c0e3a5.js → EllipsoidGeometry-cb148ca2.js} +14 -14
  43. package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-eff247c8.js → EllipsoidOutlineGeometry-0fa10c79.js} +15 -15
  44. package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-19756602.js → EllipsoidRhumbLine-ef872433.js} +9 -9
  45. package/dist/assets/cesium/Workers/{EllipsoidTangentPlane-214683dc.js → EllipsoidTangentPlane-6dd1b7af.js} +1 -1
  46. package/dist/assets/cesium/Workers/{EncodedCartesian3-81f70735.js → EncodedCartesian3-57415c8a.js} +6 -6
  47. package/dist/assets/cesium/Workers/{FrustumGeometry-ac42a6d9.js → FrustumGeometry-ee73037c.js} +139 -111
  48. package/dist/assets/cesium/Workers/{GeometryAttribute-7d6f1732.js → GeometryAttribute-ff5b4fb1.js} +20 -20
  49. package/dist/assets/cesium/Workers/{GeometryAttributes-f06a2792.js → GeometryAttributes-ad136444.js} +1 -1
  50. package/dist/assets/cesium/Workers/{GeometryInstance-451dc1cd.js → GeometryInstance-34d9e21e.js} +6 -6
  51. package/dist/assets/cesium/Workers/{GeometryPipeline-ce4339ed.js → GeometryPipeline-1f8fbf05.js} +22 -22
  52. package/dist/assets/cesium/Workers/{IndexDatatype-a55ceaa1.js → IndexDatatype-2643aa47.js} +13 -13
  53. package/dist/assets/cesium/Workers/{IntersectionTests-f6e6bd8a.js → IntersectionTests-70d39ba9.js} +37 -37
  54. package/dist/assets/cesium/Workers/{Math-2dbd6b93.js → Math-0a2ac845.js} +149 -139
  55. package/dist/assets/cesium/Workers/{Matrix2-13178034.js → Matrix2-e1298525.js} +256 -256
  56. package/dist/assets/cesium/Workers/{Matrix3-315394f6.js → Matrix3-41c58dde.js} +150 -150
  57. package/dist/assets/cesium/Workers/{OrientedBoundingBox-04920dc7.js → OrientedBoundingBox-159cf1d6.js} +19 -17
  58. package/dist/assets/cesium/Workers/{Plane-900aa728.js → Plane-4c3d403b.js} +5 -5
  59. package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-a8680d96.js → PolygonGeometryLibrary-076a5d25.js} +6 -6
  60. package/dist/assets/cesium/Workers/PolygonPipeline-b9f2810a.js +1344 -0
  61. package/dist/assets/cesium/Workers/{PolylinePipeline-32f36d2a.js → PolylinePipeline-639192e0.js} +16 -16
  62. package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-a510d657.js → PolylineVolumeGeometryLibrary-b73549fb.js} +7 -7
  63. package/dist/assets/cesium/Workers/{PrimitivePipeline-ba38434a.js → PrimitivePipeline-10ede1b6.js} +6 -6
  64. package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-bdba697e.js → RectangleGeometryLibrary-c35a7356.js} +1 -1
  65. package/dist/assets/cesium/Workers/{RuntimeError-06c93819.js → RuntimeError-ef395448.js} +5 -5
  66. package/dist/assets/cesium/Workers/{TerrainEncoding-833187da.js → TerrainEncoding-668d242f.js} +30 -30
  67. package/dist/assets/cesium/Workers/Transforms-a2a85221.js +14712 -0
  68. package/dist/assets/cesium/Workers/{VertexFormat-6b480673.js → VertexFormat-030f11ff.js} +14 -14
  69. package/dist/assets/cesium/Workers/{WallGeometryLibrary-919eed92.js → WallGeometryLibrary-1938bf0d.js} +1 -1
  70. package/dist/assets/cesium/Workers/{WebGLConstants-a8cc3e8c.js → WebGLConstants-0b1ce7ba.js} +1 -1
  71. package/dist/assets/cesium/Workers/{WebMercatorProjection-13a90d41.js → WebMercatorProjection-13ed1a6e.js} +6 -6
  72. package/dist/assets/cesium/Workers/{arrayRemoveDuplicates-c2038105.js → arrayRemoveDuplicates-d2061e85.js} +5 -5
  73. package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +5 -5
  74. package/dist/assets/cesium/Workers/{combine-ca22a614.js → combine-d9581036.js} +5 -5
  75. package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
  76. package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
  77. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +9 -9
  78. package/dist/assets/cesium/Workers/createCircleGeometry.js +13 -13
  79. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +13 -13
  80. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +11 -11
  81. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +9 -9
  82. package/dist/assets/cesium/Workers/createCorridorGeometry.js +14 -14
  83. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +12 -12
  84. package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
  85. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +13 -13
  86. package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
  87. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
  88. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
  89. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
  90. package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
  91. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +8 -8
  92. package/dist/assets/cesium/Workers/createGeometry.js +1 -1
  93. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +33 -33
  94. package/dist/assets/cesium/Workers/createPlaneGeometry.js +8 -8
  95. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +6 -6
  96. package/dist/assets/cesium/Workers/createPolygonGeometry.js +25 -25
  97. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +17 -17
  98. package/dist/assets/cesium/Workers/createPolylineGeometry.js +11 -11
  99. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +9 -9
  100. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +9 -9
  101. package/dist/assets/cesium/Workers/createRectangleGeometry.js +16 -16
  102. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +12 -12
  103. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +10 -10
  104. package/dist/assets/cesium/Workers/createSphereGeometry.js +11 -11
  105. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +12 -12
  106. package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +2 -2
  107. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +1 -1
  108. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +8 -8
  109. package/dist/assets/cesium/Workers/createVectorTilePoints.js +1 -1
  110. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
  111. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +1 -1
  112. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  113. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +27 -28
  114. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +33 -38
  115. package/dist/assets/cesium/Workers/createWallGeometry.js +14 -14
  116. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +14 -14
  117. package/dist/assets/cesium/Workers/decodeDraco.js +10 -2
  118. package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +15 -15
  119. package/dist/assets/cesium/Workers/decodeI3S.js +1 -1
  120. package/dist/assets/cesium/Workers/{defaultValue-0a909f67.js → defaultValue-fe22d8c0.js} +2 -2
  121. package/dist/assets/cesium/Workers/package.js +1 -1
  122. package/dist/assets/cesium/Workers/transcodeKTX2.js +46 -26
  123. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
  124. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +24 -24
  125. package/dist/assets/{cesium.166f91.js → cesium.1457fa.js} +155448 -127152
  126. package/dist/assets/cesium.js +1 -1
  127. package/dist/assets/core.47836f.js +19060 -0
  128. package/dist/assets/core.js +1 -1
  129. package/dist/assets/index-bb372634.js +1 -0
  130. package/dist/assets/{ol.d2cba3.js → ol.9e4d23.js} +28380 -13095
  131. package/dist/assets/ol.js +1 -1
  132. package/dist/assets/ui.6ed89d.css +5 -0
  133. package/dist/assets/ui.6ed89d.js +13461 -0
  134. package/dist/assets/ui.js +1 -1
  135. package/dist/assets/{vue.5d00e9.js → vue.7327e4.js} +834 -598
  136. package/dist/assets/vue.js +2 -2
  137. package/dist/assets/{vuetify.2f1432.css → vuetify.d2131d.css} +2 -2
  138. package/dist/assets/{vuetify.2f1432.js → vuetify.d2131d.js} +343 -103
  139. package/dist/assets/vuetify.js +2 -2
  140. package/dist/index.html +28 -7
  141. package/index.html +35 -7
  142. package/index.js +82 -17
  143. package/lib/cesium.js +1 -1
  144. package/lib/core.js +1 -1
  145. package/lib/olLib.js +19 -16
  146. package/lib/ui.js +1 -1
  147. package/lib/vue.js +2 -2
  148. package/lib/vuetify.js +2 -2
  149. package/package.json +29 -19
  150. package/plugins/.eslintrc +9 -0
  151. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +13 -11
  152. package/plugins/@vcmap/create-link/index.js +15 -6
  153. package/plugins/@vcmap/project-selector/ModulesListComponent.vue +4 -8
  154. package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +5 -10
  155. package/plugins/@vcmap/project-selector/README.md +4 -2
  156. package/plugins/@vcmap/project-selector/config.json +13 -13
  157. package/plugins/@vcmap/project-selector/de.json +2 -2
  158. package/plugins/@vcmap/project-selector/en.json +2 -2
  159. package/plugins/@vcmap/project-selector/index.js +63 -28
  160. package/plugins/@vcmap/search-nominatim/LICENSE.md +5 -6
  161. package/plugins/@vcmap/search-nominatim/README.md +2 -1
  162. package/plugins/@vcmap/search-nominatim/config.json +1 -2
  163. package/plugins/@vcmap/search-nominatim/index.js +7 -4
  164. package/plugins/@vcmap/search-nominatim/nominatim.js +7 -2
  165. package/plugins/@vcmap/search-nominatim/package.json +2 -36
  166. package/plugins/@vcmap/simple-graph/README.md +29 -9
  167. package/plugins/@vcmap/simple-graph/SimpleGraphComponent.vue +2 -7
  168. package/plugins/@vcmap/simple-graph/index.js +2 -2
  169. package/plugins/@vcmap/simple-graph/simpleGraphView.js +3 -1
  170. package/plugins/@vcmap/theme-changer/README.md +5 -3
  171. package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +6 -10
  172. package/plugins/@vcmap/theme-changer/config.json +67 -67
  173. package/plugins/@vcmap/theme-changer/index.js +11 -5
  174. package/plugins/@vcmap-show-case/README.md +2 -1
  175. package/plugins/@vcmap-show-case/buttons-example/ButtonsExample.vue +87 -46
  176. package/plugins/@vcmap-show-case/buttons-example/index.js +10 -8
  177. package/plugins/@vcmap-show-case/category-tester/CategoriesExample.vue +135 -0
  178. package/plugins/@vcmap-show-case/category-tester/CollectionComponentOptions.vue +209 -0
  179. package/plugins/@vcmap-show-case/category-tester/index.js +28 -4
  180. package/plugins/@vcmap-show-case/collection-manager-example/CollectionManagerExample.vue +182 -0
  181. package/plugins/@vcmap-show-case/collection-manager-example/README.md +3 -0
  182. package/plugins/@vcmap-show-case/collection-manager-example/index.js +74 -0
  183. package/plugins/@vcmap-show-case/collection-manager-example/package.json +5 -0
  184. package/plugins/@vcmap-show-case/config-editor/{editor.vue → ConfigEditor.vue} +20 -24
  185. package/plugins/@vcmap-show-case/config-editor/index.js +13 -11
  186. package/plugins/@vcmap-show-case/context-menu-tester/index.js +18 -10
  187. package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +109 -121
  188. package/plugins/@vcmap-show-case/form-inputs-example/config.json +3 -3
  189. package/plugins/@vcmap-show-case/form-inputs-example/exampleActions.js +14 -4
  190. package/plugins/@vcmap-show-case/form-inputs-example/index.js +41 -19
  191. package/plugins/@vcmap-show-case/form-inputs-example/validation.js +2 -1
  192. package/plugins/@vcmap-show-case/icons-example/README.md +1 -1
  193. package/plugins/@vcmap-show-case/icons-example/allIconsComponent.vue +10 -10
  194. package/plugins/@vcmap-show-case/icons-example/index.js +10 -8
  195. package/plugins/@vcmap-show-case/list-example/ListExample.vue +221 -103
  196. package/plugins/@vcmap-show-case/list-example/index.js +10 -8
  197. package/plugins/@vcmap-show-case/notifier-tester/index.js +9 -3
  198. package/plugins/@vcmap-show-case/notifier-tester/notifierTester.vue +15 -21
  199. package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +21 -0
  200. package/plugins/@vcmap-show-case/switch-map-callback-example/SwitchMapCallback.js +47 -0
  201. package/plugins/@vcmap-show-case/switch-map-callback-example/config.json +3 -0
  202. package/plugins/@vcmap-show-case/switch-map-callback-example/index.js +34 -0
  203. package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +5 -0
  204. package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +22 -42
  205. package/plugins/@vcmap-show-case/table-example/index.js +10 -8
  206. package/plugins/@vcmap-show-case/textfields-example/TextfieldsExample.vue +7 -30
  207. package/plugins/@vcmap-show-case/textfields-example/index.js +10 -4
  208. package/plugins/@vcmap-show-case/window-tester/WindowExample.vue +16 -13
  209. package/plugins/@vcmap-show-case/window-tester/emptyComponent.vue +4 -7
  210. package/plugins/@vcmap-show-case/window-tester/index.js +26 -20
  211. package/plugins/@vcmap-show-case/window-tester/myCustomHeader.vue +7 -3
  212. package/plugins/@vcmap-show-case/window-tester/toolbox-data.js +82 -5
  213. package/plugins/@vcmap-show-case/window-tester/windowExampleContent.vue +3 -7
  214. package/plugins/@vcmap-show-case/wizard-example/index.js +9 -3
  215. package/plugins/@vcmap-show-case/wizard-example/wizardExample.vue +36 -38
  216. package/plugins/package.json +3 -1
  217. package/public/assets/@mdi/font/LICENSE +20 -0
  218. package/public/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
  219. package/public/assets/@mdi/font/css/materialdesignicons.min.css +3 -0
  220. package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  221. package/public/assets/favicon-128.png +0 -0
  222. package/public/assets/favicon-180.png +0 -0
  223. package/public/assets/favicon-192.png +0 -0
  224. package/public/assets/favicon-32.png +0 -0
  225. package/public/assets/logo-mobile.svg +9 -0
  226. package/public/assets/logo.svg +26 -0
  227. package/src/actions/actionHelper.js +49 -11
  228. package/src/actions/styleSelector.vue +20 -11
  229. package/src/application/VcsApp.vue +151 -85
  230. package/src/application/VcsAttributions.vue +25 -11
  231. package/src/application/VcsAttributionsFooter.vue +12 -10
  232. package/src/application/VcsMap.vue +9 -5
  233. package/src/application/VcsNavbar.vue +58 -36
  234. package/src/application/VcsSettings.vue +5 -12
  235. package/src/application/attributionsHelper.js +23 -11
  236. package/src/application/vcsAppWrapper.vue +1 -3
  237. package/src/callback/activateLayersCallback.js +54 -0
  238. package/src/callback/applyLayerStyleCallback.js +63 -0
  239. package/src/callback/deactivateLayersCallback.js +54 -0
  240. package/src/callback/goToViewpointCallback.js +54 -0
  241. package/src/callback/vcsCallback.js +66 -0
  242. package/src/components/buttons/VcsActionButtonList.vue +43 -22
  243. package/src/components/buttons/VcsButton.vue +50 -116
  244. package/src/components/buttons/VcsFormButton.vue +178 -0
  245. package/src/components/buttons/VcsToolButton.vue +161 -0
  246. package/src/components/form-inputs-controls/VcsCheckbox.vue +6 -7
  247. package/src/components/form-inputs-controls/VcsDatePicker.vue +66 -21
  248. package/src/components/form-inputs-controls/VcsFormSection.vue +11 -13
  249. package/src/components/form-inputs-controls/VcsLabel.vue +9 -10
  250. package/src/components/form-inputs-controls/VcsRadio.vue +44 -44
  251. package/src/components/form-inputs-controls/VcsSelect.vue +32 -15
  252. package/src/components/form-inputs-controls/VcsSlider.vue +72 -0
  253. package/src/components/form-inputs-controls/VcsTextArea.vue +21 -14
  254. package/src/components/form-inputs-controls/VcsTextField.vue +43 -18
  255. package/src/components/form-inputs-controls/VcsWizard.vue +79 -80
  256. package/src/components/form-inputs-controls/VcsWizardStep.vue +20 -21
  257. package/src/components/form-inputs-controls/composables.js +13 -8
  258. package/src/components/form-output/VcsFormattedNumber.vue +26 -26
  259. package/src/components/icons/+all.js +13 -5
  260. package/src/components/icons/2DAreaIcon.vue +62 -10
  261. package/src/components/icons/2DDistanceIcon.vue +14 -2
  262. package/src/components/icons/3DAreaIcon.vue +62 -10
  263. package/src/components/icons/3DDistanceIcon.vue +14 -2
  264. package/src/components/icons/3DHeightIcon.vue +14 -2
  265. package/src/components/icons/AngleIcon.vue +12 -3
  266. package/src/components/icons/AssociationsIcon.vue +6 -1
  267. package/src/components/icons/AxisIcon.vue +34 -5
  268. package/src/components/icons/BoundingBoxIcon.vue +31 -5
  269. package/src/components/icons/CheckboxCheckedIcon.vue +4 -1
  270. package/src/components/icons/CheckboxIcon.vue +1 -8
  271. package/src/components/icons/CheckboxIndeterminateIcon.vue +9 -2
  272. package/src/components/icons/CircleIcon.vue +24 -4
  273. package/src/components/icons/ClippingHorizontalIcon.vue +14 -2
  274. package/src/components/icons/ClippingIcon.vue +13 -2
  275. package/src/components/icons/ClippingVerticalIcon.vue +14 -2
  276. package/src/components/icons/ColorPickerIcon.vue +13 -2
  277. package/src/components/icons/ColorSwatchIcon.vue +7 -1
  278. package/src/components/icons/CommentIcon.vue +6 -1
  279. package/src/components/icons/CompassIcon.vue +21 -3
  280. package/src/components/icons/ComponentsIcon.vue +14 -2
  281. package/src/components/icons/ConeIcon.vue +26 -4
  282. package/src/components/icons/DimensionsHouseIcon.vue +7 -1
  283. package/src/components/icons/EditIcon.vue +13 -2
  284. package/src/components/icons/ElevationProfileIcon.vue +6 -1
  285. package/src/components/icons/ExportAreaIcon.vue +13 -2
  286. package/src/components/icons/ExportFlightIcon.vue +13 -2
  287. package/src/components/icons/ExportIcon.vue +14 -2
  288. package/src/components/icons/ExternalLinkIcon.vue +18 -3
  289. package/src/components/icons/EyeIcon.vue +12 -2
  290. package/src/components/icons/FastForwardIcon.vue +13 -2
  291. package/src/components/icons/FilterIcon.vue +13 -2
  292. package/src/components/icons/GlobalTerrainIcon.vue +12 -2
  293. package/src/components/icons/GlobeNatureIcon.vue +7 -1
  294. package/src/components/icons/GroundIcon.vue +12 -2
  295. package/src/components/icons/HealthCareIndustriesIcon.vue +6 -1
  296. package/src/components/icons/HelpIcon.vue +12 -2
  297. package/src/components/icons/HideIcon.vue +17 -3
  298. package/src/components/icons/HomePointIcon.vue +13 -3
  299. package/src/components/icons/HospitalsIcon.vue +6 -1
  300. package/src/components/icons/HouseIcon.vue +20 -3
  301. package/src/components/icons/ImportIcon.vue +21 -3
  302. package/src/components/icons/InfoIcon.vue +19 -3
  303. package/src/components/icons/KebabIcon.vue +12 -2
  304. package/src/components/icons/LabelIcon.vue +21 -3
  305. package/src/components/icons/LayersIcon.vue +12 -2
  306. package/src/components/icons/LegendIcon.vue +13 -3
  307. package/src/components/icons/LineIcon.vue +20 -3
  308. package/src/components/icons/LinkIcon.vue +13 -2
  309. package/src/components/icons/LogoutIcon.vue +13 -2
  310. package/src/components/icons/MapIcon.vue +14 -2
  311. package/src/components/icons/MenuIcon.vue +7 -1
  312. package/src/components/icons/MinusIcon.vue +14 -2
  313. package/src/components/icons/ObjectAttributeIcon.vue +13 -2
  314. package/src/components/icons/ObjectSelectIcon.vue +14 -2
  315. package/src/components/icons/ObliqueViewIcon.vue +11 -2
  316. package/src/components/icons/PdfIcon.vue +12 -2
  317. package/src/components/icons/PedestrianIcon.vue +13 -2
  318. package/src/components/icons/PenIcon.vue +13 -3
  319. package/src/components/icons/PlayCircleIcon.vue +20 -3
  320. package/src/components/icons/PlusIcon.vue +14 -3
  321. package/src/components/icons/PoiIcon.vue +17 -3
  322. package/src/components/icons/PointSelectIcon.vue +12 -2
  323. package/src/components/icons/PolygonIcon.vue +7 -1
  324. package/src/components/icons/PresentationModeIcon.vue +13 -2
  325. package/src/components/icons/ProgressIcon.vue +8 -6
  326. package/src/components/icons/QueryIcon.vue +31 -5
  327. package/src/components/icons/RectangleIcon.vue +24 -4
  328. package/src/components/icons/ReturnIcon.vue +13 -2
  329. package/src/components/icons/RewindIcon.vue +13 -2
  330. package/src/components/icons/RotateLeftIcon.vue +13 -2
  331. package/src/components/icons/RotateRightIcon.vue +13 -2
  332. package/src/components/icons/ScreenshotIcon.vue +52 -10
  333. package/src/components/icons/SearchIcon.vue +13 -3
  334. package/src/components/icons/ShadowIcon.vue +14 -3
  335. package/src/components/icons/ShapesIcon.vue +13 -3
  336. package/src/components/icons/ShareIcon.vue +17 -4
  337. package/src/components/icons/SimpleCircleFilledIcon.vue +14 -10
  338. package/src/components/icons/SimpleCircleHalfFilledIcon.vue +6 -1
  339. package/src/components/icons/SimpleCircleOutlinedIcon.vue +14 -10
  340. package/src/components/icons/SkipNextIcon.vue +11 -2
  341. package/src/components/icons/SkipPreviousIcon.vue +17 -3
  342. package/src/components/icons/SplitViewIcon.vue +6 -1
  343. package/src/components/icons/TerrainBoxIcon.vue +12 -2
  344. package/src/components/icons/TextStyleIcon.vue +7 -1
  345. package/src/components/icons/ThreeDimensionsIcon.vue +13 -2
  346. package/src/components/icons/ToolsIcon.vue +12 -2
  347. package/src/components/icons/TouchIcon.vue +13 -2
  348. package/src/components/icons/TrashCanIcon.vue +13 -2
  349. package/src/components/icons/TriangleIcon.vue +6 -2
  350. package/src/components/icons/TwoDimensionsIcon.vue +14 -2
  351. package/src/components/icons/UploadIcon.vue +13 -2
  352. package/src/components/icons/UserProfileIcon.vue +13 -2
  353. package/src/components/icons/UserShareIcon.vue +12 -2
  354. package/src/components/icons/VideoRecorderIcon.vue +16 -3
  355. package/src/components/icons/ViewpointFlightIcon.vue +22 -4
  356. package/src/components/icons/ViewpointIcon.vue +22 -4
  357. package/src/components/icons/Viewshed360Icon.vue +14 -2
  358. package/src/components/icons/ViewshedConeIcon.vue +13 -2
  359. package/src/components/icons/ViewshedIcon.vue +14 -2
  360. package/src/components/icons/WalkingIcon.vue +13 -2
  361. package/src/components/icons/WallIcon.vue +19 -3
  362. package/src/components/icons/WandIcon.vue +129 -21
  363. package/src/components/imageElementInjector.vue +1 -3
  364. package/src/components/lists/VcsActionList.vue +21 -18
  365. package/src/components/lists/VcsList.vue +211 -100
  366. package/src/components/lists/VcsTreeview.vue +30 -26
  367. package/src/components/lists/VcsTreeviewLeaf.vue +23 -23
  368. package/src/components/lists/VcsTreeviewSearchbar.vue +19 -15
  369. package/src/components/notification/VcsBadge.vue +4 -6
  370. package/src/components/notification/VcsTooltip.vue +95 -94
  371. package/src/components/notification/validation.js +1 -1
  372. package/src/components/tables/VcsDataTable.vue +107 -97
  373. package/src/components/tables/VcsTable.vue +38 -30
  374. package/src/contentTree/LayerTree.vue +17 -12
  375. package/src/contentTree/contentTreeCollection.js +49 -23
  376. package/src/contentTree/contentTreeItem.js +58 -17
  377. package/src/contentTree/groupContentTreeItem.js +45 -22
  378. package/src/contentTree/layerContentTreeItem.js +40 -28
  379. package/src/contentTree/layerGroupContentTreeItem.js +51 -39
  380. package/src/contentTree/nodeContentTreeItem.js +18 -7
  381. package/src/contentTree/obliqueCollectionContentTreeItem.js +49 -20
  382. package/src/contentTree/subContentTreeItem.js +13 -4
  383. package/src/contentTree/vcsObjectContentTreeItem.js +24 -15
  384. package/src/contentTree/viewpointContentTreeItem.js +20 -6
  385. package/src/downloadHelper.js +4 -1
  386. package/src/featureInfo/AddressBalloonComponent.vue +11 -16
  387. package/src/featureInfo/BalloonComponent.vue +35 -27
  388. package/src/featureInfo/abstractFeatureInfoView.js +45 -14
  389. package/src/featureInfo/addressBalloonFeatureInfoView.js +19 -7
  390. package/src/featureInfo/balloonFeatureInfoView.js +22 -9
  391. package/src/featureInfo/balloonHelper.js +61 -42
  392. package/src/featureInfo/featureInfo.js +102 -73
  393. package/src/featureInfo/featureInfoInteraction.js +13 -7
  394. package/src/featureInfo/iframeFeatureInfoView.js +3 -1
  395. package/src/featureInfo/tableFeatureInfoView.js +15 -5
  396. package/src/i18n/de.js +5 -2
  397. package/src/i18n/en.js +5 -2
  398. package/src/i18n/i18nCollection.js +182 -155
  399. package/src/init.js +121 -121
  400. package/src/legend/legendHelper.js +11 -6
  401. package/src/legend/styleLegendItem.vue +18 -12
  402. package/src/legend/vcsLegend.vue +16 -18
  403. package/src/manager/buttonManager.js +21 -3
  404. package/src/manager/collectionManager/CollectionComponent.vue +142 -0
  405. package/src/manager/collectionManager/CollectionComponentList.vue +62 -0
  406. package/src/manager/collectionManager/CollectionComponentProvider.vue +38 -0
  407. package/src/manager/collectionManager/CollectionManager.vue +43 -0
  408. package/src/manager/collectionManager/categoryManager.js +83 -0
  409. package/src/manager/collectionManager/collectionComponent.js +453 -0
  410. package/src/manager/collectionManager/collectionManager.js +432 -0
  411. package/src/manager/contextMenu/contextMenuComponent.vue +2 -6
  412. package/src/manager/contextMenu/contextMenuInteraction.js +6 -1
  413. package/src/manager/contextMenu/contextMenuManager.js +37 -22
  414. package/src/manager/navbarManager.js +19 -11
  415. package/src/manager/toolbox/GroupToolboxComponent.vue +27 -28
  416. package/src/manager/toolbox/SelectToolboxComponent.vue +42 -44
  417. package/src/manager/toolbox/ToolboxManager.vue +22 -15
  418. package/src/manager/toolbox/toolboxManager.js +30 -12
  419. package/src/manager/window/WindowComponent.vue +18 -21
  420. package/src/manager/window/WindowComponentHeader.vue +34 -30
  421. package/src/manager/window/WindowManager.vue +33 -22
  422. package/src/manager/window/windowHelper.js +79 -23
  423. package/src/manager/window/windowManager.js +61 -32
  424. package/src/navigation/mapNavCompass.vue +17 -3
  425. package/src/navigation/mapNavigation.vue +93 -48
  426. package/src/navigation/obliqueRotation.vue +6 -8
  427. package/src/navigation/orientationToolsButton.vue +6 -9
  428. package/src/navigation/overviewMap.js +79 -42
  429. package/src/navigation/overviewMapClickedInteraction.js +6 -1
  430. package/src/navigation/tiltSlider.vue +6 -10
  431. package/src/navigation/vcsCompass.vue +1 -9
  432. package/src/navigation/vcsZoomButton.vue +16 -17
  433. package/src/notifier/notifier.js +22 -13
  434. package/src/notifier/notifierComponent.vue +21 -22
  435. package/src/pluginHelper.js +28 -9
  436. package/src/search/resultItem.vue +10 -16
  437. package/src/search/resultsComponent.vue +30 -24
  438. package/src/search/search.js +36 -19
  439. package/src/search/searchComponent.vue +27 -19
  440. package/src/setup.js +9 -9
  441. package/src/state.js +22 -6
  442. package/src/styles/_theming.scss +2 -2
  443. package/src/styles/_typography.scss +2 -3
  444. package/src/styles/main.scss +8 -0
  445. package/src/styles/shades.scss +4 -2
  446. package/src/styles/utils/_border.scss +1 -1
  447. package/src/styles/utils/_display.scss +1 -1
  448. package/src/styles/variables.scss +39 -34
  449. package/src/styles/vcsFont.scss +2 -22
  450. package/src/styles/vcsGrid.scss +9 -0
  451. package/src/uiConfig.js +3 -1
  452. package/src/vcsUiApp.js +227 -66
  453. package/src/vuePlugins/i18n.js +22 -23
  454. package/src/vuePlugins/vuetify.js +4 -1
  455. package/dist/assets/cesium/Workers/PolygonPipeline-844aab0a.js +0 -1345
  456. package/dist/assets/cesium/Workers/Transforms-40229881.js +0 -14696
  457. package/dist/assets/core.9342a1.js +0 -18431
  458. package/dist/assets/index.fd041928.js +0 -1
  459. package/dist/assets/ui.c27597.css +0 -5
  460. package/dist/assets/ui.c27597.js +0 -17799
  461. package/plugins/@vcmap-show-case/category-tester/Categories.vue +0 -264
  462. package/plugins/@vcmap-show-case/category-tester/Category.vue +0 -144
  463. package/src/manager/categoryManager/CategoryComponent.vue +0 -124
  464. package/src/manager/categoryManager/CategoryComponentList.vue +0 -57
  465. package/src/manager/categoryManager/CategoryManager.vue +0 -48
  466. package/src/manager/categoryManager/categoryManager.js +0 -588
  467. package/start.js +0 -9
  468. /package/dist/assets/cesium/Workers/{GeometryOffsetAttribute-04332ce7.js → GeometryOffsetAttribute-9ad0019c.js} +0 -0
  469. /package/{src/assets/favicon-128.png → dist/assets/favicon-128.4c4ce5.png} +0 -0
  470. /package/{src/assets/favicon-180.png → dist/assets/favicon-180.5b99c0.png} +0 -0
  471. /package/{src/assets/favicon-192.png → dist/assets/favicon-192.0e205e.png} +0 -0
  472. /package/{src/assets/favicon-32.png → dist/assets/favicon-32.6b9add.png} +0 -0
  473. /package/dist/assets/{favicon.decf54cc.svg → favicon.d5ec97.svg} +0 -0
  474. /package/dist/assets/font/{TitilliumWeb-Regular.woff2 → TitilliumWeb-Regular.9ca076.woff2} +0 -0
  475. /package/{src/assets/logo-mobile.svg → dist/assets/logo-mobile.2d10a6.svg} +0 -0
  476. /package/{src/assets/logo.svg → dist/assets/logo.27089a.svg} +0 -0
  477. /package/{src → public}/assets/favicon.svg +0 -0
  478. /package/{src → public}/assets/font/OFL.txt +0 -0
  479. /package/{src → public}/assets/font/TitilliumWeb-Regular.woff2 +0 -0
@@ -3,6 +3,7 @@
3
3
  import { build } from 'vite'; // vite is also a plugin-cli dep
4
4
  import fs from 'fs';
5
5
  import path from 'path';
6
+ import { createHash } from 'crypto';
6
7
  import { fileURLToPath } from 'url';
7
8
 
8
9
  /**
@@ -10,7 +11,33 @@ import { fileURLToPath } from 'url';
10
11
  * @returns {string}
11
12
  */
12
13
  export function getProjectPath(...pathSegments) {
13
- return path.join(path.dirname(fileURLToPath(import.meta.url)), '..', ...pathSegments);
14
+ return path.join(
15
+ path.dirname(fileURLToPath(import.meta.url)),
16
+ '..',
17
+ ...pathSegments,
18
+ );
19
+ }
20
+
21
+ export async function getFileMd5(filePath) {
22
+ const hash = createHash('md5');
23
+ const stream = fs.createReadStream(filePath);
24
+ // eslint-disable-next-line no-restricted-syntax
25
+ for await (const chunk of stream) {
26
+ hash.update(chunk);
27
+ }
28
+ return hash.digest('hex');
29
+ }
30
+
31
+ export async function* getFilesInDirectory(filePath) {
32
+ const entries = await fs.promises.readdir(filePath, { withFileTypes: true });
33
+ // eslint-disable-next-line no-restricted-syntax
34
+ for (const file of entries) {
35
+ if (file.isDirectory()) {
36
+ yield* getFilesInDirectory(path.join(filePath, file.name));
37
+ } else if (file.isFile()) {
38
+ yield path.join(filePath, file.name);
39
+ }
40
+ }
14
41
  }
15
42
 
16
43
  /**
@@ -27,19 +54,23 @@ export function getPluginDirectory() {
27
54
  */
28
55
  export async function getPluginNames() {
29
56
  const pluginsDir = getPluginDirectory();
30
- const packageJsonContent = await fs.promises.readFile(path.join(pluginsDir, 'package.json'));
31
- const {
32
- dependencies: plugins,
33
- optionalDependencies: internalPlugins,
34
- } = JSON.parse(packageJsonContent.toString());
57
+ const packageJsonContent = await fs.promises.readFile(
58
+ path.join(pluginsDir, 'package.json'),
59
+ );
60
+ const { dependencies: plugins, optionalDependencies: internalPlugins } =
61
+ JSON.parse(packageJsonContent.toString());
35
62
  const pluginNames = plugins ? Object.keys(plugins) : [];
36
- if (internalPlugins) { // internal plugins are mapped as optional dependencies only add them, if they exist
37
- Object.keys(internalPlugins)
38
- .forEach((internalPlugin) => {
39
- if (fs.existsSync(path.join(pluginsDir, 'node_modules', ...internalPlugin.split('/')))) {
40
- pluginNames.push(internalPlugin);
41
- }
42
- });
63
+ if (internalPlugins) {
64
+ // internal plugins are mapped as optional dependencies only add them, if they exist
65
+ Object.keys(internalPlugins).forEach((internalPlugin) => {
66
+ if (
67
+ fs.existsSync(
68
+ path.join(pluginsDir, 'node_modules', ...internalPlugin.split('/')),
69
+ )
70
+ ) {
71
+ pluginNames.push(internalPlugin);
72
+ }
73
+ });
43
74
  }
44
75
  return pluginNames;
45
76
  }
@@ -49,9 +80,12 @@ export async function getPluginNames() {
49
80
  */
50
81
  export async function getInlinePlugins() {
51
82
  const pluginsDirectory = getPluginDirectory();
52
- const dirs = await fs.promises.readdir(pluginsDirectory, { withFileTypes: true });
53
- const topLevelDirs = dirs
54
- .filter(d => d.isDirectory() && d.name !== 'node_modules');
83
+ const dirs = await fs.promises.readdir(pluginsDirectory, {
84
+ withFileTypes: true,
85
+ });
86
+ const topLevelDirs = dirs.filter(
87
+ (d) => d.isDirectory() && d.name !== 'node_modules',
88
+ );
55
89
  const plugins = [];
56
90
  const scopes = [];
57
91
  topLevelDirs.forEach((d) => {
@@ -62,18 +96,49 @@ export async function getInlinePlugins() {
62
96
  }
63
97
  });
64
98
 
65
- await Promise.all(scopes.map(async (scope) => {
66
- const scopeDirs = await fs.promises.readdir(path.join(pluginsDirectory, scope), { withFileTypes: true });
67
- scopeDirs
68
- .filter(d => d.isDirectory() && d.name !== 'node_modules')
69
- .forEach((d) => {
70
- plugins.push(`${scope}/${d.name}`);
71
- });
72
- }));
99
+ await Promise.all(
100
+ scopes.map(async (scope) => {
101
+ const scopeDirs = await fs.promises.readdir(
102
+ path.join(pluginsDirectory, scope),
103
+ { withFileTypes: true },
104
+ );
105
+ scopeDirs
106
+ .filter((d) => d.isDirectory() && d.name !== 'node_modules')
107
+ .forEach((d) => {
108
+ plugins.push(`${scope}/${d.name}`);
109
+ });
110
+ }),
111
+ );
73
112
 
74
113
  return plugins;
75
114
  }
76
115
 
116
+ /**
117
+ * Writes content in the file and replaces references to public assets with the hashed url.
118
+ * @param {string} filePath
119
+ * @param {string} content
120
+ * @param {Map<string, string>?} rewrittenPublicAssets
121
+ * @param {string?} assetsPrefix prefixes the hashed asset url with this string
122
+ * @returns {Promise<void>}
123
+ */
124
+ export async function writeRewrittenFile(
125
+ filePath,
126
+ content,
127
+ rewrittenPublicAssets,
128
+ assetsPrefix,
129
+ ) {
130
+ let fileContent = content;
131
+ if (rewrittenPublicAssets) {
132
+ rewrittenPublicAssets.forEach((hashed, ori) => {
133
+ const rewrittenUrl = assetsPrefix
134
+ ? path.posix.join(assetsPrefix, hashed)
135
+ : hashed;
136
+ fileContent = fileContent.replaceAll(ori, rewrittenUrl);
137
+ });
138
+ }
139
+ return fs.promises.writeFile(filePath, fileContent);
140
+ }
141
+
77
142
  /**
78
143
  * builds the given configuration and writes the library to the provided outputFolder. If the build contains css a .css
79
144
  * file will also be written and injected into the .js file.
@@ -82,9 +147,17 @@ export async function getInlinePlugins() {
82
147
  * @param {string} library
83
148
  * @param {string} [hash]
84
149
  * @param {boolean} [base64Css = false] inline css. must be true for plugins
150
+ * @param {undefined|Map} [rewrittenPublicAssets=undefined] rewrittenPublicAssets Map of original filename to Hashed Filename in public folder
85
151
  * @returns {Promise<void>}
86
152
  */
87
- export async function buildLibrary(libraryConfig, outputFolder, library, hash = '', base64Css = false) {
153
+ export async function buildLibrary(
154
+ libraryConfig,
155
+ outputFolder,
156
+ library,
157
+ hash = '',
158
+ base64Css = false,
159
+ rewrittenPublicAssets = undefined,
160
+ ) {
88
161
  // Base64 contains the characters '+', '/', and '=', which have a reserved meaning in URLs.
89
162
  // Base64url solves this by replacing '+' with '-' and '/' with '_'.
90
163
  // See https://stackoverflow.com/a/55389212
@@ -110,16 +183,48 @@ function loadCss(href) {
110
183
  let css = false;
111
184
  if (output[1] && output[1].type === 'asset') {
112
185
  if (base64Css) {
113
- css = `data:text/css;base64,${Buffer.from(output[1].source).toString('base64url')}`;
186
+ css = `data:text/css;base64,${Buffer.from(output[1].source).toString(
187
+ 'base64url',
188
+ )}`;
114
189
  } else {
115
- await fs.promises.writeFile(path.join(process.cwd(), 'dist', outputFolder, `${library}${addedHash}.css`), output[1].source);
116
- css = `./${outputFolder}/${library}${addedHash}.css`;
190
+ await writeRewrittenFile(
191
+ path.join(
192
+ process.cwd(),
193
+ 'dist',
194
+ outputFolder,
195
+ `${library}${addedHash}.css`,
196
+ ),
197
+ output[1].source,
198
+ rewrittenPublicAssets,
199
+ );
200
+ if (outputFolder) {
201
+ css = `./${outputFolder}/${library}${addedHash}.css`;
202
+ } else {
203
+ css = `./${library}${addedHash}.css`;
204
+ }
117
205
  }
118
206
  }
119
207
  if (output[0] && output[0].type === 'chunk') {
120
208
  let code = css ? `${cssInjectorCode} await loadCss('${css}');` : '';
209
+ // inject materialDesignIcons here. We removed it earlier from the index.html
210
+ if (library === 'ui') {
211
+ const hashedPath = rewrittenPublicAssets.get(
212
+ 'assets/@mdi/font/css/materialdesignicons.min.css',
213
+ );
214
+ code += `await loadCss('./${path.posix.join('assets', hashedPath)}');`;
215
+ }
216
+
121
217
  code += output[0].code;
122
- await fs.promises.writeFile(path.join(process.cwd(), 'dist', outputFolder, `${library}${addedHash}.js`), code);
218
+ await writeRewrittenFile(
219
+ path.join(
220
+ process.cwd(),
221
+ 'dist',
222
+ outputFolder,
223
+ `${library}${addedHash}.js`,
224
+ ),
225
+ code,
226
+ rewrittenPublicAssets,
227
+ );
123
228
  }
124
229
  };
125
230
 
@@ -129,11 +234,23 @@ function loadCss(href) {
129
234
  } else if (libraryBuilds.output) {
130
235
  await write(libraryBuilds.output);
131
236
  } else {
132
- libraryBuilds.prependListener('event', async (event) => {
133
- // debounce
134
- if (event.code === 'BUNDLE_END') {
135
- const res = await event.result.generate(libraryConfig?.build?.rollupOptions?.output ?? {});
136
- await write(res.output);
237
+ /**
238
+ * This is used by the plugin-cli. If the libraryConfic includes watch: { }
239
+ * Rollup will start in Watch Mode. So we restart the browser on filechanges in the plugin-cli preview mode.
240
+ * See: https://rollupjs.org/javascript-api/#rollup-watch
241
+ * Also we need to add our BUNDLE_END event onCurrentRun, otherwise the bundle is already closed by vitejs.
242
+ * See: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L674
243
+ */
244
+ libraryBuilds.on('event', (event) => {
245
+ if (event.code === 'START') {
246
+ libraryBuilds.onCurrentRun('event', async (innerEvent) => {
247
+ if (innerEvent.code === 'BUNDLE_END') {
248
+ const res = await innerEvent.result.generate(
249
+ libraryConfig?.build?.rollupOptions?.output ?? {},
250
+ );
251
+ await write(res.output);
252
+ }
253
+ });
137
254
  }
138
255
  });
139
256
  }
@@ -153,6 +270,101 @@ export const libraries = {
153
270
  'vuetify/lib': 'vuetify',
154
271
  };
155
272
 
273
+ const toCopy = [
274
+ 'plugin-assets',
275
+ 'package.json',
276
+ 'config.json',
277
+ 'LICENSE.md',
278
+ 'CHANGELOG.md',
279
+ 'README.md',
280
+ ];
281
+
282
+ async function buildInlinePlugin(plugin, baseConfig, minify) {
283
+ // the relative path between plugins and libraries, is not known beforehand, so we calculate the distance.
284
+ // posixRelativePath is the relative path between the index.js of the plugin and the specific library.
285
+ const relativePluginPaths = {};
286
+ Object.entries(libraries).forEach(([key, value]) => {
287
+ const libraryPath = path.join('dist', 'assets', `${value}.js`);
288
+ const pluginPath = path.join(process.cwd(), `dist/plugins/${plugin}/`);
289
+ const relativePath = path.relative(pluginPath, libraryPath);
290
+ relativePluginPaths[key] = relativePath
291
+ .split(path.sep)
292
+ .join(path.posix.sep);
293
+ });
294
+
295
+ const pluginDir = getProjectPath('plugins', plugin);
296
+ const pluginConfig = {
297
+ ...baseConfig,
298
+ esbuild: {
299
+ minify,
300
+ },
301
+ build: {
302
+ write: false,
303
+ emptyOutDir: false,
304
+ outDir: `dist/plugins/${plugin}/`,
305
+ lib: {
306
+ entry: path.join(pluginDir, 'index.js'),
307
+ formats: ['es'],
308
+ fileName: 'index',
309
+ },
310
+ rollupOptions: {
311
+ external: Object.keys(libraries),
312
+ output: {
313
+ paths: relativePluginPaths,
314
+ },
315
+ },
316
+ },
317
+ };
318
+ const distPath = path.join(process.cwd(), 'dist', 'plugins', plugin);
319
+ if (!fs.existsSync(distPath)) {
320
+ await fs.promises.mkdir(distPath, { recursive: true });
321
+ }
322
+ await buildLibrary(pluginConfig, `plugins/${plugin}`, 'index', '', true);
323
+ await Promise.all(
324
+ toCopy.map(async (entry) => {
325
+ if (fs.existsSync(path.join(pluginDir, entry))) {
326
+ await fs.promises.cp(
327
+ path.join(pluginDir, entry),
328
+ path.join(distPath, entry),
329
+ { recursive: true, force: true },
330
+ );
331
+ }
332
+ }),
333
+ );
334
+ }
335
+
336
+ async function buildDependentPlugin(pluginName) {
337
+ const pluginsDirectory = getPluginDirectory();
338
+ let scope = '';
339
+ let name = pluginName;
340
+ if (pluginName.startsWith('@')) {
341
+ [scope, name] = pluginName.split('/');
342
+ }
343
+
344
+ await fs.promises.cp(
345
+ path.join(pluginsDirectory, 'node_modules', scope, name, 'dist'),
346
+ path.join(process.cwd(), 'dist', 'plugins', scope, name),
347
+ { recursive: true, force: true },
348
+ );
349
+
350
+ // must be copied one after the other to avoid race conditions
351
+ await Promise.all(
352
+ toCopy.map(async (entry) => {
353
+ if (
354
+ fs.existsSync(
355
+ path.join(pluginsDirectory, 'node_modules', scope, name, entry),
356
+ )
357
+ ) {
358
+ await fs.promises.cp(
359
+ path.join(pluginsDirectory, 'node_modules', scope, name, entry),
360
+ path.join(process.cwd(), 'dist', 'plugins', scope, name, entry),
361
+ { recursive: true, force: true },
362
+ );
363
+ }
364
+ }),
365
+ );
366
+ }
367
+
156
368
  /**
157
369
  * Will build a preview of all the current plugins & inline plugins
158
370
  * @param {import("vite").InlineConfig} [baseConfig={}] - the base config to use. build & esbuild will be completely overwritten
@@ -160,71 +372,32 @@ export const libraries = {
160
372
  * @returns {Promise<void>}
161
373
  */
162
374
  export async function buildPluginsForPreview(baseConfig = {}, minify = true) {
163
- const pluginsDirectory = getPluginDirectory();
164
375
  const inlinePlugins = await getInlinePlugins();
165
376
  const dependentPlugins = await getPluginNames();
166
377
 
167
- const promises = inlinePlugins.map(async (plugin) => {
168
- // the relative path between plugins and libraries, is not known beforehand, so we calculate the distance.
169
- // posixRelativePath is the relative path between the index.js of the plugin and the specific library.
170
- const relativePluginPaths = {};
171
- Object.entries(libraries).forEach(([key, value]) => {
172
- const libraryPath = path.join('dist', 'assets', `${value}.js`);
173
- const pluginPath = path.join(process.cwd(), `dist/plugins/${plugin}/`);
174
- const relativePath = path.relative(pluginPath, libraryPath);
175
- relativePluginPaths[key] = relativePath.split(path.sep).join(path.posix.sep);
176
- });
378
+ const promises = inlinePlugins.map((plugin) =>
379
+ buildInlinePlugin(plugin, baseConfig, minify),
380
+ );
177
381
 
178
- const pluginConfig = {
179
- ...baseConfig,
180
- esbuild: {
181
- minify,
182
- },
183
- build: {
184
- write: false,
185
- emptyOutDir: false,
186
- outDir: `dist/plugins/${plugin}/`,
187
- lib: {
188
- entry: getProjectPath('plugins', plugin, 'index.js'),
189
- formats: ['es'],
190
- fileName: 'index',
191
- },
192
- rollupOptions: {
193
- external: Object.keys(libraries),
194
- output: {
195
- paths: relativePluginPaths,
196
- },
197
- },
198
- },
199
- };
200
- const distPath = path.join(process.cwd(), 'dist', 'plugins', plugin);
201
- if (!fs.existsSync(distPath)) {
202
- await fs.promises.mkdir(distPath, { recursive: true });
203
- }
204
- await buildLibrary(pluginConfig, `plugins/${plugin}`, 'index', '', true);
205
- });
382
+ promises.push(
383
+ ...dependentPlugins.map(async (pluginName) =>
384
+ buildDependentPlugin(pluginName, baseConfig, minify),
385
+ ),
386
+ );
387
+ await Promise.all(promises);
388
+ }
206
389
 
207
- promises.push(...dependentPlugins.map(async (pluginName) => {
208
- let scope = '';
209
- let name = pluginName;
210
- if (pluginName.startsWith('@')) {
211
- [scope, name] = pluginName.split('/');
212
- }
390
+ export async function buildPluginsForBundle(baseConfig = {}) {
391
+ const inlinePlugins = await getInlinePlugins();
392
+ const dependentPlugins = await getPluginNames();
393
+ const promises = inlinePlugins
394
+ .filter((plugin) => plugin.startsWith('@vcmap/'))
395
+ .map((plugin) => buildInlinePlugin(plugin, baseConfig, true));
213
396
 
214
- await fs.promises.cp(
215
- path.join(pluginsDirectory, 'node_modules', scope, name, 'dist'),
216
- path.join(process.cwd(), 'dist', 'plugins', scope, name),
217
- { recursive: true, force: true },
218
- );
219
-
220
- // must be copied one after the other to avoid race conditions
221
- if (fs.existsSync(path.join(pluginsDirectory, 'node_modules', scope, name, 'plugin-assets'))) {
222
- await fs.promises.cp(
223
- path.join(pluginsDirectory, 'node_modules', scope, name, 'plugin-assets'),
224
- path.join(process.cwd(), 'dist', 'plugins', scope, name, 'plugin-assets'),
225
- { recursive: true, force: true },
226
- );
227
- }
228
- }));
397
+ promises.push(
398
+ ...dependentPlugins.map(async (pluginName) =>
399
+ buildDependentPlugin(pluginName),
400
+ ),
401
+ );
229
402
  await Promise.all(promises);
230
403
  }
@@ -5,10 +5,13 @@ import { buildPluginsForPreview, getProjectPath } from './buildHelpers.js';
5
5
 
6
6
  console.log('Building Plugins');
7
7
  await Promise.all([
8
- buildPluginsForPreview({
9
- configFile: './build/commonViteConfig.js',
10
- plugins: [vcsOl()],
11
- }, true),
8
+ buildPluginsForPreview(
9
+ {
10
+ configFile: './build/commonViteConfig.js',
11
+ plugins: [vcsOl()],
12
+ },
13
+ true,
14
+ ),
12
15
  fs.promises.cp(
13
16
  getProjectPath('app.config.json'),
14
17
  path.join(process.cwd(), 'dist', 'app.config.json'),
@@ -0,0 +1,56 @@
1
+ import vcsOl from '@vcmap/rollup-plugin-vcs-ol';
2
+ import { join as joinPath } from 'path';
3
+ import tar from 'tar';
4
+ import { cp, rm } from 'fs/promises';
5
+ import { createGzip } from 'zlib';
6
+ import { pipeline } from 'stream';
7
+ import { createReadStream, createWriteStream } from 'fs';
8
+ import { buildPluginsForBundle, getProjectPath } from './buildHelpers.js';
9
+
10
+ await import('./build.js');
11
+ console.log('ui built');
12
+
13
+ await buildPluginsForBundle({
14
+ configFile: './build/commonViteConfig.js',
15
+ plugins: [vcsOl()],
16
+ });
17
+
18
+ const distDir = getProjectPath('dist');
19
+
20
+ const rootFiles = ['package.json', 'README.md', 'CHANGELOG.md'];
21
+ await Promise.all(
22
+ rootFiles.map((entry) => cp(getProjectPath(entry), joinPath(distDir, entry))),
23
+ );
24
+
25
+ const file = joinPath(distDir, 'vcmap-bundle.tar');
26
+
27
+ await tar.c(
28
+ {
29
+ file,
30
+ cwd: distDir,
31
+ prefix: '@vcmap/ui',
32
+ },
33
+ ['index.html', 'assets', ...rootFiles],
34
+ );
35
+
36
+ await tar.u(
37
+ {
38
+ file,
39
+ cwd: joinPath(distDir, 'plugins'),
40
+ },
41
+ ['.'],
42
+ );
43
+
44
+ await new Promise((res, rej) => {
45
+ pipeline(
46
+ [createReadStream(file), createGzip(), createWriteStream(`${file}.gz`)],
47
+ (err) => {
48
+ if (err) {
49
+ rej(err);
50
+ } else {
51
+ res();
52
+ }
53
+ },
54
+ );
55
+ });
56
+ await rm(file);
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable import/extensions */
2
2
  import path from 'path';
3
3
  import { defineConfig } from 'vite';
4
- import { createVuePlugin } from 'vite-plugin-vue2';
4
+ import vue2 from '@vitejs/plugin-vue2';
5
5
  import { libraries } from './buildHelpers.js';
6
6
 
7
7
  const configMain = defineConfig({
@@ -17,9 +17,7 @@ const configMain = defineConfig({
17
17
  define: {
18
18
  'process.env.NODE_ENV': '"development"',
19
19
  },
20
- plugins: [
21
- createVuePlugin(),
22
- ],
20
+ plugins: [vue2()],
23
21
  css: {
24
22
  preprocessorOptions: {
25
23
  sass: {
@@ -7,8 +7,14 @@ import os from 'os';
7
7
  */
8
8
  export function determineHostIpFromInterfaces() {
9
9
  const interFace = Object.values(os.networkInterfaces())
10
- .flatMap(nInterface => nInterface ?? [])
11
- .find(detail => detail && detail.address && !detail.internal && detail.family === 'IPv4');
10
+ .flatMap((nInterface) => nInterface ?? [])
11
+ .find(
12
+ (detail) =>
13
+ detail &&
14
+ detail.address &&
15
+ !detail.internal &&
16
+ detail.family === 'IPv4',
17
+ );
12
18
  return interFace?.address ?? null;
13
19
  }
14
20
 
@@ -18,7 +24,11 @@ export function determineHostIpFromInterfaces() {
18
24
  * @param {string} [defaultHost='127.0.0.1']
19
25
  * @returns {string}
20
26
  */
21
- export function determineHostFromArgv(defaultPort = 8080, defaultHttps = false, defaultHost = '127.0.0.1') {
27
+ export function determineHostFromArgv(
28
+ defaultPort = 8080,
29
+ defaultHttps = false,
30
+ defaultHost = '127.0.0.1',
31
+ ) {
22
32
  let port = defaultPort;
23
33
  const portIndex = process.argv.indexOf('--port');
24
34
  if (portIndex > -1 && process.argv.length > portIndex + 1) {
@@ -36,7 +46,10 @@ export function determineHostFromArgv(defaultPort = 8080, defaultHttps = false,
36
46
  const hostIndex = process.argv.indexOf('--host');
37
47
  let host = defaultHost;
38
48
  if (hostIndex > -1) {
39
- if (process.argv.length > hostIndex + 1 && !process.argv[hostIndex + 1].startsWith('-')) {
49
+ if (
50
+ process.argv.length > hostIndex + 1 &&
51
+ !process.argv[hostIndex + 1].startsWith('-')
52
+ ) {
40
53
  host = process.argv[hostIndex + 1];
41
54
  } else {
42
55
  host = determineHostIpFromInterfaces() ?? host;
@@ -19,13 +19,13 @@ function parseOutput(output) {
19
19
  try {
20
20
  info = JSON.parse(String(output));
21
21
  } catch (err) {
22
- throw new Error(`Failed to parse output as JSON: ${ output}`);
22
+ throw new Error(`Failed to parse output as JSON: ${output}`);
23
23
  }
24
24
  if (!Array.isArray(info.symbols)) {
25
- throw new Error(`Expected symbols array: ${ output}`);
25
+ throw new Error(`Expected symbols array: ${output}`);
26
26
  }
27
27
  if (!Array.isArray(info.defines)) {
28
- throw new Error(`Expected defines array: ${ output}`);
28
+ throw new Error(`Expected defines array: ${output}`);
29
29
  }
30
30
 
31
31
  return info;
@@ -41,9 +41,7 @@ function getBinaryPath(binaryName) {
41
41
 
42
42
  const expectedPaths = [
43
43
  path.join('node_modules', '.bin', binary),
44
- path.resolve(
45
- path.join('node_modules', 'jsdoc', '.bin', binary),
46
- ),
44
+ path.resolve(path.join('node_modules', 'jsdoc', '.bin', binary)),
47
45
  ];
48
46
 
49
47
  for (let i = 0; i < expectedPaths.length; i++) {
@@ -54,7 +52,7 @@ function getBinaryPath(binaryName) {
54
52
  }
55
53
 
56
54
  throw Error(
57
- `JsDoc binary was not found in any of the expected paths: ${ expectedPaths}`,
55
+ `JsDoc binary was not found in any of the expected paths: ${expectedPaths}`,
58
56
  );
59
57
  }
60
58
 
@@ -64,11 +62,7 @@ function getBinaryPath(binaryName) {
64
62
  * If provided with an empty list of paths, resolves with null.
65
63
  */
66
64
  function spawnJSDoc() {
67
- const jsdocConfig = path.join(
68
- 'build',
69
- 'info',
70
- 'conf.json',
71
- );
65
+ const jsdocConfig = path.join('build', 'info', 'conf.json');
72
66
 
73
67
  return new Promise((resolve, reject) => {
74
68
  let output = '';
@@ -108,7 +102,7 @@ function spawnJSDoc() {
108
102
  async function getSymbols() {
109
103
  const info = await spawnJSDoc();
110
104
  return info.symbols.filter(
111
- symbol => symbol.kind !== 'member' || symbol.exports,
105
+ (symbol) => symbol.kind !== 'member' || symbol.exports,
112
106
  );
113
107
  }
114
108
 
@@ -131,7 +125,10 @@ function getImport(symbol, member) {
131
125
  from = defaultExport[0].replace(/^module:/, '');
132
126
  importName = 'default';
133
127
  exportName = from.replace(/[./]+/g, '$');
134
- } else if (namedExport.length > 1 && (member || (symbol.exports && symbol.exports !== 'default'))) {
128
+ } else if (
129
+ namedExport.length > 1 &&
130
+ (member || (symbol.exports && symbol.exports !== 'default'))
131
+ ) {
135
132
  from = namedExport[0].replace(/^module:/, '');
136
133
  importName = member || symbol.exports;
137
134
  exportName = `${from.replace(/[./]+/g, '$')}$${importName}`;
@@ -178,8 +175,8 @@ function generateExports(symbols) {
178
175
  }
179
176
  });
180
177
  const source = Object.keys(imports)
181
- .map(line => line.replace('from \'ol/', 'from \'ol/'))
182
- .map(line => line.replace('from \'ol\'', 'from \'ol/index.js\''))
178
+ .map((line) => line.replace("from 'ol/", "from 'ol/"))
179
+ .map((line) => line.replace("from 'ol'", "from 'ol/index.js'"))
183
180
  .join('\n');
184
181
  return `${source}\nexport * from 'ol/index.js';\n`;
185
182
  }