@vcmap/ui 5.0.0-rc.24 → 5.0.0-rc.26

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 (215) hide show
  1. package/build/build.js +132 -14
  2. package/build/buildHelpers.js +196 -92
  3. package/build/bundle.js +56 -0
  4. package/build/commonViteConfig.js +2 -2
  5. package/config/base.config.json +29 -2
  6. package/config/dev.config.json +29 -1
  7. package/config/www.config.json +81 -39
  8. package/dist/assets/@mdi/font/LICENSE +20 -0
  9. package/dist/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
  10. package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +3 -0
  11. package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  12. package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-85d9e53a.js → AxisAlignedBoundingBox-4140c51f.js} +1 -1
  13. package/dist/assets/cesium/Workers/{BoundingRectangle-1ee7eb47.js → BoundingRectangle-c714b156.js} +1 -1
  14. package/dist/assets/cesium/Workers/{BoxGeometry-3b2be784.js → BoxGeometry-6f3da43d.js} +1 -1
  15. package/dist/assets/cesium/Workers/{Color-f107c84d.js → Color-8a565ff2.js} +5 -5
  16. package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-78d71993.js → CoplanarPolygonGeometryLibrary-4b4d4096.js} +1 -1
  17. package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-50d99b33.js → CorridorGeometryLibrary-7b94502b.js} +1 -1
  18. package/dist/assets/cesium/Workers/{CylinderGeometry-51b0d9bf.js → CylinderGeometry-ca070b87.js} +1 -1
  19. package/dist/assets/cesium/Workers/{EllipseGeometry-bcfb5d87.js → EllipseGeometry-122e51fa.js} +1 -1
  20. package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-e94f8472.js → EllipseGeometryLibrary-4d326efc.js} +1 -1
  21. package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-28e3a1bb.js → EllipseOutlineGeometry-16cc2bd7.js} +1 -1
  22. package/dist/assets/cesium/Workers/{EllipsoidGeometry-b222fa63.js → EllipsoidGeometry-cb148ca2.js} +1 -1
  23. package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-38a3fb5b.js → EllipsoidOutlineGeometry-0fa10c79.js} +1 -1
  24. package/dist/assets/cesium/Workers/{EllipsoidTangentPlane-8c89f28c.js → EllipsoidTangentPlane-6dd1b7af.js} +1 -1
  25. package/dist/assets/cesium/Workers/{FrustumGeometry-bdd3a04d.js → FrustumGeometry-ee73037c.js} +1 -1
  26. package/dist/assets/cesium/Workers/{GeometryAttribute-153115c5.js → GeometryAttribute-ff5b4fb1.js} +1 -1
  27. package/dist/assets/cesium/Workers/{GeometryPipeline-acb2399c.js → GeometryPipeline-1f8fbf05.js} +1 -1
  28. package/dist/assets/cesium/Workers/{IntersectionTests-271e513e.js → IntersectionTests-70d39ba9.js} +1 -1
  29. package/dist/assets/cesium/Workers/{OrientedBoundingBox-5e04e31f.js → OrientedBoundingBox-159cf1d6.js} +1 -1
  30. package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-6762b65b.js → PolygonGeometryLibrary-076a5d25.js} +1 -1
  31. package/dist/assets/cesium/Workers/{PolygonPipeline-7dc7a431.js → PolygonPipeline-b9f2810a.js} +1 -1
  32. package/dist/assets/cesium/Workers/{PolylinePipeline-15fde655.js → PolylinePipeline-639192e0.js} +1 -1
  33. package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-ba7dfed5.js → PolylineVolumeGeometryLibrary-b73549fb.js} +1 -1
  34. package/dist/assets/cesium/Workers/{PrimitivePipeline-68f0b9a2.js → PrimitivePipeline-10ede1b6.js} +1 -1
  35. package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-8eaf23da.js → RectangleGeometryLibrary-c35a7356.js} +1 -1
  36. package/dist/assets/cesium/Workers/{TerrainEncoding-eb8a645a.js → TerrainEncoding-668d242f.js} +1 -1
  37. package/dist/assets/cesium/Workers/{Transforms-f6451f99.js → Transforms-a2a85221.js} +14 -0
  38. package/dist/assets/cesium/Workers/{WallGeometryLibrary-feef3109.js → WallGeometryLibrary-1938bf0d.js} +1 -1
  39. package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
  40. package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
  41. package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
  42. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
  43. package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
  44. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
  45. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
  46. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
  47. package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
  48. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
  49. package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
  50. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
  51. package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
  52. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
  53. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
  54. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
  55. package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
  56. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
  57. package/dist/assets/cesium/Workers/createGeometry.js +1 -1
  58. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
  59. package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
  60. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
  61. package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
  62. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
  63. package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
  64. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
  65. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
  66. package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
  67. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
  68. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
  69. package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
  70. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
  71. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
  72. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
  73. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  74. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
  75. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
  76. package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
  77. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
  78. package/dist/assets/cesium/Workers/package.js +1 -1
  79. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
  80. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
  81. package/dist/assets/{cesium.253914.js → cesium.305b7c.js} +58656 -33170
  82. package/dist/assets/cesium.js +1 -1
  83. package/dist/assets/core.f3d6d4.js +19060 -0
  84. package/dist/assets/core.js +1 -1
  85. package/dist/assets/index-f94d5be3.js +1 -0
  86. package/dist/assets/{ol.1c946a.js → ol.39cc05.js} +27344 -12118
  87. package/dist/assets/ol.js +1 -1
  88. package/dist/assets/ui.74022f.css +5 -0
  89. package/dist/assets/ui.74022f.js +13466 -0
  90. package/dist/assets/ui.js +1 -1
  91. package/dist/assets/{vue.c1ece7.js → vue.9b8c6e.js} +834 -598
  92. package/dist/assets/vue.js +2 -2
  93. package/dist/assets/{vuetify.6efa21.css → vuetify.30486f.css} +1 -1
  94. package/dist/assets/{vuetify.6efa21.js → vuetify.30486f.js} +343 -103
  95. package/dist/assets/vuetify.js +2 -2
  96. package/dist/index.html +7 -6
  97. package/index.html +14 -6
  98. package/index.js +19 -2
  99. package/lib/olLib.js +19 -16
  100. package/package.json +15 -14
  101. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -2
  102. package/plugins/@vcmap/simple-graph/index.js +1 -1
  103. package/plugins/@vcmap-show-case/README.md +2 -1
  104. package/plugins/@vcmap-show-case/buttons-example/ButtonsExample.vue +55 -79
  105. package/plugins/@vcmap-show-case/category-tester/CategoriesExample.vue +135 -0
  106. package/plugins/@vcmap-show-case/category-tester/CollectionComponentOptions.vue +209 -0
  107. package/plugins/@vcmap-show-case/category-tester/index.js +19 -1
  108. package/plugins/@vcmap-show-case/collection-manager-example/CollectionManagerExample.vue +182 -0
  109. package/plugins/@vcmap-show-case/collection-manager-example/README.md +3 -0
  110. package/plugins/@vcmap-show-case/collection-manager-example/index.js +74 -0
  111. package/plugins/@vcmap-show-case/collection-manager-example/package.json +5 -0
  112. package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +20 -3
  113. package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +21 -0
  114. package/plugins/@vcmap-show-case/switch-map-callback-example/SwitchMapCallback.js +47 -0
  115. package/plugins/@vcmap-show-case/switch-map-callback-example/config.json +3 -0
  116. package/plugins/@vcmap-show-case/switch-map-callback-example/index.js +34 -0
  117. package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +5 -0
  118. package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +0 -1
  119. package/plugins/package.json +3 -1
  120. package/public/assets/@mdi/font/LICENSE +20 -0
  121. package/public/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
  122. package/public/assets/@mdi/font/css/materialdesignicons.min.css +3 -0
  123. package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  124. package/public/assets/favicon-128.png +0 -0
  125. package/public/assets/favicon-180.png +0 -0
  126. package/public/assets/favicon-192.png +0 -0
  127. package/public/assets/favicon-32.png +0 -0
  128. package/src/application/VcsApp.vue +38 -8
  129. package/src/application/VcsAttributions.vue +20 -5
  130. package/src/application/VcsAttributionsFooter.vue +0 -1
  131. package/src/application/VcsNavbar.vue +29 -22
  132. package/src/callback/activateLayersCallback.js +54 -0
  133. package/src/callback/applyLayerStyleCallback.js +63 -0
  134. package/src/callback/deactivateLayersCallback.js +54 -0
  135. package/src/callback/goToViewpointCallback.js +54 -0
  136. package/src/callback/vcsCallback.js +66 -0
  137. package/src/components/buttons/VcsActionButtonList.vue +28 -10
  138. package/src/components/buttons/VcsButton.vue +38 -100
  139. package/src/components/buttons/VcsFormButton.vue +6 -4
  140. package/src/components/buttons/VcsToolButton.vue +161 -0
  141. package/src/components/form-inputs-controls/VcsDatePicker.vue +19 -5
  142. package/src/components/form-inputs-controls/VcsFormSection.vue +0 -1
  143. package/src/components/form-inputs-controls/VcsSelect.vue +16 -2
  144. package/src/components/form-inputs-controls/VcsSlider.vue +72 -0
  145. package/src/components/form-inputs-controls/VcsTextField.vue +24 -13
  146. package/src/components/form-inputs-controls/VcsWizard.vue +13 -14
  147. package/src/components/form-inputs-controls/VcsWizardStep.vue +0 -1
  148. package/src/components/lists/VcsList.vue +3 -2
  149. package/src/components/lists/VcsTreeviewLeaf.vue +0 -1
  150. package/src/components/tables/VcsDataTable.vue +5 -5
  151. package/src/components/tables/VcsTable.vue +1 -1
  152. package/src/contentTree/LayerTree.vue +15 -9
  153. package/src/contentTree/contentTreeCollection.js +1 -1
  154. package/src/contentTree/contentTreeItem.js +22 -3
  155. package/src/contentTree/groupContentTreeItem.js +1 -0
  156. package/src/contentTree/layerContentTreeItem.js +4 -14
  157. package/src/contentTree/layerGroupContentTreeItem.js +4 -14
  158. package/src/contentTree/obliqueCollectionContentTreeItem.js +4 -0
  159. package/src/contentTree/viewpointContentTreeItem.js +1 -0
  160. package/src/featureInfo/BalloonComponent.vue +0 -1
  161. package/src/featureInfo/abstractFeatureInfoView.js +16 -1
  162. package/src/featureInfo/featureInfo.js +45 -56
  163. package/src/i18n/de.js +5 -2
  164. package/src/i18n/en.js +5 -2
  165. package/src/i18n/i18nCollection.js +1 -2
  166. package/src/init.js +1 -4
  167. package/src/legend/vcsLegend.vue +1 -1
  168. package/src/manager/buttonManager.js +15 -0
  169. package/src/manager/{categoryManager/CategoryComponent.vue → collectionManager/CollectionComponent.vue} +57 -66
  170. package/src/manager/collectionManager/CollectionComponentList.vue +62 -0
  171. package/src/manager/collectionManager/CollectionComponentProvider.vue +38 -0
  172. package/src/manager/collectionManager/CollectionManager.vue +43 -0
  173. package/src/manager/collectionManager/categoryManager.js +83 -0
  174. package/src/manager/collectionManager/collectionComponent.js +453 -0
  175. package/src/manager/collectionManager/collectionManager.js +432 -0
  176. package/src/manager/navbarManager.js +5 -4
  177. package/src/manager/toolbox/GroupToolboxComponent.vue +5 -7
  178. package/src/manager/toolbox/SelectToolboxComponent.vue +6 -9
  179. package/src/manager/toolbox/ToolboxManager.vue +4 -5
  180. package/src/manager/window/WindowComponentHeader.vue +0 -4
  181. package/src/manager/window/WindowManager.vue +22 -5
  182. package/src/navigation/mapNavigation.vue +34 -8
  183. package/src/navigation/overviewMap.js +7 -1
  184. package/src/notifier/notifierComponent.vue +0 -1
  185. package/src/pluginHelper.js +5 -0
  186. package/src/search/resultItem.vue +0 -1
  187. package/src/search/searchComponent.vue +7 -9
  188. package/src/styles/_theming.scss +0 -16
  189. package/src/styles/_typography.scss +2 -2
  190. package/src/styles/main.scss +8 -0
  191. package/src/styles/vcsFont.scss +1 -22
  192. package/src/vcsUiApp.js +76 -12
  193. package/src/vuePlugins/i18n.js +18 -19
  194. package/src/vuePlugins/vuetify.js +0 -1
  195. package/dist/assets/core.3a8205.js +0 -18426
  196. package/dist/assets/index.91ae2d55.js +0 -1
  197. package/dist/assets/ui.0025be.css +0 -5
  198. package/dist/assets/ui.0025be.js +0 -18534
  199. package/plugins/@vcmap-show-case/category-tester/Categories.vue +0 -291
  200. package/plugins/@vcmap-show-case/category-tester/Category.vue +0 -164
  201. package/src/manager/categoryManager/CategoryComponentList.vue +0 -82
  202. package/src/manager/categoryManager/CategoryManager.vue +0 -47
  203. package/src/manager/categoryManager/categoryManager.js +0 -633
  204. package/start.js +0 -9
  205. /package/{src/assets/favicon-128.png → dist/assets/favicon-128.4c4ce5.png} +0 -0
  206. /package/{src/assets/favicon-180.png → dist/assets/favicon-180.5b99c0.png} +0 -0
  207. /package/{src/assets/favicon-192.png → dist/assets/favicon-192.0e205e.png} +0 -0
  208. /package/{src/assets/favicon-32.png → dist/assets/favicon-32.6b9add.png} +0 -0
  209. /package/dist/assets/{favicon.decf54cc.svg → favicon.d5ec97.svg} +0 -0
  210. /package/dist/assets/font/{TitilliumWeb-Regular.woff2 → TitilliumWeb-Regular.9ca076.woff2} +0 -0
  211. /package/{src → public}/assets/favicon.svg +0 -0
  212. /package/{src → public}/assets/font/OFL.txt +0 -0
  213. /package/{src → public}/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  214. /package/src/{assets/logo-mobile.svg → logo-mobile.svg} +0 -0
  215. /package/src/{assets/logo.svg → logo.svg} +0 -0
@@ -1,14 +1,16 @@
1
1
  <template>
2
2
  <div v-if="actions.length > 0" :class="classes">
3
- <VcsButton
3
+ <component
4
+ :is="button"
4
5
  class="d-flex"
5
- v-for="(button, index) in buttons"
6
- :key="`${button.name}-${index}`"
7
- :tooltip="button.title"
8
- :icon="button.icon"
9
- :active="button.active"
10
- :disabled="button.disabled"
11
- @click.stop="button.callback($event)"
6
+ v-for="(btn, index) in buttons"
7
+ :key="`${btn.name}-${index}`"
8
+ :tooltip="btn.title"
9
+ :icon="btn.icon"
10
+ :active="btn.active"
11
+ :disabled="btn.disabled"
12
+ :background="btn.background"
13
+ @click.stop="btn.callback($event)"
12
14
  v-bind="{ ...$attrs }"
13
15
  v-on="{ ...$listeners }"
14
16
  />
@@ -20,9 +22,14 @@
20
22
  offset-x
21
23
  >
22
24
  <template #activator="{ on, attrs }">
23
- <VcsButton v-bind="{ ...$attrs, ...attrs }" v-on="on" class="d-flex">
25
+ <component
26
+ :is="button"
27
+ v-bind="{ ...$attrs, ...attrs }"
28
+ v-on="on"
29
+ class="d-flex"
30
+ >
24
31
  <v-icon>{{ overflowIcon }}</v-icon>
25
- </VcsButton>
32
+ </component>
26
33
  </template>
27
34
  <VcsActionList :actions="overflowButtons" />
28
35
  </v-menu>
@@ -40,6 +47,8 @@
40
47
  <script>
41
48
  import { VIcon, VMenu, VSpacer } from 'vuetify/lib';
42
49
  import VcsButton from './VcsButton.vue';
50
+ import VcsToolButton from './VcsToolButton.vue';
51
+ import VcsFormButton from './VcsFormButton.vue';
43
52
  import VcsActionList, { validateActions } from '../lists/VcsActionList.vue';
44
53
 
45
54
  /**
@@ -47,6 +56,7 @@
47
56
  * A component rendering a list of actions with overflow mechanic using
48
57
  * {@link VcsButton} and {@link VcsActionList}.
49
58
  * @vue-prop {Array<VcsAction>} actions - Array of actions
59
+ * @vue-prop {string} [button='VcsButton'] - used button type (one of 'VcsButton', 'VcsToolButton' or 'VcsFormButton)
50
60
  * @vue-prop {number} [overflowCount=2] - number of buttons rendered until overflow.
51
61
  * @vue-prop {string} [overflowIcon='$vcsKebab'] - optional custom icon for overflow button
52
62
  * @vue-prop {boolean} [blockOverflow=false] - if space for the overflow should be blocked or not (e.g. when rendering lists in a grid)
@@ -58,6 +68,8 @@
58
68
  components: {
59
69
  VcsActionList,
60
70
  VcsButton,
71
+ VcsToolButton,
72
+ VcsFormButton,
61
73
  VMenu,
62
74
  VIcon,
63
75
  VSpacer,
@@ -68,6 +80,12 @@
68
80
  required: true,
69
81
  validator: validateActions,
70
82
  },
83
+ button: {
84
+ type: String,
85
+ default: 'VcsButton',
86
+ validator: (type) =>
87
+ ['VcsButton', 'VcsToolButton', 'VcsFormButton'].includes(type),
88
+ },
71
89
  overflowCount: {
72
90
  type: Number,
73
91
  default: 2,
@@ -1,17 +1,34 @@
1
1
  <template>
2
2
  <div class="vcs-button-wrap">
3
+ <v-btn
4
+ v-if="!tooltip"
5
+ text
6
+ :color="appliedColor"
7
+ :disabled="disabled"
8
+ class="vcs-button pa-0"
9
+ :ripple="false"
10
+ elevation="0"
11
+ v-bind="{ ...$attrs }"
12
+ v-on="{ ...$listeners }"
13
+ >
14
+ <v-icon v-if="icon" :class="{ 'mr-2': hasDefaultSlot }">
15
+ {{ icon }}
16
+ </v-icon>
17
+ <slot />
18
+ </v-btn>
3
19
  <VcsTooltip
20
+ v-else
4
21
  :tooltip="tooltip"
5
22
  :tooltip-position="tooltipPosition"
6
23
  v-bind="{ ...tooltipProps }"
7
24
  >
8
25
  <template #activator="{ on, attrs }">
9
26
  <v-btn
10
- :color="backgroundColor"
11
- :text="isTextButton"
12
- :outlined="isOutlined"
13
- :class="classes"
14
- :ripple="!isSmall ? { class: 'primary--text text--darken-4' } : false"
27
+ text
28
+ :color="appliedColor"
29
+ :disabled="disabled"
30
+ class="vcs-button pa-0"
31
+ :ripple="false"
15
32
  elevation="0"
16
33
  v-bind="{ ...$attrs, ...attrs }"
17
34
  v-on="{ ...$listeners, ...on }"
@@ -37,56 +54,19 @@
37
54
  right: -3px;
38
55
  }
39
56
  .v-btn {
40
- &--outlined {
41
- border: thin solid currentColor;
42
- }
43
57
  &.vcs-button {
44
- &--standard {
45
- min-width: 48px;
46
- height: 32px;
47
- font-size: 12px;
48
- border: 1px solid transparent;
49
- &:hover {
50
- color: var(--v-base-lighten5) !important;
51
- border-color: var(--v-primary-base);
52
- background-color: var(--v-primary-base);
53
- }
54
- }
55
-
56
- &--small {
57
- height: 16px;
58
- min-width: auto;
59
- &:hover {
60
- color: var(--v-primary-base);
61
- }
62
- &::before {
63
- display: none; /*prevents unwanted mouseover effect*/
64
- }
65
- ::v-deep {
66
- .v-icon {
67
- font-size: 16px;
68
- }
69
-
70
- .v-icon__component {
71
- height: 16px;
72
- width: 16px;
73
- }
74
- }
58
+ height: 16px;
59
+ min-width: auto;
60
+ &:hover {
61
+ color: var(--v-primary-lighten1) !important;
75
62
  }
76
-
77
- &--large {
78
- min-width: 42px;
79
- height: 34px;
80
- padding: 0;
81
- position: relative;
82
-
83
- &.vcs-button--active-background {
84
- border: 2px solid var(--v-primary-base);
85
- background-color: var(--v-base-lighten2) !important;
63
+ ::v-deep {
64
+ .v-icon {
65
+ font-size: 16px;
86
66
  }
87
-
88
- &.v-btn--disabled {
89
- background-color: transparent !important;
67
+ .v-icon__component {
68
+ height: 16px;
69
+ width: 16px;
90
70
  }
91
71
  }
92
72
  }
@@ -100,22 +80,16 @@
100
80
 
101
81
  /**
102
82
  * @description a button with tooltip extending {@link https://vuetifyjs.com/en/api/v-btn/|vuetify v-btn} using {@link VcsTooltip}.
103
- * @vue-prop {boolean} active - Whether button has background color. Applies vuetify primary color if color property is not set.
83
+ * @vue-prop {boolean} active - State of the button. Applies set color or vuetify primary color in active state.
104
84
  * @vue-prop {string} color - Passes property to v-btn in case prop active is true.
105
- * @vue-prop {boolean} background - When applied with active the button shows an active-background state implying that a tool is active, but running in background, e.g. windowComponent closed.
85
+ * @vue-prop {boolean} disabled
106
86
  * @vue-prop {boolean} hasUpdate - Whether the button shows a badge in the top right.
107
87
  * @vue-prop {string} icon - When given, will display an icon in the button. Replaces vuetify icon property.
108
88
  * @vue-prop {string} tooltip - Text content of a tooltip which appears on hover with default delay.
109
89
  * @vue-prop {('bottom' | 'left' | 'top' | 'right')} tooltipPosition - Position of the tooltip.
110
90
  * @vue-prop {Object<string, any>} tooltipProps - Properties to be passed to VcsTooltip {@link https://vuetifyjs.com/en/api/v-tooltip/#props|vuetify v-tooltip}
111
- * @vue-computed {string} backgroundColor - color applied to button, depending on size and state
112
- * @vue-computed {Object<string, string>} classes - css classes applied to button, depending on size and state
91
+ * @vue-computed {string} appliedColor - color applied to button, depending on active state
113
92
  * @vue-computed {boolean} hasDefaultSlot
114
- * @vue-computed {boolean} isSmall - button size is small
115
- * @vue-computed {boolean} isStandard - button size standard
116
- * @vue-computed {boolean} isLarge - button size is large
117
- * @vue-computed {boolean} isOutlined - button is outlined
118
- * @vue-computed {boolean} isTextButton - button is text
119
93
  * @vue-event {MouseEvent} click - Emits click event when the button is clicked.
120
94
  */
121
95
  export default {
@@ -136,7 +110,7 @@
136
110
  type: String,
137
111
  default: undefined,
138
112
  },
139
- background: {
113
+ disabled: {
140
114
  type: Boolean,
141
115
  default: false,
142
116
  },
@@ -162,52 +136,16 @@
162
136
  },
163
137
  },
164
138
  computed: {
165
- backgroundColor() {
166
- if (this.isStandard && !this.active) {
167
- return this.color;
168
- } else if (this.active) {
139
+ appliedColor() {
140
+ if (this.active) {
169
141
  return this.color ? this.color : 'primary';
170
142
  } else {
171
143
  return null;
172
144
  }
173
145
  },
174
- classes() {
175
- return {
176
- 'vcs-button--small': this.isSmall,
177
- 'pa-0': this.isSmall,
178
- 'vcs-button--standard': this.isStandard,
179
- padding: this.isStandard,
180
- 'font-weight-bold': this.isStandard,
181
- 'text-capitalize': this.isStandard,
182
- 'vcs-button--large': this.isLarge,
183
- 'vcs-button--active-background':
184
- this.active && this.background && !this.$attrs.disabled,
185
- };
186
- },
187
146
  hasDefaultSlot() {
188
147
  return !!this.$slots?.default?.[0]?.text?.trim();
189
148
  },
190
- isSmall() {
191
- return this.$attrs.small != null;
192
- },
193
- isStandard() {
194
- return !(this.isSmall || this.isLarge);
195
- },
196
- isLarge() {
197
- return this.$attrs.large != null;
198
- },
199
- isOutlined() {
200
- if (this.isStandard) {
201
- return this.active || this.background;
202
- }
203
- return false;
204
- },
205
- isTextButton() {
206
- if (this.isSmall) {
207
- return true;
208
- }
209
- return !this.active ? true : null;
210
- },
211
149
  },
212
150
  };
213
151
  </script>
@@ -80,10 +80,12 @@
80
80
  border: thin solid currentColor;
81
81
  &:hover {
82
82
  border-color: var(--v-primary-lighten1) !important;
83
- &::before {
84
- background-color: var(--v-primary-lighten4) !important;
85
- opacity: 1;
86
- }
83
+ }
84
+ &.theme--light:hover::before {
85
+ opacity: 0.16;
86
+ }
87
+ &.theme--dark:hover::before {
88
+ opacity: 0.32;
87
89
  }
88
90
  }
89
91
 
@@ -0,0 +1,161 @@
1
+ <template>
2
+ <div class="vcs-button-wrap">
3
+ <v-btn
4
+ v-if="!tooltip"
5
+ :color="appliedColor"
6
+ :text="isTextButton"
7
+ class="vcs-tool-button"
8
+ :class="classes"
9
+ :ripple="{ class: 'primary--text text--darken-4' }"
10
+ elevation="0"
11
+ v-bind="{ ...$attrs }"
12
+ v-on="{ ...$listeners }"
13
+ >
14
+ <v-icon v-if="icon" :class="{ 'mr-2': hasDefaultSlot }">
15
+ {{ icon }}
16
+ </v-icon>
17
+ <slot />
18
+ </v-btn>
19
+ <VcsTooltip
20
+ v-else
21
+ :tooltip="tooltip"
22
+ :tooltip-position="tooltipPosition"
23
+ v-bind="{ ...tooltipProps }"
24
+ >
25
+ <template #activator="{ on, attrs }">
26
+ <v-btn
27
+ :color="appliedColor"
28
+ :text="isTextButton"
29
+ class="vcs-tool-button"
30
+ :class="classes"
31
+ :ripple="{ class: 'primary--text text--darken-4' }"
32
+ elevation="0"
33
+ v-bind="{ ...$attrs, ...attrs }"
34
+ v-on="{ ...$listeners, ...on }"
35
+ >
36
+ <v-icon v-if="icon" :class="{ 'mr-2': hasDefaultSlot }">
37
+ {{ icon }}
38
+ </v-icon>
39
+ <slot />
40
+ </v-btn>
41
+ </template>
42
+ </VcsTooltip>
43
+ <VcsBadge v-if="hasUpdate" :color="'warning'" class="position-absolute" />
44
+ </div>
45
+ </template>
46
+
47
+ <style lang="scss" scoped>
48
+ .vcs-button-wrap {
49
+ position: relative;
50
+ display: inline-block;
51
+ }
52
+ .badge {
53
+ top: -3px;
54
+ right: -3px;
55
+ }
56
+ .v-btn {
57
+ &.vcs-tool-button {
58
+ min-width: 42px;
59
+ height: 34px;
60
+ padding: 0;
61
+ position: relative;
62
+
63
+ &.vcs-tool-button--active-background {
64
+ border: 2px solid var(--v-primary-base);
65
+ background-color: var(--v-base-lighten2) !important;
66
+ }
67
+
68
+ &.v-btn--disabled {
69
+ background-color: transparent !important;
70
+ }
71
+ }
72
+ }
73
+ </style>
74
+
75
+ <script>
76
+ import { VBtn, VIcon } from 'vuetify/lib';
77
+ import VcsBadge from '../notification/VcsBadge.vue';
78
+ import VcsTooltip from '../notification/VcsTooltip.vue';
79
+
80
+ /**
81
+ * @description a button with tooltip extending {@link https://vuetifyjs.com/en/api/v-btn/|vuetify v-btn} using {@link VcsTooltip}. Used for tool buttons in the Navbar.
82
+ * @vue-prop {boolean} active - Whether button has background color. Applies vuetify primary color if color property is not set.
83
+ * @vue-prop {string} color - Passes property to v-btn in case prop active is true.
84
+ * @vue-prop {boolean} background - When applied with active the button shows an active-background state implying that a tool is active, but running in background, e.g. windowComponent closed.
85
+ * @vue-prop {boolean} hasUpdate - Whether the button shows a badge in the top right.
86
+ * @vue-prop {string} icon - When given, will display an icon in the button. Replaces vuetify icon property.
87
+ * @vue-prop {string} tooltip - Text content of a tooltip which appears on hover with default delay.
88
+ * @vue-prop {('bottom' | 'left' | 'top' | 'right')} tooltipPosition - Position of the tooltip.
89
+ * @vue-prop {Object<string, any>} tooltipProps - Properties to be passed to VcsTooltip {@link https://vuetifyjs.com/en/api/v-tooltip/#props|vuetify v-tooltip}
90
+ * @vue-computed {string} appliedColor - color applied to button, depending on size and state
91
+ * @vue-computed {Object<string, string>} classes - css classes applied to button, depending on size and state
92
+ * @vue-computed {boolean} hasDefaultSlot
93
+ * @vue-computed {boolean} isTextButton - button is text
94
+ * @vue-event {MouseEvent} click - Emits click event when the button is clicked.
95
+ */
96
+ export default {
97
+ name: 'VcsToolButton',
98
+ components: {
99
+ VcsTooltip,
100
+ VcsBadge,
101
+ VBtn,
102
+ VIcon,
103
+ },
104
+ inheritAttrs: false,
105
+ props: {
106
+ active: {
107
+ type: Boolean,
108
+ default: false,
109
+ },
110
+ color: {
111
+ type: String,
112
+ default: undefined,
113
+ },
114
+ background: {
115
+ type: Boolean,
116
+ default: false,
117
+ },
118
+ hasUpdate: {
119
+ type: Boolean,
120
+ default: false,
121
+ },
122
+ icon: {
123
+ type: String,
124
+ default: undefined,
125
+ },
126
+ tooltip: {
127
+ type: String,
128
+ default: undefined,
129
+ },
130
+ tooltipPosition: {
131
+ type: String,
132
+ default: 'bottom',
133
+ },
134
+ tooltipProps: {
135
+ type: Object,
136
+ default: () => ({}),
137
+ },
138
+ },
139
+ computed: {
140
+ appliedColor() {
141
+ if (this.active) {
142
+ return this.color ? this.color : 'primary';
143
+ } else {
144
+ return null;
145
+ }
146
+ },
147
+ classes() {
148
+ return {
149
+ 'vcs-tool-button--active-background':
150
+ this.active && this.background && !this.$attrs.disabled,
151
+ };
152
+ },
153
+ hasDefaultSlot() {
154
+ return !!this.$slots?.default?.[0]?.text?.trim();
155
+ },
156
+ isTextButton() {
157
+ return !this.active ? true : null;
158
+ },
159
+ },
160
+ };
161
+ </script>
@@ -14,9 +14,14 @@
14
14
  v-bind="{ ...$attrs, ...attrs }"
15
15
  v-on="{ ...$listeners, ...on }"
16
16
  :prepend-icon="icon"
17
+ :dense="isDense"
17
18
  readonly
18
19
  hide-details
19
20
  class="ma-0 py-1"
21
+ :class="{
22
+ 'input--dense': isDense,
23
+ 'input--not-dense': !isDense,
24
+ }"
20
25
  />
21
26
  </template>
22
27
  <v-date-picker
@@ -35,7 +40,13 @@
35
40
  <style lang="scss" scoped>
36
41
  ::v-deep {
37
42
  .v-input__control {
38
- padding: 0 8px;
43
+ padding: 0 4px;
44
+ }
45
+ .v-input__prepend-outer {
46
+ margin-right: 4px;
47
+ }
48
+ .v-icon {
49
+ font-size: 16px;
39
50
  }
40
51
  }
41
52
  </style>
@@ -73,7 +84,7 @@
73
84
  VDatePicker,
74
85
  VBtn,
75
86
  },
76
- setup(props, context) {
87
+ setup(props, { emit, attrs }) {
77
88
  /**
78
89
  * @type {import("@vcmap/ui").VcsUiApp}
79
90
  */
@@ -84,11 +95,13 @@
84
95
  const menuOpen = ref(false);
85
96
  const locale = ref(app.locale);
86
97
 
87
- const isValid = (date) => !Number.isNaN(Date.parse(date));
98
+ const isDense = computed(() => attrs.dense !== false);
99
+
100
+ const isValid = (date) => !Number.isNaN(new Date(date).getTime());
88
101
  const setFromValue = () => {
89
102
  if (isValid(localValue.value)) {
90
103
  localValue.value = props.value;
91
- } else {
104
+ } else if (localValue.value) {
92
105
  // eslint-disable-next-line no-console
93
106
  console.error('Invalid date provided: ', props.value);
94
107
  }
@@ -125,13 +138,14 @@
125
138
  get: () => localValue.value,
126
139
  set: (nv) => {
127
140
  localValue.value = nv;
128
- context.emit('input', localValue.value);
141
+ emit('input', localValue.value);
129
142
  },
130
143
  });
131
144
 
132
145
  return {
133
146
  formattedDate,
134
147
  date,
148
+ isDense,
135
149
  menuOpen,
136
150
  formatDate,
137
151
  locale,
@@ -9,7 +9,6 @@
9
9
  <VcsActionButtonList
10
10
  :actions="actions"
11
11
  :overflow-count="actionButtonListOverflowCount"
12
- small
13
12
  />
14
13
  </div>
15
14
  </article>
@@ -33,7 +33,7 @@
33
33
  @mouseleave="hover = false"
34
34
  >
35
35
  <template #selection="{ item, index }">
36
- <span v-if="index === 0" class="text-truncate">
36
+ <span v-if="index === 0" class="text-truncate w-full">
37
37
  {{ $t(getText(item)) }}
38
38
  </span>
39
39
  <span v-if="index === 1" class="text-no-wrap text-caption">
@@ -114,12 +114,26 @@
114
114
  ::v-deep {
115
115
  fieldset {
116
116
  border-radius: 2px;
117
- border-color: var(--v-base-base);
118
117
  }
119
118
  .v-select__slot {
120
119
  border-bottom: 1px solid var(--v-base-base);
121
120
  }
122
121
  }
122
+ &.v-text-field--outlined:hover {
123
+ ::v-deep {
124
+ fieldset {
125
+ border: 1px solid currentColor;
126
+ }
127
+ }
128
+ }
129
+ &.v-input--is-focused:hover,
130
+ &.v-input--is-focused {
131
+ ::v-deep {
132
+ .v-select__slot {
133
+ border-bottom: 1px solid var(--v-primary-base);
134
+ }
135
+ }
136
+ }
123
137
  }
124
138
  </style>
125
139
  <script>
@@ -0,0 +1,72 @@
1
+ <template>
2
+ <v-slider
3
+ class="vcs-slider"
4
+ :dense="$attrs.dense !== false"
5
+ hide-details
6
+ v-bind="{ ...$attrs }"
7
+ v-on="{ ...$listeners }"
8
+ :color="$attrs.color || 'base darken-1'"
9
+ :track-color="$attrs['track-color'] || 'base darken-1'"
10
+ :thumb-color="$attrs['thumb-color'] || 'base darken-3'"
11
+ />
12
+ </template>
13
+ <style lang="scss" scoped>
14
+ @import '../../styles/shades.scss';
15
+ .vcs-slider {
16
+ ::v-deep {
17
+ .v-slider {
18
+ .v-slider__thumb {
19
+ border: 2px solid;
20
+ &:before {
21
+ display: none;
22
+ }
23
+ }
24
+ &.theme--light {
25
+ .v-slider__thumb {
26
+ border-color: map-get($shades, 'white') !important;
27
+ }
28
+ }
29
+ &.theme--dark {
30
+ .v-slider__thumb {
31
+ border-color: map-get($shades, 'black') !important;
32
+ }
33
+ }
34
+ .v-slider__tick,
35
+ .v-slider__tick--filled {
36
+ background-color: var(--v-base-darken1);
37
+ height: 4px !important;
38
+ top: calc(50% - 2px) !important;
39
+ }
40
+ &.v-slider--vertical {
41
+ .v-slider__tick,
42
+ .v-slider__tick--filled {
43
+ width: 4px !important;
44
+ height: 2px !important;
45
+ right: calc(50% - 2px) !important;
46
+ top: auto !important;
47
+ }
48
+ }
49
+ }
50
+ }
51
+ &:not(.v-input--dense) {
52
+ ::v-deep {
53
+ .v-slider.v-slider--horizontal {
54
+ margin-left: 12px;
55
+ margin-right: 12px;
56
+ }
57
+ }
58
+ }
59
+ }
60
+ </style>
61
+ <script>
62
+ import { VSlider } from 'vuetify/lib';
63
+ /**
64
+ * @description stylized wrapper around {@link https://v2.vuetifyjs.com/en/components/sliders/#api}.
65
+ */
66
+ export default {
67
+ name: 'VcsSlider',
68
+ components: {
69
+ VSlider,
70
+ },
71
+ };
72
+ </script>