@vcmap/ui 5.0.1 → 5.1.0-rc.1

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 (444) hide show
  1. package/README.md +2 -2
  2. package/build/buildTypes.js +176 -0
  3. package/build/lintTypes.js +30 -0
  4. package/config/aerowest.config.json +4 -0
  5. package/config/base.config.json +24 -2
  6. package/config/dev.config.json +176 -5
  7. package/config/www.config.json +25 -1
  8. package/dist/assets/{cesium.888ef7.js → cesium.e9b3ca.js} +1859 -1828
  9. package/dist/assets/cesium.js +1 -1
  10. package/dist/assets/{core.860907.js → core.a9fe5a.js} +5865 -5041
  11. package/dist/assets/core.js +1 -1
  12. package/dist/assets/index-bb2549d6.js +1 -0
  13. package/dist/assets/{ol.5e8a90.js → ol.5f0496.js} +7257 -7252
  14. package/dist/assets/ol.js +1 -1
  15. package/dist/assets/{ui.7758a8.css → ui.3c73c2.css} +2 -2
  16. package/dist/assets/{ui.7758a8.js → ui.3c73c2.js} +14281 -9264
  17. package/dist/assets/ui.js +1 -1
  18. package/dist/assets/{vue.9771b3.js → vue.4fe14e.js} +1243 -1234
  19. package/dist/assets/vue.js +2 -2
  20. package/dist/assets/{vuetify.2818ff.css → vuetify.260d9a.css} +1 -1
  21. package/dist/assets/{vuetify.2818ff.js → vuetify.260d9a.js} +155 -154
  22. package/dist/assets/vuetify.js +2 -2
  23. package/dist/index.html +2 -2
  24. package/index.d.ts +256 -0
  25. package/index.html +1 -1
  26. package/index.js +48 -11
  27. package/package.json +22 -15
  28. package/plugins/@vcmap-show-case/buttons-example/src/ButtonsExample.vue +3 -0
  29. package/plugins/@vcmap-show-case/category-tester/src/CategoriesExample.vue +312 -43
  30. package/plugins/@vcmap-show-case/category-tester/src/CollectionComponentOptions.vue +48 -182
  31. package/plugins/@vcmap-show-case/category-tester/src/FoobarEditor.vue +118 -0
  32. package/plugins/@vcmap-show-case/category-tester/src/importExportHelper.js +29 -0
  33. package/plugins/@vcmap-show-case/category-tester/src/index.js +16 -0
  34. package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +2 -1
  35. package/plugins/@vcmap-show-case/collection-manager-example/src/index.js +8 -4
  36. package/plugins/@vcmap-show-case/extent-example/README.md +3 -0
  37. package/plugins/@vcmap-show-case/extent-example/package.json +5 -0
  38. package/plugins/@vcmap-show-case/extent-example/src/ExtentExample.vue +71 -0
  39. package/plugins/@vcmap-show-case/extent-example/src/index.js +68 -0
  40. package/plugins/@vcmap-show-case/flight-component-example/README.md +3 -0
  41. package/plugins/@vcmap-show-case/flight-component-example/package.json +5 -0
  42. package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +53 -0
  43. package/plugins/@vcmap-show-case/flight-component-example/src/index.js +42 -0
  44. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +78 -5
  45. package/plugins/@vcmap-show-case/hello-world/src/helloWorld.vue +2 -2
  46. package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +22 -10
  47. package/plugins/@vcmap-show-case/toolbox-example/README.md +9 -0
  48. package/plugins/@vcmap-show-case/toolbox-example/package.json +5 -0
  49. package/plugins/@vcmap-show-case/toolbox-example/src/TriStateExampleWindow.vue +21 -0
  50. package/plugins/@vcmap-show-case/toolbox-example/src/dummyToolboxActions.js +94 -0
  51. package/plugins/@vcmap-show-case/toolbox-example/src/index.js +260 -0
  52. package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +12 -2
  53. package/plugins/@vcmap-show-case/viewpoint-component-example/README.md +3 -0
  54. package/plugins/@vcmap-show-case/viewpoint-component-example/package.json +5 -0
  55. package/plugins/@vcmap-show-case/viewpoint-component-example/src/ViewpointExample.vue +52 -0
  56. package/plugins/@vcmap-show-case/viewpoint-component-example/src/index.js +42 -0
  57. package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +31 -1
  58. package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +20 -16
  59. package/plugins/@vcmap-show-case/window-tester/src/index.js +2 -17
  60. package/plugins/package.json +3 -1
  61. package/src/actions/StyleSelector.vue +8 -7
  62. package/src/actions/StyleSelector.vue.d.ts +27 -0
  63. package/src/actions/actionHelper.d.ts +153 -0
  64. package/src/actions/actionHelper.js +48 -21
  65. package/src/actions/extentActions.d.ts +40 -0
  66. package/src/actions/extentActions.js +359 -0
  67. package/src/actions/flightActions.d.ts +59 -0
  68. package/src/actions/flightActions.js +232 -0
  69. package/src/actions/listActions.d.ts +63 -0
  70. package/src/actions/listActions.js +185 -0
  71. package/src/actions/stateRefAction.d.ts +19 -0
  72. package/src/actions/stateRefAction.js +1 -1
  73. package/src/application/VcsApp.vue +103 -28
  74. package/src/application/VcsApp.vue.d.ts +86 -0
  75. package/src/application/VcsAppWrapper.vue.d.ts +12 -0
  76. package/src/application/VcsAttributions.vue.d.ts +14 -0
  77. package/src/application/VcsAttributionsFooter.vue +1 -4
  78. package/src/application/VcsAttributionsFooter.vue.d.ts +26 -0
  79. package/src/application/VcsMap.vue.d.ts +12 -0
  80. package/src/application/VcsNavbar.vue.d.ts +45 -0
  81. package/src/application/VcsPositionDisplay.vue +208 -0
  82. package/src/application/VcsPositionDisplay.vue.d.ts +18 -0
  83. package/src/application/VcsSettings.vue.d.ts +5 -0
  84. package/src/application/VcsTextPage.vue +65 -0
  85. package/src/application/VcsTextPage.vue.d.ts +16 -0
  86. package/src/application/VcsTextPageFooter.vue +89 -0
  87. package/src/application/VcsTextPageFooter.vue.d.ts +22 -0
  88. package/src/application/attributionsHelper.d.ts +64 -0
  89. package/src/application/attributionsHelper.js +1 -1
  90. package/src/application/markdownHelper.d.ts +5 -0
  91. package/src/application/markdownHelper.js +11 -0
  92. package/src/application/positionDisplayInteraction.d.ts +42 -0
  93. package/src/application/positionDisplayInteraction.js +65 -0
  94. package/src/callback/activateLayersCallback.d.ts +29 -0
  95. package/src/callback/activateLayersCallback.js +2 -2
  96. package/src/callback/applyLayerStyleCallback.d.ts +36 -0
  97. package/src/callback/applyLayerStyleCallback.js +2 -2
  98. package/src/callback/deactivateLayersCallback.d.ts +29 -0
  99. package/src/callback/deactivateLayersCallback.js +2 -2
  100. package/src/callback/goToViewpointCallback.d.ts +29 -0
  101. package/src/callback/goToViewpointCallback.js +2 -2
  102. package/src/callback/vcsCallback.d.ts +44 -0
  103. package/src/callback/vcsCallback.js +4 -9
  104. package/src/components/ImageElementInjector.vue.d.ts +24 -0
  105. package/src/components/buttons/VcsActionButtonList.vue +24 -16
  106. package/src/components/buttons/VcsActionButtonList.vue.d.ts +68 -0
  107. package/src/components/buttons/VcsButton.vue +7 -0
  108. package/src/components/buttons/VcsButton.vue.d.ts +89 -0
  109. package/src/components/buttons/VcsFormButton.vue +9 -0
  110. package/src/components/buttons/VcsFormButton.vue.d.ts +91 -0
  111. package/src/components/buttons/VcsToolButton.vue +9 -0
  112. package/src/components/buttons/VcsToolButton.vue.d.ts +91 -0
  113. package/src/components/flight/VcsFlightAnchorsComponent.vue +329 -0
  114. package/src/components/flight/VcsFlightAnchorsComponent.vue.d.ts +45 -0
  115. package/src/components/flight/VcsFlightComponent.vue +284 -0
  116. package/src/components/flight/VcsFlightComponent.vue.d.ts +104 -0
  117. package/src/components/flight/VcsFlightEditor.vue +77 -0
  118. package/src/components/flight/VcsFlightEditor.vue.d.ts +34 -0
  119. package/src/components/flight/VcsFlightPlayer.vue +124 -0
  120. package/src/components/flight/VcsFlightPlayer.vue.d.ts +25 -0
  121. package/src/components/flight/composables.d.ts +11 -0
  122. package/src/components/flight/composables.js +39 -0
  123. package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +18 -0
  124. package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +82 -0
  125. package/src/components/form-inputs-controls/VcsCoordinate.vue +152 -0
  126. package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +90 -0
  127. package/src/components/form-inputs-controls/VcsDatePicker.vue +2 -2
  128. package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +31 -0
  129. package/src/components/form-inputs-controls/VcsExtent.vue +122 -0
  130. package/src/components/form-inputs-controls/VcsExtent.vue.d.ts +36 -0
  131. package/src/components/form-inputs-controls/VcsFormSection.vue +6 -1
  132. package/src/components/form-inputs-controls/VcsFormSection.vue.d.ts +75 -0
  133. package/src/components/form-inputs-controls/VcsLabel.vue +18 -0
  134. package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +41 -0
  135. package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +32 -0
  136. package/src/components/form-inputs-controls/VcsRadioGrid.vue.d.ts +35 -0
  137. package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +31 -0
  138. package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -0
  139. package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +22 -0
  140. package/src/components/form-inputs-controls/VcsTextField.vue +57 -10
  141. package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +65 -0
  142. package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +14 -0
  143. package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +89 -0
  144. package/src/components/form-inputs-controls/composables.d.ts +7 -0
  145. package/src/components/form-inputs-controls/composables.js +1 -1
  146. package/src/components/form-output/VcsFormattedNumber.vue +13 -2
  147. package/src/components/form-output/VcsFormattedNumber.vue.d.ts +89 -0
  148. package/src/components/icons/+all.d.ts +9 -0
  149. package/src/components/icons/+all.js +16 -0
  150. package/src/components/icons/2DAreaIcon.vue.d.ts +2 -0
  151. package/src/components/icons/2DDistanceIcon.vue.d.ts +2 -0
  152. package/src/components/icons/2DHeightObliqueIcon.vue +20 -0
  153. package/src/components/icons/2DHeightObliqueIcon.vue.d.ts +2 -0
  154. package/src/components/icons/3DAreaIcon.vue.d.ts +2 -0
  155. package/src/components/icons/3DDistanceIcon.vue.d.ts +2 -0
  156. package/src/components/icons/3DHeightIcon.vue.d.ts +2 -0
  157. package/src/components/icons/AngleIcon.vue.d.ts +2 -0
  158. package/src/components/icons/AssociationsIcon.vue.d.ts +2 -0
  159. package/src/components/icons/AxisIcon.vue.d.ts +2 -0
  160. package/src/components/icons/BoundingBoxIcon.vue.d.ts +2 -0
  161. package/src/components/icons/CheckboxCheckedIcon.vue.d.ts +2 -0
  162. package/src/components/icons/CheckboxIcon.vue.d.ts +2 -0
  163. package/src/components/icons/CheckboxIndeterminateIcon.vue.d.ts +2 -0
  164. package/src/components/icons/CircleIcon.vue.d.ts +2 -0
  165. package/src/components/icons/ClippingHorizontalIcon.vue.d.ts +2 -0
  166. package/src/components/icons/ClippingIcon.vue.d.ts +2 -0
  167. package/src/components/icons/ClippingVerticalIcon.vue.d.ts +2 -0
  168. package/src/components/icons/ColorPickerIcon.vue.d.ts +2 -0
  169. package/src/components/icons/ColorSwatchIcon.vue.d.ts +2 -0
  170. package/src/components/icons/CommentIcon.vue.d.ts +2 -0
  171. package/src/components/icons/CompassIcon.vue.d.ts +2 -0
  172. package/src/components/icons/ComponentsIcon.vue.d.ts +2 -0
  173. package/src/components/icons/ComponentsPlusIcon.vue +17 -0
  174. package/src/components/icons/ComponentsPlusIcon.vue.d.ts +2 -0
  175. package/src/components/icons/ConeIcon.vue.d.ts +2 -0
  176. package/src/components/icons/DimensionsHouseIcon.vue.d.ts +2 -0
  177. package/src/components/icons/EditIcon.vue.d.ts +2 -0
  178. package/src/components/icons/EditVerticesIcon.vue.d.ts +2 -0
  179. package/src/components/icons/ElevationProfileIcon.vue.d.ts +2 -0
  180. package/src/components/icons/ExportAreaIcon.vue.d.ts +2 -0
  181. package/src/components/icons/ExportFlightIcon.vue.d.ts +2 -0
  182. package/src/components/icons/ExportIcon.vue.d.ts +2 -0
  183. package/src/components/icons/ExternalLinkIcon.vue.d.ts +2 -0
  184. package/src/components/icons/EyeIcon.vue.d.ts +2 -0
  185. package/src/components/icons/FastForwardIcon.vue.d.ts +2 -0
  186. package/src/components/icons/FilterIcon.vue.d.ts +2 -0
  187. package/src/components/icons/GlobalTerrainIcon.vue.d.ts +2 -0
  188. package/src/components/icons/GlobeNatureIcon.vue.d.ts +2 -0
  189. package/src/components/icons/GroundIcon.vue.d.ts +2 -0
  190. package/src/components/icons/HealthCareIndustriesIcon.vue.d.ts +2 -0
  191. package/src/components/icons/HelpIcon.vue.d.ts +2 -0
  192. package/src/components/icons/HideIcon.vue.d.ts +2 -0
  193. package/src/components/icons/HomePointIcon.vue.d.ts +2 -0
  194. package/src/components/icons/HospitalsIcon.vue.d.ts +2 -0
  195. package/src/components/icons/HouseIcon.vue.d.ts +2 -0
  196. package/src/components/icons/ImportIcon.vue.d.ts +2 -0
  197. package/src/components/icons/InfoIcon.vue.d.ts +2 -0
  198. package/src/components/icons/KebabIcon.vue.d.ts +2 -0
  199. package/src/components/icons/LabelIcon.vue.d.ts +2 -0
  200. package/src/components/icons/LayersIcon.vue.d.ts +2 -0
  201. package/src/components/icons/LegendIcon.vue.d.ts +2 -0
  202. package/src/components/icons/LineIcon.vue.d.ts +2 -0
  203. package/src/components/icons/LinkIcon.vue.d.ts +2 -0
  204. package/src/components/icons/LogoutIcon.vue.d.ts +2 -0
  205. package/src/components/icons/MapIcon.vue.d.ts +2 -0
  206. package/src/components/icons/MenuIcon.vue.d.ts +2 -0
  207. package/src/components/icons/MinusIcon.vue.d.ts +2 -0
  208. package/src/components/icons/MultiViewIcon.vue +16 -0
  209. package/src/components/icons/MultiViewIcon.vue.d.ts +2 -0
  210. package/src/components/icons/ObjectAttributeIcon.vue.d.ts +2 -0
  211. package/src/components/icons/ObjectSelectIcon.vue.d.ts +2 -0
  212. package/src/components/icons/ObliqueViewIcon.vue.d.ts +2 -0
  213. package/src/components/icons/PdfIcon.vue.d.ts +2 -0
  214. package/src/components/icons/PedestrianIcon.vue.d.ts +2 -0
  215. package/src/components/icons/PenIcon.vue.d.ts +2 -0
  216. package/src/components/icons/PlayCircleIcon.vue.d.ts +2 -0
  217. package/src/components/icons/PlusIcon.vue.d.ts +2 -0
  218. package/src/components/icons/PoiIcon.vue.d.ts +2 -0
  219. package/src/components/icons/PointIcon.vue.d.ts +2 -0
  220. package/src/components/icons/PointMeasurementIcon.vue +36 -0
  221. package/src/components/icons/PointMeasurementIcon.vue.d.ts +2 -0
  222. package/src/components/icons/PointSelectIcon.vue.d.ts +2 -0
  223. package/src/components/icons/PresentationModeIcon.vue.d.ts +2 -0
  224. package/src/components/icons/ProgressIcon.vue.d.ts +2 -0
  225. package/src/components/icons/QueryIcon.vue.d.ts +2 -0
  226. package/src/components/icons/RectangleIcon.vue.d.ts +2 -0
  227. package/src/components/icons/ReturnIcon.vue.d.ts +2 -0
  228. package/src/components/icons/RewindIcon.vue.d.ts +2 -0
  229. package/src/components/icons/RotateLeftIcon.vue.d.ts +2 -0
  230. package/src/components/icons/RotateRightIcon.vue.d.ts +2 -0
  231. package/src/components/icons/ScreenshotIcon.vue.d.ts +2 -0
  232. package/src/components/icons/SearchIcon.vue.d.ts +2 -0
  233. package/src/components/icons/ShadowIcon.vue.d.ts +2 -0
  234. package/src/components/icons/ShapesIcon.vue.d.ts +2 -0
  235. package/src/components/icons/ShareIcon.vue.d.ts +2 -0
  236. package/src/components/icons/SimpleCircleFilledIcon.vue.d.ts +2 -0
  237. package/src/components/icons/SimpleCircleHalfFilledIcon.vue.d.ts +2 -0
  238. package/src/components/icons/SimpleCircleOutlinedIcon.vue.d.ts +2 -0
  239. package/src/components/icons/SkipNextIcon.vue.d.ts +2 -0
  240. package/src/components/icons/SkipPreviousIcon.vue.d.ts +2 -0
  241. package/src/components/icons/SplitViewIcon.vue.d.ts +2 -0
  242. package/src/components/icons/TerrainBoxIcon.vue.d.ts +2 -0
  243. package/src/components/icons/TextStyleIcon.vue.d.ts +2 -0
  244. package/src/components/icons/ThreeDimensionsIcon.vue.d.ts +2 -0
  245. package/src/components/icons/ToolsIcon.vue.d.ts +2 -0
  246. package/src/components/icons/TouchIcon.vue.d.ts +2 -0
  247. package/src/components/icons/TrashCanIcon.vue.d.ts +2 -0
  248. package/src/components/icons/TriangleIcon.vue.d.ts +2 -0
  249. package/src/components/icons/TwoDimensionsIcon.vue.d.ts +2 -0
  250. package/src/components/icons/UploadIcon.vue.d.ts +2 -0
  251. package/src/components/icons/UserProfileIcon.vue.d.ts +2 -0
  252. package/src/components/icons/UserShareIcon.vue.d.ts +2 -0
  253. package/src/components/icons/VideoRecorderIcon.vue.d.ts +2 -0
  254. package/src/components/icons/ViewpointFlightIcon.vue.d.ts +2 -0
  255. package/src/components/icons/ViewpointIcon.vue.d.ts +2 -0
  256. package/src/components/icons/Viewshed360Icon.vue.d.ts +2 -0
  257. package/src/components/icons/ViewshedConeIcon.vue.d.ts +2 -0
  258. package/src/components/icons/ViewshedIcon.vue.d.ts +2 -0
  259. package/src/components/icons/WalkingIcon.vue.d.ts +2 -0
  260. package/src/components/icons/WallIcon.vue.d.ts +2 -0
  261. package/src/components/icons/WandIcon.vue.d.ts +2 -0
  262. package/src/components/import/FileDrop.vue +69 -0
  263. package/src/components/import/FileDrop.vue.d.ts +26 -0
  264. package/src/components/import/ImportComponent.vue +78 -0
  265. package/src/components/import/ImportComponent.vue.d.ts +34 -0
  266. package/src/components/lists/VcsActionList.vue +8 -15
  267. package/src/components/lists/VcsActionList.vue.d.ts +66 -0
  268. package/src/components/lists/VcsList.vue +207 -116
  269. package/src/components/lists/VcsList.vue.d.ts +227 -0
  270. package/src/components/lists/VcsTreeview.vue +3 -1
  271. package/src/components/lists/VcsTreeview.vue.d.ts +28 -0
  272. package/src/components/lists/VcsTreeviewLeaf.vue +1 -0
  273. package/src/components/lists/VcsTreeviewLeaf.vue.d.ts +19 -0
  274. package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +41 -0
  275. package/src/components/notification/VcsBadge.vue.d.ts +14 -0
  276. package/src/components/notification/VcsHelp.vue.d.ts +22 -0
  277. package/src/components/notification/VcsTooltip.vue.d.ts +27 -0
  278. package/src/components/notification/validation.d.ts +8 -0
  279. package/src/components/notification/validation.js +3 -2
  280. package/src/components/plugins/AbstractConfigEditor.vue +25 -4
  281. package/src/components/plugins/AbstractConfigEditor.vue.d.ts +55 -0
  282. package/src/components/style/MenuWrapper.vue.d.ts +55 -0
  283. package/src/components/style/VcsFeatureStyleComponent.vue +389 -0
  284. package/src/components/style/VcsFeatureStyleComponent.vue.d.ts +31 -0
  285. package/src/components/style/VcsFillMenu.vue.d.ts +34 -0
  286. package/src/components/style/VcsFillSelector.vue.d.ts +22 -0
  287. package/src/components/style/VcsImageMenu.vue.d.ts +43 -0
  288. package/src/components/style/VcsImageSelector.vue.d.ts +128 -0
  289. package/src/components/style/VcsStrokeMenu.vue.d.ts +34 -0
  290. package/src/components/style/VcsStrokeSelector.vue.d.ts +23 -0
  291. package/src/components/style/VcsTextMenu.vue.d.ts +52 -0
  292. package/src/components/style/VcsTextSelector.vue.d.ts +58 -0
  293. package/src/components/style/VcsVectorStyleComponent.vue.d.ts +76 -0
  294. package/src/components/style/composables.d.ts +43 -0
  295. package/src/components/style/composables.js +11 -8
  296. package/src/components/tables/VcsDataTable.vue +11 -3
  297. package/src/components/tables/VcsDataTable.vue.d.ts +142 -0
  298. package/src/components/tables/VcsTable.vue +71 -2
  299. package/src/components/tables/VcsTable.vue.d.ts +88 -0
  300. package/src/components/vector-properties/VcsFeatureEditingWindow.vue +392 -0
  301. package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +87 -0
  302. package/src/components/vector-properties/VcsFeatureTransforms.vue +217 -0
  303. package/src/components/vector-properties/VcsFeatureTransforms.vue.d.ts +45 -0
  304. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +96 -52
  305. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +119 -0
  306. package/src/components/vector-properties/composables.d.ts +33 -0
  307. package/src/components/vector-properties/composables.js +21 -14
  308. package/src/components/viewpoint/VcsViewpointComponent.vue +514 -0
  309. package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +126 -0
  310. package/src/components/viewpoint/VcsViewpointEditor.vue +87 -0
  311. package/src/components/viewpoint/VcsViewpointEditor.vue.d.ts +25 -0
  312. package/src/contentTree/LayerTree.vue.d.ts +15 -0
  313. package/src/contentTree/contentTreeCollection.d.ts +113 -0
  314. package/src/contentTree/contentTreeCollection.js +10 -20
  315. package/src/contentTree/contentTreeItem.d.ts +334 -0
  316. package/src/contentTree/contentTreeItem.js +31 -17
  317. package/src/contentTree/flightContentTreeItem.d.ts +53 -0
  318. package/src/contentTree/flightContentTreeItem.js +201 -0
  319. package/src/contentTree/groupContentTreeItem.d.ts +14 -0
  320. package/src/contentTree/groupContentTreeItem.js +2 -2
  321. package/src/contentTree/layerContentTreeItem.d.ts +76 -0
  322. package/src/contentTree/layerContentTreeItem.js +7 -9
  323. package/src/contentTree/layerGroupContentTreeItem.d.ts +50 -0
  324. package/src/contentTree/layerGroupContentTreeItem.js +2 -3
  325. package/src/contentTree/nodeContentTreeItem.d.ts +10 -0
  326. package/src/contentTree/nodeContentTreeItem.js +2 -2
  327. package/src/contentTree/obliqueCollectionContentTreeItem.d.ts +46 -0
  328. package/src/contentTree/obliqueCollectionContentTreeItem.js +3 -5
  329. package/src/contentTree/subContentTreeItem.d.ts +15 -0
  330. package/src/contentTree/subContentTreeItem.js +3 -3
  331. package/src/contentTree/vcsObjectContentTreeItem.d.ts +56 -0
  332. package/src/contentTree/vcsObjectContentTreeItem.js +3 -4
  333. package/src/contentTree/viewpointContentTreeItem.d.ts +46 -0
  334. package/src/contentTree/viewpointContentTreeItem.js +3 -4
  335. package/src/downloadHelper.d.ts +27 -0
  336. package/src/featureInfo/AddressBalloonComponent.vue.d.ts +2 -0
  337. package/src/featureInfo/BalloonComponent.vue +16 -3
  338. package/src/featureInfo/BalloonComponent.vue.d.ts +61 -0
  339. package/src/featureInfo/abstractFeatureInfoView.d.ts +199 -0
  340. package/src/featureInfo/abstractFeatureInfoView.js +82 -18
  341. package/src/featureInfo/addressBalloonFeatureInfoView.d.ts +67 -0
  342. package/src/featureInfo/addressBalloonFeatureInfoView.js +9 -2
  343. package/src/featureInfo/balloonFeatureInfoView.d.ts +49 -0
  344. package/src/featureInfo/balloonFeatureInfoView.js +12 -11
  345. package/src/featureInfo/balloonHelper.d.ts +31 -0
  346. package/src/featureInfo/balloonHelper.js +6 -6
  347. package/src/featureInfo/featureInfo.d.ts +146 -0
  348. package/src/featureInfo/featureInfo.js +11 -16
  349. package/src/featureInfo/featureInfoInteraction.d.ts +21 -0
  350. package/src/featureInfo/featureInfoInteraction.js +2 -2
  351. package/src/featureInfo/iframeFeatureInfoView.d.ts +48 -0
  352. package/src/featureInfo/iframeFeatureInfoView.js +3 -5
  353. package/src/featureInfo/tableFeatureInfoView.d.ts +75 -0
  354. package/src/featureInfo/tableFeatureInfoView.js +19 -9
  355. package/src/i18n/de.d.ts +353 -0
  356. package/src/i18n/de.js +114 -2
  357. package/src/i18n/en.d.ts +352 -0
  358. package/src/i18n/en.js +113 -1
  359. package/src/i18n/i18nCollection.d.ts +82 -0
  360. package/src/i18n/i18nCollection.js +3 -3
  361. package/src/init.d.ts +58 -0
  362. package/src/init.js +3 -5
  363. package/src/legend/StyleLegendItem.vue.d.ts +25 -0
  364. package/src/legend/VcsLegend.vue.d.ts +20 -0
  365. package/src/legend/legendHelper.d.ts +172 -0
  366. package/src/legend/legendHelper.js +21 -21
  367. package/src/manager/buttonManager.d.ts +106 -0
  368. package/src/manager/buttonManager.js +8 -4
  369. package/src/manager/collectionManager/CollectionComponent.vue +38 -38
  370. package/src/manager/collectionManager/CollectionComponent.vue.d.ts +17 -0
  371. package/src/manager/collectionManager/CollectionComponentList.vue +78 -24
  372. package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +38 -0
  373. package/src/manager/collectionManager/CollectionComponentProvider.vue +3 -2
  374. package/src/manager/collectionManager/CollectionComponentProvider.vue.d.ts +12 -0
  375. package/src/manager/collectionManager/CollectionManager.vue +29 -4
  376. package/src/manager/collectionManager/CollectionManager.vue.d.ts +8 -0
  377. package/src/manager/collectionManager/categoryManager.d.ts +56 -0
  378. package/src/manager/collectionManager/categoryManager.js +21 -7
  379. package/src/manager/collectionManager/collectionComponentClass.d.ts +257 -0
  380. package/src/manager/collectionManager/{collectionComponent.js → collectionComponentClass.js} +210 -57
  381. package/src/manager/collectionManager/collectionManager.d.ts +200 -0
  382. package/src/manager/collectionManager/collectionManager.js +45 -39
  383. package/src/manager/collectionManager/editorCollectionComponentClass.d.ts +60 -0
  384. package/src/manager/collectionManager/editorCollectionComponentClass.js +295 -0
  385. package/src/manager/contextMenu/ContextMenuComponent.vue.d.ts +18 -0
  386. package/src/manager/contextMenu/contextMenuInteraction.d.ts +24 -0
  387. package/src/manager/contextMenu/contextMenuManager.d.ts +70 -0
  388. package/src/manager/contextMenu/contextMenuManager.js +5 -5
  389. package/src/manager/navbarManager.d.ts +60 -0
  390. package/src/manager/navbarManager.js +10 -6
  391. package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +17 -0
  392. package/src/manager/toolbox/SelectToolboxComponent.vue +1 -0
  393. package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +15 -0
  394. package/src/manager/toolbox/ToolboxManager.vue +33 -7
  395. package/src/manager/toolbox/ToolboxManager.vue.d.ts +21 -0
  396. package/src/manager/toolbox/toolboxManager.d.ts +177 -0
  397. package/src/manager/toolbox/toolboxManager.js +86 -31
  398. package/src/manager/window/WindowComponent.vue.d.ts +40 -0
  399. package/src/manager/window/WindowComponentHeader.vue +1 -1
  400. package/src/manager/window/WindowComponentHeader.vue.d.ts +36 -0
  401. package/src/manager/window/WindowManager.vue +1 -0
  402. package/src/manager/window/WindowManager.vue.d.ts +19 -0
  403. package/src/manager/window/windowHelper.d.ts +134 -0
  404. package/src/manager/window/windowHelper.js +20 -20
  405. package/src/manager/window/windowManager.d.ts +422 -0
  406. package/src/manager/window/windowManager.js +95 -40
  407. package/src/navigation/MapNavCompass.vue.d.ts +25 -0
  408. package/src/navigation/MapNavigation.vue +2 -2
  409. package/src/navigation/MapNavigation.vue.d.ts +46 -0
  410. package/src/navigation/ObliqueRotation.vue +8 -4
  411. package/src/navigation/ObliqueRotation.vue.d.ts +14 -0
  412. package/src/navigation/OrientationToolsButton.vue.d.ts +30 -0
  413. package/src/navigation/TiltSlider.vue.d.ts +19 -0
  414. package/src/navigation/VcsCompass.vue.d.ts +25 -0
  415. package/src/navigation/VcsZoomButton.vue +6 -3
  416. package/src/navigation/VcsZoomButton.vue.d.ts +2 -0
  417. package/src/navigation/overviewMap.d.ts +199 -0
  418. package/src/navigation/overviewMap.js +3 -7
  419. package/src/navigation/overviewMapClickedInteraction.d.ts +21 -0
  420. package/src/notifier/NotifierComponent.vue.d.ts +10 -0
  421. package/src/notifier/notifier.d.ts +53 -0
  422. package/src/notifier/notifier.js +0 -1
  423. package/src/pluginHelper.d.ts +67 -0
  424. package/src/pluginHelper.js +11 -9
  425. package/src/search/ResultItem.vue.d.ts +25 -0
  426. package/src/search/ResultsComponent.vue +1 -1
  427. package/src/search/ResultsComponent.vue.d.ts +24 -0
  428. package/src/search/SearchComponent.vue +1 -1
  429. package/src/search/SearchComponent.vue.d.ts +10 -0
  430. package/src/search/search.d.ts +129 -0
  431. package/src/search/search.js +8 -11
  432. package/src/setup.d.ts +1 -0
  433. package/src/state.d.ts +57 -0
  434. package/src/state.js +7 -5
  435. package/src/uiConfig.d.ts +99 -0
  436. package/src/uiConfig.js +17 -7
  437. package/src/vcsUiApp.d.ts +301 -0
  438. package/src/vcsUiApp.js +57 -53
  439. package/src/vuePlugins/i18n.d.ts +10 -0
  440. package/src/vuePlugins/i18n.js +3 -3
  441. package/src/vuePlugins/vuetify.d.ts +27 -0
  442. package/tsconfig.json +36 -0
  443. package/dist/assets/index-f265c560.js +0 -1
  444. package/plugins/@vcmap-show-case/window-tester/src/toolboxData.js +0 -288
@@ -4,7 +4,7 @@
4
4
  <v-expansion-panels
5
5
  accordion
6
6
  multiple
7
- v-if="componentIds.length > 0"
7
+ v-if="!componentView && componentIds.length > 0"
8
8
  class="rounded-0"
9
9
  >
10
10
  <collection-component-provider
@@ -12,27 +12,79 @@
12
12
  :component-id="componentId"
13
13
  :key="componentId"
14
14
  >
15
- <collection-component-options />
15
+ <collection-component @openList="openList" />
16
+ <v-dialog v-model="optionsDialog" width="300">
17
+ <v-card class="pa-2">
18
+ <CollectionComponentOptions />
19
+ </v-card>
20
+ </v-dialog>
16
21
  </collection-component-provider>
17
22
  </v-expansion-panels>
23
+ <collection-component-provider
24
+ v-if="componentView"
25
+ :component-id="componentView"
26
+ >
27
+ <collection-component-list @closeList="closeList" />
28
+ <v-dialog v-model="optionsDialog" width="300">
29
+ <v-card class="pa-2">
30
+ <CollectionComponentOptions />
31
+ </v-card>
32
+ </v-dialog>
33
+ </collection-component-provider>
18
34
  </v-container>
19
35
  <div class="d-flex gap-2 px-2 pt-2 pb-1">
20
36
  <div class="d-flex gap-2 w-full justify-end">
21
- <VcsFormButton @click="newDialog = true" variant="filled"
37
+ <VcsFormButton @click="newCategory.dialog = true" variant="filled"
22
38
  >Request Category</VcsFormButton
23
39
  >
24
- <VcsFormButton @click="requestFoobar">Request Foobar</VcsFormButton>
25
40
  <VcsFormButton @click="clear">Clear</VcsFormButton>
26
41
  </div>
27
42
  </div>
28
- <v-dialog v-model="newDialog" width="200">
43
+ <v-dialog v-model="newItem.dialog" width="300">
44
+ <v-card class="pa-2">
45
+ <v-card-title>{{ newItem.categoryName }}</v-card-title>
46
+ <v-form @submit.prevent="addItem">
47
+ <vcs-text-area v-model="newItem.config" />
48
+ <vcs-form-button type="submit"> Add Item </vcs-form-button>
49
+ </v-form>
50
+ </v-card>
51
+ </v-dialog>
52
+ <v-dialog v-model="newCategory.dialog" width="200">
29
53
  <v-card class="pa-2">
30
54
  <v-form @submit.prevent="requestCategory">
31
55
  <VcsTextField
32
- v-model="categoryName"
33
- :rules="[(value) => value !== '' || 'Please provide a name!']"
56
+ v-model="newCategory.name"
57
+ placeholder="category name"
58
+ :rules="[
59
+ (value) => value !== '' || 'Please provide a name!',
60
+ hasCategory,
61
+ ]"
62
+ />
63
+ <VcsCheckbox
64
+ label="add Foobar items"
65
+ v-model="newCategory.addItems"
66
+ />
67
+ <VcsCheckbox
68
+ label="Add & UI Option actions"
69
+ v-model="newCategory.addActions"
34
70
  />
35
- <VcsFormButton type="submit"> Request </VcsFormButton>
71
+ <VcsCheckbox
72
+ label="Import & Export actions"
73
+ v-model="newCategory.addImportExport"
74
+ />
75
+ <VcsCheckbox
76
+ label="add Foobar Editor"
77
+ v-model="newCategory.addEditors"
78
+ />
79
+ <VcsCheckbox
80
+ label="selection based editors"
81
+ class="mx-2"
82
+ v-if="newCategory.addEditors"
83
+ v-model="newCategory.selectionBased"
84
+ />
85
+ <VcsFormButton type="submit" :disabled="!newCategory.name">
86
+ Request
87
+ </VcsFormButton>
36
88
  </v-form>
37
89
  </v-card>
38
90
  </v-dialog>
@@ -40,73 +92,85 @@
40
92
  </template>
41
93
 
42
94
  <script>
43
- import { inject, provide, ref } from 'vue';
95
+ import { inject, onUnmounted, provide, ref } from 'vue';
44
96
  import {
45
97
  VcsFormButton,
46
98
  VcsTextField,
99
+ VcsCheckbox,
47
100
  CollectionComponentProvider,
101
+ CollectionComponent,
102
+ CollectionComponentList,
103
+ VcsTextArea,
104
+ createListExportAction,
105
+ createListImportAction,
106
+ makeEditorCollectionComponentClass,
107
+ isEditorCollectionComponentClass,
48
108
  } from '@vcmap/ui';
49
109
  import {
50
110
  VContainer,
51
111
  VExpansionPanels,
52
112
  VCard,
113
+ VCardTitle,
53
114
  VForm,
54
115
  VDialog,
55
116
  } from 'vuetify/lib';
117
+ import { getObjectFromClassRegistry } from '@vcmap/core';
56
118
  import { name as owner } from '../package.json';
57
119
  import CollectionComponentOptions from './CollectionComponentOptions.vue';
120
+ import {
121
+ exportCategoryCallback,
122
+ importCategoryCallback,
123
+ } from './importExportHelper.js';
124
+ import FoobarEditor from './FoobarEditor.vue';
58
125
 
59
126
  const foobarMappingFunction = (item, c, listItem) => {
60
127
  listItem.title = item.name;
61
- listItem.actions = [{ name: 'foobar', callback: () => {} }];
128
+ listItem.actions.push({ name: 'foobar', callback: () => {} });
62
129
  };
63
130
 
64
131
  export default {
65
132
  name: 'CategoriesExample',
66
133
  components: {
134
+ VcsTextArea,
135
+ CollectionComponent,
136
+ CollectionComponentList,
67
137
  CollectionComponentProvider,
68
138
  CollectionComponentOptions,
69
139
  VcsFormButton,
70
140
  VcsTextField,
141
+ VcsCheckbox,
71
142
  VContainer,
72
143
  VExpansionPanels,
73
144
  VCard,
145
+ VCardTitle,
74
146
  VForm,
75
147
  VDialog,
76
148
  },
77
- setup() {
149
+ setup(props, { attrs }) {
78
150
  const app = inject('vcsApp');
79
151
  provide('collectionManager', app.categoryManager);
80
- const componentIds = ref(app.categoryManager.componentIds);
81
- const newDialog = ref(false);
82
- const categoryName = ref('');
152
+ const componentIds = ref([]);
153
+ const destroyFunctions = [];
83
154
 
84
- function requestCategory() {
85
- app.categoryManager.requestCategory(
86
- { name: categoryName.value },
87
- owner,
88
- );
89
- newDialog.value = false;
90
- }
155
+ const newCategory = ref({
156
+ dialog: false,
157
+ name: '',
158
+ addItems: false,
159
+ addActions: false,
160
+ addImportExport: false,
161
+ addEditors: false,
162
+ selectionBased: false,
163
+ });
91
164
 
92
- function clear() {
93
- app.categoryManager.clear();
94
- }
165
+ const newItem = ref({
166
+ dialog: false,
167
+ categoryName: undefined,
168
+ config: JSON.stringify({ name: 'newItem' }, null, 2),
169
+ });
95
170
 
96
- async function requestFoobar() {
97
- const { collectionComponent, category } =
98
- await app.categoryManager.requestCategory(
99
- {
100
- name: 'foobar',
101
- title: 'Foobar',
102
- },
103
- owner,
104
- {
105
- actions: [{ name: 'foobar', callback: () => {} }],
106
- draggable: true,
107
- },
108
- );
171
+ const optionsDialog = ref(false);
109
172
 
173
+ function addItems(collectionComponent, category) {
110
174
  app.categoryManager.addMappingFunction(
111
175
  () => true,
112
176
  foobarMappingFunction,
@@ -114,19 +178,224 @@
114
178
  [collectionComponent.id],
115
179
  );
116
180
  for (let i = 0; i <= 12; i++) {
117
- category.collection.add({
118
- name: `foobar-${i}`,
181
+ collectionComponent.collection.add({
182
+ name: `${category.name}-${i}`,
183
+ title: `${category.name}-${i}-title`,
184
+ random: Math.random(),
119
185
  });
120
186
  }
121
187
  }
122
188
 
189
+ function addActions(collectionComponent, category) {
190
+ collectionComponent.addActions([
191
+ {
192
+ action: {
193
+ name: 'add',
194
+ icon: '$vcsPlus',
195
+ callback() {
196
+ newItem.value.dialog = true;
197
+ newItem.value.categoryName = category.name;
198
+ },
199
+ },
200
+ owner,
201
+ },
202
+ {
203
+ action: {
204
+ name: 'Category Options',
205
+ callback() {
206
+ optionsDialog.value = true;
207
+ },
208
+ },
209
+ owner,
210
+ },
211
+ ]);
212
+ }
213
+
214
+ function addImportExportActions(collectionComponent, category) {
215
+ const { action: exportAction, destroy: exportDestroy } =
216
+ createListExportAction(
217
+ collectionComponent.selection,
218
+ () => exportCategoryCallback(app, collectionComponent, category),
219
+ owner,
220
+ );
221
+
222
+ const { action: importAction, destroy: importDestroy } =
223
+ createListImportAction(
224
+ (files) => importCategoryCallback(app, files),
225
+ app.windowManager,
226
+ owner,
227
+ attrs['window-state'].id,
228
+ );
229
+
230
+ destroyFunctions.push(exportDestroy, importDestroy);
231
+ collectionComponent.addActions([exportAction, importAction]);
232
+ }
233
+
234
+ function addEditors(collectionComponent, category, selectionBased) {
235
+ collectionComponent.selectable.value = true;
236
+
237
+ function getItemForListItem(listItem) {
238
+ return collectionComponent.collection.getByKey(listItem.name);
239
+ }
240
+
241
+ makeEditorCollectionComponentClass(
242
+ app,
243
+ collectionComponent,
244
+ {
245
+ editor: (item) => ({
246
+ component: FoobarEditor,
247
+ state: {
248
+ headerTitle: `${category.name} Editor`,
249
+ headerIcon: '$vcsEdit',
250
+ },
251
+ position: {
252
+ width: 300,
253
+ },
254
+ props: {
255
+ async getConfig() {
256
+ return (
257
+ collectionComponent.collection.getSerializedByKey?.(
258
+ item.name,
259
+ ) ?? collectionComponent.collection.getByKey(item.name)
260
+ );
261
+ },
262
+ setConfig(config) {
263
+ item.name = config.name ?? item.name;
264
+ item.title = config.title ?? item.title;
265
+ item.random = config.random ?? item.random;
266
+ },
267
+ },
268
+ }),
269
+ multiEditor: {
270
+ component: FoobarEditor,
271
+ state: {
272
+ headerTitle: `${category.name} Multi Editor`,
273
+ headerIcon: '$vcsPen',
274
+ },
275
+ position: {
276
+ width: 300,
277
+ },
278
+ props: {
279
+ multi: true,
280
+ selection: collectionComponent.selection,
281
+ getConfig() {
282
+ const selection =
283
+ collectionComponent.selection.value.map(getItemForListItem);
284
+ if (
285
+ selection.every((i) => i.random === selection[0].random)
286
+ ) {
287
+ return selection[0];
288
+ }
289
+ return { random: undefined };
290
+ },
291
+ setConfig(config) {
292
+ collectionComponent.selection.value
293
+ .map(getItemForListItem)
294
+ .forEach((i) => {
295
+ i.random = config.random ?? i.random;
296
+ });
297
+ },
298
+ },
299
+ },
300
+ selectionBased,
301
+ },
302
+ attrs['window-state'].id,
303
+ );
304
+ }
305
+
306
+ function clear() {
307
+ componentIds.value
308
+ .map((id) => app.categoryManager.get(id))
309
+ .forEach((c) => {
310
+ if (c[isEditorCollectionComponentClass]) {
311
+ c.closeEditorWindows();
312
+ c.closeMultiEditorWindow();
313
+ }
314
+ app.categoryManager.remove(c.id);
315
+ });
316
+ componentIds.value.splice(0);
317
+ }
318
+
319
+ onUnmounted(() => {
320
+ destroyFunctions.forEach((cb) => cb());
321
+ clear();
322
+ });
323
+
324
+ async function addItem() {
325
+ if (newItem.value.categoryName) {
326
+ const { category } = await app.categoryManager.requestCategory({
327
+ name: newItem.value.categoryName,
328
+ });
329
+ try {
330
+ const config = JSON.parse(newItem.value.config);
331
+ if (category.classRegistryName) {
332
+ category.collection.add(
333
+ getObjectFromClassRegistry(
334
+ app[category.classRegistryName],
335
+ config,
336
+ ),
337
+ );
338
+ } else {
339
+ category.collection.add(config);
340
+ }
341
+ } catch (e) {
342
+ // eslint-disable-next-line no-console
343
+ console.error('invalid JSON');
344
+ }
345
+ newItem.value.dialog = false;
346
+ newItem.value.categoryName = undefined;
347
+ newItem.value.config = JSON.stringify({ name: 'newItem' }, null, 2);
348
+ }
349
+ }
350
+
351
+ /**
352
+ * @type {import("vue").Ref<string|null>}
353
+ */
354
+ const componentView = ref(null);
355
+
123
356
  return {
124
357
  componentIds,
125
- categoryName,
126
- newDialog,
127
- requestCategory,
128
- requestFoobar,
358
+ newCategory,
359
+ newItem,
360
+ optionsDialog,
361
+ addItem,
362
+ async requestCategory() {
363
+ const { collectionComponent, category } =
364
+ await app.categoryManager.requestCategory(
365
+ { name: newCategory.value.name },
366
+ owner,
367
+ );
368
+ componentIds.value.push(collectionComponent.id);
369
+ if (newCategory.value.addItems) {
370
+ addItems(collectionComponent, category);
371
+ }
372
+ if (newCategory.value.addActions) {
373
+ addActions(collectionComponent, category);
374
+ }
375
+ if (newCategory.value.addImportExport) {
376
+ addImportExportActions(collectionComponent, category);
377
+ }
378
+ if (newCategory.value.addEditors) {
379
+ addEditors(
380
+ collectionComponent,
381
+ category,
382
+ newCategory.value.selectionBased,
383
+ );
384
+ }
385
+ newCategory.value.name = '';
386
+ newCategory.value.dialog = false;
387
+ },
129
388
  clear,
389
+ hasCategory(value) {
390
+ return !app.categoryManager.has(value) || 'Category already existing';
391
+ },
392
+ componentView,
393
+ openList(id) {
394
+ componentView.value = id;
395
+ },
396
+ closeList() {
397
+ componentView.value = null;
398
+ },
130
399
  };
131
400
  },
132
401
  };
@@ -1,209 +1,75 @@
1
1
  <template>
2
- <div>
3
- <v-expansion-panel @change="active = !active">
4
- <v-expansion-panel-header hide-actions class="px-2">
5
- <template #default="{ open }">
6
- <div class="d-flex justify-space-between">
7
- <div class="d-flex align-center">
8
- <v-icon class="mr-1" :class="{ rotate: !open }">
9
- mdi-chevron-down
10
- </v-icon>
11
- {{ $t(title) }}
12
- </div>
13
- <VcsActionButtonList
14
- v-if="actions?.length > 0"
15
- :actions="actions"
16
- />
17
- </div>
18
- </template>
19
- </v-expansion-panel-header>
20
- <v-expansion-panel-content class="pb-1">
21
- <v-container class="py-0 px-2">
22
- <v-row no-gutters>
23
- <v-col>
24
- <VcsLabel html-for="title" dense>
25
- {{ $t('categoryTester.title') }}
26
- </VcsLabel>
27
- </v-col>
28
- <v-col>
29
- <VcsTextField id="title" clearable dense v-model="title" />
30
- </v-col>
31
- </v-row>
32
- <v-row no-gutters>
33
- <v-col>
34
- <VcsLabel html-for="draggable" dense>
35
- {{ $t('categoryTester.draggable') }}
36
- </VcsLabel>
37
- </v-col>
38
- <v-col>
39
- <VcsCheckbox id="draggable" dense v-model="draggable" />
40
- </v-col>
41
- </v-row>
42
- <v-row no-gutters>
43
- <v-col>
44
- <VcsLabel html-for="selectable" dense>
45
- {{ $t('categoryTester.selectable') }}
46
- </VcsLabel>
47
- </v-col>
48
- <v-col>
49
- <VcsCheckbox id="selectable" dense v-model="selectable" />
50
- </v-col>
51
- </v-row>
52
- <v-row no-gutters>
53
- <v-col>
54
- <VcsLabel html-for="singleSelect" dense>
55
- {{ $t('categoryTester.singleSelect') }}
56
- </VcsLabel>
57
- </v-col>
58
- <v-col>
59
- <VcsCheckbox id="singleSelect" dense v-model="singleSelect" />
60
- </v-col>
61
- </v-row>
62
- </v-container>
63
- </v-expansion-panel-content>
64
- </v-expansion-panel>
65
- <v-dialog v-model="dialog" width="300">
66
- <v-card class="pa-2">
67
- <v-form @submit.prevent="addItem">
68
- <vcs-text-area v-model="jsonString" />
69
- <vcs-form-button type="submit"> Add </vcs-form-button>
70
- </v-form>
71
- </v-card>
72
- </v-dialog>
73
- </div>
2
+ <v-container class="py-0 px-2">
3
+ <v-row no-gutters>
4
+ <v-col>
5
+ <VcsLabel html-for="title" dense>
6
+ {{ $t('categoryTester.title') }}
7
+ </VcsLabel>
8
+ </v-col>
9
+ <v-col>
10
+ <VcsTextField id="title" clearable dense v-model="title" />
11
+ </v-col>
12
+ </v-row>
13
+ <v-row no-gutters v-for="key in keys" :key="key">
14
+ <v-col>
15
+ <VcsLabel :html-for="key" dense>
16
+ {{ $t(`categoryTester.${key}`) }}
17
+ </VcsLabel>
18
+ </v-col>
19
+ <v-col>
20
+ <VcsCheckbox :id="key" dense v-model="getComputed(key).value" />
21
+ </v-col>
22
+ </v-row>
23
+ </v-container>
74
24
  </template>
75
25
 
76
26
  <script>
77
- import { inject, ref } from 'vue';
78
- import {
79
- VExpansionPanel,
80
- VExpansionPanelHeader,
81
- VExpansionPanelContent,
82
- VIcon,
83
- VContainer,
84
- VRow,
85
- VCol,
86
- VDialog,
87
- VCard,
88
- VForm,
89
- } from 'vuetify/lib';
90
- import {
91
- VcsCheckbox,
92
- VcsLabel,
93
- VcsTextField,
94
- VcsTextArea,
95
- VcsActionButtonList,
96
- VcsFormButton,
97
- downloadText,
98
- } from '@vcmap/ui';
99
- import { getObjectFromClassRegistry } from '@vcmap/core';
27
+ import { computed, inject, isRef } from 'vue';
28
+ import { VContainer, VRow, VCol } from 'vuetify/lib';
29
+ import { VcsCheckbox, VcsLabel, VcsTextField } from '@vcmap/ui';
100
30
 
101
31
  /**
102
32
  * Shows CollectionComponentOptions of a provided collectionComponent
103
33
  */
104
34
  export default {
105
- name: 'CollectionComponent',
35
+ name: 'CollectionComponentOptions',
106
36
  components: {
107
- VcsFormButton,
108
- VcsActionButtonList,
109
37
  VcsCheckbox,
110
38
  VcsLabel,
111
39
  VcsTextField,
112
- VcsTextArea,
113
- VExpansionPanel,
114
- VExpansionPanelHeader,
115
- VExpansionPanelContent,
116
- VIcon,
117
40
  VContainer,
118
41
  VRow,
119
42
  VCol,
120
- VDialog,
121
- VCard,
122
- VForm,
123
43
  },
124
44
  setup() {
125
- const app = inject('vcsApp');
126
- /**
127
- * @type {CollectionComponent}
128
- */
129
45
  const collectionComponent = inject('collectionComponent');
130
- const category = app.categories.getByKey(collectionComponent.id);
131
- const active = ref(false);
132
- const dialog = ref(false);
133
- const jsonString = ref(JSON.stringify({ name: 'newItem' }, null, 2));
134
-
135
- async function addItem() {
136
- try {
137
- const config = JSON.parse(jsonString.value);
138
- if (category.classRegistryName) {
139
- category.collection.add(
140
- getObjectFromClassRegistry(
141
- app[category.classRegistryName],
142
- config,
143
- ),
144
- );
145
- } else {
146
- category.collection.add(config);
147
- }
148
- jsonString.value = JSON.stringify({ name: 'newItem' }, null, 2);
149
- } catch (e) {
150
- // eslint-disable-next-line no-console
151
- console.error('invalid JSON');
152
- }
153
- dialog.value = false;
154
- }
155
-
156
- function download() {
157
- const stringObject = JSON.stringify(
158
- category.serializeModule(app.dynamicModuleId),
159
- null,
160
- 2,
161
- );
162
- downloadText(stringObject, `${category.name}.json`);
163
- }
164
-
165
- const actions = [
166
- {
167
- name: 'add',
168
- icon: '$vcsPlus',
169
- callback() {
170
- dialog.value = true;
171
- },
172
- },
173
- {
174
- name: 'download',
175
- icon: 'mdi-download',
176
- callback: download,
177
- },
178
- ];
179
46
 
180
47
  return {
181
48
  title: collectionComponent.title,
182
- draggable: collectionComponent.draggable,
183
- selectable: collectionComponent.selectable,
184
- singleSelect: collectionComponent.singleSelect,
185
- active,
186
- dialog,
187
- jsonString,
188
- actions,
189
- addItem,
49
+ keys: [
50
+ 'draggable',
51
+ 'selectable',
52
+ 'singleSelect',
53
+ 'renamable',
54
+ 'removable',
55
+ ],
56
+ getComputed(key) {
57
+ return computed({
58
+ get() {
59
+ return collectionComponent[key];
60
+ },
61
+ set(value) {
62
+ if (isRef(collectionComponent[key])) {
63
+ collectionComponent[key].value = value;
64
+ } else {
65
+ collectionComponent[key] = value;
66
+ }
67
+ },
68
+ });
69
+ },
190
70
  };
191
71
  },
192
72
  };
193
73
  </script>
194
74
 
195
- <style lang="scss" scoped>
196
- .rotate {
197
- transform: rotate(-90deg);
198
- }
199
- .v-icon {
200
- font-size: 16px;
201
- }
202
- ::v-deep {
203
- .v-list {
204
- .v-list-item {
205
- padding: 4px 8px 4px 28px;
206
- }
207
- }
208
- }
209
- </style>
75
+ <style lang="scss" scoped></style>