@vcmap/ui 5.1.8 → 5.2.1

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 (99) hide show
  1. package/build/buildTypes.js +9 -0
  2. package/config/base.config.json +33 -2
  3. package/config/dev.config.json +22 -2
  4. package/config/www.config.json +16 -0
  5. package/dist/assets/cesium.js +1 -1
  6. package/dist/assets/{core.45041e.js → core.a8552c.js} +4160 -4041
  7. package/dist/assets/core.js +1 -1
  8. package/dist/assets/index-8783569c.js +1 -0
  9. package/dist/assets/ol.js +1 -1
  10. package/dist/assets/{ui.74ba2a.css → ui.aebd62.css} +2 -2
  11. package/dist/assets/{ui.74ba2a.js → ui.aebd62.js} +8031 -6985
  12. package/dist/assets/ui.js +1 -1
  13. package/dist/assets/vue.js +2 -2
  14. package/dist/assets/{vuetify.72ace9.js → vuetify.c8459d.js} +1 -1
  15. package/dist/assets/vuetify.js +2 -2
  16. package/dist/index.html +1 -1
  17. package/index.d.ts +22 -2
  18. package/index.js +29 -1
  19. package/package.json +2 -2
  20. package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +110 -37
  21. package/plugins/@vcmap-show-case/collection-manager-example/src/index.js +4 -0
  22. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +10 -3
  23. package/plugins/@vcmap-show-case/panel-tester/README.md +3 -0
  24. package/plugins/@vcmap-show-case/panel-tester/package.json +5 -0
  25. package/plugins/@vcmap-show-case/panel-tester/src/IframePanelExample.vue +15 -0
  26. package/plugins/@vcmap-show-case/panel-tester/src/ImgPanelExample.vue +19 -0
  27. package/plugins/@vcmap-show-case/panel-tester/src/PanelExample.vue +128 -0
  28. package/plugins/@vcmap-show-case/panel-tester/src/TextPanelExample.vue +34 -0
  29. package/plugins/@vcmap-show-case/panel-tester/src/index.js +63 -0
  30. package/plugins/package.json +7 -3
  31. package/src/actions/actionHelper.js +1 -1
  32. package/src/actions/flightActions.d.ts +38 -2
  33. package/src/actions/flightActions.js +257 -6
  34. package/src/application/VcsApp.vue +4 -104
  35. package/src/application/VcsApp.vue.d.ts +0 -6
  36. package/src/application/VcsContainer.vue +105 -0
  37. package/src/application/VcsContainer.vue.d.ts +14 -0
  38. package/src/application/VcsMainMap.vue +68 -0
  39. package/src/application/VcsMainMap.vue.d.ts +9 -0
  40. package/src/application/markdownHelper.d.ts +7 -0
  41. package/src/application/markdownHelper.js +57 -1
  42. package/src/components/form-inputs-controls/VcsRadioGrid.vue +27 -42
  43. package/src/contentTree/LayerTree.vue +40 -14
  44. package/src/downloadHelper.d.ts +0 -2
  45. package/src/downloadHelper.js +2 -4
  46. package/src/featureInfo/BalloonComponent.vue +31 -3
  47. package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
  48. package/src/featureInfo/IframeComponent.vue +55 -0
  49. package/src/featureInfo/IframeComponent.vue.d.ts +25 -0
  50. package/src/featureInfo/MarkdownBalloonComponent.vue +24 -0
  51. package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +12 -0
  52. package/src/featureInfo/abstractFeatureInfoView.js +54 -22
  53. package/src/featureInfo/addressBalloonFeatureInfoView.d.ts +2 -2
  54. package/src/featureInfo/addressBalloonFeatureInfoView.js +1 -1
  55. package/src/featureInfo/balloonFeatureInfoView.js +1 -1
  56. package/src/featureInfo/balloonHelper.js +16 -9
  57. package/src/featureInfo/featureInfo.js +15 -0
  58. package/src/featureInfo/iframeFeatureInfoView.js +1 -20
  59. package/src/featureInfo/iframeWmsFeatureInfoView.d.ts +41 -0
  60. package/src/featureInfo/iframeWmsFeatureInfoView.js +73 -0
  61. package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +47 -0
  62. package/src/featureInfo/markdownBalloonFeatureInfoView.js +81 -0
  63. package/src/featureInfo/markdownFeatureInfoView.d.ts +47 -0
  64. package/src/featureInfo/markdownFeatureInfoView.js +95 -0
  65. package/src/i18n/de.d.ts +8 -3
  66. package/src/i18n/de.js +3 -0
  67. package/src/i18n/en.d.ts +32 -26
  68. package/src/i18n/en.js +4 -1
  69. package/src/manager/collectionManager/CollectionComponent.vue +12 -49
  70. package/src/manager/collectionManager/CollectionComponent.vue.d.ts +5 -9
  71. package/src/manager/collectionManager/CollectionComponentContent.vue +102 -0
  72. package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +17 -0
  73. package/src/manager/collectionManager/CollectionComponentList.vue +10 -2
  74. package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +9 -0
  75. package/src/manager/collectionManager/CollectionComponentStandalone.vue +91 -0
  76. package/src/manager/collectionManager/CollectionComponentStandalone.vue.d.ts +9 -0
  77. package/src/manager/collectionManager/collectionManager.d.ts +2 -2
  78. package/src/manager/collectionManager/collectionManager.js +21 -19
  79. package/src/manager/panel/PanelComponent.vue +110 -0
  80. package/src/manager/panel/PanelComponent.vue.d.ts +19 -0
  81. package/src/manager/panel/PanelManagerComponent.vue +224 -0
  82. package/src/manager/panel/PanelManagerComponent.vue.d.ts +36 -0
  83. package/src/manager/panel/panelHelper.d.ts +83 -0
  84. package/src/manager/panel/panelHelper.js +272 -0
  85. package/src/manager/panel/panelManager.d.ts +338 -0
  86. package/src/manager/panel/panelManager.js +381 -0
  87. package/src/manager/window/WindowManager.vue +14 -0
  88. package/src/manager/window/windowHelper.js +1 -1
  89. package/src/manager/window/windowManager.js +4 -0
  90. package/src/search/ResultItem.vue +1 -1
  91. package/src/search/search.d.ts +2 -2
  92. package/src/search/search.js +2 -2
  93. package/src/vcsUiApp.d.ts +14 -0
  94. package/src/vcsUiApp.js +23 -1
  95. package/dist/assets/index-3cd5a3f3.js +0 -1
  96. /package/dist/assets/{cesium.035e3a.js → cesium.1b488a.js} +0 -0
  97. /package/dist/assets/{ol.eb3bee.js → ol.7488a7.js} +0 -0
  98. /package/dist/assets/{vue.17a8fa.js → vue.df3538.js} +0 -0
  99. /package/dist/assets/{vuetify.72ace9.css → vuetify.c8459d.css} +0 -0
@@ -0,0 +1,272 @@
1
+ import {
2
+ PanelLocation,
3
+ getPanelPosition,
4
+ setPanelPosition,
5
+ DefaultPanelPositions,
6
+ } from './panelManager.js';
7
+
8
+ /**
9
+ *
10
+ * @type {Partial<import("./panelManager.js").PanelPosition>}
11
+ */
12
+ export const DefaultMainPanelPosition = {
13
+ top: '0px',
14
+ left: '0px',
15
+ right: '0px',
16
+ bottom: '0px',
17
+ width: '100%',
18
+ minWidth: '10%',
19
+ minHeight: '25%',
20
+ };
21
+
22
+ /**
23
+ * @typedef {Object} NumberPanelPosition
24
+ * @property {number?} left - The left CSS property participates in specifying the horizontal position of a panel.
25
+ * @property {number?} top - The top CSS property participates in specifying the vertical position of a panel.
26
+ * @property {number?} right - The right CSS property participates in specifying the horizontal position of a panel.
27
+ * @property {number?} bottom - The bottom CSS property participates in specifying the vertical position of a panel.
28
+ * @property {number} width - The width CSS property sets an element's width.
29
+ * @property {number} height - The height CSS property sets an element's height.
30
+ * @property {number} maxHeight - The maxHeight CSS property sets an element's maximal height.
31
+ * @property {number} maxWidth - The maxWidth CSS property sets an element's maximal width.
32
+ * @property {number} minHeight - The minHeight CSS property sets an element's minimal height.
33
+ * @property {number} minWidth - The minWidth CSS property sets an element's minimal width.
34
+ */
35
+ /**
36
+ * Parses a position to numeric percentage value (0-100). Non-numeric values return undefined.
37
+ * @param {string|number|undefined} pos
38
+ * @param {string} key - one of PanelPosition keys
39
+ * @param {DOMRect} targetSize - size of the current target
40
+ * @returns {number|undefined}
41
+ */
42
+ export function posToRelativeTarget(pos, key, targetSize) {
43
+ if (typeof pos === 'string') {
44
+ if (pos.match(/^-?\d+\.?\d*px$/)) {
45
+ const scalar = [
46
+ 'bottom',
47
+ 'top',
48
+ 'height',
49
+ 'minHeight',
50
+ 'maxHeight',
51
+ ].includes(key)
52
+ ? targetSize?.height
53
+ : targetSize?.width;
54
+ return (parseInt(pos, 10) / scalar) * 100;
55
+ } else if (targetSize && pos.match(/^-?\d+\.?\d*%$/)) {
56
+ return parseInt(pos, 10);
57
+ }
58
+ return undefined;
59
+ }
60
+ return pos;
61
+ }
62
+
63
+ /**
64
+ * Parses CSS position string properties to percentage numeric position properties
65
+ * @param {Partial<import("./panelManager.js").PanelPosition>} panelPosition
66
+ * @param {DOMRect} targetSize - the map's target size
67
+ * @returns {NumberPanelPosition}
68
+ */
69
+ export function percentageFromPanelOptions(panelPosition, targetSize) {
70
+ const options = {};
71
+ Object.keys(panelPosition).forEach((key) => {
72
+ if (panelPosition[key] !== undefined) {
73
+ options[key] = posToRelativeTarget(panelPosition[key], key, targetSize);
74
+ }
75
+ });
76
+ return options;
77
+ }
78
+
79
+ /**
80
+ * Returns the maximum permitted width of a panel as a function of the main panel minWidth and other active side panel width
81
+ * @param {Partial<import("./panelManager.js").PanelPosition>} main
82
+ * @param {Partial<import("./panelManager.js").PanelPosition>} side
83
+ * @param {DOMRect} targetSize
84
+ * @returns {number}
85
+ */
86
+ function getMaxWidth(main, side, targetSize) {
87
+ const maxWidth =
88
+ 100 - posToRelativeTarget(main.minWidth, 'minWidth', targetSize);
89
+ if (side) {
90
+ return maxWidth - posToRelativeTarget(side.width, 'width', targetSize);
91
+ }
92
+ return maxWidth;
93
+ }
94
+
95
+ /**
96
+ * Updates side panel width and height
97
+ * Sets new main panel width depending on side panel
98
+ * @param {'left'|'right'} key
99
+ * @param {Partial<import("./panelManager.js").PanelComponent>} panel
100
+ * @param {Partial<NumberPanelPosition>} main
101
+ * @param {Partial<NumberPanelPosition>} side
102
+ * @param {DOMRect} targetSize
103
+ * @returns {Partial<import("./panelManager.js").PanelPosition>}
104
+ */
105
+ function handleSidePanel(key, panel, main, side, targetSize) {
106
+ const toUpdate = {};
107
+ if (panel.state.resizable) {
108
+ const position = percentageFromPanelOptions(
109
+ getPanelPosition(panel),
110
+ targetSize,
111
+ );
112
+ if (side.maxWidth !== position.maxWidth) {
113
+ position.maxWidth = side.maxWidth;
114
+ toUpdate.maxWidth = `${side.maxWidth}%`;
115
+ }
116
+
117
+ const width = Math.max(
118
+ position.minWidth,
119
+ Math.min(position.width, position.maxWidth),
120
+ );
121
+ main.width -= width;
122
+ main[key] = width;
123
+
124
+ if (width !== position.width) {
125
+ toUpdate.width = `${width}%`;
126
+ }
127
+ if (position.height !== side.height) {
128
+ toUpdate.height = `${side.height}%`;
129
+ }
130
+ }
131
+ return toUpdate;
132
+ }
133
+
134
+ /**
135
+ * Updates size of main panel according to other active panels
136
+ * @param {import("./panelManager.js").default} panelManager
137
+ * @param {Partial<import("./panelManager.js").PanelComponent>} mainPanel
138
+ * @param {DOMRect} targetSize
139
+ * @param {string|undefined} resizeKey
140
+ */
141
+ export function updatePanelSizes(
142
+ panelManager,
143
+ mainPanel,
144
+ targetSize,
145
+ resizeKey = undefined,
146
+ ) {
147
+ const defaultMain = percentageFromPanelOptions(
148
+ DefaultMainPanelPosition,
149
+ targetSize,
150
+ );
151
+ const defaultSide = {
152
+ height: 100,
153
+ };
154
+
155
+ if (panelManager.hasLocation(PanelLocation.BOTTOM)) {
156
+ const bottomPanelPosition = getPanelPosition(
157
+ panelManager.getLocation(PanelLocation.BOTTOM),
158
+ );
159
+ const bottomHeight = Math.max(
160
+ posToRelativeTarget(
161
+ bottomPanelPosition.minHeight,
162
+ 'minHeight',
163
+ targetSize,
164
+ ),
165
+ Math.min(
166
+ posToRelativeTarget(bottomPanelPosition.height, 'height', targetSize),
167
+ posToRelativeTarget(
168
+ bottomPanelPosition.maxHeight,
169
+ 'maxHeight',
170
+ targetSize,
171
+ ),
172
+ ),
173
+ );
174
+ defaultMain.bottom += bottomHeight;
175
+ defaultSide.height -= bottomHeight;
176
+ }
177
+
178
+ const leftPanel = panelManager.getLocation(PanelLocation.LEFT);
179
+ const leftWidth =
180
+ posToRelativeTarget(
181
+ getPanelPosition(leftPanel)?.width,
182
+ 'width',
183
+ targetSize,
184
+ ) || 0;
185
+
186
+ const rightPanel = panelManager.getLocation(PanelLocation.RIGHT);
187
+ const rightWidth =
188
+ posToRelativeTarget(
189
+ getPanelPosition(rightPanel)?.width,
190
+ 'width',
191
+ targetSize,
192
+ ) || 0;
193
+
194
+ const left = {
195
+ maxWidth: DefaultPanelPositions[PanelLocation.LEFT].maxWidth,
196
+ };
197
+
198
+ const right = {
199
+ maxWidth: DefaultPanelPositions[PanelLocation.RIGHT].maxWidth,
200
+ };
201
+
202
+ const maxWidth = getMaxWidth(defaultMain, undefined, targetSize);
203
+ if (
204
+ panelManager.hasLocation(PanelLocation.LEFT) &&
205
+ panelManager.hasLocation(PanelLocation.RIGHT) &&
206
+ leftWidth + rightWidth > maxWidth
207
+ ) {
208
+ if (leftWidth > maxWidth / 2 && rightWidth > maxWidth / 2) {
209
+ left.maxWidth = maxWidth / 2;
210
+ right.maxWidth = maxWidth / 2;
211
+ } else if (leftWidth > maxWidth / 2) {
212
+ left.maxWidth = maxWidth - rightWidth;
213
+ right.maxWidth = rightWidth;
214
+ } else if (rightWidth > maxWidth / 2) {
215
+ right.maxWidth = maxWidth - leftWidth;
216
+ left.maxWidth = leftWidth;
217
+ }
218
+ } else {
219
+ left.maxWidth = getMaxWidth(
220
+ defaultMain,
221
+ getPanelPosition(rightPanel),
222
+ targetSize,
223
+ );
224
+ right.maxWidth = getMaxWidth(
225
+ defaultMain,
226
+ getPanelPosition(leftPanel),
227
+ targetSize,
228
+ );
229
+ }
230
+
231
+ if (panelManager.hasLocation(PanelLocation.LEFT) && resizeKey !== 'right') {
232
+ const updatedLeft = handleSidePanel(
233
+ 'left',
234
+ leftPanel,
235
+ defaultMain,
236
+ {
237
+ ...defaultSide,
238
+ ...left,
239
+ },
240
+ targetSize,
241
+ );
242
+ setPanelPosition(leftPanel, updatedLeft);
243
+ }
244
+ if (panelManager.hasLocation(PanelLocation.RIGHT) && resizeKey !== 'left') {
245
+ const updatedRight = handleSidePanel(
246
+ 'right',
247
+ rightPanel,
248
+ defaultMain,
249
+ {
250
+ ...defaultSide,
251
+ ...right,
252
+ },
253
+ targetSize,
254
+ );
255
+ setPanelPosition(rightPanel, updatedRight);
256
+ }
257
+
258
+ const main = percentageFromPanelOptions(
259
+ getPanelPosition(mainPanel),
260
+ targetSize,
261
+ );
262
+
263
+ const toUpdate = Object.keys(defaultMain).reduce((acc, key) => {
264
+ if (defaultMain[key] !== main[key]) {
265
+ acc[key] = `${defaultMain[key]}%`;
266
+ }
267
+ return acc;
268
+ }, {});
269
+ if (Object.keys(toUpdate).length > 0) {
270
+ setPanelPosition(mainPanel, toUpdate);
271
+ }
272
+ }
@@ -0,0 +1,338 @@
1
+ /**
2
+ * @typedef {Object} PanelComponentOptions
3
+ * @property {string} [id] - Optional id, which will be set as HTML container ID. If not provided an uuid will be generated.
4
+ * @property {import("vue").Component} [component] Optional component to be rendered in the panel.
5
+ * @property {Partial<PanelState>} [state]
6
+ * @property {Partial<VerticalPanelPositionOptions|HorizontalPanelPositionOptions>} [position] Will be merged with default position for panel
7
+ * @property {Object} [props]
8
+ * @property {Object} [provides]
9
+ */
10
+ /**
11
+ * @typedef {Object} PanelState
12
+ * @property {string} id
13
+ * @property {string|vcsAppSymbol} owner Owner of the panel, set by panelManager on add
14
+ * @property {PanelLocation} location Location of the panel, set by panelManager on add
15
+ * @property {boolean} [resizable=true] Whether size of panel can be adapted
16
+ * @property {Object<string, string>} [styles] Can be used to add additional styles to the root PanelComponent. Use Vue Style Bindings Object Syntax https://vuejs.org/v2/guide/class-and-style.html
17
+ * @property {Array<string>|Object<string,string>} [classes] Can be used to add additional classes to the root PanelComponent. Use Vue Class Bindings Syntax https://vuejs.org/v2/guide/class-and-style.html
18
+ */
19
+ /**
20
+ * @typedef {Object} PanelComponent
21
+ * @property {string} id
22
+ * @property {import("vue").Component} component
23
+ * @property {Partial<PanelState>} state
24
+ * @property {Object} props
25
+ * @property {Object} provides
26
+ */
27
+ /**
28
+ * @param {Partial<PanelComponent>} panelComponent
29
+ * @returns {PanelPosition|undefined}
30
+ */
31
+ export function getPanelPosition(panelComponent: Partial<PanelComponent>): PanelPosition | undefined;
32
+ /**
33
+ * @param {PanelComponent} panelComponent
34
+ * @param {Partial<PanelPosition>} panelPosition
35
+ */
36
+ export function setPanelPosition(panelComponent: PanelComponent, panelPosition: Partial<PanelPosition>): void;
37
+ export const panelLocationSymbol: unique symbol;
38
+ export const panelPositionSymbol: unique symbol;
39
+ /**
40
+ * *
41
+ */
42
+ export type PanelLocation = string;
43
+ export namespace PanelLocation {
44
+ let LEFT: string;
45
+ let RIGHT: string;
46
+ let BOTTOM: string;
47
+ }
48
+ /**
49
+ * *
50
+ */
51
+ export type DefaultPanelPositions = Partial<PanelPosition>;
52
+ /**
53
+ * @typedef {Object} VerticalPanelPositionOptions
54
+ * @property {string} [width] Can be a css position string (e.g. '320px' or '50%')
55
+ * @property {string} [maxWidth] Can be a css position string (e.g. '320px' or '50%')
56
+ * @property {string} [minWidth] Can be a css position string (e.g. '320px' or '50%')
57
+ */
58
+ /**
59
+ * @typedef {Object} HorizontalPanelPositionOptions
60
+ * @property {string} [height] Can be a css position string (e.g. '320px' or '50%')
61
+ * @property {string} [maxHeight] Can be a css position string (e.g. '320px' or '50%')
62
+ * @property {string} [minHeight] Can be a css position string (e.g. '320px' or '50%')
63
+ */
64
+ /**
65
+ * @typedef {Object} PanelPosition
66
+ * @property {string?} left - The left CSS property participates in specifying the horizontal position of a panel.
67
+ * @property {string?} top - The top CSS property participates in specifying the vertical position of a panel.
68
+ * @property {string?} right - The right CSS property participates in specifying the horizontal position of a panel.
69
+ * @property {string?} bottom - The bottom CSS property participates in specifying the vertical position of a panel.
70
+ * @property {string} width - The width CSS property sets an element's width.
71
+ * @property {string} height - The height CSS property sets an element's height.
72
+ * @property {string} maxHeight - The maxHeight CSS property sets an element's maximal height.
73
+ * @property {string} maxWidth - The maxWidth CSS property sets an element's maximal width.
74
+ * @property {string} minHeight - The minHeight CSS property sets an element's minimal height.
75
+ * @property {string} minWidth - The minWidth CSS property sets an element's minimal width.
76
+ */
77
+ /**
78
+ * @readonly
79
+ * @enum {Partial<PanelPosition>}
80
+ * @private
81
+ */
82
+ export const DefaultPanelPositions: {
83
+ [x: string]: {
84
+ left: string;
85
+ width: string;
86
+ minWidth: string;
87
+ height: string;
88
+ right?: undefined;
89
+ bottom?: undefined;
90
+ minHeight?: undefined;
91
+ maxHeight?: undefined;
92
+ } | {
93
+ right: string;
94
+ width: string;
95
+ minWidth: string;
96
+ height: string;
97
+ left?: undefined;
98
+ bottom?: undefined;
99
+ minHeight?: undefined;
100
+ maxHeight?: undefined;
101
+ } | {
102
+ bottom: string;
103
+ width: string;
104
+ height: string;
105
+ minHeight: string;
106
+ maxHeight: string;
107
+ left?: undefined;
108
+ minWidth?: undefined;
109
+ right?: undefined;
110
+ };
111
+ };
112
+ export default PanelManager;
113
+ export type PanelComponentOptions = {
114
+ /**
115
+ * - Optional id, which will be set as HTML container ID. If not provided an uuid will be generated.
116
+ */
117
+ id?: string | undefined;
118
+ /**
119
+ * Optional component to be rendered in the panel.
120
+ */
121
+ component?: import("vue").Component<import("vue/types/options.js").DefaultData<never>, import("vue/types/options.js").DefaultMethods<never>, import("vue/types/options.js").DefaultComputed, import("vue/types/options.js").DefaultProps, {}> | undefined;
122
+ state?: Partial<PanelState> | undefined;
123
+ /**
124
+ * Will be merged with default position for panel
125
+ */
126
+ position?: Partial<VerticalPanelPositionOptions | HorizontalPanelPositionOptions> | undefined;
127
+ props?: Object | undefined;
128
+ provides?: Object | undefined;
129
+ };
130
+ export type PanelState = {
131
+ id: string;
132
+ /**
133
+ * Owner of the panel, set by panelManager on add
134
+ */
135
+ owner: string | symbol;
136
+ /**
137
+ * Location of the panel, set by panelManager on add
138
+ */
139
+ location: PanelLocation;
140
+ /**
141
+ * Whether size of panel can be adapted
142
+ */
143
+ resizable?: boolean | undefined;
144
+ /**
145
+ * Can be used to add additional styles to the root PanelComponent. Use Vue Style Bindings Object Syntax https://vuejs.org/v2/guide/class-and-style.html
146
+ */
147
+ styles?: {
148
+ [x: string]: string;
149
+ } | undefined;
150
+ /**
151
+ * Can be used to add additional classes to the root PanelComponent. Use Vue Class Bindings Syntax https://vuejs.org/v2/guide/class-and-style.html
152
+ */
153
+ classes?: string[] | {
154
+ [x: string]: string;
155
+ } | undefined;
156
+ };
157
+ export type PanelComponent = {
158
+ id: string;
159
+ component: import("vue").Component;
160
+ state: Partial<PanelState>;
161
+ props: Object;
162
+ provides: Object;
163
+ };
164
+ export type VerticalPanelPositionOptions = {
165
+ /**
166
+ * Can be a css position string (e.g. '320px' or '50%')
167
+ */
168
+ width?: string | undefined;
169
+ /**
170
+ * Can be a css position string (e.g. '320px' or '50%')
171
+ */
172
+ maxWidth?: string | undefined;
173
+ /**
174
+ * Can be a css position string (e.g. '320px' or '50%')
175
+ */
176
+ minWidth?: string | undefined;
177
+ };
178
+ export type HorizontalPanelPositionOptions = {
179
+ /**
180
+ * Can be a css position string (e.g. '320px' or '50%')
181
+ */
182
+ height?: string | undefined;
183
+ /**
184
+ * Can be a css position string (e.g. '320px' or '50%')
185
+ */
186
+ maxHeight?: string | undefined;
187
+ /**
188
+ * Can be a css position string (e.g. '320px' or '50%')
189
+ */
190
+ minHeight?: string | undefined;
191
+ };
192
+ export type PanelPosition = {
193
+ /**
194
+ * - The left CSS property participates in specifying the horizontal position of a panel.
195
+ */
196
+ left: string | null;
197
+ /**
198
+ * - The top CSS property participates in specifying the vertical position of a panel.
199
+ */
200
+ top: string | null;
201
+ /**
202
+ * - The right CSS property participates in specifying the horizontal position of a panel.
203
+ */
204
+ right: string | null;
205
+ /**
206
+ * - The bottom CSS property participates in specifying the vertical position of a panel.
207
+ */
208
+ bottom: string | null;
209
+ /**
210
+ * - The width CSS property sets an element's width.
211
+ */
212
+ width: string;
213
+ /**
214
+ * - The height CSS property sets an element's height.
215
+ */
216
+ height: string;
217
+ /**
218
+ * - The maxHeight CSS property sets an element's maximal height.
219
+ */
220
+ maxHeight: string;
221
+ /**
222
+ * - The maxWidth CSS property sets an element's maximal width.
223
+ */
224
+ maxWidth: string;
225
+ /**
226
+ * - The minHeight CSS property sets an element's minimal height.
227
+ */
228
+ minHeight: string;
229
+ /**
230
+ * - The minWidth CSS property sets an element's minimal width.
231
+ */
232
+ minWidth: string;
233
+ };
234
+ export type IPanelManager = import("../../vcsUiApp.js").VcsComponentManager<PanelComponent, PanelComponentOptions>;
235
+ /**
236
+ * @typedef {import("../../vcsUiApp.js").VcsComponentManager<PanelComponent,PanelComponentOptions>} IPanelManager
237
+ */
238
+ /**
239
+ * @class PanelManager
240
+ * @description Manages a set of Panels
241
+ * @implements {IPanelManager}
242
+ */
243
+ declare class PanelManager implements IPanelManager {
244
+ /**
245
+ * @type {import("@vcmap/core").VcsEvent<PanelComponent>}
246
+ */
247
+ added: import("@vcmap/core").VcsEvent<PanelComponent>;
248
+ /**
249
+ * @type {import("@vcmap/core").VcsEvent<PanelComponent>}
250
+ */
251
+ removed: import("@vcmap/core").VcsEvent<PanelComponent>;
252
+ /**
253
+ * reactive ordered array of ids,
254
+ * @type {Array<string>}
255
+ */
256
+ componentIds: Array<string>;
257
+ /**
258
+ * @type {Map<PanelLocation, string>}
259
+ * @private
260
+ */
261
+ private _panelLocations;
262
+ /**
263
+ * @type {Map<string, PanelComponent>}
264
+ * @private
265
+ */
266
+ private _panelComponents;
267
+ /**
268
+ * @type {Map<string, PanelPosition>}
269
+ * @private
270
+ */
271
+ private _panelPositionsCache;
272
+ /**
273
+ * @param {string} id
274
+ * @returns {PanelComponent}
275
+ */
276
+ get(id: string): PanelComponent;
277
+ /**
278
+ * @param {string} id
279
+ * @returns {boolean}
280
+ */
281
+ has(id: string): boolean;
282
+ /**
283
+ *
284
+ * @param {PanelLocation} location
285
+ * @returns {PanelComponent}
286
+ */
287
+ getLocation(location: PanelLocation): PanelComponent;
288
+ /**
289
+ *
290
+ * @param {PanelLocation} location
291
+ * @returns {boolean}
292
+ */
293
+ hasLocation(location: PanelLocation): boolean;
294
+ /**
295
+ *
296
+ * @param {PanelLocation} location
297
+ */
298
+ removePanelAtLocation(location: PanelLocation): void;
299
+ /**
300
+ * @param {string} id
301
+ * @returns {Partial<PanelPosition>|undefined}
302
+ */
303
+ getCachedPosition(id: string): Partial<PanelPosition> | undefined;
304
+ /**
305
+ * removes a panel, Component will not be rendered anymore and will be destroyed. Add PanelComponent again
306
+ * to show the component again
307
+ * @param {string} id
308
+ */
309
+ remove(id: string): void;
310
+ /**
311
+ * Set width for LEFT and RIGHT or height for BOTTOM panels
312
+ * @param {string} id
313
+ * @param {VerticalPanelPositionOptions|HorizontalPanelPositionOptions} panelPositionOptions
314
+ */
315
+ setPanelPosition(id: string, panelPositionOptions: VerticalPanelPositionOptions | HorizontalPanelPositionOptions): void;
316
+ /**
317
+ * adds a panelComponent to the PanelManager and renders the Panel
318
+ * @param {PanelComponentOptions|PanelComponent} panelComponentOptions
319
+ * @param {string|symbol} owner pluginName or vcsAppSymbol
320
+ * @param {PanelLocation} location panel render position
321
+ * @returns {PanelComponent}
322
+ */
323
+ // @ts-ignore
324
+ add(panelComponentOptions: PanelComponentOptions | PanelComponent, owner: string | symbol, location: PanelLocation): PanelComponent;
325
+ /**
326
+ * removes all panelComponents of a specific owner (plugin) and fires removed Events
327
+ * @param {string|vcsAppSymbol} owner
328
+ */
329
+ removeOwner(owner: string | symbol): void;
330
+ /**
331
+ * removes all panelComponents and fires removed Events
332
+ */
333
+ clear(): void;
334
+ /**
335
+ * destroys the panelManager;
336
+ */
337
+ destroy(): void;
338
+ }