@vcmap/ui 5.0.0-rc.15 → 5.0.0-rc.17

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 (91) hide show
  1. package/build/buildHelpers.js +7 -1
  2. package/config/base.config.json +7 -45
  3. package/config/dev.config.json +5 -1
  4. package/config/www.config.json +14 -13
  5. package/dist/assets/{cesium.2e288a.js → cesium.41de56.js} +0 -0
  6. package/dist/assets/cesium.js +1 -1
  7. package/dist/assets/{core.8014d3.js → core.af84e3.js} +6077 -4544
  8. package/dist/assets/core.js +1 -1
  9. package/dist/assets/{index.3f74fa92.js → index.5b773cad.js} +1 -1
  10. package/dist/assets/{ol.31c3a5.js → ol.5c7490.js} +0 -0
  11. package/dist/assets/ol.js +1 -1
  12. package/dist/assets/ui.dffe32.css +1 -0
  13. package/dist/assets/{ui.36f84f.js → ui.dffe32.js} +7243 -6234
  14. package/dist/assets/ui.js +1 -1
  15. package/dist/assets/{vue.a39c10.js → vue.25da17.js} +0 -0
  16. package/dist/assets/vue.js +2 -2
  17. package/dist/assets/{vuetify.378637.css → vuetify.e4ece7.css} +1 -1
  18. package/dist/assets/{vuetify.378637.js → vuetify.e4ece7.js} +5 -2
  19. package/dist/assets/vuetify.js +2 -2
  20. package/dist/index.html +1 -1
  21. package/index.html +77 -0
  22. package/index.js +18 -3
  23. package/package.json +4 -2
  24. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +4 -1
  25. package/plugins/@vcmap/create-link/index.js +4 -1
  26. package/plugins/@vcmap/pluginExample/exampleActions.js +45 -0
  27. package/plugins/@vcmap/pluginExample/index.js +26 -2
  28. package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +77 -42
  29. package/plugins/@vcmap/search-nominatim/nominatim.js +1 -1
  30. package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +4 -2
  31. package/plugins/categoryTest/Categories.vue +27 -13
  32. package/plugins/categoryTest/Category.vue +7 -1
  33. package/plugins/categoryTest/index.js +1 -1
  34. package/plugins/notifier/index.js +31 -0
  35. package/plugins/notifier/notifierTester.vue +88 -0
  36. package/plugins/package.json +1 -1
  37. package/plugins/test/allIconsComponent.vue +5 -5
  38. package/plugins/test/emptyComponent.vue +1 -1
  39. package/plugins/test/index.js +27 -3
  40. package/plugins/test/myCustomHeader.vue +9 -1
  41. package/plugins/test/testList.vue +290 -0
  42. package/plugins/test/vcsContent.vue +1 -1
  43. package/plugins/test/windowManagerExample.vue +12 -7
  44. package/plugins/wizardExample/index.js +41 -0
  45. package/plugins/wizardExample/wizardExample.vue +77 -0
  46. package/src/actions/actionHelper.js +10 -9
  47. package/src/application/VcsApp.vue +43 -34
  48. package/src/components/form-inputs-controls/VcsCheckbox.vue +1 -0
  49. package/src/components/form-inputs-controls/VcsFormSection.vue +23 -15
  50. package/src/components/form-inputs-controls/VcsSelect.vue +33 -1
  51. package/src/components/form-inputs-controls/VcsTextField.vue +11 -3
  52. package/src/components/form-inputs-controls/VcsWizard.vue +133 -0
  53. package/src/components/imageElementInjector.vue +22 -0
  54. package/src/components/lists/VcsList.vue +468 -0
  55. package/src/components/lists/VcsTreeview.vue +1 -2
  56. package/src/components/lists/VcsTreeviewLeaf.vue +18 -50
  57. package/src/components/lists/VcsTreeviewSearchbar.vue +1 -23
  58. package/src/components/tables/VcsTable.vue +13 -1
  59. package/src/contentTree/LayerTree.vue +1 -1
  60. package/src/contentTree/contentTreeCollection.js +9 -0
  61. package/src/contentTree/contentTreeItem.js +13 -13
  62. package/src/contentTree/layerContentTreeItem.js +1 -1
  63. package/src/contentTree/subContentTreeItem.js +1 -1
  64. package/src/contentTree/vcsObjectContentTreeItem.js +1 -1
  65. package/src/featureInfo/BalloonComponent.vue +13 -8
  66. package/src/featureInfo/balloonFeatureInfoView.js +16 -22
  67. package/src/featureInfo/balloonHelper.js +26 -5
  68. package/src/featureInfo/featureInfo.js +14 -2
  69. package/src/featureInfo/featureInfoInteraction.js +1 -1
  70. package/src/i18n/de.js +13 -1
  71. package/src/i18n/en.js +13 -1
  72. package/src/icons/+all.js +4 -0
  73. package/src/icons/WandIcon.vue +63 -0
  74. package/src/manager/categoryManager/CategoryComponent.vue +115 -0
  75. package/src/manager/categoryManager/CategoryComponentList.vue +57 -0
  76. package/src/manager/categoryManager/CategoryManager.vue +35 -0
  77. package/src/manager/categoryManager/categoryManager.js +251 -165
  78. package/src/manager/contextMenu/contextMenuManager.js +8 -2
  79. package/src/manager/window/WindowComponent.vue +51 -70
  80. package/src/manager/window/WindowComponentHeader.vue +81 -13
  81. package/src/manager/window/WindowManager.vue +54 -30
  82. package/src/manager/window/windowHelper.js +341 -0
  83. package/src/manager/window/windowManager.js +173 -151
  84. package/src/navigation/overviewMap.js +10 -9
  85. package/src/notifier/notifier.js +120 -0
  86. package/src/notifier/notifierComponent.vue +84 -0
  87. package/src/styles/variables.scss +19 -3
  88. package/src/vcsUiApp.js +26 -2
  89. package/src/vuePlugins/vuetify.js +2 -0
  90. package/dist/assets/ui.36f84f.css +0 -1
  91. package/src/manager/categoryManager/ComponentsManager.vue +0 -30
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <div>
3
+ <v-snackbar
4
+ dark
5
+ v-for="(notification) in notifications"
6
+ :key="notification.id"
7
+ v-model="notification.open"
8
+ :timeout="notification.timeout"
9
+ >
10
+ <v-icon
11
+ :color="notification.type"
12
+ >
13
+ {{ icon[notification.type] }}
14
+ </v-icon>
15
+ <span class="snack-title">{{ $t(notification.title || defaultTitle[notification.type]) }}</span>
16
+ <template #action="{ attrs }">
17
+ <VcsButton
18
+ icon="mdi-close"
19
+ small
20
+ v-bind="attrs"
21
+ @click="notification.open = false"
22
+ />
23
+ </template>
24
+ <span>{{ $t(notification.message) }}</span>
25
+ </v-snackbar>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ import { VSnackbar, VIcon } from 'vuetify/lib';
31
+ import { inject } from 'vue';
32
+ import VcsButton from '../components/buttons/VcsButton.vue';
33
+ import { NotificationType } from './notifier.js';
34
+
35
+ export default {
36
+ components: {
37
+ VSnackbar,
38
+ VcsButton,
39
+ VIcon,
40
+ },
41
+ name: 'NotifierComponent',
42
+ setup() {
43
+ const app = inject('vcsApp');
44
+
45
+ return {
46
+ notifications: app.notifier.notifications,
47
+ icon: {
48
+ [NotificationType.ERROR]: 'mdi-alert-box',
49
+ [NotificationType.WARNING]: 'mdi-alert',
50
+ [NotificationType.INFO]: 'mdi-information',
51
+ [NotificationType.SUCCESS]: 'mdi-check-circle',
52
+ },
53
+ defaultTitle: {
54
+ [NotificationType.ERROR]: 'notification.error',
55
+ [NotificationType.WARNING]: 'notification.warning',
56
+ [NotificationType.INFO]: 'notification.information',
57
+ [NotificationType.SUCCESS]: 'notification.success',
58
+ },
59
+ };
60
+ },
61
+ };
62
+ </script>
63
+
64
+ <style lang="scss" scoped>
65
+ .v-snack{
66
+ ::v-deep{
67
+ .v-snack__content{
68
+ display: grid;
69
+ gap: 8px 4px;
70
+ grid-template-columns: 20px auto;
71
+ .v-icon{
72
+ grid-row-start: 1;
73
+ grid-row-end: 3;
74
+ align-self: start;
75
+ font-size: 17px;
76
+ }
77
+ }
78
+ .v-snack__action{
79
+ align-self: flex-start;
80
+ margin-top: 4px;
81
+ }
82
+ }
83
+ }
84
+ </style>
@@ -47,7 +47,6 @@ $icon-size: 20px; // 24px !default;
47
47
  $icon-size-dense: 16px; // 20px !default;
48
48
 
49
49
  /** VcsSelect **/
50
-
51
50
  $select-dense-selections-margin: 4px 4px 3px 0; // 5px 4px 3px 0 !default;
52
51
 
53
52
  // list box
@@ -61,10 +60,10 @@ $list-item-min-height: 32px; // 48px !default;
61
60
  $list-dense-min-height: 24px; // 40px !default;
62
61
  $list-item-content-padding: 4px 0; // 12px 0 !default;
63
62
  $list-dense-content-padding: 0 0; // 8px 0 !default;
64
- $list-item-action-icon-margin: 0 0; //32px !default;
63
+ $list-item-action-icon-margin: 0; //32px !default;
65
64
  $list-item-action-margin: 0 0; // 12px 0 !default;
66
65
  $list-item-icon-margin: auto 0; // 16px 0 !default;
67
-
66
+ $list-item-content-children-margin-bottom: 0; // 2px !default;
68
67
 
69
68
  /** Treeview **/
70
69
  $treeview-node-level-width: 16px;
@@ -79,3 +78,20 @@ $expansion-panel-content-padding: 0 0 4px; // 0 24px 16px !default;
79
78
 
80
79
  /** Footer **/
81
80
  $footer-padding: 0 8px; // 6px 16px !default;
81
+
82
+ /** Wizard **/
83
+ $stepper-vertical-padding-bottom: 16px; // 36px !default;
84
+ $stepper-vertical-step-padding: 12px 8px;
85
+ $stepper-vertical-content-ltr-margin: -14px 0 -14px 13px; // -8px -36px -16px 36px !default;
86
+ $stepper-vertical-content-ltr-padding: 16px 8px 16px 16px; // 16px 23px 16px 60px !default;
87
+ $stepper-vertical-step-step-margin: 8px;
88
+ $stepper-step-step-min-width: 12px;
89
+ $stepper-step-step-width: 12px;
90
+ $stepper-step-step-height: 12px;
91
+
92
+ /** Snackbar **/
93
+ $snackbar-bottom: 36px;
94
+ $snackbar-background-color: rgba(0, 0, 0, 0.8);
95
+ $snackbar-content-padding: 8px;
96
+ $snackbar-action-margin: 8px;
97
+ $snackbar-wrapper-min-height: 36px;
package/src/vcsUiApp.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  defaultDynamicContextId,
9
9
  ObliqueMap,
10
10
  Viewpoint,
11
- volatileContextId,
11
+ volatileContextId, VcsEvent,
12
12
  } from '@vcmap/core';
13
13
  import { getLogger as getLoggerByName } from '@vcsuite/logger';
14
14
  import {
@@ -31,6 +31,7 @@ import UiConfig from './uiConfig.js';
31
31
  import { createEmptyState, getStateFromURL } from './state.js';
32
32
  import { version } from '../package.json';
33
33
  import Search from './search/search.js';
34
+ import Notifier from './notifier/notifier.js';
34
35
 
35
36
  /**
36
37
  * @typedef {import("@vcmap/core").VcsAppConfig} VcsUiAppConfig
@@ -135,7 +136,11 @@ class VcsUiApp extends VcsApp {
135
136
  if (this._cachedAppState.contextIds.includes(plugin[contextIdSymbol])) {
136
137
  state = this._cachedAppState.plugins.find(s => s.name === plugin.name);
137
138
  }
138
- plugin.initialize(this, state?.state);
139
+ try {
140
+ plugin.initialize(this, state?.state);
141
+ } catch (e) {
142
+ getLogger().error(`Error in plugin ${plugin.name} initialize hook`, e);
143
+ }
139
144
  }
140
145
  }),
141
146
  this._plugins.removed.addEventListener(async (plugin) => {
@@ -219,11 +224,23 @@ class VcsUiApp extends VcsApp {
219
224
  */
220
225
  this._search = new Search(this);
221
226
 
227
+ /**
228
+ * @type {Notifier}
229
+ * @private
230
+ */
231
+ this._notifier = new Notifier();
232
+
222
233
  /**
223
234
  * @type {AppState}
224
235
  * @private
225
236
  */
226
237
  this._cachedAppState = getStateFromURL(new URL(window.location.href));
238
+ /**
239
+ * An event triggered when the VcsApp was mounted and a target was set for the maps.
240
+ * Provides the id of the target html element.
241
+ * @type {import("@vcmap/core").VcsEvent<string>}
242
+ */
243
+ this.mounted = new VcsEvent();
227
244
  }
228
245
 
229
246
  /**
@@ -304,6 +321,12 @@ class VcsUiApp extends VcsApp {
304
321
  */
305
322
  get uiConfig() { return this._uiConfig; }
306
323
 
324
+ /**
325
+ * @type {Notifier}
326
+ * @readonly
327
+ */
328
+ get notifier() { return this._notifier; }
329
+
307
330
  /**
308
331
  * Get the state of the application. When passed the forUrl flag, only a minimal set of states shall be provided for a sharable link to the current state (to ensure
309
332
  * the maximum URL length is not exceeded). This includes: layer active state & styling, active map, active viewpoint,
@@ -335,6 +358,7 @@ class VcsUiApp extends VcsApp {
335
358
  active: l.active || l.loading,
336
359
  };
337
360
  if (
361
+ l.style &&
338
362
  l.style.name !== l.defaultStyle.name &&
339
363
  this.styles.has(l.style) &&
340
364
  l.style[contextIdSymbol] !== defaultDynamicContextId &&
@@ -46,6 +46,8 @@ export function createVuetify() {
46
46
  accent: '#757575',
47
47
  warning: '#FFCE00',
48
48
  error: '#FF5252',
49
+ info: '#2196F3',
50
+ success: '#4CAF50',
49
51
  },
50
52
  },
51
53
  },