@vcmap/ui 6.0.0-rc.5 → 6.0.0-rc.6
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/buildTypes.js +9 -5
- package/config/base.config.json +0 -6
- package/config/dev.config.json +4 -0
- package/config/projects.config.json +2 -1
- package/config/theming.config.json +68 -0
- package/config/www.config.json +31 -30
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-1c8b8674.js → core-e06aa7a6.js} +1403 -1375
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-5dda32d2.css +1 -0
- package/dist/assets/{ui-7214428e.js → ui-5dda32d2.js} +11632 -11501
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-88a2fabe.css → vuetify-4c4e4217.css} +1 -1
- package/dist/assets/{vuetify-88a2fabe.js → vuetify-4c4e4217.js} +2375 -2369
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +22 -10
- package/index.js +9 -3
- package/package.json +3 -3
- package/plugins/@vcmap-show-case/custom-icons-example/README.md +3 -0
- package/plugins/@vcmap-show-case/custom-icons-example/assets/imageExample.png +0 -0
- package/plugins/@vcmap-show-case/custom-icons-example/assets/svgExample.svg +1 -0
- package/plugins/@vcmap-show-case/custom-icons-example/package.json +5 -0
- package/plugins/@vcmap-show-case/custom-icons-example/src/CustomIconsExample.vue +90 -0
- package/plugins/@vcmap-show-case/custom-icons-example/src/index.js +45 -0
- package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +11 -7
- package/plugins/@vcmap-show-case/theming-example/README.md +3 -0
- package/plugins/@vcmap-show-case/theming-example/package.json +5 -0
- package/plugins/@vcmap-show-case/theming-example/src/ThemingExample.vue +116 -0
- package/plugins/@vcmap-show-case/theming-example/src/index.js +53 -0
- package/plugins/package.json +5 -1
- package/src/actions/actionHelper.d.ts +4 -11
- package/src/actions/actionHelper.js +2 -5
- package/src/actions/listActions.d.ts +2 -2
- package/src/application/VcsApp.vue +17 -19
- package/src/application/VcsApp.vue.d.ts +5 -1
- package/src/application/VcsAttributionsFooter.vue.d.ts +1 -1
- package/src/application/VcsContainer.vue +2 -2
- package/src/application/VcsContainer.vue.d.ts +5 -1
- package/src/application/VcsNavbar.vue +9 -1
- package/src/application/VcsNavbar.vue.d.ts +1 -0
- package/src/application/VcsSplashScreen.vue +11 -2
- package/src/application/attributionsHelper.d.ts +20 -22
- package/src/application/attributionsHelper.js +4 -4
- package/src/callback/vcsCallback.d.ts +2 -2
- package/src/callback/vcsCallback.js +1 -1
- package/src/components/buttons/VcsActionButtonList.vue +2 -3
- package/src/components/buttons/VcsButton.vue +2 -4
- package/src/components/buttons/VcsButton.vue.d.ts +1 -1
- package/src/components/buttons/VcsFormButton.vue +4 -4
- package/src/components/buttons/VcsToolButton.vue +4 -2
- package/src/components/buttons/VcsToolButton.vue.d.ts +2 -2
- package/src/components/composables.d.ts +5 -0
- package/src/components/composables.js +79 -9
- package/src/components/extent/VcsExtent.vue +10 -6
- package/src/components/extent/VcsExtent.vue.d.ts +1 -0
- package/src/components/flight/VcsFlightComponent.vue +13 -13
- package/src/components/flight/VcsFlightComponent.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +8 -3
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +3 -8
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +0 -1
- package/src/components/form-inputs-controls/VcsCoordinate.vue +1 -2
- package/src/components/form-inputs-controls/VcsFileInput.vue +1 -1
- package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +8 -6
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +1 -1
- package/src/components/form-inputs-controls/VcsSlider.vue +5 -5
- package/src/components/form-inputs-controls/VcsTextArea.vue +1 -1
- package/src/components/form-inputs-controls/VcsTextField.vue +10 -1
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +2 -1
- package/src/components/form-inputs-controls/VcsWizard.vue +3 -3
- package/src/components/form-inputs-controls/VcsWizardStep.vue +5 -1
- package/src/components/form-inputs-controls/vcsTextField.scss +7 -1
- package/src/components/form-output/VcsFormattedNumber.vue +1 -1
- package/src/components/import/VcsImportComponent.vue +7 -4
- package/src/components/import/VcsImportComponent.vue.d.ts +1 -1
- package/src/components/lists/VcsActionList.vue +2 -6
- package/src/components/lists/VcsListItemComponent.vue +20 -10
- package/src/components/lists/VcsListItemComponent.vue.d.ts +11 -1
- package/src/components/lists/VcsTreeview.vue +53 -11
- package/src/components/lists/VcsTreeview.vue.d.ts +2 -0
- package/src/components/lists/VcsTreeviewSearchbar.vue +14 -3
- package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +3 -1
- package/src/components/lists/VcsTreeviewTitle.vue +36 -0
- package/src/components/modelHelper.d.ts +10 -8
- package/src/components/modelHelper.js +8 -6
- package/src/components/notification/VcsHelp.vue +6 -7
- package/src/components/notification/VcsHelp.vue.d.ts +0 -9
- package/src/components/plugins/AbstractConfigEditor.vue +1 -22
- package/src/components/plugins/AbstractConfigEditor.vue.d.ts +6 -29
- package/src/components/section/VcsExpansionPanel.vue +9 -3
- package/src/components/section/VcsExpansionPanel.vue.d.ts +2 -2
- package/src/components/section/VcsFormSection.vue +6 -6
- package/src/components/section/VcsFormSection.vue.d.ts +2 -2
- package/src/components/style/VcsImageSelector.vue +14 -6
- package/src/components/style/VcsImageSelector.vue.d.ts +1 -0
- package/src/components/style/VcsStrokeSelector.vue +5 -2
- package/src/components/style/VcsStrokeSelector.vue.d.ts +1 -0
- package/src/components/style/VcsTextMenu.vue +2 -2
- package/src/components/tables/VcsDataTable.vue +14 -10
- package/src/components/tables/VcsDataTable.vue.d.ts +1 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +42 -31
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointComponent.vue +12 -9
- package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +1 -0
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/contentTreeItem.js +1 -1
- package/src/featureInfo/BalloonComponent.vue +21 -13
- package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
- package/src/featureInfo/abstractFeatureInfoView.d.ts +4 -4
- package/src/featureInfo/abstractFeatureInfoView.js +4 -4
- package/src/featureInfo/featureInfo.d.ts +2 -2
- package/src/featureInfo/featureInfo.js +1 -1
- package/src/i18n/i18nCollection.d.ts +9 -15
- package/src/i18n/i18nCollection.js +3 -3
- package/src/legend/VcsLegend.vue +6 -2
- package/src/legend/VcsLegend.vue.d.ts +1 -0
- package/src/manager/collectionManager/CollectionComponentList.vue +1 -1
- package/src/manager/collectionManager/categoryManager.d.ts +1 -1
- package/src/manager/collectionManager/collectionComponentClass.d.ts +2 -2
- package/src/manager/collectionManager/collectionComponentClass.js +4 -4
- package/src/manager/collectionManager/collectionManager.d.ts +1 -1
- package/src/manager/toolbox/GroupToolboxComponent.vue +8 -6
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -1
- package/src/manager/toolbox/SelectToolboxComponent.vue +8 -6
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -1
- package/src/manager/toolbox/{ToolboxManager.vue → ToolboxManagerComponent.vue} +8 -5
- package/src/manager/toolbox/{ToolboxManager.vue.d.ts → ToolboxManagerComponent.vue.d.ts} +1 -1
- package/src/manager/window/WindowComponentHeader.vue +6 -3
- package/src/manager/window/WindowComponentHeader.vue.d.ts +1 -0
- package/src/manager/window/windowManager.d.ts +6 -6
- package/src/manager/window/windowManager.js +3 -3
- package/src/navigation/OrientationToolsButton.vue +2 -4
- package/src/navigation/TiltSlider.vue +3 -5
- package/src/search/SearchComponent.vue +8 -6
- package/src/search/SearchComponent.vue.d.ts +1 -1
- package/src/styles/vcsList.scss +1 -1
- package/src/uiConfig.d.ts +12 -3
- package/src/uiConfig.js +2 -1
- package/src/vcsUiApp.d.ts +41 -56
- package/src/vcsUiApp.js +34 -28
- package/src/vuePlugins/vuetify.d.ts +88 -62
- package/src/vuePlugins/vuetify.js +116 -20
- package/dist/assets/ui-7214428e.css +0 -1
- package/plugins/@vcmap-show-case/theme-changer/README.md +0 -23
- package/plugins/@vcmap-show-case/theme-changer/config.json +0 -69
- package/plugins/@vcmap-show-case/theme-changer/package.json +0 -11
- package/plugins/@vcmap-show-case/theme-changer/src/ThemeChangerComponent.vue +0 -120
- package/plugins/@vcmap-show-case/theme-changer/src/index.js +0 -108
- package/src/components/lists/VcsTreeviewLeaf.vue +0 -92
- /package/dist/assets/{cesium-126f111a.js → cesium-ccb4cc30.js} +0 -0
- /package/dist/assets/{ol-27f9b3f3.js → ol-e7981d5c.js} +0 -0
- /package/dist/assets/{vue-c78a5f76.js → vue-87bc6efe.js} +0 -0
- /package/src/components/lists/{VcsTreeviewLeaf.vue.d.ts → VcsTreeviewTitle.vue.d.ts} +0 -0
@@ -18,14 +18,40 @@
|
|
18
18
|
v-bind="{ ...$props, ...$attrs }"
|
19
19
|
:search="localSearchValue"
|
20
20
|
>
|
21
|
-
<template #
|
22
|
-
<
|
23
|
-
|
24
|
-
|
25
|
-
/>
|
21
|
+
<template #title="scope">
|
22
|
+
<slot name="title" v-bind="scope ?? {}">
|
23
|
+
<VcsTreeviewTitle :item="scope.item"></VcsTreeviewTitle>
|
24
|
+
</slot>
|
26
25
|
</template>
|
27
|
-
<template
|
28
|
-
|
26
|
+
<template v-for="slot of forwardSlots" #[slot]="scope">
|
27
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
28
|
+
</template>
|
29
|
+
<template #prepend="scope">
|
30
|
+
<slot name="prepend" v-bind="scope ?? {}">
|
31
|
+
<template v-if="scope.item?.icon">
|
32
|
+
<v-icon
|
33
|
+
v-if="typeof scope.item?.icon === 'string'"
|
34
|
+
:size="iconSize"
|
35
|
+
>
|
36
|
+
{{ scope.item.icon }}
|
37
|
+
</v-icon>
|
38
|
+
<ImageElementInjector :element="scope.item.icon" v-else />
|
39
|
+
</template>
|
40
|
+
</slot>
|
41
|
+
</template>
|
42
|
+
<template #append="scope">
|
43
|
+
<slot name="append" v-bind="scope ?? {}">
|
44
|
+
<VcsActionButtonList
|
45
|
+
v-if="scope.item.actions?.length > 0"
|
46
|
+
:actions="scope.item.actions"
|
47
|
+
:overflow-count="3"
|
48
|
+
:disabled="scope.item.disabled"
|
49
|
+
right
|
50
|
+
tooltip-position="right"
|
51
|
+
block-overflow
|
52
|
+
class="col-4 pa-0 d-flex align-center"
|
53
|
+
/>
|
54
|
+
</slot>
|
29
55
|
</template>
|
30
56
|
</v-treeview>
|
31
57
|
</div>
|
@@ -35,7 +61,7 @@
|
|
35
61
|
// Root Level Entries should be 40px high
|
36
62
|
> .v-list-item,
|
37
63
|
> .v-list-group > .v-list-item {
|
38
|
-
min-height: calc(var(--v-vcs-
|
64
|
+
min-height: calc(var(--v-vcs-font-size) * 2 + 14px) !important;
|
39
65
|
padding-left: 6px;
|
40
66
|
}
|
41
67
|
// Border around root nodes with children included
|
@@ -88,10 +114,15 @@
|
|
88
114
|
|
89
115
|
<script>
|
90
116
|
import { getCurrentInstance } from 'vue';
|
117
|
+
import { VIcon } from 'vuetify/components';
|
91
118
|
import { VTreeview } from 'vuetify/labs/VTreeview';
|
92
119
|
import { useProxiedAtomicModel } from '../modelHelper.js';
|
120
|
+
import { useForwardSlots } from '../composables.js';
|
93
121
|
import VcsTreeviewSearchbar from './VcsTreeviewSearchbar.vue';
|
94
|
-
import
|
122
|
+
import VcsActionButtonList from '../buttons/VcsActionButtonList.vue';
|
123
|
+
import ImageElementInjector from '../ImageElementInjector.vue';
|
124
|
+
import VcsTreeviewTitle from './VcsTreeviewTitle.vue';
|
125
|
+
import { useIconSize } from '../../vuePlugins/vuetify.js';
|
95
126
|
|
96
127
|
/**
|
97
128
|
* @description extends API of https://vuetifyjs.com/en/api/v-treeview/
|
@@ -104,7 +135,10 @@
|
|
104
135
|
export default {
|
105
136
|
name: 'VcsTreeview',
|
106
137
|
components: {
|
107
|
-
|
138
|
+
VcsTreeviewTitle,
|
139
|
+
VIcon,
|
140
|
+
ImageElementInjector,
|
141
|
+
VcsActionButtonList,
|
108
142
|
VcsTreeviewSearchbar,
|
109
143
|
VTreeview,
|
110
144
|
},
|
@@ -123,7 +157,7 @@
|
|
123
157
|
},
|
124
158
|
},
|
125
159
|
emits: ['update:search'],
|
126
|
-
setup(props, { emit }) {
|
160
|
+
setup(props, { emit, slots }) {
|
127
161
|
const localSearchValue = useProxiedAtomicModel(props, 'search', emit);
|
128
162
|
|
129
163
|
// TODO properly type the tree view item interface & export in index.d.ts
|
@@ -145,9 +179,17 @@
|
|
145
179
|
.indexOf(q.toLocaleLowerCase());
|
146
180
|
};
|
147
181
|
|
182
|
+
const forwardSlots = useForwardSlots(slots, [
|
183
|
+
'append',
|
184
|
+
'title',
|
185
|
+
'prepend',
|
186
|
+
]);
|
187
|
+
const iconSize = useIconSize();
|
148
188
|
return {
|
189
|
+
iconSize,
|
149
190
|
localSearchValue,
|
150
191
|
handleFilter,
|
192
|
+
forwardSlots,
|
151
193
|
};
|
152
194
|
},
|
153
195
|
};
|
@@ -12,8 +12,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
12
12
|
default: undefined;
|
13
13
|
};
|
14
14
|
}, {
|
15
|
+
iconSize: import("vue").ComputedRef<number>;
|
15
16
|
localSearchValue: import("vue").Ref<any>;
|
16
17
|
handleFilter: (value: string, q: string, item: Object) => number;
|
18
|
+
forwardSlots: import("vue").ComputedRef<string[]>;
|
17
19
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:search"[], "update:search", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
18
20
|
search: {
|
19
21
|
type: StringConstructor;
|
@@ -3,7 +3,9 @@
|
|
3
3
|
class="pa-2 bg-base-lighten-3 position-relative d-flex flex-row justify-space-between align-center rounded-0"
|
4
4
|
>
|
5
5
|
<slot name="prepend">
|
6
|
-
<v-icon class="search-icon my-0 ml-1" size="
|
6
|
+
<v-icon class="search-icon my-0 ml-1" :size="iconSize - 4">
|
7
|
+
$vcsSearch
|
8
|
+
</v-icon>
|
7
9
|
</slot>
|
8
10
|
|
9
11
|
<slot v-bind="{ ...$props, attrs: $attrs }">
|
@@ -16,7 +18,7 @@
|
|
16
18
|
</slot>
|
17
19
|
|
18
20
|
<slot name="append" :has-filter="hasFilter">
|
19
|
-
<v-icon v-if="hasFilter" class="ml-2" size="
|
21
|
+
<v-icon v-if="hasFilter" class="ml-2" :size="iconSize">$vcsFilter</v-icon>
|
20
22
|
</slot>
|
21
23
|
</div>
|
22
24
|
</template>
|
@@ -48,7 +50,9 @@
|
|
48
50
|
> .v-field__field
|
49
51
|
> .v-field__input
|
50
52
|
) {
|
51
|
-
--v-input-control-height: calc(
|
53
|
+
--v-input-control-height: calc(
|
54
|
+
var(--v-vcs-font-size) * 2 - 14px
|
55
|
+
) !important;
|
52
56
|
min-height: var(--v-input-control-height);
|
53
57
|
}
|
54
58
|
|
@@ -74,6 +78,7 @@
|
|
74
78
|
<script>
|
75
79
|
import { VIcon } from 'vuetify/components';
|
76
80
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
81
|
+
import { useIconSize } from '../../vuePlugins/vuetify.js';
|
77
82
|
|
78
83
|
/**
|
79
84
|
* @description stylized searchbar used in VcsTreeview, VcsDataTable and VcsList
|
@@ -100,5 +105,11 @@
|
|
100
105
|
default: false,
|
101
106
|
},
|
102
107
|
},
|
108
|
+
setup() {
|
109
|
+
const iconSize = useIconSize();
|
110
|
+
return {
|
111
|
+
iconSize,
|
112
|
+
};
|
113
|
+
},
|
103
114
|
};
|
104
115
|
</script>
|
@@ -7,7 +7,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
7
7
|
type: BooleanConstructor;
|
8
8
|
default: boolean;
|
9
9
|
};
|
10
|
-
},
|
10
|
+
}, {
|
11
|
+
iconSize: import("vue").ComputedRef<number>;
|
12
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
11
13
|
placeholder: {
|
12
14
|
type: StringConstructor;
|
13
15
|
default: string;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<script setup>
|
2
|
+
import { computed, ref } from 'vue';
|
3
|
+
import { VTooltip } from 'vuetify/components';
|
4
|
+
import { createEllipseTooltip } from '../composables.js';
|
5
|
+
|
6
|
+
const props = defineProps({
|
7
|
+
item: {
|
8
|
+
type: Object,
|
9
|
+
default: undefined,
|
10
|
+
},
|
11
|
+
});
|
12
|
+
|
13
|
+
const titleParent = ref();
|
14
|
+
|
15
|
+
const tooltip = createEllipseTooltip(
|
16
|
+
computed(() => titleParent.value),
|
17
|
+
computed(() => props.item.tooltip),
|
18
|
+
computed(() => props.item.title || props.item.name),
|
19
|
+
);
|
20
|
+
</script>
|
21
|
+
<style lang="scss" scoped>
|
22
|
+
.title-parent {
|
23
|
+
overflow: hidden;
|
24
|
+
text-overflow: ellipsis;
|
25
|
+
}
|
26
|
+
</style>
|
27
|
+
<template>
|
28
|
+
<div class="title-parent pr-2" ref="titleParent">
|
29
|
+
<span>
|
30
|
+
{{ $st(item.title || item.name) }}
|
31
|
+
</span>
|
32
|
+
<v-tooltip v-if="tooltip" activator="parent">
|
33
|
+
{{ $st(tooltip) }}
|
34
|
+
</v-tooltip>
|
35
|
+
</div>
|
36
|
+
</template>
|
@@ -4,25 +4,27 @@
|
|
4
4
|
* getter returns the internal value
|
5
5
|
* setter updates internal value and emits the update event
|
6
6
|
* simplified based on https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/composables/proxiedModel.ts
|
7
|
-
* @param {
|
8
|
-
* @param {
|
9
|
-
* @param {(event: string
|
7
|
+
* @param {{ [k in P]: string extends P ? unknown : T }} props
|
8
|
+
* @param {P} prop
|
9
|
+
* @param {(event: string extends P ? P : `update:${P}`, value: T) => void} emit
|
10
10
|
* @returns {import("vue").Ref<import("vue").UnwrapRef<T>>}
|
11
11
|
* @template T
|
12
|
+
* @template {string} [P=string]
|
12
13
|
*/
|
13
|
-
export function useProxiedAtomicModel<T>(props:
|
14
|
+
export function useProxiedAtomicModel<T, P extends string = string>(props: { [k in P]: string extends P ? unknown : T; }, prop: P, emit: (event: string extends P ? P : `update:${P}`, value: T) => void): import("vue").Ref<import("vue").UnwrapRef<T>>;
|
14
15
|
/**
|
15
16
|
* Can only be used in setup of Vue components!
|
16
17
|
* Provides a ref model for complex properties.
|
17
18
|
* Watches changes on the provided prop and updates the internal ref
|
18
19
|
* Watches changes on the internal ref and emits the change, if prop has not already been updated
|
19
|
-
* @param {
|
20
|
-
* @param {
|
21
|
-
* @param {(event: string
|
20
|
+
* @param {{ [k in P]: string extends P ? unknown : T }} props
|
21
|
+
* @param {P} prop
|
22
|
+
* @param {(event: string extends P ? P : `update:${P}`, value: T) => void} emit
|
22
23
|
* @returns {import("vue").Ref<import("vue").UnwrapRef<T>>}
|
23
24
|
* @template T
|
25
|
+
* @template {string} [P=string]
|
24
26
|
*/
|
25
|
-
export function useProxiedComplexModel<T>(props:
|
27
|
+
export function useProxiedComplexModel<T, P extends string = string>(props: { [k in P]: string extends P ? unknown : T; }, prop: P, emit: (event: string extends P ? P : `update:${P}`, value: T) => void): import("vue").Ref<import("vue").UnwrapRef<T>>;
|
26
28
|
/**
|
27
29
|
* Helper function that returns a modelValue for VcsCheckbox depending on the availability of a specific property within a model object
|
28
30
|
* Getter returns true, if property is available, otherwise false.
|
@@ -8,11 +8,12 @@ import { getLogger } from '@vcsuite/logger';
|
|
8
8
|
* getter returns the internal value
|
9
9
|
* setter updates internal value and emits the update event
|
10
10
|
* simplified based on https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/composables/proxiedModel.ts
|
11
|
-
* @param {
|
12
|
-
* @param {
|
13
|
-
* @param {(event: string
|
11
|
+
* @param {{ [k in P]: string extends P ? unknown : T }} props
|
12
|
+
* @param {P} prop
|
13
|
+
* @param {(event: string extends P ? P : `update:${P}`, value: T) => void} emit
|
14
14
|
* @returns {import("vue").Ref<import("vue").UnwrapRef<T>>}
|
15
15
|
* @template T
|
16
|
+
* @template {string} [P=string]
|
16
17
|
*/
|
17
18
|
export function useProxiedAtomicModel(props, prop, emit) {
|
18
19
|
const internal = ref(props[prop]);
|
@@ -43,11 +44,12 @@ export function useProxiedAtomicModel(props, prop, emit) {
|
|
43
44
|
* Provides a ref model for complex properties.
|
44
45
|
* Watches changes on the provided prop and updates the internal ref
|
45
46
|
* Watches changes on the internal ref and emits the change, if prop has not already been updated
|
46
|
-
* @param {
|
47
|
-
* @param {
|
48
|
-
* @param {(event: string
|
47
|
+
* @param {{ [k in P]: string extends P ? unknown : T }} props
|
48
|
+
* @param {P} prop
|
49
|
+
* @param {(event: string extends P ? P : `update:${P}`, value: T) => void} emit
|
49
50
|
* @returns {import("vue").Ref<import("vue").UnwrapRef<T>>}
|
50
51
|
* @template T
|
52
|
+
* @template {string} [P=string]
|
51
53
|
*/
|
52
54
|
export function useProxiedComplexModel(props, prop, emit) {
|
53
55
|
const internal = ref(structuredClone(toRaw(props[prop])));
|
@@ -1,6 +1,9 @@
|
|
1
1
|
<template>
|
2
|
-
<div
|
3
|
-
|
2
|
+
<div
|
3
|
+
v-if="$slots.default || text"
|
4
|
+
class="ma-0 font-weight-regular rounded-0 bg-base-lighten-4"
|
5
|
+
>
|
6
|
+
<v-container class="py-1 px-2 vcs-help">
|
4
7
|
<slot>
|
5
8
|
<span>{{ $st(text) }}</span>
|
6
9
|
</slot>
|
@@ -10,6 +13,7 @@
|
|
10
13
|
<style lang="scss">
|
11
14
|
.vcs-help {
|
12
15
|
box-sizing: border-box;
|
16
|
+
padding-left: 16px;
|
13
17
|
ol,
|
14
18
|
ul {
|
15
19
|
padding-left: 16px; /* Indentation for list items */
|
@@ -22,7 +26,6 @@
|
|
22
26
|
/**
|
23
27
|
* @description A component for displaying help.
|
24
28
|
* @vue-data {slot} [#default] - Slot to specify html based help. Gets precedence over text prop.
|
25
|
-
* @vue-prop {boolean} show - If help should be displayed. If false, component is completely hidden.
|
26
29
|
* @vue-prop {string} [text] - Optional help text. Must be plain string. Use 'help' slot for html based help texts. Help slot has precedence over text prop.
|
27
30
|
*/
|
28
31
|
export default {
|
@@ -35,10 +38,6 @@
|
|
35
38
|
type: String,
|
36
39
|
default: undefined,
|
37
40
|
},
|
38
|
-
show: {
|
39
|
-
type: Boolean,
|
40
|
-
default: true,
|
41
|
-
},
|
42
41
|
},
|
43
42
|
};
|
44
43
|
</script>
|
@@ -3,21 +3,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
type: StringConstructor;
|
4
4
|
default: undefined;
|
5
5
|
};
|
6
|
-
show: {
|
7
|
-
type: BooleanConstructor;
|
8
|
-
default: boolean;
|
9
|
-
};
|
10
6
|
}, any, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
11
7
|
text: {
|
12
8
|
type: StringConstructor;
|
13
9
|
default: undefined;
|
14
10
|
};
|
15
|
-
show: {
|
16
|
-
type: BooleanConstructor;
|
17
|
-
default: boolean;
|
18
|
-
};
|
19
11
|
}>>, {
|
20
12
|
text: string;
|
21
|
-
show: boolean;
|
22
13
|
}, {}>;
|
23
14
|
export default _default;
|
@@ -32,11 +32,7 @@
|
|
32
32
|
* @vue-prop {boolean} [showReset=false] - Flag to show a reset button in the footer. You need to handle @reset in a child component.
|
33
33
|
* @vue-prop {Array<VcsAction>} [actions] - Optional actions rendered as ActionButtonList in the footer.
|
34
34
|
* @vue-prop {string} [submitButtonTitle='components.apply'] - Option to change the submit button title, e.g. to 'components.add'.
|
35
|
-
* @vue-prop {boolean} [setConfigOnCancel=true] - Whether setConfig shall be called on cancel. Ensures compatability with v5.0.x
|
36
35
|
* @vue-prop {boolean} [autoClose=true] - Whether window component shall be close on submit or cancel.
|
37
|
-
* @vue-prop {function():void} [onSubmit] - Callback function called on submit.
|
38
|
-
* @vue-prop {function():void} [onReset] - Callback function called on reset.
|
39
|
-
* @vue-prop {function():void} [onCancel] - Callback function called on cancel.
|
40
36
|
* @vue-event {Event} submit - Event fired on clicking the submit button.
|
41
37
|
* @vue-event {Event} cancel - Event fired on clicking the cancel button.
|
42
38
|
* @vue-event {Event} reset - Event fired on clicking the reset button.
|
@@ -70,19 +66,8 @@
|
|
70
66
|
type: Boolean,
|
71
67
|
default: true,
|
72
68
|
},
|
73
|
-
onSubmit: {
|
74
|
-
type: Function,
|
75
|
-
default: () => {},
|
76
|
-
},
|
77
|
-
onReset: {
|
78
|
-
type: Function,
|
79
|
-
default: () => {},
|
80
|
-
},
|
81
|
-
onCancel: {
|
82
|
-
type: Function,
|
83
|
-
default: () => {},
|
84
|
-
},
|
85
69
|
},
|
70
|
+
emits: ['submit', 'cancel', 'reset'],
|
86
71
|
setup(props, { attrs, emit }) {
|
87
72
|
const app = inject('vcsApp');
|
88
73
|
|
@@ -95,24 +80,18 @@
|
|
95
80
|
return {
|
96
81
|
isValid: ref(true),
|
97
82
|
submit(e) {
|
98
|
-
props.onSubmit();
|
99
83
|
emit('submit', e);
|
100
84
|
if (props.autoClose) {
|
101
85
|
close();
|
102
86
|
}
|
103
87
|
},
|
104
88
|
cancel(e) {
|
105
|
-
props.onCancel();
|
106
|
-
if (props.setConfigOnCancel) {
|
107
|
-
attrs.setConfig?.();
|
108
|
-
}
|
109
89
|
emit('cancel', e);
|
110
90
|
if (props.autoClose) {
|
111
91
|
close();
|
112
92
|
}
|
113
93
|
},
|
114
94
|
reset(e) {
|
115
|
-
props.onReset();
|
116
95
|
emit('reset', e);
|
117
96
|
},
|
118
97
|
};
|
@@ -19,24 +19,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
19
|
type: BooleanConstructor;
|
20
20
|
default: boolean;
|
21
21
|
};
|
22
|
-
onSubmit: {
|
23
|
-
type: FunctionConstructor;
|
24
|
-
default: () => void;
|
25
|
-
};
|
26
|
-
onReset: {
|
27
|
-
type: FunctionConstructor;
|
28
|
-
default: () => void;
|
29
|
-
};
|
30
|
-
onCancel: {
|
31
|
-
type: FunctionConstructor;
|
32
|
-
default: () => void;
|
33
|
-
};
|
34
22
|
}, {
|
35
23
|
isValid: import("vue").Ref<boolean>;
|
36
24
|
submit(e: any): void;
|
37
25
|
cancel(e: any): void;
|
38
26
|
reset(e: any): void;
|
39
|
-
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
27
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "reset" | "submit")[], "cancel" | "reset" | "submit", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
40
28
|
showReset: {
|
41
29
|
type: BooleanConstructor;
|
42
30
|
default: boolean;
|
@@ -57,26 +45,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
57
45
|
type: BooleanConstructor;
|
58
46
|
default: boolean;
|
59
47
|
};
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
type: FunctionConstructor;
|
66
|
-
default: () => void;
|
67
|
-
};
|
68
|
-
onCancel: {
|
69
|
-
type: FunctionConstructor;
|
70
|
-
default: () => void;
|
71
|
-
};
|
72
|
-
}>>, {
|
73
|
-
onReset: Function;
|
74
|
-
onSubmit: Function;
|
48
|
+
}>> & {
|
49
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
50
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
51
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
52
|
+
}, {
|
75
53
|
actions: unknown[];
|
76
54
|
showReset: boolean;
|
77
55
|
submitButtonTitle: string;
|
78
56
|
setConfigOnCancel: boolean;
|
79
57
|
autoClose: boolean;
|
80
|
-
onCancel: Function;
|
81
58
|
}, {}>;
|
82
59
|
export default _default;
|
@@ -10,6 +10,7 @@
|
|
10
10
|
import { computed, ref, useSlots } from 'vue';
|
11
11
|
import VcsActionButtonList from '../buttons/VcsActionButtonList.vue';
|
12
12
|
import { createEllipseTooltip } from '../composables.js';
|
13
|
+
import { useIconSize } from '../../vuePlugins/vuetify.js';
|
13
14
|
|
14
15
|
const props = defineProps({
|
15
16
|
heading: {
|
@@ -39,14 +40,19 @@
|
|
39
40
|
computed(() => undefined),
|
40
41
|
computed(() => props.heading),
|
41
42
|
);
|
43
|
+
const iconSize = useIconSize();
|
42
44
|
</script>
|
43
45
|
<template>
|
44
46
|
<v-expansion-panel :disabled="disabled" v-bind="$attrs">
|
45
47
|
<v-expansion-panel-title static class="px-2">
|
46
48
|
<template #default="{ expanded }">
|
47
49
|
<v-list-item-title ref="panelHeader">
|
48
|
-
<v-icon v-if="!expanded" class="pr-1">
|
49
|
-
|
50
|
+
<v-icon :size="iconSize" v-if="!expanded" class="pr-1">
|
51
|
+
mdi-chevron-right
|
52
|
+
</v-icon>
|
53
|
+
<v-icon :size="iconSize" v-if="expanded" class="pr-1">
|
54
|
+
mdi-chevron-down
|
55
|
+
</v-icon>
|
50
56
|
<span
|
51
57
|
:class="{
|
52
58
|
'vcs-panel-title__append':
|
@@ -82,7 +88,7 @@
|
|
82
88
|
:deep(.v-expansion-panel-title) {
|
83
89
|
font-size: var(--v-vcs-font-size);
|
84
90
|
min-height: unset;
|
85
|
-
height: var(--v-vcs-
|
91
|
+
height: calc(var(--v-vcs-font-size) * 2 + 6px);
|
86
92
|
line-height: 1.2;
|
87
93
|
padding: 0 8px;
|
88
94
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
|
2
|
-
headerActions: unknown[];
|
3
2
|
disabled: boolean;
|
3
|
+
headerActions: unknown[];
|
4
4
|
heading?: string | undefined;
|
5
5
|
actionButtonListOverflowCount?: number | undefined;
|
6
6
|
$props: {
|
7
|
-
readonly headerActions?: unknown[] | undefined;
|
8
7
|
readonly disabled?: boolean | undefined;
|
8
|
+
readonly headerActions?: unknown[] | undefined;
|
9
9
|
readonly heading?: string | undefined;
|
10
10
|
readonly actionButtonListOverflowCount?: number | undefined;
|
11
11
|
};
|
@@ -12,7 +12,7 @@
|
|
12
12
|
dense
|
13
13
|
variant="text"
|
14
14
|
icon
|
15
|
-
:size="
|
15
|
+
:size="fontSize * 2"
|
16
16
|
:disabled="disabled"
|
17
17
|
elevation="0"
|
18
18
|
@click="open = !open"
|
@@ -36,7 +36,7 @@
|
|
36
36
|
</div>
|
37
37
|
</div>
|
38
38
|
</slot>
|
39
|
-
<VcsHelp :text="helpText"
|
39
|
+
<VcsHelp :text="helpText" v-if="showHelp && ($slots.help || helpText)">
|
40
40
|
<slot name="help" />
|
41
41
|
</VcsHelp>
|
42
42
|
<article class="section-content" v-if="showContent">
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<script>
|
49
49
|
import { computed, reactive, ref } from 'vue';
|
50
50
|
import { VBtn, VIcon } from 'vuetify/components';
|
51
|
-
import {
|
51
|
+
import { useFontSize } from '../../vuePlugins/vuetify.js';
|
52
52
|
import VcsActionButtonList from '../buttons/VcsActionButtonList.vue';
|
53
53
|
import VcsHelp from '../notification/VcsHelp.vue';
|
54
54
|
|
@@ -134,14 +134,14 @@
|
|
134
134
|
return props.headerActions;
|
135
135
|
});
|
136
136
|
|
137
|
-
const
|
137
|
+
const fontSize = useFontSize();
|
138
138
|
|
139
139
|
return {
|
140
140
|
open,
|
141
141
|
showContent,
|
142
142
|
showHelp,
|
143
143
|
actions,
|
144
|
-
|
144
|
+
fontSize,
|
145
145
|
};
|
146
146
|
},
|
147
147
|
};
|
@@ -149,7 +149,7 @@
|
|
149
149
|
|
150
150
|
<style lang="scss" scoped>
|
151
151
|
.vcs-form-section-header {
|
152
|
-
height: calc(var(--v-vcs-
|
152
|
+
height: calc(var(--v-vcs-font-size) * 2 + 14px);
|
153
153
|
}
|
154
154
|
.v-alert--text:before {
|
155
155
|
background-color: transparent;
|
@@ -33,7 +33,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
33
33
|
showContent: import("vue").ComputedRef<boolean>;
|
34
34
|
showHelp: import("vue").ComputedRef<boolean>;
|
35
35
|
actions: import("vue").ComputedRef<VcsAction>;
|
36
|
-
|
36
|
+
fontSize: import("vue").ComputedRef<number>;
|
37
37
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
38
38
|
heading: {
|
39
39
|
type: StringConstructor;
|
@@ -65,8 +65,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
65
65
|
default: undefined;
|
66
66
|
};
|
67
67
|
}>>, {
|
68
|
-
headerActions: unknown[];
|
69
68
|
disabled: boolean;
|
69
|
+
headerActions: unknown[];
|
70
70
|
heading: string;
|
71
71
|
actionButtonListOverflowCount: number;
|
72
72
|
expandable: boolean;
|
@@ -45,13 +45,13 @@
|
|
45
45
|
<div v-if="selectedType === ImageType.ICON">
|
46
46
|
<v-row no-gutters>
|
47
47
|
<v-col>
|
48
|
-
<VcsLabel html-for="style-icon-opacity">
|
48
|
+
<VcsLabel :html-for="`${cid}-style-icon-opacity`">
|
49
49
|
{{ $t('components.style.opacity') }}
|
50
50
|
</VcsLabel>
|
51
51
|
</v-col>
|
52
52
|
<v-col>
|
53
53
|
<VcsSlider
|
54
|
-
id="style-icon-opacity"
|
54
|
+
:id="`${cid}-style-icon-opacity`"
|
55
55
|
v-model="localValue.opacity"
|
56
56
|
step="0.1"
|
57
57
|
type="number"
|
@@ -69,11 +69,13 @@
|
|
69
69
|
:key="input.key"
|
70
70
|
>
|
71
71
|
<v-col>
|
72
|
-
<VcsLabel
|
72
|
+
<VcsLabel :html-for="`${cid}-${input.key}`">{{
|
73
|
+
$st(`components.style.${input.key}`)
|
74
|
+
}}</VcsLabel>
|
73
75
|
</v-col>
|
74
76
|
<v-col cols="3">
|
75
77
|
<VcsTextField
|
76
|
-
:id="
|
78
|
+
:id="`${cid}-${input.key}`"
|
77
79
|
:hide-spin-buttons="true"
|
78
80
|
type="number"
|
79
81
|
:unit="input.unit || ''"
|
@@ -102,11 +104,13 @@
|
|
102
104
|
v-if="extendedShapeSettings || selectedType === ImageType.ICON"
|
103
105
|
>
|
104
106
|
<v-col>
|
105
|
-
<VcsLabel
|
107
|
+
<VcsLabel :html-for="`${cid}-style-shape-scale`">{{
|
108
|
+
$t('components.style.scale')
|
109
|
+
}}</VcsLabel>
|
106
110
|
</v-col>
|
107
111
|
<v-col cols="3">
|
108
112
|
<VcsTextField
|
109
|
-
id="style-shape-scale"
|
113
|
+
:id="`${cid}-style-shape-scale`"
|
110
114
|
:hide-spin-buttons="true"
|
111
115
|
type="number"
|
112
116
|
v-model.number="selectedScale"
|
@@ -148,6 +152,7 @@
|
|
148
152
|
import { toContext } from 'ol/render.js';
|
149
153
|
import { Point } from 'ol/geom.js';
|
150
154
|
import { getImageStyleFromOptions } from '@vcmap/core';
|
155
|
+
import { useComponentId } from '../composables.js';
|
151
156
|
import { useProxiedComplexModel } from '../modelHelper.js';
|
152
157
|
import VcsLabel from '../form-inputs-controls/VcsLabel.vue';
|
153
158
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
@@ -907,6 +912,8 @@
|
|
907
912
|
);
|
908
913
|
});
|
909
914
|
|
915
|
+
const cid = useComponentId();
|
916
|
+
|
910
917
|
return {
|
911
918
|
ImageType,
|
912
919
|
localValue,
|
@@ -919,6 +926,7 @@
|
|
919
926
|
between,
|
920
927
|
currentItems,
|
921
928
|
selectedImageTypeTab,
|
929
|
+
cid,
|
922
930
|
};
|
923
931
|
},
|
924
932
|
};
|