@vcmap/ui 6.0.11 → 6.1.0-rc.1
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 +25 -3
- package/config/dev.config.json +17 -3
- package/config/splashscreen.config.json +13 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-d78889f9.js → core-9d0cfec3.js} +6949 -5868
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-08446666.css +1 -0
- package/dist/assets/{ui-f56287eb.js → ui-08446666.js} +17374 -19067
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-03bc5f58.js → vuetify-67025c41.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +11 -1
- package/index.js +6 -0
- package/package.json +2 -2
- package/plugins/@vcmap-show-case/dev-tools/package.json +5 -0
- package/plugins/@vcmap-show-case/dev-tools/src/eventLogger.js +35 -0
- package/plugins/@vcmap-show-case/dev-tools/src/index.js +59 -0
- package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +10 -0
- package/src/application/VcsApp.vue.d.ts +22 -0
- package/src/application/VcsContainer.vue.d.ts +15 -0
- package/src/application/VcsSplashScreen.vue +35 -28
- package/src/application/VcsSplashScreen.vue.d.ts +1 -0
- package/src/callback/addModuleCallback.d.ts +29 -0
- package/src/callback/addModuleCallback.js +61 -0
- package/src/callback/removeModuleCallback.d.ts +29 -0
- package/src/callback/removeModuleCallback.js +53 -0
- package/src/callback/startRotationCallback.d.ts +37 -0
- package/src/callback/startRotationCallback.js +67 -0
- package/src/callback/stopRotationCallback.d.ts +8 -0
- package/src/callback/stopRotationCallback.js +37 -0
- package/src/components/icons/+all.js +4 -0
- package/src/components/icons/View360Icon.vue +55 -0
- package/src/components/icons/View360Icon.vue.d.ts +2 -0
- package/src/components/lists/VcsTreeNode.vue +237 -0
- package/src/components/lists/VcsTreeNode.vue.d.ts +31 -0
- package/src/components/lists/VcsTreeview.vue +103 -173
- package/src/components/lists/VcsTreeview.vue.d.ts +41 -4
- package/src/components/lists/VcsTreeviewTitle.vue +10 -3
- package/src/components/lists/VcsTreeviewTitle.vue.d.ts +2 -0
- package/src/featureInfo/BalloonComponent.vue +18 -47
- package/src/featureInfo/BalloonComponent.vue.d.ts +0 -1
- package/src/featureInfo/IframeComponent.vue +1 -32
- package/src/featureInfo/IframeComponent.vue.d.ts +1 -4
- package/src/i18n/de.d.ts +1 -0
- package/src/i18n/de.js +1 -0
- package/src/i18n/en.d.ts +1 -0
- package/src/i18n/en.js +1 -0
- package/src/init.d.ts +6 -0
- package/src/init.js +26 -14
- package/src/manager/window/WindowComponent.vue +1 -1
- package/src/navigation/MapNavigation.vue +83 -1
- package/src/navigation/MapNavigation.vue.d.ts +2 -0
- package/src/search/ResultItem.vue +1 -10
- package/src/search/ResultsComponent.vue +11 -1
- package/src/search/ResultsComponent.vue.d.ts +9 -0
- package/src/search/SearchComponent.vue +88 -11
- package/src/search/SearchComponent.vue.d.ts +7 -0
- package/src/search/search.d.ts +3 -0
- package/src/search/search.js +3 -2
- package/src/uiConfig.d.ts +31 -0
- package/src/uiConfig.js +5 -0
- package/src/vuePlugins/vuetify.js +2 -0
- package/dist/assets/ui-f56287eb.css +0 -1
- /package/dist/assets/{cesium-5a0d7ac6.js → cesium-11e5bbc6.js} +0 -0
- /package/dist/assets/{ol-27d44222.js → ol-0d0ebb27.js} +0 -0
- /package/dist/assets/{vue-41556557.js → vue-2f81c7f8.js} +0 -0
- /package/dist/assets/{vuetify-03bc5f58.css → vuetify-67025c41.css} +0 -0
package/dist/assets/ui.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./ui-
|
1
|
+
export * from "./ui-08446666.js";
|
package/dist/assets/vue.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./vue-
|
1
|
+
export * from "./vue-2f81c7f8.js";
|
@@ -10,7 +10,7 @@ function loadCss(href) {
|
|
10
10
|
elem.onerror = reject;
|
11
11
|
document.head.appendChild(elem);
|
12
12
|
});
|
13
|
-
} await loadCss('./assets/vuetify-
|
13
|
+
} await loadCss('./assets/vuetify-67025c41.css');import { watch as X, onScopeDispose as tt, effectScope as Ul, shallowRef as K, Fragment as ie, reactive as it, computed as b, watchEffect as Ne, toRefs as Wt, capitalize as On, isVNode as Oc, Comment as Rc, unref as ot, warn as Ha, getCurrentInstance as Nc, ref as W, provide as Ae, inject as ye, defineComponent as Hc, camelize as Ir, h as jt, toRaw as Ee, createVNode as r, mergeProps as N, onBeforeUnmount as nt, readonly as Kl, onDeactivated as _r, onActivated as zc, onMounted as Ke, nextTick as Se, TransitionGroup as ql, Transition as Ht, isRef as _n, toRef as F, onBeforeMount as Xl, withDirectives as $e, resolveDirective as dt, vShow as xt, onUpdated as Wc, Text as jc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Uc, cloneVNode as Kc, createTextVNode as Pt, onUnmounted as qc, onBeforeUpdate as Xc, withModifiers as Pl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Tr } from "./vue-2f81c7f8.js";
|
14
14
|
function rt(e, n) {
|
15
15
|
let t;
|
16
16
|
function a() {
|
package/dist/assets/vuetify.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./vuetify-
|
1
|
+
export * from "./vuetify-67025c41.js";
|
package/index.d.ts
CHANGED
@@ -8,6 +8,14 @@ export { default as GoToViewpointCallback } from "./src/callback/goToViewpointCa
|
|
8
8
|
export type * from "./src/callback/goToViewpointCallback.d.ts";
|
9
9
|
export { default as ApplyLayerStyleCallback } from "./src/callback/applyLayerStyleCallback.js";
|
10
10
|
export type * from "./src/callback/applyLayerStyleCallback.d.ts";
|
11
|
+
export { default as StopRotationCallback } from "./src/callback/stopRotationCallback.js";
|
12
|
+
export type * from "./src/callback/stopRotationCallback.d.ts";
|
13
|
+
export { default as StartRotationCallback } from "./src/callback/startRotationCallback.js";
|
14
|
+
export type * from "./src/callback/startRotationCallback.d.ts";
|
15
|
+
export { default as AddModuleCallback } from "./src/callback/addModuleCallback.js";
|
16
|
+
export type * from "./src/callback/addModuleCallback.d.ts";
|
17
|
+
export { default as RemoveModuleCallback } from "./src/callback/removeModuleCallback.js";
|
18
|
+
export type * from "./src/callback/removeModuleCallback.d.ts";
|
11
19
|
export { default as VcsNavbar } from "./src/application/VcsNavbar.vue";
|
12
20
|
export type * from "./src/application/VcsNavbar.vue.d.ts";
|
13
21
|
export { default as VcsAppWrapper } from "./src/application/VcsAppWrapper.vue";
|
@@ -164,6 +172,8 @@ export { default as VcsListItemComponent } from "./src/components/lists/VcsListI
|
|
164
172
|
export type * from "./src/components/lists/VcsListItemComponent.vue.d.ts";
|
165
173
|
export { default as VcsTreeview } from "./src/components/lists/VcsTreeview.vue";
|
166
174
|
export type * from "./src/components/lists/VcsTreeview.vue.d.ts";
|
175
|
+
export { default as VcsTreeNode } from "./src/components/lists/VcsTreeNode.vue";
|
176
|
+
export type * from "./src/components/lists/VcsTreeNode.vue.d.ts";
|
167
177
|
export { default as VcsTreeviewTitle } from "./src/components/lists/VcsTreeviewTitle.vue";
|
168
178
|
export type * from "./src/components/lists/VcsTreeviewTitle.vue.d.ts";
|
169
179
|
export { default as VcsTreeviewSearchbar } from "./src/components/lists/VcsTreeviewSearchbar.vue";
|
@@ -286,7 +296,7 @@ export { createVcsThemes, createVcsVuetify, isDark, getDefaultPrimaryColor, getC
|
|
286
296
|
export type * from "./src/vuePlugins/vuetify.d.ts";
|
287
297
|
export { downloadURI, downloadBlob, downloadText, downloadCanvas } from "./src/downloadHelper.js";
|
288
298
|
export type * from "./src/downloadHelper.d.ts";
|
289
|
-
export { default as initApp, VcsUiAppConfigPattern, initAppFromModule, initAppFromAppConfig } from "./src/init.js";
|
299
|
+
export { default as initApp, VcsUiAppConfigPattern, initAppFromModule, initAppFromAppConfig, createModuleFromObjectOrUrl } from "./src/init.js";
|
290
300
|
export type * from "./src/init.d.ts";
|
291
301
|
export { vcsAppSymbol, pluginFactorySymbol, pluginBaseUrlSymbol, pluginModuleUrlSymbol, getPluginAssetUrl, isValidPackageName, loadPlugin, serializePlugin, deserializePlugin } from "./src/pluginHelper.js";
|
292
302
|
export type * from "./src/pluginHelper.d.ts";
|
package/index.js
CHANGED
@@ -52,6 +52,10 @@ export { default as ActivateLayersCallback } from './src/callback/activateLayers
|
|
52
52
|
export { default as DeactivateLayersCallback } from './src/callback/deactivateLayersCallback.js';
|
53
53
|
export { default as GoToViewpointCallback } from './src/callback/goToViewpointCallback.js';
|
54
54
|
export { default as ApplyLayerStyleCallback } from './src/callback/applyLayerStyleCallback.js';
|
55
|
+
export { default as StopRotationCallback } from './src/callback/stopRotationCallback.js';
|
56
|
+
export { default as StartRotationCallback } from './src/callback/startRotationCallback.js';
|
57
|
+
export { default as AddModuleCallback } from './src/callback/addModuleCallback.js';
|
58
|
+
export { default as RemoveModuleCallback } from './src/callback/removeModuleCallback.js';
|
55
59
|
export { default as VcsNavbar } from './src/application/VcsNavbar.vue';
|
56
60
|
export {
|
57
61
|
default as VcsApp,
|
@@ -210,6 +214,7 @@ export {
|
|
210
214
|
VcsUiAppConfigPattern,
|
211
215
|
initAppFromModule,
|
212
216
|
initAppFromAppConfig,
|
217
|
+
createModuleFromObjectOrUrl,
|
213
218
|
} from './src/init.js';
|
214
219
|
export {
|
215
220
|
vcsAppSymbol,
|
@@ -266,6 +271,7 @@ export {
|
|
266
271
|
export { default as VcsList } from './src/components/lists/VcsList.vue';
|
267
272
|
export { default as VcsListItemComponent } from './src/components/lists/VcsListItemComponent.vue';
|
268
273
|
export { default as VcsTreeview } from './src/components/lists/VcsTreeview.vue';
|
274
|
+
export { default as VcsTreeNode } from './src/components/lists/VcsTreeNode.vue';
|
269
275
|
export { default as VcsTreeviewTitle } from './src/components/lists/VcsTreeviewTitle.vue';
|
270
276
|
export { default as VcsTreeviewSearchbar } from './src/components/lists/VcsTreeviewSearchbar.vue';
|
271
277
|
export { default as VcsBadge } from './src/components/notification/VcsBadge.vue';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.1.0-rc.1",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -57,7 +57,7 @@
|
|
57
57
|
},
|
58
58
|
"peerDependencies": {
|
59
59
|
"@vcmap-cesium/engine": "^11.0.2",
|
60
|
-
"@vcmap/core": "^6.0.
|
60
|
+
"@vcmap/core": "^6.1.0-rc.1",
|
61
61
|
"ol": "^10.2.1",
|
62
62
|
"vue": "~3.4.38",
|
63
63
|
"vuetify": "^3.7.3"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { AbstractInteraction, EventType } from '@vcmap/core';
|
2
|
+
|
3
|
+
export default class EventLogger extends AbstractInteraction {
|
4
|
+
constructor() {
|
5
|
+
super();
|
6
|
+
|
7
|
+
this.setActive(false);
|
8
|
+
}
|
9
|
+
|
10
|
+
pipe(event) {
|
11
|
+
console.log(event);
|
12
|
+
this.lastEvent = event;
|
13
|
+
return Promise.resolve(event);
|
14
|
+
}
|
15
|
+
|
16
|
+
off() {
|
17
|
+
this.setActive(false);
|
18
|
+
}
|
19
|
+
|
20
|
+
click() {
|
21
|
+
this.setActive(EventType.CLICK);
|
22
|
+
}
|
23
|
+
|
24
|
+
clickMove() {
|
25
|
+
this.setActive(EventType.CLICKMOVE);
|
26
|
+
}
|
27
|
+
|
28
|
+
drag() {
|
29
|
+
this.setActive(EventType.DRAGEVENTS);
|
30
|
+
}
|
31
|
+
|
32
|
+
all() {
|
33
|
+
this.setActive(EventType.ALL);
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { CesiumMap, ObliqueMap, OpenlayersMap } from '@vcmap/core';
|
2
|
+
import { name, version, mapVersion } from '../package.json';
|
3
|
+
import EventLogger from './eventLogger.js';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @typedef {Object} DevTools
|
7
|
+
* @property {() => import("@vcmap/core").VcsApp} getApp
|
8
|
+
* @property {() => import("@vcmap/core").CesiumMap | undefined} getCesiumMap
|
9
|
+
* @property {() => import("@vcmap/core").OpenlayersMap | undefined} getOpenlayersMap
|
10
|
+
* @property {() => import("@vcmap/core").ObliqueMap | undefined} getObliqueMap
|
11
|
+
* @property {EventLogger} eventLogger
|
12
|
+
*/
|
13
|
+
|
14
|
+
/**
|
15
|
+
* @param {DevTools} plugin
|
16
|
+
* @param {VcsUiApp} app
|
17
|
+
*/
|
18
|
+
function setup(plugin, app) {
|
19
|
+
plugin.getApp = () => {
|
20
|
+
return app;
|
21
|
+
};
|
22
|
+
|
23
|
+
plugin.getCesiumMap = () => {
|
24
|
+
return app.maps.getByType(CesiumMap.className)[0];
|
25
|
+
};
|
26
|
+
|
27
|
+
plugin.getOpenlayersMap = () => {
|
28
|
+
return app.maps.getByType(OpenlayersMap.className)[0];
|
29
|
+
};
|
30
|
+
|
31
|
+
plugin.getObliqueMap = () => {
|
32
|
+
return app.maps.getByType(ObliqueMap.className)[0];
|
33
|
+
};
|
34
|
+
|
35
|
+
plugin.eventLogger = new EventLogger();
|
36
|
+
app.maps.eventHandler.addPersistentInteraction(plugin.eventLogger);
|
37
|
+
}
|
38
|
+
|
39
|
+
export default function devTools() {
|
40
|
+
return {
|
41
|
+
name,
|
42
|
+
version,
|
43
|
+
mapVersion,
|
44
|
+
initialize(app) {
|
45
|
+
if (window.vcs.devTools) {
|
46
|
+
console.error(
|
47
|
+
'dev tool already loaded! something must have gone wrong somewhere',
|
48
|
+
);
|
49
|
+
}
|
50
|
+
window.vcs.devTools = this;
|
51
|
+
setup(this, app);
|
52
|
+
},
|
53
|
+
destroy() {
|
54
|
+
if (window.vcs.devTools === this) {
|
55
|
+
window.vcs.devTools = undefined;
|
56
|
+
}
|
57
|
+
},
|
58
|
+
};
|
59
|
+
}
|
@@ -121,6 +121,16 @@ export default class SearchImpl {
|
|
121
121
|
);
|
122
122
|
}
|
123
123
|
|
124
|
+
suggest(query) {
|
125
|
+
const lowerQuery = query.toLowerCase();
|
126
|
+
return Promise.resolve(
|
127
|
+
this.lines.filter((l) => {
|
128
|
+
const lowerLine = l.toLowerCase();
|
129
|
+
return lowerLine !== lowerQuery && lowerLine.startsWith(lowerQuery);
|
130
|
+
}),
|
131
|
+
);
|
132
|
+
}
|
133
|
+
|
124
134
|
// eslint-disable-next-line class-methods-use-this
|
125
135
|
abort() {}
|
126
136
|
|
@@ -174,6 +174,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
174
174
|
readonly name?: string | undefined;
|
175
175
|
readonly checkBoxText?: string | undefined;
|
176
176
|
readonly buttonTitle?: string | undefined;
|
177
|
+
readonly secondaryButtonTitle?: string | undefined;
|
178
|
+
readonly exitCallbackOptions?: readonly {
|
179
|
+
readonly type: string;
|
180
|
+
}[] | undefined;
|
181
|
+
readonly secondaryCallbackOptions?: readonly {
|
182
|
+
readonly type: string;
|
183
|
+
}[] | undefined;
|
177
184
|
readonly menuEntry?: boolean | undefined;
|
178
185
|
readonly acceptInput?: boolean | undefined;
|
179
186
|
readonly position?: {
|
@@ -246,6 +253,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
246
253
|
* - an optional flag whether to show the Locator in the map.
|
247
254
|
*/
|
248
255
|
readonly showLocator?: boolean | undefined;
|
256
|
+
/**
|
257
|
+
* - an optional flag to hide the Rotator in the map.
|
258
|
+
*/
|
259
|
+
readonly hideRotationButton?: boolean | undefined;
|
260
|
+
/**
|
261
|
+
* - an optional flag that describes the time per rotation in seconds.
|
262
|
+
*/
|
263
|
+
readonly timePerRotation?: number | undefined;
|
249
264
|
/**
|
250
265
|
* - can be used to hide the default Header of the map
|
251
266
|
*/
|
@@ -397,6 +412,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
397
412
|
name?: string | undefined;
|
398
413
|
checkBoxText?: string | undefined;
|
399
414
|
buttonTitle?: string | undefined;
|
415
|
+
secondaryButtonTitle?: string | undefined;
|
416
|
+
exitCallbackOptions?: readonly {
|
417
|
+
readonly type: string;
|
418
|
+
}[] | undefined;
|
419
|
+
secondaryCallbackOptions?: readonly {
|
420
|
+
readonly type: string;
|
421
|
+
}[] | undefined;
|
400
422
|
menuEntry?: boolean | undefined;
|
401
423
|
acceptInput?: boolean | undefined;
|
402
424
|
position: {
|
@@ -94,6 +94,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
94
94
|
readonly name?: string | undefined;
|
95
95
|
readonly checkBoxText?: string | undefined;
|
96
96
|
readonly buttonTitle?: string | undefined;
|
97
|
+
readonly secondaryButtonTitle?: string | undefined;
|
98
|
+
readonly exitCallbackOptions?: readonly {
|
99
|
+
readonly type: string;
|
100
|
+
}[] | undefined;
|
101
|
+
readonly secondaryCallbackOptions?: readonly {
|
102
|
+
readonly type: string;
|
103
|
+
}[] | undefined;
|
97
104
|
readonly menuEntry?: boolean | undefined;
|
98
105
|
readonly acceptInput?: boolean | undefined;
|
99
106
|
readonly position?: {
|
@@ -166,6 +173,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
166
173
|
* - an optional flag whether to show the Locator in the map.
|
167
174
|
*/
|
168
175
|
readonly showLocator?: boolean | undefined;
|
176
|
+
/**
|
177
|
+
* - an optional flag to hide the Rotator in the map.
|
178
|
+
*/
|
179
|
+
readonly hideRotationButton?: boolean | undefined;
|
180
|
+
/**
|
181
|
+
* - an optional flag that describes the time per rotation in seconds.
|
182
|
+
*/
|
183
|
+
readonly timePerRotation?: number | undefined;
|
169
184
|
/**
|
170
185
|
* - can be used to hide the default Header of the map
|
171
186
|
*/
|
@@ -28,36 +28,34 @@
|
|
28
28
|
</v-card-text>
|
29
29
|
|
30
30
|
<v-card-actions>
|
31
|
-
<
|
32
|
-
<
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
31
|
+
<div class="d-flex gc-2 w-100 justify-end">
|
32
|
+
<VcsFormButton
|
33
|
+
v-if="
|
34
|
+
options.secondaryButtonTitle && options.secondaryCallbackOptions
|
35
|
+
"
|
36
|
+
@click="secondaryButtonClicked"
|
37
|
+
>
|
38
|
+
{{ $st(options.secondaryButtonTitle) }}
|
39
|
+
</VcsFormButton>
|
40
|
+
<VcsFormButton
|
41
|
+
color="primary"
|
42
|
+
variant="filled"
|
43
|
+
@click="exitScreen"
|
44
|
+
:disabled="options.acceptInput && !checkBox"
|
45
|
+
>{{
|
46
|
+
$st(options.buttonTitle || 'components.splashScreen.buttonTitle')
|
47
|
+
}}</VcsFormButton
|
48
|
+
>
|
49
|
+
</div>
|
46
50
|
</v-card-actions>
|
47
51
|
</v-card>
|
48
52
|
</v-dialog>
|
49
53
|
</template>
|
50
54
|
|
51
55
|
<script>
|
52
|
-
import {
|
53
|
-
|
54
|
-
|
55
|
-
VCardText,
|
56
|
-
VCardActions,
|
57
|
-
VRow,
|
58
|
-
VCol,
|
59
|
-
} from 'vuetify/components';
|
60
|
-
import { computed, ref } from 'vue';
|
56
|
+
import { VDialog, VCard, VCardText, VCardActions } from 'vuetify/components';
|
57
|
+
import { computed, ref, inject } from 'vue';
|
58
|
+
import { executeCallbacks } from '../callback/vcsCallback.js';
|
61
59
|
import VcsFormButton from '../components/buttons/VcsFormButton.vue';
|
62
60
|
import VcsCheckbox from '../components/form-inputs-controls/VcsCheckbox.vue';
|
63
61
|
import VcsMarkdown from '../components/form-output/VcsMarkdown.vue';
|
@@ -72,8 +70,6 @@
|
|
72
70
|
VCardActions,
|
73
71
|
VcsFormButton,
|
74
72
|
VcsCheckbox,
|
75
|
-
VRow,
|
76
|
-
VCol,
|
77
73
|
VcsMarkdown,
|
78
74
|
},
|
79
75
|
props: {
|
@@ -87,13 +83,23 @@
|
|
87
83
|
},
|
88
84
|
},
|
89
85
|
setup(props, { emit }) {
|
86
|
+
const app = inject('vcsApp');
|
90
87
|
const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
|
91
88
|
|
92
89
|
const checkBox = ref(false);
|
93
|
-
|
90
|
+
function exitScreen() {
|
94
91
|
localValue.value = false;
|
95
92
|
checkBox.value = false;
|
96
|
-
|
93
|
+
if (Array.isArray(props.options.exitCallbackOptions)) {
|
94
|
+
executeCallbacks(app, props.options.exitCallbackOptions);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
function secondaryButtonClicked() {
|
99
|
+
if (Array.isArray(props.options.secondaryCallbackOptions)) {
|
100
|
+
executeCallbacks(app, props.options.secondaryCallbackOptions);
|
101
|
+
}
|
102
|
+
}
|
97
103
|
|
98
104
|
const position = computed(() => ({
|
99
105
|
width: props.options.position?.width || 800,
|
@@ -105,6 +111,7 @@
|
|
105
111
|
return {
|
106
112
|
localValue,
|
107
113
|
exitScreen,
|
114
|
+
secondaryButtonClicked,
|
108
115
|
checkBox,
|
109
116
|
position,
|
110
117
|
};
|
@@ -10,6 +10,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
10
10
|
}, {
|
11
11
|
localValue: import("vue").Ref<any>;
|
12
12
|
exitScreen: () => void;
|
13
|
+
secondaryButtonClicked: () => void;
|
13
14
|
checkBox: import("vue").Ref<boolean>;
|
14
15
|
position: import("vue").ComputedRef<{
|
15
16
|
width: any;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export default AddModuleCallback;
|
2
|
+
export type AddModuleCallbackOptions = import("./vcsCallback.js").VcsCallbackOptions & {
|
3
|
+
module: import("@vcmap/core").VcsModuleConfig | string;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { module: import("@vcmap/core").VcsModuleConfig|string }} AddModuleCallbackOptions
|
7
|
+
* @property {import("@vcmap/core").VcsModuleConfig|string} module - config or url to a config file
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* @class
|
11
|
+
* @extends {VcsCallback}
|
12
|
+
*/
|
13
|
+
declare class AddModuleCallback extends VcsCallback {
|
14
|
+
/**
|
15
|
+
* @param {AddModuleCallbackOptions} options
|
16
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
17
|
+
*/
|
18
|
+
constructor(options: AddModuleCallbackOptions, app: import("@src/vcsUiApp.js").default);
|
19
|
+
/**
|
20
|
+
* @type {import("@vcmap/core").VcsModuleConfig|string}
|
21
|
+
* @private
|
22
|
+
*/
|
23
|
+
private _module;
|
24
|
+
/**
|
25
|
+
* @returns {AddModuleCallbackOptions}
|
26
|
+
*/
|
27
|
+
toJSON(): AddModuleCallbackOptions;
|
28
|
+
}
|
29
|
+
import VcsCallback from './vcsCallback.js';
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { getLogger } from '@vcsuite/logger';
|
2
|
+
import { createModuleFromObjectOrUrl } from '../init.js';
|
3
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { module: import("@vcmap/core").VcsModuleConfig|string }} AddModuleCallbackOptions
|
7
|
+
* @property {import("@vcmap/core").VcsModuleConfig|string} module - config or url to a config file
|
8
|
+
*/
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @class
|
12
|
+
* @extends {VcsCallback}
|
13
|
+
*/
|
14
|
+
class AddModuleCallback extends VcsCallback {
|
15
|
+
/**
|
16
|
+
* @type {string}
|
17
|
+
*/
|
18
|
+
static get className() {
|
19
|
+
return 'AddModuleCallback';
|
20
|
+
}
|
21
|
+
|
22
|
+
/**
|
23
|
+
* @param {AddModuleCallbackOptions} options
|
24
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
25
|
+
*/
|
26
|
+
constructor(options, app) {
|
27
|
+
super(options, app);
|
28
|
+
/**
|
29
|
+
* @type {import("@vcmap/core").VcsModuleConfig|string}
|
30
|
+
* @private
|
31
|
+
*/
|
32
|
+
this._module = options.module;
|
33
|
+
}
|
34
|
+
|
35
|
+
callback() {
|
36
|
+
createModuleFromObjectOrUrl(this._module)
|
37
|
+
.then((module) => {
|
38
|
+
if (module) {
|
39
|
+
this._app.addModule(module);
|
40
|
+
}
|
41
|
+
})
|
42
|
+
.catch((e) => {
|
43
|
+
getLogger('addModuleCallback').error('Error adding module', e);
|
44
|
+
});
|
45
|
+
}
|
46
|
+
|
47
|
+
/**
|
48
|
+
* @returns {AddModuleCallbackOptions}
|
49
|
+
*/
|
50
|
+
toJSON() {
|
51
|
+
const config = super.toJSON();
|
52
|
+
config.module = this._module;
|
53
|
+
return config;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
export default AddModuleCallback;
|
58
|
+
callbackClassRegistry.registerClass(
|
59
|
+
AddModuleCallback.className,
|
60
|
+
AddModuleCallback,
|
61
|
+
);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export default RemoveModuleCallback;
|
2
|
+
export type RemoveModuleCallbackOptions = import("./vcsCallback.js").VcsCallbackOptions & {
|
3
|
+
moduleId: string;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { moduleId: string }} RemoveModuleCallbackOptions
|
7
|
+
* @property {string} moduleId - id of module to be removed
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* @class
|
11
|
+
* @extends {VcsCallback}
|
12
|
+
*/
|
13
|
+
declare class RemoveModuleCallback extends VcsCallback {
|
14
|
+
/**
|
15
|
+
* @param {RemoveModuleCallbackOptions} options
|
16
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
17
|
+
*/
|
18
|
+
constructor(options: RemoveModuleCallbackOptions, app: import("@src/vcsUiApp.js").default);
|
19
|
+
/**
|
20
|
+
* @type {string}
|
21
|
+
* @private
|
22
|
+
*/
|
23
|
+
private _moduleId;
|
24
|
+
/**
|
25
|
+
* @returns {RemoveModuleCallbackOptions}
|
26
|
+
*/
|
27
|
+
toJSON(): RemoveModuleCallbackOptions;
|
28
|
+
}
|
29
|
+
import VcsCallback from './vcsCallback.js';
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { moduleId: string }} RemoveModuleCallbackOptions
|
5
|
+
* @property {string} moduleId - id of module to be removed
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @class
|
10
|
+
* @extends {VcsCallback}
|
11
|
+
*/
|
12
|
+
class RemoveModuleCallback extends VcsCallback {
|
13
|
+
/**
|
14
|
+
* @type {string}
|
15
|
+
*/
|
16
|
+
static get className() {
|
17
|
+
return 'RemoveModuleCallback';
|
18
|
+
}
|
19
|
+
|
20
|
+
/**
|
21
|
+
* @param {RemoveModuleCallbackOptions} 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._moduleId = options.moduleId;
|
31
|
+
}
|
32
|
+
|
33
|
+
callback() {
|
34
|
+
if (this._app.getModuleById(this._moduleId)) {
|
35
|
+
this._app.removeModule(this._moduleId);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* @returns {RemoveModuleCallbackOptions}
|
41
|
+
*/
|
42
|
+
toJSON() {
|
43
|
+
const config = super.toJSON();
|
44
|
+
config.moduleId = this._moduleId;
|
45
|
+
return config;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
export default RemoveModuleCallback;
|
50
|
+
callbackClassRegistry.registerClass(
|
51
|
+
RemoveModuleCallback.className,
|
52
|
+
RemoveModuleCallback,
|
53
|
+
);
|
@@ -0,0 +1,37 @@
|
|
1
|
+
export default StartRotationCallback;
|
2
|
+
export type StartRotationOptions = import("./vcsCallback.js").VcsCallbackOptions & {
|
3
|
+
viewpoint: string;
|
4
|
+
timePerRotation: number;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { viewpoint: string, timePerRotation: number }} StartRotationOptions
|
8
|
+
* @property {string?} viewpoint - name of the viewpoint
|
9
|
+
* @property {number?} timePerRotation - time in seconds for a full rotation
|
10
|
+
*/
|
11
|
+
/**
|
12
|
+
* @class
|
13
|
+
* @extends {VcsCallback}
|
14
|
+
*/
|
15
|
+
declare class StartRotationCallback extends VcsCallback {
|
16
|
+
/**
|
17
|
+
* @param {StartRotationOptions} options
|
18
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
19
|
+
*/
|
20
|
+
constructor(options: StartRotationOptions, app: import("@src/vcsUiApp.js").default);
|
21
|
+
/**
|
22
|
+
* @type {string | undefined}
|
23
|
+
* @private
|
24
|
+
*/
|
25
|
+
private _viewpoint;
|
26
|
+
/**
|
27
|
+
* @type {number | undefined}
|
28
|
+
* @private
|
29
|
+
*/
|
30
|
+
private _timePerRotation;
|
31
|
+
callback(): Promise<void>;
|
32
|
+
/**
|
33
|
+
* @returns {StartRotationOptions}
|
34
|
+
*/
|
35
|
+
toJSON(): StartRotationOptions;
|
36
|
+
}
|
37
|
+
import VcsCallback from './vcsCallback.js';
|