@vcmap/ui 6.0.0-rc.3 → 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/buildHelpers.js +60 -11
- package/build/buildTypes.js +9 -5
- package/build/bundle.js +1 -1
- package/build/info/publish.js +25 -31
- package/build/lintTypes.js +5 -0
- package/config/base.config.json +2 -7
- package/config/dev.config.json +11 -1
- package/config/projects.config.json +2 -1
- package/config/theming.config.json +68 -0
- package/config/www.config.json +27 -23
- package/dist/assets/@mdi/font/css/{materialdesignicons.min-7a4f6be0.css → materialdesignicons.min-680621ca.css} +1 -1
- package/dist/assets/{cesium-cb4dbfba.js → cesium-ccb4cc30.js} +272 -385
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-72f21835.js → core-e06aa7a6.js} +2313 -2321
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-2d33bc8b.js → ol-e7981d5c.js} +233 -329
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-5dda32d2.css +1 -0
- package/dist/assets/{ui-2ab43a16.js → ui-5dda32d2.js} +11344 -11078
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue-87bc6efe.js +6083 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-760ced3b.css → vuetify-4c4e4217.css} +2 -2
- package/dist/assets/{vuetify-760ced3b.js → vuetify-4c4e4217.js} +8063 -8262
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +27 -17
- package/index.js +16 -8
- package/package.json +17 -17
- 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/form-inputs-example/src/FormInputsExample.vue +2 -3
- package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +11 -7
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +18 -11
- package/plugins/@vcmap-show-case/search-example/src/index.js +1 -0
- package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +35 -5
- 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/@vcmap-show-case/toolbox-example/src/index.js +2 -1
- package/plugins/package.json +7 -23
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +1 -1
- package/src/actions/StyleSelector.vue +1 -1
- package/src/actions/actionHelper.d.ts +4 -11
- package/src/actions/actionHelper.js +15 -7
- package/src/actions/listActions.d.ts +5 -5
- package/src/actions/listActions.js +2 -2
- package/src/application/VcsApp.vue +113 -50
- package/src/application/VcsApp.vue.d.ts +301 -4
- package/src/application/VcsAttributionsFooter.vue.d.ts +1 -1
- package/src/application/VcsContainer.vue +27 -10
- package/src/application/VcsContainer.vue.d.ts +241 -0
- package/src/application/VcsMainMap.vue +7 -7
- package/src/application/VcsMainMap.vue.d.ts +2 -2
- package/src/application/VcsNavbar.vue +14 -2
- package/src/application/VcsNavbar.vue.d.ts +1 -0
- package/src/application/VcsSplashScreen.vue +33 -26
- package/src/application/VcsTextPageFooter.vue +2 -1
- 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 +61 -6
- package/src/components/buttons/VcsActionButtonList.vue.d.ts +28 -0
- 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 +13 -16
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsCoordinate.vue +4 -4
- 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 +2 -5
- package/src/components/form-inputs-controls/VcsSlider.vue +5 -6
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsTextArea.vue +2 -5
- package/src/components/form-inputs-controls/VcsTextField.vue +24 -1
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +11 -1
- package/src/components/form-inputs-controls/VcsWizard.vue +3 -3
- package/src/components/form-inputs-controls/VcsWizardStep.vue +6 -5
- package/src/components/form-inputs-controls/vcsTextField.scss +8 -5
- package/src/components/form-output/VcsFormattedNumber.vue +7 -5
- package/src/components/form-output/VcsMarkdown.vue +15 -12
- package/src/components/form-output/VcsMarkdown.vue.d.ts +1 -0
- package/src/components/form-output/markdownHelper.d.ts +30 -0
- package/src/components/form-output/markdownHelper.js +398 -0
- package/src/components/import/VcsFileDrop.vue +8 -5
- package/src/components/import/VcsImportComponent.vue +8 -4
- package/src/components/import/VcsImportComponent.vue.d.ts +1 -2
- package/src/components/lists/VcsActionList.vue +6 -6
- package/src/components/lists/VcsList.vue +22 -37
- package/src/components/lists/VcsList.vue.d.ts +14 -55
- package/src/components/lists/{VcsListItem.vue → VcsListItemComponent.vue} +37 -11
- package/src/components/lists/VcsListItemComponent.vue.d.ts +79 -0
- package/src/components/lists/VcsTreeview.vue +95 -26
- package/src/components/lists/VcsTreeview.vue.d.ts +16 -3
- package/src/components/lists/VcsTreeviewSearchbar.vue +16 -5
- 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 -8
- 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 +13 -7
- package/src/components/section/VcsFormSection.vue.d.ts +2 -3
- 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 +3 -3
- package/src/components/style/VcsVectorStyleComponent.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +42 -32
- package/src/components/tables/VcsDataTable.vue.d.ts +1 -0
- package/src/components/tables/VcsTable.vue +45 -62
- package/src/components/tables/VcsTable.vue.d.ts +30 -17
- package/src/components/tables/VcsTableCell.vue +72 -0
- package/src/components/tables/VcsTableCell.vue.d.ts +13 -0
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +6 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -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 +14 -11
- package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointEditor.vue +2 -2
- package/src/contentTree/LayerTree.vue +9 -27
- package/src/contentTree/LayerTree.vue.d.ts +1 -1
- package/src/contentTree/contentTreeCollection.d.ts +1 -0
- package/src/contentTree/contentTreeCollection.js +45 -11
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/contentTreeItem.js +1 -1
- package/src/featureInfo/BalloonComponent.vue +32 -25
- package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
- package/src/featureInfo/MarkdownBalloonComponent.vue +4 -2
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
- package/src/featureInfo/abstractFeatureInfoView.d.ts +10 -4
- package/src/featureInfo/abstractFeatureInfoView.js +19 -11
- package/src/featureInfo/featureInfo.d.ts +7 -7
- package/src/featureInfo/featureInfo.js +51 -31
- package/src/featureInfo/iframeFeatureInfoView.d.ts +8 -2
- package/src/featureInfo/iframeFeatureInfoView.js +15 -5
- package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -5
- package/src/featureInfo/markdownFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownFeatureInfoView.js +9 -11
- package/src/featureInfo/tableFeatureInfoView.js +13 -4
- 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 +2 -2
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +2 -2
- package/src/manager/collectionManager/categoryManager.d.ts +1 -1
- package/src/manager/collectionManager/collectionComponentClass.d.ts +3 -3
- package/src/manager/collectionManager/collectionComponentClass.js +6 -6
- package/src/manager/collectionManager/collectionManager.d.ts +1 -1
- package/src/manager/collectionManager/editorCollectionComponentClass.js +2 -1
- package/src/manager/panel/PanelComponent.vue +2 -9
- package/src/manager/panel/PanelManagerComponent.vue +7 -3
- package/src/manager/panel/panelHelper.js +3 -3
- package/src/manager/panel/panelManager.d.ts +9 -1
- package/src/manager/panel/panelManager.js +15 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +11 -5
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +11 -6
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/{ToolboxManager.vue → ToolboxManagerComponent.vue} +13 -7
- package/src/manager/toolbox/{ToolboxManager.vue.d.ts → ToolboxManagerComponent.vue.d.ts} +1 -0
- package/src/manager/window/WindowComponent.vue +12 -8
- package/src/manager/window/WindowComponentHeader.vue +33 -9
- package/src/manager/window/WindowComponentHeader.vue.d.ts +3 -0
- package/src/manager/window/WindowManager.vue +2 -2
- package/src/manager/window/windowManager.d.ts +6 -6
- package/src/manager/window/windowManager.js +3 -3
- package/src/navigation/MapNavigation.vue +20 -0
- package/src/navigation/OrientationToolsButton.vue +2 -4
- package/src/navigation/TiltSlider.vue +3 -5
- package/src/navigation/locatorHelper.js +1 -1
- package/src/navigation/overviewMap.js +1 -1
- package/src/notifier/NotifierComponent.vue +18 -15
- package/src/search/ResultItem.vue +18 -6
- package/src/search/ResultsComponent.vue +31 -20
- package/src/search/ResultsComponent.vue.d.ts +2 -1
- package/src/search/SearchComponent.vue +11 -15
- package/src/search/SearchComponent.vue.d.ts +1 -0
- package/src/siteConfig.js +8 -8
- package/src/styles/_typography.scss +0 -2
- package/src/styles/main.scss +0 -4
- package/src/styles/vcsList.scss +1 -1
- package/src/uiConfig.d.ts +311 -7
- package/src/uiConfig.js +30 -17
- package/src/vcsUiApp.d.ts +48 -63
- package/src/vcsUiApp.js +44 -37
- package/src/vuePlugins/vuetify.d.ts +88 -62
- package/src/vuePlugins/vuetify.js +119 -20
- package/dist/assets/ui-2ab43a16.css +0 -1
- package/dist/assets/vue-03b265aa.js +0 -6096
- 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/application/markdownHelper.d.ts +0 -12
- package/src/application/markdownHelper.js +0 -70
- package/src/components/lists/VcsListItem.vue.d.ts +0 -27
- package/src/components/lists/VcsTreeviewLeaf.vue +0 -83
- package/src/components/notification/VcsTooltip.vue +0 -156
- package/src/components/notification/VcsTooltip.vue.d.ts +0 -27
- package/src/featureInfo/MarkdownComponent.vue +0 -16
- package/src/featureInfo/MarkdownComponent.vue.d.ts +0 -7
- package/src/styles/_theming.scss +0 -73
- package/src/styles/settings.scss +0 -6
- package/src/styles/shades.scss +0 -4
- package/src/styles/variables.scss +0 -140
- package/src/styles/vcsFont.scss +0 -2
- package/src/styles/vcsGrid.scss +0 -3
- /package/src/components/lists/{VcsTreeviewLeaf.vue.d.ts → VcsTreeviewTitle.vue.d.ts} +0 -0
@@ -10,8 +10,10 @@
|
|
10
10
|
class="vcs-text-field primary--placeholder"
|
11
11
|
:class="{
|
12
12
|
'py-1': !paddingProvided,
|
13
|
+
'no-prepended-content': !prependedContent,
|
13
14
|
}"
|
14
15
|
v-bind="$attrs"
|
16
|
+
:prefix="forcePrefix ? undefined : $attrs.prefix"
|
15
17
|
v-model="visibleValue"
|
16
18
|
v-model:focused="focused"
|
17
19
|
>
|
@@ -41,6 +43,14 @@
|
|
41
43
|
></v-tooltip>
|
42
44
|
<slot name="default" v-bind="scope ?? {}"></slot>
|
43
45
|
</template>
|
46
|
+
<!-- use slot to show prefix always, independent of modelValue (unlike prefix prop) -->
|
47
|
+
<template #prepend-inner="prependInnerScope">
|
48
|
+
<slot name="prepend-inner" v-bind="prependInnerScope">
|
49
|
+
<template v-if="forcePrefix && $attrs.prefix">
|
50
|
+
{{ $attrs.prefix }}
|
51
|
+
</template>
|
52
|
+
</slot>
|
53
|
+
</template>
|
44
54
|
</v-text-field>
|
45
55
|
</template>
|
46
56
|
|
@@ -74,6 +84,7 @@
|
|
74
84
|
* @vue-prop {string|undefined} tooltip - Optional tooltip which will be shown on hover when no error message is shown
|
75
85
|
* @vue-prop {string} unit - Unit for number input fields. Is displayed behind the number.
|
76
86
|
* @vue-prop {number|undefined} [decimals] - An optional number of decimal places the visible value will be rounded to. Does not affect the input value!
|
87
|
+
* @vue-prop {boolean} [forcePrefix=false] - If set, forces the prefix to be always rendered independent of modelValue by using prepend-inner slot
|
77
88
|
*/
|
78
89
|
export default {
|
79
90
|
name: 'VcsTextField',
|
@@ -112,6 +123,10 @@
|
|
112
123
|
type: Number,
|
113
124
|
default: undefined,
|
114
125
|
},
|
126
|
+
forcePrefix: {
|
127
|
+
type: Boolean,
|
128
|
+
default: false,
|
129
|
+
},
|
115
130
|
},
|
116
131
|
setup(props, { attrs, slots }) {
|
117
132
|
const textFieldRef = ref();
|
@@ -137,8 +152,12 @@
|
|
137
152
|
return localValue.value ?? '';
|
138
153
|
},
|
139
154
|
set(value) {
|
140
|
-
localValue.value = value;
|
141
155
|
// emit is not needed since the vuetify component already emits an @input event. (forwarded listeners)
|
156
|
+
if (props.type === 'number') {
|
157
|
+
localValue.value = parseFloat(value);
|
158
|
+
} else {
|
159
|
+
localValue.value = value;
|
160
|
+
}
|
142
161
|
},
|
143
162
|
});
|
144
163
|
|
@@ -155,7 +174,11 @@
|
|
155
174
|
const paddingProvided = usePadding(attrs);
|
156
175
|
const forwardSlots = useForwardSlots(slots, ['default', 'message']);
|
157
176
|
|
177
|
+
const prependedContent = computed(() => {
|
178
|
+
return (props.forcePrefix && attrs.prefix) || !!slots['prepend-inner'];
|
179
|
+
});
|
158
180
|
return {
|
181
|
+
prependedContent,
|
159
182
|
forwardSlots,
|
160
183
|
paddingProvided,
|
161
184
|
visibleValue,
|
@@ -23,10 +23,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
23
|
type: NumberConstructor;
|
24
24
|
default: undefined;
|
25
25
|
};
|
26
|
+
forcePrefix: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: boolean;
|
29
|
+
};
|
26
30
|
}, {
|
31
|
+
prependedContent: import("vue").ComputedRef<{}>;
|
27
32
|
forwardSlots: import("vue").ComputedRef<string[]>;
|
28
33
|
paddingProvided: import("vue").ComputedRef<boolean>;
|
29
|
-
visibleValue: import("vue").WritableComputedRef<
|
34
|
+
visibleValue: import("vue").WritableComputedRef<string | number | boolean>;
|
30
35
|
rules: import("vue").ComputedRef<unknown>;
|
31
36
|
textFieldRef: import("vue").Ref<any>;
|
32
37
|
errorTooltipRef: import("vue").Ref<any>;
|
@@ -56,6 +61,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
56
61
|
type: NumberConstructor;
|
57
62
|
default: undefined;
|
58
63
|
};
|
64
|
+
forcePrefix: {
|
65
|
+
type: BooleanConstructor;
|
66
|
+
default: boolean;
|
67
|
+
};
|
59
68
|
}>>, {
|
60
69
|
type: string;
|
61
70
|
modelValue: string | number;
|
@@ -63,5 +72,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
63
72
|
tooltipPosition: string;
|
64
73
|
unit: string;
|
65
74
|
decimals: number;
|
75
|
+
forcePrefix: boolean;
|
66
76
|
}, {}>;
|
67
77
|
export default _default;
|
@@ -35,8 +35,8 @@
|
|
35
35
|
</script>
|
36
36
|
<style scoped lang="scss">
|
37
37
|
:deep(.v-expansion-panel-title) {
|
38
|
-
height: var(--v-vcs-
|
39
|
-
min-height: var(--v-vcs-
|
38
|
+
height: calc(var(--v-vcs-font-size) * 2 + 6px);
|
39
|
+
min-height: calc(var(--v-vcs-font-size) * 2 + 6px);
|
40
40
|
padding: 0 8px;
|
41
41
|
}
|
42
42
|
:deep(.v-expansion-panel-title.v-expansion-panel-title--active) {
|
@@ -58,7 +58,7 @@
|
|
58
58
|
}
|
59
59
|
:deep(.v-stepper-vertical-item:not(:last-child):before) {
|
60
60
|
height: 100%;
|
61
|
-
top: calc(var(--v-vcs-
|
61
|
+
top: calc(var(--v-vcs-font-size) * 2 - 16px);
|
62
62
|
left: calc(14px + var(--v-vcs-font-size) * 0.42);
|
63
63
|
width: calc(var(--v-vcs-font-size) * 0.1);
|
64
64
|
}
|
@@ -23,9 +23,6 @@
|
|
23
23
|
v-if="isActiveStep"
|
24
24
|
:actions="actions"
|
25
25
|
:overflow-count="actionButtonListOverflowCount"
|
26
|
-
@mousedown.stop
|
27
|
-
@touchstart.stop
|
28
|
-
@keydown.stop
|
29
26
|
class="justify-end"
|
30
27
|
/>
|
31
28
|
</div>
|
@@ -33,7 +30,11 @@
|
|
33
30
|
</template>
|
34
31
|
<template #default>
|
35
32
|
<div>
|
36
|
-
<VcsHelp
|
33
|
+
<VcsHelp
|
34
|
+
:text="helpText"
|
35
|
+
v-if="showHelp && ($slots.help || helpText)"
|
36
|
+
class="mb-1"
|
37
|
+
>
|
37
38
|
<slot name="help" />
|
38
39
|
</VcsHelp>
|
39
40
|
<slot />
|
@@ -136,7 +137,7 @@
|
|
136
137
|
const helpAction = reactive({
|
137
138
|
name: 'help',
|
138
139
|
title: 'components.vcsFormSection.help',
|
139
|
-
active:
|
140
|
+
active: true,
|
140
141
|
icon: 'mdi-help-circle',
|
141
142
|
callback() {
|
142
143
|
this.active = !this.active;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
--v-field-padding-end: 4px;
|
4
4
|
}
|
5
5
|
.v-input--density-compact :deep(.v-field) {
|
6
|
-
--v-input-control-height: calc(var(--v-vcs-
|
6
|
+
--v-input-control-height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
7
7
|
--v-field-padding-bottom: 0px;
|
8
8
|
--v-field-input-padding-top: 0px;
|
9
9
|
--v-input-padding-top: 0px;
|
@@ -50,6 +50,12 @@
|
|
50
50
|
:deep(.v-field--appended) {
|
51
51
|
padding-inline-end: 4px;
|
52
52
|
}
|
53
|
+
:deep(.v-field--prepended) {
|
54
|
+
padding-inline-start: 4px;
|
55
|
+
}
|
56
|
+
.no-prepended-content :deep(.v-field--prepended) {
|
57
|
+
padding-inline-start: 0px;
|
58
|
+
}
|
53
59
|
|
54
60
|
// remove margin from prepended Icon
|
55
61
|
.v-input--horizontal :deep(.v-input__prepend) {
|
@@ -58,13 +64,10 @@
|
|
58
64
|
.primary--placeholder {
|
59
65
|
:deep(input::placeholder) {
|
60
66
|
color: rgb(var(--v-theme-primary));
|
61
|
-
font-style: italic;
|
67
|
+
font-style: italic !important;
|
62
68
|
opacity: 1;
|
63
69
|
padding: 0 3px 0 0;
|
64
70
|
}
|
65
|
-
:deep(input::-moz-placeholder) {
|
66
|
-
font-style: initial;
|
67
|
-
}
|
68
71
|
}
|
69
72
|
|
70
73
|
// remove details
|
@@ -11,10 +11,12 @@
|
|
11
11
|
</slot>
|
12
12
|
{{ formatted }}
|
13
13
|
<slot name="append">
|
14
|
-
<span v-if="unit === SpecialUnits.SQM"> m<sup>2</sup> </span>
|
15
|
-
<span v-else-if="unit === SpecialUnits.CBM">
|
16
|
-
|
17
|
-
|
14
|
+
<span class="pl-1" v-if="unit === SpecialUnits.SQM"> m<sup>2</sup> </span>
|
15
|
+
<span class="pl-1" v-else-if="unit === SpecialUnits.CBM">
|
16
|
+
m<sup>3</sup>
|
17
|
+
</span>
|
18
|
+
<span class="pl-1" v-else-if="unit === SpecialUnits.DEG"> ° </span>
|
19
|
+
<span class="pl-1" v-else>
|
18
20
|
{{ unit }}
|
19
21
|
</span>
|
20
22
|
</slot>
|
@@ -31,7 +33,7 @@
|
|
31
33
|
box-sizing: content-box;
|
32
34
|
display: flex;
|
33
35
|
align-items: center;
|
34
|
-
height: calc(var(--v-vcs-
|
36
|
+
height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
35
37
|
}
|
36
38
|
.vcs-disabled {
|
37
39
|
opacity: var(--v-disabled-opacity);
|
@@ -1,5 +1,11 @@
|
|
1
1
|
<template>
|
2
|
-
<div
|
2
|
+
<div
|
3
|
+
class="marked"
|
4
|
+
:class="{
|
5
|
+
'pa-2': !paddingProvided,
|
6
|
+
}"
|
7
|
+
v-html="markedHtml"
|
8
|
+
></div>
|
3
9
|
</template>
|
4
10
|
<style lang="scss" scoped>
|
5
11
|
div {
|
@@ -10,19 +16,13 @@
|
|
10
16
|
margin-bottom: calc(var(--v-vcs-font-size) * 1);
|
11
17
|
}
|
12
18
|
:deep(h2) {
|
13
|
-
margin-bottom: calc(
|
14
|
-
var(--v-vcs-font-size) * 1
|
15
|
-
); /* or any other value you prefer */
|
19
|
+
margin-bottom: calc(var(--v-vcs-font-size) * 1);
|
16
20
|
}
|
17
21
|
:deep(ul) {
|
18
|
-
margin-bottom: calc(
|
19
|
-
var(--v-vcs-font-size) * 1
|
20
|
-
); /* or any other value you prefer */
|
22
|
+
margin-bottom: calc(var(--v-vcs-font-size) * 1);
|
21
23
|
}
|
22
24
|
:deep(ol) {
|
23
|
-
margin-bottom: calc(
|
24
|
-
var(--v-vcs-font-size) * 1
|
25
|
-
); /* or any other value you prefer */
|
25
|
+
margin-bottom: calc(var(--v-vcs-font-size) * 1);
|
26
26
|
}
|
27
27
|
:deep(li) {
|
28
28
|
margin-left: 1.5em;
|
@@ -31,7 +31,8 @@
|
|
31
31
|
</style>
|
32
32
|
<script>
|
33
33
|
import { computed } from 'vue';
|
34
|
-
import { parseAndSanitizeMarkdown } from '
|
34
|
+
import { parseAndSanitizeMarkdown } from './markdownHelper.js';
|
35
|
+
import { usePadding } from '../composables.js';
|
35
36
|
|
36
37
|
export default {
|
37
38
|
name: 'VcsMarkdown',
|
@@ -41,12 +42,14 @@
|
|
41
42
|
default: undefined,
|
42
43
|
},
|
43
44
|
},
|
44
|
-
setup(props) {
|
45
|
+
setup(props, { attrs }) {
|
45
46
|
const markedHtml = computed(() =>
|
46
47
|
parseAndSanitizeMarkdown(props.content),
|
47
48
|
);
|
49
|
+
const paddingProvided = usePadding(attrs);
|
48
50
|
return {
|
49
51
|
markedHtml,
|
52
|
+
paddingProvided,
|
50
53
|
};
|
51
54
|
},
|
52
55
|
};
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
};
|
6
6
|
}, {
|
7
7
|
markedHtml: import("vue").ComputedRef<string>;
|
8
|
+
paddingProvided: import("vue").ComputedRef<boolean>;
|
8
9
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
9
10
|
content: {
|
10
11
|
type: StringConstructor;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/**
|
2
|
+
* @typedef {Object} Block
|
3
|
+
* @property {RegExpExecArray} opening
|
4
|
+
* @property {RegExpExecArray} closing
|
5
|
+
*/
|
6
|
+
/**
|
7
|
+
* @typedef {Block} ConditionalBlock
|
8
|
+
* @property {RegExpExecArray|undefined} elseStatement
|
9
|
+
* @property {RegExpExecArray[]} elseIfs
|
10
|
+
*/
|
11
|
+
/**
|
12
|
+
* @param {string} content
|
13
|
+
* @returns {string}
|
14
|
+
*/
|
15
|
+
export function parseAndSanitizeMarkdown(content: string): string;
|
16
|
+
/**
|
17
|
+
* Renders a template in these steps
|
18
|
+
* 1. expand conditional blocks. this will remove any blocks that do not match their expressions and choose from if / elseif / else block which of them to render
|
19
|
+
* 2. expand iterations. this will create new templates for each iteration and re-run the rendering for those blocks
|
20
|
+
* 3. render attributes. this will add the attributes to all the blocks not within each blocks
|
21
|
+
* @param {string|string[]} template
|
22
|
+
* @param {Record<string, unknown>} data
|
23
|
+
* @returns {string}
|
24
|
+
*/
|
25
|
+
export function renderTemplate(template: string | string[], data: Record<string, unknown>): string;
|
26
|
+
export type Block = {
|
27
|
+
opening: RegExpExecArray;
|
28
|
+
closing: RegExpExecArray;
|
29
|
+
};
|
30
|
+
export type ConditionalBlock = Block;
|