@gisce/ooui 2.13.0-alpha.2 → 2.13.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.
package/dist/Alert.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import Field from "./Field";
1
+ import ContainerWidget from "./ContainerWidget";
2
+ import Button from "./Button";
2
3
  type AlertType = "success" | "warning" | "info" | "error" | undefined;
3
- declare class Alert extends Field {
4
+ declare class Alert extends ContainerWidget {
4
5
  /**
5
6
  * Alert type
6
7
  */
@@ -16,6 +17,7 @@ declare class Alert extends Field {
16
17
  _icon: string | null;
17
18
  get icon(): string | null;
18
19
  set icon(value: string | null);
20
+ get buttons(): Button[];
19
21
  constructor(props: any);
20
22
  }
21
23
  export default Alert;
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtE,cAAM,KAAM,SAAQ,KAAK;IACvB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAU;IAC/B,IAAI,SAAS,IAAI,SAAS,CAEzB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,SAAS,EAE7B;IAED,MAAM,EAAE,MAAM,CAAM;IACpB,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAEtB;IAED,KAAK,EAAE,MAAM,CAAM;IACnB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B,IAAI,IAAI,IAAI,MAAM,GAAG,IAAI,CAExB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAE5B;gBAEW,KAAK,EAAE,GAAG;CAkBvB;AAED,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtE,cAAM,KAAM,SAAQ,eAAe;IACjC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAU;IAC/B,IAAI,SAAS,IAAI,SAAS,CAEzB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,SAAS,EAE7B;IAED,MAAM,EAAE,MAAM,CAAM;IACpB,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAEtB;IAED,KAAK,EAAE,MAAM,CAAM;IACnB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B,IAAI,IAAI,IAAI,MAAM,GAAG,IAAI,CAExB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAE5B;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,CAEtB;gBAEW,KAAK,EAAE,GAAG;CAiBvB;AAED,eAAe,KAAK,CAAC"}
@@ -1,10 +1,9 @@
1
1
  export declare const isTrue: (value?: string | boolean | number) => boolean;
2
2
  declare const replaceEntities: (string: string) => string;
3
- export declare const parseJsonAttributes: ({ attrs, values, fields, widgetType, }: {
3
+ export declare const parseJsonAttributes: ({ attrs, values, fields, }: {
4
4
  attrs: string;
5
5
  values: any;
6
6
  fields: any;
7
- widgetType?: string | undefined;
8
7
  }) => Record<string, boolean>;
9
8
  declare const evaluateAttributes: ({ tagAttributes, values, fields, widgetType, fallbackMode, }: {
10
9
  tagAttributes: any;
@@ -1 +1 @@
1
- {"version":3,"file":"attributeParser.d.ts","sourceRoot":"","sources":["../../src/helpers/attributeParser.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,MAAM,WAAW,MAAM,GAAG,OAAO,GAAG,MAAM,YAGtD,CAAC;AAuDF,QAAA,MAAM,eAAe,WAAY,MAAM,KAAG,MAEzC,CAAC;AAoHF,eAAO,MAAM,mBAAmB;WAMvB,MAAM;YACL,GAAG;YACH,GAAG;;6BAkDZ,CAAC;AAEF,QAAA,MAAM,kBAAkB;mBAOP,GAAG;YACV,GAAG;YACH,GAAG;;;SAwCZ,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"attributeParser.d.ts","sourceRoot":"","sources":["../../src/helpers/attributeParser.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,MAAM,WAAW,MAAM,GAAG,OAAO,GAAG,MAAM,YAGtD,CAAC;AAuDF,QAAA,MAAM,eAAe,WAAY,MAAM,KAAG,MAEzC,CAAC;AAoHF,eAAO,MAAM,mBAAmB;WAKvB,MAAM;YACL,GAAG;YACH,GAAG;6BAsCZ,CAAC;AAEF,QAAA,MAAM,kBAAkB;mBAOP,GAAG;YACV,GAAG;YACH,GAAG;;;SAuCZ,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC"}
package/dist/ooui.es.js CHANGED
@@ -177,44 +177,41 @@ const ge = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), me
177
177
  fields: e,
178
178
  widgetType: s
179
179
  }) => {
180
- const h = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = b(h), u = JSON.parse(_), d = {};
181
- for (const f of Object.keys(u)) {
182
- const x = u[f].map((y) => me({ entry: y, values: t, fields: e })).every((y) => y);
180
+ const u = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = b(u), h = JSON.parse(_), d = {};
181
+ for (const f of Object.keys(h)) {
182
+ const x = h[f].map((y) => me({ entry: y, values: t, fields: e })).every((y) => y);
183
183
  x ? d[f] = !0 : f === "readonly" && !x && s === "button" && (d[f] = !1);
184
184
  }
185
185
  return d;
186
186
  }, ye = ({
187
187
  attrs: i,
188
188
  values: t,
189
- fields: e,
190
- widgetType: s
189
+ fields: e
191
190
  }) => {
192
191
  try {
193
- const r = b(i), a = JSON.parse(
194
- r.replace(/'/g, '"')
195
- ), l = {};
196
- for (const o of Object.keys(a)) {
197
- const h = fe({
192
+ const s = b(i), r = JSON.parse(
193
+ s.replace(/'/g, '"')
194
+ ), a = {};
195
+ for (const l of Object.keys(r))
196
+ a[l] = fe({
198
197
  object: t,
199
- condition: a[o],
198
+ condition: r[l],
200
199
  evaluateFieldComparison: ({
201
- fieldName: _,
200
+ fieldName: o,
202
201
  valueInObject: u,
203
- expectedValue: d
202
+ expectedValue: _
204
203
  }) => q({
205
- fieldName: _,
204
+ fieldName: o,
206
205
  valueInObject: u,
207
- expectedValue: d,
206
+ expectedValue: _,
208
207
  fields: e
209
208
  })
210
209
  });
211
- h ? l[o] = !0 : o === "readonly" && !h && s === "button" && (l[o] = !1);
212
- }
213
- return l;
214
- } catch (r) {
215
- throw console.error(r), r instanceof SyntaxError ? new Error(
210
+ return a;
211
+ } catch (s) {
212
+ throw console.error(s), s instanceof SyntaxError ? new Error(
216
213
  "Error parsing new json_attrs. Original string: " + i
217
- ) : r;
214
+ ) : s;
218
215
  }
219
216
  }, xe = ({
220
217
  tagAttributes: i,
@@ -234,8 +231,7 @@ const ge = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), me
234
231
  a = ye({
235
232
  attrs: i.json_attrs,
236
233
  values: t,
237
- fields: e,
238
- widgetType: s
234
+ fields: e
239
235
  });
240
236
  } catch (o) {
241
237
  if (r && i.attrs)
@@ -601,8 +597,8 @@ const O = class O extends C {
601
597
  }
602
598
  };
603
599
  n(O, "_defaultColspan", 6);
604
- let v = O;
605
- const T = class T extends v {
600
+ let p = O;
601
+ const T = class T extends p {
606
602
  constructor(e) {
607
603
  super(e);
608
604
  n(this, "_tabPosition", "top");
@@ -627,7 +623,7 @@ const T = class T extends v {
627
623
  };
628
624
  n(T, "_defaultColspan", 3);
629
625
  let M = T;
630
- class we extends v {
626
+ class we extends p {
631
627
  constructor(e) {
632
628
  super(e);
633
629
  n(this, "_icon", null);
@@ -640,7 +636,7 @@ class we extends v {
640
636
  this._icon = e;
641
637
  }
642
638
  }
643
- class ve extends v {
639
+ class ve extends p {
644
640
  constructor(e) {
645
641
  super(e);
646
642
  n(this, "_icon", null);
@@ -725,7 +721,7 @@ class Q extends g {
725
721
  this._danger = e;
726
722
  }
727
723
  }
728
- class Fe extends v {
724
+ class Fe extends p {
729
725
  constructor(e) {
730
726
  super(e);
731
727
  n(this, "_defaultName", "");
@@ -1300,7 +1296,7 @@ class Re extends g {
1300
1296
  super(t);
1301
1297
  }
1302
1298
  }
1303
- class qe extends g {
1299
+ class qe extends p {
1304
1300
  constructor(e) {
1305
1301
  super(e);
1306
1302
  /**
@@ -1310,7 +1306,7 @@ class qe extends g {
1310
1306
  n(this, "_title", "");
1311
1307
  n(this, "_text", "");
1312
1308
  n(this, "_icon", null);
1313
- e && (this._nolabel = !0, e.alert_type && (this._alertType = e.alert_type), e.title && (this._title = e.title), e.text && (this._text = e.text), e.icon && (this._icon = e.icon));
1309
+ e && (e.alert_type && (this._alertType = e.alert_type), e.title && (this._title = e.title), e.text && (this._text = e.text), e.icon && (this._icon = e.icon));
1314
1310
  }
1315
1311
  get alertType() {
1316
1312
  return this._alertType;
@@ -1336,6 +1332,9 @@ class qe extends g {
1336
1332
  set icon(e) {
1337
1333
  this._icon = e;
1338
1334
  }
1335
+ get buttons() {
1336
+ return this._container.rows.flat().filter((e) => !e.invisible);
1337
+ }
1339
1338
  }
1340
1339
  class Je extends g {
1341
1340
  constructor(e) {
@@ -1524,15 +1523,15 @@ const He = ({
1524
1523
  const r = {}, a = {};
1525
1524
  for (const o of Object.keys(s))
1526
1525
  if (t.state === o) {
1527
- const h = s[o];
1528
- for (const _ of h) {
1529
- const [u, d] = _;
1530
- a[u] || (a[u] = []), a[u].push(d);
1526
+ const u = s[o];
1527
+ for (const _ of u) {
1528
+ const [h, d] = _;
1529
+ a[h] || (a[h] = []), a[h].push(d);
1531
1530
  }
1532
1531
  }
1533
1532
  for (const o of Object.keys(a)) {
1534
- const h = a[o];
1535
- r[o] = h.some((_) => _);
1533
+ const u = a[o];
1534
+ r[o] = u.some((_) => _);
1536
1535
  }
1537
1536
  return r;
1538
1537
  }, Qe = ({
@@ -1619,7 +1618,7 @@ function Ke(i) {
1619
1618
  function e(s) {
1620
1619
  const r = [];
1621
1620
  for (const a of s)
1622
- a instanceof v ? e(a._container.rows.flat()) : r.push(a);
1621
+ a instanceof p ? e(a._container.rows.flat()) : r.push(a);
1623
1622
  r.length > 0 && t.push(r);
1624
1623
  }
1625
1624
  for (const s of i)
@@ -1729,14 +1728,14 @@ class Ft {
1729
1728
  }
1730
1729
  parse(t, e) {
1731
1730
  var o;
1732
- const { values: s = {}, readOnly: r = !1 } = e || {}, a = Y.parse(t).filter((h) => h.tagName === "form")[0];
1731
+ const { values: s = {}, readOnly: r = !1 } = e || {}, a = Y.parse(t).filter((u) => u.tagName === "form")[0];
1733
1732
  this._string = ((o = a.attributes) == null ? void 0 : o.string) || null, this._string && (this._string = b(this._string)), this._readOnly = r, this._context = s.id ? { active_id: s.id, active_ids: [s.id] } : {}, this._invisibleFields = [], this.parseNode({
1734
1733
  fields: a.children,
1735
1734
  container: this._container,
1736
1735
  values: s
1737
- }), Ke(this._container._rows).forEach((h) => {
1738
- const _ = h;
1739
- _._id && _._context && (this._contextForFields[_._id] = h._context);
1736
+ }), Ke(this._container._rows).forEach((u) => {
1737
+ const _ = u;
1738
+ _._id && _._context && (this._contextForFields[_._id] = u._context);
1740
1739
  });
1741
1740
  }
1742
1741
  parseNode({
@@ -1746,51 +1745,51 @@ class Ft {
1746
1745
  }) {
1747
1746
  const r = new G();
1748
1747
  t.filter((a) => typeof a == "object").forEach((a) => {
1749
- var p, F;
1750
- const { tagName: l, attributes: o, children: h } = a;
1751
- let _ = l, u = o;
1748
+ var w, F;
1749
+ const { tagName: l, attributes: o, children: u } = a;
1750
+ let _ = l, h = o;
1752
1751
  if (l === "field") {
1753
- const { name: w, widget: I } = o;
1752
+ const { name: v, widget: I } = o;
1754
1753
  if (I)
1755
1754
  _ = I;
1756
- else if (w) {
1757
- if (!this._fields[w])
1755
+ else if (v) {
1756
+ if (!this._fields[v])
1758
1757
  throw new Error(
1759
- `Field ${w} doesn't exist in fields defintion`
1758
+ `Field ${v} doesn't exist in fields defintion`
1760
1759
  );
1761
- _ = this._fields[w].type;
1760
+ _ = this._fields[v].type;
1762
1761
  }
1763
- u = {
1764
- ...this._fields[w],
1762
+ h = {
1763
+ ...this._fields[v],
1765
1764
  ...o,
1766
- fieldsWidgetType: this._fields[w].type
1765
+ fieldsWidgetType: this._fields[v].type
1767
1766
  };
1768
1767
  }
1769
1768
  const d = xe({
1770
- tagAttributes: u,
1769
+ tagAttributes: h,
1771
1770
  values: s,
1772
1771
  fields: this._fields,
1773
1772
  widgetType: l
1774
1773
  });
1775
1774
  let f;
1776
- l === "button" && u.states ? f = Qe({
1777
- states: u.states,
1775
+ l === "button" && h.states ? f = Qe({
1776
+ states: h.states,
1778
1777
  values: s
1779
1778
  }) : f = He({
1780
- fieldName: u.name,
1779
+ fieldName: h.name,
1781
1780
  values: s,
1782
1781
  fields: this._fields
1783
1782
  });
1784
1783
  const c = Z({
1785
- context: u.context || ((p = this._fields[u.name]) == null ? void 0 : p.context),
1784
+ context: h.context || ((w = this._fields[h.name]) == null ? void 0 : w.context),
1786
1785
  values: s,
1787
1786
  fields: this._fields
1788
1787
  });
1789
- u.on_change && (this._onChangeFields[u.name] = Ue(
1790
- u.on_change
1788
+ h.on_change && (this._onChangeFields[h.name] = Ue(
1789
+ h.on_change
1791
1790
  ));
1792
1791
  let m;
1793
- R(u.domain) && (m = u.domain), R((F = this._fields[u.name]) == null ? void 0 : F.domain) && (m = this._fields[u.name].domain), this._keyIdx = this._keyIdx + 1;
1792
+ R(h.domain) && (m = h.domain), R((F = this._fields[h.name]) == null ? void 0 : F.domain) && (m = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
1794
1793
  const x = {
1795
1794
  ...d,
1796
1795
  ...f,
@@ -1800,8 +1799,8 @@ class Ft {
1800
1799
  };
1801
1800
  e.readOnly && (x.readonly = !0);
1802
1801
  const y = r.createWidget(_, x);
1803
- y.invisible && y instanceof g && this._invisibleFields.push(x.name), y instanceof v && this.parseNode({
1804
- fields: h,
1802
+ y.invisible && y instanceof g && this._invisibleFields.push(x.name), y instanceof p && this.parseNode({
1803
+ fields: u,
1805
1804
  container: y.container,
1806
1805
  values: s
1807
1806
  }), y instanceof Q && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
@@ -1890,27 +1889,27 @@ class Ct {
1890
1889
  const { tagName: a, attributes: l } = r;
1891
1890
  let o = null;
1892
1891
  if (a === "field") {
1893
- const { name: h, widget: _ } = l;
1894
- let u = l;
1895
- if (h) {
1896
- if (!this._fields[h])
1897
- throw new Error(`Field ${h} doesn't exist in fields defintion`);
1898
- const d = this._fields[h];
1892
+ const { name: u, widget: _ } = l;
1893
+ let h = l;
1894
+ if (u) {
1895
+ if (!this._fields[u])
1896
+ throw new Error(`Field ${u} doesn't exist in fields defintion`);
1897
+ const d = this._fields[u];
1899
1898
  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;
1900
1899
  const f = Z({
1901
1900
  context: l.context || d.context,
1902
1901
  values: {},
1903
1902
  fields: this._fields
1904
1903
  });
1905
- u = {
1904
+ h = {
1906
1905
  ...d,
1907
1906
  ...l,
1908
1907
  fieldsWidgetType: d == null ? void 0 : d.type,
1909
1908
  context: f
1910
- }, this._contextForFields[h] = f;
1909
+ }, this._contextForFields[u] = f;
1911
1910
  }
1912
- if (_ && (o = _), !u.invisible) {
1913
- const d = s.createWidget(o, u);
1911
+ if (_ && (o = _), !h.invisible) {
1912
+ const d = s.createWidget(o, h);
1914
1913
  this._columns.push(d);
1915
1914
  }
1916
1915
  }
@@ -2005,11 +2004,11 @@ const Ot = ({
2005
2004
  if (!Array.isArray(s))
2006
2005
  return;
2007
2006
  const [r, a, l] = s;
2008
- let o, h;
2009
- r.indexOf(".") !== -1 ? (o = r.substr(0, r.indexOf(".")), h = r.substr(
2007
+ let o, u;
2008
+ r.indexOf(".") !== -1 ? (o = r.substr(0, r.indexOf(".")), u = r.substr(
2010
2009
  r.indexOf(".") + 1,
2011
2010
  r.length - 1
2012
- )) : (o = r, h = "id"), o === t && e.push([h, a, l]);
2011
+ )) : (o = r, u = "id"), o === t && e.push([u, a, l]);
2013
2012
  }), e;
2014
2013
  }, Tt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2015
2014
  class et {
@@ -2123,7 +2122,7 @@ const st = (i) => {
2123
2122
  let e;
2124
2123
  if (i.forEach((s) => {
2125
2124
  if (s.tagName === "field") {
2126
- const r = s.attributes.axis, a = s.attributes.operator, l = s.attributes.name, o = s.attributes.label || void 0, h = s.attributes.stacked || void 0;
2125
+ const r = s.attributes.axis, a = s.attributes.operator, l = s.attributes.name, o = s.attributes.label || void 0, u = s.attributes.stacked || void 0;
2127
2126
  if (!r)
2128
2127
  throw new Error(`Field ${l} doesn't have an axis`);
2129
2128
  if (!l)
@@ -2135,7 +2134,7 @@ const st = (i) => {
2135
2134
  name: l,
2136
2135
  operator: a,
2137
2136
  label: o,
2138
- stacked: h
2137
+ stacked: u
2139
2138
  })
2140
2139
  );
2141
2140
  }
@@ -2273,12 +2272,12 @@ function ct({
2273
2272
  groupBy: "type-stacked"
2274
2273
  }), a = `${t}s`;
2275
2274
  return Object.keys(r).forEach((o) => {
2276
- const h = r[o];
2277
- for (let _ = 0; _ < h.length; _++) {
2278
- const u = h[_];
2279
- if (s.push(u), _ === h.length - 1)
2275
+ const u = r[o];
2276
+ for (let _ = 0; _ < u.length; _++) {
2277
+ const h = u[_];
2278
+ if (s.push(h), _ === u.length - 1)
2280
2279
  return;
2281
- const d = u.x, f = h[_ + 1].x;
2280
+ const d = h.x, f = u[_ + 1].x;
2282
2281
  if (!re([d, f], a)) {
2283
2282
  const c = dt({
2284
2283
  dates: [d, f],
@@ -2289,13 +2288,13 @@ function ct({
2289
2288
  c.map((m) => ({
2290
2289
  x: m,
2291
2290
  value: 0,
2292
- type: u.type,
2293
- stacked: u.stacked
2291
+ type: h.type,
2292
+ stacked: h.stacked
2294
2293
  }))
2295
2294
  );
2296
2295
  }
2297
2296
  }
2298
- }), s.sort((o, h) => o.x < h.x ? -1 : o.x > h.x ? 1 : 0);
2297
+ }), s.sort((o, u) => o.x < u.x ? -1 : o.x > u.x ? 1 : 0);
2299
2298
  }
2300
2299
  function dt({
2301
2300
  dates: i,
@@ -2307,13 +2306,13 @@ function dt({
2307
2306
  return i;
2308
2307
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2309
2308
  for (let l = 0; l < a.length - 1; l++) {
2310
- const o = a[l], h = a[l + 1];
2311
- if (!re([o, h], r)) {
2309
+ const o = a[l], u = a[l + 1];
2310
+ if (!re([o, u], r)) {
2312
2311
  const _ = P(o, S(r)).add(
2313
2312
  e,
2314
2313
  r
2315
- ), u = P(h, S(r));
2316
- for (; _.isBefore(u); )
2314
+ ), h = P(u, S(r));
2315
+ for (; _.isBefore(h); )
2317
2316
  s.push(_.format(S(r))), _.add(e, r);
2318
2317
  }
2319
2318
  }
@@ -2331,13 +2330,13 @@ function ut({
2331
2330
  groupBy: "all"
2332
2331
  });
2333
2332
  return Object.keys(r).forEach((a) => {
2334
- const l = r[a], o = l[0].operator === "count" ? "+" : l[0].operator, h = V({
2333
+ const l = r[a], o = l[0].operator === "count" ? "+" : l[0].operator, u = V({
2335
2334
  values: l.map((_) => _.value),
2336
2335
  operator: o
2337
2336
  });
2338
2337
  s.push({
2339
2338
  ...l[0],
2340
- value: h
2339
+ value: u
2341
2340
  });
2342
2341
  }), s;
2343
2342
  }
@@ -2447,14 +2446,14 @@ const gt = {
2447
2446
  Object.keys(r).forEach((m) => {
2448
2447
  const x = r[m].label, y = r[m].entries;
2449
2448
  if (c.label) {
2450
- const p = N({
2449
+ const w = N({
2451
2450
  fieldName: c.label,
2452
2451
  values: y,
2453
2452
  fields: e
2454
2453
  });
2455
- Object.keys(p).forEach((F) => {
2456
- const w = p[F].entries, I = p[F].label, ce = A({
2457
- entries: w,
2454
+ Object.keys(w).forEach((F) => {
2455
+ const v = w[F].entries, I = w[F].label, ce = A({
2456
+ entries: v,
2458
2457
  fields: e,
2459
2458
  fieldName: c.name
2460
2459
  }), de = V({
@@ -2470,12 +2469,12 @@ const gt = {
2470
2469
  });
2471
2470
  });
2472
2471
  } else {
2473
- const p = A({
2472
+ const w = A({
2474
2473
  entries: y,
2475
2474
  fields: e,
2476
2475
  fieldName: c.name
2477
2476
  }), F = V({
2478
- values: p,
2477
+ values: w,
2479
2478
  operator: c.operator
2480
2479
  });
2481
2480
  a.push({
@@ -2494,16 +2493,16 @@ const gt = {
2494
2493
  const l = i.y.some((c) => c.label !== void 0), o = i.y.some((c) => c.stacked !== void 0);
2495
2494
  let _ = [...a.sort((c, m) => c.x < m.x ? -1 : c.x > m.x ? 1 : 0)];
2496
2495
  o && i.y.filter((c) => c.stacked !== void 0).length > 1 && (_ = _.map((c) => ({ ...c, type: `${c.type} - ${c.stacked}` })));
2497
- let u = [..._];
2498
- i.type === "pie" && u.some((c) => c.x === !1) ? u = u.map((c) => c.x === !1 ? { ...c, x: (s == null ? void 0 : s.uninformedString) || "Not informed" } : c) : _.some((c) => c.x === !1) && (u = u.filter(
2496
+ let h = [..._];
2497
+ i.type === "pie" && h.some((c) => c.x === !1) ? h = h.map((c) => c.x === !1 ? { ...c, x: (s == null ? void 0 : s.uninformedString) || "Not informed" } : c) : _.some((c) => c.x === !1) && (h = h.filter(
2499
2498
  (c) => c.x !== !1
2500
2499
  ));
2501
- let d = u;
2500
+ let d = h;
2502
2501
  i.timerange ? d = ot({
2503
2502
  values: d,
2504
2503
  timerange: i.timerange,
2505
2504
  interval: i.interval
2506
- }) : i.type == "pie" && (d = u.sort((c, m) => m.value - c.value));
2505
+ }) : i.type == "pie" && (d = h.sort((c, m) => m.value - c.value));
2507
2506
  const f = {
2508
2507
  data: d,
2509
2508
  isGroup: o || l,
@@ -2626,7 +2625,7 @@ export {
2626
2625
  $e as CodeEditor,
2627
2626
  Je as Comments,
2628
2627
  z as Container,
2629
- v as ContainerWidget,
2628
+ p as ContainerWidget,
2630
2629
  Pt as Dashboard,
2631
2630
  et as DashboardItem,
2632
2631
  Ie as Date,