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

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 (75) hide show
  1. package/config/base.config.json +4 -0
  2. package/config/dev.config.json +5 -1
  3. package/config/www.config.json +5 -3
  4. package/dist/assets/{cesium.2e288a.js → cesium.430460.js} +0 -0
  5. package/dist/assets/cesium.js +1 -1
  6. package/dist/assets/{core.8014d3.js → core.5089ba.js} +5925 -4374
  7. package/dist/assets/core.js +1 -1
  8. package/dist/assets/{index.3f74fa92.js → index.854f8e2b.js} +1 -1
  9. package/dist/assets/{ol.31c3a5.js → ol.9be53a.js} +0 -0
  10. package/dist/assets/ol.js +1 -1
  11. package/dist/assets/ui.49010a.css +1 -0
  12. package/dist/assets/{ui.36f84f.js → ui.49010a.js} +3907 -3232
  13. package/dist/assets/ui.js +1 -1
  14. package/dist/assets/{vue.a39c10.js → vue.247c1c.js} +0 -0
  15. package/dist/assets/vue.js +2 -2
  16. package/dist/assets/{vuetify.378637.css → vuetify.735e58.css} +1 -1
  17. package/dist/assets/{vuetify.378637.js → vuetify.735e58.js} +1 -1
  18. package/dist/assets/vuetify.js +2 -2
  19. package/dist/index.html +1 -1
  20. package/index.html +77 -0
  21. package/index.js +4 -0
  22. package/package.json +4 -2
  23. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +4 -1
  24. package/plugins/@vcmap/create-link/index.js +4 -1
  25. package/plugins/@vcmap/pluginExample/exampleActions.js +45 -0
  26. package/plugins/@vcmap/pluginExample/index.js +24 -1
  27. package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +70 -42
  28. package/plugins/@vcmap/search-nominatim/nominatim.js +1 -1
  29. package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +4 -2
  30. package/plugins/notifier/index.js +31 -0
  31. package/plugins/notifier/notifierTester.vue +88 -0
  32. package/plugins/package.json +1 -1
  33. package/plugins/test/allIconsComponent.vue +2 -2
  34. package/plugins/test/emptyComponent.vue +1 -1
  35. package/plugins/test/index.js +22 -0
  36. package/plugins/test/myCustomHeader.vue +9 -1
  37. package/plugins/test/testList.vue +287 -0
  38. package/plugins/test/windowManagerExample.vue +3 -0
  39. package/plugins/wizardExample/index.js +41 -0
  40. package/plugins/wizardExample/wizardExample.vue +77 -0
  41. package/src/application/VcsApp.vue +18 -8
  42. package/src/components/form-inputs-controls/VcsFormSection.vue +10 -10
  43. package/src/components/form-inputs-controls/VcsSelect.vue +33 -1
  44. package/src/components/form-inputs-controls/VcsTextField.vue +11 -3
  45. package/src/components/form-inputs-controls/VcsWizard.vue +133 -0
  46. package/src/components/imageElementInjector.vue +22 -0
  47. package/src/components/lists/VcsList.vue +466 -0
  48. package/src/components/lists/VcsTreeview.vue +1 -2
  49. package/src/components/lists/VcsTreeviewLeaf.vue +18 -50
  50. package/src/components/lists/VcsTreeviewSearchbar.vue +1 -23
  51. package/src/components/tables/VcsTable.vue +13 -1
  52. package/src/contentTree/LayerTree.vue +1 -1
  53. package/src/contentTree/contentTreeItem.js +13 -13
  54. package/src/contentTree/subContentTreeItem.js +1 -1
  55. package/src/contentTree/vcsObjectContentTreeItem.js +1 -1
  56. package/src/featureInfo/BalloonComponent.vue +10 -8
  57. package/src/featureInfo/balloonFeatureInfoView.js +14 -14
  58. package/src/featureInfo/balloonHelper.js +4 -0
  59. package/src/featureInfo/featureInfo.js +13 -0
  60. package/src/featureInfo/featureInfoInteraction.js +1 -1
  61. package/src/i18n/de.js +7 -0
  62. package/src/i18n/en.js +7 -0
  63. package/src/icons/+all.js +4 -0
  64. package/src/icons/WandIcon.vue +63 -0
  65. package/src/manager/window/WindowComponent.vue +9 -2
  66. package/src/manager/window/WindowComponentHeader.vue +33 -7
  67. package/src/manager/window/WindowManager.vue +1 -0
  68. package/src/manager/window/windowManager.js +11 -1
  69. package/src/navigation/overviewMap.js +10 -9
  70. package/src/notifier/notifier.js +121 -0
  71. package/src/notifier/notifierComponent.vue +84 -0
  72. package/src/styles/variables.scss +19 -3
  73. package/src/vcsUiApp.js +19 -1
  74. package/src/vuePlugins/vuetify.js +2 -0
  75. package/dist/assets/ui.36f84f.css +0 -1
@@ -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.378637.css');import v from "./vue.a39c10.js";
13
+ } await loadCss('./assets/vuetify.735e58.css');import v from "./vue.247c1c.js";
14
14
  const Ne = v.extend().extend({
15
15
  name: "themeable",
16
16
  provide() {
@@ -1,5 +1,5 @@
1
- export * from "./vuetify.378637.js";
2
- import { default as f } from "./vuetify.378637.js";
1
+ export * from "./vuetify.735e58.js";
2
+ import { default as f } from "./vuetify.735e58.js";
3
3
  export {
4
4
  f as default
5
5
  };
package/dist/index.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
6
- <script type="module" crossorigin src="./assets/index.3f74fa92.js"></script>
6
+ <script type="module" crossorigin src="./assets/index.854f8e2b.js"></script>
7
7
  </head>
8
8
  <body style="height: 100vH;">
9
9
  <noscript>
package/index.html ADDED
@@ -0,0 +1,77 @@
1
+ <!DOCTYPE html>
2
+ <html class="vcs-ui" lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
6
+ </head>
7
+ <body style="height: 100vH;">
8
+ <noscript>
9
+ <strong>...</strong>
10
+ </noscript>
11
+ <div id="app">
12
+ <div id="loading-wrapper">
13
+ <div id="loading-text">LOADING</div>
14
+ <div id="loading-content"></div>
15
+ </div>
16
+ </div>
17
+ <style>
18
+ #loading-wrapper {
19
+ position: fixed;
20
+ width: 100%;
21
+ height: 100%;
22
+ left: 0;
23
+ top: 0;
24
+ }
25
+
26
+ #loading-text {
27
+ display: block;
28
+ position: absolute;
29
+ top: 50%;
30
+ left: 50%;
31
+ color: #409d76;
32
+ width: 100px;
33
+ height: 30px;
34
+ margin: -7px 0 0 -45px;
35
+ text-align: center;
36
+ font-family: 'PT Sans Narrow', sans-serif;
37
+ font-size: 20px;
38
+ }
39
+
40
+ #loading-content {
41
+ display: block;
42
+ position: relative;
43
+ left: 50%;
44
+ top: 50%;
45
+ width: 170px;
46
+ height: 170px;
47
+ margin: -85px 0 0 -85px;
48
+ }
49
+
50
+ #loading-content {
51
+ border: 3px solid transparent;
52
+ border-top-color: #409d76;
53
+ border-bottom-color: #409d76;
54
+ border-radius: 50%;
55
+ -webkit-animation: loader 2s linear infinite;
56
+ -moz-animation: loader 2s linear infinite;
57
+ -o-animation: loader 2s linear infinite;
58
+ animation: loader 2s linear infinite;
59
+ }
60
+
61
+ @keyframes loader {
62
+ 0% {
63
+ -webkit-transform: rotate(0deg);
64
+ -ms-transform: rotate(0deg);
65
+ transform: rotate(0deg);
66
+ }
67
+
68
+ 100% {
69
+ -webkit-transform: rotate(360deg);
70
+ -ms-transform: rotate(360deg);
71
+ transform: rotate(360deg);
72
+ }
73
+ }
74
+ </style>
75
+ <script type="module" src="./start.js"></script>
76
+ </body>
77
+ </html>
package/index.js CHANGED
@@ -13,6 +13,7 @@ export {
13
13
  } from './src/actions/actionHelper.js';
14
14
  export {
15
15
  createStateRefAction,
16
+ StateActionState,
16
17
  } from './src/actions/stateRefAction.js';
17
18
 
18
19
  export { default as VcsNavbar } from './src/application/VcsNavbar.vue';
@@ -102,6 +103,7 @@ export {
102
103
  } from './src/pluginHelper.js';
103
104
  export { getStateFromURL, createEmptyState, setStateToUrl } from './src/state.js';
104
105
  export { default as VcsUiApp } from './src/vcsUiApp.js';
106
+ export { default as Notifier, NotificationType } from './src/notifier/notifier.js';
105
107
  export { default as Icons } from './src/icons/+all.js';
106
108
 
107
109
  export { default as VcsButton } from './src/components/buttons/VcsButton.vue';
@@ -123,11 +125,13 @@ export { default as VcsFormSection } from './src/components/form-inputs-controls
123
125
  export { default as VcsSelect } from './src/components/form-inputs-controls/VcsSelect.vue';
124
126
  export { default as VcsTextField } from './src/components/form-inputs-controls/VcsTextField.vue';
125
127
  export { default as VcsTextArea } from './src/components/form-inputs-controls/VcsTextArea.vue';
128
+ export { default as VcsWizard } from './src/components/form-inputs-controls/VcsWizard.vue';
126
129
 
127
130
  export { default as VcsFormattedNumber } from './src/components/form-output/VcsFormattedNumber.vue';
128
131
 
129
132
  export { default as VcsActionList, validateAction, validateActions } from './src/components/lists/VcsActionList.vue';
130
133
  // export { default as VcsEndlessList } from './src/components/lists/VcsEndlessList.vue';
134
+ export { default as VcsList } from './src/components/lists/VcsList.vue';
131
135
  export { default as VcsTreeview } from './src/components/lists/VcsTreeview.vue';
132
136
  export { default as VcsTreeviewLeaf } from './src/components/lists/VcsTreeviewLeaf.vue';
133
137
  // export { default as VcsTreeviewSearchbar } from './src/components/lists/VcsTreeviewSearchbar.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "5.0.0-rc.15",
3
+ "version": "5.0.0-rc.16",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -22,6 +22,7 @@
22
22
  "files": [
23
23
  "index.js",
24
24
  "start.js",
25
+ "index.html",
25
26
  "map.config.json",
26
27
  "dist/",
27
28
  "src/",
@@ -42,7 +43,7 @@
42
43
  },
43
44
  "peerDependencies": {
44
45
  "@vcmap/cesium": "~1.97.1",
45
- "@vcmap/core": "~5.0.0-rc.23",
46
+ "@vcmap/core": "~5.0.0-rc.24",
46
47
  "ol": "~7.1.0",
47
48
  "vue": "~2.7.3",
48
49
  "vuetify": "~2.6.7"
@@ -51,6 +52,7 @@
51
52
  "@vcmap/rollup-plugin-vcs-ol": "^1.0.2",
52
53
  "@vcsuite/eslint-config": "^2.1.1",
53
54
  "@vitest/coverage-c8": "^0.24.3",
55
+ "@vue/test-utils": "^1.3.3",
54
56
  "eslint": "^8.9.0",
55
57
  "eslint-import-resolver-alias": "^1.1.2",
56
58
  "jest-canvas-mock": "^2.4.0",
@@ -24,7 +24,8 @@
24
24
  </template>
25
25
 
26
26
  <script>
27
- import { VcsTextField, VcsButton, setStateToUrl } from '@vcmap/ui';
27
+ import { VSheet } from 'vuetify/lib';
28
+ import { VcsTextField, VcsButton, setStateToUrl, NotificationType } from '@vcmap/ui';
28
29
  import { getCurrentInstance, inject, ref } from 'vue';
29
30
 
30
31
  export default {
@@ -38,6 +39,7 @@
38
39
  components: {
39
40
  VcsTextField,
40
41
  VcsButton,
42
+ VSheet,
41
43
  },
42
44
  setup(props) {
43
45
  const localLink = ref(props.link);
@@ -48,6 +50,7 @@
48
50
  const element = proxy.$el.querySelector('input');
49
51
  element.select();
50
52
  document.execCommand('copy');
53
+ app.notifier.add({ title: 'createLink.title', message: 'createLink.copied', type: NotificationType.SUCCESS });
51
54
  };
52
55
 
53
56
  const refresh = async () => {
@@ -1,4 +1,4 @@
1
- import { ButtonLocation, setStateToUrl, WindowSlot } from '@vcmap/ui';
1
+ import { ButtonLocation, NotificationType, setStateToUrl, WindowSlot } from '@vcmap/ui';
2
2
  import FallbackCreateLink from './fallbackCreateLink.vue';
3
3
 
4
4
  const name = '@vcmap/create-link';
@@ -34,6 +34,7 @@ export default function createLink() {
34
34
  tooltip: 'Dialog zum kopieren des Applikationslinks anzeigen.',
35
35
  copyToClipboard: 'Applikationslink in Zwischenablage kopieren',
36
36
  refreshTooltip: 'Applikationslink aktualisieren',
37
+ copied: 'Applikationslink in Zwischenablage kopiert.'
37
38
  },
38
39
  },
39
40
  en: {
@@ -43,6 +44,7 @@ export default function createLink() {
43
44
  tooltip: 'Open dialog to copy application link to clipboard',
44
45
  copyToClipboard: 'Copy application link to clipboard',
45
46
  refreshTooltip: 'Refresh application link',
47
+ copied: 'Application link copied to clipboard.',
46
48
  },
47
49
  },
48
50
  },
@@ -69,6 +71,7 @@ export default function createLink() {
69
71
  setStateToUrl(state, url);
70
72
  if (navigator.clipboard) {
71
73
  await navigator.clipboard.writeText(url.toString());
74
+ app.notifier.add({ title: 'createLink.title', message: 'createLink.copied', type: NotificationType.SUCCESS });
72
75
  } else {
73
76
  createFallbackWindow(app, url.toString());
74
77
  }
@@ -0,0 +1,45 @@
1
+ import { reactive, ref } from 'vue';
2
+
3
+ export default function createExampleActions() {
4
+ const dense = ref(false);
5
+ const showSection = ref(true);
6
+
7
+ const actions = [
8
+ reactive({
9
+ name: 'denseSelection',
10
+ title: 'change row height',
11
+ icon: dense.value ? 'mdi-arrow-split-horizontal' : 'mdi-arrow-collapse-vertical',
12
+ callback() {
13
+ dense.value = !dense.value;
14
+ this.icon = dense.value ? 'mdi-arrow-split-horizontal' : 'mdi-arrow-collapse-vertical';
15
+ },
16
+ }),
17
+ { name: 'noIcon', title: 'another action without icon', callback: () => {} },
18
+ reactive({
19
+ name: 'toggleSection',
20
+ title: 'toggle section',
21
+ icon: showSection.value ? '$vcsMinus' : '$vcsPlus',
22
+ callback() {
23
+ showSection.value = !showSection.value;
24
+ this.icon = showSection.value ? '$vcsMinus' : '$vcsPlus';
25
+ },
26
+ }),
27
+ reactive({
28
+ name: 'toggleIcon',
29
+ title: 'toggle switch example',
30
+ icon: showSection.value ? 'mdi-toggle-switch' : 'mdi-toggle-switch-off',
31
+ active: showSection.value,
32
+ callback() {
33
+ showSection.value = !showSection.value;
34
+ this.active = showSection.value;
35
+ },
36
+ }),
37
+ {
38
+ name: 'alert',
39
+ icon: 'mdi-message-text',
40
+ callback() { alert('alert'); },
41
+ },
42
+ ];
43
+
44
+ return { actions, dense, showSection };
45
+ }
@@ -7,6 +7,7 @@ import packageJSON from './package.json';
7
7
  import defaultConfig from './config.json';
8
8
  import { conditionalTest, isValidEmail, isValidText } from './validation.js';
9
9
  import pluginExampleComponent from './pluginExampleComponent.vue';
10
+ import createExampleActions from './exampleActions.js';
10
11
 
11
12
  /**
12
13
  * @returns {Logger}
@@ -25,6 +26,7 @@ function getLogger() {
25
26
  /**
26
27
  * @typedef PluginExampleState
27
28
  * @property {string} selected
29
+ * @property {Array<string>} selectedMultiple
28
30
  * @property {string} conditionalInput
29
31
  * @property {string} initialTextInput
30
32
  * @property {number} numberInput
@@ -74,11 +76,14 @@ export default function (config) {
74
76
  */
75
77
  const pluginState = reactive({
76
78
  selected: pluginConfig.selectOptions.value[0],
79
+ selectedMultiple: [],
77
80
  conditionalInput: '',
78
81
  initialTextInput: pluginConfig.initialTextInput.value,
79
82
  numberInput: 100.156,
80
83
  checkboxInput: false,
81
84
  email: '',
85
+ prependedInput: '',
86
+ files: [],
82
87
  });
83
88
 
84
89
 
@@ -148,6 +153,8 @@ export default function (config) {
148
153
  getSerializedState,
149
154
  setSerializedState,
150
155
  onVcsAppMounted(app) {
156
+ const { actions, showSection, dense } = createExampleActions();
157
+
151
158
  const { action, destroy } = createToggleAction(
152
159
  {
153
160
  name: 'Plugin Example',
@@ -159,8 +166,14 @@ export default function (config) {
159
166
  component: pluginExampleComponent,
160
167
  slot: WindowSlot.DYNAMIC_LEFT,
161
168
  state: {
162
- headerTitle: 'pluginExample.select',
169
+ headerTitle: 'pluginExample.title',
163
170
  headerIcon: '$vcsCircle',
171
+ headerActions: actions,
172
+ },
173
+ props: {
174
+ actions,
175
+ showSection,
176
+ dense,
164
177
  },
165
178
  },
166
179
  app.windowManager,
@@ -194,6 +207,11 @@ export default function (config) {
194
207
  help2desc: 'InitialTextInput bleibt solange im Lade-Status, bis sich der Wert \'myInitialText\' ändert.',
195
208
  help3: 'Geben Sie eine Email Adresse ein',
196
209
  help3desc: 'Email Adressen werden validiert.',
210
+ numbers: {
211
+ one: 'eins',
212
+ two: 'zwei',
213
+ three: 'drei',
214
+ },
197
215
  },
198
216
  },
199
217
  en: {
@@ -208,6 +226,11 @@ export default function (config) {
208
226
  help2desc: 'InitialTextInput text field stays in loading state, as long as \'myInitialText\' is not changed.',
209
227
  help3: 'Enter an email address.',
210
228
  help3desc: 'Emails get validated.',
229
+ numbers: {
230
+ one: 'one',
231
+ two: 'two',
232
+ three: 'three',
233
+ },
211
234
  },
212
235
  },
213
236
  },
@@ -1,30 +1,8 @@
1
1
  <template>
2
2
  <v-form v-model="isValid">
3
3
  <VcsFormSection
4
- title="VcsFormSection Select & Text Inputs"
5
- :title-actions="[
6
- {
7
- name: 'denseSelection',
8
- title: 'change row height',
9
- icon: dense ? 'mdi-arrow-split-horizontal' : 'mdi-arrow-collapse-vertical',
10
- callback: () => this.dense = !this.dense
11
- },
12
- { name: 'noIcon', title: 'another action without icon', callback: () => {} },
13
- {
14
- name: 'toggleSection',
15
- title: 'toggle section',
16
- icon: showSection ? '$vcsMinus' : '$vcsPlus',
17
- callback: () => this.showSection = !this.showSection
18
- },
19
- {
20
- name: 'toggleIcon',
21
- title: 'toggle switch example',
22
- icon: showSection ? 'mdi-toggle-switch' : 'mdi-toggle-switch-off',
23
- active: showSection,
24
- callback: () => this.showSection = !this.showSection
25
- },
26
- { name: 'alert', icon: 'mdi-message-text', callback: alertAction },
27
- ]"
4
+ heading="VcsFormSection Select & Text Inputs"
5
+ :header-actions="actions"
28
6
  >
29
7
  <template #help>
30
8
  <ol>
@@ -131,11 +109,50 @@
131
109
  />
132
110
  </v-col>
133
111
  </v-row>
112
+ <v-row
113
+ :dense="dense"
114
+ no-gutters
115
+ align="center"
116
+ >
117
+ <v-col>
118
+ <VcsLabel html-for="prependedInput" :dense="dense">
119
+ String With Icon
120
+ </VcsLabel>
121
+ </v-col>
122
+ <v-col>
123
+ <VcsTextField
124
+ id="prependedInput"
125
+ :dense="dense"
126
+ prepend-icon="mdi-map-marker"
127
+ v-model="state.prependedInput"
128
+ />
129
+ </v-col>
130
+ </v-row>
131
+ <v-row
132
+ :dense="dense"
133
+ no-gutters
134
+ align="center"
135
+ >
136
+ <v-col>
137
+ <VcsLabel html-for="fileInput" :dense="dense">
138
+ Email
139
+ </VcsLabel>
140
+ </v-col>
141
+ <v-col>
142
+ <VcsTextField
143
+ id="fileInput"
144
+ :dense="dense"
145
+ type="file"
146
+ multiple
147
+ v-model="state.files"
148
+ />
149
+ </v-col>
150
+ </v-row>
134
151
  </v-container>
135
152
  </template>
136
153
  </VcsFormSection>
137
154
  <VcsFormSection
138
- title="VcsFormSection Number Inputs"
155
+ heading="VcsFormSection Number Inputs"
139
156
  help-text="pluginExample.help"
140
157
  >
141
158
  <template #default>
@@ -236,7 +253,7 @@
236
253
  </template>
237
254
  </VcsFormSection>
238
255
  <VcsFormSection
239
- title="VcsFormSection Radio & Checkbox"
256
+ heading="VcsFormSection Radio & Checkbox"
240
257
  >
241
258
  <template #default>
242
259
  <v-container>
@@ -286,34 +303,42 @@
286
303
  </template>
287
304
  </vcsformsection>
288
305
  <VcsFormSection
289
- title="VcsFormSection Mixed Inputs"
306
+ heading="VcsFormSection Mixed Inputs"
290
307
  >
291
308
  <template #default>
292
309
  <v-container>
293
310
  <v-row
294
311
  :dense="dense"
295
- no-gutters
296
312
  align="center"
297
313
  >
298
- <v-col cols="1" class="px-1">
314
+ <v-col cols="1">
299
315
  <VcsLabel html-for="textInput" :dense="dense" class="text-caption">
300
316
  1
301
317
  </VcsLabel>
302
318
  </v-col>
303
- <v-col>
319
+ <v-col cols="3">
304
320
  <VcsSelect
305
- :items="['A', 'B', 'C']"
321
+ :items="[
322
+ {value: 'one', i18n: 'pluginExample.numbers.one'},
323
+ {value: 'two', i18n: 'pluginExample.numbers.two'},
324
+ {value: 'three', i18n: 'pluginExample.numbers.three'}]"
325
+ :item-text="item => item.i18n"
306
326
  :dense="dense"
307
327
  />
308
328
  </v-col>
309
- <v-col>
329
+ <v-col cols="3">
310
330
  <VcsSelect
311
- :items="['A', 'B', 'C']"
331
+ :items="[
332
+ {value: 'Anna', fullName: 'Annabella'},
333
+ {value: 'Bella', fullName: 'Belladonna'},
334
+ {value: 'Claudi', fullName: 'Claudine'}]"
335
+ :item-text="item => item.fullName"
312
336
  :dense="dense"
313
337
  multiple
338
+ v-model="state.selectedMultiple"
314
339
  />
315
340
  </v-col>
316
- <v-col>
341
+ <v-col cols="5">
317
342
  <VcsTextField
318
343
  id="textInput"
319
344
  clearable
@@ -374,9 +399,17 @@
374
399
  VContainer,
375
400
  },
376
401
  props: {
377
- windowId: {
378
- type: String,
379
- default: '',
402
+ actions: {
403
+ type: Array,
404
+ required: true,
405
+ },
406
+ dense: {
407
+ type: Object,
408
+ required: true,
409
+ },
410
+ showSection: {
411
+ type: Object,
412
+ required: true,
380
413
  },
381
414
  },
382
415
  setup() {
@@ -386,8 +419,6 @@
386
419
  watch(plugin.state, () => { newUpdate.value = true; });
387
420
 
388
421
  return {
389
- showSection: ref(true),
390
- dense: ref(true),
391
422
  // no object-destruction of reactive objects! or use toRef()
392
423
  state: plugin.state,
393
424
  // do not put the whole config here, since it would become reactive
@@ -403,9 +434,6 @@
403
434
  console.log(plugin.getSerializedState());
404
435
  newUpdate.value = false;
405
436
  },
406
- alertAction() {
407
- alert('alert');
408
- },
409
437
  };
410
438
  },
411
439
  };
@@ -14,7 +14,7 @@ function createResultItem(item) {
14
14
  feature[featureInfoViewSymbol] = new AddressBalloonFeatureInfoView({
15
15
  type: 'AddressBalloonFeatureInfoView',
16
16
  name: 'NominatimSearchBalloon',
17
- subtitle: '',
17
+ balloonSubtitle: '',
18
18
  addressName: 'building',
19
19
  street: 'road',
20
20
  number: 'house_number',
@@ -76,11 +76,12 @@
76
76
  VAvatar,
77
77
  VIcon,
78
78
  VDivider,
79
+ VSwitch,
79
80
  } from 'vuetify/lib';
80
81
 
81
82
  export default {
82
83
  name: 'ThemeChanger',
83
- components: [
84
+ components: {
84
85
  VCard,
85
86
  VCardText,
86
87
  VChip,
@@ -91,7 +92,8 @@
91
92
  VAvatar,
92
93
  VIcon,
93
94
  VDivider,
94
- ],
95
+ VSwitch,
96
+ },
95
97
  setup() {
96
98
  const app = inject('vcsApp');
97
99
  const plugin = app.plugins.getByKey('@vcmap/theme-changer');
@@ -0,0 +1,31 @@
1
+ import { WindowSlot, createToggleAction, ButtonLocation } from '@vcmap/ui';
2
+ import component from './notifierTester.vue';
3
+
4
+ export default function createNotifierPlugin() {
5
+ return {
6
+ name: 'notifier',
7
+ initialize(vcsApp) {
8
+ const { action, destroy } = createToggleAction(
9
+ {
10
+ name: 'Notifier',
11
+ },
12
+ {
13
+ id: 'notifier-editor',
14
+ state: {
15
+ headerTitle: 'Notifier Editor',
16
+ },
17
+ component,
18
+ slot: WindowSlot.DYNAMIC_LEFT,
19
+ },
20
+ vcsApp.windowManager,
21
+ 'notifier',
22
+ );
23
+ vcsApp.navbarManager.add(
24
+ { id: 'notifier', action },
25
+ 'notifier',
26
+ ButtonLocation.TOOL,
27
+ );
28
+ this.destroy = destroy;
29
+ },
30
+ };
31
+ }
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <v-sheet>
3
+ <v-text-field
4
+ v-model="message"
5
+ label="Message"
6
+ />
7
+ <v-text-field
8
+ v-model.number=timeout
9
+ label="Timeout"
10
+ />
11
+ <VcsCheckbox
12
+ v-model="hasTimeout"
13
+ label="Toggle Timeout"
14
+ />
15
+ <v-list>
16
+ <v-list-item
17
+ v-for="type in types"
18
+ :key="type"
19
+ >
20
+ {{ type }}
21
+ <v-list-item-action @click="notify(type)">
22
+ <v-icon>mdi-plus</v-icon>
23
+ </v-list-item-action>
24
+ </v-list-item>
25
+ </v-list>
26
+ <v-divider />
27
+ <v-card>
28
+ Current number of notifications: {{ notifications.length }}
29
+ </v-card>
30
+ </v-sheet>
31
+ </template>
32
+
33
+ <script>
34
+ import { VSheet, VList, VListItem, VListItemAction, VTextField, VIcon, VCard, VDivider } from 'vuetify/lib';
35
+ import { NotificationType, VcsCheckbox } from '@vcmap/ui';
36
+ import { computed, inject, ref } from 'vue';
37
+
38
+ export default {
39
+ name: 'NotifierTester',
40
+ components: {
41
+ VSheet,
42
+ VList,
43
+ VListItem,
44
+ VListItemAction,
45
+ VTextField,
46
+ VIcon,
47
+ VCard,
48
+ VDivider,
49
+ VcsCheckbox,
50
+ },
51
+ setup() {
52
+ const app = inject('vcsApp');
53
+ const message = ref('Message');
54
+ const timeout = ref(5000);
55
+
56
+ return {
57
+ types: NotificationType,
58
+ message,
59
+ notify(type) {
60
+ app.notifier.add({
61
+ type,
62
+ message: message.value,
63
+ timeout: timeout.value,
64
+ });
65
+ },
66
+ notifications: app.notifier.notifications,
67
+ timeout,
68
+ hasTimeout: computed({
69
+ get() {
70
+ return timeout.value === -1;
71
+ },
72
+ set(value) {
73
+ if (value && timeout.value !== -1) {
74
+ timeout.value = -1;
75
+ } else if (timeout.value === -1) {
76
+ timeout.value = 5000;
77
+ }
78
+ },
79
+ }),
80
+ };
81
+ },
82
+ };
83
+ </script>
84
+
85
+ <style scoped>
86
+
87
+ </style>
88
+