@geospatial-sdk/elements 0.0.5-dev.40 → 0.0.5-dev.42

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/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./map-element";
1
+ export * from "./map-element.js";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // PUBLIC API
2
- export * from "./map-element";
2
+ export * from "./map-element.js";
@@ -1,6 +1,6 @@
1
1
  import { LitElement, PropertyValues } from "lit";
2
2
  import { MapContext } from "@geospatial-sdk/core";
3
- import OlMap from "ol/Map";
3
+ import OlMap from "ol/Map.js";
4
4
  export declare class SdkMapElement extends LitElement {
5
5
  static styles: import("lit").CSSResult;
6
6
  accessor context: MapContext;
@@ -1 +1 @@
1
- {"version":3,"file":"map-element.d.ts","sourceRoot":"","sources":["../lib/map-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAE5D,OAAO,EAAyB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,MAAM,QAAQ,CAAC;AAM3B,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAAS;IAKtB,QAAQ,CAAC,OAAO,EAAE,UAAU,CAM1B;IAGF,QAAQ,CAAC,UAAU,EAAG,cAAc,CAAC;IAErC,OAAO,CAAC,GAAG,CAAsB;IAEpB,YAAY;IAIZ,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAStD,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,EAAE,QAAQ,EAAE,UAAU;IAM3E,MAAM;IAKN,SAAS,CAAC,gBAAgB;IAI1B,IAAW,KAAK,iBAEf;CACF"}
1
+ {"version":3,"file":"map-element.d.ts","sourceRoot":"","sources":["../lib/map-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAE5D,OAAO,EAAyB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,MAAM,WAAW,CAAC;AAM9B,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAAS;IAKtB,QAAQ,CAAC,OAAO,EAAE,UAAU,CAM1B;IAGF,QAAQ,CAAC,UAAU,EAAG,cAAc,CAAC;IAErC,OAAO,CAAC,GAAG,CAAsB;IAEpB,YAAY;IAIZ,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAStD,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,EAAE,QAAQ,EAAE,UAAU;IAM3E,MAAM;IAKN,SAAS,CAAC,gBAAgB;IAI1B,IAAW,KAAK,iBAEf;CACF"}
@@ -32,15 +32,6 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
32
32
  }
33
33
  return useValue ? value : void 0;
34
34
  };
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
45
36
  if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
46
37
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
@@ -89,25 +80,19 @@ let SdkMapElement = (() => {
89
80
  set context(value) { __classPrivateFieldSet(this, _SdkMapElement_context_accessor_storage, value, "f"); }
90
81
  get mapElement() { return __classPrivateFieldGet(this, _SdkMapElement_mapElement_accessor_storage, "f"); }
91
82
  set mapElement(value) { __classPrivateFieldSet(this, _SdkMapElement_mapElement_accessor_storage, value, "f"); }
92
- firstUpdated() {
93
- return __awaiter(this, void 0, void 0, function* () {
94
- this.map = yield createMapFromContext(this.context, this.mapElement);
95
- });
83
+ async firstUpdated() {
84
+ this.map = await createMapFromContext(this.context, this.mapElement);
96
85
  }
97
- updated(changedProperties) {
98
- return __awaiter(this, void 0, void 0, function* () {
99
- if (changedProperties.has("context")) {
100
- yield this.contextHasChanged(changedProperties.get("context"), this.context);
101
- }
102
- });
86
+ async updated(changedProperties) {
87
+ if (changedProperties.has("context")) {
88
+ await this.contextHasChanged(changedProperties.get("context"), this.context);
89
+ }
103
90
  }
104
- contextHasChanged(value, oldValue) {
105
- return __awaiter(this, void 0, void 0, function* () {
106
- if (!this.map || !value)
107
- return;
108
- const diff = computeMapContextDiff(value, oldValue);
109
- yield applyContextDiffToMap(this.map, diff);
110
- });
91
+ async contextHasChanged(value, oldValue) {
92
+ if (!this.map || !value)
93
+ return;
94
+ const diff = computeMapContextDiff(value, oldValue);
95
+ await applyContextDiffToMap(this.map, diff);
111
96
  }
112
97
  render() {
113
98
  return html `<div style="width: 100%; height: 100%"></div>`;
@@ -124,8 +109,7 @@ let SdkMapElement = (() => {
124
109
  _SdkMapElement_mapElement_accessor_storage = new WeakMap();
125
110
  __setFunctionName(_classThis, "SdkMapElement");
126
111
  (() => {
127
- var _a;
128
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
112
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
129
113
  _context_decorators = [property({
130
114
  attribute: false,
131
115
  })];
package/lib/index.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // PUBLIC API
2
- export * from "./map-element";
2
+ export * from "./map-element.js";
@@ -1,7 +1,7 @@
1
1
  import { css, html, LitElement, PropertyValues } from "lit";
2
2
  import { customElement, property, query } from "lit/decorators.js";
3
3
  import { computeMapContextDiff, MapContext } from "@geospatial-sdk/core";
4
- import OlMap from "ol/Map";
4
+ import OlMap from "ol/Map.js";
5
5
  import {
6
6
  applyContextDiffToMap,
7
7
  createMapFromContext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geospatial-sdk/elements",
3
- "version": "0.0.5-dev.40+17bad88",
3
+ "version": "0.0.5-dev.42+baa75c1",
4
4
  "description": "Custom elements provided by the SDK",
5
5
  "keywords": [
6
6
  "web",
@@ -33,8 +33,8 @@
33
33
  "lit": "^3.2.1"
34
34
  },
35
35
  "dependencies": {
36
- "@geospatial-sdk/core": "^0.0.5-dev.40+17bad88",
37
- "@geospatial-sdk/openlayers": "^0.0.5-dev.40+17bad88"
36
+ "@geospatial-sdk/core": "^0.0.5-dev.42+baa75c1",
37
+ "@geospatial-sdk/openlayers": "^0.0.5-dev.42+baa75c1"
38
38
  },
39
- "gitHead": "17bad885319e693911c2219422bfe3fca4437fa2"
39
+ "gitHead": "baa75c1fed77ed160f6a2d94bfeb5358cc91d63a"
40
40
  }