@vcmap/ui 6.3.12 → 6.3.13

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 (74) hide show
  1. package/build/build.js +5 -0
  2. package/build/staging/Dockerfile +2 -0
  3. package/config/base.config.json +207 -404
  4. package/config/clipping.config.json +16 -80
  5. package/config/cluster.config.json +2 -2
  6. package/config/components-show-case.config.json +1 -1
  7. package/config/concepts-show-case.config.json +1 -1
  8. package/config/dev/geojson.config.json +491 -0
  9. package/config/{i3s.config.json → dev/i3s.config.json} +78 -150
  10. package/config/{mapbox.config.json → dev/mapbox.config.json} +24 -58
  11. package/config/dev/vector-tile.config.json +196 -0
  12. package/config/{wms-layers.config.json → dev/wms.config.json} +22 -39
  13. package/config/dev.config.json +91 -887
  14. package/config/geofence.config.json +2 -4
  15. package/config/graph-feature-info.config.json +84 -0
  16. package/config/guided-tour.config.json +2 -2
  17. package/config/hello-world.config.json +1 -1
  18. package/config/projects.config.json +19 -20
  19. package/config/splashscreen.config.json +1 -1
  20. package/config/theming.config.json +1 -1
  21. package/config/www/city-planning.config.json +215 -0
  22. package/config/www/climate-environment.config.json +1244 -0
  23. package/config/www/iot-sensors.config.json +440 -0
  24. package/config/www/soest.config.json +632 -0
  25. package/config/www.config.json +1352 -1722
  26. package/dist/.htaccess +5 -0
  27. package/dist/assets/{cesium-230199a8.js → cesium-d2fefdc2.js} +20646 -20062
  28. package/dist/assets/cesium.js +1 -1
  29. package/dist/assets/{core-b3cc239c.js → core-be181847.js} +1125 -1125
  30. package/dist/assets/core-workers/panoramaImageWorker.js +1 -1
  31. package/dist/assets/core.js +1 -1
  32. package/dist/assets/ol.js +1 -1
  33. package/dist/assets/ui-8f8426e4.css +1 -0
  34. package/dist/assets/{ui-aaaf46c0.js → ui-8f8426e4.js} +13218 -12512
  35. package/dist/assets/ui.js +1 -1
  36. package/dist/assets/vue.js +1 -1
  37. package/dist/assets/{vuetify-a9ccbd51.js → vuetify-8df23ea4.js} +1 -1
  38. package/dist/assets/vuetify.js +1 -1
  39. package/package.json +2 -2
  40. package/plugins/@vcmap-show-case/extent-example/src/ExtentExample.vue +16 -2
  41. package/plugins/@vcmap-show-case/icons-example/src/AllIconsComponent.vue +7 -5
  42. package/plugins/@vcmap-show-case/notifier-tester/src/NotifierTester.vue +5 -6
  43. package/plugins/@vcmap-show-case/project-selector/README.md +18 -7
  44. package/plugins/@vcmap-show-case/project-selector/src/ProjectSelectorComponent.vue +9 -0
  45. package/plugins/@vcmap-show-case/project-selector/src/index.js +87 -27
  46. package/plugins/@vcmap-show-case/simple-graph/src/SimpleGraphComponent.vue +10 -3
  47. package/plugins/@vcmap-show-case/simple-graph/src/index.js +10 -1
  48. package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +1 -1
  49. package/plugins/package.json +2 -1
  50. package/src/application/VcsApp.vue +3 -7
  51. package/src/application/attributionsHelper.d.ts +27 -5
  52. package/src/application/attributionsHelper.js +116 -58
  53. package/src/components/lists/VcsGroupedList.vue +29 -1
  54. package/src/components/lists/VcsList.vue +35 -4
  55. package/src/components/lists/VcsList.vue.d.ts +2 -0
  56. package/src/components/lists/VcsTreeview.vue +63 -31
  57. package/src/components/lists/VcsTreeview.vue.d.ts +9 -0
  58. package/src/contentTree/LayerTree.vue +13 -2
  59. package/src/featureInfo/ClusterFeatureComponent.vue +1 -0
  60. package/src/manager/window/WindowComponent.vue +5 -1
  61. package/src/vcsUiApp.d.ts +19 -7
  62. package/src/vcsUiApp.js +17 -0
  63. package/config/aerowest.config.json +0 -386
  64. package/config/analysis.config.json +0 -17
  65. package/config/dynamic-layer.config.json +0 -33
  66. package/config/graphFeatureInfo.config.json +0 -141
  67. package/config/pano.config.json +0 -726
  68. package/config/solar.config.json +0 -66
  69. package/config/vectorTile.config.json +0 -112
  70. package/dist/assets/ui-aaaf46c0.css +0 -1
  71. /package/dist/assets/core-workers/{panoramaImageWorker.js-495a0b47.js → panoramaImageWorker.js-eecf04e1.js} +0 -0
  72. /package/dist/assets/{ol-2769767e.js → ol-3438e1c5.js} +0 -0
  73. /package/dist/assets/{vue-c9f45cfc.js → vue-dd509a16.js} +0 -0
  74. /package/dist/assets/{vuetify-a9ccbd51.css → vuetify-8df23ea4.css} +0 -0
package/dist/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui-aaaf46c0.js";
1
+ export * from "./ui-8f8426e4.js";
@@ -1 +1 @@
1
- export * from "./vue-c9f45cfc.js";
1
+ export * from "./vue-dd509a16.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-a9ccbd51.css');import { watch as Q, onScopeDispose as Ze, effectScope as Zl, shallowRef as K, reactive as it, computed as b, watchEffect as Fe, toRefs as Yt, capitalize as Nn, unref as ot, Fragment as ie, isVNode as Rc, Comment as Nc, warn as ja, getCurrentInstance as Hc, ref as j, provide as De, inject as ye, defineComponent as zc, h as Gt, camelize as Ir, toRaw as Be, createVNode as r, mergeProps as O, onBeforeUnmount as Qe, readonly as Ql, onMounted as Ye, onDeactivated as _r, onActivated as Wc, nextTick as we, TransitionGroup as Jl, Transition as jt, isRef as Tn, toRef as $, onBeforeMount as ra, withDirectives as $e, resolveDirective as gt, vShow as Ct, onUpdated as jc, Text as Uc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Kc, cloneVNode as qc, createTextVNode as Tt, onUnmounted as Tr, onBeforeUpdate as Xc, withModifiers as Tl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Ar } from "./vue-c9f45cfc.js";
13
+ } await loadCss('./assets/vuetify-8df23ea4.css');import { watch as Q, onScopeDispose as Ze, effectScope as Zl, shallowRef as K, reactive as it, computed as b, watchEffect as Fe, toRefs as Yt, capitalize as Nn, unref as ot, Fragment as ie, isVNode as Rc, Comment as Nc, warn as ja, getCurrentInstance as Hc, ref as j, provide as De, inject as ye, defineComponent as zc, h as Gt, camelize as Ir, toRaw as Be, createVNode as r, mergeProps as O, onBeforeUnmount as Qe, readonly as Ql, onMounted as Ye, onDeactivated as _r, onActivated as Wc, nextTick as we, TransitionGroup as Jl, Transition as jt, isRef as Tn, toRef as $, onBeforeMount as ra, withDirectives as $e, resolveDirective as gt, vShow as Ct, onUpdated as jc, Text as Uc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Kc, cloneVNode as qc, createTextVNode as Tt, onUnmounted as Tr, onBeforeUpdate as Xc, withModifiers as Tl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Ar } from "./vue-dd509a16.js";
14
14
  function rt(e, n) {
15
15
  let t;
16
16
  function a() {
@@ -1 +1 @@
1
- export * from "./vuetify-a9ccbd51.js";
1
+ export * from "./vuetify-8df23ea4.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "6.3.12",
3
+ "version": "6.3.13",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@vcmap-cesium/engine": "^11.0.5",
58
- "@vcmap/core": "^6.3.10",
58
+ "@vcmap/core": "^6.3.11",
59
59
  "ol": "^10.4.0",
60
60
  "vue": "~3.4.38",
61
61
  "vuetify": "~3.7.14"
@@ -2,8 +2,9 @@
2
2
  <v-container class="pa-0">
3
3
  <VcsExtentEditor
4
4
  heading="Default WGS84 projection"
5
- v-model="wgs84Extent"
5
+ :model-value="wgs84Extent"
6
6
  show-extent-on-startup
7
+ @update:model-value="handleWgs84ExtentUpdate"
7
8
  />
8
9
  <VcsExtentEditor
9
10
  heading="Mercator projection example"
@@ -25,7 +26,20 @@
25
26
  projection: mercatorProjection,
26
27
  }).toJSON();
27
28
 
28
- return { wgs84Extent, mercatorExtent };
29
+ return {
30
+ wgs84Extent,
31
+ mercatorExtent,
32
+ handleWgs84ExtentUpdate(extent) {
33
+ const loggedExtent = {
34
+ ...extent,
35
+ coordinates: [
36
+ ...extent.coordinates.map((c) => Math.round(c * 100000) / 100000),
37
+ ],
38
+ };
39
+ console.log(loggedExtent);
40
+ wgs84Extent.coordinates = extent.coordinates;
41
+ },
42
+ };
29
43
  },
30
44
  };
31
45
  </script>
@@ -1,19 +1,21 @@
1
1
  <template>
2
- <v-sheet class="overflow-auto icons-window">
3
- <vcs-list :items="icons" :searchable="true" :show-title="false" />
4
- </v-sheet>
2
+ <vcs-list
3
+ class="icons-window"
4
+ :items="icons"
5
+ searchable
6
+ sticky-searchbar
7
+ :show-title="false"
8
+ />
5
9
  </template>
6
10
 
7
11
  <script>
8
12
  import { Icons, VcsList } from '@vcmap/ui';
9
- import { VSheet } from 'vuetify/components';
10
13
  import { computed } from 'vue';
11
14
 
12
15
  export default {
13
16
  name: 'AllIconsComponent',
14
17
  components: {
15
18
  VcsList,
16
- VSheet,
17
19
  },
18
20
  setup() {
19
21
  const createListItem = (icon) => {
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <v-sheet>
3
- <v-text-field v-model="message" label="Message" />
4
- <v-text-field v-model.number="timeout" label="Timeout" />
2
+ <v-sheet class="pa-1">
3
+ <VcsTextField class="py-2" v-model="message" label="Message" />
4
+ <VcsTextField class="py-2" v-model.number="timeout" label="Timeout" />
5
5
  <VcsCheckbox v-model="hasTimeout" label="Toggle Timeout" />
6
6
  <v-list>
7
7
  <v-list-item v-for="type in types" :key="type">
@@ -23,12 +23,11 @@
23
23
  VSheet,
24
24
  VList,
25
25
  VListItem,
26
- VTextField,
27
26
  VIcon,
28
27
  VCard,
29
28
  VDivider,
30
29
  } from 'vuetify/components';
31
- import { NotificationType, VcsCheckbox } from '@vcmap/ui';
30
+ import { NotificationType, VcsCheckbox, VcsTextField } from '@vcmap/ui';
32
31
  import { computed, inject, ref } from 'vue';
33
32
 
34
33
  export default {
@@ -37,11 +36,11 @@
37
36
  VSheet,
38
37
  VList,
39
38
  VListItem,
40
- VTextField,
41
39
  VIcon,
42
40
  VCard,
43
41
  VDivider,
44
42
  VcsCheckbox,
43
+ VcsTextField,
45
44
  },
46
45
  setup() {
47
46
  const app = inject('vcsApp');
@@ -8,13 +8,24 @@ You can add projects or modules and define the startup behavior of the plugin:
8
8
 
9
9
  ### ProjectSelectorConfig
10
10
 
11
- | Property | Type | default | Description |
12
- | --------------- | --------------------- | ------------- | --------------------------- |
13
- | selected | string | 'VC Map Base' | selected project on startup |
14
- | selectedModules | string[] | [] | selected modules on startup |
15
- | open | boolean | false | open plugin on startup |
16
- | projects | Array<ProjectOptions> | [] | |
17
- | modules | Array<string> | [] | list of config urls |
11
+ | Property | Type | default | Description |
12
+ | ----------------- | ------------------------ | ------------- | ------------------------------------------- |
13
+ | selected | string | 'VC Map Base' | selected project on startup |
14
+ | selectedModules | string[] | [] | selected modules on startup |
15
+ | open | boolean | false | open plugin on startup |
16
+ | projects | Array<ProjectOptions> | [] | |
17
+ | modules | Array<string> | [] | list of config urls |
18
+ | additionalModules | Record<string, string[]> | {} | child config urls keyed by parent module ID |
19
+
20
+ When a parent module loads, its `additionalModules` are loaded with it. They are removed before the parent is unloaded. Keys must match the parent config's `_id`; values are URLs to child module configs:
21
+
22
+ ```json
23
+ {
24
+ "additionalModules": {
25
+ "dev": ["config/dev/geojson.config.json", "config/dev/i3s.config.json"]
26
+ }
27
+ }
28
+ ```
18
29
 
19
30
  ### ProjectOptions
20
31
 
@@ -86,3 +86,12 @@
86
86
  },
87
87
  };
88
88
  </script>
89
+ <style scoped lang="scss">
90
+ :deep(.v-card-actions) {
91
+ padding: 0px;
92
+ min-height: 40px;
93
+ }
94
+ :deep(.v-card-item) {
95
+ padding: 0.5rem 1rem;
96
+ }
97
+ </style>
@@ -13,8 +13,10 @@ import en from './en.json';
13
13
  * @property {string} _id
14
14
  * @property {string} [name]
15
15
  * @property {string} [description]
16
- * @property {string} configUrl
16
+ * @property {string} [configUrl]
17
+ * @property {Object} [config]
17
18
  * @property {boolean} active
19
+ * @property {Array<VcsModuleState>} [modules]
18
20
  */
19
21
 
20
22
  /**
@@ -37,6 +39,7 @@ import en from './en.json';
37
39
  * @property {boolean} [open=false] - open plugin on startup
38
40
  * @property {Array<Project>} projects
39
41
  * @property {Array<string>} modules
42
+ * @property {Record<string, Array<string>>} [additionalModules] - child module URLs by parent module ID
40
43
  */
41
44
 
42
45
  /**
@@ -50,6 +53,7 @@ export default async function projectSelector(config) {
50
53
  open,
51
54
  projects = [],
52
55
  modules = [],
56
+ additionalModules = {},
53
57
  } = config;
54
58
 
55
59
  const pluginConfig = reactive({
@@ -70,6 +74,17 @@ export default async function projectSelector(config) {
70
74
  projects: /** @type {Array<Project>} */ [],
71
75
  modules: /** @type {Array<VcsModuleState>} */ [],
72
76
  });
77
+ const additionalModuleStates = new Map(
78
+ Object.entries(additionalModules).map(([moduleId, configUrls]) => [
79
+ moduleId,
80
+ configUrls.map((configUrl) => ({
81
+ _id: undefined,
82
+ configUrl,
83
+ active: false,
84
+ })),
85
+ ]),
86
+ );
87
+ let removeModuleRemovedListener;
73
88
 
74
89
  /**
75
90
  * @param {string} configUrl
@@ -113,6 +128,32 @@ export default async function projectSelector(config) {
113
128
  pluginState.projects.splice(projectIdx, 1);
114
129
  }
115
130
 
131
+ /**
132
+ * @param {VcsApp} app
133
+ * @param {VcsModuleState} moduleState
134
+ * @returns {Promise<void>}
135
+ */
136
+ async function unloadModule(app, moduleState) {
137
+ if (moduleState.modules) {
138
+ await Promise.all(
139
+ moduleState.modules.map((state) => unloadModule(app, state)),
140
+ );
141
+ moduleState.modules = undefined;
142
+ moduleState.active = false;
143
+ return;
144
+ }
145
+ if (app.getModuleById(moduleState._id)) {
146
+ await Promise.all(
147
+ (additionalModuleStates.get(moduleState._id) || []).map((state) =>
148
+ unloadModule(app, state),
149
+ ),
150
+ );
151
+ await app.removeModule(moduleState._id);
152
+ moduleState.active = false;
153
+ moduleState._id = undefined;
154
+ }
155
+ }
156
+
116
157
  /**
117
158
  * @param {VcsApp} app
118
159
  * @param {VcsModuleState} moduleState
@@ -123,6 +164,22 @@ export default async function projectSelector(config) {
123
164
  const response = await fetch(moduleState.configUrl);
124
165
  if (response.ok) {
125
166
  const configJson = await response.json();
167
+ if (Array.isArray(configJson.modules)) {
168
+ moduleState.modules = configJson.modules.map((moduleConfig) =>
169
+ typeof moduleConfig === 'string'
170
+ ? { _id: undefined, active: false, configUrl: moduleConfig }
171
+ : { _id: undefined, active: false, config: moduleConfig },
172
+ );
173
+ await Promise.all(
174
+ moduleState.modules.map((state) => loadModule(app, state)),
175
+ );
176
+ moduleState.name = configJson.name;
177
+ moduleState.description = configJson.description;
178
+ moduleState.active = moduleState.modules.every(
179
+ (state) => state.active,
180
+ );
181
+ return;
182
+ }
126
183
  const module = new VcsModule(configJson);
127
184
  if (!app.getModuleById(module._id)) {
128
185
  await app.addModule(module);
@@ -130,6 +187,11 @@ export default async function projectSelector(config) {
130
187
  moduleState.name = module.name;
131
188
  moduleState.description = module.description;
132
189
  moduleState.active = true;
190
+ await Promise.all(
191
+ (additionalModuleStates.get(module._id) || []).map((state) =>
192
+ loadModule(app, state),
193
+ ),
194
+ );
133
195
  }
134
196
  }
135
197
  } catch (err) {
@@ -140,19 +202,6 @@ export default async function projectSelector(config) {
140
202
  }
141
203
  }
142
204
 
143
- /**
144
- * @param {VcsApp} app
145
- * @param {VcsModuleState} moduleState
146
- * @returns {Promise<void>}
147
- */
148
- async function unloadModule(app, moduleState) {
149
- if (app.getModuleById(moduleState._id)) {
150
- await app.removeModule(moduleState._id);
151
- moduleState.active = false;
152
- moduleState._id = undefined;
153
- }
154
- }
155
-
156
205
  /**
157
206
  * @param {VcsApp} app
158
207
  * @param {Project} project
@@ -214,21 +263,11 @@ export default async function projectSelector(config) {
214
263
  const windowComponent = {
215
264
  id: 'project-selector',
216
265
  component: ProjectsComponent,
217
- state: {
218
- headerTitle: 'Project Selector',
219
- },
220
- position: {
221
- left: '30%',
222
- right: '30%',
223
- top: '20%',
224
- bottom: '20%',
225
- },
266
+ state: { headerTitle: 'Project Selector' },
267
+ position: { left: '30%', right: '30%', top: '10%' },
226
268
  };
227
269
  const { action, destroy } = createToggleAction(
228
- {
229
- name: 'VC Map HOSTING',
230
- icon: 'mdi-chevron-down',
231
- },
270
+ { name: 'VC Map HOSTING', icon: 'mdi-chevron-down' },
232
271
  windowComponent,
233
272
  app.windowManager,
234
273
  packageJSON.name,
@@ -239,6 +278,23 @@ export default async function projectSelector(config) {
239
278
  ButtonLocation.PROJECT,
240
279
  );
241
280
  this._destroyAction = destroy;
281
+ removeModuleRemovedListener = app.moduleRemoved.addEventListener(
282
+ (module) => {
283
+ const moduleStates = [
284
+ ...pluginState.modules,
285
+ ...[...additionalModuleStates.values()].flat(),
286
+ ...pluginState.projects.flatMap(
287
+ ({ modules: projectModules }) => projectModules,
288
+ ),
289
+ ];
290
+ moduleStates.forEach((moduleState) => {
291
+ if (moduleState._id === module._id) {
292
+ moduleState.active = false;
293
+ moduleState._id = undefined;
294
+ }
295
+ });
296
+ },
297
+ );
242
298
 
243
299
  pluginConfig.modules.forEach((c) => addModule(c));
244
300
  pluginConfig.projects.forEach((p) => addProject(p));
@@ -260,6 +316,10 @@ export default async function projectSelector(config) {
260
316
  en,
261
317
  },
262
318
  destroy() {
319
+ if (removeModuleRemovedListener) {
320
+ removeModuleRemovedListener();
321
+ removeModuleRemovedListener = undefined;
322
+ }
263
323
  if (this._destroyAction) {
264
324
  this._destroyAction();
265
325
  this._destroyAction = null;
@@ -9,15 +9,22 @@
9
9
  :gradient="gradient"
10
10
  :fill="fill"
11
11
  :smooth="smooth"
12
- :value="values"
13
- />
12
+ :tooltip="{ class: ' bg-grey-darken-4' }"
13
+ auto-draw
14
+ interactive
15
+ :model-value="values"
16
+ >
17
+ <template #tooltip="{ index }">
18
+ {{ values[index] }}
19
+ </template>
20
+ </v-sparkline>
14
21
  </template>
15
22
  <script>
16
23
  import { VSparkline } from 'vuetify/components';
17
24
 
18
25
  export default {
19
26
  name: 'SimpleGraphComponent',
20
- components: [VSparkline],
27
+ components: { VSparkline },
21
28
  props: {
22
29
  attributes: {
23
30
  type: Object,
@@ -1,10 +1,19 @@
1
1
  import SimpleGraphView from './simpleGraphView.js';
2
+ import { name, version, mapVersion } from '../package.json';
2
3
  /**
3
4
  * @returns {VcsPlugin}
4
5
  */
5
6
  export default async function simpleGraph() {
6
7
  return {
7
- name: '@vcmap/simpleGraph',
8
+ get name() {
9
+ return name;
10
+ },
11
+ get version() {
12
+ return version;
13
+ },
14
+ get mapVersion() {
15
+ return mapVersion;
16
+ },
8
17
  onVcsAppMounted(app) {
9
18
  /** Example for registering custom component on FeatureInfo */
10
19
  app.featureInfoClassRegistry.registerClass(
@@ -14,7 +14,7 @@ on Click of a ContentTreeItem.
14
14
  "onClick": [
15
15
  {
16
16
  "type": "SwitchMapCallback",
17
- "mapName": "ol3"
17
+ "mapName": "OpenlayersMap"
18
18
  }
19
19
  ]
20
20
  },
@@ -33,7 +33,8 @@
33
33
  "@vcmap/dynamic-layer": "^4.0.0",
34
34
  "@vcmap/geofence": "^1.0.2",
35
35
  "@vcmap/panorama": "^1.0.0",
36
- "@vcmap/layer-settings": "^1.0.1"
36
+ "@vcmap/layer-settings": "^1.0.1",
37
+ "@vcmap/ladder-reachability": "^1.0.2"
37
38
  },
38
39
  "optionalDependencies": {
39
40
  "@vcmap/guided-tour": "^1.0.6",
@@ -93,7 +93,6 @@
93
93
  } from './VcsSplashScreen.vue';
94
94
  import VcsTextPage from './VcsTextPage.vue';
95
95
  import VcsAttributions from './VcsAttributions.vue';
96
- import { getAttributions } from './attributionsHelper.js';
97
96
  import VcsPositionDisplay from './VcsPositionDisplay.vue';
98
97
  import {
99
98
  getDataProtection,
@@ -747,9 +746,9 @@
747
746
  * @returns {{ attributionEntries: import("vue").Ref<Array<import("./attributionsHelper.js").AttributionEntry>>, attributionAction: import("../actions/actionHelper.js").VcsAction, destroyAttributions: function():void }}
748
747
  */
749
748
  export function setupAttributions(app) {
750
- const { entries, destroy } = getAttributions(app);
749
+ const { entries } = app.attributions;
751
750
 
752
- const { action: attributionAction, destroy: attributionDestroy } =
751
+ const { action: attributionAction, destroy: destroyAttributions } =
753
752
  createToggleAction(
754
753
  {
755
754
  name: 'attributionToggle',
@@ -773,10 +772,7 @@
773
772
  return {
774
773
  attributionEntries: entries,
775
774
  attributionAction,
776
- destroyAttributions: () => {
777
- destroy();
778
- attributionDestroy();
779
- },
775
+ destroyAttributions,
780
776
  };
781
777
  }
782
778
 
@@ -11,6 +11,13 @@
11
11
  * @property {string} title - title of the VcsObject the attribution applies to
12
12
  * @property {AttributionOptions|Array<AttributionOptions>} attributions - attributions of a map, layer or oblique collection
13
13
  */
14
+ /**
15
+ * @typedef {Object} Attributions
16
+ * @property {import("vue").UnwrapRef<Array<AttributionEntry>>} entries - reactive array of attribution entries
17
+ * @property {function(import("@vcmap/core").VcsMap, string|import('../pluginHelper.js').vcsAppSymbol): function():void} registerMap - function to register a map and its layer collection for an owner, returns a function to unregister it
18
+ * @property {function(string|import('../pluginHelper.js').vcsAppSymbol):void} removeOwner - unregister all maps registered by an owner
19
+ * @property {function():void} destroy - function to clear all listeners and clean up attributions
20
+ */
14
21
  /**
15
22
  * merges attribution entries of same providers
16
23
  * @param {Array<AttributionEntry>} entries
@@ -28,12 +35,9 @@ export function mergeAttributions(entries: Array<AttributionEntry>): Array<{
28
35
  * Listens to state changes of maps, layers and oblique collections and synchronizes the entries array correspondingly.
29
36
  * Returns a destroy function to clear listeners.
30
37
  * @param {import("../vcsUiApp.js").default} app
31
- * @returns {{entries: import("vue").UnwrapRef<Array<AttributionEntry>>, destroy: function():void}}
38
+ * @returns {Attributions}
32
39
  */
33
- export function getAttributions(app: import("../vcsUiApp.js").default): {
34
- entries: import("vue").UnwrapRef<Array<AttributionEntry>>;
35
- destroy: () => void;
36
- };
40
+ export function getAttributions(app: import("../vcsUiApp.js").default): Attributions;
37
41
  export type AttributionOptions = {
38
42
  /**
39
43
  * - name of the data provider
@@ -66,3 +70,21 @@ export type AttributionEntry = {
66
70
  */
67
71
  attributions: AttributionOptions | Array<AttributionOptions>;
68
72
  };
73
+ export type Attributions = {
74
+ /**
75
+ * - reactive array of attribution entries
76
+ */
77
+ entries: import("vue").UnwrapRef<Array<AttributionEntry>>;
78
+ /**
79
+ * - function to register a map and its layer collection for an owner, returns a function to unregister it
80
+ */
81
+ registerMap: (arg0: import("@vcmap/core").VcsMap, arg1: string | symbol) => () => void;
82
+ /**
83
+ * - unregister all maps registered by an owner
84
+ */
85
+ removeOwner: (arg0: string | symbol) => void;
86
+ /**
87
+ * - function to clear all listeners and clean up attributions
88
+ */
89
+ destroy: () => void;
90
+ };