@vcmap/ui 5.2.0 → 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.
package/dist/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui.895896.js";
1
+ export * from "./ui.aebd62.js";
@@ -1,5 +1,5 @@
1
- export * from "./vue.4b3319.js";
2
- import { default as f } from "./vue.4b3319.js";
1
+ export * from "./vue.df3538.js";
2
+ import { default as f } from "./vue.df3538.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.1621f3.css');import v from "./vue.4b3319.js";
16
+ } await loadCss('./assets/vuetify.c8459d.css');import v from "./vue.df3538.js";
17
17
  const Ne = v.extend().extend({
18
18
  name: "themeable",
19
19
  provide() {
@@ -1,5 +1,5 @@
1
- export * from "./vuetify.1621f3.js";
2
- import { default as f } from "./vuetify.1621f3.js";
1
+ export * from "./vuetify.c8459d.js";
2
+ import { default as f } from "./vuetify.c8459d.js";
3
3
  export {
4
4
  f as default
5
5
  };
package/dist/index.html CHANGED
@@ -95,7 +95,7 @@
95
95
  }
96
96
  }
97
97
  </style>
98
- <script type="module" crossorigin src="./assets/index-76acacac.js"></script>
98
+ <script type="module" crossorigin src="./assets/index-8783569c.js"></script>
99
99
  </head>
100
100
  <body style="height: 100vh; margin: 0;">
101
101
  <noscript>
package/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  export { default as StyleSelector } from "./src/actions/StyleSelector.vue";
2
2
  export type * from "./src/actions/StyleSelector.vue.d.ts";
3
- export { parseAndSanitizeMarkdown } from "./src/application/markdownHelper.js";
4
- export type * from "./src/application/markdownHelper.d.ts";
5
3
  export { default as ActivateLayersCallback } from "./src/callback/activateLayersCallback.js";
6
4
  export type * from "./src/callback/activateLayersCallback.d.ts";
7
5
  export { default as DeactivateLayersCallback } from "./src/callback/deactivateLayersCallback.js";
@@ -76,8 +74,12 @@ export { default as BalloonComponent } from "./src/featureInfo/BalloonComponent.
76
74
  export type * from "./src/featureInfo/BalloonComponent.vue.d.ts";
77
75
  export { default as AddressBalloonComponent } from "./src/featureInfo/AddressBalloonComponent.vue";
78
76
  export type * from "./src/featureInfo/AddressBalloonComponent.vue.d.ts";
77
+ export { default as IframeComponent } from "./src/featureInfo/IframeComponent.vue";
78
+ export type * from "./src/featureInfo/IframeComponent.vue.d.ts";
79
79
  export { default as IframeFeatureInfoView } from "./src/featureInfo/iframeFeatureInfoView.js";
80
80
  export type * from "./src/featureInfo/iframeFeatureInfoView.d.ts";
81
+ export { default as IframeWmsFeatureInfoView } from "./src/featureInfo/iframeWmsFeatureInfoView.js";
82
+ export type * from "./src/featureInfo/iframeWmsFeatureInfoView.d.ts";
81
83
  export { default as TableFeatureInfoView } from "./src/featureInfo/tableFeatureInfoView.js";
82
84
  export type * from "./src/featureInfo/tableFeatureInfoView.d.ts";
83
85
  export { default as MarkdownFeatureInfoView } from "./src/featureInfo/markdownFeatureInfoView.js";
@@ -206,6 +208,8 @@ export { default as ImportComponent } from "./src/components/import/ImportCompon
206
208
  export type * from "./src/components/import/ImportComponent.vue.d.ts";
207
209
  export { createMapButtonAction, createToggleAction, createOverviewMapAction, createModalAction, createLinkAction, createGoToViewpointAction, createZoomToFeatureAction } from "./src/actions/actionHelper.js";
208
210
  export type * from "./src/actions/actionHelper.d.ts";
211
+ export { parseAndSanitizeMarkdown, replaceAttributes } from "./src/application/markdownHelper.js";
212
+ export type * from "./src/application/markdownHelper.d.ts";
209
213
  export { createStateRefAction, StateActionState } from "./src/actions/stateRefAction.js";
210
214
  export type * from "./src/actions/stateRefAction.d.ts";
211
215
  export { createLayerToggleAction, createZoomToExtentAction, createExtentFeatureAction, setupExtentComponentActions } from "./src/actions/extentActions.js";
package/index.js CHANGED
@@ -11,7 +11,10 @@ export {
11
11
  createGoToViewpointAction,
12
12
  createZoomToFeatureAction,
13
13
  } from './src/actions/actionHelper.js';
14
- export { parseAndSanitizeMarkdown } from './src/application/markdownHelper.js';
14
+ export {
15
+ parseAndSanitizeMarkdown,
16
+ replaceAttributes,
17
+ } from './src/application/markdownHelper.js';
15
18
  export {
16
19
  createStateRefAction,
17
20
  StateActionState,
@@ -164,7 +167,9 @@ export {
164
167
  } from './src/featureInfo/balloonHelper.js';
165
168
  export { default as BalloonComponent } from './src/featureInfo/BalloonComponent.vue';
166
169
  export { default as AddressBalloonComponent } from './src/featureInfo/AddressBalloonComponent.vue';
170
+ export { default as IframeComponent } from './src/featureInfo/IframeComponent.vue';
167
171
  export { default as IframeFeatureInfoView } from './src/featureInfo/iframeFeatureInfoView.js';
172
+ export { default as IframeWmsFeatureInfoView } from './src/featureInfo/iframeWmsFeatureInfoView.js';
168
173
  export { default as TableFeatureInfoView } from './src/featureInfo/tableFeatureInfoView.js';
169
174
  export { default as MarkdownFeatureInfoView } from './src/featureInfo/markdownFeatureInfoView.js';
170
175
  export { default as MarkdownBalloonFeatureInfoView } from './src/featureInfo/markdownBalloonFeatureInfoView.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -7,13 +7,17 @@
7
7
  "@vcmap/draw": "^2.0.0",
8
8
  "@vcmap/create-link": "^1.0.1",
9
9
  "@vcmap/search-nominatim": "^1.0.1",
10
- "@vcmap/multi-view": "^1.0.1",
10
+ "@vcmap/multi-view": "^1.1.0",
11
11
  "@vcmap/cesium-filters": "^1.0.1",
12
12
  "@vcmap/viewshed": "^2.0.1",
13
13
  "@vcmap/measurement": "^1.0.2",
14
- "@vcmap/flight": "^1.0.1"
14
+ "@vcmap/flight": "^1.1.0",
15
+ "@vcmap/transparent-terrain": "^1.0.1",
16
+ "@vcmap/search-coordinate": "^1.0.0",
17
+ "@vcmap/clipping-tool": "^1.0.0",
18
+ "@vcmap/height-profile": "^1.0.0"
15
19
  },
16
20
  "optionalDependencies": {
17
- "@vcmap/planning": "^5.0.1"
21
+ "@vcmap/planning": "^5.1.0"
18
22
  }
19
23
  }
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <iframe :src="src" :title="title" :style="{ height, width }" />
3
+ </template>
4
+ <script>
5
+ import { inject } from 'vue';
6
+ import {
7
+ getTargetSize,
8
+ posToNumber,
9
+ } from '../manager/window/windowHelper.js';
10
+
11
+ /**
12
+ * @description An iframe component
13
+ * @vue-prop {string} src - Specifies the address of the document to embed in the <iframe>
14
+ * @vue-prop {string} [title] - optional title for the <iframe>
15
+ */
16
+ export default {
17
+ name: 'IframeComponent',
18
+ props: {
19
+ src: {
20
+ type: String,
21
+ required: true,
22
+ },
23
+ title: {
24
+ type: String,
25
+ default: undefined,
26
+ },
27
+ },
28
+ setup(props, { attrs }) {
29
+ const app = inject('vcsApp');
30
+ let { height, width } = app.windowManager.get(
31
+ attrs['window-state'].id,
32
+ ).position;
33
+
34
+ // set iframe size to absolute px values
35
+ if (app.maps.target) {
36
+ const targetSize = getTargetSize(app.maps.target);
37
+ const heightNumber = posToNumber(height, 'height', targetSize);
38
+ if (heightNumber) {
39
+ height = `${heightNumber - 36}px`; // 32px header height + 4px margin
40
+ }
41
+ const widthNumber = posToNumber(width, 'width', targetSize);
42
+ if (widthNumber) {
43
+ width = `${widthNumber}px`;
44
+ }
45
+ }
46
+
47
+ return {
48
+ height,
49
+ width,
50
+ };
51
+ },
52
+ };
53
+ </script>
54
+
55
+ <style scoped></style>
@@ -0,0 +1,25 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ src: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ title: {
7
+ type: StringConstructor;
8
+ default: undefined;
9
+ };
10
+ }, {
11
+ height: any;
12
+ width: any;
13
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
14
+ src: {
15
+ type: StringConstructor;
16
+ required: true;
17
+ };
18
+ title: {
19
+ type: StringConstructor;
20
+ default: undefined;
21
+ };
22
+ }>>, {
23
+ title: string;
24
+ }>;
25
+ export default _default;
@@ -34,6 +34,7 @@ import MarkdownFeatureInfoView from './markdownFeatureInfoView.js';
34
34
  import { getDefaultPrimaryColor } from '../vuePlugins/vuetify.js';
35
35
  import { ToolboxType } from '../manager/toolbox/toolboxManager.js';
36
36
  import MarkdownBalloonFeatureInfoView from './markdownBalloonFeatureInfoView.js';
37
+ import IframeWmsFeatureInfoView from './iframeWmsFeatureInfoView.js';
37
38
 
38
39
  /** @typedef {import("ol").Feature|import("@vcmap-cesium/engine").Cesium3DTileFeature|import("@vcmap-cesium/engine").Cesium3DTilePointFeature|import("@vcmap-cesium/engine").Entity} FeatureType */
39
40
 
@@ -512,6 +513,10 @@ featureInfoClassRegistry.registerClass(
512
513
  IframeFeatureInfoView.className,
513
514
  IframeFeatureInfoView,
514
515
  );
516
+ featureInfoClassRegistry.registerClass(
517
+ IframeWmsFeatureInfoView.className,
518
+ IframeWmsFeatureInfoView,
519
+ );
515
520
  featureInfoClassRegistry.registerClass(
516
521
  BalloonFeatureInfoView.className,
517
522
  BalloonFeatureInfoView,
@@ -1,24 +1,5 @@
1
1
  import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
2
-
3
- /**
4
- * @description An iframe component
5
- * @vue-prop {string} src - Specifies the address of the document to embed in the <iframe>
6
- * @vue-prop {string} [title] - optional title for the <iframe>
7
- */
8
- const IframeComponent = {
9
- name: 'IframeComponent',
10
- props: {
11
- src: {
12
- type: String,
13
- required: true,
14
- },
15
- title: {
16
- type: String,
17
- default: undefined,
18
- },
19
- },
20
- template: '<iframe :src="src" :title="title" />',
21
- };
2
+ import IframeComponent from './IframeComponent.vue';
22
3
 
23
4
  /**
24
5
  * @typedef {import("./abstractFeatureInfoView.js").FeatureInfoViewOptions & { src: string, title?: string }} IframeFeatureInfoViewOptions
@@ -0,0 +1,41 @@
1
+ export default IframeWmsFeatureInfoView;
2
+ export type IframeWmsFeatureInfoViewOptions = import("./abstractFeatureInfoView.js").FeatureInfoViewOptions & {
3
+ infoFormat: string;
4
+ title?: string;
5
+ };
6
+ /**
7
+ * @typedef {import("./abstractFeatureInfoView.js").FeatureInfoViewOptions & { infoFormat: string, title?: string }} IframeWmsFeatureInfoViewOptions
8
+ * @property {string} infoFormat - Specifies the response format of WMS GetFeatureInfo
9
+ * @property {string} [title] - optional title for the <iframe>
10
+ */
11
+ /**
12
+ * @class
13
+ * @description An iframe view.
14
+ * @extends {AbstractFeatureInfoView}
15
+ */
16
+ declare class IframeWmsFeatureInfoView extends AbstractFeatureInfoView {
17
+ /**
18
+ * @param {IframeWmsFeatureInfoViewOptions} options
19
+ */
20
+ constructor(options: IframeWmsFeatureInfoViewOptions);
21
+ /**
22
+ * @type {string}
23
+ */
24
+ infoFormat: string;
25
+ /**
26
+ * @type {string|undefined}
27
+ */
28
+ title: string | undefined;
29
+ /**
30
+ * Gets feature info from WMS GetFeatureInfo in html/text format
31
+ * @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
32
+ * @param {import("@vcmap/core").WMSLayer} layer
33
+ * @returns {import("./iframeFeatureInfoView.js").IframeFeatureInfoViewProps}
34
+ */
35
+ getProperties(featureInfo: import("./featureInfo.js").FeatureInfoEvent, layer: import("@vcmap/core").WMSLayer): import("./iframeFeatureInfoView.js").IframeFeatureInfoViewProps;
36
+ /**
37
+ * @returns {IframeWmsFeatureInfoViewOptions}
38
+ */
39
+ toJSON(): IframeWmsFeatureInfoViewOptions;
40
+ }
41
+ import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
@@ -0,0 +1,73 @@
1
+ import { get as getOlProj } from 'ol/proj.js';
2
+ import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
3
+ import IframeComponent from './IframeComponent.vue';
4
+
5
+ /**
6
+ * @typedef {import("./abstractFeatureInfoView.js").FeatureInfoViewOptions & { infoFormat: string, title?: string }} IframeWmsFeatureInfoViewOptions
7
+ * @property {string} infoFormat - Specifies the response format of WMS GetFeatureInfo
8
+ * @property {string} [title] - optional title for the <iframe>
9
+ */
10
+
11
+ /**
12
+ * @class
13
+ * @description An iframe view.
14
+ * @extends {AbstractFeatureInfoView}
15
+ */
16
+ class IframeWmsFeatureInfoView extends AbstractFeatureInfoView {
17
+ /**
18
+ * @type {string}
19
+ */
20
+ static get className() {
21
+ return 'IframeWmsFeatureInfoView';
22
+ }
23
+
24
+ /**
25
+ * @param {IframeWmsFeatureInfoViewOptions} options
26
+ */
27
+ constructor(options) {
28
+ super(options, IframeComponent);
29
+
30
+ /**
31
+ * @type {string}
32
+ */
33
+ this.infoFormat = options.infoFormat || 'text/html';
34
+ /**
35
+ * @type {string|undefined}
36
+ */
37
+ this.title = options.title || undefined;
38
+ }
39
+
40
+ /**
41
+ * Gets feature info from WMS GetFeatureInfo in html/text format
42
+ * @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
43
+ * @param {import("@vcmap/core").WMSLayer} layer
44
+ * @returns {import("./iframeFeatureInfoView.js").IframeFeatureInfoViewProps}
45
+ */
46
+ getProperties(featureInfo, layer) {
47
+ return {
48
+ src: layer.featureProvider.wmsSource.getFeatureInfoUrl(
49
+ featureInfo.position,
50
+ 1,
51
+ getOlProj('EPSG:3857'),
52
+ { INFO_FORMAT: this.infoFormat },
53
+ ),
54
+ title: this.title,
55
+ };
56
+ }
57
+
58
+ /**
59
+ * @returns {IframeWmsFeatureInfoViewOptions}
60
+ */
61
+ toJSON() {
62
+ const config = super.toJSON();
63
+ if (this.infoFormat) {
64
+ config.infoFormat = this.infoFormat;
65
+ }
66
+ if (this.title) {
67
+ config.title = this.title;
68
+ }
69
+ return config;
70
+ }
71
+ }
72
+
73
+ export default IframeWmsFeatureInfoView;
@@ -155,6 +155,10 @@ export function posToPixel(pos) {
155
155
  if (typeof pos === 'number') {
156
156
  return `${pos}px`;
157
157
  }
158
+ // if a string with just a number, add a px example: "220"
159
+ if (/^\d+$/.test(pos)) {
160
+ return `${pos}px`;
161
+ }
158
162
  return pos;
159
163
  }
160
164
 
package/src/vcsUiApp.js CHANGED
@@ -557,7 +557,11 @@ class VcsUiApp extends VcsApp {
557
557
  )
558
558
  .map(async (p) => {
559
559
  try {
560
- return { name: p.name, state: await p.getState(forUrl) };
560
+ const pluginState = await p.getState(forUrl);
561
+ if (Object.keys(pluginState).length > 0) {
562
+ return { name: p.name, state: pluginState };
563
+ }
564
+ return null;
561
565
  } catch (e) {
562
566
  getLogger().error(e);
563
567
  return null;
@@ -1 +0,0 @@
1
- import{initAppFromAppConfig as p}from"./ui.895896.js";p("#app","app.config.json");
File without changes
File without changes
File without changes