@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.
- package/README.md +2 -0
- package/build/buildHelpers.js +1 -1
- package/build/commonViteConfig.js +7 -0
- package/config/aerowest.config.json +12 -2
- package/config/analysis.config.json +17 -0
- package/config/base.config.json +19 -5
- package/config/components-show-case.config.json +53 -0
- package/config/concepts-show-case.config.json +39 -0
- package/config/dev.config.json +164 -105
- package/config/dynamic-layer.config.json +32 -0
- package/config/hello-world.config.json +11 -0
- package/config/projects.config.json +9 -1
- package/config/solar.config.json +65 -0
- package/config/vectorTile.config.json +70 -0
- package/config/www.config.json +34 -13
- package/dist/assets/{cesium-2ec6aae0.js → cesium-00deba88.js} +4672 -4704
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-6f2522e5.js → core-a599e8b6.js} +7932 -7342
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-b0e134cb.js → ol-21bbc740.js} +12206 -11711
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-adeddc7d.css +1 -0
- package/dist/assets/{ui-bf3d1f84.js → ui-adeddc7d.js} +10415 -9588
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-99bf601c.css → vuetify-c0e02f11.css} +1 -1
- package/dist/assets/{vuetify-99bf601c.js → vuetify-c0e02f11.js} +5313 -5294
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +4 -0
- package/index.js +2 -0
- package/lib/olLib.js +6 -0
- package/package.json +12 -12
- package/plugins/@vcmap-show-case/README.md +15 -6
- package/plugins/@vcmap-show-case/category-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/category-tester/src/CollectionComponentOptions.vue +23 -23
- package/plugins/@vcmap-show-case/category-tester/src/FoobarEditor.vue +2 -8
- package/plugins/@vcmap-show-case/collection-manager-example/package.json +1 -1
- package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +10 -8
- package/plugins/@vcmap-show-case/context-menu-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/extent-example/package.json +1 -1
- package/plugins/@vcmap-show-case/flight-component-example/package.json +1 -1
- package/plugins/@vcmap-show-case/form-inputs-example/package.json +1 -1
- package/plugins/@vcmap-show-case/hello-world/package.json +1 -1
- package/plugins/@vcmap-show-case/icons-example/package.json +1 -1
- package/plugins/@vcmap-show-case/notifier-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/panel-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/plugin-editors/package.json +1 -1
- package/plugins/@vcmap-show-case/plugin-editors/src/index.js +17 -6
- package/plugins/@vcmap-show-case/project-selector/package.json +1 -9
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +22 -31
- package/plugins/@vcmap-show-case/project-selector/src/ProjectSelectorComponent.vue +15 -23
- package/plugins/@vcmap-show-case/projection-example/README.md +3 -0
- package/plugins/@vcmap-show-case/projection-example/package.json +5 -0
- package/plugins/@vcmap-show-case/projection-example/src/ProjectionExample.vue +73 -0
- package/plugins/@vcmap-show-case/{table-example → projection-example}/src/index.js +22 -11
- package/plugins/@vcmap-show-case/search-example/package.json +1 -1
- package/plugins/@vcmap-show-case/simple-graph/package.json +1 -4
- package/plugins/@vcmap-show-case/style-input-example/package.json +1 -1
- package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +2 -2
- package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +2 -1
- package/plugins/@vcmap-show-case/switch-map-callback-example/src/index.js +4 -1
- package/plugins/@vcmap-show-case/theming-example/package.json +1 -1
- package/plugins/@vcmap-show-case/toolbox-example/package.json +1 -1
- package/plugins/@vcmap-show-case/vector-properties-example/package.json +1 -1
- package/plugins/@vcmap-show-case/viewpoint-component-example/package.json +1 -1
- package/plugins/@vcmap-show-case/window-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +5 -1
- package/plugins/@vcmap-show-case/wizard-example/package.json +1 -1
- package/plugins/package.json +23 -3
- package/src/actions/flightActions.js +40 -20
- package/src/actions/listActions.d.ts +1 -1
- package/src/actions/listActions.js +1 -1
- package/src/application/VcsApp.vue +3 -0
- package/src/application/VcsApp.vue.d.ts +15 -0
- package/src/application/VcsAttributions.vue +1 -1
- package/src/application/VcsAttributionsFooter.vue +1 -1
- package/src/application/VcsContainer.vue +0 -1
- package/src/application/VcsContainer.vue.d.ts +15 -0
- package/src/application/VcsObliqueFooter.vue +110 -0
- package/src/application/VcsObliqueFooter.vue.d.ts +4 -0
- package/src/application/VcsTextPageFooter.vue +1 -0
- package/src/application/attributionsHelper.js +10 -6
- package/src/components/buttons/VcsButton.vue +2 -2
- package/src/components/buttons/VcsButton.vue.d.ts +1 -1
- package/src/components/buttons/VcsFormButton.vue +2 -2
- package/src/components/buttons/VcsFormButton.vue.d.ts +1 -1
- package/src/components/buttons/VcsToolButton.vue +2 -2
- package/src/components/buttons/VcsToolButton.vue.d.ts +1 -1
- package/src/components/composables.d.ts +2 -2
- package/src/components/composables.js +3 -5
- package/src/components/flight/VcsFlightPlayer.vue +26 -20
- package/src/components/form-inputs-controls/VcsCheckbox.vue +11 -5
- package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +10 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue +23 -3
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsFileInput.vue +3 -3
- package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsLabel.vue +10 -1
- package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/VcsRadio.vue +4 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +2 -2
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +3 -3
- package/src/components/form-inputs-controls/VcsSlider.vue +2 -2
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsTextArea.vue +2 -2
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsTextField.vue +3 -3
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsWizard.vue +2 -2
- package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsWizardStep.vue +2 -2
- package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +3 -3
- package/src/components/import/VcsImportComponent.vue +3 -3
- package/src/components/lists/VcsActionList.vue +1 -1
- package/src/components/lists/VcsList.vue +56 -39
- package/src/components/lists/VcsListItemComponent.vue +14 -12
- package/src/components/lists/VcsListItemComponent.vue.d.ts +5 -28
- package/src/components/lists/VcsTreeview.vue +4 -2
- package/src/components/lists/VcsTreeview.vue.d.ts +1 -1
- package/src/components/notification/VcsHelp.vue +0 -1
- package/src/components/notification/VcsHelpTooltip.vue +48 -0
- package/src/components/notification/VcsHelpTooltip.vue.d.ts +25 -0
- package/src/components/projection/VcsProjection.vue +329 -0
- package/src/components/projection/VcsProjection.vue.d.ts +7 -0
- package/src/components/section/VcsFormSection.vue +0 -1
- package/src/components/section/VcsFormSection.vue.d.ts +1 -1
- package/src/components/tables/VcsDataTable.vue +15 -4
- package/src/components/tables/VcsDataTable.vue.d.ts +13 -2
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +17 -1
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +10 -1
- package/src/components/vector-properties/VcsFeatureTransforms.vue +39 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue.d.ts +2 -1
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +44 -24
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +27 -2
- package/src/components/viewpoint/VcsViewpointComponent.vue +6 -6
- package/src/contentTree/contentTreeCollection.js +12 -1
- package/src/contentTree/obliqueCollectionContentTreeItem.js +6 -1
- package/src/featureInfo/abstractFeatureInfoView.d.ts +9 -0
- package/src/featureInfo/abstractFeatureInfoView.js +20 -3
- package/src/i18n/de.d.ts +93 -39
- package/src/i18n/de.js +68 -22
- package/src/i18n/en.d.ts +93 -39
- package/src/i18n/en.js +64 -18
- package/src/legend/StyleLegendItem.vue +1 -5
- package/src/legend/VcsLegend.vue +9 -10
- package/src/legend/VcsLegend.vue.d.ts +1 -1
- package/src/legend/legendHelper.js +6 -1
- package/src/manager/collectionManager/collectionComponentClass.js +9 -5
- package/src/manager/collectionManager/editorCollectionComponentClass.js +5 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +6 -1
- package/src/manager/toolbox/SelectToolboxComponent.vue +6 -2
- package/src/manager/toolbox/ToolboxManagerComponent.vue +7 -2
- package/src/manager/window/WindowComponentHeader.vue +1 -1
- package/src/manager/window/windowManager.d.ts +59 -3
- package/src/manager/window/windowManager.js +23 -2
- package/src/navigation/MapNavCompass.vue +166 -140
- package/src/navigation/MapNavCompass.vue.d.ts +3 -1
- package/src/navigation/MapNavigation.vue +22 -5
- package/src/navigation/VcsCompass.vue +2 -1
- package/src/navigation/overviewMap.js +4 -1
- package/src/obliqueFallbackWarnings.d.ts +5 -0
- package/src/obliqueFallbackWarnings.js +54 -0
- package/src/styles/main.scss +2 -2
- package/src/uiConfig.d.ts +30 -0
- package/src/uiConfig.js +3 -0
- package/src/vcsUiApp.d.ts +37 -10
- package/src/vcsUiApp.js +4 -0
- package/src/vuePlugins/i18n.js +1 -0
- package/src/vuePlugins/vuetify.js +2 -0
- package/dist/assets/ui-bf3d1f84.css +0 -1
- package/plugins/@vcmap-show-case/buttons-example/README.md +0 -4
- package/plugins/@vcmap-show-case/buttons-example/package.json +0 -5
- package/plugins/@vcmap-show-case/buttons-example/src/ButtonsExample.vue +0 -281
- package/plugins/@vcmap-show-case/buttons-example/src/index.js +0 -51
- package/plugins/@vcmap-show-case/config-editor/README.md +0 -3
- package/plugins/@vcmap-show-case/config-editor/package.json +0 -5
- package/plugins/@vcmap-show-case/config-editor/src/ConfigEditor.vue +0 -62
- package/plugins/@vcmap-show-case/config-editor/src/index.js +0 -49
- package/plugins/@vcmap-show-case/list-example/README.md +0 -3
- package/plugins/@vcmap-show-case/list-example/package.json +0 -5
- package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +0 -403
- package/plugins/@vcmap-show-case/list-example/src/index.js +0 -46
- package/plugins/@vcmap-show-case/table-example/README.md +0 -3
- package/plugins/@vcmap-show-case/table-example/package.json +0 -5
- package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +0 -203
- package/plugins/@vcmap-show-case/textfields-example/README.md +0 -3
- package/plugins/@vcmap-show-case/textfields-example/package.json +0 -5
- package/plugins/@vcmap-show-case/textfields-example/src/TextfieldsExample.vue +0 -115
- package/plugins/@vcmap-show-case/textfields-example/src/index.js +0 -64
- /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").
|
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
|
-
|
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
|
-
|
513
|
-
|
514
|
-
|
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
|
-
|
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="
|
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="
|
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="
|
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: '
|
157
|
+
title: 'toolbox.title',
|
153
158
|
active: true,
|
154
159
|
callback() {
|
155
160
|
this.active = !this.active;
|
@@ -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? :
|
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 {
|
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?:
|
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? :
|
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 {
|
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,
|