@vcmap/ui 6.0.0-rc.8 → 6.0.0

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 (191) hide show
  1. package/README.md +2 -0
  2. package/build/buildHelpers.js +1 -1
  3. package/build/commonViteConfig.js +7 -0
  4. package/config/aerowest.config.json +12 -2
  5. package/config/analysis.config.json +17 -0
  6. package/config/base.config.json +19 -5
  7. package/config/components-show-case.config.json +53 -0
  8. package/config/concepts-show-case.config.json +39 -0
  9. package/config/dev.config.json +164 -105
  10. package/config/dynamic-layer.config.json +32 -0
  11. package/config/hello-world.config.json +11 -0
  12. package/config/projects.config.json +9 -1
  13. package/config/solar.config.json +65 -0
  14. package/config/vectorTile.config.json +70 -0
  15. package/config/www.config.json +34 -13
  16. package/dist/assets/{cesium-2ec6aae0.js → cesium-00deba88.js} +4672 -4704
  17. package/dist/assets/cesium.js +1 -1
  18. package/dist/assets/{core-6f2522e5.js → core-a599e8b6.js} +7932 -7342
  19. package/dist/assets/core.js +1 -1
  20. package/dist/assets/{ol-b0e134cb.js → ol-21bbc740.js} +12206 -11711
  21. package/dist/assets/ol.js +1 -1
  22. package/dist/assets/ui-adeddc7d.css +1 -0
  23. package/dist/assets/{ui-bf3d1f84.js → ui-adeddc7d.js} +10415 -9588
  24. package/dist/assets/ui.js +1 -1
  25. package/dist/assets/vue.js +1 -1
  26. package/dist/assets/{vuetify-99bf601c.css → vuetify-c0e02f11.css} +1 -1
  27. package/dist/assets/{vuetify-99bf601c.js → vuetify-c0e02f11.js} +5313 -5294
  28. package/dist/assets/vuetify.js +1 -1
  29. package/index.d.ts +4 -0
  30. package/index.js +2 -0
  31. package/lib/olLib.js +6 -0
  32. package/package.json +12 -12
  33. package/plugins/@vcmap-show-case/README.md +15 -6
  34. package/plugins/@vcmap-show-case/category-tester/package.json +1 -1
  35. package/plugins/@vcmap-show-case/category-tester/src/CollectionComponentOptions.vue +23 -23
  36. package/plugins/@vcmap-show-case/category-tester/src/FoobarEditor.vue +2 -8
  37. package/plugins/@vcmap-show-case/collection-manager-example/package.json +1 -1
  38. package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +10 -8
  39. package/plugins/@vcmap-show-case/context-menu-tester/package.json +1 -1
  40. package/plugins/@vcmap-show-case/extent-example/package.json +1 -1
  41. package/plugins/@vcmap-show-case/flight-component-example/package.json +1 -1
  42. package/plugins/@vcmap-show-case/form-inputs-example/package.json +1 -1
  43. package/plugins/@vcmap-show-case/hello-world/package.json +1 -1
  44. package/plugins/@vcmap-show-case/icons-example/package.json +1 -1
  45. package/plugins/@vcmap-show-case/notifier-tester/package.json +1 -1
  46. package/plugins/@vcmap-show-case/panel-tester/package.json +1 -1
  47. package/plugins/@vcmap-show-case/plugin-editors/package.json +1 -1
  48. package/plugins/@vcmap-show-case/plugin-editors/src/index.js +17 -6
  49. package/plugins/@vcmap-show-case/project-selector/package.json +1 -9
  50. package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +22 -31
  51. package/plugins/@vcmap-show-case/project-selector/src/ProjectSelectorComponent.vue +15 -23
  52. package/plugins/@vcmap-show-case/projection-example/README.md +3 -0
  53. package/plugins/@vcmap-show-case/projection-example/package.json +5 -0
  54. package/plugins/@vcmap-show-case/projection-example/src/ProjectionExample.vue +73 -0
  55. package/plugins/@vcmap-show-case/{table-example → projection-example}/src/index.js +22 -11
  56. package/plugins/@vcmap-show-case/search-example/package.json +1 -1
  57. package/plugins/@vcmap-show-case/simple-graph/package.json +1 -4
  58. package/plugins/@vcmap-show-case/style-input-example/package.json +1 -1
  59. package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +2 -2
  60. package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +2 -1
  61. package/plugins/@vcmap-show-case/switch-map-callback-example/src/index.js +4 -1
  62. package/plugins/@vcmap-show-case/theming-example/package.json +1 -1
  63. package/plugins/@vcmap-show-case/toolbox-example/package.json +1 -1
  64. package/plugins/@vcmap-show-case/vector-properties-example/package.json +1 -1
  65. package/plugins/@vcmap-show-case/viewpoint-component-example/package.json +1 -1
  66. package/plugins/@vcmap-show-case/window-tester/package.json +1 -1
  67. package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +1 -1
  68. package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +5 -1
  69. package/plugins/@vcmap-show-case/wizard-example/package.json +1 -1
  70. package/plugins/package.json +23 -3
  71. package/src/actions/flightActions.js +40 -20
  72. package/src/actions/listActions.d.ts +1 -1
  73. package/src/actions/listActions.js +1 -1
  74. package/src/application/VcsApp.vue +3 -0
  75. package/src/application/VcsApp.vue.d.ts +15 -0
  76. package/src/application/VcsAttributions.vue +1 -1
  77. package/src/application/VcsAttributionsFooter.vue +1 -1
  78. package/src/application/VcsContainer.vue +0 -1
  79. package/src/application/VcsContainer.vue.d.ts +15 -0
  80. package/src/application/VcsObliqueFooter.vue +110 -0
  81. package/src/application/VcsObliqueFooter.vue.d.ts +4 -0
  82. package/src/application/VcsTextPageFooter.vue +1 -0
  83. package/src/application/attributionsHelper.js +10 -6
  84. package/src/components/buttons/VcsButton.vue +2 -2
  85. package/src/components/buttons/VcsButton.vue.d.ts +1 -1
  86. package/src/components/buttons/VcsFormButton.vue +2 -2
  87. package/src/components/buttons/VcsFormButton.vue.d.ts +1 -1
  88. package/src/components/buttons/VcsToolButton.vue +2 -2
  89. package/src/components/buttons/VcsToolButton.vue.d.ts +1 -1
  90. package/src/components/composables.d.ts +2 -2
  91. package/src/components/composables.js +3 -5
  92. package/src/components/flight/VcsFlightPlayer.vue +26 -20
  93. package/src/components/form-inputs-controls/VcsCheckbox.vue +11 -5
  94. package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +10 -1
  95. package/src/components/form-inputs-controls/VcsDatePicker.vue +23 -3
  96. package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +1 -1
  97. package/src/components/form-inputs-controls/VcsFileInput.vue +3 -3
  98. package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -1
  99. package/src/components/form-inputs-controls/VcsLabel.vue +10 -1
  100. package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +9 -0
  101. package/src/components/form-inputs-controls/VcsRadio.vue +4 -0
  102. package/src/components/form-inputs-controls/VcsSelect.vue +2 -2
  103. package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +3 -3
  104. package/src/components/form-inputs-controls/VcsSlider.vue +2 -2
  105. package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +1 -1
  106. package/src/components/form-inputs-controls/VcsTextArea.vue +2 -2
  107. package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -1
  108. package/src/components/form-inputs-controls/VcsTextField.vue +3 -3
  109. package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +1 -1
  110. package/src/components/form-inputs-controls/VcsWizard.vue +2 -2
  111. package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +1 -1
  112. package/src/components/form-inputs-controls/VcsWizardStep.vue +2 -2
  113. package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +3 -3
  114. package/src/components/import/VcsImportComponent.vue +3 -3
  115. package/src/components/lists/VcsActionList.vue +1 -1
  116. package/src/components/lists/VcsList.vue +56 -39
  117. package/src/components/lists/VcsListItemComponent.vue +14 -12
  118. package/src/components/lists/VcsListItemComponent.vue.d.ts +5 -28
  119. package/src/components/lists/VcsTreeview.vue +4 -2
  120. package/src/components/lists/VcsTreeview.vue.d.ts +1 -1
  121. package/src/components/notification/VcsHelp.vue +0 -1
  122. package/src/components/notification/VcsHelpTooltip.vue +48 -0
  123. package/src/components/notification/VcsHelpTooltip.vue.d.ts +25 -0
  124. package/src/components/projection/VcsProjection.vue +329 -0
  125. package/src/components/projection/VcsProjection.vue.d.ts +7 -0
  126. package/src/components/section/VcsFormSection.vue +0 -1
  127. package/src/components/section/VcsFormSection.vue.d.ts +1 -1
  128. package/src/components/tables/VcsDataTable.vue +15 -4
  129. package/src/components/tables/VcsDataTable.vue.d.ts +13 -2
  130. package/src/components/vector-properties/VcsFeatureEditingWindow.vue +17 -1
  131. package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +10 -1
  132. package/src/components/vector-properties/VcsFeatureTransforms.vue +39 -5
  133. package/src/components/vector-properties/VcsFeatureTransforms.vue.d.ts +2 -1
  134. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +44 -24
  135. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +27 -2
  136. package/src/components/viewpoint/VcsViewpointComponent.vue +6 -6
  137. package/src/contentTree/contentTreeCollection.js +12 -1
  138. package/src/contentTree/obliqueCollectionContentTreeItem.js +6 -1
  139. package/src/featureInfo/abstractFeatureInfoView.d.ts +9 -0
  140. package/src/featureInfo/abstractFeatureInfoView.js +20 -3
  141. package/src/i18n/de.d.ts +93 -39
  142. package/src/i18n/de.js +68 -22
  143. package/src/i18n/en.d.ts +93 -39
  144. package/src/i18n/en.js +64 -18
  145. package/src/legend/StyleLegendItem.vue +1 -5
  146. package/src/legend/VcsLegend.vue +9 -10
  147. package/src/legend/VcsLegend.vue.d.ts +1 -1
  148. package/src/legend/legendHelper.js +6 -1
  149. package/src/manager/collectionManager/collectionComponentClass.js +9 -5
  150. package/src/manager/collectionManager/editorCollectionComponentClass.js +5 -3
  151. package/src/manager/toolbox/GroupToolboxComponent.vue +6 -1
  152. package/src/manager/toolbox/SelectToolboxComponent.vue +6 -2
  153. package/src/manager/toolbox/ToolboxManagerComponent.vue +7 -2
  154. package/src/manager/window/WindowComponentHeader.vue +1 -1
  155. package/src/manager/window/windowManager.d.ts +59 -3
  156. package/src/manager/window/windowManager.js +23 -2
  157. package/src/navigation/MapNavCompass.vue +166 -140
  158. package/src/navigation/MapNavCompass.vue.d.ts +3 -1
  159. package/src/navigation/MapNavigation.vue +22 -5
  160. package/src/navigation/VcsCompass.vue +2 -1
  161. package/src/navigation/overviewMap.js +4 -1
  162. package/src/obliqueFallbackWarnings.d.ts +5 -0
  163. package/src/obliqueFallbackWarnings.js +54 -0
  164. package/src/styles/main.scss +2 -2
  165. package/src/uiConfig.d.ts +30 -0
  166. package/src/uiConfig.js +3 -0
  167. package/src/vcsUiApp.d.ts +37 -10
  168. package/src/vcsUiApp.js +4 -0
  169. package/src/vuePlugins/i18n.js +1 -0
  170. package/src/vuePlugins/vuetify.js +2 -0
  171. package/dist/assets/ui-bf3d1f84.css +0 -1
  172. package/plugins/@vcmap-show-case/buttons-example/README.md +0 -4
  173. package/plugins/@vcmap-show-case/buttons-example/package.json +0 -5
  174. package/plugins/@vcmap-show-case/buttons-example/src/ButtonsExample.vue +0 -281
  175. package/plugins/@vcmap-show-case/buttons-example/src/index.js +0 -51
  176. package/plugins/@vcmap-show-case/config-editor/README.md +0 -3
  177. package/plugins/@vcmap-show-case/config-editor/package.json +0 -5
  178. package/plugins/@vcmap-show-case/config-editor/src/ConfigEditor.vue +0 -62
  179. package/plugins/@vcmap-show-case/config-editor/src/index.js +0 -49
  180. package/plugins/@vcmap-show-case/list-example/README.md +0 -3
  181. package/plugins/@vcmap-show-case/list-example/package.json +0 -5
  182. package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +0 -403
  183. package/plugins/@vcmap-show-case/list-example/src/index.js +0 -46
  184. package/plugins/@vcmap-show-case/table-example/README.md +0 -3
  185. package/plugins/@vcmap-show-case/table-example/package.json +0 -5
  186. package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +0 -203
  187. package/plugins/@vcmap-show-case/textfields-example/README.md +0 -3
  188. package/plugins/@vcmap-show-case/textfields-example/package.json +0 -5
  189. package/plugins/@vcmap-show-case/textfields-example/src/TextfieldsExample.vue +0 -115
  190. package/plugins/@vcmap-show-case/textfields-example/src/index.js +0 -64
  191. /package/dist/assets/{vue-43880c5a.js → vue-8269279d.js} +0 -0
@@ -10,7 +10,7 @@ declare const _default: import("vue").DefineComponent<{
10
10
  Style: string;
11
11
  };
12
12
  setIframeHeight: (id: string) => void;
13
- panels: import("vue").ComputedRef<number[]>;
13
+ panels: import("vue").Ref<string[]>;
14
14
  cid: string;
15
15
  }, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
16
  entries: {
@@ -170,7 +170,7 @@ export function getLegendEntries(app) {
170
170
  */
171
171
  function syncLayerLegendEntries(layer) {
172
172
  removeEntryForLayer(layer);
173
- if (layer.active) {
173
+ if (layer.active && layer.isSupported(app.maps.activeMap)) {
174
174
  const key = layer.name;
175
175
  const title = layer.properties.title || layer.name;
176
176
  const legend =
@@ -187,6 +187,10 @@ export function getLegendEntries(app) {
187
187
  }
188
188
  }
189
189
 
190
+ const destroyMapListener = app.maps.mapActivated.addEventListener(() =>
191
+ [...app.layers].forEach(syncLayerLegendEntries),
192
+ );
193
+
190
194
  const destroyChangedListener = app.layers.stateChanged.addEventListener(
191
195
  syncLayerLegendEntries,
192
196
  );
@@ -196,6 +200,7 @@ export function getLegendEntries(app) {
196
200
  [...app.layers].forEach(syncLayerLegendEntries);
197
201
 
198
202
  const destroy = () => {
203
+ destroyMapListener();
199
204
  destroyChangedListener();
200
205
  destroyRemovedListener();
201
206
  Object.values(styleChangedListener).forEach((cb) => cb());
@@ -81,7 +81,11 @@ export function createSupportedMapMappingFunction(
81
81
  return (item, _c, listItem) => {
82
82
  const mapNames =
83
83
  typeof supportedMaps === 'function' ? supportedMaps(item) : supportedMaps;
84
- listItem.disabled = !mapNames.includes(mapCollection.activeMap.className);
84
+ if (mapCollection.activeMap) {
85
+ listItem.disabled = !mapNames.includes(mapCollection.activeMap.className);
86
+ } else {
87
+ listItem.disabled = true;
88
+ }
85
89
  listItem.destroyFunctions.push(
86
90
  mapCollection.mapActivated.addEventListener((map) => {
87
91
  listItem.disabled = !mapNames.includes(map.className);
@@ -317,6 +321,7 @@ class CollectionComponentClass {
317
321
  [...this.selection.value].forEach((listItem) => {
318
322
  this._collection.remove(this._collection.getByKey(listItem.name));
319
323
  });
324
+ this.selection.value = [];
320
325
  },
321
326
  });
322
327
  this._destroyBulkDelete = destroy;
@@ -509,10 +514,9 @@ class CollectionComponentClass {
509
514
  });
510
515
  if (index > -1) {
511
516
  const listItem = this._listItems.value[index];
512
- const selectionIdx = this.selection.value.indexOf(listItem);
513
- if (selectionIdx > -1) {
514
- this.selection.value.splice(selectionIdx, 1);
515
- }
517
+ this.selection.value = this.selection.value.filter(
518
+ (i) => i.name !== listItem.name,
519
+ );
516
520
  destroyListItem(this._listItems.value[index]);
517
521
  this._listItems.value.splice(index, 1);
518
522
  }
@@ -218,9 +218,11 @@ export function makeEditorCollectionComponentClass(
218
218
  );
219
219
 
220
220
  const itemRemovedListener =
221
- editorCollectionComponent.collection.removed.addEventListener(
222
- closeEditorWindow,
223
- );
221
+ editorCollectionComponent.collection.removed.addEventListener((item) => {
222
+ if (predicate(item)) {
223
+ closeEditorWindow(item);
224
+ }
225
+ });
224
226
 
225
227
  editorCollectionComponent.addItemMapping({
226
228
  predicate,
@@ -34,7 +34,12 @@
34
34
  :icon="action.icon"
35
35
  :disabled="action.disabled"
36
36
  :active="action.active"
37
- @click="action.callback($event)"
37
+ @click.stop="
38
+ () => {
39
+ $emit('click', $event);
40
+ action.callback($event);
41
+ }
42
+ "
38
43
  v-bind="{ ...$attrs }"
39
44
  />
40
45
  </div>
@@ -11,7 +11,12 @@
11
11
  :active="group.action.active"
12
12
  :disabled="group.action.disabled"
13
13
  :background="group.action.background"
14
- @click="group.action.callback($event)"
14
+ @click.stop="
15
+ () => {
16
+ $emit('click', $event);
17
+ group.action.callback($event);
18
+ }
19
+ "
15
20
  v-bind="{ ...$attrs }"
16
21
  class="vcs-toolbox-action-selected"
17
22
  :min-width="32"
@@ -39,7 +44,6 @@
39
44
  <v-toolbar
40
45
  class="vcs-toolbox-2 mx-auto marginToTop rounded-b elevation-4 opacity-80 px-1"
41
46
  :height="toolboxHeight"
42
- dense
43
47
  >
44
48
  <v-toolbar-items class="w-100">
45
49
  <div class="d-flex align-center justify-space-between gc-1 w-100">
@@ -20,11 +20,13 @@
20
20
  v-if="group.type === ToolboxType.GROUP"
21
21
  :group="group"
22
22
  @toggle="openGroup"
23
+ @click="bringToTop"
23
24
  />
24
25
  <ToolboxActionSelect
25
26
  v-else-if="group.type === ToolboxType.SELECT"
26
27
  :group="group"
27
28
  @toggle="openGroup"
29
+ @click="bringToTop"
28
30
  />
29
31
  <VcsToolButton
30
32
  v-else
@@ -33,7 +35,10 @@
33
35
  :active="group.action.active"
34
36
  :background="group.action.background"
35
37
  :disabled="group.action.disabled"
36
- @click="group.action.callback($event)"
38
+ @click.stop="
39
+ bringToTop();
40
+ group.action.callback($event);
41
+ "
37
42
  v-bind="{ ...$attrs }"
38
43
  />
39
44
  </div>
@@ -149,7 +154,7 @@
149
154
  const toolboxToggleAction = {
150
155
  name: 'toolboxToggleAction',
151
156
  icon: '$vcsTools',
152
- title: 'Toolbox',
157
+ title: 'toolbox.title',
153
158
  active: true,
154
159
  callback() {
155
160
  this.active = !this.active;
@@ -145,7 +145,7 @@
145
145
  ? createLinkAction(
146
146
  {
147
147
  name: 'info',
148
- title: 'content.infoAction.title',
148
+ title: 'content.helpAction.title',
149
149
  icon: '$vcsHelp',
150
150
  },
151
151
  props.windowState.infoUrl || props.windowState.infoUrlCallback,
@@ -17,7 +17,7 @@ export function isSlotPosition(windowPosition: WindowPosition): boolean;
17
17
  * parentId?: string,
18
18
  * component: import("vue").Component<T>,
19
19
  * headerComponent?: import("vue").Component<T>,
20
- * state? : Partial<WindowState>,
20
+ * state? : WindowStateOptions,
21
21
  * position? : Partial<WindowPositionOptions>,
22
22
  * slot?: WindowSlot,
23
23
  * props?: T,
@@ -28,16 +28,34 @@ export function isSlotPosition(windowPosition: WindowPosition): boolean;
28
28
  * @property {string} [parentId] An optional ID of a parent window for 'dynamicChild' slot. Parent windows with slot dynamicRight are not supported.
29
29
  * @property {import("vue").Component<T, unknown, unknown>} component Main Component which is shown below the header.
30
30
  * @property {import("vue").Component<T, unknown, unknown>} [headerComponent] Replaces the Header Component.
31
- * @property {Partial<WindowState>} [state]
31
+ * @property {WindowStateOptions} [state]
32
32
  * @property {Partial<WindowPositionOptions>} [position] Will be merged with default position for slot
33
33
  * @property {WindowSlot} [slot]
34
34
  * @property {T} [props]
35
35
  * @property {Object} [provides]
36
36
  */
37
+ /**
38
+ * @typedef {T|import('vue').Ref<T>|import('vue').ComputedRef<T>} OptionsOrRef
39
+ * @template T
40
+ */
41
+ /**
42
+ * @typedef {Object} WindowStateOptions
43
+ * @property {OptionsOrRef<boolean>} [hideHeader] be used to not show the header.
44
+ * @property {OptionsOrRef<boolean>} [hidePin] be used to not show the pin button.
45
+ * @property {OptionsOrRef<string|string[]>} [headerTitle] An optional translatable header. If an array is provided all elements are translated and joined afterward.
46
+ * @property {OptionsOrRef<string>} [headerIcon]
47
+ * @property {OptionsOrRef<Array<import("../../actions/actionHelper.js").VcsAction>>} [headerActions]
48
+ * @property {OptionsOrRef<number>} [headerActionsOverflow]
49
+ * @property {OptionsOrRef<string>} [infoUrl] An optional url referencing help or further information on the window's content.
50
+ * @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()
51
+ * @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
52
+ * @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
53
+ */
37
54
  /**
38
55
  * @typedef {Object} WindowState
39
56
  * @property {string} id
40
57
  * @property {string|vcsAppSymbol} owner Owner of the window, set by windowManager on add
58
+ * @property {string|undefined} parentId - the parent of this window
41
59
  * @property {boolean} [hideHeader] be used to not show the header.
42
60
  * @property {boolean} [hidePin] be used to not show the pin button.
43
61
  * @property {string|string[]} [headerTitle] An optional translatable header. If an array is provided all elements are translated and joined afterward.
@@ -134,18 +152,56 @@ export type WindowComponentOptions<T = any> = {
134
152
  parentId?: string;
135
153
  component: import("vue").Component<T>;
136
154
  headerComponent?: import("vue").Component<T>;
137
- state?: Partial<WindowState>;
155
+ state?: WindowStateOptions;
138
156
  position?: Partial<WindowPositionOptions>;
139
157
  slot?: WindowSlot;
140
158
  props?: T;
141
159
  provides?: Record<string, unknown>;
142
160
  };
161
+ export type OptionsOrRef<T> = T | import('vue').Ref<T> | import('vue').ComputedRef<T>;
162
+ export type WindowStateOptions = {
163
+ /**
164
+ * be used to not show the header.
165
+ */
166
+ hideHeader?: OptionsOrRef<boolean> | undefined;
167
+ /**
168
+ * be used to not show the pin button.
169
+ */
170
+ hidePin?: OptionsOrRef<boolean> | undefined;
171
+ /**
172
+ * An optional translatable header. If an array is provided all elements are translated and joined afterward.
173
+ */
174
+ headerTitle?: OptionsOrRef<string | string[]> | undefined;
175
+ headerIcon?: OptionsOrRef<string> | undefined;
176
+ headerActions?: OptionsOrRef<import("../../actions/actionHelper.js").VcsAction[]> | undefined;
177
+ headerActionsOverflow?: OptionsOrRef<number> | undefined;
178
+ /**
179
+ * An optional url referencing help or further information on the window's content.
180
+ */
181
+ infoUrl?: OptionsOrRef<string> | undefined;
182
+ /**
183
+ * 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()
184
+ */
185
+ infoUrlCallback?: OptionsOrRef<() => string> | undefined;
186
+ /**
187
+ * 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
188
+ */
189
+ styles?: Record<string, string> | undefined;
190
+ /**
191
+ * 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
192
+ */
193
+ classes?: string[] | Record<string, string> | undefined;
194
+ };
143
195
  export type WindowState = {
144
196
  id: string;
145
197
  /**
146
198
  * Owner of the window, set by windowManager on add
147
199
  */
148
200
  owner: string | symbol;
201
+ /**
202
+ * - the parent of this window
203
+ */
204
+ parentId: string | undefined;
149
205
  /**
150
206
  * be used to not show the header.
151
207
  */
@@ -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,