@vcmap/ui 5.0.0-rc.12 → 5.0.0-rc.13
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 +1 -1
- package/dist/assets/{cesium.4057e6.js → cesium.21663e.js} +0 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.deb2b7.js → core.63242d.js} +1 -1
- package/dist/assets/core.js +1 -1
- package/dist/assets/{index.7aa11f5a.js → index.44b91cfe.js} +1 -1
- package/dist/assets/{ol.70b137.js → ol.88ba9d.js} +0 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.3c2933.css +1 -0
- package/dist/assets/{ui.9eb282.js → ui.3c2933.js} +43 -42
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue.65d93f.js → vue.c897fc.js} +0 -0
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.149dde.css → vuetify.147c3a.css} +0 -0
- package/dist/assets/{vuetify.149dde.js → vuetify.147c3a.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.js +1 -0
- package/package.json +12 -2
- package/plugins/example/index.js +10 -23
- package/plugins/test/index.js +13 -4
- package/plugins/test/toolbox-data.js +82 -57
- package/src/application/VcsApp.vue +1 -1
- package/src/components/lists/VcsActionList.vue +13 -7
- package/src/featureInfo/BalloonComponent.vue +2 -0
- package/src/featureInfo/featureInfo.js +5 -3
- package/src/i18n/de.js +4 -0
- package/src/i18n/en.js +4 -0
- package/src/manager/buttonManager.js +2 -7
- package/src/manager/navbarManager.js +1 -1
- package/src/manager/toolbox/GroupToolboxComponent.vue +118 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +128 -0
- package/src/manager/toolbox/ToolboxManager.vue +116 -99
- package/src/manager/toolbox/toolboxManager.js +233 -88
- package/src/vcsUiApp.js +1 -1
- package/dist/assets/ui.9eb282.css +0 -1
- package/src/manager/toolbox/ToolboxGroupComponent.vue +0 -132
@@ -1,132 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div v-if="actions.length > 0">
|
3
|
-
<VcsButton
|
4
|
-
v-if="singleActionButton"
|
5
|
-
:key="singleActionButton.name"
|
6
|
-
:tooltip="singleActionButton.title"
|
7
|
-
:icon="singleActionButton.icon"
|
8
|
-
:active="singleActionButton.active"
|
9
|
-
@click.stop="singleActionButton.callback($event)"
|
10
|
-
v-bind="{...$attrs}"
|
11
|
-
large
|
12
|
-
/>
|
13
|
-
<VcsButton
|
14
|
-
v-else-if="groupButtons.length > 0"
|
15
|
-
v-bind="{...$attrs}"
|
16
|
-
width="48"
|
17
|
-
:icon="groupIcon"
|
18
|
-
:tooltip="groupTitle"
|
19
|
-
:active="active"
|
20
|
-
@click="$emit('click')"
|
21
|
-
large
|
22
|
-
>
|
23
|
-
<v-icon v-text="active ? 'mdi-chevron-up' : 'mdi-chevron-down'" color="accent" class="text--darken-3" />
|
24
|
-
</VcsButton>
|
25
|
-
<v-toolbar
|
26
|
-
v-if="active"
|
27
|
-
dense
|
28
|
-
absolute
|
29
|
-
class="toolbar__secondary rounded-b mx-auto v-sheet mt-12 px-4 second-toolbar"
|
30
|
-
:style="{left: `${nudgeLeft}px` }"
|
31
|
-
>
|
32
|
-
<v-toolbar-items class="w-full">
|
33
|
-
<div class="d-flex align-center justify-space-between w-full action-btn-wrap">
|
34
|
-
<VcsButton
|
35
|
-
v-for="(button, index) in groupButtons"
|
36
|
-
:key="`${button.name}-${index}`"
|
37
|
-
:tooltip="button.title"
|
38
|
-
:icon="button.icon"
|
39
|
-
:active="button.active"
|
40
|
-
@click.stop="button.callback($event)"
|
41
|
-
:width="buttonSize"
|
42
|
-
v-bind="{...$attrs}"
|
43
|
-
large
|
44
|
-
/>
|
45
|
-
</div>
|
46
|
-
</v-toolbar-items>
|
47
|
-
</v-toolbar>
|
48
|
-
</div>
|
49
|
-
</template>
|
50
|
-
<style lang="scss" scoped>
|
51
|
-
.action-btn-wrap{
|
52
|
-
gap: 8px;
|
53
|
-
}
|
54
|
-
.v-toolbar.v-sheet {
|
55
|
-
background-color: #ffffffda;
|
56
|
-
}
|
57
|
-
.second-toolbar{
|
58
|
-
display: table;
|
59
|
-
}
|
60
|
-
</style>
|
61
|
-
<script>
|
62
|
-
|
63
|
-
import VcsButton from '../../components/buttons/VcsButton.vue';
|
64
|
-
import { validateActions } from '../../components/lists/VcsActionList.vue';
|
65
|
-
|
66
|
-
/**
|
67
|
-
* @description
|
68
|
-
* A component rendering a single action or a group of actions in a dropdown toolbox using {@link VcsButton} and {@link ToolboxButton}.
|
69
|
-
* @vue-prop {Array<VcsAction>} actions - Array of actions
|
70
|
-
* @vue-prop {string} [groupIcon=''] - optional icon for group dropdown button
|
71
|
-
* @vue-prop {string} [groupTitle=''] - optional title for group dropdown button
|
72
|
-
* @vue-prop {boolean} active - boolean flag, whether group is active
|
73
|
-
* @vue-prop {boolean} position - relative x-position of the button within the toolbar
|
74
|
-
* @vue-computed {Array<VcsAction>} singleActionButton - single button without dropdown
|
75
|
-
* @vue-computed {Array<VcsAction>} groupButtons - buttons rendered below group dropdown button
|
76
|
-
* @vue-computed {number} nudgeLeft - offset depending on buttonSize and buttonPadding to render toolbox centered below dropdown button
|
77
|
-
*/
|
78
|
-
export default {
|
79
|
-
name: 'ToolboxGroupComponent',
|
80
|
-
components: { VcsButton },
|
81
|
-
props: {
|
82
|
-
actions: {
|
83
|
-
type: Array,
|
84
|
-
required: true,
|
85
|
-
validator: validateActions,
|
86
|
-
},
|
87
|
-
groupIcon: {
|
88
|
-
type: String,
|
89
|
-
required: true,
|
90
|
-
},
|
91
|
-
groupTitle: {
|
92
|
-
type: String,
|
93
|
-
default: '',
|
94
|
-
},
|
95
|
-
active: {
|
96
|
-
type: Boolean,
|
97
|
-
required: true,
|
98
|
-
},
|
99
|
-
position: {
|
100
|
-
type: Number,
|
101
|
-
required: true,
|
102
|
-
},
|
103
|
-
},
|
104
|
-
data() {
|
105
|
-
return {
|
106
|
-
buttonSize: 34,
|
107
|
-
buttonPadding: 8,
|
108
|
-
};
|
109
|
-
},
|
110
|
-
computed: {
|
111
|
-
singleActionButton() {
|
112
|
-
if (this.actions.length === 1) {
|
113
|
-
return this.actions[0];
|
114
|
-
}
|
115
|
-
return undefined;
|
116
|
-
},
|
117
|
-
groupButtons() {
|
118
|
-
if (this.singleActionButton) {
|
119
|
-
return [];
|
120
|
-
}
|
121
|
-
return this.actions;
|
122
|
-
},
|
123
|
-
width() {
|
124
|
-
// XXX can this be solved by CSS to get rid of hardcoded size and padding?
|
125
|
-
return this.groupButtons.length * (this.buttonSize + 2 * this.buttonPadding);
|
126
|
-
},
|
127
|
-
nudgeLeft() {
|
128
|
-
return this.position - this.width / 2;
|
129
|
-
},
|
130
|
-
},
|
131
|
-
};
|
132
|
-
</script>
|