@vcmap/ui 5.0.0-rc.6 → 5.0.0-rc.9
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/README.md +72 -22
- package/build/build.js +0 -3
- package/build/buildHelpers.js +0 -1
- package/build/commonViteConfig.js +1 -1
- package/config/aerowest.config.json +2 -1
- package/config/base.config.json +7 -7
- package/config/dev.config.json +4 -4
- package/dist/assets/cesium/Workers/{AttributeCompression-27507afe.js → AttributeCompression-80665726.js} +1 -1
- package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-7565c1e8.js → AxisAlignedBoundingBox-a655a4bc.js} +1 -1
- package/dist/assets/cesium/Workers/{BoundingRectangle-9d707275.js → BoundingRectangle-c3b79029.js} +1 -1
- package/dist/assets/cesium/Workers/{BoxGeometry-fb31d3b5.js → BoxGeometry-f8f9c981.js} +1 -1
- package/dist/assets/cesium/Workers/{Color-56bb5728.js → Color-de06a177.js} +1 -1
- package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-72143c19.js → CoplanarPolygonGeometryLibrary-48cdc26d.js} +1 -1
- package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-7bae1712.js → CorridorGeometryLibrary-ddc027d3.js} +1 -1
- package/dist/assets/cesium/Workers/{CylinderGeometry-331891fe.js → CylinderGeometry-82a8cbe6.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometry-5e3f67b6.js → EllipseGeometry-32d55454.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-dbc15162.js → EllipseGeometryLibrary-b2ae188a.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-21191fce.js → EllipseOutlineGeometry-f05a5a27.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeodesic-cc3bace8.js → EllipsoidGeodesic-19e75e11.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeometry-8bfa24a9.js → EllipsoidGeometry-7c99fc81.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-48d9c023.js → EllipsoidOutlineGeometry-21c243df.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-125a8b72.js → EllipsoidRhumbLine-6145377b.js} +1 -1
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-a01286f6.js +1 -0
- package/dist/assets/cesium/Workers/{EncodedCartesian3-96fdc0ef.js → EncodedCartesian3-d9f5c4a4.js} +1 -1
- package/dist/assets/cesium/Workers/{FrustumGeometry-9ab86004.js → FrustumGeometry-17776af8.js} +1 -1
- package/dist/assets/cesium/Workers/GeometryAttribute-89a520b9.js +1 -0
- package/dist/assets/cesium/Workers/{GeometryInstance-13e4ff38.js → GeometryInstance-4fbf16ba.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryPipeline-e0eb4567.js → GeometryPipeline-309fad76.js} +1 -1
- package/dist/assets/cesium/Workers/IntersectionTests-58aa8f80.js +1 -0
- package/dist/assets/cesium/Workers/{Matrix2-37e55508.js → Matrix2-47e98d76.js} +0 -0
- package/dist/assets/cesium/Workers/{OrientedBoundingBox-e9c07538.js → OrientedBoundingBox-fcb5b750.js} +1 -1
- package/dist/assets/cesium/Workers/{Plane-6ee42cab.js → Plane-3f01019d.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-b408c688.js → PolygonGeometryLibrary-0b29eb16.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonPipeline-7b8e4643.js → PolygonPipeline-a934c4dd.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylinePipeline-6757400c.js → PolylinePipeline-8095c9bc.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-eb972210.js → PolylineVolumeGeometryLibrary-67d12fff.js} +1 -1
- package/dist/assets/cesium/Workers/{PrimitivePipeline-f244975e.js → PrimitivePipeline-980e44c5.js} +1 -1
- package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-1bd6152a.js → RectangleGeometryLibrary-621c6de8.js} +1 -1
- package/dist/assets/cesium/Workers/{TerrainEncoding-5a21a97f.js → TerrainEncoding-f96552d5.js} +1 -1
- package/dist/assets/cesium/Workers/{Transforms-eb5c1a84.js → Transforms-c8cb8f43.js} +3 -3
- package/dist/assets/cesium/Workers/{WallGeometryLibrary-a6b6a368.js → WallGeometryLibrary-c03d8479.js} +1 -1
- package/dist/assets/cesium/Workers/{WebMercatorProjection-2839e524.js → WebMercatorProjection-79b3214e.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/createVectorTileClampedPolylines.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolylines.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/upsampleQuantizedTerrainMesh.js +1 -1
- package/dist/assets/{cesium.fba8ca.js → cesium.4e40f4.js} +955 -968
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.edcf5e.js +4 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/{index.6a83278e.js → index.889d0f3a.js} +1 -1
- package/dist/assets/{ol.abea3a.js → ol.246fd4.js} +0 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.df4f6d.css +1 -0
- package/dist/assets/ui.df4f6d.js +43 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue-composition-api.7051d7.js → vue-composition-api.a520f3.js} +1 -1
- package/dist/assets/vue-composition-api.js +2 -2
- package/dist/assets/{vue.9fd7f6.js → vue.2cee44.js} +0 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.33dafc.css → vuetify.cc817b.css} +1 -1
- package/dist/assets/{vuetify.33dafc.js → vuetify.cc817b.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.js +96 -6
- package/package.json +3 -4
- package/plugins/@vcmap/pluginExample/index.js +5 -5
- package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +1 -1
- package/plugins/@vcmap/project-selector/ContextsListComponent.vue +1 -1
- package/plugins/@vcmap/project-selector/index.js +5 -5
- package/plugins/@vcmap/project-selector/package.json +1 -2
- package/plugins/@vcmap/theme-changer/index.js +6 -6
- package/plugins/buttonExamples/ButtonExamples.vue +1 -1
- package/plugins/buttonExamples/index.js +5 -4
- package/plugins/categoryTest/Categories.vue +1 -1
- package/plugins/categoryTest/Category.vue +1 -1
- package/plugins/categoryTest/index.js +5 -5
- package/plugins/example/index.js +33 -14
- package/plugins/test/allIconsComponent.vue +34 -0
- package/plugins/test/editor.vue +1 -1
- package/plugins/test/index.js +40 -17
- package/plugins/test/toolbox-data.js +106 -26
- package/plugins/test/windowManagerExample.vue +1 -2
- package/src/actions/actionHelper.js +41 -1
- package/src/actions/styleSelector.vue +1 -1
- package/src/application/Navbar.vue +47 -6
- package/src/application/VcsApp.vue +37 -29
- package/src/application/VcsMap.vue +1 -20
- package/src/assets/logo-mobile.svg +9 -0
- package/src/assets/logo.svg +23 -23
- package/src/components/buttons/VcsActionButtonList.vue +99 -0
- package/src/components/buttons/VcsButton.vue +201 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +73 -0
- package/src/components/form-inputs-controls/VcsColorPicker.vue +81 -0
- package/src/components/form-inputs-controls/VcsFormSection.vue +46 -0
- package/src/components/form-inputs-controls/VcsLabel.vue +38 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +97 -0
- package/src/components/form-inputs-controls/VcsTextArea.vue +130 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +129 -0
- package/src/components/form-output/VcsFormattedNumber.vue +103 -0
- package/src/components/lists/VcsActionList.vue +100 -0
- package/src/components/lists/VcsTreeview.vue +109 -0
- package/src/components/lists/VcsTreeviewLeaf.vue +105 -0
- package/src/components/lists/VcsTreeviewSearchbar.vue +156 -0
- package/src/components/notification/VcsBadge.vue +27 -0
- package/src/components/notification/VcsTooltip.vue +154 -0
- package/src/components/notification/validation.js +19 -0
- package/src/contentTree/LayerTree.vue +1 -1
- package/src/contentTree/contentTreeCollection.js +6 -2
- package/src/icons/+all.js +359 -0
- package/src/icons/2DAreaIcon.vue +21 -0
- package/src/icons/2DDistanceIcon.vue +18 -0
- package/src/icons/3DAreaIcon.vue +21 -0
- package/src/icons/3DDistanceIcon.vue +18 -0
- package/src/icons/3DHeightIcon.vue +18 -0
- package/src/icons/AngleIcon.vue +8 -0
- package/src/icons/AssociationsIcon.vue +34 -0
- package/src/icons/AxisIcon.vue +10 -0
- package/src/icons/BoundingBoxIcon.vue +15 -0
- package/src/icons/CheckboxCheckedIcon.vue +16 -0
- package/src/icons/CheckboxIcon.vue +23 -0
- package/src/icons/CheckboxIndeterminateIcon.vue +24 -0
- package/src/icons/CircleIcon.vue +10 -0
- package/src/icons/ColorSwatchIcon.vue +17 -0
- package/src/icons/CommentIcon.vue +19 -0
- package/src/icons/CompassIcon.vue +8 -0
- package/src/icons/ComponentsIcon.vue +7 -0
- package/src/icons/ConeIcon.vue +11 -0
- package/src/icons/DimensionsHouseIcon.vue +14 -0
- package/src/icons/ElevationProfileIcon.vue +111 -0
- package/src/icons/ExportAreaIcon.vue +7 -0
- package/src/icons/ExportFlightIcon.vue +7 -0
- package/src/icons/ExportIcon.vue +8 -0
- package/src/icons/ExternalLinkIcon.vue +10 -0
- package/src/icons/EyeIcon.vue +7 -0
- package/src/icons/FastForwardIcon.vue +7 -0
- package/src/icons/FilterIcon.vue +8 -0
- package/src/icons/GlobeNatureIcon.vue +14 -0
- package/src/icons/HealthCareIndustriesIcon.vue +118 -0
- package/src/icons/HelpIcon.vue +7 -0
- package/src/icons/HomePointIcon.vue +8 -0
- package/src/icons/HospitalsIcon.vue +237 -0
- package/src/icons/HouseIcon.vue +25 -0
- package/src/icons/ImportIcon.vue +8 -0
- package/src/icons/InfoIcon.vue +10 -0
- package/src/icons/KebabIcon.vue +36 -0
- package/src/icons/LabelIcon.vue +7 -0
- package/src/icons/LayersIcon.vue +26 -0
- package/src/icons/LegendIcon.vue +65 -0
- package/src/icons/LineIcon.vue +7 -0
- package/src/icons/LinkIcon.vue +7 -0
- package/src/icons/MapIcon.vue +8 -0
- package/src/icons/MenuIcon.vue +34 -0
- package/src/icons/MinusIcon.vue +8 -0
- package/src/icons/ObjectAttributeIcon.vue +18 -0
- package/src/icons/ObjectSelectIcon.vue +8 -0
- package/src/icons/ObliqueViewIcon.vue +13 -0
- package/src/icons/PdfIcon.vue +10 -0
- package/src/icons/PedestrianIcon.vue +8 -0
- package/src/icons/PenIcon.vue +14 -0
- package/src/icons/PlayCircleIcon.vue +10 -0
- package/src/icons/PlusIcon.vue +9 -0
- package/src/icons/PoiIcon.vue +7 -0
- package/src/icons/PointSelectIcon.vue +7 -0
- package/src/icons/PolygonIcon.vue +38 -0
- package/src/icons/PresentationModeIcon.vue +7 -0
- package/src/icons/ProgressIcon.vue +24 -0
- package/src/icons/QueryIcon.vue +15 -0
- package/src/icons/RectangleIcon.vue +9 -0
- package/src/icons/ReturnIcon.vue +7 -0
- package/src/icons/RewindIcon.vue +6 -0
- package/src/icons/SearchIcon.vue +8 -0
- package/src/icons/ShadowIcon.vue +9 -0
- package/src/icons/ShapesIcon.vue +28 -0
- package/src/icons/ShareIcon.vue +22 -0
- package/src/icons/SimpleCircleFilledIcon.vue +15 -0
- package/src/icons/SimpleCircleHalfFilledIcon.vue +12 -0
- package/src/icons/SimpleCircleOutlinedIcon.vue +15 -0
- package/src/icons/SkipNextIcon.vue +7 -0
- package/src/icons/SkipPreviousIcon.vue +9 -0
- package/src/icons/SplitViewIcon.vue +19 -0
- package/src/icons/TextStyleIcon.vue +14 -0
- package/src/icons/ThreeDimensionsIcon.vue +7 -0
- package/src/icons/ToolsIcon.vue +35 -0
- package/src/icons/TouchIcon.vue +8 -0
- package/src/icons/TrashCanIcon.vue +7 -0
- package/src/icons/TriangleIcon.vue +15 -0
- package/src/icons/TwoDimensionsIcon.vue +8 -0
- package/src/icons/UploadIcon.vue +14 -0
- package/src/icons/VideoRecorderIcon.vue +14 -0
- package/src/icons/WalkingIcon.vue +7 -0
- package/src/icons/WallIcon.vue +14 -0
- package/src/manager/buttonManager.js +5 -52
- package/src/manager/navbarManager.js +81 -0
- package/src/manager/toolbox/ToolboxGroupComponent.vue +128 -0
- package/src/manager/toolbox/ToolboxManager.vue +119 -76
- package/src/manager/toolbox/toolboxManager.js +204 -0
- package/src/manager/window/WindowComponent.vue +27 -20
- package/src/manager/window/WindowComponentHeader.vue +13 -6
- package/src/manager/window/WindowManager.vue +18 -1
- package/src/manager/window/windowManager.js +3 -5
- package/src/navigation/mapNavigation.vue +34 -5
- package/src/navigation/orientationToolsButton.vue +1 -1
- package/src/navigation/overviewMap.js +616 -0
- package/src/navigation/overviewMapClickedInteraction.js +38 -0
- package/src/navigation/tiltSlider.vue +1 -1
- package/src/styles/_theming.scss +10 -0
- package/src/styles/main.scss +3 -0
- package/src/styles/variables.scss +70 -0
- package/src/styles/vcsFont.scss +5 -0
- package/src/styles/vcsGrid.scss +4 -0
- package/src/vcsUiApp.js +18 -3
- package/src/vuePlugins/vuetify.js +1 -1
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-678e34e4.js +0 -1
- package/dist/assets/cesium/Workers/GeometryAttribute-3915ea0b.js +0 -1
- package/dist/assets/cesium/Workers/IntersectionTests-ac2459de.js +0 -1
- package/dist/assets/core.d5ed0f.js +0 -4
- package/dist/assets/ui.ad1ec9.css +0 -1
- package/dist/assets/ui.ad1ec9.js +0 -39
- package/dist/assets/uicomponents.161461.css +0 -1
- package/dist/assets/uicomponents.161461.js +0 -31
- package/dist/assets/uicomponents.js +0 -1
- package/lib/uicomponents.js +0 -1
- package/src/manager/toolbox/ToolboxMultiSelectButton.vue +0 -96
- package/src/manager/toolbox/ToolboxSingleSelectButton.vue +0 -98
- package/src/manager/toolbox/toolbox-manager.js +0 -203
@@ -0,0 +1,99 @@
|
|
1
|
+
<template>
|
2
|
+
<div v-if="actions.length > 0" :class="classes">
|
3
|
+
<VcsButton
|
4
|
+
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
|
+
@click.stop="button.callback($event)"
|
11
|
+
v-bind="{...$attrs}"
|
12
|
+
/>
|
13
|
+
<v-menu
|
14
|
+
v-if="overflowButtons.length > 0"
|
15
|
+
content-class="vcs-overflow-menu-wrap"
|
16
|
+
max-width="none"
|
17
|
+
:nudge-right="13"
|
18
|
+
offset-x
|
19
|
+
>
|
20
|
+
<template #activator="{ on, attrs }">
|
21
|
+
<VcsButton
|
22
|
+
v-bind="{...$attrs, ...attrs}"
|
23
|
+
v-on="on"
|
24
|
+
class="d-flex"
|
25
|
+
>
|
26
|
+
<v-icon v-text="overflowIcon" />
|
27
|
+
</VcsButton>
|
28
|
+
</template>
|
29
|
+
<VcsActionList :actions="overflowButtons" />
|
30
|
+
</v-menu>
|
31
|
+
<v-spacer v-else-if="blockOverflow" class="flex-grow-0 d-inline-block px-2" />
|
32
|
+
</div>
|
33
|
+
</template>
|
34
|
+
<style lang="scss">
|
35
|
+
.action-btn-wrap{
|
36
|
+
gap: 8px;
|
37
|
+
}
|
38
|
+
</style>
|
39
|
+
<script>
|
40
|
+
|
41
|
+
import VcsButton from './VcsButton.vue';
|
42
|
+
import VcsActionList, { validateActions } from '../lists/VcsActionList.vue';
|
43
|
+
|
44
|
+
/**
|
45
|
+
* @description
|
46
|
+
* A component rendering a list of actions with overflow mechanic using
|
47
|
+
* {@link VcsButton} and {@link VcsActionList}.
|
48
|
+
* @vue-prop {Array<VcsAction>} actions - Array of actions
|
49
|
+
* @vue-prop {number} [overflowCount=2] - number of buttons rendered until overflow.
|
50
|
+
* @vue-prop {string} [overflowIcon='$vcsKebab'] - optional custom icon for overflow button
|
51
|
+
* @vue-prop {boolean} [blockOverflow=false] - if space for the overflow should be blocked or not (e.g. when rendering lists in a grid)
|
52
|
+
* @vue-computed {Array<VcsAction>} buttons - buttons rendered directly, have to provide an icon
|
53
|
+
* @vue-computed {Array<VcsAction>} overflowButtons - rest of buttons rendered in overflow
|
54
|
+
*/
|
55
|
+
export default {
|
56
|
+
name: 'VcsActionButtonList',
|
57
|
+
components: { VcsActionList, VcsButton },
|
58
|
+
props: {
|
59
|
+
actions: {
|
60
|
+
type: Array,
|
61
|
+
required: true,
|
62
|
+
validator: validateActions,
|
63
|
+
},
|
64
|
+
overflowCount: {
|
65
|
+
type: Number,
|
66
|
+
default: 2,
|
67
|
+
},
|
68
|
+
overflowIcon: {
|
69
|
+
type: String,
|
70
|
+
default: '$vcsKebab',
|
71
|
+
},
|
72
|
+
blockOverflow: {
|
73
|
+
type: Boolean,
|
74
|
+
default: false,
|
75
|
+
},
|
76
|
+
},
|
77
|
+
computed: {
|
78
|
+
right() { return this.$attrs.right !== undefined && this.$attrs.right !== false; },
|
79
|
+
buttons() {
|
80
|
+
const buttons = this.actions.filter(i => i.icon).slice(0, this.overflowCount);
|
81
|
+
if (this.right) {
|
82
|
+
return buttons.reverse();
|
83
|
+
}
|
84
|
+
return buttons;
|
85
|
+
},
|
86
|
+
overflowButtons() {
|
87
|
+
const buttonsNames = this.buttons.map(i => i.name);
|
88
|
+
return this.actions.filter(i => !buttonsNames.includes(i.name));
|
89
|
+
},
|
90
|
+
classes() {
|
91
|
+
const classes = ['d-flex', 'align-center', 'action-btn-wrap'];
|
92
|
+
if (this.right) {
|
93
|
+
classes.push('justify-end');
|
94
|
+
}
|
95
|
+
return classes;
|
96
|
+
},
|
97
|
+
},
|
98
|
+
};
|
99
|
+
</script>
|
@@ -0,0 +1,201 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="vcs-button-wrap"
|
4
|
+
>
|
5
|
+
<VcsTooltip
|
6
|
+
:tooltip="tooltip"
|
7
|
+
:tooltip-position="tooltipPosition"
|
8
|
+
v-bind="{...tooltipProps}"
|
9
|
+
>
|
10
|
+
<template #activator="{ on, attrs }">
|
11
|
+
<v-btn
|
12
|
+
:color="backgroundColor"
|
13
|
+
:text="isTextButton"
|
14
|
+
:outlined="isOutlined"
|
15
|
+
:class="classes"
|
16
|
+
:ripple="!isSmall ? { class: 'primary--text text--darken-4' } : false"
|
17
|
+
elevation="0"
|
18
|
+
v-bind="{...$attrs, ...attrs}"
|
19
|
+
v-on="{...$listeners, ...on}"
|
20
|
+
>
|
21
|
+
<v-icon v-if="icon" v-text="icon" :class="{ 'mr-2': hasDefaultSlot }" />
|
22
|
+
<slot />
|
23
|
+
</v-btn>
|
24
|
+
</template>
|
25
|
+
</VcsTooltip>
|
26
|
+
<VcsBadge
|
27
|
+
v-if="hasUpdate"
|
28
|
+
:color="'warning'"
|
29
|
+
class="position-absolute"
|
30
|
+
/>
|
31
|
+
</div>
|
32
|
+
</template>
|
33
|
+
|
34
|
+
<style lang="scss" scoped>
|
35
|
+
.vcs-button-wrap{
|
36
|
+
position: relative;
|
37
|
+
display: inline-block;
|
38
|
+
}
|
39
|
+
.badge{
|
40
|
+
top: -3px;
|
41
|
+
right: -3px;
|
42
|
+
}
|
43
|
+
.v-btn{
|
44
|
+
&--outlined{
|
45
|
+
border: thin solid currentColor;
|
46
|
+
}
|
47
|
+
&.vcs-button{
|
48
|
+
|
49
|
+
&--standard {
|
50
|
+
min-width: 48px;
|
51
|
+
height: 32px;
|
52
|
+
font-size: 12px;
|
53
|
+
border: 1px solid transparent;
|
54
|
+
&:hover{
|
55
|
+
color: var(--v-accent-lighten5) !important;
|
56
|
+
border-color: var(--v-primary-base);
|
57
|
+
background-color: var(--v-primary-base);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
&--small {
|
62
|
+
height: 16px;
|
63
|
+
min-width: auto;
|
64
|
+
&:hover{
|
65
|
+
color: var(--v-primary-base);
|
66
|
+
}
|
67
|
+
&::before{
|
68
|
+
display: none; /*prevents unwanted mouseover effect*/
|
69
|
+
}
|
70
|
+
::v-deep {
|
71
|
+
.v-icon{
|
72
|
+
font-size: 16px;
|
73
|
+
}
|
74
|
+
|
75
|
+
.v-icon__component {
|
76
|
+
height: 16px;
|
77
|
+
width: 16px;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
&--large {
|
83
|
+
min-width: 42px;
|
84
|
+
height: 34px;
|
85
|
+
padding: 0;
|
86
|
+
position: relative;
|
87
|
+
|
88
|
+
&.vcs-button--active-disabled{
|
89
|
+
border: 2px solid var(--v-primary-base);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
</style>
|
95
|
+
|
96
|
+
<script>
|
97
|
+
import VcsBadge from '../notification/VcsBadge.vue';
|
98
|
+
import VcsTooltip from '../notification/VcsTooltip.vue';
|
99
|
+
|
100
|
+
/**
|
101
|
+
* @description a button with tooltip extending {@link https://vuetifyjs.com/en/api/v-btn/|vuetify v-btn} using {@link VcsTooltip}.
|
102
|
+
* @vue-prop {boolean} active - Whether button has background color. Applies vuetify primary color if color property is not set.
|
103
|
+
* @vue-prop {string} color - Passes property to v-btn in case prop active is true.
|
104
|
+
* @vue-prop {boolean} hasUpdate - Whether the button shows a badge in the top right.
|
105
|
+
* @vue-prop {string} icon - When given, will display an icon in the button. Replaces vuetify icon property.
|
106
|
+
* @vue-prop {string} tooltip - Text content of a tooltip which appears on hover with default delay.
|
107
|
+
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} tooltipPosition - Position of the tooltip.
|
108
|
+
* @vue-prop {Object<string, any>} tooltipProps - Properties to be passed to VcsTooltip {@link https://vuetifyjs.com/en/api/v-tooltip/#props|vuetify v-tooltip}
|
109
|
+
* @vue-computed {string} backgroundColor - color applied to button, depending on size and state
|
110
|
+
* @vue-computed {Object<string, string>} classes - css classes applied to button, depending on size and state
|
111
|
+
* @vue-computed {boolean} hasDefaultSlot
|
112
|
+
* @vue-computed {boolean} isSmall - button size is small
|
113
|
+
* @vue-computed {boolean} isStandard - button size standard
|
114
|
+
* @vue-computed {boolean} isLarge - button size is large
|
115
|
+
* @vue-computed {boolean} isOutlined - button is outlined
|
116
|
+
* @vue-computed {boolean} isTextButton - button is text
|
117
|
+
* @vue-event {MouseEvent} click - Emits click event when the button is clicked.
|
118
|
+
*/
|
119
|
+
export default {
|
120
|
+
name: 'VcsButton',
|
121
|
+
components: { VcsTooltip, VcsBadge },
|
122
|
+
inheritAttrs: false,
|
123
|
+
props: {
|
124
|
+
active: {
|
125
|
+
type: Boolean,
|
126
|
+
default: false,
|
127
|
+
},
|
128
|
+
color: {
|
129
|
+
type: String,
|
130
|
+
default: undefined,
|
131
|
+
},
|
132
|
+
hasUpdate: {
|
133
|
+
type: Boolean,
|
134
|
+
default: false,
|
135
|
+
},
|
136
|
+
icon: {
|
137
|
+
type: String,
|
138
|
+
default: undefined,
|
139
|
+
},
|
140
|
+
tooltip: {
|
141
|
+
type: String,
|
142
|
+
default: undefined,
|
143
|
+
},
|
144
|
+
tooltipPosition: {
|
145
|
+
type: String,
|
146
|
+
default: 'bottom',
|
147
|
+
},
|
148
|
+
tooltipProps: {
|
149
|
+
type: Object,
|
150
|
+
default: () => ({}),
|
151
|
+
},
|
152
|
+
},
|
153
|
+
computed: {
|
154
|
+
backgroundColor() {
|
155
|
+
if (this.isStandard && !this.active) {
|
156
|
+
return this.color;
|
157
|
+
} else if (this.active) {
|
158
|
+
return this.color ? this.color : 'primary';
|
159
|
+
} else {
|
160
|
+
return null;
|
161
|
+
}
|
162
|
+
},
|
163
|
+
classes() {
|
164
|
+
return {
|
165
|
+
'vcs-button--small': this.isSmall,
|
166
|
+
'pa-0': this.isSmall,
|
167
|
+
'vcs-button--standard': this.isStandard,
|
168
|
+
padding: this.isStandard,
|
169
|
+
'font-weight-bold': this.isStandard,
|
170
|
+
'text-capitalize': this.isStandard,
|
171
|
+
'vcs-button--large': this.isLarge,
|
172
|
+
'vcs-button--active-disabled': this.active && this.$attrs.disabled,
|
173
|
+
};
|
174
|
+
},
|
175
|
+
hasDefaultSlot() {
|
176
|
+
return !!this.$slots?.default?.[0]?.text?.trim();
|
177
|
+
},
|
178
|
+
isSmall() {
|
179
|
+
return this.$attrs.small != null;
|
180
|
+
},
|
181
|
+
isStandard() {
|
182
|
+
return !(this.isSmall || this.isLarge);
|
183
|
+
},
|
184
|
+
isLarge() {
|
185
|
+
return this.$attrs.large != null;
|
186
|
+
},
|
187
|
+
isOutlined() {
|
188
|
+
if (this.isStandard) {
|
189
|
+
return this.active || this.$attrs.disabled;
|
190
|
+
}
|
191
|
+
return false;
|
192
|
+
},
|
193
|
+
isTextButton() {
|
194
|
+
if (this.isSmall) {
|
195
|
+
return true;
|
196
|
+
}
|
197
|
+
return !this.active ? true : null;
|
198
|
+
},
|
199
|
+
},
|
200
|
+
};
|
201
|
+
</script>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<template>
|
2
|
+
<VcsTooltip
|
3
|
+
:tooltip-position="tooltipPosition"
|
4
|
+
:tooltip="errorMessage"
|
5
|
+
color="error"
|
6
|
+
>
|
7
|
+
<template #activator="{ on, attrs }">
|
8
|
+
<span v-on="on">
|
9
|
+
<v-checkbox
|
10
|
+
on-icon="$vcsCheckboxChecked"
|
11
|
+
off-icon="$vcsCheckbox"
|
12
|
+
hide-details
|
13
|
+
indeterminate-icon="$vcsCheckboxIndeterminate"
|
14
|
+
:dense="$attrs.dense!==false"
|
15
|
+
:ripple="false"
|
16
|
+
v-bind="{...$attrs, ...attrs}"
|
17
|
+
v-on="{...$listeners, ...on}"
|
18
|
+
@update:error="setError"
|
19
|
+
>
|
20
|
+
<template #label>
|
21
|
+
<VcsLabel :html-for="$attrs.id" :dense="!!$attrs.dense">
|
22
|
+
{{ $attrs.label }}
|
23
|
+
</VcsLabel>
|
24
|
+
</template>
|
25
|
+
</v-checkbox>
|
26
|
+
</span>
|
27
|
+
</template>
|
28
|
+
</VcsTooltip>
|
29
|
+
</template>
|
30
|
+
<style lang="scss" scoped>
|
31
|
+
.v-input--selection-controls {
|
32
|
+
margin: 0;
|
33
|
+
padding: 0;
|
34
|
+
}
|
35
|
+
</style>
|
36
|
+
<script>
|
37
|
+
import VcsLabel from './VcsLabel.vue';
|
38
|
+
import VcsTooltip from '../notification/VcsTooltip.vue';
|
39
|
+
import validate from '../notification/validation.js';
|
40
|
+
|
41
|
+
/**
|
42
|
+
* @description Stylized wrapper around {@link https://vuetifyjs.com/en/api/v-checkbox/ |vuetify checkbox}.
|
43
|
+
* Provides two height options depending on "dense" property:
|
44
|
+
* - if dense is set true (default), height is 24 px
|
45
|
+
* - if dense is set false, height is 32 px
|
46
|
+
* Provides VcsTooltip to show error messages
|
47
|
+
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} [tooltipPosition='right'] - Position of the error tooltip.
|
48
|
+
*/
|
49
|
+
export default {
|
50
|
+
name: 'VcsCheckbox',
|
51
|
+
components: { VcsTooltip, VcsLabel },
|
52
|
+
props: {
|
53
|
+
tooltipPosition: {
|
54
|
+
type: String,
|
55
|
+
default: 'right',
|
56
|
+
},
|
57
|
+
},
|
58
|
+
data() {
|
59
|
+
return {
|
60
|
+
errorMessage: '',
|
61
|
+
};
|
62
|
+
},
|
63
|
+
methods: {
|
64
|
+
setError() {
|
65
|
+
const rules = [...this.$attrs.rules].concat(this.$attrs.errorMessages);
|
66
|
+
this.errorMessage = validate(rules, this.$attrs.value).join('\n');
|
67
|
+
},
|
68
|
+
},
|
69
|
+
model: {
|
70
|
+
event: 'change',
|
71
|
+
},
|
72
|
+
};
|
73
|
+
</script>
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<template>
|
2
|
+
<v-color-picker
|
3
|
+
ref="picker"
|
4
|
+
@input="(e) => sub$.next(e)"
|
5
|
+
:value="value"
|
6
|
+
class="caption"
|
7
|
+
v-bind="props"
|
8
|
+
/>
|
9
|
+
</template>
|
10
|
+
|
11
|
+
<style lang="scss" scoped>
|
12
|
+
::v-deep {
|
13
|
+
.v-color-picker__controls {
|
14
|
+
padding: 8px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.v-color-picker__input input {
|
18
|
+
margin: 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.v-color-picker__edit {
|
22
|
+
margin-top: 12px;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
</style>
|
26
|
+
|
27
|
+
<script>
|
28
|
+
import {
|
29
|
+
onMounted,
|
30
|
+
onUnmounted,
|
31
|
+
} from '@vue/composition-api';
|
32
|
+
import { Subject } from 'rxjs';
|
33
|
+
import { debounceTime, takeUntil } from 'rxjs/operators';
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @description
|
37
|
+
* Stylized wrapper around vuetify Color Picker
|
38
|
+
*/
|
39
|
+
export default {
|
40
|
+
name: 'VcsColorPicker',
|
41
|
+
props: {
|
42
|
+
width: {
|
43
|
+
type: Number,
|
44
|
+
default: 200,
|
45
|
+
},
|
46
|
+
mode: {
|
47
|
+
type: String,
|
48
|
+
default: 'hexa',
|
49
|
+
},
|
50
|
+
dotSize: {
|
51
|
+
type: Number,
|
52
|
+
default: 12,
|
53
|
+
},
|
54
|
+
value: {
|
55
|
+
type: String,
|
56
|
+
default: '#000000',
|
57
|
+
},
|
58
|
+
},
|
59
|
+
setup(props, context) {
|
60
|
+
const destroy$ = new Subject();
|
61
|
+
const sub$ = new Subject();
|
62
|
+
|
63
|
+
onMounted(() => {
|
64
|
+
sub$.pipe(debounceTime(330), takeUntil(destroy$)).subscribe((color) => {
|
65
|
+
// this.$vuetify.theme.themes.light.primary = color;
|
66
|
+
context.emit('input', color);
|
67
|
+
});
|
68
|
+
});
|
69
|
+
|
70
|
+
onUnmounted(() => {
|
71
|
+
destroy$.next();
|
72
|
+
destroy$.unsubscribe();
|
73
|
+
});
|
74
|
+
|
75
|
+
return {
|
76
|
+
props,
|
77
|
+
sub$,
|
78
|
+
};
|
79
|
+
},
|
80
|
+
};
|
81
|
+
</script>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<template>
|
2
|
+
<section class="vcs-form-section">
|
3
|
+
<slot name="title">
|
4
|
+
<article class="pa-2 accent">
|
5
|
+
<div class="form-section-header d-flex justify-space-between align-center">
|
6
|
+
<strong class="caption">{{ title }}</strong>
|
7
|
+
<VcsActionButtonList
|
8
|
+
:actions="titleActions"
|
9
|
+
small
|
10
|
+
/>
|
11
|
+
</div>
|
12
|
+
</article>
|
13
|
+
</slot>
|
14
|
+
<article class="section-content">
|
15
|
+
<slot />
|
16
|
+
</article>
|
17
|
+
</section>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
|
21
|
+
<script>
|
22
|
+
import VcsActionButtonList from '../buttons/VcsActionButtonList.vue';
|
23
|
+
|
24
|
+
/**
|
25
|
+
* @description
|
26
|
+
* Stylized form section with action buttons
|
27
|
+
* @vue-data {slot} [#title] - slot to override form section header
|
28
|
+
* @vue-data {slot} [#default] - slot with the section content
|
29
|
+
* @vue-prop {string} title - Title to be displayed
|
30
|
+
* @vue-prop {Array<VcsAction>} titleActions - Icons to be displayed on the right side
|
31
|
+
*/
|
32
|
+
export default {
|
33
|
+
name: 'VcsFormSection',
|
34
|
+
components: { VcsActionButtonList },
|
35
|
+
props: {
|
36
|
+
title: {
|
37
|
+
type: String,
|
38
|
+
default: undefined,
|
39
|
+
},
|
40
|
+
titleActions: {
|
41
|
+
type: Array,
|
42
|
+
default: () => ([]),
|
43
|
+
},
|
44
|
+
},
|
45
|
+
};
|
46
|
+
</script>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<template>
|
2
|
+
<label :htmlFor="htmlFor" class="vcs-label" :class="{'vcs-label-dense': dense}">
|
3
|
+
<slot />
|
4
|
+
</label>
|
5
|
+
</template>
|
6
|
+
<style lang="scss" scoped>
|
7
|
+
@import "../../styles/vcsGrid.scss";
|
8
|
+
@import "../../styles/vcsFont";
|
9
|
+
.vcs-label {
|
10
|
+
font-size: $base-font-size;
|
11
|
+
line-height: $line-height-base;
|
12
|
+
}
|
13
|
+
.vcs-label-dense {
|
14
|
+
line-height: $line-height-dense;
|
15
|
+
}
|
16
|
+
</style>
|
17
|
+
<script>
|
18
|
+
|
19
|
+
/**
|
20
|
+
* @description Stylized wrapper around {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label |label label}.
|
21
|
+
* pass the label text as innerHtml
|
22
|
+
* @vue-prop {string} htmlFor - an id reference the label is meant for
|
23
|
+
* @vue-prop {boolean} [dense=true] - default line height is 32px (dense). If set false, height is 40px.
|
24
|
+
*/
|
25
|
+
export default {
|
26
|
+
name: 'VcsLabel',
|
27
|
+
props: {
|
28
|
+
htmlFor: {
|
29
|
+
type: String,
|
30
|
+
default: undefined,
|
31
|
+
},
|
32
|
+
dense: {
|
33
|
+
type: Boolean,
|
34
|
+
default: true,
|
35
|
+
},
|
36
|
+
},
|
37
|
+
};
|
38
|
+
</script>
|
@@ -0,0 +1,97 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
@mouseover="hover = true"
|
4
|
+
@mouseleave="hover = false"
|
5
|
+
>
|
6
|
+
<VcsTooltip
|
7
|
+
:tooltip-position="tooltipPosition"
|
8
|
+
:tooltip="errorMessage"
|
9
|
+
color="error"
|
10
|
+
>
|
11
|
+
<template #activator="{ on, attrs }">
|
12
|
+
<span v-on="on">
|
13
|
+
<v-select
|
14
|
+
append-icon="mdi-chevron-down"
|
15
|
+
hide-details
|
16
|
+
flat
|
17
|
+
:outlined="isOutlined"
|
18
|
+
:dense="isDense"
|
19
|
+
:height="isDense ? 24 : 32"
|
20
|
+
:class="$attrs.color === 'primary' ? 'primary--select' : ''"
|
21
|
+
v-bind="{...$attrs, ...attrs}"
|
22
|
+
v-on="{...$listeners, ...on}"
|
23
|
+
@update:error="setError"
|
24
|
+
/>
|
25
|
+
</span>
|
26
|
+
</template>
|
27
|
+
</VcsTooltip>
|
28
|
+
</div>
|
29
|
+
</template>
|
30
|
+
<style lang="scss" scoped>
|
31
|
+
.v-text-field {
|
32
|
+
padding: 0;
|
33
|
+
margin: 0;
|
34
|
+
}
|
35
|
+
|
36
|
+
.vcs-select-hover{
|
37
|
+
color: var(--v-primary-base) !important;
|
38
|
+
}
|
39
|
+
|
40
|
+
.primary--select {
|
41
|
+
::v-deep {
|
42
|
+
.v-select__selection,
|
43
|
+
.v-select__selection--comma,
|
44
|
+
.v-select.v-text-field input {
|
45
|
+
color: var(--v-primary-base);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
</style>
|
50
|
+
<script>
|
51
|
+
|
52
|
+
import VcsTooltip from '../notification/VcsTooltip.vue';
|
53
|
+
import validate from '../notification/validation.js';
|
54
|
+
|
55
|
+
/**
|
56
|
+
* @description Stylized wrapper around {@link https://vuetifyjs.com/en/api/v-select/ |vuetify select}.
|
57
|
+
* Provides two height options depending on "dense" property:
|
58
|
+
* - if dense is set true (default), height is 24 px
|
59
|
+
* - if dense is set false, height is 32 px
|
60
|
+
* Provides VcsTooltip to show error messages
|
61
|
+
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} [tooltipPosition='right'] - Position of the error tooltip.
|
62
|
+
* @vue-computed {boolean} isDense - Whether size of select is dense.
|
63
|
+
* @vue-computed {boolean} isOutlined - Select is outlined on either hover, focus or error, if not disabled.
|
64
|
+
*/
|
65
|
+
export default {
|
66
|
+
name: 'VcsSelect',
|
67
|
+
components: { VcsTooltip },
|
68
|
+
props: {
|
69
|
+
tooltipPosition: {
|
70
|
+
type: String,
|
71
|
+
default: 'right',
|
72
|
+
},
|
73
|
+
},
|
74
|
+
data() {
|
75
|
+
return {
|
76
|
+
hover: false,
|
77
|
+
errorMessage: '',
|
78
|
+
};
|
79
|
+
},
|
80
|
+
computed: {
|
81
|
+
isDense() {
|
82
|
+
return this.$attrs.dense !== undefined && this.$attrs.dense !== false;
|
83
|
+
},
|
84
|
+
isOutlined() {
|
85
|
+
return (this.hover || this.errorMessage.length > 0) &&
|
86
|
+
!(this.$attrs.disabled || this.$attrs.disabled === '');
|
87
|
+
},
|
88
|
+
},
|
89
|
+
methods: {
|
90
|
+
setError() {
|
91
|
+
const rules = [...this.$attrs.rules].concat(this.$attrs.errorMessages);
|
92
|
+
this.errorMessage = validate(rules, this.$attrs.value).join('\n');
|
93
|
+
},
|
94
|
+
},
|
95
|
+
};
|
96
|
+
</script>
|
97
|
+
|