@vcmap/ui 5.0.0-rc.24 → 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.
- package/build/build.js +132 -14
- package/build/buildHelpers.js +196 -92
- package/build/bundle.js +56 -0
- package/build/commonViteConfig.js +2 -2
- package/config/base.config.json +29 -2
- package/config/dev.config.json +29 -1
- package/config/www.config.json +81 -39
- package/dist/assets/@mdi/font/LICENSE +20 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +3 -0
- package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-85d9e53a.js → AxisAlignedBoundingBox-4140c51f.js} +1 -1
- package/dist/assets/cesium/Workers/{BoundingRectangle-1ee7eb47.js → BoundingRectangle-c714b156.js} +1 -1
- package/dist/assets/cesium/Workers/{BoxGeometry-3b2be784.js → BoxGeometry-6f3da43d.js} +1 -1
- package/dist/assets/cesium/Workers/{Color-f107c84d.js → Color-8a565ff2.js} +5 -5
- package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-78d71993.js → CoplanarPolygonGeometryLibrary-4b4d4096.js} +1 -1
- package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-50d99b33.js → CorridorGeometryLibrary-7b94502b.js} +1 -1
- package/dist/assets/cesium/Workers/{CylinderGeometry-51b0d9bf.js → CylinderGeometry-ca070b87.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometry-bcfb5d87.js → EllipseGeometry-122e51fa.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-e94f8472.js → EllipseGeometryLibrary-4d326efc.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-28e3a1bb.js → EllipseOutlineGeometry-16cc2bd7.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeometry-b222fa63.js → EllipsoidGeometry-cb148ca2.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-38a3fb5b.js → EllipsoidOutlineGeometry-0fa10c79.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidTangentPlane-8c89f28c.js → EllipsoidTangentPlane-6dd1b7af.js} +1 -1
- package/dist/assets/cesium/Workers/{FrustumGeometry-bdd3a04d.js → FrustumGeometry-ee73037c.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryAttribute-153115c5.js → GeometryAttribute-ff5b4fb1.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryPipeline-acb2399c.js → GeometryPipeline-1f8fbf05.js} +1 -1
- package/dist/assets/cesium/Workers/{IntersectionTests-271e513e.js → IntersectionTests-70d39ba9.js} +1 -1
- package/dist/assets/cesium/Workers/{OrientedBoundingBox-5e04e31f.js → OrientedBoundingBox-159cf1d6.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-6762b65b.js → PolygonGeometryLibrary-076a5d25.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonPipeline-7dc7a431.js → PolygonPipeline-b9f2810a.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylinePipeline-15fde655.js → PolylinePipeline-639192e0.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-ba7dfed5.js → PolylineVolumeGeometryLibrary-b73549fb.js} +1 -1
- package/dist/assets/cesium/Workers/{PrimitivePipeline-68f0b9a2.js → PrimitivePipeline-10ede1b6.js} +1 -1
- package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-8eaf23da.js → RectangleGeometryLibrary-c35a7356.js} +1 -1
- package/dist/assets/cesium/Workers/{TerrainEncoding-eb8a645a.js → TerrainEncoding-668d242f.js} +1 -1
- package/dist/assets/cesium/Workers/{Transforms-f6451f99.js → Transforms-a2a85221.js} +14 -0
- package/dist/assets/cesium/Workers/{WallGeometryLibrary-feef3109.js → WallGeometryLibrary-1938bf0d.js} +1 -1
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/package.js +1 -1
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/dist/assets/{cesium.253914.js → cesium.1457fa.js} +58656 -33170
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.47836f.js +19060 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-bb372634.js +1 -0
- package/dist/assets/{ol.1c946a.js → ol.9e4d23.js} +27344 -12118
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.6ed89d.css +5 -0
- package/dist/assets/ui.6ed89d.js +13461 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue.c1ece7.js → vue.7327e4.js} +834 -598
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.6efa21.css → vuetify.d2131d.css} +1 -1
- package/dist/assets/{vuetify.6efa21.js → vuetify.d2131d.js} +343 -103
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +7 -6
- package/index.html +14 -6
- package/index.js +17 -2
- package/lib/olLib.js +19 -16
- package/package.json +15 -14
- package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -2
- package/plugins/@vcmap/simple-graph/index.js +1 -1
- package/plugins/@vcmap-show-case/README.md +2 -1
- package/plugins/@vcmap-show-case/buttons-example/ButtonsExample.vue +55 -79
- package/plugins/@vcmap-show-case/category-tester/CategoriesExample.vue +135 -0
- package/plugins/@vcmap-show-case/category-tester/CollectionComponentOptions.vue +209 -0
- package/plugins/@vcmap-show-case/category-tester/index.js +19 -1
- package/plugins/@vcmap-show-case/collection-manager-example/CollectionManagerExample.vue +182 -0
- package/plugins/@vcmap-show-case/collection-manager-example/README.md +3 -0
- package/plugins/@vcmap-show-case/collection-manager-example/index.js +74 -0
- package/plugins/@vcmap-show-case/collection-manager-example/package.json +5 -0
- package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +20 -3
- package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +21 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/SwitchMapCallback.js +47 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/config.json +3 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/index.js +34 -0
- package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +5 -0
- package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +0 -1
- package/plugins/package.json +3 -1
- package/public/assets/@mdi/font/LICENSE +20 -0
- package/public/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +3 -0
- package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/public/assets/favicon-128.png +0 -0
- package/public/assets/favicon-180.png +0 -0
- package/public/assets/favicon-192.png +0 -0
- package/public/assets/favicon-32.png +0 -0
- package/public/assets/logo-mobile.svg +9 -0
- package/public/assets/logo.svg +26 -0
- package/src/application/VcsApp.vue +34 -5
- package/src/application/VcsAttributions.vue +20 -5
- package/src/application/VcsAttributionsFooter.vue +0 -1
- package/src/application/VcsNavbar.vue +18 -13
- package/src/callback/activateLayersCallback.js +54 -0
- package/src/callback/applyLayerStyleCallback.js +63 -0
- package/src/callback/deactivateLayersCallback.js +54 -0
- package/src/callback/goToViewpointCallback.js +54 -0
- package/src/callback/vcsCallback.js +66 -0
- package/src/components/buttons/VcsActionButtonList.vue +28 -10
- package/src/components/buttons/VcsButton.vue +38 -100
- package/src/components/buttons/VcsFormButton.vue +6 -4
- package/src/components/buttons/VcsToolButton.vue +161 -0
- package/src/components/form-inputs-controls/VcsDatePicker.vue +19 -5
- package/src/components/form-inputs-controls/VcsFormSection.vue +0 -1
- package/src/components/form-inputs-controls/VcsSelect.vue +16 -2
- package/src/components/form-inputs-controls/VcsSlider.vue +72 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +24 -13
- package/src/components/form-inputs-controls/VcsWizard.vue +13 -14
- package/src/components/form-inputs-controls/VcsWizardStep.vue +0 -1
- package/src/components/lists/VcsList.vue +3 -2
- package/src/components/lists/VcsTreeviewLeaf.vue +0 -1
- package/src/components/tables/VcsDataTable.vue +2 -4
- package/src/contentTree/LayerTree.vue +15 -9
- package/src/contentTree/contentTreeCollection.js +1 -1
- package/src/contentTree/contentTreeItem.js +22 -3
- package/src/contentTree/groupContentTreeItem.js +1 -0
- package/src/contentTree/layerContentTreeItem.js +4 -14
- package/src/contentTree/layerGroupContentTreeItem.js +4 -14
- package/src/contentTree/obliqueCollectionContentTreeItem.js +4 -0
- package/src/contentTree/viewpointContentTreeItem.js +1 -0
- package/src/featureInfo/BalloonComponent.vue +0 -1
- package/src/featureInfo/abstractFeatureInfoView.js +16 -1
- package/src/featureInfo/featureInfo.js +45 -56
- package/src/i18n/de.js +5 -2
- package/src/i18n/en.js +5 -2
- package/src/i18n/i18nCollection.js +1 -2
- package/src/init.js +1 -4
- package/src/legend/vcsLegend.vue +1 -1
- package/src/manager/buttonManager.js +15 -0
- package/src/manager/{categoryManager/CategoryComponent.vue → collectionManager/CollectionComponent.vue} +57 -66
- package/src/manager/collectionManager/CollectionComponentList.vue +62 -0
- package/src/manager/collectionManager/CollectionComponentProvider.vue +38 -0
- package/src/manager/collectionManager/CollectionManager.vue +43 -0
- package/src/manager/collectionManager/categoryManager.js +83 -0
- package/src/manager/collectionManager/collectionComponent.js +453 -0
- package/src/manager/collectionManager/collectionManager.js +432 -0
- package/src/manager/navbarManager.js +5 -4
- package/src/manager/toolbox/GroupToolboxComponent.vue +5 -7
- package/src/manager/toolbox/SelectToolboxComponent.vue +6 -9
- package/src/manager/toolbox/ToolboxManager.vue +4 -5
- package/src/manager/window/WindowComponentHeader.vue +0 -4
- package/src/navigation/mapNavigation.vue +34 -8
- package/src/navigation/overviewMap.js +7 -1
- package/src/notifier/notifierComponent.vue +0 -1
- package/src/pluginHelper.js +5 -0
- package/src/search/resultItem.vue +0 -1
- package/src/search/searchComponent.vue +7 -9
- package/src/styles/_theming.scss +2 -2
- package/src/styles/_typography.scss +2 -2
- package/src/styles/main.scss +8 -0
- package/src/styles/vcsFont.scss +1 -22
- package/src/vcsUiApp.js +76 -12
- package/src/vuePlugins/i18n.js +18 -19
- package/src/vuePlugins/vuetify.js +0 -1
- package/dist/assets/core.3a8205.js +0 -18426
- package/dist/assets/index.91ae2d55.js +0 -1
- package/dist/assets/ui.0025be.css +0 -5
- package/dist/assets/ui.0025be.js +0 -18534
- package/plugins/@vcmap-show-case/category-tester/Categories.vue +0 -291
- package/plugins/@vcmap-show-case/category-tester/Category.vue +0 -164
- package/src/manager/categoryManager/CategoryComponentList.vue +0 -82
- package/src/manager/categoryManager/CategoryManager.vue +0 -47
- package/src/manager/categoryManager/categoryManager.js +0 -633
- package/start.js +0 -9
- /package/{src/assets/favicon-128.png → dist/assets/favicon-128.4c4ce5.png} +0 -0
- /package/{src/assets/favicon-180.png → dist/assets/favicon-180.5b99c0.png} +0 -0
- /package/{src/assets/favicon-192.png → dist/assets/favicon-192.0e205e.png} +0 -0
- /package/{src/assets/favicon-32.png → dist/assets/favicon-32.6b9add.png} +0 -0
- /package/dist/assets/{favicon.decf54cc.svg → favicon.d5ec97.svg} +0 -0
- /package/dist/assets/font/{TitilliumWeb-Regular.woff2 → TitilliumWeb-Regular.9ca076.woff2} +0 -0
- /package/{src/assets/logo-mobile.svg → dist/assets/logo-mobile.2d10a6.svg} +0 -0
- /package/{src/assets/logo.svg → dist/assets/logo.27089a.svg} +0 -0
- /package/{src → public}/assets/favicon.svg +0 -0
- /package/{src → public}/assets/font/OFL.txt +0 -0
- /package/{src → public}/assets/font/TitilliumWeb-Regular.woff2 +0 -0
@@ -1,14 +1,16 @@
|
|
1
1
|
<template>
|
2
2
|
<div v-if="actions.length > 0" :class="classes">
|
3
|
-
<
|
3
|
+
<component
|
4
|
+
:is="button"
|
4
5
|
class="d-flex"
|
5
|
-
v-for="(
|
6
|
-
:key="`${
|
7
|
-
:tooltip="
|
8
|
-
:icon="
|
9
|
-
:active="
|
10
|
-
:disabled="
|
11
|
-
|
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
|
-
<
|
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
|
-
</
|
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
|
-
|
11
|
-
:
|
12
|
-
:
|
13
|
-
|
14
|
-
:ripple="
|
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
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
78
|
-
|
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
|
-
|
89
|
-
|
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 -
|
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}
|
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}
|
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
|
-
|
113
|
+
disabled: {
|
140
114
|
type: Boolean,
|
141
115
|
default: false,
|
142
116
|
},
|
@@ -162,52 +136,16 @@
|
|
162
136
|
},
|
163
137
|
},
|
164
138
|
computed: {
|
165
|
-
|
166
|
-
if (this.
|
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
|
-
|
84
|
-
|
85
|
-
|
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
|
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,
|
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
|
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
|
-
|
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,
|
@@ -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>
|