@vcmap/ui 6.1.0-rc.1 → 6.1.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/config/base.config.json +6 -0
- package/config/clipping.config.json +384 -0
- package/config/cluster.config.json +106 -0
- package/config/concepts-show-case.config.json +4 -0
- package/config/projects.config.json +5 -2
- package/dist/assets/{cesium-11e5bbc6.js → cesium-87d5e72d.js} +438 -432
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-9d0cfec3.js → core-72f9f393.js} +4907 -4514
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-0d0ebb27.js → ol-e468ba43.js} +23518 -22404
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-73257b15.css +1 -0
- package/dist/assets/{ui-08446666.js → ui-73257b15.js} +13703 -12977
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-67025c41.css → vuetify-2437380c.css} +2 -2
- package/dist/assets/{vuetify-67025c41.js → vuetify-2437380c.js} +8024 -7634
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +40 -19
- package/index.js +36 -6
- package/lib/olLib.js +25 -3
- package/package.json +6 -6
- package/plugins/@vcmap-show-case/callback-tester/README.md +3 -0
- package/plugins/@vcmap-show-case/callback-tester/package.json +5 -0
- package/plugins/@vcmap-show-case/callback-tester/src/CallbackTester.vue +62 -0
- package/plugins/@vcmap-show-case/callback-tester/src/index.js +48 -0
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +1 -0
- package/src/actions/actionHelper.d.ts +1 -0
- package/src/actions/actionHelper.js +70 -19
- package/src/application/VcsApp.vue +83 -50
- package/src/application/VcsApp.vue.d.ts +28 -2
- package/src/application/VcsContainer.vue +5 -3
- package/src/application/VcsContainer.vue.d.ts +14 -0
- package/src/application/VcsNavbar.vue +10 -6
- package/src/application/VcsNavbar.vue.d.ts +2 -0
- package/src/application/VcsObliqueFooter.vue +9 -3
- package/src/application/VcsSplashScreen.vue +37 -0
- package/src/application/VcsSplashScreen.vue.d.ts +6 -0
- package/src/application/positionDisplayInteraction.js +1 -1
- package/src/callback/activateClippingPolygonCallback.d.ts +29 -0
- package/src/callback/activateClippingPolygonCallback.js +54 -0
- package/src/callback/closeSplashScreenCallback.d.ts +8 -0
- package/src/callback/closeSplashScreenCallback.js +33 -0
- package/src/callback/deactivateClippingPolygonCallback.d.ts +29 -0
- package/src/callback/deactivateClippingPolygonCallback.js +54 -0
- package/src/callback/openSplashScreenCallback.d.ts +8 -0
- package/src/callback/openSplashScreenCallback.js +35 -0
- package/src/callback/toggleNavbarButtonCallback.d.ts +36 -0
- package/src/callback/toggleNavbarButtonCallback.js +62 -0
- package/src/components/buttons/VcsActionButtonList.vue +6 -4
- package/src/components/buttons/VcsToolButton.vue +0 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue +7 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +1 -1
- package/src/components/form-inputs-controls/VcsTextArea.vue +13 -8
- package/src/components/form-output/markdownHelper.d.ts +0 -25
- package/src/components/form-output/markdownHelper.js +1 -386
- package/src/components/import/VcsImportComponent.vue +2 -0
- package/src/components/lists/VcsGroupedList.vue +178 -0
- package/src/components/lists/VcsGroupedList.vue.d.ts +17 -0
- package/src/components/lists/VcsList.vue +144 -394
- package/src/components/lists/VcsList.vue.d.ts +38 -159
- package/src/components/lists/VcsTreeNode.vue +18 -11
- package/src/components/lists/VcsTreeview.vue +27 -20
- package/src/components/lists/VcsTreeview.vue.d.ts +18 -1
- package/src/components/lists/listHelper.d.ts +87 -0
- package/src/components/lists/listHelper.js +348 -0
- package/src/components/section/VcsFormSection.vue +7 -2
- package/src/components/section/VcsFormSection.vue.d.ts +9 -0
- package/src/components/tables/VcsDataTable.vue +14 -3
- package/src/components/tables/VcsDataTable.vue.d.ts +9 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -1
- package/src/contentTree/LayerTree.vue +2 -1
- package/src/contentTree/LayerTree.vue.d.ts +2 -0
- package/src/contentTree/contentTreeCollection.d.ts +1 -0
- package/src/contentTree/contentTreeCollection.js +7 -3
- package/src/contentTree/contentTreeItem.js +4 -2
- package/src/contentTree/groupContentTreeItem.js +5 -3
- package/src/featureInfo/ClusterFeatureComponent.vue +58 -0
- package/src/featureInfo/ClusterFeatureComponent.vue.d.ts +6 -0
- package/src/featureInfo/abstractFeatureInfoView.js +1 -2
- package/src/featureInfo/featureInfo.d.ts +87 -1
- package/src/featureInfo/featureInfo.js +342 -34
- package/src/featureInfo/featureInfoInteraction.js +18 -3
- package/src/featureInfo/iframeFeatureInfoView.js +1 -1
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +2 -4
- package/src/featureInfo/markdownFeatureInfoView.js +1 -1
- package/src/i18n/de.d.ts +17 -4
- package/src/i18n/de.js +7 -0
- package/src/i18n/en.d.ts +17 -4
- package/src/i18n/en.js +7 -0
- package/src/legend/VcsLegend.vue +1 -1
- package/src/legend/legendHelper.d.ts +1 -1
- package/src/legend/legendHelper.js +52 -9
- package/src/localStorage.d.ts +21 -0
- package/src/localStorage.js +51 -0
- package/src/manager/collectionManager/CollectionComponent.vue +1 -1
- package/src/manager/collectionManager/CollectionComponentContent.vue +2 -3
- package/src/manager/collectionManager/CollectionComponentList.vue +2 -3
- package/src/manager/collectionManager/CollectionComponentStandalone.vue +1 -1
- package/src/manager/navbarManager.js +9 -4
- package/src/manager/toolbox/ToolboxManagerComponent.vue +14 -12
- package/src/manager/toolbox/ToolboxManagerComponent.vue.d.ts +13 -2
- package/src/manager/toolbox/toolboxManager.d.ts +5 -0
- package/src/manager/toolbox/toolboxManager.js +7 -1
- package/src/manager/window/WindowComponent.vue +10 -0
- package/src/manager/window/WindowComponent.vue.d.ts +1 -0
- package/src/manager/window/WindowManager.vue +14 -4
- package/src/manager/window/WindowManager.vue.d.ts +1 -0
- package/src/manager/window/windowHelper.d.ts +7 -3
- package/src/manager/window/windowHelper.js +30 -10
- package/src/navigation/MapNavigation.vue +5 -5
- package/src/navigation/MapNavigation.vue.d.ts +1 -1
- package/src/navigation/overviewMap.d.ts +7 -0
- package/src/navigation/overviewMap.js +18 -4
- package/src/pluginHelper.d.ts +7 -0
- package/src/pluginHelper.js +18 -4
- package/src/search/ResultItem.vue.d.ts +1 -1
- package/src/search/markText.d.ts +1 -1
- package/src/search/markText.js +4 -4
- package/src/search/search.js +1 -1
- package/src/state.d.ts +4 -2
- package/src/state.js +54 -31
- package/src/uiConfig.d.ts +36 -0
- package/src/uiConfig.js +17 -1
- package/src/vcsUiApp.js +7 -11
- package/dist/assets/ui-08446666.css +0 -1
- /package/dist/assets/{vue-2f81c7f8.js → vue-ff37ea23.js} +0 -0
@@ -14,7 +14,7 @@
|
|
14
14
|
<div class="d-flex">
|
15
15
|
<VcsActionButtonList
|
16
16
|
:actions="mapActions"
|
17
|
-
:overflow-count="3"
|
17
|
+
:overflow-count="smAndDown ? 2 : 3"
|
18
18
|
:force-overflow="false"
|
19
19
|
button="VcsToolButton"
|
20
20
|
/>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
/>
|
30
30
|
<VcsActionButtonList
|
31
31
|
:actions="contentActions"
|
32
|
-
:overflow-count="
|
32
|
+
:overflow-count="smAndDown ? 2 : 3"
|
33
33
|
:force-overflow="false"
|
34
34
|
button="VcsToolButton"
|
35
35
|
/>
|
@@ -41,8 +41,9 @@
|
|
41
41
|
/>
|
42
42
|
<VcsActionButtonList
|
43
43
|
:actions="toolActions"
|
44
|
+
:overflow-count="smAndDown ? 1 : 2"
|
44
45
|
:force-overflow="false"
|
45
|
-
v-if="
|
46
|
+
v-if="smAndUp"
|
46
47
|
button="VcsToolButton"
|
47
48
|
/>
|
48
49
|
</div>
|
@@ -50,7 +51,7 @@
|
|
50
51
|
</v-col>
|
51
52
|
<v-col class="d-flex justify-center flex-grow-2 mx-2">
|
52
53
|
<div class="d-flex align-center">
|
53
|
-
<template v-if="!
|
54
|
+
<template v-if="!smAndDown">
|
54
55
|
<img class="logo" :src="logo" draggable="false" alt="Logo" />
|
55
56
|
</template>
|
56
57
|
<div
|
@@ -63,10 +64,11 @@
|
|
63
64
|
</div>
|
64
65
|
</v-col>
|
65
66
|
<v-col class="align-content-end d-flex justify-end">
|
66
|
-
<v-toolbar-items v-if="
|
67
|
+
<v-toolbar-items v-if="smAndUp">
|
67
68
|
<div class="d-flex">
|
68
69
|
<VcsActionButtonList
|
69
70
|
:actions="projectActions"
|
71
|
+
:overflow-count="smAndDown ? 1 : 2"
|
70
72
|
:force-overflow="false"
|
71
73
|
button="VcsToolButton"
|
72
74
|
/>
|
@@ -206,7 +208,7 @@
|
|
206
208
|
destroySearchAction();
|
207
209
|
});
|
208
210
|
|
209
|
-
const { xs, mdAndUp } = useDisplay();
|
211
|
+
const { xs, mdAndUp, smAndDown, smAndUp } = useDisplay();
|
210
212
|
|
211
213
|
const density = computed(() => {
|
212
214
|
return xs.value ? 'comfortable' : 'compact';
|
@@ -228,8 +230,10 @@
|
|
228
230
|
config: app.uiConfig.config,
|
229
231
|
logo,
|
230
232
|
xs,
|
233
|
+
smAndDown,
|
231
234
|
density,
|
232
235
|
mdAndUp,
|
236
|
+
smAndUp,
|
233
237
|
toolbarHeight,
|
234
238
|
};
|
235
239
|
},
|
@@ -42,8 +42,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
42
42
|
config: any;
|
43
43
|
logo: import("vue").ComputedRef<any>;
|
44
44
|
xs: import("vue").Ref<boolean>;
|
45
|
+
smAndDown: import("vue").Ref<boolean>;
|
45
46
|
density: import("vue").ComputedRef<"compact" | "comfortable">;
|
46
47
|
mdAndUp: import("vue").Ref<boolean>;
|
48
|
+
smAndUp: import("vue").Ref<boolean>;
|
47
49
|
toolbarHeight: import("vue").ComputedRef<number>;
|
48
50
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
49
51
|
export default _default;
|
@@ -17,8 +17,12 @@
|
|
17
17
|
|
18
18
|
<script>
|
19
19
|
import { computed, inject, onUnmounted, shallowRef } from 'vue';
|
20
|
-
import {
|
21
|
-
|
20
|
+
import {
|
21
|
+
ObliqueMap,
|
22
|
+
ObliqueViewDirection,
|
23
|
+
renderTemplate,
|
24
|
+
} from '@vcmap/core';
|
25
|
+
import { parseAndSanitizeMarkdown } from '../components/form-output/markdownHelper.js';
|
22
26
|
|
23
27
|
const i18nViewDirection = {
|
24
28
|
[ObliqueViewDirection.NORTH]: 'footer.oblique.north',
|
@@ -95,7 +99,9 @@
|
|
95
99
|
app.uiConfig.config.obliqueFooterTemplate ??
|
96
100
|
'footer.oblique.template';
|
97
101
|
return renderTemplate(
|
98
|
-
|
102
|
+
parseAndSanitizeMarkdown(
|
103
|
+
app.vueI18n.te(template) ? app.vueI18n.tm(template) : template,
|
104
|
+
),
|
99
105
|
getTranslatedImageInfo(currentImage.value),
|
100
106
|
);
|
101
107
|
}
|
@@ -25,6 +25,13 @@
|
|
25
25
|
/>
|
26
26
|
</template>
|
27
27
|
</VcsCheckbox>
|
28
|
+
<VcsCheckbox v-if="options.enableDontShowAgain" v-model="dontShowAgain">
|
29
|
+
<template #label>
|
30
|
+
<div class="pl-2">
|
31
|
+
{{ $t('components.splashScreen.dontShowAgain') }}
|
32
|
+
</div>
|
33
|
+
</template>
|
34
|
+
</VcsCheckbox>
|
28
35
|
</v-card-text>
|
29
36
|
|
30
37
|
<v-card-actions>
|
@@ -33,6 +40,11 @@
|
|
33
40
|
v-if="
|
34
41
|
options.secondaryButtonTitle && options.secondaryCallbackOptions
|
35
42
|
"
|
43
|
+
:disabled="
|
44
|
+
option.requireInputForSecondary &&
|
45
|
+
options.acceptInput &&
|
46
|
+
!checkBox
|
47
|
+
"
|
36
48
|
@click="secondaryButtonClicked"
|
37
49
|
>
|
38
50
|
{{ $st(options.secondaryButtonTitle) }}
|
@@ -55,11 +67,27 @@
|
|
55
67
|
<script>
|
56
68
|
import { VDialog, VCard, VCardText, VCardActions } from 'vuetify/components';
|
57
69
|
import { computed, ref, inject } from 'vue';
|
70
|
+
import { moduleIdSymbol } from '@vcmap/core';
|
71
|
+
import { v5 as uuidv5 } from 'uuid';
|
72
|
+
import { hideSplashScreenKey, setToLocalStorage } from '../localStorage.js';
|
58
73
|
import { executeCallbacks } from '../callback/vcsCallback.js';
|
59
74
|
import VcsFormButton from '../components/buttons/VcsFormButton.vue';
|
60
75
|
import VcsCheckbox from '../components/form-inputs-controls/VcsCheckbox.vue';
|
61
76
|
import VcsMarkdown from '../components/form-output/VcsMarkdown.vue';
|
62
77
|
import { useProxiedAtomicModel } from '../components/modelHelper.js';
|
78
|
+
import { name } from '../../package.json';
|
79
|
+
|
80
|
+
/**
|
81
|
+
* @param {import("@vcmap/ui").VcsUiApp} app
|
82
|
+
* @returns {Promise<string>} The hash of the SplashScreen config.
|
83
|
+
*/
|
84
|
+
export function getSplashScreenHash(app) {
|
85
|
+
const config = app.uiConfig.getByKey('splashScreen');
|
86
|
+
const string = JSON.stringify(
|
87
|
+
Object.entries(config.value).sort((a, b) => a[0].localeCompare(b[0])),
|
88
|
+
);
|
89
|
+
return uuidv5(string, uuidv5.URL);
|
90
|
+
}
|
63
91
|
|
64
92
|
export default {
|
65
93
|
name: 'VcsSplashScreen',
|
@@ -87,9 +115,17 @@
|
|
87
115
|
const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
|
88
116
|
|
89
117
|
const checkBox = ref(false);
|
118
|
+
const dontShowAgain = ref(false);
|
119
|
+
|
90
120
|
function exitScreen() {
|
91
121
|
localValue.value = false;
|
92
122
|
checkBox.value = false;
|
123
|
+
if (dontShowAgain.value) {
|
124
|
+
const config = app.uiConfig.getByKey('splashScreen');
|
125
|
+
const hash = getSplashScreenHash(app);
|
126
|
+
const moduleId = config[moduleIdSymbol];
|
127
|
+
setToLocalStorage(`${name}_${moduleId}`, hideSplashScreenKey, hash);
|
128
|
+
}
|
93
129
|
if (Array.isArray(props.options.exitCallbackOptions)) {
|
94
130
|
executeCallbacks(app, props.options.exitCallbackOptions);
|
95
131
|
}
|
@@ -113,6 +149,7 @@
|
|
113
149
|
exitScreen,
|
114
150
|
secondaryButtonClicked,
|
115
151
|
checkBox,
|
152
|
+
dontShowAgain,
|
116
153
|
position,
|
117
154
|
};
|
118
155
|
},
|
@@ -1,3 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* @param {import("@vcmap/ui").VcsUiApp} app
|
3
|
+
* @returns {Promise<string>} The hash of the SplashScreen config.
|
4
|
+
*/
|
5
|
+
export function getSplashScreenHash(app: import("@vcmap/ui").VcsUiApp): Promise<string>;
|
1
6
|
declare const _default: import("vue").DefineComponent<{
|
2
7
|
modelValue: {
|
3
8
|
type: BooleanConstructor;
|
@@ -12,6 +17,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
12
17
|
exitScreen: () => void;
|
13
18
|
secondaryButtonClicked: () => void;
|
14
19
|
checkBox: import("vue").Ref<boolean>;
|
20
|
+
dontShowAgain: import("vue").Ref<boolean>;
|
15
21
|
position: import("vue").ComputedRef<{
|
16
22
|
width: any;
|
17
23
|
height: any;
|
@@ -55,7 +55,7 @@ class PositionDisplayInteraction extends AbstractInteraction {
|
|
55
55
|
* @returns {Promise<import("@vcmap/core").InteractionEvent>}
|
56
56
|
*/
|
57
57
|
pipe(event) {
|
58
|
-
if (!event.position.every((pos) => pos === 0)) {
|
58
|
+
if (event.position && !event.position.every((pos) => pos === 0)) {
|
59
59
|
this.position.value = [...event.position];
|
60
60
|
}
|
61
61
|
return Promise.resolve(event);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export default ActivateClippingPolygonCallback;
|
2
|
+
export type ActivateClippingPolygonOptions = import("./vcsCallback.js").VcsCallbackOptions & {
|
3
|
+
names: string[];
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { names: string[] }} ActivateClippingPolygonOptions
|
7
|
+
* @property {string[]} names - names of the ClippingPolygonObjects to activate
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* @class
|
11
|
+
* @extends {VcsCallback}
|
12
|
+
*/
|
13
|
+
declare class ActivateClippingPolygonCallback extends VcsCallback {
|
14
|
+
/**
|
15
|
+
* @param {ActivateClippingPolygonOptions} options
|
16
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
17
|
+
*/
|
18
|
+
constructor(options: ActivateClippingPolygonOptions, app: import("@src/vcsUiApp.js").default);
|
19
|
+
/**
|
20
|
+
* @type {string[]}
|
21
|
+
* @private
|
22
|
+
*/
|
23
|
+
private _names;
|
24
|
+
/**
|
25
|
+
* @returns {ActivateClippingPolygonOptions}
|
26
|
+
*/
|
27
|
+
toJSON(): ActivateClippingPolygonOptions;
|
28
|
+
}
|
29
|
+
import VcsCallback from './vcsCallback.js';
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { names: string[] }} ActivateClippingPolygonOptions
|
5
|
+
* @property {string[]} names - names of the ClippingPolygonObjects to activate
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @class
|
10
|
+
* @extends {VcsCallback}
|
11
|
+
*/
|
12
|
+
class ActivateClippingPolygonCallback extends VcsCallback {
|
13
|
+
/**
|
14
|
+
* @type {string}
|
15
|
+
*/
|
16
|
+
static get className() {
|
17
|
+
return 'ActivateClippingPolygonCallback';
|
18
|
+
}
|
19
|
+
|
20
|
+
/**
|
21
|
+
* @param {ActivateClippingPolygonOptions} options
|
22
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
23
|
+
*/
|
24
|
+
constructor(options, app) {
|
25
|
+
super(options, app);
|
26
|
+
/**
|
27
|
+
* @type {string[]}
|
28
|
+
* @private
|
29
|
+
*/
|
30
|
+
this._names = options.names;
|
31
|
+
}
|
32
|
+
|
33
|
+
callback() {
|
34
|
+
this._names
|
35
|
+
.map((n) => this._app.clippingPolygons.getByKey(n))
|
36
|
+
.filter((l) => l)
|
37
|
+
.forEach((l) => l.activate());
|
38
|
+
}
|
39
|
+
|
40
|
+
/**
|
41
|
+
* @returns {ActivateClippingPolygonOptions}
|
42
|
+
*/
|
43
|
+
toJSON() {
|
44
|
+
const config = super.toJSON();
|
45
|
+
config.names = this._names.slice();
|
46
|
+
return config;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
export default ActivateClippingPolygonCallback;
|
51
|
+
callbackClassRegistry.registerClass(
|
52
|
+
ActivateClippingPolygonCallback.className,
|
53
|
+
ActivateClippingPolygonCallback,
|
54
|
+
);
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class
|
5
|
+
* @extends {VcsCallback}
|
6
|
+
*/
|
7
|
+
class CloseSplashScreenCallback extends VcsCallback {
|
8
|
+
/**
|
9
|
+
* @type {string}
|
10
|
+
*/
|
11
|
+
static get className() {
|
12
|
+
return 'CloseSplashScreenCallback';
|
13
|
+
}
|
14
|
+
|
15
|
+
callback() {
|
16
|
+
this._app.uiConfig.showSplashScreen = false;
|
17
|
+
}
|
18
|
+
|
19
|
+
/**
|
20
|
+
* @returns {import('./vcsCallback.js').VcsCallbackOptions}
|
21
|
+
*/
|
22
|
+
toJSON() {
|
23
|
+
return super.toJSON();
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
export default CloseSplashScreenCallback;
|
28
|
+
|
29
|
+
// Register the class
|
30
|
+
callbackClassRegistry.registerClass(
|
31
|
+
CloseSplashScreenCallback.className,
|
32
|
+
CloseSplashScreenCallback,
|
33
|
+
);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export default DeactivateClippingPolygonCallback;
|
2
|
+
export type DeactivateClippingPolygonOptions = import("./vcsCallback.js").VcsCallbackOptions & {
|
3
|
+
names: string[];
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { names: string[] }} DeactivateClippingPolygonOptions
|
7
|
+
* @property {string[]} names - names of the ClippingPolygonObjects to deactivate
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* @class
|
11
|
+
* @extends {VcsCallback}
|
12
|
+
*/
|
13
|
+
declare class DeactivateClippingPolygonCallback extends VcsCallback {
|
14
|
+
/**
|
15
|
+
* @param {DeactivateClippingPolygonOptions} options
|
16
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
17
|
+
*/
|
18
|
+
constructor(options: DeactivateClippingPolygonOptions, app: import("@src/vcsUiApp.js").default);
|
19
|
+
/**
|
20
|
+
* @type {string[]}
|
21
|
+
* @private
|
22
|
+
*/
|
23
|
+
private _names;
|
24
|
+
/**
|
25
|
+
* @returns {DeactivateClippingPolygonOptions}
|
26
|
+
*/
|
27
|
+
toJSON(): DeactivateClippingPolygonOptions;
|
28
|
+
}
|
29
|
+
import VcsCallback from './vcsCallback.js';
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { names: string[] }} DeactivateClippingPolygonOptions
|
5
|
+
* @property {string[]} names - names of the ClippingPolygonObjects to deactivate
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @class
|
10
|
+
* @extends {VcsCallback}
|
11
|
+
*/
|
12
|
+
class DeactivateClippingPolygonCallback extends VcsCallback {
|
13
|
+
/**
|
14
|
+
* @type {string}
|
15
|
+
*/
|
16
|
+
static get className() {
|
17
|
+
return 'DeactivateClippingPolygonCallback';
|
18
|
+
}
|
19
|
+
|
20
|
+
/**
|
21
|
+
* @param {DeactivateClippingPolygonOptions} options
|
22
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
23
|
+
*/
|
24
|
+
constructor(options, app) {
|
25
|
+
super(options, app);
|
26
|
+
/**
|
27
|
+
* @type {string[]}
|
28
|
+
* @private
|
29
|
+
*/
|
30
|
+
this._names = options.names;
|
31
|
+
}
|
32
|
+
|
33
|
+
callback() {
|
34
|
+
this._names
|
35
|
+
.map((n) => this._app.clippingPolygons.getByKey(n))
|
36
|
+
.filter((l) => l)
|
37
|
+
.forEach((l) => l.deactivate());
|
38
|
+
}
|
39
|
+
|
40
|
+
/**
|
41
|
+
* @returns {DeactivateClippingPolygonOptions}
|
42
|
+
*/
|
43
|
+
toJSON() {
|
44
|
+
const config = super.toJSON();
|
45
|
+
config.names = this._names.slice();
|
46
|
+
return config;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
export default DeactivateClippingPolygonCallback;
|
51
|
+
callbackClassRegistry.registerClass(
|
52
|
+
DeactivateClippingPolygonCallback.className,
|
53
|
+
DeactivateClippingPolygonCallback,
|
54
|
+
);
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class
|
5
|
+
* @extends {VcsCallback}
|
6
|
+
*/
|
7
|
+
class OpenSplashScreenCallback extends VcsCallback {
|
8
|
+
/**
|
9
|
+
* @type {string}
|
10
|
+
*/
|
11
|
+
static get className() {
|
12
|
+
return 'OpenSplashScreenCallback';
|
13
|
+
}
|
14
|
+
|
15
|
+
callback() {
|
16
|
+
if (this._app.uiConfig.getByKey('splashScreen')) {
|
17
|
+
this._app.uiConfig.showSplashScreen = true;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* @returns {import('./vcsCallback.js').VcsCallbackOptions}
|
23
|
+
*/
|
24
|
+
toJSON() {
|
25
|
+
return super.toJSON();
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
export default OpenSplashScreenCallback;
|
30
|
+
|
31
|
+
// Register the class
|
32
|
+
callbackClassRegistry.registerClass(
|
33
|
+
OpenSplashScreenCallback.className,
|
34
|
+
OpenSplashScreenCallback,
|
35
|
+
);
|
@@ -0,0 +1,36 @@
|
|
1
|
+
export default ToggleNavbarButtonCallback;
|
2
|
+
export type ToggleNavbarButtonOptions = import("./vcsCallback.js").VcsCallbackOptions & {
|
3
|
+
buttonId: string;
|
4
|
+
activeState?: boolean;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { buttonId: string, activeState?:boolean }} ToggleNavbarButtonOptions
|
8
|
+
* @property {string} buttonId - id of the Navbar button
|
9
|
+
* @property {boolean} [activeState] - state to be applied to the button
|
10
|
+
*/
|
11
|
+
/**
|
12
|
+
* @class
|
13
|
+
* @extends {VcsCallback}
|
14
|
+
*/
|
15
|
+
declare class ToggleNavbarButtonCallback extends VcsCallback {
|
16
|
+
/**
|
17
|
+
* @param {ToggleNavbarButtonOptions} options
|
18
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
19
|
+
*/
|
20
|
+
constructor(options: ToggleNavbarButtonOptions, app: import("@src/vcsUiApp.js").default);
|
21
|
+
/**
|
22
|
+
* @type {string}
|
23
|
+
* @private
|
24
|
+
*/
|
25
|
+
private _buttonId;
|
26
|
+
/**
|
27
|
+
* @type {boolean|undefined}
|
28
|
+
* @private
|
29
|
+
*/
|
30
|
+
private _activeState;
|
31
|
+
/**
|
32
|
+
* @returns {ToggleNavbarButtonOptions}
|
33
|
+
*/
|
34
|
+
toJSON(): ToggleNavbarButtonOptions;
|
35
|
+
}
|
36
|
+
import VcsCallback from './vcsCallback.js';
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { buttonId: string, activeState?:boolean }} ToggleNavbarButtonOptions
|
5
|
+
* @property {string} buttonId - id of the Navbar button
|
6
|
+
* @property {boolean} [activeState] - state to be applied to the button
|
7
|
+
*/
|
8
|
+
|
9
|
+
/**
|
10
|
+
* @class
|
11
|
+
* @extends {VcsCallback}
|
12
|
+
*/
|
13
|
+
class ToggleNavbarButtonCallback extends VcsCallback {
|
14
|
+
/**
|
15
|
+
* @type {string}
|
16
|
+
*/
|
17
|
+
static get className() {
|
18
|
+
return 'ToggleNavbarButtonCallback';
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* @param {ToggleNavbarButtonOptions} options
|
23
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
24
|
+
*/
|
25
|
+
constructor(options, app) {
|
26
|
+
super(options, app);
|
27
|
+
/**
|
28
|
+
* @type {string}
|
29
|
+
* @private
|
30
|
+
*/
|
31
|
+
this._buttonId = options.buttonId;
|
32
|
+
/**
|
33
|
+
* @type {boolean|undefined}
|
34
|
+
* @private
|
35
|
+
*/
|
36
|
+
this._activeState = options.activeState;
|
37
|
+
}
|
38
|
+
|
39
|
+
callback() {
|
40
|
+
this._app.navbarManager.toggle(this._buttonId, this._activeState);
|
41
|
+
}
|
42
|
+
|
43
|
+
/**
|
44
|
+
* @returns {ToggleNavbarButtonOptions}
|
45
|
+
*/
|
46
|
+
toJSON() {
|
47
|
+
const config = super.toJSON();
|
48
|
+
config.buttonId = this._buttonId;
|
49
|
+
if (this._activeState) {
|
50
|
+
config.activeState = this._activeState;
|
51
|
+
}
|
52
|
+
return config;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
export default ToggleNavbarButtonCallback;
|
57
|
+
|
58
|
+
// Register the class
|
59
|
+
callbackClassRegistry.registerClass(
|
60
|
+
ToggleNavbarButtonCallback.className,
|
61
|
+
ToggleNavbarButtonCallback,
|
62
|
+
);
|
@@ -38,12 +38,14 @@
|
|
38
38
|
</template>
|
39
39
|
<VcsActionList :actions="overflowButtons" :disabled="disabled" />
|
40
40
|
</v-menu>
|
41
|
-
<v-spacer
|
42
|
-
v-else-if="blockOverflow"
|
43
|
-
class="flex-grow-0 d-inline-block px-2"
|
44
|
-
/>
|
41
|
+
<v-spacer v-else-if="blockOverflow" />
|
45
42
|
</div>
|
46
43
|
</template>
|
44
|
+
<style scoped lang="scss">
|
45
|
+
:deep(.v-spacer) {
|
46
|
+
width: calc(var(--v-vcs-font-size) * 1.25);
|
47
|
+
}
|
48
|
+
</style>
|
47
49
|
<script>
|
48
50
|
import { VIcon, VMenu, VSpacer } from 'vuetify/components';
|
49
51
|
import VcsButton from './VcsButton.vue';
|
@@ -82,7 +82,6 @@
|
|
82
82
|
* @vue-prop {string} icon - When given, will display an icon in the button. Replaces vuetify icon property.
|
83
83
|
* @vue-prop {string} tooltip - Text content of a tooltip which appears on hover with default delay.
|
84
84
|
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} tooltipPosition - Position of the tooltip.
|
85
|
-
* @vue-prop {Object<string, any>} tooltipProps - Properties to be passed to the tooltip {@link https://vuetifyjs.com/en/api/v-tooltip/#props|vuetify v-tooltip}
|
86
85
|
* @vue-computed {string} appliedColor - color applied to button, depending on size and state
|
87
86
|
* @vue-computed {boolean} hasDefaultSlot
|
88
87
|
*/
|
@@ -18,7 +18,8 @@
|
|
18
18
|
v-model="localValue"
|
19
19
|
hide-header
|
20
20
|
@update:model-value="menuOpen = false"
|
21
|
-
color="primary"
|
21
|
+
:color="datePickerProps.color ?? 'primary'"
|
22
|
+
v-bind="{ ...datePickerProps }"
|
22
23
|
>
|
23
24
|
<template #actions>
|
24
25
|
<v-btn color="primary" @click="goToToday">
|
@@ -40,6 +41,7 @@
|
|
40
41
|
* @description stylized wrapper around {@link https://vuetifyjs.com/en/components/date-pickers/#internationalization}.
|
41
42
|
* @vue-prop {Date} modelValue - value of the date picker as a Date (changes to the Date Object are not tracked, handled as atomic value)
|
42
43
|
* @vue-prop {string} [icon] - specify optional prepend icon, defaults to mdi-calendar
|
44
|
+
* @vue-prop {Object} [datePickerProps] - props that are passed to the {@link https://vuetifyjs.com/en/api/v-date-picker/ | VDatePicker}
|
43
45
|
*/
|
44
46
|
export default {
|
45
47
|
name: 'VcsDatePicker',
|
@@ -52,6 +54,10 @@
|
|
52
54
|
type: String,
|
53
55
|
default: 'mdi-calendar',
|
54
56
|
},
|
57
|
+
datePickerProps: {
|
58
|
+
type: Object,
|
59
|
+
default: () => ({}),
|
60
|
+
},
|
55
61
|
},
|
56
62
|
components: {
|
57
63
|
VMenu,
|
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
7
7
|
type: StringConstructor;
|
8
8
|
default: string;
|
9
9
|
};
|
10
|
+
datePickerProps: {
|
11
|
+
type: ObjectConstructor;
|
12
|
+
default: () => {};
|
13
|
+
};
|
10
14
|
}, {
|
11
15
|
formattedDate: import("vue").WritableComputedRef<string>;
|
12
16
|
localValue: import("vue").WritableComputedRef<Date>;
|
@@ -22,10 +26,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
22
26
|
type: StringConstructor;
|
23
27
|
default: string;
|
24
28
|
};
|
29
|
+
datePickerProps: {
|
30
|
+
type: ObjectConstructor;
|
31
|
+
default: () => {};
|
32
|
+
};
|
25
33
|
}>> & {
|
26
34
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
27
35
|
}, {
|
28
36
|
icon: string;
|
29
37
|
modelValue: Date;
|
38
|
+
datePickerProps: Record<string, any>;
|
30
39
|
}, {}>;
|
31
40
|
export default _default;
|