@vcmap/ui 6.0.0-rc.2 → 6.0.0-rc.3
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 +40 -60
- package/build/buildHelpers.js +2 -8
- package/build/info/conf.json +1 -1
- package/config/projects.config.json +2 -1
- package/config/splashscreen.config.json +45 -0
- package/dist/.htaccess +7 -0
- package/dist/assets/@mdi/font/README.md +25 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min-7a4f6be0.css +3 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
- package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.cbf44a.js → core-72f21835.js} +673 -641
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol.86e93c.js → ol-2d33bc8b.js} +42505 -44282
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-2ab43a16.css +1 -0
- package/dist/assets/{ui.7c276c.js → ui-2ab43a16.js} +12026 -12100
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.4d18fe.css → vuetify-760ced3b.css} +1 -1
- package/dist/assets/{vuetify.4d18fe.js → vuetify-760ced3b.js} +5720 -5662
- package/dist/assets/vuetify.js +1 -1
- package/dist/index.html +11 -10
- package/index.d.ts +7 -5
- package/index.html +5 -5
- package/index.js +3 -3
- package/lib/olLib.js +84 -23
- package/package.json +5 -5
- package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +41 -1
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +70 -30
- package/plugins/@vcmap-show-case/form-inputs-example/src/exampleActions.js +7 -11
- package/plugins/@vcmap-show-case/form-inputs-example/src/index.js +2 -2
- package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +21 -8
- package/plugins/@vcmap-show-case/style-input-example/src/StyleExample.vue +29 -90
- package/public/assets/@mdi/font/README.md +25 -0
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +2 -2
- package/public/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
- package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/src/actions/actionHelper.js +20 -20
- package/src/actions/flightActions.js +5 -5
- package/src/actions/listActions.d.ts +0 -7
- package/src/actions/listActions.js +4 -20
- package/src/actions/stateRefAction.js +2 -2
- package/src/application/VcsApp.vue +52 -27
- package/src/application/VcsApp.vue.d.ts +1 -0
- package/src/application/VcsAttributions.vue +2 -13
- package/src/application/VcsAttributionsFooter.vue +10 -11
- package/src/application/VcsPositionDisplay.vue +8 -23
- package/src/application/VcsPositionDisplay.vue.d.ts +0 -1
- package/src/application/VcsSettings.vue +10 -17
- package/src/application/VcsSplashScreen.vue +25 -42
- package/src/application/VcsSplashScreen.vue.d.ts +0 -2
- package/src/application/VcsTextPage.vue +12 -43
- package/src/application/VcsTextPage.vue.d.ts +4 -8
- package/src/application/VcsTextPageFooter.vue +22 -40
- package/src/components/extent/VcsExtentEditor.vue +1 -1
- package/src/components/flight/VcsFlightAnchorsComponent.vue +63 -36
- package/src/components/flight/VcsFlightComponent.vue +16 -21
- package/src/components/flight/VcsFlightPlayer.vue +27 -5
- package/src/components/form-inputs-controls/VcsCheckbox.vue +9 -5
- package/src/components/form-inputs-controls/VcsCoordinate.vue +13 -1
- package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +5 -2
- package/src/components/form-inputs-controls/VcsDatePicker.vue +34 -60
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +1 -63
- package/src/components/form-inputs-controls/VcsFileInput.vue +17 -18
- package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +17 -3
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +39 -27
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +5 -2
- package/src/components/form-inputs-controls/VcsSlider.vue +14 -1
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +5 -2
- package/src/components/form-inputs-controls/VcsTextArea.vue +26 -22
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +6 -4
- package/src/components/form-inputs-controls/VcsWizardStep.vue +1 -1
- package/src/components/form-inputs-controls/vcsTextField.scss +8 -8
- package/src/components/form-output/VcsFormattedNumber.vue +15 -1
- package/src/components/form-output/VcsFormattedNumber.vue.d.ts +9 -0
- package/src/components/lists/VcsActionList.vue +7 -7
- package/src/components/lists/VcsList.vue +10 -17
- package/src/components/lists/VcsList.vue.d.ts +3 -7
- package/src/components/lists/VcsListItem.vue +51 -21
- package/src/components/lists/VcsListItem.vue.d.ts +11 -5
- package/src/components/section/VcsExpansionPanel.vue +101 -0
- package/src/components/section/VcsExpansionPanel.vue.d.ts +19 -0
- package/src/components/style/MenuWrapper.vue +24 -26
- package/src/components/style/MenuWrapper.vue.d.ts +4 -4
- package/src/components/style/VcsFillMenu.vue +9 -16
- package/src/components/style/VcsFillMenu.vue.d.ts +0 -18
- package/src/components/style/VcsFillSelector.vue +13 -16
- package/src/components/style/VcsImageMenu.vue +8 -25
- package/src/components/style/VcsImageMenu.vue.d.ts +0 -27
- package/src/components/style/VcsImageSelector.vue +102 -167
- package/src/components/style/VcsImageSelector.vue.d.ts +15 -15
- package/src/components/style/VcsStrokeMenu.vue +8 -15
- package/src/components/style/VcsStrokeMenu.vue.d.ts +0 -18
- package/src/components/style/VcsStrokeSelector.vue +11 -18
- package/src/components/style/VcsTextMenu.vue +9 -12
- package/src/components/style/VcsTextMenu.vue.d.ts +0 -9
- package/src/components/style/VcsTextSelector.vue +79 -95
- package/src/components/style/VcsTextSelector.vue.d.ts +20 -22
- package/src/components/style/VcsVectorStyleComponent.vue +7 -18
- package/src/components/style/VcsVectorStyleComponent.vue.d.ts +1 -1
- package/src/components/style/composables.d.ts +0 -14
- package/src/components/style/composables.js +0 -49
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +39 -6
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +1 -1
- package/src/components/viewpoint/VcsViewpointComponent.vue +21 -8
- package/src/components/viewpoint/VcsViewpointEditor.vue +1 -0
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/contentTreeItem.js +7 -7
- package/src/featureInfo/featureInfo.js +8 -10
- package/src/init.d.ts +5 -38
- package/src/init.js +19 -18
- package/src/legend/StyleLegendItem.vue +4 -9
- package/src/legend/VcsLegend.vue +28 -54
- package/src/manager/buttonManager.js +4 -4
- package/src/manager/collectionManager/CollectionComponent.vue +17 -42
- package/src/manager/collectionManager/CollectionComponent.vue.d.ts +4 -2
- package/src/manager/collectionManager/CollectionComponentContent.vue +7 -6
- package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +3 -1
- package/src/manager/collectionManager/CollectionComponentList.vue +10 -8
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +4 -2
- package/src/manager/collectionManager/CollectionComponentProvider.vue +1 -1
- package/src/manager/collectionManager/CollectionComponentStandalone.vue +3 -2
- package/src/manager/collectionManager/CollectionManager.vue +1 -1
- package/src/manager/collectionManager/collectionComponentClass.js +6 -9
- package/src/manager/collectionManager/collectionManager.js +10 -10
- package/src/manager/collectionManager/editorCollectionComponentClass.js +4 -4
- package/src/manager/contextMenu/contextMenuManager.js +2 -2
- package/src/manager/navbarManager.js +2 -2
- package/src/manager/panel/panelManager.js +3 -3
- package/src/manager/toolbox/toolboxManager.js +10 -10
- package/src/manager/window/windowManager.d.ts +2 -2
- package/src/manager/window/windowManager.js +4 -4
- package/src/search/search.js +2 -2
- package/src/siteConfig.js +1 -1
- package/src/state.js +4 -4
- package/src/vcsUiApp.d.ts +14 -10
- package/src/vcsUiApp.js +1 -1
- package/src/vuePlugins/vuetify.d.ts +2 -0
- package/src/vuePlugins/vuetify.js +11 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
- package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +0 -3
- package/dist/assets/index-8eGauqjA.js +0 -1
- package/dist/assets/ui.7c276c.css +0 -1
- package/public/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
- package/src/application/VcsCustomScreen.vue +0 -45
- package/src/application/VcsCustomScreen.vue.d.ts +0 -15
- /package/dist/assets/{cesium.0b750d.js → cesium-cb4dbfba.js} +0 -0
- /package/dist/assets/{favicon-128.4c4ce5.png → favicon-128-4c4ce5df.png} +0 -0
- /package/dist/assets/{favicon-180.5b99c0.png → favicon-180-4c4ce5df.png} +0 -0
- /package/dist/assets/{favicon-192.0e205e.png → favicon-192-4c4ce5df.png} +0 -0
- /package/dist/assets/{favicon-32.6b9add.png → favicon-32-4c4ce5df.png} +0 -0
- /package/dist/assets/{favicon.d5ec97.svg → favicon-4c4ce5df.svg} +0 -0
- /package/dist/assets/font/{TitilliumWeb-Regular.9ca076.woff2 → TitilliumWeb-Regular-9ca076be.woff2} +0 -0
- /package/dist/assets/style/{icon-marker.70960f.png → icon-marker-70960f05.png} +0 -0
- /package/dist/assets/style/{icon-marker-blue.534e37.png → icon-marker-blue-534e374b.png} +0 -0
- /package/dist/assets/style/{icon-marker-green.0b6a92.png → icon-marker-green-0b6a92bc.png} +0 -0
- /package/dist/assets/style/{icon-marker-o.036477.png → icon-marker-o-036477fa.png} +0 -0
- /package/dist/assets/style/{icon-marker-o-blue.7b6d62.png → icon-marker-o-blue-7b6d6279.png} +0 -0
- /package/dist/assets/style/{icon-marker-o-green.c863c0.png → icon-marker-o-green-c863c0fa.png} +0 -0
- /package/dist/assets/style/{icon-marker-o-red.93ff58.png → icon-marker-o-red-93ff58df.png} +0 -0
- /package/dist/assets/style/{icon-marker-red.313d03.png → icon-marker-red-313d03e8.png} +0 -0
- /package/dist/assets/style/{icon-pin.b7ce77.png → icon-pin-b7ce771e.png} +0 -0
- /package/dist/assets/style/{icon-pin-blue.7be369.png → icon-pin-blue-7be369a3.png} +0 -0
- /package/dist/assets/style/{icon-pin-green.cbb935.png → icon-pin-green-cbb935fe.png} +0 -0
- /package/dist/assets/style/{icon-pin-red.3f25b2.png → icon-pin-red-3f25b245.png} +0 -0
- /package/dist/assets/{vue.a3cd64.js → vue-03b265aa.js} +0 -0
- /package/public/assets/{favicon-128.png → favicon-128-4c4ce5df.png} +0 -0
- /package/public/assets/{favicon-180.png → favicon-180-4c4ce5df.png} +0 -0
- /package/public/assets/{favicon-192.png → favicon-192-4c4ce5df.png} +0 -0
- /package/public/assets/{favicon-32.png → favicon-32-4c4ce5df.png} +0 -0
- /package/public/assets/{favicon.svg → favicon-4c4ce5df.svg} +0 -0
- /package/src/components/{form-inputs-controls → section}/VcsFormSection.vue +0 -0
- /package/src/components/{form-inputs-controls → section}/VcsFormSection.vue.d.ts +0 -0
@@ -6,6 +6,7 @@
|
|
6
6
|
VTooltip,
|
7
7
|
} from 'vuetify/components';
|
8
8
|
import { computed, ref } from 'vue';
|
9
|
+
import { is } from '@vcsuite/check';
|
9
10
|
import VcsBadge from '../notification/VcsBadge.vue';
|
10
11
|
import VcsActionButtonList from '../buttons/VcsActionButtonList.vue';
|
11
12
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
@@ -27,17 +28,35 @@
|
|
27
28
|
},
|
28
29
|
});
|
29
30
|
|
30
|
-
const
|
31
|
+
const rename = ref(false);
|
32
|
+
const renameAction = computed(() => {
|
33
|
+
if (props.item.renamable) {
|
34
|
+
return {
|
35
|
+
name: 'list.renameItem',
|
36
|
+
...(is(props.item.renamable, Object) ? props.item.renamable : {}),
|
37
|
+
callback() {
|
38
|
+
rename.value = true;
|
39
|
+
},
|
40
|
+
};
|
41
|
+
}
|
42
|
+
return undefined;
|
43
|
+
});
|
31
44
|
|
32
45
|
function renameOff() {
|
33
|
-
|
34
|
-
props.item.rename = false;
|
46
|
+
rename.value = false;
|
35
47
|
}
|
36
48
|
|
49
|
+
const actions = computed(() => {
|
50
|
+
if (renameAction.value) {
|
51
|
+
return [...(props.item?.actions || []), renameAction.value];
|
52
|
+
}
|
53
|
+
return [...(props.item?.actions || [])];
|
54
|
+
});
|
55
|
+
|
37
56
|
const title = ref();
|
38
57
|
const tooltip = createEllipseTooltip(
|
39
58
|
computed(() => {
|
40
|
-
if (
|
59
|
+
if (rename.value) {
|
41
60
|
return undefined;
|
42
61
|
}
|
43
62
|
return title.value?.$el;
|
@@ -46,9 +65,8 @@
|
|
46
65
|
computed(() => props.item?.title),
|
47
66
|
);
|
48
67
|
|
49
|
-
function
|
68
|
+
function renameItem(item, newTitle) {
|
50
69
|
if (newTitle) {
|
51
|
-
emits('item-renamed', { item, newTitle });
|
52
70
|
item.titleChanged?.(newTitle);
|
53
71
|
}
|
54
72
|
}
|
@@ -61,15 +79,17 @@
|
|
61
79
|
{{ item.icon }}
|
62
80
|
</v-icon>
|
63
81
|
</template>
|
64
|
-
<template #
|
65
|
-
<v-
|
66
|
-
<
|
67
|
-
|
82
|
+
<template #title>
|
83
|
+
<slot name="title" v-bind="{ item, dragging, tooltip }">
|
84
|
+
<v-list-item-title
|
85
|
+
ref="title"
|
86
|
+
:class="{ 'vcs-list-item__rename': rename }"
|
87
|
+
>
|
68
88
|
<vcs-text-field
|
69
|
-
v-if="
|
89
|
+
v-if="rename"
|
70
90
|
:model-value="item.title"
|
71
91
|
autofocus
|
72
|
-
@update:model-value="(value) =>
|
92
|
+
@update:model-value="(value) => renameItem(item, value)"
|
73
93
|
@click.stop
|
74
94
|
@keydown.enter="renameOff"
|
75
95
|
@blur="renameOff"
|
@@ -79,18 +99,23 @@
|
|
79
99
|
<template v-else>
|
80
100
|
{{ $st(item.title) }}
|
81
101
|
</template>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
102
|
+
<v-tooltip v-if="dragging === false && tooltip" activator="parent">
|
103
|
+
{{ $st(tooltip) }}
|
104
|
+
</v-tooltip>
|
105
|
+
</v-list-item-title>
|
106
|
+
</slot>
|
107
|
+
</template>
|
108
|
+
<template #subtitle>
|
109
|
+
<slot name="subtitle" v-bind="{ item }" />
|
110
|
+
</template>
|
111
|
+
<template #default="scope">
|
112
|
+
<slot name="default" v-bind="{ ...scope, item, dragging, tooltip }" />
|
88
113
|
</template>
|
89
114
|
<template #append>
|
90
115
|
<vcs-badge v-if="item.hasUpdate" class="mr-1" />
|
91
116
|
<vcs-action-button-list
|
92
|
-
v-if="
|
93
|
-
:actions="
|
117
|
+
v-if="actions.length > 0"
|
118
|
+
:actions="actions"
|
94
119
|
:disabled="item.disabled"
|
95
120
|
:block-overflow="true"
|
96
121
|
:overflow-count="actionButtonListOverflowCount"
|
@@ -102,7 +127,9 @@
|
|
102
127
|
|
103
128
|
<style lang="scss" scoped>
|
104
129
|
.v-list-item {
|
105
|
-
padding: 4px 8px 4px
|
130
|
+
padding: 4px 8px 4px 8px;
|
131
|
+
padding-inline-end: 8px !important;
|
132
|
+
padding-inline-start: 16px !important;
|
106
133
|
&.border-bottom {
|
107
134
|
border-bottom: solid;
|
108
135
|
border-bottom-color: rgb(var(--v-theme-base-lighten-2));
|
@@ -150,5 +177,8 @@
|
|
150
177
|
:deep(.v-list-item__overlay) {
|
151
178
|
background-color: transparent;
|
152
179
|
}
|
180
|
+
:deep(.vcs-list-item__rename) {
|
181
|
+
color: rgb(var(--v-theme-on-surface));
|
182
|
+
}
|
153
183
|
}
|
154
184
|
</style>
|
@@ -1,18 +1,24 @@
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
|
2
|
-
$emit: (event: "item-renamed", ...args: any[]) => void;
|
3
2
|
$props: {
|
4
3
|
readonly [x: string]: any;
|
5
4
|
};
|
6
5
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
7
|
-
|
6
|
+
title?(_: {
|
8
7
|
item: any;
|
8
|
+
dragging: any;
|
9
|
+
tooltip: string;
|
9
10
|
}): any;
|
10
|
-
|
11
|
+
subtitle?(_: {
|
11
12
|
item: any;
|
12
13
|
}): any;
|
13
|
-
|
14
|
+
default?(_: {
|
14
15
|
item: any;
|
15
|
-
|
16
|
+
dragging: any;
|
17
|
+
tooltip: string;
|
18
|
+
isActive: boolean;
|
19
|
+
isSelected: boolean;
|
20
|
+
isIndeterminate: boolean;
|
21
|
+
select: (value: boolean) => void;
|
16
22
|
}): any;
|
17
23
|
}>;
|
18
24
|
export default _default;
|
@@ -0,0 +1,101 @@
|
|
1
|
+
<script setup>
|
2
|
+
import {
|
3
|
+
VExpansionPanel,
|
4
|
+
VExpansionPanelText,
|
5
|
+
VExpansionPanelTitle,
|
6
|
+
VIcon,
|
7
|
+
VTooltip,
|
8
|
+
VListItemTitle,
|
9
|
+
} from 'vuetify/components';
|
10
|
+
import { computed, ref, useSlots } from 'vue';
|
11
|
+
import VcsActionButtonList from '../buttons/VcsActionButtonList.vue';
|
12
|
+
import { createEllipseTooltip } from '../composables.js';
|
13
|
+
|
14
|
+
const props = defineProps({
|
15
|
+
heading: {
|
16
|
+
type: String,
|
17
|
+
default: undefined,
|
18
|
+
},
|
19
|
+
disabled: {
|
20
|
+
type: Boolean,
|
21
|
+
default: false,
|
22
|
+
},
|
23
|
+
headerActions: {
|
24
|
+
type: Array,
|
25
|
+
default: () => [],
|
26
|
+
},
|
27
|
+
actionButtonListOverflowCount: {
|
28
|
+
type: Number,
|
29
|
+
required: false,
|
30
|
+
default: undefined,
|
31
|
+
},
|
32
|
+
});
|
33
|
+
|
34
|
+
const slots = useSlots();
|
35
|
+
|
36
|
+
const panelHeader = ref(null);
|
37
|
+
const panelHeaderTooltip = createEllipseTooltip(
|
38
|
+
computed(() => panelHeader.value?.$el),
|
39
|
+
computed(() => undefined),
|
40
|
+
computed(() => props.heading),
|
41
|
+
);
|
42
|
+
</script>
|
43
|
+
<template>
|
44
|
+
<v-expansion-panel :disabled="disabled" v-bind="$attrs">
|
45
|
+
<v-expansion-panel-title static class="px-2">
|
46
|
+
<template #default="{ expanded }">
|
47
|
+
<v-list-item-title ref="panelHeader">
|
48
|
+
<v-icon v-if="!expanded" class="pr-1"> mdi-chevron-down </v-icon>
|
49
|
+
<v-icon v-if="expanded" class="pr-1"> mdi-chevron-right </v-icon>
|
50
|
+
<span
|
51
|
+
:class="{
|
52
|
+
'vcs-panel-title__append':
|
53
|
+
!!slots['header-append'] && !!panelHeaderTooltip,
|
54
|
+
}"
|
55
|
+
>
|
56
|
+
{{ $st(heading) }}
|
57
|
+
</span>
|
58
|
+
<v-tooltip
|
59
|
+
v-if="panelHeaderTooltip"
|
60
|
+
activator=".v-expansion-panel-title"
|
61
|
+
>
|
62
|
+
{{ $st(panelHeaderTooltip) }}
|
63
|
+
</v-tooltip>
|
64
|
+
<slot name="header-append" />
|
65
|
+
</v-list-item-title>
|
66
|
+
</template>
|
67
|
+
<template #actions>
|
68
|
+
<VcsActionButtonList
|
69
|
+
v-if="headerActions?.length > 0"
|
70
|
+
:actions="headerActions"
|
71
|
+
:overflow-count="actionButtonListOverflowCount"
|
72
|
+
/>
|
73
|
+
</template>
|
74
|
+
</v-expansion-panel-title>
|
75
|
+
<v-expansion-panel-text>
|
76
|
+
<slot name="default" />
|
77
|
+
</v-expansion-panel-text>
|
78
|
+
</v-expansion-panel>
|
79
|
+
</template>
|
80
|
+
|
81
|
+
<style scoped lang="scss">
|
82
|
+
:deep(.v-expansion-panel-title) {
|
83
|
+
font-size: var(--v-vcs-font-size);
|
84
|
+
min-height: unset;
|
85
|
+
height: var(--v-vcs-item-height);
|
86
|
+
line-height: 1.2;
|
87
|
+
padding: 0 8px;
|
88
|
+
}
|
89
|
+
|
90
|
+
.vcs-panel-title__append {
|
91
|
+
width: 90%;
|
92
|
+
display: inline-block;
|
93
|
+
overflow: hidden;
|
94
|
+
text-overflow: ellipsis;
|
95
|
+
vertical-align: bottom;
|
96
|
+
}
|
97
|
+
|
98
|
+
:deep(.v-expansion-panel-text__wrapper) {
|
99
|
+
padding: 0 0;
|
100
|
+
}
|
101
|
+
</style>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
|
2
|
+
headerActions: unknown[];
|
3
|
+
disabled: boolean;
|
4
|
+
heading?: string | undefined;
|
5
|
+
actionButtonListOverflowCount?: number | undefined;
|
6
|
+
$props: {
|
7
|
+
readonly headerActions?: unknown[] | undefined;
|
8
|
+
readonly disabled?: boolean | undefined;
|
9
|
+
readonly heading?: string | undefined;
|
10
|
+
readonly actionButtonListOverflowCount?: number | undefined;
|
11
|
+
};
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
13
|
+
"header-append"?(_: {}): any;
|
14
|
+
default?(_: {}): any;
|
15
|
+
}>;
|
16
|
+
export default _default;
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
18
|
+
$slots: S;
|
19
|
+
});
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="d-flex align-center py-1">
|
4
4
|
<VcsCheckbox
|
5
5
|
:model-value="!!modelValue"
|
6
|
-
@
|
6
|
+
@update:modelValue="handleCheckbox"
|
7
7
|
:disabled="disabled"
|
8
8
|
/>
|
9
9
|
<v-menu
|
@@ -11,24 +11,19 @@
|
|
11
11
|
persistent
|
12
12
|
v-model="isMenuOpen"
|
13
13
|
:absolute="true"
|
14
|
-
:disabled="!
|
15
|
-
|
16
|
-
max-width="300"
|
14
|
+
:disabled="!modelValue || disabled"
|
15
|
+
width="300"
|
17
16
|
>
|
18
17
|
<template #activator="{ props }">
|
19
|
-
<
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<slot name="preview" />
|
29
|
-
</v-card>
|
30
|
-
</template>
|
31
|
-
</VcsTooltip>
|
18
|
+
<v-card
|
19
|
+
rounded
|
20
|
+
height="24px"
|
21
|
+
width="32px"
|
22
|
+
v-bind="props"
|
23
|
+
class="tiled-background"
|
24
|
+
>
|
25
|
+
<slot name="preview" />
|
26
|
+
</v-card>
|
32
27
|
</template>
|
33
28
|
<VcsFormSection
|
34
29
|
:heading="name"
|
@@ -60,21 +55,22 @@
|
|
60
55
|
</template>
|
61
56
|
|
62
57
|
<script>
|
63
|
-
import { ref } from 'vue';
|
58
|
+
import { ref, toRaw } from 'vue';
|
64
59
|
import { VSheet, VMenu, VCard } from 'vuetify/components';
|
65
|
-
import VcsFormSection from '../
|
60
|
+
import VcsFormSection from '../section/VcsFormSection.vue';
|
66
61
|
import VcsCheckbox from '../form-inputs-controls/VcsCheckbox.vue';
|
67
|
-
import VcsTooltip from '../notification/VcsTooltip.vue';
|
68
62
|
|
69
63
|
/**
|
70
64
|
* @description A wrapper for style components, that provides:
|
71
65
|
* - a 32 x 24 px preview
|
72
|
-
* - a checkbox that emits null when unchecked and the value of the valueDefault prop when checked again.
|
66
|
+
* - a checkbox that emits null when unchecked and the value of the valueDefault prop when checked again.
|
67
|
+
* If the valueDefault is undefined or null, the valueFallback will be emitted.
|
73
68
|
* - a menu that pops up when clicking the preview. It has also a reset button that emits the value of the valueDefault prop when clicked
|
74
|
-
* @vue-prop {Object} [
|
69
|
+
* @vue-prop {Object} [modelValue] - Style options that are modelled by the checkbox.
|
75
70
|
* @vue-prop {string} name - The name that is displayed in the header of the menu and in the tooltip of the preview.
|
76
71
|
* @vue-prop {Object} [valueDefault] - The default Options, that are applied when clicking reset or setting the checkbox from null to true.
|
77
72
|
* @vue-prop {Object} valueFallback - The fallback Options, in case the valueDefault is null or undefined. These are applied when the checkbox is checked again and the default value is null. The fallback value must not be null or undefined.
|
73
|
+
* @vue-prop {boolean} [disabled=false] - Disable the input
|
78
74
|
*/
|
79
75
|
export default {
|
80
76
|
name: 'MenuWrapper',
|
@@ -83,13 +79,11 @@
|
|
83
79
|
VMenu,
|
84
80
|
VCard,
|
85
81
|
VcsFormSection,
|
86
|
-
VcsTooltip,
|
87
82
|
VcsCheckbox,
|
88
83
|
},
|
89
84
|
props: {
|
90
85
|
modelValue: {
|
91
86
|
default: undefined,
|
92
|
-
required: false,
|
93
87
|
type: Object,
|
94
88
|
},
|
95
89
|
valueDefault: {
|
@@ -109,13 +103,14 @@
|
|
109
103
|
type: Boolean,
|
110
104
|
},
|
111
105
|
},
|
106
|
+
emits: ['update:modelValue'],
|
112
107
|
setup(props, { emit }) {
|
113
108
|
const isMenuOpen = ref(false);
|
114
109
|
|
115
110
|
return {
|
116
111
|
isMenuOpen,
|
117
112
|
reset() {
|
118
|
-
emit('update:modelValue', props.valueDefault);
|
113
|
+
emit('update:modelValue', structuredClone(toRaw(props.valueDefault)));
|
119
114
|
},
|
120
115
|
close() {
|
121
116
|
isMenuOpen.value = false;
|
@@ -123,7 +118,10 @@
|
|
123
118
|
handleCheckbox(value) {
|
124
119
|
emit(
|
125
120
|
'update:modelValue',
|
126
|
-
value
|
121
|
+
value
|
122
|
+
? structuredClone(toRaw(props.valueDefault)) ||
|
123
|
+
structuredClone(toRaw(props.valueFallback))
|
124
|
+
: null,
|
127
125
|
);
|
128
126
|
},
|
129
127
|
};
|
@@ -1,7 +1,6 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
2
2
|
modelValue: {
|
3
3
|
default: undefined;
|
4
|
-
required: false;
|
5
4
|
type: ObjectConstructor;
|
6
5
|
};
|
7
6
|
valueDefault: {
|
@@ -25,10 +24,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
25
24
|
reset(): void;
|
26
25
|
close(): void;
|
27
26
|
handleCheckbox(value: any): void;
|
28
|
-
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
27
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
29
28
|
modelValue: {
|
30
29
|
default: undefined;
|
31
|
-
required: false;
|
32
30
|
type: ObjectConstructor;
|
33
31
|
};
|
34
32
|
valueDefault: {
|
@@ -47,7 +45,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
47
45
|
default: boolean;
|
48
46
|
type: BooleanConstructor;
|
49
47
|
};
|
50
|
-
}
|
48
|
+
}>> & {
|
49
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
50
|
+
}, {
|
51
51
|
disabled: boolean;
|
52
52
|
modelValue: Record<string, any>;
|
53
53
|
valueDefault: Record<string, any>;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<template>
|
2
2
|
<MenuWrapper
|
3
|
-
v-bind="{ ...$attrs, modelValue, valueDefault, disabled }"
|
4
3
|
:value-fallback="{ color: [255, 255, 255, 1] }"
|
5
4
|
name="components.style.fill"
|
5
|
+
v-bind="{ ...$attrs, ...$props }"
|
6
6
|
>
|
7
7
|
<template #preview>
|
8
8
|
<v-sheet :color="rgbaString" width="100%" height="100%" />
|
9
9
|
</template>
|
10
10
|
<template #content>
|
11
|
-
<VcsFillSelector
|
11
|
+
<VcsFillSelector v-bind="{ ...$attrs, ...$props }" />
|
12
12
|
</template>
|
13
13
|
</MenuWrapper>
|
14
14
|
</template>
|
@@ -16,16 +16,16 @@
|
|
16
16
|
<script>
|
17
17
|
import { computed } from 'vue';
|
18
18
|
import { VSheet } from 'vuetify/components';
|
19
|
+
import { useProxiedAtomicModel } from '../modelHelper.js';
|
19
20
|
import VcsFillSelector from './VcsFillSelector.vue';
|
20
21
|
import MenuWrapper from './MenuWrapper.vue';
|
21
22
|
import { useColorObject, rgbaObjectToString } from './composables.js';
|
22
23
|
|
23
24
|
/**
|
24
25
|
* @description A wrapper for the VcsFillSelector, that has a small color preview and a menu that pops up when clicking the preview, containing the fill selector.
|
25
|
-
* When clicking the reset button, the valueDefault is emitted, when unchecking the checkbox in front of the preview, null is emitted.
|
26
|
-
*
|
27
|
-
* @vue-prop {import("ol/style/Fill").Options} [
|
28
|
-
* @vue-prop {boolean} [disabled=false] - Disable the input
|
26
|
+
* When clicking the reset button, the valueDefault is emitted, when unchecking the checkbox in front of the preview, null is emitted.
|
27
|
+
* If it is checked again, valueDefault is emitted. If the valueDefault is undefined or null, { color: [255, 255, 255, 1] } is emitted.
|
28
|
+
* @vue-prop {import("ol/style/Fill").Options} [modelValue] - The Fill Options
|
29
29
|
*/
|
30
30
|
export default {
|
31
31
|
name: 'VcsFillMenu',
|
@@ -39,17 +39,10 @@
|
|
39
39
|
type: Object,
|
40
40
|
default: undefined,
|
41
41
|
},
|
42
|
-
valueDefault: {
|
43
|
-
type: Object,
|
44
|
-
default: undefined,
|
45
|
-
},
|
46
|
-
disabled: {
|
47
|
-
type: Boolean,
|
48
|
-
default: false,
|
49
|
-
},
|
50
42
|
},
|
51
|
-
setup(props) {
|
52
|
-
const
|
43
|
+
setup(props, { emit }) {
|
44
|
+
const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
|
45
|
+
const rgbaObject = useColorObject(() => localValue.value?.color);
|
53
46
|
return {
|
54
47
|
rgbaString: computed(() => rgbaObjectToString(rgbaObject.value)),
|
55
48
|
};
|
@@ -3,14 +3,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
type: ObjectConstructor;
|
4
4
|
default: undefined;
|
5
5
|
};
|
6
|
-
valueDefault: {
|
7
|
-
type: ObjectConstructor;
|
8
|
-
default: undefined;
|
9
|
-
};
|
10
|
-
disabled: {
|
11
|
-
type: BooleanConstructor;
|
12
|
-
default: boolean;
|
13
|
-
};
|
14
6
|
}, {
|
15
7
|
rgbaString: import("vue").ComputedRef<string>;
|
16
8
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -18,17 +10,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
10
|
type: ObjectConstructor;
|
19
11
|
default: undefined;
|
20
12
|
};
|
21
|
-
valueDefault: {
|
22
|
-
type: ObjectConstructor;
|
23
|
-
default: undefined;
|
24
|
-
};
|
25
|
-
disabled: {
|
26
|
-
type: BooleanConstructor;
|
27
|
-
default: boolean;
|
28
|
-
};
|
29
13
|
}>>, {
|
30
|
-
disabled: boolean;
|
31
14
|
modelValue: Record<string, any>;
|
32
|
-
valueDefault: Record<string, any>;
|
33
15
|
}, {}>;
|
34
16
|
export default _default;
|
@@ -1,26 +1,25 @@
|
|
1
1
|
<template>
|
2
|
-
<v-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</v-sheet>
|
2
|
+
<v-color-picker
|
3
|
+
:model-value="rgbaObject"
|
4
|
+
@update:model-value="updateColor"
|
5
|
+
mode="rgba"
|
6
|
+
:disabled="!modelValue"
|
7
|
+
width="100%"
|
8
|
+
/>
|
10
9
|
</template>
|
11
10
|
|
12
11
|
<script>
|
13
|
-
import {
|
12
|
+
import { VColorPicker } from 'vuetify/components';
|
14
13
|
import { useColorObject } from './composables.js';
|
14
|
+
import { useProxiedComplexModel } from '../modelHelper.js';
|
15
15
|
|
16
16
|
/**
|
17
17
|
* @description Allows to model a JSON representation of ol/Fill vector style with a vuetify VColorPicker.
|
18
|
-
* @vue-prop {import("ol/style/Fill").Options}
|
18
|
+
* @vue-prop {import("ol/style/Fill").Options} [modelValue] - The Fill Options
|
19
19
|
*/
|
20
20
|
export default {
|
21
21
|
name: 'VcsFillSelector',
|
22
22
|
components: {
|
23
|
-
VSheet,
|
24
23
|
VColorPicker,
|
25
24
|
},
|
26
25
|
props: {
|
@@ -30,13 +29,11 @@
|
|
30
29
|
},
|
31
30
|
},
|
32
31
|
setup(props, { emit }) {
|
32
|
+
const localValue = useProxiedComplexModel(props, 'modelValue', emit);
|
33
33
|
return {
|
34
|
-
rgbaObject: useColorObject(() =>
|
34
|
+
rgbaObject: useColorObject(() => localValue.value?.color),
|
35
35
|
updateColor(rgba) {
|
36
|
-
|
37
|
-
color: [rgba.r, rgba.g, rgba.b, rgba.a],
|
38
|
-
};
|
39
|
-
emit('update:modelValue', fill);
|
36
|
+
localValue.value.color = [rgba.r, rgba.g, rgba.b, rgba.a];
|
40
37
|
},
|
41
38
|
};
|
42
39
|
},
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<MenuWrapper
|
3
|
-
v-bind="{ ...$attrs, modelValue, valueDefault }"
|
4
3
|
:value-fallback="{
|
5
4
|
radius: 10,
|
6
5
|
fill: { color: [255, 255, 255, 1] },
|
7
6
|
stroke: { color: [0, 0, 0, 1], width: 2 },
|
8
7
|
}"
|
9
8
|
name="components.style.image"
|
9
|
+
v-bind="{ ...$attrs, ...$props }"
|
10
10
|
>
|
11
11
|
<template #preview>
|
12
12
|
<canvas ref="canvas" width="32" height="24" />
|
@@ -15,10 +15,7 @@
|
|
15
15
|
<VcsImageSelector
|
16
16
|
v-bind="{
|
17
17
|
...$attrs,
|
18
|
-
|
19
|
-
valueDefault,
|
20
|
-
iconOptions,
|
21
|
-
extendedShapeSettings,
|
18
|
+
...$props,
|
22
19
|
}"
|
23
20
|
class="pb-2"
|
24
21
|
/>
|
@@ -28,15 +25,13 @@
|
|
28
25
|
|
29
26
|
<script>
|
30
27
|
import { onMounted, ref, watch } from 'vue';
|
28
|
+
import { useProxiedAtomicModel } from '../modelHelper.js';
|
31
29
|
import MenuWrapper from './MenuWrapper.vue';
|
32
30
|
import VcsImageSelector, { drawImageStyle } from './VcsImageSelector.vue';
|
33
31
|
|
34
32
|
/**
|
35
33
|
* @description A wrapper for the VcsImageSelector, that has a small shape/icon preview and a menu that pops up when clicking the preview, containing the image selector.
|
36
|
-
* @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} modelValue - The Image options
|
37
|
-
* @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} valueDefault - The default image options
|
38
|
-
* @vue-prop {import("ol/style/Icon").Options} iconOptions - The icon options too choose from. Scale and opacity are ignored.
|
39
|
-
* @vue-prop {boolean} [extendedShapeSettings=false] - If true, there are all the input fields needed to create arbitrary ol RegularShapes.
|
34
|
+
* @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} [modelValue] - The Image options
|
40
35
|
*/
|
41
36
|
export default {
|
42
37
|
name: 'VcsImageMenu',
|
@@ -49,29 +44,17 @@
|
|
49
44
|
type: Object,
|
50
45
|
default: undefined,
|
51
46
|
},
|
52
|
-
valueDefault: {
|
53
|
-
type: Object,
|
54
|
-
default: undefined,
|
55
|
-
},
|
56
|
-
iconOptions: {
|
57
|
-
type: Array,
|
58
|
-
default: undefined,
|
59
|
-
},
|
60
|
-
extendedShapeSettings: {
|
61
|
-
type: Boolean,
|
62
|
-
default: false,
|
63
|
-
},
|
64
47
|
},
|
65
|
-
setup(props) {
|
48
|
+
setup(props, { emits }) {
|
66
49
|
const canvas = ref(null);
|
50
|
+
const localValue = useProxiedAtomicModel(props, 'modelValue', emits);
|
67
51
|
|
68
52
|
onMounted(() => {
|
69
|
-
drawImageStyle(canvas.value,
|
53
|
+
drawImageStyle(canvas.value, localValue.value, true);
|
70
54
|
watch(
|
71
55
|
() => props.modelValue,
|
72
56
|
() => {
|
73
|
-
|
74
|
-
drawImageStyle(canvas.value, props.modelValue, true);
|
57
|
+
drawImageStyle(canvas.value, localValue.value, true);
|
75
58
|
},
|
76
59
|
{ deep: true },
|
77
60
|
);
|