@vcmap/ui 5.1.1 → 5.1.3

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 (35) hide show
  1. package/build/getPluginProxies.js +4 -1
  2. package/config/www.config.json +40 -6
  3. package/dist/assets/cesium.js +1 -1
  4. package/dist/assets/{core.8ecfba.js → core.c815b8.js} +1580 -1572
  5. package/dist/assets/core.js +1 -1
  6. package/dist/assets/index-0abd9815.js +1 -0
  7. package/dist/assets/ol.js +1 -1
  8. package/dist/assets/{ui.186a84.css → ui.f85ce1.css} +2 -2
  9. package/dist/assets/{ui.186a84.js → ui.f85ce1.js} +1482 -1393
  10. package/dist/assets/ui.js +1 -1
  11. package/dist/assets/vue.js +2 -2
  12. package/dist/assets/{vuetify.10881a.js → vuetify.bf2ba1.js} +1 -1
  13. package/dist/assets/vuetify.js +2 -2
  14. package/dist/index.html +1 -1
  15. package/package.json +2 -2
  16. package/src/application/VcsPositionDisplay.vue +10 -0
  17. package/src/components/icons/+all.js +4 -0
  18. package/src/components/icons/TransparentTerrainIcon.vue +17 -0
  19. package/src/components/icons/TransparentTerrainIcon.vue.d.ts +2 -0
  20. package/src/components/import/ImportComponent.vue +6 -0
  21. package/src/components/import/ImportComponent.vue.d.ts +1 -0
  22. package/src/components/tables/VcsDataTable.vue +7 -1
  23. package/src/components/viewpoint/VcsViewpointComponent.vue +24 -18
  24. package/src/featureInfo/featureInfo.js +1 -1
  25. package/src/manager/toolbox/SelectToolboxComponent.vue +1 -1
  26. package/src/manager/toolbox/ToolboxManager.vue +31 -4
  27. package/src/manager/toolbox/ToolboxManager.vue.d.ts +3 -0
  28. package/src/manager/window/WindowManager.vue +1 -1
  29. package/src/manager/window/windowManager.d.ts +30 -1
  30. package/src/manager/window/windowManager.js +71 -2
  31. package/dist/assets/index-c87f843d.js +0 -1
  32. /package/dist/assets/{cesium.c1accb.js → cesium.012009.js} +0 -0
  33. /package/dist/assets/{ol.b751cb.js → ol.fbe9a4.js} +0 -0
  34. /package/dist/assets/{vue.3f80ec.js → vue.65726b.js} +0 -0
  35. /package/dist/assets/{vuetify.10881a.css → vuetify.bf2ba1.css} +0 -0
package/dist/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui.186a84.js";
1
+ export * from "./ui.f85ce1.js";
@@ -1,5 +1,5 @@
1
- export * from "./vue.3f80ec.js";
2
- import { default as f } from "./vue.3f80ec.js";
1
+ export * from "./vue.65726b.js";
2
+ import { default as f } from "./vue.65726b.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.10881a.css');import v from "./vue.3f80ec.js";
16
+ } await loadCss('./assets/vuetify.bf2ba1.css');import v from "./vue.65726b.js";
17
17
  const Ne = v.extend().extend({
18
18
  name: "themeable",
19
19
  provide() {
@@ -1,5 +1,5 @@
1
- export * from "./vuetify.10881a.js";
2
- import { default as f } from "./vuetify.10881a.js";
1
+ export * from "./vuetify.bf2ba1.js";
2
+ import { default as f } from "./vuetify.bf2ba1.js";
3
3
  export {
4
4
  f as default
5
5
  };
package/dist/index.html CHANGED
@@ -91,7 +91,7 @@
91
91
  }
92
92
  }
93
93
  </style>
94
- <script type="module" crossorigin src="./assets/index-c87f843d.js"></script>
94
+ <script type="module" crossorigin src="./assets/index-0abd9815.js"></script>
95
95
  </head>
96
96
  <body style="height: 100vh; margin: 0;">
97
97
  <noscript>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "5.1.1",
3
+ "version": "5.1.3",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@vcmap-cesium/engine": "^4.0.3",
56
- "@vcmap/core": "^5.1.0",
56
+ "@vcmap/core": "^5.1.2",
57
57
  "ol": "^7.5.2",
58
58
  "vue": "~2.7.3",
59
59
  "vuetify": "~2.6.7"
@@ -152,6 +152,16 @@
152
152
  }
153
153
 
154
154
  const listener = [
155
+ app.uiConfig.added.addEventListener((added) => {
156
+ if (added.name === 'positionDisplayEventType') {
157
+ setMove();
158
+ }
159
+ }),
160
+ app.uiConfig.removed.addEventListener((added) => {
161
+ if (added.name === 'positionDisplayEventType') {
162
+ setMove();
163
+ }
164
+ }),
155
165
  app.moduleAdded.addEventListener(() => {
156
166
  const newDefaultProjection = getDefaultProjection();
157
167
  projections[newDefaultProjection.epsg] = newDefaultProjection;
@@ -91,6 +91,7 @@ import TextStyleIcon from './TextStyleIcon.vue';
91
91
  import ThreeDimensionsIcon from './ThreeDimensionsIcon.vue';
92
92
  import ToolsIcon from './ToolsIcon.vue';
93
93
  import TouchIcon from './TouchIcon.vue';
94
+ import TransparentTerrainIcon from './TransparentTerrainIcon.vue';
94
95
  import TrashCanIcon from './TrashCanIcon.vue';
95
96
  import TriangleIcon from './TriangleIcon.vue';
96
97
  import TwoDimensionsIcon from './TwoDimensionsIcon.vue';
@@ -413,6 +414,9 @@ const IconMap = {
413
414
  touch: {
414
415
  component: TouchIcon,
415
416
  },
417
+ transparentTerrain: {
418
+ component: TransparentTerrainIcon,
419
+ },
416
420
  trashCan: {
417
421
  component: TrashCanIcon,
418
422
  },
@@ -0,0 +1,17 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg
5
+ id="TransparentTerrain"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ >
9
+ <g id="Gruppe_1899">
10
+ <path
11
+ d="M23.97,11.08c-.01-.05-.03-.1-.06-.15,0-.02-.01-.04-.02-.05-.02-.02-.04-.05-.06-.07-.03-.05-.07-.09-.11-.12-.04-.03-.09-.06-.13-.09-.03-.02-.05-.04-.08-.05l-11.2-4.48c-.19-.08-.41-.08-.6,0L.5,10.54s-.06.04-.08.06c-.05.02-.09.05-.13.08-.04.04-.08.08-.11.13-.02.02-.04.04-.06.07,0,.02-.01.03-.02.05-.02.05-.04.1-.06.15-.01.05-.03.1-.03.15,0,.05,0,.09,0,.14,0,.06.02.12.03.17,0,.02,0,.03.01.05s.03.05.05.08c.03.05.06.1.1.15.04.04.07.07.12.1.02.02.05.05.07.07l6.15,3.69,5.05,3.03h.01c.25.15.56.15.81,0h.01l4.9-2.94,6.29-3.78.02-.02s.03-.03.04-.04c.1-.08.19-.18.24-.3,0-.02.03-.02.03-.04s0-.03,0-.05c.02-.06.03-.11.03-.17,0-.05,0-.09,0-.14,0-.05-.02-.1-.03-.15ZM16.86,14.15l-4.88,2.6-4.98-2.68h0s-4.38-2.63-4.38-2.63l4.87-1.95,4.53-1.81,5.01,2.01h0s4.36,1.75,4.36,1.75l-4.52,2.71Z"
12
+ fill="currentColor"
13
+ />
14
+ <rect id="size" width="24" height="24" fill="none" />
15
+ </g>
16
+ </svg>
17
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -4,6 +4,7 @@
4
4
  <vcs-text-field
5
5
  type="file"
6
6
  v-model="files"
7
+ :loading="loading"
7
8
  :multiple="multiple"
8
9
  :accept="fileTypes.join(',')"
9
10
  />
@@ -54,6 +55,7 @@
54
55
  setup(props, { emit }) {
55
56
  const app = inject('vcsApp');
56
57
  const localFiles = ref([]);
58
+ const loading = ref(false);
57
59
  /**
58
60
  * @type {WritableComputedRef<Array<File>>}
59
61
  */
@@ -68,7 +70,9 @@
68
70
 
69
71
  return {
70
72
  files,
73
+ loading,
71
74
  async doImport() {
75
+ loading.value = true;
72
76
  try {
73
77
  const close = await props.importFiles(files.value);
74
78
  if (close) {
@@ -79,6 +83,8 @@
79
83
  type: NotificationType.ERROR,
80
84
  message: String(e.message),
81
85
  });
86
+ } finally {
87
+ loading.value = false;
82
88
  }
83
89
  },
84
90
  };
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<{
13
13
  };
14
14
  }, {
15
15
  files: WritableComputedRef<File[]>;
16
+ loading: import("vue").Ref<boolean>;
16
17
  doImport(): Promise<void>;
17
18
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
18
19
  importFiles: {
@@ -359,10 +359,16 @@
359
359
  const last = page.value * itemsPerPageRef.value;
360
360
  return last < numberOfItems.value ? last : numberOfItems.value;
361
361
  });
362
+
362
363
  watch(
363
364
  () => props.items,
364
365
  () => {
365
- page.value = 1;
366
+ if (
367
+ props.serverPagesLength === -1 &&
368
+ props.serverItemsLength === -1
369
+ ) {
370
+ page.value = 1;
371
+ }
366
372
  },
367
373
  );
368
374
 
@@ -226,7 +226,7 @@
226
226
  cachedViewpoint = viewpoint;
227
227
  },
228
228
  );
229
- if (app.maps.activeMap.className === OpenlayersMap.className) {
229
+ if (app.maps.activeMap?.className === OpenlayersMap.className) {
230
230
  app.maps.activeMap.requestRender();
231
231
  }
232
232
  }
@@ -235,7 +235,7 @@
235
235
  name: 'edit-viewpoint-action',
236
236
  icon: active ? 'mdi-sync' : 'mdi-sync-off',
237
237
  title: 'components.viewpoint.syncOff',
238
- disabled: app.maps.activeMap.className === ObliqueMap.className,
238
+ disabled: app.maps.activeMap?.className === ObliqueMap.className,
239
239
  active,
240
240
  callback() {
241
241
  this.active = !this.active;
@@ -369,7 +369,7 @@
369
369
  },
370
370
  setup(props, { emit }) {
371
371
  const app = inject('vcsApp');
372
- const isCesiumMap = ref(app.maps.activeMap.className === 'CesiumMap');
372
+ const isCesiumMap = ref(app.maps.activeMap?.className === 'CesiumMap');
373
373
 
374
374
  const name = usePrimitiveProperty(() => props.value, 'name', emit);
375
375
  const title = computed({
@@ -377,13 +377,15 @@
377
377
  return props.value?.properties?.title;
378
378
  },
379
379
  set(value) {
380
- const clone = props.value ? structuredClone(props.value) : {};
381
- if (clone.properties) {
382
- clone.properties.title = value;
383
- } else {
384
- clone.properties = { title };
380
+ if (props.value?.properties?.title !== value) {
381
+ const clone = props.value ? structuredClone(props.value) : {};
382
+ if (clone.properties) {
383
+ clone.properties.title = value;
384
+ } else {
385
+ clone.properties = { title: value };
386
+ }
387
+ emit('input', clone);
385
388
  }
386
- emit('input', clone);
387
389
  },
388
390
  });
389
391
  const animate = usePrimitiveProperty(() => props.value, 'animate', emit);
@@ -435,8 +437,10 @@
435
437
  icon: 'mdi-camera',
436
438
  title: 'components.viewpoint.updateFromView',
437
439
  async callback() {
438
- const viewpoint = await app.maps.activeMap.getViewpoint();
439
- emitInput(emit, viewpoint, () => props.value);
440
+ if (app.maps.activeMap) {
441
+ const viewpoint = await app.maps.activeMap.getViewpoint();
442
+ emitInput(emit, viewpoint, () => props.value);
443
+ }
440
444
  },
441
445
  };
442
446
 
@@ -480,14 +484,16 @@
480
484
  }
481
485
 
482
486
  async function handleInput(key) {
483
- if (key === 'groundPosition') {
484
- cameraPosition.value = undefined;
485
- } else if (key === 'cameraPosition') {
486
- groundPosition.value = (
487
- await app.maps.activeMap.getViewpoint()
488
- ).groundPosition;
487
+ if (app.maps.activeMap) {
488
+ if (key === 'groundPosition') {
489
+ cameraPosition.value = undefined;
490
+ } else if (key === 'cameraPosition') {
491
+ groundPosition.value = (
492
+ await app.maps.activeMap.getViewpoint()
493
+ ).groundPosition;
494
+ }
495
+ await gotoViewpoint();
489
496
  }
490
- await gotoViewpoint();
491
497
  }
492
498
 
493
499
  return {
@@ -138,13 +138,13 @@ function setupFeatureInfoTool(app) {
138
138
  callback() {
139
139
  if (session) {
140
140
  session.stop();
141
- this.title = 'featureInfo.activateToolTitle';
142
141
  } else {
143
142
  session = createFeatureInfoSession(app);
144
143
  session.stopped.addEventListener(() => {
145
144
  this.active = false;
146
145
  session = null;
147
146
  app.featureInfo.clear();
147
+ this.title = 'featureInfo.activateToolTitle';
148
148
  });
149
149
  this.active = true;
150
150
  this.title = 'featureInfo.deactivateToolTitle';
@@ -11,7 +11,7 @@
11
11
  :active="group.action.active"
12
12
  :disabled="group.action.disabled"
13
13
  :background="group.action.background"
14
- @click.stop="group.action.callback($event)"
14
+ @click="group.action.callback($event)"
15
15
  v-bind="{ ...$attrs }"
16
16
  class="vcs-toolbox-action-selected"
17
17
  :min-width="32"
@@ -9,6 +9,8 @@
9
9
  toolbar__secondary: !isDefaultToolbox,
10
10
  }"
11
11
  :height="40"
12
+ :style="{ zIndex }"
13
+ @click.stop="bringToTop"
12
14
  width="fit-content"
13
15
  dense
14
16
  >
@@ -21,12 +23,12 @@
21
23
  <ToolboxActionGroup
22
24
  v-if="group.type === ToolboxType.GROUP"
23
25
  :group="group"
24
- @toggle="(groupOpen) => (open = groupOpen)"
26
+ @toggle="openGroup"
25
27
  />
26
28
  <ToolboxActionSelect
27
29
  v-else-if="group.type === ToolboxType.SELECT"
28
30
  :group="group"
29
- @toggle="(selectOpen) => (open = selectOpen)"
31
+ @toggle="openGroup"
30
32
  />
31
33
  <VcsToolButton
32
34
  v-else
@@ -35,7 +37,7 @@
35
37
  :active="group.action.active"
36
38
  :background="group.action.background"
37
39
  :disabled="group.action.disabled"
38
- @click.stop="group.action.callback($event)"
40
+ @click="group.action.callback($event)"
39
41
  v-bind="{ ...$attrs }"
40
42
  />
41
43
  </div>
@@ -133,6 +135,11 @@
133
135
  toolboxName.value = name;
134
136
  });
135
137
 
138
+ const zIndex = app.windowManager.addExternalIdToZIndex(
139
+ 'toolbox',
140
+ vcsAppSymbol,
141
+ );
142
+
136
143
  /**
137
144
  * To be rendered in Toolbox components must meet certain conditions:
138
145
  * - SingleToolboxComponent: no further conditions
@@ -189,16 +196,36 @@
189
196
  onUnmounted(() => {
190
197
  stopWatching();
191
198
  nameChangeListener();
199
+ app.windowManager.removeExternalIdFromZIndex('toolbox');
200
+ });
201
+
202
+ watch(toolboxOpen, () => {
203
+ if (toolboxOpen.value) {
204
+ app.windowManager.bringWindowToTop('toolbox');
205
+ }
192
206
  });
193
207
 
208
+ const open = ref(false);
209
+ const bringToTop = () => {
210
+ app.windowManager.bringWindowToTop('toolbox');
211
+ };
212
+
194
213
  return {
195
214
  toolboxOpen,
196
215
  orderedGroups,
216
+ zIndex,
197
217
  isDefaultToolbox: computed(
198
218
  () => toolboxName.value === defaultToolboxName,
199
219
  ),
200
220
  ToolboxType,
201
- open: ref(false),
221
+ open,
222
+ bringToTop,
223
+ openGroup(group) {
224
+ open.value = group;
225
+ if (open.value) {
226
+ bringToTop();
227
+ }
228
+ },
202
229
  };
203
230
  },
204
231
  };
@@ -1,6 +1,7 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
2
  toolboxOpen: import("vue").Ref<boolean>;
3
3
  orderedGroups: import("vue").ComputedRef<(import("../buttonManager.js").ButtonComponent | import("./toolboxManager.js").ToolboxComponent)[]>;
4
+ zIndex: any;
4
5
  isDefaultToolbox: import("vue").ComputedRef<boolean>;
5
6
  ToolboxType: {
6
7
  SINGLE: number;
@@ -8,6 +9,8 @@ declare const _default: import("vue").DefineComponent<{}, {
8
9
  GROUP: number;
9
10
  };
10
11
  open: import("vue").Ref<boolean>;
12
+ bringToTop: () => void;
13
+ openGroup(group: any): void;
11
14
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
12
15
  export default _default;
13
16
  export type ToolboxButtonGroup = {
@@ -97,7 +97,7 @@
97
97
  * @returns {boolean}
98
98
  */
99
99
  const isOnTop = (id) => {
100
- return windowManager.get(id)?.zIndex.value === componentIds.length - 1;
100
+ return windowManager.get(id)?.zIndex.value === windowManager.maxZIndex;
101
101
  };
102
102
  /**
103
103
  * @param {WindowComponent} windowComponent
@@ -302,8 +302,15 @@ declare class WindowManager implements IWindowManager {
302
302
  /**
303
303
  * reactive ordered array of ids, defining the zIndex of a component
304
304
  * @type {import("vue").Ref<Array<string>>}
305
+ * @private
306
+ */
307
+ private _zIndices;
308
+ /**
309
+ * Map of <id, owner> for external zIndexIds
310
+ * @type {Map<string, string>}
311
+ * @private
305
312
  */
306
- _zIndices: import("vue").Ref<Array<string>>;
313
+ private _externalZIndexIds;
307
314
  /**
308
315
  * @type {Map<string, WindowComponent>}
309
316
  * @private
@@ -314,6 +321,14 @@ declare class WindowManager implements IWindowManager {
314
321
  * @private
315
322
  */
316
323
  private _windowPositionsCache;
324
+ /**
325
+ * @type {number}
326
+ */
327
+ get maxZIndex(): number;
328
+ /**
329
+ * @return {string[]}
330
+ */
331
+ get externalZIndexIds(): string[];
317
332
  /**
318
333
  * @param {string} id
319
334
  * @returns {WindowComponent}
@@ -411,6 +426,20 @@ declare class WindowManager implements IWindowManager {
411
426
  * @param {string|vcsAppSymbol} owner
412
427
  */
413
428
  removeOwner(owner: string | symbol): void;
429
+ /**
430
+ * Adds a string id to the z index handling of windows. The returned computed
431
+ * will give you the current z index of the id. Use bringToTop with the id to bring it
432
+ * to the top, just like a window.
433
+ * @param {string} id
434
+ * @param {string|vcsAppSymbol} owner
435
+ * @return {import("vue").ComputedRef<number>}
436
+ */
437
+ addExternalIdToZIndex(id: string, owner: string | symbol): import("vue").ComputedRef<number>;
438
+ /**
439
+ * Removes an external z index id
440
+ * @param {string} id
441
+ */
442
+ removeExternalIdFromZIndex(id: string): void;
414
443
  /**
415
444
  * removes all windowComponents and fires removed Events
416
445
  */
@@ -269,14 +269,23 @@ class WindowManager {
269
269
  /**
270
270
  * reactive ordered array of ids, defining the zIndex of a component
271
271
  * @type {import("vue").Ref<Array<string>>}
272
+ * @private
272
273
  */
273
274
  this._zIndices = ref([]);
274
275
 
276
+ /**
277
+ * Map of <id, owner> for external zIndexIds
278
+ * @type {Map<string, string>}
279
+ * @private
280
+ */
281
+ this._externalZIndexIds = new Map();
282
+
275
283
  /**
276
284
  * @type {Map<string, WindowComponent>}
277
285
  * @private
278
286
  */
279
287
  this._windowComponents = new Map();
288
+
280
289
  /**
281
290
  * @type {Map<string, WindowPosition>}
282
291
  * @private
@@ -284,6 +293,20 @@ class WindowManager {
284
293
  this._windowPositionsCache = new Map();
285
294
  }
286
295
 
296
+ /**
297
+ * @type {number}
298
+ */
299
+ get maxZIndex() {
300
+ return this._zIndices.value.length - 1;
301
+ }
302
+
303
+ /**
304
+ * @return {string[]}
305
+ */
306
+ get externalZIndexIds() {
307
+ return [...this._externalZIndexIds.keys()];
308
+ }
309
+
287
310
  /**
288
311
  * @param {string} id
289
312
  * @returns {WindowComponent}
@@ -515,7 +538,11 @@ class WindowManager {
515
538
  add(windowComponentOptions, owner) {
516
539
  check(owner, [String, vcsAppSymbol]);
517
540
 
518
- if (windowComponentOptions.id && this.has(windowComponentOptions.id)) {
541
+ if (
542
+ windowComponentOptions.id &&
543
+ (this.has(windowComponentOptions.id) ||
544
+ this._externalZIndexIds.has(windowComponentOptions.id))
545
+ ) {
519
546
  throw new Error(
520
547
  `A window with id ${windowComponentOptions.id} has already been registered.`,
521
548
  );
@@ -569,6 +596,7 @@ class WindowManager {
569
596
  const position = reactive(windowPosition);
570
597
  const initialPosition = { ...windowPositionOptions };
571
598
  const zIndex = computed(() => this._zIndices.value.indexOf(id));
599
+
572
600
  /**
573
601
  * @type {WindowComponent}
574
602
  */
@@ -627,7 +655,7 @@ class WindowManager {
627
655
  * @param {string} id
628
656
  */
629
657
  bringWindowToTop(id) {
630
- if (this.has(id)) {
658
+ if (this.has(id) || this._externalZIndexIds.has(id)) {
631
659
  const index = this._zIndices.value.indexOf(id);
632
660
  if (index >= 0 && index !== this._zIndices.value.length - 1) {
633
661
  this._zIndices.value.push(id);
@@ -675,6 +703,47 @@ class WindowManager {
675
703
  this.remove(id);
676
704
  }
677
705
  });
706
+ this._externalZIndexIds.forEach((externalOwner, id) => {
707
+ if (externalOwner === owner) {
708
+ this.removeExternalIdFromZIndex(id);
709
+ }
710
+ });
711
+ }
712
+
713
+ /**
714
+ * Adds a string id to the z index handling of windows. The returned computed
715
+ * will give you the current z index of the id. Use bringToTop with the id to bring it
716
+ * to the top, just like a window.
717
+ * @param {string} id
718
+ * @param {string|vcsAppSymbol} owner
719
+ * @return {import("vue").ComputedRef<number>}
720
+ */
721
+ addExternalIdToZIndex(id, owner) {
722
+ check(id, String);
723
+ check(owner, [String, vcsAppSymbol]);
724
+
725
+ if (this.has(id)) {
726
+ throw new Error(`Id ${id} already belongs to a window id`);
727
+ }
728
+
729
+ if (this._externalZIndexIds.has(id)) {
730
+ throw new Error(`Id ${id} is already added`);
731
+ }
732
+ this._externalZIndexIds.set(id, owner);
733
+ this._zIndices.value.push(id);
734
+ return computed(() => this._zIndices.value.indexOf(id));
735
+ }
736
+
737
+ /**
738
+ * Removes an external z index id
739
+ * @param {string} id
740
+ */
741
+ removeExternalIdFromZIndex(id) {
742
+ this._externalZIndexIds.delete(id);
743
+ const index = this._zIndices.value.indexOf(id);
744
+ if (index > -1) {
745
+ this._zIndices.value.splice(index, 1);
746
+ }
678
747
  }
679
748
 
680
749
  /**
@@ -1 +0,0 @@
1
- import{initAppFromAppConfig as p}from"./ui.186a84.js";p("#app","app.config.json");
File without changes
File without changes