@vcmap/ui 5.3.7 → 5.3.8

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.07c23d.js";
1
+ export * from "./ui.d7e3c5.js";
@@ -1,5 +1,5 @@
1
- export * from "./vue.67ce32.js";
2
- import { default as f } from "./vue.67ce32.js";
1
+ export * from "./vue.399094.js";
2
+ import { default as f } from "./vue.399094.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.8284ec.css');import v from "./vue.67ce32.js";
16
+ } await loadCss('./assets/vuetify.5cde8b.css');import v from "./vue.399094.js";
17
17
  const Ne = v.extend().extend({
18
18
  name: "themeable",
19
19
  provide() {
@@ -1,5 +1,5 @@
1
- export * from "./vuetify.8284ec.js";
2
- import { default as f } from "./vuetify.8284ec.js";
1
+ export * from "./vuetify.5cde8b.js";
2
+ import { default as f } from "./vuetify.5cde8b.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-12958251.js"></script>
98
+ <script type="module" crossorigin src="./assets/index-17490f9e.js"></script>
99
99
  </head>
100
100
  <body style="height: 100vh; margin: 0;">
101
101
  <noscript>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "5.3.7",
3
+ "version": "5.3.8",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -164,6 +164,12 @@ declare class AbstractFeatureInfoView extends VcsObject {
164
164
  * @type {import("vue").Component|undefined}
165
165
  */
166
166
  get 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;
167
+ /**
168
+ * @param {undefined|import("ol").Feature|import("@vcmap-cesium/engine").Cesium3DTileFeature|import("@vcmap-cesium/engine").Cesium3DTilePointFeature} feature
169
+ * @returns {Object}
170
+ * @protected
171
+ */
172
+ protected _getAttributesFromFeature(feature: undefined | import("ol").Feature | import("@vcmap-cesium/engine").Cesium3DTileFeature | import("@vcmap-cesium/engine").Cesium3DTilePointFeature): Object;
167
173
  /**
168
174
  * This method returns all relevant attributes for this view.
169
175
  * Called by `getProperties()` to pass attributes as props object to the VueComponent of this view.
@@ -266,6 +266,21 @@ function getWindowState(app, state, attributes) {
266
266
  };
267
267
  }
268
268
 
269
+ /**
270
+ * Filters all __ attributes (from vc-converter tilesets) not provided as keys
271
+ * @param {Object<string, unknown>} attributes
272
+ * @param {Array<string>} keys
273
+ * @returns {Object}
274
+ */
275
+ function applyDoubleUnderscoreFilter(attributes, keys = []) {
276
+ return Object.keys(attributes)
277
+ .filter((key) => keys.includes(key) || !/^__/.test(key))
278
+ .reduce((obj, key) => {
279
+ obj[key] = attributes[key];
280
+ return obj;
281
+ }, {});
282
+ }
283
+
269
284
  /**
270
285
  * Abstract class to be extended by FeatureInfoView classes
271
286
  * Subclasses must always provide a component and may overwrite class methods.
@@ -343,6 +358,23 @@ class AbstractFeatureInfoView extends VcsObject {
343
358
  return this._component;
344
359
  }
345
360
 
361
+ /**
362
+ * @param {undefined|import("ol").Feature|import("@vcmap-cesium/engine").Cesium3DTileFeature|import("@vcmap-cesium/engine").Cesium3DTilePointFeature} feature
363
+ * @returns {Object}
364
+ * @protected
365
+ */
366
+ // eslint-disable-next-line class-methods-use-this
367
+ _getAttributesFromFeature(feature) {
368
+ if (feature?.tileset?.asset?.version === '1.1') {
369
+ const attributes = {};
370
+ feature.getPropertyIds().forEach((id) => {
371
+ attributes[id] = feature.getProperty(id);
372
+ });
373
+ return attributes;
374
+ }
375
+ return feature.getProperty('attributes') || {};
376
+ }
377
+
346
378
  /**
347
379
  * This method returns all relevant attributes for this view.
348
380
  * Called by `getProperties()` to pass attributes as props object to the VueComponent of this view.
@@ -352,7 +384,7 @@ class AbstractFeatureInfoView extends VcsObject {
352
384
  * @returns {Object}
353
385
  */
354
386
  getAttributes(feature) {
355
- let attributes = feature.getProperty('attributes') || {};
387
+ let attributes = this._getAttributesFromFeature(feature);
356
388
  if (this.attributeKeys.length > 0) {
357
389
  attributes = applyAttributeFilter(attributes, this.attributeKeys);
358
390
  }
@@ -363,6 +395,7 @@ class AbstractFeatureInfoView extends VcsObject {
363
395
  applyKeyMapping(attributes, this.keyMapping);
364
396
  }
365
397
  attributes = applyOlcsAttributeFilter(attributes, this.attributeKeys);
398
+ attributes = applyDoubleUnderscoreFilter(attributes, this.attributeKeys);
366
399
  return applyEmptyAttributesFilter(attributes);
367
400
  }
368
401
 
@@ -375,7 +408,7 @@ class AbstractFeatureInfoView extends VcsObject {
375
408
  */
376
409
  getTags(feature) {
377
410
  if (this.tags) {
378
- const attributes = feature.getProperty('attributes') || {};
411
+ const attributes = this._getAttributesFromFeature(feature);
379
412
  const tags = Object.keys(this.tags)
380
413
  .filter(
381
414
  (key) =>
@@ -1 +0,0 @@
1
- import{initAppFromAppConfig as p}from"./ui.07c23d.js";p("#app","app.config.json");
File without changes
File without changes
File without changes