@idmwx/idmui-gl4 0.4.1 → 0.4.3

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.js CHANGED
@@ -7482,8 +7482,7 @@ const ll = {
7482
7482
  default: 3
7483
7483
  },
7484
7484
  timeZone: {
7485
- type: Number,
7486
- default: 8
7485
+ type: Number
7487
7486
  },
7488
7487
  dateTime: {
7489
7488
  type: String
@@ -7951,7 +7950,7 @@ const dl = {
7951
7950
  var t, i, a, r, s, c, n, u, h, g, f, y, M, T, L, P, C, v, S, b, k, _, I, W, V, U, Y, $, ee, K, se, me, pe, he, q, A, ne, fe, be, ke, ze;
7952
7951
  this.currentHourData = {}, this.positionGmt = (i = (t = o == null ? void 0 : o.weather) == null ? void 0 : t[0]) == null ? void 0 : i.timezone, this.positionOffset = (r = (a = o == null ? void 0 : o.weather) == null ? void 0 : a[0]) == null ? void 0 : r.offset;
7953
7952
  const e = ((s = qe.pickHourly(o, D(this.form.dateTime))) == null ? void 0 : s[0]) || {};
7954
- this.currentHourData.utc = e.utc, this.currentHourData.temp = this.roundPrecision((c = e == null ? void 0 : e.weather) == null ? void 0 : c.temp, 0) ?? "-", this.currentHourData.precipProbability = this.roundPrecision((u = (n = e == null ? void 0 : e.weather) == null ? void 0 : n.precip) == null ? void 0 : u.probability, 0) ?? "-", this.currentHourData.precip1h = this.roundPrecision((g = (h = e == null ? void 0 : e.weather) == null ? void 0 : h.precip) == null ? void 0 : g.sum, 0) ?? "-", this.currentHourData.visibility = this.roundPrecision((f = e == null ? void 0 : e.weather) == null ? void 0 : f.visibility, 0) ?? "-", this.currentHourData.windSpeed = this.roundPrecision((M = (y = e == null ? void 0 : e.weather) == null ? void 0 : y.wind) == null ? void 0 : M.kts, 1) ?? "-", this.currentHourData.windDir = (L = (T = e == null ? void 0 : e.weather) == null ? void 0 : T.wind) == null ? void 0 : L.direction, this.currentHourData.windLevel = this.roundPrecision((C = (P = e == null ? void 0 : e.weather) == null ? void 0 : P.wind) == null ? void 0 : C.scale, 0) ?? "-", this.currentHourData.windGust = this.roundPrecision((S = (v = e == null ? void 0 : e.weather) == null ? void 0 : v.wind) == null ? void 0 : S.gusts, 1) ?? "-", this.currentHourData.sigwaveHeight = this.roundPrecision((k = (b = e == null ? void 0 : e.wave) == null ? void 0 : b.sig) == null ? void 0 : k.height, 1) ?? "-", this.currentHourData.sigwaveDir = (I = (_ = e == null ? void 0 : e.wave) == null ? void 0 : _.sig) == null ? void 0 : I.direction, this.currentHourData.sigwavePeriod = this.roundPrecision((V = (W = e == null ? void 0 : e.wave) == null ? void 0 : W.sig) == null ? void 0 : V.period, 1) ?? "-", this.currentHourData.windwaveHeight = this.roundPrecision((Y = (U = e == null ? void 0 : e.wave) == null ? void 0 : U.wd) == null ? void 0 : Y.height, 1) ?? "-", this.currentHourData.windwaveDir = (ee = ($ = e == null ? void 0 : e.wave) == null ? void 0 : $.wd) == null ? void 0 : ee.direction, this.currentHourData.windwavePeriod = this.roundPrecision((se = (K = e == null ? void 0 : e.wave) == null ? void 0 : K.wd) == null ? void 0 : se.period, 1) ?? "-", this.currentHourData.swellHeight = this.roundPrecision((pe = (me = e == null ? void 0 : e.wave) == null ? void 0 : me.swell) == null ? void 0 : pe.height, 1) ?? "-", this.currentHourData.swellDir = (q = (he = e == null ? void 0 : e.wave) == null ? void 0 : he.swell) == null ? void 0 : q.direction, this.currentHourData.swellPeriod = this.roundPrecision((ne = (A = e == null ? void 0 : e.wave) == null ? void 0 : A.swell) == null ? void 0 : ne.period, 1) ?? "-", this.currentHourData.currentSpeed = this.roundPrecision((fe = e == null ? void 0 : e.current) == null ? void 0 : fe.speed, 1) ?? "-", this.currentHourData.currentDir = (be = e == null ? void 0 : e.current) == null ? void 0 : be.direction, this.currentHourData.currentSpeed = this.roundPrecision((ke = e == null ? void 0 : e.current) == null ? void 0 : ke.speed, 1) ?? "-", this.currentHourData.seaLevel = this.roundPrecision(e == null ? void 0 : e.height, 1) ?? "-", this.currentHourData.seaTemp = this.roundPrecision(e == null ? void 0 : e.sst, 0) ?? "-", this.currentHourData.weatherUrls = (ze = e == null ? void 0 : e.weather) == null ? void 0 : ze.url;
7953
+ this.currentHourData.utc = e.utc, this.currentHourData.lat = this.form.lat, this.currentHourData.lng = this.form.lng, this.currentHourData.temp = this.roundPrecision((c = e == null ? void 0 : e.weather) == null ? void 0 : c.temp, 0) ?? "-", this.currentHourData.precipProbability = this.roundPrecision((u = (n = e == null ? void 0 : e.weather) == null ? void 0 : n.precip) == null ? void 0 : u.probability, 0) ?? "-", this.currentHourData.precip1h = this.roundPrecision((g = (h = e == null ? void 0 : e.weather) == null ? void 0 : h.precip) == null ? void 0 : g.sum, 0) ?? "-", this.currentHourData.visibility = this.roundPrecision((f = e == null ? void 0 : e.weather) == null ? void 0 : f.visibility, 0) ?? "-", this.currentHourData.windSpeed = this.roundPrecision((M = (y = e == null ? void 0 : e.weather) == null ? void 0 : y.wind) == null ? void 0 : M.kts, 1) ?? "-", this.currentHourData.windDir = (L = (T = e == null ? void 0 : e.weather) == null ? void 0 : T.wind) == null ? void 0 : L.direction, this.currentHourData.windLevel = this.roundPrecision((C = (P = e == null ? void 0 : e.weather) == null ? void 0 : P.wind) == null ? void 0 : C.scale, 0) ?? "-", this.currentHourData.windGust = this.roundPrecision((S = (v = e == null ? void 0 : e.weather) == null ? void 0 : v.wind) == null ? void 0 : S.gusts, 1) ?? "-", this.currentHourData.sigwaveHeight = this.roundPrecision((k = (b = e == null ? void 0 : e.wave) == null ? void 0 : b.sig) == null ? void 0 : k.height, 1) ?? "-", this.currentHourData.sigwaveDir = (I = (_ = e == null ? void 0 : e.wave) == null ? void 0 : _.sig) == null ? void 0 : I.direction, this.currentHourData.sigwavePeriod = this.roundPrecision((V = (W = e == null ? void 0 : e.wave) == null ? void 0 : W.sig) == null ? void 0 : V.period, 1) ?? "-", this.currentHourData.windwaveHeight = this.roundPrecision((Y = (U = e == null ? void 0 : e.wave) == null ? void 0 : U.wd) == null ? void 0 : Y.height, 1) ?? "-", this.currentHourData.windwaveDir = (ee = ($ = e == null ? void 0 : e.wave) == null ? void 0 : $.wd) == null ? void 0 : ee.direction, this.currentHourData.windwavePeriod = this.roundPrecision((se = (K = e == null ? void 0 : e.wave) == null ? void 0 : K.wd) == null ? void 0 : se.period, 1) ?? "-", this.currentHourData.swellHeight = this.roundPrecision((pe = (me = e == null ? void 0 : e.wave) == null ? void 0 : me.swell) == null ? void 0 : pe.height, 1) ?? "-", this.currentHourData.swellDir = (q = (he = e == null ? void 0 : e.wave) == null ? void 0 : he.swell) == null ? void 0 : q.direction, this.currentHourData.swellPeriod = this.roundPrecision((ne = (A = e == null ? void 0 : e.wave) == null ? void 0 : A.swell) == null ? void 0 : ne.period, 1) ?? "-", this.currentHourData.currentSpeed = this.roundPrecision((fe = e == null ? void 0 : e.current) == null ? void 0 : fe.speed, 1) ?? "-", this.currentHourData.currentDir = (be = e == null ? void 0 : e.current) == null ? void 0 : be.direction, this.currentHourData.currentSpeed = this.roundPrecision((ke = e == null ? void 0 : e.current) == null ? void 0 : ke.speed, 1) ?? "-", this.currentHourData.seaLevel = this.roundPrecision(e == null ? void 0 : e.height, 1) ?? "-", this.currentHourData.seaTemp = this.roundPrecision(e == null ? void 0 : e.sst, 0) ?? "-", this.currentHourData.weatherUrls = (ze = e == null ? void 0 : e.weather) == null ? void 0 : ze.url;
7955
7954
  },
7956
7955
  handleBind() {
7957
7956
  var o, e;
@@ -8273,12 +8272,12 @@ function fl(o, e, t, i, a, r) {
8273
8272
  density: "compact",
8274
8273
  height: "30",
8275
8274
  class: "text-none flex-1-1-0",
8276
- color: a.form.forecastModel === "ECWMF" ? "primary" : "",
8275
+ color: a.form.forecastModel === "ECMWF" ? "primary" : "",
8277
8276
  "base-color": "grey-lighten-1",
8278
- value: "ECWMF"
8277
+ value: "ECMWF"
8279
8278
  }, {
8280
8279
  default: d(() => e[16] || (e[16] = [
8281
- H("ECWMF", -1)
8280
+ H("ECMWF", -1)
8282
8281
  ])),
8283
8282
  _: 1,
8284
8283
  __: [16]
@@ -8345,7 +8344,7 @@ function fl(o, e, t, i, a, r) {
8345
8344
  return [
8346
8345
  l("div", ul, [
8347
8346
  e[23] || (e[23] = l("i", { class: "iconfont icon-a-Spotweather text-h5 font-weight-bold menu-icon-color" }, null, -1)),
8348
- l("div", gl, z(r.computeLat((b = a.point) == null ? void 0 : b.lat)) + "," + z(r.computeLng((k = a.point) == null ? void 0 : k.lng)), 1)
8347
+ l("div", gl, z(r.computeLat((b = a.currentHourData) == null ? void 0 : b.lat)) + "," + z(r.computeLng((k = a.currentHourData) == null ? void 0 : k.lng)), 1)
8349
8348
  ]),
8350
8349
  m(n, {
8351
8350
  icon: "",
@@ -8998,7 +8997,7 @@ const _l = {
8998
8997
  //hour
8999
8998
  intervalOptions: [3, 6, 12, 24],
9000
8999
  showTimezone: !1,
9001
- timeZone: Number(localStorage.getItem("idm-timeZone-gl4")) ?? 8,
9000
+ timeZone: localStorage.getItem("idm-timeZone-gl4") ? Number(localStorage.getItem("idm-timeZone-gl4")) : D().utcOffset() / 60,
9002
9001
  offsets: [-12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
9003
9002
  source: ""
9004
9003
  };