@vcmap/ui 6.0.0-rc.8 → 6.0.0-rc.9

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.
Files changed (73) hide show
  1. package/build/buildHelpers.js +1 -1
  2. package/config/base.config.json +3 -1
  3. package/config/dev.config.json +1 -3
  4. package/config/www.config.json +1 -3
  5. package/dist/assets/{cesium-2ec6aae0.js → cesium-a21a380a.js} +4672 -4704
  6. package/dist/assets/cesium.js +1 -1
  7. package/dist/assets/{core-6f2522e5.js → core-ccecb5f4.js} +4898 -4772
  8. package/dist/assets/core.js +1 -1
  9. package/dist/assets/{ol-b0e134cb.js → ol-3c6b9b5b.js} +12074 -11458
  10. package/dist/assets/ol.js +1 -1
  11. package/dist/assets/{ui-bf3d1f84.css → ui-8a8aef2a.css} +1 -1
  12. package/dist/assets/{ui-bf3d1f84.js → ui-8a8aef2a.js} +6321 -6241
  13. package/dist/assets/ui.js +1 -1
  14. package/dist/assets/vue.js +1 -1
  15. package/dist/assets/{vuetify-99bf601c.css → vuetify-ac50bfc8.css} +1 -1
  16. package/dist/assets/{vuetify-99bf601c.js → vuetify-ac50bfc8.js} +4795 -4779
  17. package/dist/assets/vuetify.js +1 -1
  18. package/index.d.ts +2 -0
  19. package/index.js +1 -0
  20. package/lib/olLib.js +6 -0
  21. package/package.json +4 -4
  22. package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +5 -2
  23. package/plugins/package.json +19 -3
  24. package/src/application/VcsApp.vue.d.ts +3 -0
  25. package/src/application/VcsContainer.vue.d.ts +3 -0
  26. package/src/components/buttons/VcsButton.vue +2 -2
  27. package/src/components/buttons/VcsButton.vue.d.ts +1 -1
  28. package/src/components/buttons/VcsFormButton.vue +2 -2
  29. package/src/components/buttons/VcsFormButton.vue.d.ts +1 -1
  30. package/src/components/buttons/VcsToolButton.vue +2 -2
  31. package/src/components/buttons/VcsToolButton.vue.d.ts +1 -1
  32. package/src/components/composables.d.ts +2 -2
  33. package/src/components/composables.js +3 -5
  34. package/src/components/form-inputs-controls/VcsCheckbox.vue +11 -5
  35. package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +10 -1
  36. package/src/components/form-inputs-controls/VcsFileInput.vue +2 -2
  37. package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -1
  38. package/src/components/form-inputs-controls/VcsSelect.vue +2 -2
  39. package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +1 -1
  40. package/src/components/form-inputs-controls/VcsSlider.vue +2 -2
  41. package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +1 -1
  42. package/src/components/form-inputs-controls/VcsTextArea.vue +2 -2
  43. package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -1
  44. package/src/components/form-inputs-controls/VcsTextField.vue +2 -2
  45. package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +1 -1
  46. package/src/components/form-inputs-controls/VcsWizard.vue +2 -2
  47. package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +1 -1
  48. package/src/components/form-inputs-controls/VcsWizardStep.vue +2 -2
  49. package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +1 -1
  50. package/src/components/lists/VcsList.vue +14 -10
  51. package/src/components/lists/VcsListItemComponent.vue +13 -11
  52. package/src/components/lists/VcsListItemComponent.vue.d.ts +9 -5
  53. package/src/components/lists/VcsTreeview.vue +2 -2
  54. package/src/components/lists/VcsTreeview.vue.d.ts +1 -1
  55. package/src/components/tables/VcsDataTable.vue +2 -2
  56. package/src/components/tables/VcsDataTable.vue.d.ts +1 -1
  57. package/src/contentTree/obliqueCollectionContentTreeItem.js +6 -1
  58. package/src/featureInfo/abstractFeatureInfoView.js +3 -2
  59. package/src/i18n/de.d.ts +35 -30
  60. package/src/i18n/de.js +5 -0
  61. package/src/i18n/en.d.ts +35 -30
  62. package/src/i18n/en.js +5 -0
  63. package/src/manager/collectionManager/collectionComponentClass.js +5 -1
  64. package/src/manager/toolbox/ToolboxManagerComponent.vue +1 -1
  65. package/src/manager/window/windowManager.d.ts +59 -3
  66. package/src/manager/window/windowManager.js +23 -2
  67. package/src/obliqueFallbackWarnings.d.ts +5 -0
  68. package/src/obliqueFallbackWarnings.js +54 -0
  69. package/src/uiConfig.d.ts +3 -0
  70. package/src/vcsUiApp.d.ts +37 -10
  71. package/src/vcsUiApp.js +4 -0
  72. package/src/vuePlugins/i18n.js +1 -0
  73. /package/dist/assets/{vue-43880c5a.js → vue-bcc58dd1.js} +0 -0
@@ -107,7 +107,7 @@ export function isSlotPosition(windowPosition) {
107
107
  * parentId?: string,
108
108
  * component: import("vue").Component<T>,
109
109
  * headerComponent?: import("vue").Component<T>,
110
- * state? : Partial<WindowState>,
110
+ * state? : WindowStateOptions,
111
111
  * position? : Partial<WindowPositionOptions>,
112
112
  * slot?: WindowSlot,
113
113
  * props?: T,
@@ -118,17 +118,37 @@ export function isSlotPosition(windowPosition) {
118
118
  * @property {string} [parentId] An optional ID of a parent window for 'dynamicChild' slot. Parent windows with slot dynamicRight are not supported.
119
119
  * @property {import("vue").Component<T, unknown, unknown>} component Main Component which is shown below the header.
120
120
  * @property {import("vue").Component<T, unknown, unknown>} [headerComponent] Replaces the Header Component.
121
- * @property {Partial<WindowState>} [state]
121
+ * @property {WindowStateOptions} [state]
122
122
  * @property {Partial<WindowPositionOptions>} [position] Will be merged with default position for slot
123
123
  * @property {WindowSlot} [slot]
124
124
  * @property {T} [props]
125
125
  * @property {Object} [provides]
126
126
  */
127
127
 
128
+ /**
129
+ * @typedef {T|import('vue').Ref<T>|import('vue').ComputedRef<T>} OptionsOrRef
130
+ * @template T
131
+ */
132
+
133
+ /**
134
+ * @typedef {Object} WindowStateOptions
135
+ * @property {OptionsOrRef<boolean>} [hideHeader] be used to not show the header.
136
+ * @property {OptionsOrRef<boolean>} [hidePin] be used to not show the pin button.
137
+ * @property {OptionsOrRef<string|string[]>} [headerTitle] An optional translatable header. If an array is provided all elements are translated and joined afterward.
138
+ * @property {OptionsOrRef<string>} [headerIcon]
139
+ * @property {OptionsOrRef<Array<import("../../actions/actionHelper.js").VcsAction>>} [headerActions]
140
+ * @property {OptionsOrRef<number>} [headerActionsOverflow]
141
+ * @property {OptionsOrRef<string>} [infoUrl] An optional url referencing help or further information on the window's content.
142
+ * @property {OptionsOrRef<function():string>} [infoUrlCallback] An optional function returning an url referencing help or further information. Can be used for urls depending on the app's locale, e.g. app.getHelpUrl()
143
+ * @property {Record<string, string>} [styles] Can be used to add additional styles to the root WindowComponent. Use Vue Style Bindings Object Syntax https://vuejs.org/v2/guide/class-and-style.html
144
+ * @property {Array<string>|Record<string,string>} [classes] Can be used to add additional classes to the root WindowComponent. Use Vue Class Bindings Syntax https://vuejs.org/v2/guide/class-and-style.html
145
+ */
146
+
128
147
  /**
129
148
  * @typedef {Object} WindowState
130
149
  * @property {string} id
131
150
  * @property {string|vcsAppSymbol} owner Owner of the window, set by windowManager on add
151
+ * @property {string|undefined} parentId - the parent of this window
132
152
  * @property {boolean} [hideHeader] be used to not show the header.
133
153
  * @property {boolean} [hidePin] be used to not show the pin button.
134
154
  * @property {string|string[]} [headerTitle] An optional translatable header. If an array is provided all elements are translated and joined afterward.
@@ -599,6 +619,7 @@ class WindowManager {
599
619
  ? [...(windowComponentOptions?.state?.classes ?? [])]
600
620
  : { ...windowComponentOptions?.state?.classes };
601
621
 
622
+ /** @type {WindowState} */
602
623
  const state = reactive({
603
624
  id,
604
625
  parentId,
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @param {import("./vcsUiApp.js").default} app
3
+ * @returns {() => void}
4
+ */
5
+ export default function createObliqueFallbackWarnings(app: import("./vcsUiApp.js").default): () => void;
@@ -0,0 +1,54 @@
1
+ import { ObliqueMap } from '@vcmap/core';
2
+ import { NotificationType } from './notifier/notifier.js';
3
+
4
+ function createNotification(app) {
5
+ app.notifier.add({
6
+ title: 'navigation.obliqueFallback.title',
7
+ type: NotificationType.WARNING,
8
+ message: 'navigation.obliqueFallback.message',
9
+ });
10
+ }
11
+
12
+ /**
13
+ * @param {import("./vcsUiApp.js").default} app
14
+ * @returns {() => void}
15
+ */
16
+ export default function createObliqueFallbackWarnings(app) {
17
+ const fallbackMapEventListener =
18
+ app.maps.fallbackMapActivated.addEventListener(() => {
19
+ createNotification(app);
20
+ });
21
+
22
+ const mapListeners = new Map();
23
+ const setMapListener = (map) => {
24
+ mapListeners.set(
25
+ map,
26
+ map.failedToSetCollection.addEventListener(() => {
27
+ createNotification(app);
28
+ }),
29
+ );
30
+ };
31
+
32
+ app.maps.getByType(ObliqueMap.className).forEach(setMapListener);
33
+
34
+ const mapAddedListener = app.maps.added.addEventListener((map) => {
35
+ if (map instanceof ObliqueMap) {
36
+ setMapListener(map);
37
+ }
38
+ });
39
+
40
+ const mapRemovedListener = app.maps.removed.addEventListener((map) => {
41
+ mapListeners.get(map)?.();
42
+ mapListeners.delete(map);
43
+ });
44
+
45
+ return () => {
46
+ fallbackMapEventListener();
47
+ mapAddedListener();
48
+ mapRemovedListener();
49
+ [...mapListeners.values()].forEach((cb) => {
50
+ cb();
51
+ });
52
+ mapListeners.clear();
53
+ };
54
+ }
package/src/uiConfig.d.ts CHANGED
@@ -456,6 +456,7 @@ declare class UiConfig extends Collection<UiConfigurationItem<unknown>> {
456
456
  readonly fogScreenSpaceErrorFactor?: number | undefined;
457
457
  readonly resolutionScale?: number | undefined;
458
458
  readonly layerSSEFactor?: number | undefined;
459
+ readonly msaa?: 1 | 2 | 4 | 8 | undefined;
459
460
  } | undefined;
460
461
  readonly medium?: {
461
462
  readonly sse?: number | undefined;
@@ -465,6 +466,7 @@ declare class UiConfig extends Collection<UiConfigurationItem<unknown>> {
465
466
  readonly fogScreenSpaceErrorFactor?: number | undefined;
466
467
  readonly resolutionScale?: number | undefined;
467
468
  readonly layerSSEFactor?: number | undefined;
469
+ readonly msaa?: 1 | 2 | 4 | 8 | undefined;
468
470
  } | undefined;
469
471
  readonly high?: {
470
472
  readonly sse?: number | undefined;
@@ -474,6 +476,7 @@ declare class UiConfig extends Collection<UiConfigurationItem<unknown>> {
474
476
  readonly fogScreenSpaceErrorFactor?: number | undefined;
475
477
  readonly resolutionScale?: number | undefined;
476
478
  readonly layerSSEFactor?: number | undefined;
479
+ readonly msaa?: 1 | 2 | 4 | 8 | undefined;
477
480
  } | undefined;
478
481
  } | undefined;
479
482
  /**
package/src/vcsUiApp.d.ts CHANGED
@@ -195,6 +195,7 @@ declare class VcsUiApp extends VcsApp {
195
195
  */
196
196
  mounted: import("@vcmap/core").VcsEvent<string>;
197
197
  _destroySiteConfig: () => void;
198
+ _destroyObliqueFallback: () => void;
198
199
  /**
199
200
  * @type {import("@vcmap/core").OverrideCollection<VcsPlugin<Object, Object>, Collection<VcsPlugin<Object, Object>>, Object>}
200
201
  */
@@ -251,10 +252,7 @@ declare class VcsUiApp extends VcsApp {
251
252
  * @returns {ReturnType<typeof import("vuetify").createVuetify>}
252
253
  */
253
254
  get vuetify(): {
254
- install: (app: import("vue").App<any>) => void; /**
255
- * @type {WindowManager}
256
- * @private
257
- */
255
+ install: (app: import("vue").App<any>) => void;
258
256
  defaults: import("vue").Ref<import("vuetify").DefaultsInstance>;
259
257
  display: import("vuetify").DisplayInstance;
260
258
  theme: import("vuetify").ThemeInstance & {
@@ -284,7 +282,33 @@ declare class VcsUiApp extends VcsApp {
284
282
  formats?: any;
285
283
  }) => import("vuetify").DateInstance) | import("vuetify").DateInstance;
286
284
  formats?: Record<string, any> | undefined;
287
- locale: Record<string, any>;
285
+ locale: Record<string, any>; /**
286
+ * Interface for VcsPlugins.
287
+ * The function implementing the interface should not throw!
288
+ * @typedef {{
289
+ * name: string,
290
+ * version: string,
291
+ * mapVersion: string,
292
+ * i18n?: Object<string, unknown>,
293
+ * initialize?: function(import("@src/vcsUiApp.js").default, S=):void|Promise<void>,
294
+ * onVcsAppMounted?: function(import("@src/vcsUiApp.js").default):void,
295
+ * toJSON?: function(): C,
296
+ * getDefaultOptions?: function(): C,
297
+ * getState?: function(boolean=):S|Promise<S>,
298
+ * getConfigEditors?: function():Array<PluginConfigEditor<object>>,
299
+ * destroy?: function(): void
300
+ * }} VcsPlugin
301
+ * @template {Object} C - plugin config
302
+ * @template {Object} S - plugin state
303
+ * @property {Object<string, *>} [i18n] - the i18n messages of this plugin
304
+ * @property {function(import("@src/vcsUiApp.js").default, S=)} initialize - called on plugin added. Is passed the VcsUiApp and optionally, the state for the plugin
305
+ * @property {function(import("@src/vcsUiApp.js").default)} onVcsAppMounted - called on mounted of VcsApp.vue
306
+ * @property {function():C} [toJSON] - should return the plugin's serialization excluding all default values
307
+ * @property {function():C} [getDefaultOptions] - should return the plugin's default options
308
+ * @property {function(boolean=):S|Promise<S>} [getState] - should return the plugin's state or a promise for said state. is passed a "for url" flag. If true, only the state relevant for sharing a URL should be passed and short keys shall be used
309
+ * @property {Array<PluginConfigEditor>} [getConfigEditors] - should return components for configuring the plugin or custom items defined by the plugin
310
+ * @api
311
+ */
288
312
  };
289
313
  instance: {
290
314
  locale?: any;
@@ -293,15 +317,16 @@ declare class VcsUiApp extends VcsApp {
293
317
  toJsDate: (value: unknown) => Date;
294
318
  parseISO: (date: string) => unknown;
295
319
  toISO: (date: unknown) => string;
296
- startOfDay: (date: unknown) => unknown; /**
297
- * @type {OverviewMap}
298
- * @private
299
- */
320
+ startOfDay: (date: unknown) => unknown;
300
321
  endOfDay: (date: unknown) => unknown;
301
322
  startOfWeek: (date: unknown, firstDayOfWeek?: string | number | undefined) => unknown;
302
323
  endOfWeek: (date: unknown) => unknown;
303
324
  startOfMonth: (date: unknown) => unknown;
304
325
  endOfMonth: (date: unknown) => unknown;
326
+ /**
327
+ * @type {ContextMenuManager}
328
+ * @private
329
+ */
305
330
  startOfYear: (date: unknown) => unknown;
306
331
  endOfYear: (date: unknown) => unknown;
307
332
  isAfter: (date: unknown, comparing: unknown) => boolean;
@@ -323,7 +348,9 @@ declare class VcsUiApp extends VcsApp {
323
348
  getDiff: (date: unknown, comparing: unknown, unit?: string | undefined) => number;
324
349
  getWeekArray: (date: unknown, firstDayOfWeek?: string | number | undefined) => unknown[][];
325
350
  getWeekdays: (firstDayOfWeek?: string | number | undefined) => string[];
326
- getMonth: (date: unknown) => number;
351
+ getMonth: (date: unknown) => number; /**
352
+ * @type {import("@vcmap/core").OverrideClassRegistry<typeof AbstractFeatureInfoView>}
353
+ */
327
354
  setMonth: (date: unknown, month: number) => unknown;
328
355
  getDate: (date: unknown) => number;
329
356
  setDate: (date: unknown, day: number) => unknown;
package/src/vcsUiApp.js CHANGED
@@ -45,6 +45,7 @@ import { createVueI18n, setupI18n } from './vuePlugins/i18n.js';
45
45
  import { callbackClassRegistry } from './callback/vcsCallback.js';
46
46
  import createSiteConfig from './siteConfig.js';
47
47
  import { createVcsVuetify } from './vuePlugins/vuetify.js';
48
+ import createObliqueFallbackWarnings from './obliqueFallbackWarnings.js';
48
49
 
49
50
  /**
50
51
  * @typedef {import("@vcmap/core").VcsModuleConfig & {
@@ -374,6 +375,8 @@ class VcsUiApp extends VcsApp {
374
375
  this.mounted = new VcsEvent();
375
376
 
376
377
  this._destroySiteConfig = createSiteConfig(this._uiConfig);
378
+
379
+ this._destroyObliqueFallback = createObliqueFallbackWarnings(this);
377
380
  }
378
381
 
379
382
  /**
@@ -753,6 +756,7 @@ class VcsUiApp extends VcsApp {
753
756
  this._featureInfo.destroy();
754
757
  this._uiConfig.destroy();
755
758
  this._destroySiteConfig();
759
+ this._destroyObliqueFallback();
756
760
  super.destroy();
757
761
  }
758
762
  }
@@ -9,6 +9,7 @@ import { resolveValue } from '@intlify/core-base';
9
9
  export function createVueI18n() {
10
10
  return createI18n({
11
11
  legacy: false,
12
+ globalInjection: true,
12
13
  locale: 'en',
13
14
  missingWarn: false,
14
15
  fallbackWarn: false,