@vcmap/ui 5.3.0 → 5.3.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/dist/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui.a9e21c.js";
1
+ export * from "./ui.cf282c.js";
@@ -1,5 +1,5 @@
1
- export * from "./vue.d7a2f9.js";
2
- import { default as f } from "./vue.d7a2f9.js";
1
+ export * from "./vue.89f1c0.js";
2
+ import { default as f } from "./vue.89f1c0.js";
3
3
  export {
4
4
  f as default
5
5
  };
@@ -13,7 +13,7 @@ function loadCss(href) {
13
13
  elem.onerror = reject;
14
14
  document.head.appendChild(elem);
15
15
  });
16
- } await loadCss('./assets/vuetify.ecc326.css');import v from "./vue.d7a2f9.js";
16
+ } await loadCss('./assets/vuetify.12f757.css');import v from "./vue.89f1c0.js";
17
17
  const Ne = v.extend().extend({
18
18
  name: "themeable",
19
19
  provide() {
@@ -1,5 +1,5 @@
1
- export * from "./vuetify.ecc326.js";
2
- import { default as f } from "./vuetify.ecc326.js";
1
+ export * from "./vuetify.12f757.js";
2
+ import { default as f } from "./vuetify.12f757.js";
3
3
  export {
4
4
  f as default
5
5
  };
package/dist/index.html CHANGED
@@ -95,7 +95,7 @@
95
95
  }
96
96
  }
97
97
  </style>
98
- <script type="module" crossorigin src="./assets/index-0eb860e7.js"></script>
98
+ <script type="module" crossorigin src="./assets/index-b466fb2c.js"></script>
99
99
  </head>
100
100
  <body style="height: 100vh; margin: 0;">
101
101
  <noscript>
package/index.d.ts CHANGED
@@ -206,6 +206,10 @@ export { default as FileDrop } from "./src/components/import/FileDrop.vue";
206
206
  export type * from "./src/components/import/FileDrop.vue.d.ts";
207
207
  export { default as ImportComponent } from "./src/components/import/ImportComponent.vue";
208
208
  export type * from "./src/components/import/ImportComponent.vue.d.ts";
209
+ export { default as VcsSplashScreen } from "./src/application/VcsSplashScreen.vue";
210
+ export type * from "./src/application/VcsSplashScreen.vue.d.ts";
211
+ export { default as VcsCustomScreen } from "./src/application/VcsCustomScreen.vue";
212
+ export type * from "./src/application/VcsCustomScreen.vue.d.ts";
209
213
  export { createMapButtonAction, createToggleAction, createOverviewMapAction, createModalAction, createLinkAction, createGoToViewpointAction, createZoomToFeatureAction } from "./src/actions/actionHelper.js";
210
214
  export type * from "./src/actions/actionHelper.d.ts";
211
215
  export { parseAndSanitizeMarkdown, replaceAttributes } from "./src/application/markdownHelper.js";
package/index.js CHANGED
@@ -322,3 +322,5 @@ export { default as VcsFeatureStyleComponent } from './src/components/style/VcsF
322
322
  export { default as AbstractConfigEditor } from './src/components/plugins/AbstractConfigEditor.vue';
323
323
  export { default as FileDrop } from './src/components/import/FileDrop.vue';
324
324
  export { default as ImportComponent } from './src/components/import/ImportComponent.vue';
325
+ export { default as VcsSplashScreen } from './src/application/VcsSplashScreen.vue';
326
+ export { default as VcsCustomScreen } from './src/application/VcsCustomScreen.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -18,7 +18,8 @@
18
18
  "@vcmap/height-profile": "^1.0.0",
19
19
  "@vcmap/search-wfs": "^1.0.0",
20
20
  "@vcmap/search-esri": "^1.0.0",
21
- "@vcmap/link-button": "^1.0.0"
21
+ "@vcmap/link-button": "^1.0.0",
22
+ "@vcmap/walk": "^1.0.2"
22
23
  },
23
24
  "optionalDependencies": {
24
25
  "@vcmap/planning": "^5.2.0"
@@ -2,7 +2,8 @@
2
2
  <v-container class="fill-height pa-0" absolute fluid>
3
3
  <VcsSplashScreen
4
4
  v-if="splashScreen"
5
- :text-page="splashScreen"
5
+ v-model="splashScreenRef"
6
+ :options="splashScreen"
6
7
  :window-id="'splashScreen'"
7
8
  ></VcsSplashScreen>
8
9
  <VcsNavbar />
@@ -51,6 +52,7 @@
51
52
  onMounted,
52
53
  onUnmounted,
53
54
  provide,
55
+ ref,
54
56
  watch,
55
57
  } from 'vue';
56
58
  import { getVcsAppById, moduleIdSymbol } from '@vcmap/core';
@@ -73,9 +75,7 @@
73
75
  import { getLegendEntries } from '../legend/legendHelper.js';
74
76
  import VcsAttributionsFooter from './VcsAttributionsFooter.vue';
75
77
  import VcsTextPageFooter from './VcsTextPageFooter.vue';
76
- import VcsSplashScreen, {
77
- createSplashScreenAction,
78
- } from './VcsSplashScreen.vue';
78
+ import VcsSplashScreen from './VcsSplashScreen.vue';
79
79
  import VcsCustomScreen from './VcsCustomScreen.vue';
80
80
  import VcsAttributions from './VcsAttributions.vue';
81
81
  import { getAttributions } from './attributionsHelper.js';
@@ -287,14 +287,13 @@
287
287
  },
288
288
  slot: WindowSlot.DETACHED,
289
289
  position: customScreen.windowPosition,
290
- props: customScreen,
290
+ props: {
291
+ content: customScreen.content,
292
+ },
291
293
  },
292
294
  app.windowManager,
293
295
  vcsAppSymbol,
294
296
  );
295
- if (app.navbarManager.has('customScreenToggle')) {
296
- app.navbarManager.remove('customScreenToggle');
297
- }
298
297
  app.navbarManager.add(
299
298
  {
300
299
  id: 'customScreenToggle',
@@ -311,6 +310,9 @@
311
310
  const stopCustomScreenWatcher = watch(
312
311
  () => app.uiConfig.config.value.customScreen,
313
312
  (newCustomScreen) => {
313
+ if (app.navbarManager.has('customScreenToggle')) {
314
+ app.navbarManager.remove('customScreenToggle');
315
+ }
314
316
  if (newCustomScreen) {
315
317
  customScreen = setupCustomScreenAction();
316
318
  }
@@ -327,19 +329,20 @@
327
329
  /**
328
330
  * This helper function will add a Splash Screen action button to the apps NavbarManager MENU location.
329
331
  * @param {import("../vcsUiApp.js").default} app
332
+ * @param {import("vue").Ref} splashScreenRef
333
+ * @returns {WatchStopHandle}
330
334
  */
331
-
332
- function setupSplashScreen(app) {
335
+ function setupSplashScreen(app, splashScreenRef) {
333
336
  function setupSplashScreenAction() {
334
337
  const { splashScreen } = app.uiConfig.config.value;
335
- const splashScreenAction = createSplashScreenAction({
338
+ const splashScreenAction = {
336
339
  name: splashScreen.name || 'components.splashScreen.name',
337
340
  icon: splashScreen.icon || 'mdi-alert-box',
338
341
  title: splashScreen.title,
339
- });
340
- if (app.navbarManager.has('splashScreenToggle')) {
341
- app.navbarManager.remove('splashScreenToggle');
342
- }
342
+ callback() {
343
+ splashScreenRef.value = !splashScreenRef.value;
344
+ },
345
+ };
343
346
  app.navbarManager.add(
344
347
  {
345
348
  id: 'splashScreenToggle',
@@ -353,7 +356,10 @@
353
356
  return watch(
354
357
  () => app.uiConfig.config.value.splashScreen,
355
358
  (newSplashScreen) => {
356
- if (newSplashScreen) {
359
+ if (app.navbarManager.has('splashScreenToggle')) {
360
+ app.navbarManager.remove('splashScreenToggle');
361
+ }
362
+ if (newSplashScreen && newSplashScreen.menuEntry) {
357
363
  setupSplashScreenAction();
358
364
  }
359
365
  },
@@ -659,7 +665,8 @@
659
665
  const legendDestroy = setupLegendWindow(app);
660
666
  const settingsDestroy = setupSettingsWindow(app);
661
667
  const stopCustomScreen = setupCustomScreen(app);
662
- const stopSplashScreen = setupSplashScreen(app);
668
+ const splashScreenRef = ref(true);
669
+ const stopSplashScreen = setupSplashScreen(app, splashScreenRef);
663
670
  setupHelpButton(app);
664
671
  const destroyComponentsWindow = setupCategoryManagerWindow(app);
665
672
  const destroyThemingListener = setupUiConfigTheming(
@@ -717,6 +724,7 @@
717
724
  }
718
725
  return undefined;
719
726
  }),
727
+ splashScreenRef,
720
728
  splashScreen: computed(() => {
721
729
  if (app.uiConfig.config.value.splashScreen) {
722
730
  return {
@@ -81,6 +81,7 @@ declare const _default: import("vue").DefineComponent<{
81
81
  title: string;
82
82
  tooltip: string;
83
83
  } | undefined>;
84
+ splashScreenRef: import("vue").Ref<boolean>;
84
85
  splashScreen: import("vue").ComputedRef<{
85
86
  title: string;
86
87
  tooltip: string;
@@ -1,10 +1,11 @@
1
1
  <template>
2
2
  <v-dialog
3
- v-model="dialog"
4
- :width="textPage.position.width"
5
- :height="textPage.position.height"
6
- :max-width="textPage.position.maxWidth"
7
- :max-height="textPage.position.maxHeight"
3
+ v-if="options"
4
+ v-model="localValue"
5
+ :width="position.width"
6
+ :height="position.height"
7
+ :max-width="position.maxWidth"
8
+ :max-height="position.maxHeight"
8
9
  persistent
9
10
  >
10
11
  <v-card>
@@ -55,22 +56,12 @@
55
56
  VRow,
56
57
  VCol,
57
58
  } from 'vuetify/lib';
58
- import { computed, getCurrentInstance, ref } from 'vue';
59
+ import { computed, getCurrentInstance, ref, watch } from 'vue';
59
60
  import { parseAndSanitizeMarkdown } from './markdownHelper.js';
60
61
  import VcsFormButton from '../components/buttons/VcsFormButton.vue';
61
62
  import VcsCheckbox from '../components/form-inputs-controls/VcsCheckbox.vue';
62
63
  import VcsLabel from '../components/form-inputs-controls/VcsLabel.vue';
63
64
 
64
- const dialog = ref(true);
65
- export function createSplashScreenAction(options) {
66
- return {
67
- ...options,
68
- callback() {
69
- dialog.value = true;
70
- },
71
- };
72
- }
73
-
74
65
  export default {
75
66
  name: 'VcsSplashScreen',
76
67
  components: {
@@ -85,42 +76,58 @@
85
76
  VCol,
86
77
  },
87
78
  props: {
88
- textPage: {
89
- type: Object,
90
- default: () => {},
79
+ value: {
80
+ type: Boolean,
81
+ default: false,
91
82
  },
92
- windowId: {
93
- type: String,
83
+ options: {
84
+ type: Object,
94
85
  required: true,
95
86
  },
96
87
  },
97
- setup(props) {
88
+ setup(props, { emit }) {
89
+ const localValue = ref(props.value);
90
+ watch(
91
+ () => props.value,
92
+ (newValue) => {
93
+ localValue.value = newValue;
94
+ },
95
+ );
98
96
  const vm = getCurrentInstance().proxy;
99
97
  const splashScreenText = computed(() => {
100
- const translatedContent = vm.$t(props.textPage.content);
98
+ const translatedContent = vm.$t(props.options.content);
101
99
  return parseAndSanitizeMarkdown(translatedContent);
102
100
  });
103
- const buttonTitle = vm.$t(props.textPage.buttonTitle);
101
+ const buttonTitle = vm.$t(props.options.buttonTitle);
104
102
 
105
103
  const splashScreenCheckboxText = computed(() => {
106
- const translatedContent = vm.$t(props.textPage.checkBoxText);
104
+ const translatedContent = vm.$t(props.options.checkBoxText);
107
105
  return parseAndSanitizeMarkdown(translatedContent);
108
106
  });
109
107
 
110
- const acceptInput = ref(props.textPage.acceptInput);
108
+ const acceptInput = ref(props.options.acceptInput);
111
109
  const checkBox = ref(!acceptInput.value);
112
110
  const exitScreen = () => {
113
- dialog.value = false;
111
+ localValue.value = false;
112
+ emit('input', localValue.value);
114
113
  };
115
114
 
115
+ const position = computed(() => ({
116
+ width: props.options.position?.width || 800,
117
+ height: props.options.position?.width || 500,
118
+ maxWidth: props.options.position?.maxWidth,
119
+ maxHeight: props.options.position?.maxHeight,
120
+ }));
121
+
116
122
  return {
117
- dialog,
123
+ localValue,
118
124
  exitScreen,
119
125
  splashScreenText,
120
126
  splashScreenCheckboxText,
121
127
  checkBox,
122
128
  acceptInput,
123
129
  buttonTitle,
130
+ position,
124
131
  };
125
132
  },
126
133
  };
@@ -1,31 +1,36 @@
1
- export function createSplashScreenAction(options: any): any;
2
1
  declare const _default: import("vue").DefineComponent<{
3
- textPage: {
4
- type: ObjectConstructor;
5
- default: () => void;
2
+ value: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
6
5
  };
7
- windowId: {
8
- type: StringConstructor;
6
+ options: {
7
+ type: ObjectConstructor;
9
8
  required: true;
10
9
  };
11
10
  }, {
12
- dialog: import("vue").Ref<boolean>;
11
+ localValue: any;
13
12
  exitScreen: () => void;
14
13
  splashScreenText: import("vue").ComputedRef<string>;
15
14
  splashScreenCheckboxText: import("vue").ComputedRef<string>;
16
15
  checkBox: import("vue").Ref<boolean>;
17
16
  acceptInput: any;
18
17
  buttonTitle: any;
18
+ position: import("vue").ComputedRef<{
19
+ width: any;
20
+ height: any;
21
+ maxWidth: any;
22
+ maxHeight: any;
23
+ }>;
19
24
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
20
- textPage: {
21
- type: ObjectConstructor;
22
- default: () => void;
25
+ value: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
23
28
  };
24
- windowId: {
25
- type: StringConstructor;
29
+ options: {
30
+ type: ObjectConstructor;
26
31
  required: true;
27
32
  };
28
33
  }>>, {
29
- textPage: Record<string, any>;
34
+ value: boolean;
30
35
  }>;
31
36
  export default _default;
package/src/i18n/de.d.ts CHANGED
@@ -156,6 +156,8 @@ declare namespace messages {
156
156
  export namespace splashScreen {
157
157
  let name_2: string;
158
158
  export { name_2 as name };
159
+ export let checkBoxText: string;
160
+ export let buttonTitle: string;
159
161
  }
160
162
  export namespace customScreen {
161
163
  let name_3: string;
package/src/i18n/de.js CHANGED
@@ -146,6 +146,9 @@ const messages = {
146
146
  },
147
147
  splashScreen: {
148
148
  name: 'Splash Screen',
149
+ checkBoxText:
150
+ 'Bitte akzeptieren sie die [Bedingungen](https://vc.systems/) um Fortzufahren',
151
+ buttonTitle: 'Weiter',
149
152
  },
150
153
  customScreen: {
151
154
  name: 'Benutzerdefinierter Screen',
package/src/i18n/en.d.ts CHANGED
@@ -156,6 +156,8 @@ declare namespace messages {
156
156
  export namespace splashScreen {
157
157
  let name_2: string;
158
158
  export { name_2 as name };
159
+ export let checkBoxText: string;
160
+ export let buttonTitle: string;
159
161
  }
160
162
  export namespace customScreen {
161
163
  let name_3: string;
package/src/i18n/en.js CHANGED
@@ -146,6 +146,9 @@ const messages = {
146
146
  },
147
147
  splashScreen: {
148
148
  name: 'Splash Screen',
149
+ checkBoxText:
150
+ 'Please accept the [Conditions](https://vc.systems/) to continue',
151
+ buttonTitle: 'Continue',
149
152
  },
150
153
  customScreen: {
151
154
  name: 'Custom Screen',
@@ -1 +0,0 @@
1
- import{initAppFromAppConfig as p}from"./ui.a9e21c.js";p("#app","app.config.json");
File without changes
File without changes