@opensystemslab/map 1.0.0-alpha.7 → 1.0.0-alpha.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.
@@ -37859,7 +37859,7 @@ var ZA = class extends gr {
37859
37859
  constructor(t) {
37860
37860
  t = t || {}, super();
37861
37861
  var e = this.input = t.input;
37862
- e || (e = this.input = document.createElement("INPUT"), t.type && e.setAttribute("type", t.type), t.min !== void 0 && e.setAttribute("min", t.min), t.max !== void 0 && e.setAttribute("max", t.max), t.step !== void 0 && e.setAttribute("step", t.step), t.parent && t.parent.appendChild(e)), t.disabled && (e.disabled = !0), t.checked !== void 0 && (e.checked = !!t.checked), t.val !== void 0 && (e.value = t.val), t.hidden && (e.style.display = "none"), e.addEventListener("focus", (function() {
37862
+ e || (e = this.input = document.createElement("input"), t.type && e.setAttribute("type", t.type), t.min !== void 0 && e.setAttribute("min", t.min), t.max !== void 0 && e.setAttribute("max", t.max), t.step !== void 0 && e.setAttribute("step", t.step), t.parent && t.parent.appendChild(e)), t.disabled && (e.disabled = !0), t.checked !== void 0 && (e.checked = !!t.checked), t.val !== void 0 && (e.value = t.val), t.hidden && e.classList.add("ol-input-hidden"), e.addEventListener("focus", (function() {
37863
37863
  this.element && this.element.classList.add("ol-focus");
37864
37864
  }).bind(this));
37865
37865
  var n;
@@ -37906,8 +37906,8 @@ var ZA = class extends gr {
37906
37906
  }, k_ = class extends ZA {
37907
37907
  constructor(t) {
37908
37908
  t = t || {}, super(t);
37909
- var e = this.element = document.createElement("LABEL");
37910
- t.html instanceof Element ? e.appendChild(t.html) : t.html !== void 0 && (e.innerHTML = t.html), e.className = ("ol-ext-check ol-ext-checkbox " + (t.className || "")).trim(), this.input.parentNode && this.input.parentNode.insertBefore(e, this.input), e.appendChild(this.input), e.appendChild(document.createElement("SPAN")), t.after && e.appendChild(document.createTextNode(t.after)), this.input.addEventListener("change", (function() {
37909
+ var e = this.element = document.createElement("label");
37910
+ t.html instanceof Element ? e.appendChild(t.html) : t.html !== void 0 && (e.innerHTML = t.html), e.className = ("ol-ext-check ol-ext-checkbox " + (t.className || "")).trim(), this.input.parentNode && this.input.parentNode.insertBefore(e, this.input), e.appendChild(this.input), e.appendChild(document.createElement("span")), t.after && e.appendChild(document.createTextNode(t.after)), this.input.addEventListener("change", (function() {
37911
37911
  this.dispatchEvent({ type: "check", checked: this.input.checked, value: this.input.value });
37912
37912
  }).bind(this));
37913
37913
  }
@@ -37929,7 +37929,7 @@ Mt.create = function(i, t) {
37929
37929
  if (i === "TEXT")
37930
37930
  e = document.createTextNode(t.html || ""), t.parent && t.parent.appendChild(e);
37931
37931
  else {
37932
- e = document.createElement(i), /button/i.test(i) && e.setAttribute("type", "button");
37932
+ e = document.createElement(i.toLowerCase()), /button/i.test(i) && e.setAttribute("type", "button");
37933
37933
  for (var n in t)
37934
37934
  switch (n) {
37935
37935
  case "className": {
@@ -38191,47 +38191,55 @@ Mt.setCursor = function(i, t) {
38191
38191
  var tP = class extends Dr {
38192
38192
  constructor(t) {
38193
38193
  t = t || {}, t.fullscreen && (t.target = document.body);
38194
- var e = Mt.create("DIV", {
38194
+ var e = t.target === document.body, n = Mt.create(e ? "DIALOG" : "DIV", {
38195
38195
  className: ((t.className || "") + (t.zoom ? " ol-zoom" : "") + " ol-ext-dialog").trim()
38196
38196
  });
38197
38197
  super({
38198
- element: e,
38198
+ element: n,
38199
38199
  target: t.target
38200
- }), e.addEventListener("click", (function(r) {
38201
- this.get("hideOnBack") && r.target === e && this.close(), this.get("hideOnClick") && this.close();
38200
+ }), e && (n.addEventListener("close", (function() {
38201
+ this.hide();
38202
+ }).bind(this)), document.addEventListener("keydown", (function(a) {
38203
+ a.key === "Escape" && !this.get("closeBox") && this.isOpen() && a.preventDefault();
38204
+ }).bind(this)), n.addEventListener("cancel", (function() {
38205
+ setTimeout((function() {
38206
+ this.dispatchEvent("cancel");
38207
+ }).bind(this));
38208
+ }).bind(this))), n.addEventListener("click", (function(a) {
38209
+ this.get("hideOnBack") && a.target === n && this.close(), this.get("hideOnClick") && this.close();
38202
38210
  }).bind(this));
38203
- var n = Mt.create("FORM", {
38211
+ var o = Mt.create("FORM", {
38204
38212
  on: {
38205
38213
  submit: this._onButton("submit")
38206
38214
  },
38207
- parent: e
38215
+ parent: n
38208
38216
  });
38209
38217
  Mt.create("H2", {
38210
- parent: n
38218
+ parent: o
38211
38219
  }), Mt.create("DIV", {
38212
38220
  className: "ol-closebox",
38213
38221
  click: this._onButton("cancel"),
38214
- parent: n
38222
+ parent: o
38215
38223
  }), Mt.create("DIV", {
38216
38224
  className: "ol-content",
38217
- parent: n
38225
+ parent: o
38218
38226
  }), this._progress = Mt.create("DIV", {
38219
38227
  style: { display: "none" },
38220
- parent: n
38228
+ parent: o
38221
38229
  });
38222
- var o = Mt.create("DIV", {
38230
+ var r = Mt.create("DIV", {
38223
38231
  className: "ol-progress-bar",
38224
38232
  parent: this._progress
38225
38233
  });
38226
38234
  this._progressbar = Mt.create("DIV", {
38227
- parent: o
38235
+ parent: r
38228
38236
  }), this._progressMessage = Mt.create("DIV", {
38229
38237
  className: "ol-progress-message",
38230
38238
  parent: this._progress
38231
38239
  }), Mt.create("DIV", {
38232
38240
  className: "ol-buttons",
38233
- parent: n
38234
- }), this.set("closeBox", t.closeBox !== !1), this.set("zoom", !!t.zoom), this.set("hideOnClick", !!t.hideOnClick), this.set("hideOnBack", !!t.hideOnBack), this.set("className", e.className), this.set("closeOnSubmit", t.closeOnSubmit), this.set("buttons", t.buttons), this.setContent(t);
38241
+ parent: o
38242
+ }), this.set("closeBox", t.closeBox !== !1), this.set("zoom", !!t.zoom), this.set("hideOnClick", !!t.hideOnClick), this.set("hideOnBack", !!t.hideOnBack), this.set("className", n.className), this.set("closeOnSubmit", t.closeOnSubmit), this.set("buttons", t.buttons), this.setContent(t);
38235
38243
  }
38236
38244
  /** Show a new dialog
38237
38245
  * @param { * | Element | string } options options or a content to show
@@ -38246,9 +38254,11 @@ var tP = class extends Dr {
38246
38254
  * @param {function} [options.onButton] a function that takes the button id and a list of input by className
38247
38255
  */
38248
38256
  show(t) {
38249
- t && ((t instanceof Element || typeof t == "string") && (t = { content: t }), this.setContent(t)), this.element.classList.add("ol-visible"), this.element.setAttribute("aria-hidden", !1);
38257
+ t && ((t instanceof Element || typeof t == "string") && (t = { content: t }), this.setContent(t)), this.element.showModal && this.element.showModal(), this.element.classList.add("ol-visible"), this.element.setAttribute("aria-hidden", !1);
38250
38258
  var e = this.element.querySelector('input[type="text"],input[type="search"],input[type="number"]');
38251
- if (e && e.focus(), this.dispatchEvent({ type: "show" }), t) {
38259
+ if (e && setTimeout(function() {
38260
+ e.focus();
38261
+ }), this.dispatchEvent({ type: "show" }), t) {
38252
38262
  if (t.autoclose) {
38253
38263
  var n = setTimeout((function() {
38254
38264
  this.hide();
@@ -38353,7 +38363,9 @@ var tP = class extends Dr {
38353
38363
  var n = (function(o) {
38354
38364
  o.preventDefault(), (t !== "submit" || this.get("closeOnSubmit") !== !1) && this.hide();
38355
38365
  var r = this.getInputs();
38356
- this.dispatchEvent({ type: "button", button: t, inputs: r }), typeof e == "function" && e(t, r);
38366
+ setTimeout((function() {
38367
+ this.dispatchEvent({ type: "button", button: t, inputs: r }), typeof e == "function" && e(t, r);
38368
+ }).bind(this));
38357
38369
  }).bind(this);
38358
38370
  return n;
38359
38371
  }
@@ -38373,7 +38385,9 @@ var tP = class extends Dr {
38373
38385
  /** Close the dialog
38374
38386
  */
38375
38387
  hide() {
38376
- this.element.classList.remove("ol-visible"), this.element.setAttribute("aria-hidden", !0), this.dispatchEvent({ type: "hide" });
38388
+ document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), this.element.close && this.element.close(), this.isOpen() && (this.element.classList.remove("ol-visible"), this.element.setAttribute("aria-hidden", !0), setTimeout((function() {
38389
+ this.dispatchEvent({ type: "hide" });
38390
+ }).bind(this)));
38377
38391
  }
38378
38392
  /** Close the dialog
38379
38393
  */
@@ -39225,7 +39239,7 @@ var tP = class extends Dr {
39225
39239
  }), z = Mt.create("SELECT", {
39226
39240
  on: {
39227
39241
  change: (function() {
39228
- var S = C.legend.control.getLegend().getCanvas(), I = document.createElement("CANVAS");
39242
+ var S = C.legend.control.getLegend().getCanvas(), I = document.createElement("canvas");
39229
39243
  I.width = S.width, I.height = S.height;
39230
39244
  var G = I.getContext("2d");
39231
39245
  if (G.fillStyle = "#fff", G.fillRect(0, 0, I.width, I.height), G.drawImage(S, 0, 0), this.formats[z.value].clipboard)
@@ -39666,7 +39680,7 @@ To.prototype.scales = {
39666
39680
  };
39667
39681
  var gk = class extends b_ {
39668
39682
  constructor(t) {
39669
- super(t), this.element.classList.add("ol-canvas-control"), this.scaleHeight_ = 6, t || (t = {}), t.style || (t.style = new ei()), this.setStyle(t.style);
39683
+ t = t || {}, t.bar = !1, super(t), this.element.classList.add("ol-canvas-control"), this.scaleHeight_ = 6, t || (t = {}), t.style || (t.style = new ei()), this.setStyle(t.style);
39670
39684
  }
39671
39685
  /**
39672
39686
  * Remove the control from its current map and attach it to the new map.
@@ -47031,7 +47045,7 @@ function(i) {
47031
47045
  */
47032
47046
  function(i) {
47033
47047
  function t() {
47034
- return (we.canvg ? Promise.resolve(we.canvg) : import("./index.es-DSLIljlp.mjs")).catch(function(e) {
47048
+ return (we.canvg ? Promise.resolve(we.canvg) : import("./index.es-ApGkgZbJ.mjs")).catch(function(e) {
47035
47049
  return Promise.reject(new Error("Could not load canvg: " + e));
47036
47050
  }).then(function(e) {
47037
47051
  return e.default ? e.default : e;
@@ -56613,9 +56627,10 @@ let Wn = class extends ss {
56613
56627
  const n = {
56614
56628
  query: i,
56615
56629
  dataset: "LPI",
56616
- fq: "LPI_LOGICAL_STATUS_CODE:1",
56617
56630
  maxresults: "100",
56618
- lr: "EN"
56631
+ lr: "EN",
56632
+ output_srs: "EPSG:4326",
56633
+ fq: "LPI_LOGICAL_STATUS_CODE:1"
56619
56634
  }, o = Qu({
56620
56635
  service: "find",
56621
56636
  apiKey: this.osApiKey,