@vcmap/ui 6.0.0-rc.1 → 6.0.0-rc.2
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/config/base.config.json +4 -4
- package/dist/assets/cesium/Assets/approximateTerrainHeights.json +1 -1
- package/dist/assets/cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/assets/cesium/Workers/{chunk-ZA25DG4Y.js → chunk-3DRPXHZ4.js} +11 -11
- package/dist/assets/cesium/Workers/{chunk-OAVNIRB4.js → chunk-3GI7DWF7.js} +5 -7
- package/dist/assets/cesium/Workers/{chunk-TFC6TZ3S.js → chunk-4EW3HFFI.js} +33 -22
- package/dist/assets/cesium/Workers/{chunk-LLUNNUJV.js → chunk-4OX4RYLB.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-66QLLS45.js → chunk-4RJH3H6D.js} +11 -9
- package/dist/assets/cesium/Workers/{chunk-MPAZH4BF.js → chunk-5OUTANXX.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-WXTV4ATB.js → chunk-6DH5PLFD.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-A4JVFBQ3.js → chunk-6DXIYFX3.js} +2 -2
- package/dist/assets/cesium/Workers/chunk-A5C2A5O5.js +963 -0
- package/dist/assets/cesium/Workers/{chunk-HQF437NJ.js → chunk-AGTH5JMJ.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-RP2A7BR5.js → chunk-AVFIYUKX.js} +12 -14
- package/dist/assets/cesium/Workers/{chunk-227AJNOA.js → chunk-BAJAVGUF.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-N3JIFFX2.js → chunk-BPY4HDAK.js} +5 -6
- package/dist/assets/cesium/Workers/{chunk-ABADGKYE.js → chunk-D6PDWQXW.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-34YUDLRP.js → chunk-DR7LK6PG.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-OYFCF4PL.js → chunk-DTACCQDR.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-C3SXRKRW.js → chunk-EVU2UNBD.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-6BTKZDRG.js → chunk-F7IEM66T.js} +3 -5
- package/dist/assets/cesium/Workers/{chunk-QT3MPEMI.js → chunk-FSXNF76Y.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-PCJWUS4M.js → chunk-FYYT5EVH.js} +830 -14
- package/dist/assets/cesium/Workers/{chunk-QMEMZIJI.js → chunk-FZDKIUDT.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-XTY7B2N6.js → chunk-G6346EDR.js} +16 -16
- package/dist/assets/cesium/Workers/{chunk-CHHNOC2C.js → chunk-H7PSTL64.js} +95 -155
- package/dist/assets/cesium/Workers/{chunk-2R5O53JW.js → chunk-I67V66MN.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-JS3AW5BK.js → chunk-IALQGTA2.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-K36FEYS7.js → chunk-KNMGSIIN.js} +16 -12
- package/dist/assets/cesium/Workers/{chunk-J3JY6I2C.js → chunk-L4XQPD6P.js} +49 -88
- package/dist/assets/cesium/Workers/{chunk-X4SU25DT.js → chunk-LMTN7R7M.js} +10 -12
- package/dist/assets/cesium/Workers/{chunk-JB2LWGH4.js → chunk-LUYI3XCB.js} +14 -14
- package/dist/assets/cesium/Workers/{chunk-AFFLIKOH.js → chunk-N5MIFVXJ.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-MYZB7C4T.js → chunk-O7OUBDMZ.js} +10 -10
- package/dist/assets/cesium/Workers/{chunk-VLGOATD6.js → chunk-P24I5VUS.js} +22 -22
- package/dist/assets/cesium/Workers/{chunk-KD4Y7CZL.js → chunk-PIOKSAZH.js} +15 -17
- package/dist/assets/cesium/Workers/{chunk-3W63OHNJ.js → chunk-PRKEY4QK.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-O5AMBQ36.js → chunk-Q7PM4W34.js} +8 -8
- package/dist/assets/cesium/Workers/{chunk-GLZBE3ML.js → chunk-QLC66ZRL.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-OZJDGN5F.js → chunk-RRLGJV3Q.js} +16 -16
- package/dist/assets/cesium/Workers/{chunk-CCFQRR6D.js → chunk-S2UEXF6T.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-QIKODV5G.js → chunk-S4VTLNAJ.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-EW2GWJYB.js → chunk-SJC5PRDX.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-KTJSNCK4.js → chunk-T6TZXGG5.js} +230 -20
- package/dist/assets/cesium/Workers/{chunk-RW6LU2CJ.js → chunk-TLGODPEV.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-CTELOFLA.js → chunk-UC566ISB.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-ZFOBYDGF.js → chunk-UMX265HW.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-Z24VKNDO.js → chunk-V7WJDCPA.js} +12 -12
- package/dist/assets/cesium/Workers/{chunk-4MFFIWUA.js → chunk-VD6G7UPU.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-XY7MGBKC.js → chunk-WMVCLETM.js} +14 -16
- package/dist/assets/cesium/Workers/{chunk-IPA4EACJ.js → chunk-WOA6WSHH.js} +12 -12
- package/dist/assets/cesium/Workers/{chunk-PFQBCKBM.js → chunk-X67EJ6X6.js} +4398 -2722
- package/dist/assets/cesium/Workers/{chunk-V3NGATMV.js → chunk-XGI4FRXF.js} +11 -13
- package/dist/assets/cesium/Workers/{chunk-AHKEZ2OE.js → chunk-YFVI4SQI.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-HARLBUOL.js → chunk-YFYPR4MW.js} +11 -8
- package/dist/assets/cesium/Workers/combineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/createBoxGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +14 -15
- package/dist/assets/cesium/Workers/createCircleGeometry.js +29 -26
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +35 -36
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +27 -28
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +18 -19
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +17 -19
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +24 -25
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +18 -18
- package/dist/assets/cesium/Workers/createGeometry.js +52 -33
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +28 -29
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +14 -15
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +13 -14
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +451 -176
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +24 -25
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +31 -33
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +27 -29
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +30 -31
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +21 -24
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/createSphereGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +3 -3
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +14 -16
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +22 -23
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +12 -12
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +20 -21
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +14 -16
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +24 -25
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +25 -26
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -21
- package/dist/assets/cesium/Workers/createWallGeometry.js +23 -24
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/decodeDraco.js +11 -11
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +12 -19
- package/dist/assets/cesium/Workers/decodeI3S.js +600 -92
- package/dist/assets/cesium/Workers/transcodeKTX2.js +46 -82
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +21 -22
- package/dist/assets/{cesium.6b12b4.js → cesium.0b750d.js} +151166 -145641
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.074b78.js → core.cbf44a.js} +1944 -1902
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-8eGauqjA.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.7c276c.css +1 -0
- package/dist/assets/{ui.715986.js → ui.7c276c.js} +13826 -12887
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.28d881.js → vuetify.4d18fe.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/dist/index.html +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/package.json +7 -6
- package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +24 -86
- package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +35 -10
- package/plugins/@vcmap-show-case/wizard-example/src/WizardExample.vue +40 -54
- package/src/application/VcsApp.vue +1 -2
- package/src/application/VcsCustomScreen.vue +4 -4
- package/src/application/VcsCustomScreen.vue.d.ts +1 -1
- package/src/application/VcsNavbar.vue.d.ts +1 -1
- package/src/application/VcsSplashScreen.vue +18 -21
- package/src/application/VcsSplashScreen.vue.d.ts +5 -5
- package/src/application/VcsTextPage.vue +4 -4
- package/src/application/VcsTextPage.vue.d.ts +1 -1
- package/src/application/markdownHelper.js +2 -17
- package/src/components/buttons/VcsButton.vue +1 -1
- package/src/components/buttons/VcsButton.vue.d.ts +3 -3
- package/src/components/buttons/VcsFormButton.vue +1 -1
- package/src/components/buttons/VcsFormButton.vue.d.ts +2 -2
- package/src/components/buttons/VcsToolButton.vue +1 -1
- package/src/components/buttons/VcsToolButton.vue.d.ts +4 -4
- package/src/components/composables.d.ts +7 -0
- package/src/components/composables.js +35 -1
- package/src/components/form-inputs-controls/VcsCheckbox.vue +12 -8
- package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +1 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsFileInput.vue +2 -2
- package/src/components/form-inputs-controls/VcsFormSection.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsLabel.vue +31 -1
- package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +21 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +2 -2
- package/src/components/form-inputs-controls/VcsSelect.vue +7 -16
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +2 -2
- package/src/components/form-inputs-controls/VcsSlider.vue +36 -10
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +25 -2
- package/src/components/form-inputs-controls/VcsTextArea.vue +35 -20
- package/src/components/form-inputs-controls/VcsTextField.vue +17 -12
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsWizard.vue +89 -112
- package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +3 -13
- package/src/components/form-inputs-controls/VcsWizardStep.vue +75 -57
- package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +24 -11
- package/src/components/form-inputs-controls/vcsTextField.scss +5 -0
- package/src/components/form-output/VcsFormattedNumber.vue +25 -9
- package/src/components/form-output/VcsFormattedNumber.vue.d.ts +18 -0
- package/src/components/form-output/VcsMarkdown.vue +53 -0
- package/src/components/form-output/VcsMarkdown.vue.d.ts +16 -0
- package/src/components/lists/VcsActionList.vue +43 -27
- package/src/components/lists/VcsActionList.vue.d.ts +3 -1
- package/src/components/lists/VcsList.vue +82 -151
- package/src/components/lists/VcsList.vue.d.ts +5 -8
- package/src/components/lists/VcsListItem.vue +154 -0
- package/src/components/lists/VcsListItem.vue.d.ts +21 -0
- package/src/components/lists/VcsTreeviewLeaf.vue +1 -1
- package/src/components/modelHelper.d.ts +11 -0
- package/src/components/modelHelper.js +42 -2
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +14 -6
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +3 -3
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +474 -585
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +193 -22
- package/src/manager/window/windowManager.d.ts +4 -4
- package/src/manager/window/windowManager.js +2 -2
- package/src/navigation/MapNavigation.vue +6 -3
- package/src/navigation/OrientationToolsButton.vue +39 -26
- package/src/navigation/OrientationToolsButton.vue.d.ts +5 -1
- package/src/navigation/TiltSlider.vue +83 -88
- package/src/navigation/TiltSlider.vue.d.ts +10 -7
- package/src/navigation/VcsCompass.vue +17 -11
- package/src/navigation/VcsCompass.vue.d.ts +2 -0
- package/src/styles/_typography.scss +1 -0
- package/src/vcsUiApp.d.ts +11 -17
- package/src/vcsUiApp.js +10 -3
- package/src/vuePlugins/i18n.js +7 -0
- package/src/vuePlugins/vuetify.js +4 -0
- package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +0 -3273
- package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +0 -73
- package/dist/assets/index-ca7EmZ3d.js +0 -1
- package/dist/assets/ui.715986.css +0 -1
- package/src/components/vector-properties/composables.d.ts +0 -33
- package/src/components/vector-properties/composables.js +0 -100
- /package/dist/assets/{ol.8b2e3a.js → ol.86e93c.js} +0 -0
- /package/dist/assets/{vue.0f2c53.js → vue.a3cd64.js} +0 -0
- /package/dist/assets/{vuetify.28d881.css → vuetify.4d18fe.css} +0 -0
@@ -11,16 +11,11 @@
|
|
11
11
|
<v-card>
|
12
12
|
<div class="px-2 pt-2 pb-1">
|
13
13
|
<v-card-text>
|
14
|
-
<
|
14
|
+
<VcsMarked :content="splashScreenText"></VcsMarked>
|
15
15
|
|
16
16
|
<v-row class="mt-2" v-if="options.acceptInput" no-gutters>
|
17
17
|
<v-col class="align-center d-flex">
|
18
|
-
<VcsCheckbox
|
19
|
-
id="checkbox_splashScreen"
|
20
|
-
style="margin-bottom: 16px"
|
21
|
-
v-model="checkBox"
|
22
|
-
>
|
23
|
-
</VcsCheckbox>
|
18
|
+
<VcsCheckbox v-model="checkBox"> </VcsCheckbox>
|
24
19
|
|
25
20
|
<VcsLabel>
|
26
21
|
<div
|
@@ -36,6 +31,7 @@
|
|
36
31
|
<v-col class="text-right">
|
37
32
|
<VcsFormButton
|
38
33
|
color="primary"
|
34
|
+
variant="filled"
|
39
35
|
@click="exitScreen"
|
40
36
|
:disabled="!checkBox"
|
41
37
|
>{{ $t(options.buttonTitle) }}</VcsFormButton
|
@@ -56,11 +52,13 @@
|
|
56
52
|
VRow,
|
57
53
|
VCol,
|
58
54
|
} from 'vuetify/components';
|
59
|
-
import { computed, getCurrentInstance, ref
|
55
|
+
import { computed, getCurrentInstance, ref } from 'vue';
|
60
56
|
import { parseAndSanitizeMarkdown } from './markdownHelper.js';
|
61
57
|
import VcsFormButton from '../components/buttons/VcsFormButton.vue';
|
62
58
|
import VcsCheckbox from '../components/form-inputs-controls/VcsCheckbox.vue';
|
63
59
|
import VcsLabel from '../components/form-inputs-controls/VcsLabel.vue';
|
60
|
+
import VcsMarked from '../components/form-output/VcsMarkdown.vue';
|
61
|
+
import { useProxiedAtomicModel } from '../components/modelHelper.js';
|
64
62
|
|
65
63
|
export default {
|
66
64
|
name: 'VcsSplashScreen',
|
@@ -74,9 +72,10 @@
|
|
74
72
|
VcsCheckbox,
|
75
73
|
VRow,
|
76
74
|
VCol,
|
75
|
+
VcsMarked,
|
77
76
|
},
|
78
77
|
props: {
|
79
|
-
|
78
|
+
modelValue: {
|
80
79
|
type: Boolean,
|
81
80
|
default: false,
|
82
81
|
},
|
@@ -86,17 +85,11 @@
|
|
86
85
|
},
|
87
86
|
},
|
88
87
|
setup(props, { emit }) {
|
89
|
-
const localValue =
|
90
|
-
|
91
|
-
() => props.value,
|
92
|
-
(newValue) => {
|
93
|
-
localValue.value = newValue;
|
94
|
-
},
|
95
|
-
);
|
88
|
+
const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
|
89
|
+
|
96
90
|
const vm = getCurrentInstance().proxy;
|
97
91
|
const splashScreenText = computed(() => {
|
98
|
-
|
99
|
-
return parseAndSanitizeMarkdown(translatedContent);
|
92
|
+
return vm.$st(props.options.content);
|
100
93
|
});
|
101
94
|
|
102
95
|
const splashScreenCheckboxText = computed(() => {
|
@@ -107,7 +100,6 @@
|
|
107
100
|
const checkBox = ref(!props.options.acceptInput);
|
108
101
|
const exitScreen = () => {
|
109
102
|
localValue.value = false;
|
110
|
-
emit('input', localValue.value);
|
111
103
|
};
|
112
104
|
|
113
105
|
const position = computed(() => ({
|
@@ -130,7 +122,12 @@
|
|
130
122
|
</script>
|
131
123
|
|
132
124
|
<style scoped lang="scss">
|
133
|
-
.marked-checkbox-content
|
134
|
-
|
125
|
+
.marked-checkbox-content {
|
126
|
+
:deep(p) {
|
127
|
+
margin-bottom: 0;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
.v-input {
|
131
|
+
margin-left: -5px !important;
|
135
132
|
}
|
136
133
|
</style>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
2
|
-
|
2
|
+
modelValue: {
|
3
3
|
type: BooleanConstructor;
|
4
4
|
default: boolean;
|
5
5
|
};
|
@@ -8,9 +8,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
8
8
|
required: true;
|
9
9
|
};
|
10
10
|
}, {
|
11
|
-
localValue: import("vue").Ref<
|
11
|
+
localValue: import("vue").Ref<any>;
|
12
12
|
exitScreen: () => void;
|
13
|
-
splashScreenText: import("vue").ComputedRef<
|
13
|
+
splashScreenText: import("vue").ComputedRef<any>;
|
14
14
|
splashScreenCheckboxText: import("vue").ComputedRef<string>;
|
15
15
|
checkBox: import("vue").Ref<boolean>;
|
16
16
|
position: import("vue").ComputedRef<{
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
20
20
|
maxHeight: any;
|
21
21
|
}>;
|
22
22
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
23
|
-
|
23
|
+
modelValue: {
|
24
24
|
type: BooleanConstructor;
|
25
25
|
default: boolean;
|
26
26
|
};
|
@@ -29,6 +29,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
29
29
|
required: true;
|
30
30
|
};
|
31
31
|
}>>, {
|
32
|
-
|
32
|
+
modelValue: boolean;
|
33
33
|
}, {}>;
|
34
34
|
export default _default;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<v-sheet>
|
3
3
|
<v-container>
|
4
|
-
<
|
4
|
+
<VcsMarkdown :content="markedHtml"></VcsMarkdown>
|
5
5
|
</v-container>
|
6
6
|
</v-sheet>
|
7
7
|
</template>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<script>
|
33
33
|
import { computed, getCurrentInstance } from 'vue';
|
34
34
|
import { VContainer, VSheet } from 'vuetify/components';
|
35
|
-
import
|
35
|
+
import VcsMarkdown from '../components/form-output/VcsMarkdown.vue';
|
36
36
|
|
37
37
|
/**
|
38
38
|
* @description Is a component to render and sanitize a String
|
@@ -43,6 +43,7 @@
|
|
43
43
|
components: {
|
44
44
|
VSheet,
|
45
45
|
VContainer,
|
46
|
+
VcsMarkdown,
|
46
47
|
},
|
47
48
|
props: {
|
48
49
|
content: {
|
@@ -53,8 +54,7 @@
|
|
53
54
|
setup(props) {
|
54
55
|
const vm = getCurrentInstance().proxy;
|
55
56
|
const markedHtml = computed(() => {
|
56
|
-
|
57
|
-
return parseAndSanitizeMarkdown(translatedContent);
|
57
|
+
return vm.$st(props.content);
|
58
58
|
});
|
59
59
|
|
60
60
|
return {
|
@@ -4,7 +4,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
default: () => string;
|
5
5
|
};
|
6
6
|
}, {
|
7
|
-
markedHtml: import("vue").ComputedRef<
|
7
|
+
markedHtml: import("vue").ComputedRef<any>;
|
8
8
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
9
9
|
content: {
|
10
10
|
type: StringConstructor;
|
@@ -1,28 +1,13 @@
|
|
1
1
|
import { marked } from 'marked';
|
2
2
|
import DOMPurify from 'dompurify';
|
3
3
|
|
4
|
-
// Create a custom renderer
|
5
|
-
const renderer = new marked.Renderer();
|
6
|
-
|
7
|
-
renderer.link = (href, title, text) => {
|
8
|
-
const target = '_blank';
|
9
|
-
const titleAttr = title ? ` title="${title}"` : '';
|
10
|
-
return `<a href="${href}" target="${target}"${titleAttr}>${text}</a>`;
|
11
|
-
};
|
12
|
-
|
13
|
-
// Set options for marked to use the custom renderer
|
14
|
-
marked.setOptions({
|
15
|
-
renderer,
|
16
|
-
breaks: true, // Enable line breaks
|
17
|
-
});
|
18
|
-
|
19
4
|
/**
|
20
5
|
* @param {string} content
|
21
6
|
* @returns {string}
|
22
7
|
*/
|
23
8
|
export function parseAndSanitizeMarkdown(content) {
|
24
|
-
|
25
|
-
|
9
|
+
const html = marked.parse(content, { breaks: true });
|
10
|
+
|
26
11
|
// Then sanitize the HTML using DOMPurify
|
27
12
|
return DOMPurify.sanitize(html, { ADD_ATTR: ['target'] });
|
28
13
|
}
|
@@ -63,12 +63,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
63
63
|
default: string;
|
64
64
|
};
|
65
65
|
}>>, {
|
66
|
-
disabled: boolean;
|
67
|
-
tooltip: string;
|
68
|
-
tooltipPosition: string;
|
69
66
|
icon: string;
|
70
67
|
active: boolean;
|
71
68
|
hasUpdate: boolean;
|
69
|
+
disabled: boolean;
|
72
70
|
color: string;
|
71
|
+
tooltip: string;
|
72
|
+
tooltipPosition: string;
|
73
73
|
}, {}>;
|
74
74
|
export default _default;
|
@@ -49,10 +49,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
49
49
|
default: string;
|
50
50
|
};
|
51
51
|
}>>, {
|
52
|
-
tooltip: string;
|
53
|
-
tooltipPosition: string;
|
54
52
|
icon: string;
|
55
53
|
hasUpdate: boolean;
|
56
54
|
variant: string;
|
55
|
+
tooltip: string;
|
56
|
+
tooltipPosition: string;
|
57
57
|
}, {}>;
|
58
58
|
export default _default;
|
@@ -72,13 +72,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
72
72
|
default: string;
|
73
73
|
};
|
74
74
|
}>>, {
|
75
|
-
|
76
|
-
tooltip: string;
|
77
|
-
tooltipPosition: string;
|
75
|
+
background: boolean;
|
78
76
|
icon: string;
|
79
77
|
active: boolean;
|
80
78
|
hasUpdate: boolean;
|
81
|
-
|
79
|
+
disabled: boolean;
|
82
80
|
color: string;
|
81
|
+
tooltip: string;
|
82
|
+
tooltipPosition: string;
|
83
83
|
}, {}>;
|
84
84
|
export default _default;
|
@@ -12,3 +12,10 @@ export function usePadding(attrs: Object): import("vue").ComputedRef<boolean>;
|
|
12
12
|
* @returns {import("vue").ComputedRef<Array<string>>}
|
13
13
|
*/
|
14
14
|
export function useForwardSlots(slots: import("vue").Slots, exclude?: Array<string>): import("vue").ComputedRef<Array<string>>;
|
15
|
+
/**
|
16
|
+
* @param {import("vue").ComputedRef<HTMLElement|undefined>} parent
|
17
|
+
* @param {import("vue").ComputedRef<string|undefined>} tooltip
|
18
|
+
* @param {import("vue").ComputedRef<string|undefined>} title
|
19
|
+
* @returns {import("vue").ComputedRef<string>}
|
20
|
+
*/
|
21
|
+
export function createEllipseTooltip(parent: import("vue").ComputedRef<HTMLElement | undefined>, tooltip: import("vue").ComputedRef<string | undefined>, title: import("vue").ComputedRef<string | undefined>): import("vue").ComputedRef<string>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { computed } from 'vue';
|
1
|
+
import { computed, nextTick, ref, watch } from 'vue';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* returns a computed which is true, if the provided attributes contain one or more
|
@@ -29,3 +29,37 @@ export function useForwardSlots(slots, exclude = []) {
|
|
29
29
|
return Object.keys(slots).filter((slotName) => !exclude.includes(slotName));
|
30
30
|
});
|
31
31
|
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* @param {import("vue").ComputedRef<HTMLElement|undefined>} parent
|
35
|
+
* @param {import("vue").ComputedRef<string|undefined>} tooltip
|
36
|
+
* @param {import("vue").ComputedRef<string|undefined>} title
|
37
|
+
* @returns {import("vue").ComputedRef<string>}
|
38
|
+
*/
|
39
|
+
export function createEllipseTooltip(parent, tooltip, title) {
|
40
|
+
const offsetWidth = ref(0);
|
41
|
+
const scrollWidth = ref(0);
|
42
|
+
|
43
|
+
watch([parent, title], async () => {
|
44
|
+
const elem = parent.value;
|
45
|
+
if (elem) {
|
46
|
+
await nextTick(() => {
|
47
|
+
offsetWidth.value = elem.offsetWidth;
|
48
|
+
scrollWidth.value = elem.scrollWidth;
|
49
|
+
});
|
50
|
+
} else {
|
51
|
+
offsetWidth.value = 0;
|
52
|
+
scrollWidth.value = 0;
|
53
|
+
}
|
54
|
+
});
|
55
|
+
|
56
|
+
return computed(() => {
|
57
|
+
if (tooltip.value) {
|
58
|
+
return tooltip.value;
|
59
|
+
}
|
60
|
+
if (title.value && offsetWidth.value < scrollWidth.value) {
|
61
|
+
return title.value;
|
62
|
+
}
|
63
|
+
return '';
|
64
|
+
});
|
65
|
+
}
|
@@ -5,21 +5,24 @@
|
|
5
5
|
false-icon="$vcsCheckbox"
|
6
6
|
indeterminate-icon="$vcsCheckboxIndeterminate"
|
7
7
|
:hide-details="false"
|
8
|
+
class="vcs-checkbox"
|
8
9
|
:class="{
|
9
10
|
'py-1': !paddingProvided,
|
10
11
|
}"
|
11
12
|
v-bind="$attrs"
|
12
13
|
>
|
13
|
-
<template #label>
|
14
|
-
<slot name="label"
|
15
|
-
|
14
|
+
<template #label="scope">
|
15
|
+
<slot name="label" v-bind="scope ?? {}">{{ $st($attrs.label) }}</slot>
|
16
|
+
</template>
|
17
|
+
<template v-for="slot of forwardSlots" #[slot]="scope">
|
18
|
+
<slot :name="slot" v-bind="scope ?? {}" />
|
16
19
|
</template>
|
17
20
|
<template #message="{ message }">
|
18
21
|
<v-tooltip
|
19
22
|
ref="errorTooltip"
|
20
23
|
:activator="checkbox"
|
21
24
|
v-if="message"
|
22
|
-
:text="message"
|
25
|
+
:text="$st(message)"
|
23
26
|
content-class="bg-error"
|
24
27
|
:location="tooltipPosition"
|
25
28
|
/>
|
@@ -28,7 +31,7 @@
|
|
28
31
|
v-if="tooltip && !errorTooltip"
|
29
32
|
:activator="checkbox"
|
30
33
|
:location="tooltipPosition"
|
31
|
-
:text="tooltip"
|
34
|
+
:text="$st(tooltip)"
|
32
35
|
></v-tooltip>
|
33
36
|
</v-checkbox>
|
34
37
|
</template>
|
@@ -49,7 +52,7 @@
|
|
49
52
|
<script>
|
50
53
|
import { ref } from 'vue';
|
51
54
|
import { VCheckbox, VTooltip } from 'vuetify/components';
|
52
|
-
import { usePadding } from '../composables.js';
|
55
|
+
import { useForwardSlots, usePadding } from '../composables.js';
|
53
56
|
|
54
57
|
/**
|
55
58
|
* @description Stylized wrapper around {@link https://vuetifyjs.com/en/api/v-checkbox/ |vuetify checkbox}.
|
@@ -76,12 +79,13 @@
|
|
76
79
|
default: 'right',
|
77
80
|
},
|
78
81
|
},
|
79
|
-
setup(props, { attrs }) {
|
82
|
+
setup(props, { attrs, slots }) {
|
80
83
|
const checkbox = ref();
|
81
84
|
const errorTooltip = ref();
|
82
85
|
const paddingProvided = usePadding(attrs);
|
83
|
-
|
86
|
+
const forwardSlots = useForwardSlots(slots, ['label']);
|
84
87
|
return {
|
88
|
+
forwardSlots,
|
85
89
|
paddingProvided,
|
86
90
|
checkbox,
|
87
91
|
errorTooltip,
|
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
8
8
|
default: string;
|
9
9
|
};
|
10
10
|
}, {
|
11
|
+
forwardSlots: import("vue").ComputedRef<string[]>;
|
11
12
|
paddingProvided: import("vue").ComputedRef<boolean>;
|
12
13
|
checkbox: import("vue").Ref<any>;
|
13
14
|
errorTooltip: import("vue").Ref<any>;
|
@@ -15,7 +15,7 @@
|
|
15
15
|
ref="errorTooltipRef"
|
16
16
|
:activator="fileInputRef"
|
17
17
|
v-if="message"
|
18
|
-
:text="message"
|
18
|
+
:text="$st(message)"
|
19
19
|
content-class="bg-error"
|
20
20
|
:location="tooltipPosition"
|
21
21
|
/>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<v-tooltip
|
26
26
|
:activator="fileInputRef"
|
27
27
|
v-if="tooltip && !errorTooltipRef"
|
28
|
-
:text="tooltip"
|
28
|
+
:text="$st(tooltip)"
|
29
29
|
:location="tooltipPosition"
|
30
30
|
/>
|
31
31
|
</template>
|
@@ -5,17 +5,25 @@
|
|
5
5
|
:class="{
|
6
6
|
'vcs-label-required': required,
|
7
7
|
'vcs-label-disabled': disabled,
|
8
|
+
'py-1': !paddingProvided,
|
8
9
|
}"
|
9
10
|
>
|
10
11
|
<slot />
|
12
|
+
<v-tooltip
|
13
|
+
v-if="tooltip"
|
14
|
+
activator="parent"
|
15
|
+
:location="tooltipPosition"
|
16
|
+
:text="$st(tooltip)"
|
17
|
+
></v-tooltip>
|
11
18
|
</label>
|
12
19
|
</template>
|
13
20
|
|
14
21
|
<style lang="scss" scoped>
|
15
22
|
.vcs-label {
|
23
|
+
box-sizing: content-box;
|
16
24
|
display: flex;
|
17
25
|
align-items: center;
|
18
|
-
height: var(--v-vcs-item-height);
|
26
|
+
height: calc(var(--v-vcs-item-height) - 8px);
|
19
27
|
font-size: var(--v-vcs-font-size);
|
20
28
|
}
|
21
29
|
.vcs-label-required:after {
|
@@ -27,15 +35,23 @@
|
|
27
35
|
}
|
28
36
|
</style>
|
29
37
|
<script>
|
38
|
+
import { VTooltip } from 'vuetify/components';
|
39
|
+
import { usePadding } from '../composables.js';
|
40
|
+
|
30
41
|
/**
|
31
42
|
* @description Stylized wrapper around {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label |label label}.
|
32
43
|
* Pass the label text as innerHtml.
|
33
44
|
* @vue-prop {string} htmlFor - an id reference the label is meant for.
|
34
45
|
* @vue-prop {boolean} [required=false] - Marks an input field as required by adding an asterisk after the label.
|
35
46
|
* @vue-prop {boolean} [disabled=false] - Marks an input field as disabled by adding transparency to the label.
|
47
|
+
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} [tooltipPosition='right'] - Position of the tooltip.
|
48
|
+
* @vue-prop {string|undefined} tooltip - Optional tooltip which will be shown on hover when no error message is shown
|
36
49
|
*/
|
37
50
|
export default {
|
38
51
|
name: 'VcsLabel',
|
52
|
+
components: {
|
53
|
+
VTooltip,
|
54
|
+
},
|
39
55
|
props: {
|
40
56
|
htmlFor: {
|
41
57
|
type: String,
|
@@ -49,6 +65,20 @@
|
|
49
65
|
type: Boolean,
|
50
66
|
default: false,
|
51
67
|
},
|
68
|
+
tooltip: {
|
69
|
+
type: String,
|
70
|
+
default: undefined,
|
71
|
+
},
|
72
|
+
tooltipPosition: {
|
73
|
+
type: String,
|
74
|
+
default: 'right',
|
75
|
+
},
|
76
|
+
},
|
77
|
+
setup(props, { attrs }) {
|
78
|
+
const paddingProvided = usePadding(attrs);
|
79
|
+
return {
|
80
|
+
paddingProvided,
|
81
|
+
};
|
52
82
|
},
|
53
83
|
};
|
54
84
|
</script>
|
@@ -11,7 +11,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
11
11
|
type: BooleanConstructor;
|
12
12
|
default: boolean;
|
13
13
|
};
|
14
|
-
|
14
|
+
tooltip: {
|
15
|
+
type: StringConstructor;
|
16
|
+
default: undefined;
|
17
|
+
};
|
18
|
+
tooltipPosition: {
|
19
|
+
type: StringConstructor;
|
20
|
+
default: string;
|
21
|
+
};
|
22
|
+
}, {
|
23
|
+
paddingProvided: import("vue").ComputedRef<boolean>;
|
24
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
15
25
|
htmlFor: {
|
16
26
|
type: StringConstructor;
|
17
27
|
default: undefined;
|
@@ -24,9 +34,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
24
34
|
type: BooleanConstructor;
|
25
35
|
default: boolean;
|
26
36
|
};
|
37
|
+
tooltip: {
|
38
|
+
type: StringConstructor;
|
39
|
+
default: undefined;
|
40
|
+
};
|
41
|
+
tooltipPosition: {
|
42
|
+
type: StringConstructor;
|
43
|
+
default: string;
|
44
|
+
};
|
27
45
|
}>>, {
|
28
46
|
disabled: boolean;
|
29
47
|
required: boolean;
|
48
|
+
tooltip: string;
|
49
|
+
tooltipPosition: string;
|
30
50
|
htmlFor: string;
|
31
51
|
}, {}>;
|
32
52
|
export default _default;
|
@@ -27,7 +27,7 @@
|
|
27
27
|
:activator="radioGroup"
|
28
28
|
:model-value="true"
|
29
29
|
v-if="message"
|
30
|
-
:text="message"
|
30
|
+
:text="$st(message)"
|
31
31
|
content-class="bg-error"
|
32
32
|
:location="tooltipPosition"
|
33
33
|
/>
|
@@ -36,7 +36,7 @@
|
|
36
36
|
v-if="tooltip && !errorTooltip"
|
37
37
|
:activator="radioGroup"
|
38
38
|
:location="tooltipPosition"
|
39
|
-
:text="tooltip"
|
39
|
+
:text="$st(tooltip)"
|
40
40
|
></v-tooltip>
|
41
41
|
</v-radio-group>
|
42
42
|
</template>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
'py-1': !paddingProvided,
|
13
13
|
}"
|
14
14
|
v-bind="$attrs"
|
15
|
-
v-model="
|
15
|
+
v-model="localModelValue"
|
16
16
|
>
|
17
17
|
<template #selection="{ item, index }">
|
18
18
|
<span v-if="index === 0" class="text-truncate w-100">
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<v-tooltip
|
29
29
|
:activator="selectFieldRef"
|
30
30
|
v-if="tooltip && !errorTooltipRef"
|
31
|
-
:text="tooltip"
|
31
|
+
:text="$st(tooltip)"
|
32
32
|
:location="tooltipPosition"
|
33
33
|
/>
|
34
34
|
</template>
|
@@ -45,7 +45,7 @@
|
|
45
45
|
:activator="selectFieldRef"
|
46
46
|
ref="errorTooltipRef"
|
47
47
|
v-if="message"
|
48
|
-
:text="message"
|
48
|
+
:text="$st(message)"
|
49
49
|
content-class="bg-error"
|
50
50
|
:location="tooltipPosition"
|
51
51
|
/>
|
@@ -137,6 +137,7 @@
|
|
137
137
|
import { computed, ref } from 'vue';
|
138
138
|
import { usePadding } from '../composables.js';
|
139
139
|
import VcsCheckbox from './VcsCheckbox.vue';
|
140
|
+
import { useProxiedComplexModel } from '../modelHelper.js';
|
140
141
|
|
141
142
|
/**
|
142
143
|
* @description Stylized wrapper around {@link https://vuetifyjs.com/en/api/v-select/ |vuetify select}.
|
@@ -182,20 +183,10 @@
|
|
182
183
|
default: undefined,
|
183
184
|
},
|
184
185
|
},
|
185
|
-
setup(props, { attrs }) {
|
186
|
-
// $ref to v-select element
|
186
|
+
setup(props, { attrs, emit }) {
|
187
187
|
const selectFieldRef = ref();
|
188
188
|
const errorTooltipRef = ref();
|
189
|
-
const localModelValue =
|
190
|
-
|
191
|
-
const forwardedModelValue = computed({
|
192
|
-
get() {
|
193
|
-
return localModelValue.value;
|
194
|
-
},
|
195
|
-
set(value) {
|
196
|
-
localModelValue.value = value;
|
197
|
-
},
|
198
|
-
});
|
189
|
+
const localModelValue = useProxiedComplexModel(props, 'modelValue', emit);
|
199
190
|
|
200
191
|
const additionalItems = computed(() => {
|
201
192
|
if (Array.isArray(localModelValue.value)) {
|
@@ -217,7 +208,7 @@
|
|
217
208
|
const paddingProvided = usePadding(attrs);
|
218
209
|
|
219
210
|
return {
|
220
|
-
|
211
|
+
localModelValue,
|
221
212
|
additionalItems,
|
222
213
|
isMultiple,
|
223
214
|
paddingProvided,
|