@gisce/ooui 2.3.0 → 2.4.0

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.
@@ -7,6 +7,8 @@ export declare class Graph {
7
7
  get type(): GraphType | undefined;
8
8
  _timerange: string | null;
9
9
  get timerange(): string | null;
10
+ _interval: number;
11
+ get interval(): number;
10
12
  constructor(element: ParsedNode);
11
13
  }
12
14
  //# sourceMappingURL=Graph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../src/Graph/Graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,gBAAgB,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAEhF,qBAAa,KAAK;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAE1B;IAED,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,IAAI,IAAI,SAAS,GAAG,SAAS,CAEhC;IAED,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IACjC,IAAI,SAAS,IAAI,MAAM,GAAG,IAAI,CAE7B;gBAEW,OAAO,EAAE,UAAU;CAIhC"}
1
+ {"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../src/Graph/Graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,gBAAgB,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAEhF,qBAAa,KAAK;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAE1B;IAED,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,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AE,GAAG,CAAC,CAAC,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,SAYA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC;CACf,UAsCA;AAMD,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,MAAM,EACN,MAAM,GACP,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,iBAkBA;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,aAAa,SAOlE;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,MAAM,GACP,EAAE;IACD,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,OAUA"}
@@ -1,14 +1,17 @@
1
- export declare function processTimerangeData({ values, timerange, }: {
1
+ export declare function processTimerangeData({ values, timerange, interval, }: {
2
2
  values: any[];
3
3
  timerange: string;
4
+ interval?: number;
4
5
  }): any[];
5
- export declare function fillGapsInTimerangeData({ values, timerange, }: {
6
+ export declare function fillGapsInTimerangeData({ values, timerange, interval, }: {
6
7
  values: any[];
7
8
  timerange: string;
9
+ interval?: number;
8
10
  }): any[];
9
- export declare function getMissingConsecutiveDates({ dates, timerange, }: {
11
+ export declare function getMissingConsecutiveDates({ dates, timerange, interval, }: {
10
12
  dates: string[];
11
13
  timerange: string;
14
+ interval?: number;
12
15
  }): string[];
13
16
  export declare function combineValuesForTimerange({ values, timerange, }: {
14
17
  values: any[];
@@ -1 +1 @@
1
- {"version":3,"file":"timerangeHelper.d.ts","sourceRoot":"","sources":["../../../src/Graph/processor/timerangeHelper.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,SAaA;AAED,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,SAqDA;AAED,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,YAiCA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,SA6BA;AAED,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,SAUA;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,IAAI,EACJ,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,UA0BA;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,wCAEzC;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,WAyBtD;AAED,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,OAAO,EAAE,KAAK,GAAG,cAAc,CAAC;CACjC,uBAcA;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,sEAmB9C"}
1
+ {"version":3,"file":"timerangeHelper.d.ts","sourceRoot":"","sources":["../../../src/Graph/processor/timerangeHelper.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,SAAS,EACT,QAAY,GACb,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,SAcA;AAED,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,SAAS,EACT,QAAY,GACb,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,SAsDA;AAED,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,SAAS,EACT,QAAY,GACb,EAAE;IACD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,YAoCA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,SA6BA;AAED,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,SAUA;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,IAAI,EACJ,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,UA0BA;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,wCAEzC;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,WAyBtD;AAED,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,OAAO,EAAE,KAAK,GAAG,cAAc,CAAC;CACjC,uBAcA;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,sEAmB9C"}
package/dist/ooui.es.js CHANGED
@@ -170,12 +170,12 @@ const he = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), _e
170
170
  fields: e,
171
171
  widgetType: i
172
172
  }) => {
173
- const h = s.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = b(h), u = JSON.parse(_), d = {};
174
- for (const c of Object.keys(u)) {
175
- const y = u[c].map((m) => _e({ entry: m, values: t, fields: e })).every((m) => m);
176
- y ? d[c] = !0 : c === "readonly" && !y && i === "button" && (d[c] = !1);
173
+ const h = s.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = b(h), d = JSON.parse(_), u = {};
174
+ for (const c of Object.keys(d)) {
175
+ const p = d[c].map((m) => _e({ entry: m, values: t, fields: e })).every((m) => m);
176
+ p ? u[c] = !0 : c === "readonly" && !p && i === "button" && (u[c] = !1);
177
177
  }
178
- return d;
178
+ return u;
179
179
  }, ge = ({
180
180
  attrs: s,
181
181
  values: t,
@@ -1445,8 +1445,8 @@ const $e = ({
1445
1445
  if (t.state === o) {
1446
1446
  const h = i[o];
1447
1447
  for (const _ of h) {
1448
- const [u, d] = _;
1449
- a[u] || (a[u] = []), a[u].push(d);
1448
+ const [d, u] = _;
1449
+ a[d] || (a[d] = []), a[d].push(u);
1450
1450
  }
1451
1451
  }
1452
1452
  for (const o of Object.keys(a)) {
@@ -1487,16 +1487,16 @@ const Je = ({
1487
1487
  return i;
1488
1488
  if (s.trim().length === 0)
1489
1489
  return;
1490
- const d = s.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((f) => f.split(":")), c = {};
1491
- return d.forEach((f) => {
1492
- const p = f[1];
1490
+ const u = s.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((f) => f.split(":")), c = {};
1491
+ return u.forEach((f) => {
1492
+ const y = f[1];
1493
1493
  if (!f[1].includes("'") && f[1] !== "true" && f[1] !== "false") {
1494
- const y = qe({
1494
+ const p = qe({
1495
1495
  values: t,
1496
1496
  fields: e,
1497
- fieldName: p === "active_id" ? "id" : p
1497
+ fieldName: y === "active_id" ? "id" : y
1498
1498
  });
1499
- c[f[0].replace(/'/g, "")] = y || void 0;
1499
+ c[f[0].replace(/'/g, "")] = p || void 0;
1500
1500
  } else
1501
1501
  f[1] === "true" ? c[f[0].replace(/'/g, "")] = !0 : f[1] === "false" ? c[f[0].replace(/'/g, "")] = !1 : c[f[0].replace(/'/g, "")] = f[1].replace(
1502
1502
  /'/g,
@@ -1509,8 +1509,8 @@ const Je = ({
1509
1509
  }, yt = (s) => {
1510
1510
  const t = [];
1511
1511
  try {
1512
- return !s || ee(s) || typeof s != "string" ? t : Z(s) !== null ? [] : (s.trim().length === 0 || s.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((d) => d.split(":")).forEach((d) => {
1513
- !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1512
+ return !s || ee(s) || typeof s != "string" ? t : Z(s) !== null ? [] : (s.trim().length === 0 || s.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((u) => u.split(":")).forEach((u) => {
1513
+ !u[1].includes("'") && u[1] !== "true" && u[1] !== "false" && t.push(u[1].replace(/'/g, ""));
1514
1514
  }), t);
1515
1515
  } catch {
1516
1516
  }
@@ -1642,7 +1642,7 @@ class pt {
1642
1642
  t.filter((a) => typeof a == "object").forEach((a) => {
1643
1643
  var w, P;
1644
1644
  const { tagName: l, attributes: o, children: h } = a;
1645
- let _ = l, u = o;
1645
+ let _ = l, d = o;
1646
1646
  if (l === "field") {
1647
1647
  const { name: x, widget: z } = o;
1648
1648
  if (z)
@@ -1654,47 +1654,47 @@ class pt {
1654
1654
  );
1655
1655
  _ = this._fields[x].type;
1656
1656
  }
1657
- u = {
1657
+ d = {
1658
1658
  ...this._fields[x],
1659
1659
  ...o,
1660
1660
  fieldsWidgetType: this._fields[x].type
1661
1661
  };
1662
1662
  }
1663
- const d = me({
1664
- tagAttributes: u,
1663
+ const u = me({
1664
+ tagAttributes: d,
1665
1665
  values: i,
1666
1666
  fields: this._fields,
1667
1667
  widgetType: l
1668
1668
  });
1669
1669
  let c;
1670
- l === "button" && u.states ? c = Re({
1671
- states: u.states,
1670
+ l === "button" && d.states ? c = Re({
1671
+ states: d.states,
1672
1672
  values: i
1673
1673
  }) : c = $e({
1674
- fieldName: u.name,
1674
+ fieldName: d.name,
1675
1675
  values: i,
1676
1676
  fields: this._fields
1677
1677
  });
1678
1678
  const f = Je({
1679
- context: u.context || ((w = this._fields[u.name]) == null ? void 0 : w.context),
1679
+ context: d.context || ((w = this._fields[d.name]) == null ? void 0 : w.context),
1680
1680
  values: i,
1681
1681
  fields: this._fields
1682
1682
  });
1683
- u.on_change && (this._onChangeFields[u.name] = He(
1684
- u.on_change
1683
+ d.on_change && (this._onChangeFields[d.name] = He(
1684
+ d.on_change
1685
1685
  ));
1686
- let p;
1687
- R(u.domain) && (p = u.domain), R((P = this._fields[u.name]) == null ? void 0 : P.domain) && (p = this._fields[u.name].domain), this._keyIdx = this._keyIdx + 1;
1688
- const y = {
1689
- ...d,
1686
+ let y;
1687
+ R(d.domain) && (y = d.domain), R((P = this._fields[d.name]) == null ? void 0 : P.domain) && (y = this._fields[d.name].domain), this._keyIdx = this._keyIdx + 1;
1688
+ const p = {
1689
+ ...u,
1690
1690
  ...c,
1691
1691
  context: f,
1692
- domain: p,
1692
+ domain: y,
1693
1693
  key: `${this._keyIdx}`
1694
1694
  };
1695
- e.readOnly && (y.readonly = !0);
1696
- const m = r.createWidget(_, y);
1697
- m.invisible && m instanceof g && this._invisibleFields.push(y.name), m instanceof C && this.parseNode({
1695
+ e.readOnly && (p.readonly = !0);
1696
+ const m = r.createWidget(_, p);
1697
+ m.invisible && m instanceof g && this._invisibleFields.push(p.name), m instanceof C && this.parseNode({
1698
1698
  fields: h,
1699
1699
  container: m.container,
1700
1700
  values: i
@@ -1765,20 +1765,20 @@ class xt {
1765
1765
  let o = null;
1766
1766
  if (a === "field") {
1767
1767
  const { name: h, widget: _ } = l;
1768
- let u = l;
1768
+ let d = l;
1769
1769
  if (h) {
1770
1770
  if (!this._fields[h])
1771
1771
  throw new Error(`Field ${h} doesn't exist in fields defintion`);
1772
- const d = this._fields[h];
1773
- o = d.type, (Array.isArray(d == null ? void 0 : d.domain) && (d == null ? void 0 : d.domain.length) === 0 || (d == null ? void 0 : d.domain) === !1) && l.domain && l.domain.length > 0 && delete d.domain, u = {
1774
- ...d,
1772
+ const u = this._fields[h];
1773
+ o = u.type, (Array.isArray(u == null ? void 0 : u.domain) && (u == null ? void 0 : u.domain.length) === 0 || (u == null ? void 0 : u.domain) === !1) && l.domain && l.domain.length > 0 && delete u.domain, d = {
1774
+ ...u,
1775
1775
  ...l,
1776
- fieldsWidgetType: d == null ? void 0 : d.type
1776
+ fieldsWidgetType: u == null ? void 0 : u.type
1777
1777
  };
1778
1778
  }
1779
- if (_ && (o = _), !u.invisible) {
1780
- const d = i.createWidget(o, u);
1781
- this._columns.push(d);
1779
+ if (_ && (o = _), !d.invisible) {
1780
+ const u = i.createWidget(o, d);
1781
+ this._columns.push(u);
1782
1782
  }
1783
1783
  }
1784
1784
  });
@@ -1915,7 +1915,8 @@ class te {
1915
1915
  n(this, "_string", null);
1916
1916
  n(this, "_type");
1917
1917
  n(this, "_timerange", null);
1918
- this._string = t.attributes.string || null, this._timerange = t.attributes.timerange || null;
1918
+ n(this, "_interval", 1);
1919
+ this._string = t.attributes.string || null, this._timerange = t.attributes.timerange || null, t.attributes.interval && (this._interval = parseInt(t.attributes.interval));
1919
1920
  }
1920
1921
  get string() {
1921
1922
  return this._string;
@@ -1926,6 +1927,9 @@ class te {
1926
1927
  get timerange() {
1927
1928
  return this._timerange;
1928
1929
  }
1930
+ get interval() {
1931
+ return this._interval;
1932
+ }
1929
1933
  }
1930
1934
  const Ue = (s) => s === 1 || s === "1" || s === !0 || s === "True";
1931
1935
  class se extends te {
@@ -2105,67 +2109,75 @@ const Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2105
2109
  }, Symbol.toStringTag, { value: "Module" }));
2106
2110
  function nt({
2107
2111
  values: s,
2108
- timerange: t
2112
+ timerange: t,
2113
+ interval: e = 1
2109
2114
  }) {
2110
- const e = lt({
2115
+ const i = lt({
2111
2116
  values: s,
2112
2117
  timerange: t
2113
2118
  });
2114
2119
  return rt({
2115
- values: e,
2116
- timerange: t
2120
+ values: i,
2121
+ timerange: t,
2122
+ interval: e
2117
2123
  });
2118
2124
  }
2119
2125
  function rt({
2120
2126
  values: s,
2121
- timerange: t
2127
+ timerange: t,
2128
+ interval: e = 1
2122
2129
  }) {
2123
- let e = [];
2124
- const i = re({
2130
+ let i = [];
2131
+ const r = re({
2125
2132
  values: s,
2126
2133
  groupBy: "type-stacked"
2127
- }), r = `${t}s`;
2128
- return Object.keys(i).forEach((l) => {
2129
- const o = i[l];
2130
- for (let h = 0; h < o.length; h++) {
2131
- const _ = o[h];
2132
- if (e.push(_), h === o.length - 1)
2134
+ }), a = `${t}s`;
2135
+ return Object.keys(r).forEach((o) => {
2136
+ const h = r[o];
2137
+ for (let _ = 0; _ < h.length; _++) {
2138
+ const d = h[_];
2139
+ if (i.push(d), _ === h.length - 1)
2133
2140
  return;
2134
- const u = _.x, d = o[h + 1].x;
2135
- if (!ne([u, d], r)) {
2136
- const c = at({
2137
- dates: [u, d],
2138
- timerange: t
2141
+ const u = d.x, c = h[_ + 1].x;
2142
+ if (!ne([u, c], a)) {
2143
+ const f = at({
2144
+ dates: [u, c],
2145
+ timerange: t,
2146
+ interval: e
2139
2147
  });
2140
- e = e.concat(
2141
- c.map((f) => ({
2142
- x: f,
2148
+ i = i.concat(
2149
+ f.map((y) => ({
2150
+ x: y,
2143
2151
  value: 0,
2144
- type: _.type,
2145
- stacked: _.stacked
2152
+ type: d.type,
2153
+ stacked: d.stacked
2146
2154
  }))
2147
2155
  );
2148
2156
  }
2149
2157
  }
2150
- }), e.sort((l, o) => l.x < o.x ? -1 : l.x > o.x ? 1 : 0);
2158
+ }), i.sort((o, h) => o.x < h.x ? -1 : o.x > h.x ? 1 : 0);
2151
2159
  }
2152
2160
  function at({
2153
2161
  dates: s,
2154
- timerange: t
2162
+ timerange: t,
2163
+ interval: e = 1
2155
2164
  }) {
2156
- const e = [], i = `${t}s`;
2165
+ const i = [], r = `${t}s`;
2157
2166
  if (s.length === 1)
2158
2167
  return s;
2159
- const r = s.sort((a, l) => a < l ? -1 : a > l ? 1 : 0);
2160
- for (let a = 0; a < r.length - 1; a++) {
2161
- const l = r[a], o = r[a + 1];
2162
- if (!ne([l, o], i)) {
2163
- const h = E(l, I(i)).add(1, i), _ = E(o, I(i));
2164
- for (; h.isBefore(_); )
2165
- e.push(h.format(I(i))), h.add(1, i);
2168
+ const a = s.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2169
+ for (let l = 0; l < a.length - 1; l++) {
2170
+ const o = a[l], h = a[l + 1];
2171
+ if (!ne([o, h], r)) {
2172
+ const _ = E(o, I(r)).add(
2173
+ e,
2174
+ r
2175
+ ), d = E(h, I(r));
2176
+ for (; _.isBefore(d); )
2177
+ i.push(_.format(I(r))), _.add(e, r);
2166
2178
  }
2167
2179
  }
2168
- return e;
2180
+ return i;
2169
2181
  }
2170
2182
  function lt({
2171
2183
  values: s,
@@ -2293,11 +2305,11 @@ const ut = {
2293
2305
  }), a = [];
2294
2306
  s.y.forEach((c) => {
2295
2307
  Object.keys(r).forEach((f) => {
2296
- const p = r[f].label, y = r[f].entries;
2308
+ const y = r[f].label, p = r[f].entries;
2297
2309
  if (c.label) {
2298
2310
  const m = A({
2299
2311
  fieldName: c.label,
2300
- values: y,
2312
+ values: p,
2301
2313
  fields: e
2302
2314
  });
2303
2315
  Object.keys(m).forEach((w) => {
@@ -2310,7 +2322,7 @@ const ut = {
2310
2322
  operator: c.operator
2311
2323
  });
2312
2324
  a.push({
2313
- x: p || !1,
2325
+ x: y || !1,
2314
2326
  value: le,
2315
2327
  type: x,
2316
2328
  operator: c.operator,
@@ -2319,7 +2331,7 @@ const ut = {
2319
2331
  });
2320
2332
  } else {
2321
2333
  const m = N({
2322
- entries: y,
2334
+ entries: p,
2323
2335
  fields: e,
2324
2336
  fieldName: c.name
2325
2337
  }), w = V({
@@ -2327,7 +2339,7 @@ const ut = {
2327
2339
  operator: c.operator
2328
2340
  });
2329
2341
  a.push({
2330
- x: p || !1,
2342
+ x: y || !1,
2331
2343
  value: w,
2332
2344
  type: ae({
2333
2345
  yAxis: c,
@@ -2342,16 +2354,17 @@ const ut = {
2342
2354
  const l = s.y.some((c) => c.label !== void 0), o = s.y.some((c) => c.stacked !== void 0);
2343
2355
  let _ = [...a.sort((c, f) => c.x < f.x ? -1 : c.x > f.x ? 1 : 0)];
2344
2356
  o && s.y.filter((c) => c.stacked !== void 0).length > 1 && (_ = _.map((c) => ({ ...c, type: `${c.type} - ${c.stacked}` })));
2345
- let u = [..._];
2346
- s.type === "pie" && u.some((c) => c.x === !1) ? u = u.map((c) => c.x === !1 ? { ...c, x: (i == null ? void 0 : i.uninformedString) || "Not informed" } : c) : _.some((c) => c.x === !1) && (u = u.filter(
2357
+ let d = [..._];
2358
+ s.type === "pie" && d.some((c) => c.x === !1) ? d = d.map((c) => c.x === !1 ? { ...c, x: (i == null ? void 0 : i.uninformedString) || "Not informed" } : c) : _.some((c) => c.x === !1) && (d = d.filter(
2347
2359
  (c) => c.x !== !1
2348
2360
  ));
2349
- let d = u;
2350
- return s.timerange ? d = nt({
2351
- values: d,
2352
- timerange: s.timerange
2353
- }) : s.type == "pie" && (d = u.sort((c, f) => f.value - c.value)), {
2354
- data: d,
2361
+ let u = d;
2362
+ return s.timerange ? u = nt({
2363
+ values: u,
2364
+ timerange: s.timerange,
2365
+ interval: s.interval
2366
+ }) : s.type == "pie" && (u = d.sort((c, f) => f.value - c.value)), {
2367
+ data: u,
2355
2368
  isGroup: o || l,
2356
2369
  isStack: o
2357
2370
  };