@gisce/ooui 2.18.0-alpha.4 → 2.18.0-rc.1

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/ooui.es.js CHANGED
@@ -61,7 +61,7 @@ const be = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ye
61
61
  modifiedExpectedValue: null,
62
62
  directOutcome: !1
63
63
  } : (r.modifiedValueInObject = s[i].type === "boolean" ? !!t : t, s[i].type === "many2one" && e === !1 && t === void 0 ? r.modifiedExpectedValue = void 0 : (r.modifiedValueInObject = r.modifiedValueInObject === void 0 ? !1 : r.modifiedValueInObject, r.modifiedValueInObject = r.modifiedValueInObject === null ? !1 : r.modifiedValueInObject), s[i].type === "many2one" && Array.isArray(r.modifiedValueInObject) && r.modifiedValueInObject[0] === void 0 && (r.modifiedValueInObject = !1), s[i].type === "boolean" && (e === 0 || e === 1) && (r.modifiedExpectedValue = e !== 0), r);
64
- }, pe = ({
64
+ }, xe = ({
65
65
  attrs: i,
66
66
  values: t,
67
67
  fields: e,
@@ -69,11 +69,11 @@ const be = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ye
69
69
  }) => {
70
70
  const h = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = b(h), u = JSON.parse(_), d = {};
71
71
  for (const f of Object.keys(u)) {
72
- const p = u[f].map((y) => ye({ entry: y, values: t, fields: e })).every((y) => y);
73
- p ? d[f] = !0 : f === "readonly" && !p && s === "button" && (d[f] = !1);
72
+ const x = u[f].map((y) => ye({ entry: y, values: t, fields: e })).every((y) => y);
73
+ x ? d[f] = !0 : f === "readonly" && !x && s === "button" && (d[f] = !1);
74
74
  }
75
75
  return d;
76
- }, xe = ({
76
+ }, pe = ({
77
77
  attrs: i,
78
78
  values: t,
79
79
  fields: e,
@@ -114,14 +114,14 @@ const be = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ye
114
114
  fallbackMode: r = !0
115
115
  }) => {
116
116
  let a = {}, l = {};
117
- if (i.attrs && (l = pe({
117
+ if (i.attrs && (l = xe({
118
118
  attrs: i.attrs,
119
119
  values: t,
120
120
  fields: e,
121
121
  widgetType: s
122
122
  })), i.json_attrs)
123
123
  try {
124
- a = xe({
124
+ a = pe({
125
125
  attrs: i.json_attrs,
126
126
  values: t,
127
127
  fields: e,
@@ -434,7 +434,7 @@ class Q extends g {
434
434
  this._fieldForLabel = e;
435
435
  }
436
436
  }
437
- class S {
437
+ class z {
438
438
  constructor(t = 4, e = 6, s = !1, r = void 0) {
439
439
  /**
440
440
  * Number of columns the container is divided
@@ -558,7 +558,7 @@ const O = class O extends C {
558
558
  * Container label
559
559
  */
560
560
  n(this, "_label", "");
561
- this._container = new S(
561
+ this._container = new z(
562
562
  e == null ? void 0 : e.col,
563
563
  O._defaultColspan,
564
564
  this.readOnly,
@@ -610,8 +610,8 @@ const O = class O extends C {
610
610
  }
611
611
  };
612
612
  n(O, "_defaultColspan", 6);
613
- let x = O;
614
- const T = class T extends x {
613
+ let p = O;
614
+ const T = class T extends p {
615
615
  constructor(e) {
616
616
  super(e);
617
617
  n(this, "_tabPosition", "top");
@@ -636,7 +636,7 @@ const T = class T extends x {
636
636
  };
637
637
  n(T, "_defaultColspan", 3);
638
638
  let j = T;
639
- class Fe extends x {
639
+ class Fe extends p {
640
640
  constructor(e) {
641
641
  super(e);
642
642
  n(this, "_icon", null);
@@ -649,7 +649,7 @@ class Fe extends x {
649
649
  this._icon = e;
650
650
  }
651
651
  }
652
- class Ce extends x {
652
+ class Ce extends p {
653
653
  constructor(e) {
654
654
  super(e);
655
655
  n(this, "_icon", null);
@@ -734,7 +734,7 @@ class X extends g {
734
734
  this._danger = e;
735
735
  }
736
736
  }
737
- class ke extends x {
737
+ class ke extends p {
738
738
  constructor(e) {
739
739
  super(e);
740
740
  n(this, "_defaultName", "");
@@ -965,12 +965,12 @@ class Ee extends g {
965
965
  }
966
966
  class Ie extends B {
967
967
  }
968
- class ze extends g {
968
+ class Se extends g {
969
969
  constructor(t) {
970
970
  super(t);
971
971
  }
972
972
  }
973
- class Se extends g {
973
+ class ze extends g {
974
974
  constructor(t) {
975
975
  super(t);
976
976
  }
@@ -1332,7 +1332,7 @@ class qe extends g {
1332
1332
  super(t);
1333
1333
  }
1334
1334
  }
1335
- class Je extends x {
1335
+ class Je extends p {
1336
1336
  constructor(e) {
1337
1337
  super(e);
1338
1338
  /**
@@ -1417,6 +1417,19 @@ class Qe extends g {
1417
1417
  this._size = e;
1418
1418
  }
1419
1419
  }
1420
+ class Xe extends p {
1421
+ constructor(e) {
1422
+ super(e);
1423
+ n(this, "_loading", !1);
1424
+ e && e.loading && (this._loading = e.loading);
1425
+ }
1426
+ get loading() {
1427
+ return this._loading;
1428
+ }
1429
+ set loading(e) {
1430
+ this._loading = e;
1431
+ }
1432
+ }
1420
1433
  class L {
1421
1434
  constructor() {
1422
1435
  /**
@@ -1469,10 +1482,10 @@ class L {
1469
1482
  this._widgetClass = We;
1470
1483
  break;
1471
1484
  case "date":
1472
- this._widgetClass = ze;
1485
+ this._widgetClass = Se;
1473
1486
  break;
1474
1487
  case "datetime":
1475
- this._widgetClass = Se;
1488
+ this._widgetClass = ze;
1476
1489
  break;
1477
1490
  case "progressbar":
1478
1491
  this._widgetClass = Ie;
@@ -1557,6 +1570,9 @@ class L {
1557
1570
  case "arrow_steps":
1558
1571
  this._widgetClass = R;
1559
1572
  break;
1573
+ case "spinner":
1574
+ this._widgetClass = Xe;
1575
+ break;
1560
1576
  }
1561
1577
  }
1562
1578
  createWidget(t, e) {
@@ -1578,7 +1594,7 @@ class L {
1578
1594
  }
1579
1595
  }
1580
1596
  }
1581
- const Xe = ({
1597
+ const Ue = ({
1582
1598
  fieldName: i,
1583
1599
  values: t,
1584
1600
  fields: e
@@ -1603,7 +1619,7 @@ const Xe = ({
1603
1619
  r[o] = h.some((_) => _);
1604
1620
  }
1605
1621
  return r;
1606
- }, Ue = ({
1622
+ }, Ke = ({
1607
1623
  states: i,
1608
1624
  values: t
1609
1625
  }) => {
@@ -1612,7 +1628,7 @@ const Xe = ({
1612
1628
  const e = i.split(",");
1613
1629
  return e.length === 0 ? {} : e.includes(t.state) ? {} : { invisible: !0 };
1614
1630
  };
1615
- function Ke({
1631
+ function Ze({
1616
1632
  values: i = {},
1617
1633
  fieldName: t,
1618
1634
  fields: e = {}
@@ -1640,12 +1656,12 @@ const te = ({
1640
1656
  return d.forEach((c) => {
1641
1657
  const m = c[1];
1642
1658
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1643
- const p = Ke({
1659
+ const x = Ze({
1644
1660
  values: t,
1645
1661
  fields: e,
1646
1662
  fieldName: m === "active_id" ? "id" : m
1647
1663
  });
1648
- f[c[0].replace(/'/g, "")] = p || void 0;
1664
+ f[c[0].replace(/'/g, "")] = x || void 0;
1649
1665
  } else
1650
1666
  c[1] === "true" ? f[c[0].replace(/'/g, "")] = !0 : c[1] === "false" ? f[c[0].replace(/'/g, "")] = !1 : f[c[0].replace(/'/g, "")] = c[1].replace(
1651
1667
  /'/g,
@@ -1655,7 +1671,7 @@ const te = ({
1655
1671
  } catch {
1656
1672
  return;
1657
1673
  }
1658
- }, Ct = (i) => {
1674
+ }, kt = (i) => {
1659
1675
  const t = [];
1660
1676
  try {
1661
1677
  return !i || se(i) || typeof i != "string" ? t : ie(i) !== null ? [] : (i.trim().length === 0 || i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((d) => d.split(":")).forEach((d) => {
@@ -1675,26 +1691,26 @@ function ie(i) {
1675
1691
  function se(i) {
1676
1692
  return typeof i == "object" && i !== null && typeof i != "string";
1677
1693
  }
1678
- const Ze = (i) => {
1694
+ const et = (i) => {
1679
1695
  const t = i.trim().replace(")", "").split("("), e = t[0], r = t[1].split(",").map((a) => a.trim());
1680
1696
  return {
1681
1697
  method: e,
1682
1698
  args: r
1683
1699
  };
1684
1700
  };
1685
- function et(i) {
1701
+ function tt(i) {
1686
1702
  const t = [];
1687
1703
  function e(s) {
1688
1704
  const r = [];
1689
1705
  for (const a of s)
1690
- a instanceof x ? e(a._container.rows.flat()) : r.push(a);
1706
+ a instanceof p ? e(a._container.rows.flat()) : r.push(a);
1691
1707
  r.length > 0 && t.push(r);
1692
1708
  }
1693
1709
  for (const s of i)
1694
1710
  e(s);
1695
1711
  return t.flat();
1696
1712
  }
1697
- class kt {
1713
+ class Ot {
1698
1714
  constructor(t, e = 4) {
1699
1715
  /**
1700
1716
  * Object containing fields specification of the form.
@@ -1745,7 +1761,7 @@ class kt {
1745
1761
  * Context for each field in the form
1746
1762
  */
1747
1763
  n(this, "_contextForFields", {});
1748
- this._fields = t, this._container = new S(e, 6, !1, "root");
1764
+ this._fields = t, this._container = new z(e, 6, !1, "root");
1749
1765
  }
1750
1766
  get fields() {
1751
1767
  return this._fields;
@@ -1802,7 +1818,7 @@ class kt {
1802
1818
  fields: a.children,
1803
1819
  container: this._container,
1804
1820
  values: s
1805
- }), et(this._container._rows).forEach((h) => {
1821
+ }), tt(this._container._rows).forEach((h) => {
1806
1822
  const _ = h;
1807
1823
  _._id && _._context && (this._contextForFields[_._id] = h._context);
1808
1824
  });
@@ -1841,10 +1857,10 @@ class kt {
1841
1857
  widgetType: l
1842
1858
  });
1843
1859
  let f;
1844
- l === "button" && u.states ? f = Ue({
1860
+ l === "button" && u.states ? f = Ke({
1845
1861
  states: u.states,
1846
1862
  values: s
1847
- }) : f = Xe({
1863
+ }) : f = Ue({
1848
1864
  fieldName: u.name,
1849
1865
  values: s,
1850
1866
  fields: this._fields
@@ -1854,21 +1870,21 @@ class kt {
1854
1870
  values: s,
1855
1871
  fields: this._fields
1856
1872
  });
1857
- u.on_change && (this._onChangeFields[u.name] = Ze(
1873
+ u.on_change && (this._onChangeFields[u.name] = et(
1858
1874
  u.on_change
1859
1875
  ));
1860
1876
  let m;
1861
1877
  q(u.domain) ? m = u.domain : q((F = this._fields[u.name]) == null ? void 0 : F.domain) && (m = this._fields[u.name].domain), this._keyIdx = this._keyIdx + 1;
1862
- const p = {
1878
+ const x = {
1863
1879
  ...d,
1864
1880
  ...f,
1865
1881
  context: c,
1866
1882
  domain: m,
1867
1883
  key: `${this._keyIdx}`
1868
1884
  };
1869
- e.readOnly && (p.readonly = !0);
1870
- const y = r.createWidget(_, p);
1871
- y.invisible && y instanceof g && this._invisibleFields.push(p.name), y instanceof x && this.parseNode({
1885
+ e.readOnly && (x.readonly = !0);
1886
+ const y = r.createWidget(_, x);
1887
+ y.invisible && y instanceof g && this._invisibleFields.push(x.name), y instanceof p && this.parseNode({
1872
1888
  fields: h,
1873
1889
  container: y.container,
1874
1890
  values: s
@@ -1886,7 +1902,7 @@ class kt {
1886
1902
  function q(i) {
1887
1903
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
1888
1904
  }
1889
- class Ot {
1905
+ class Tt {
1890
1906
  constructor(t) {
1891
1907
  /**
1892
1908
  * Object containing fields specification of the form.
@@ -1992,7 +2008,7 @@ class Ot {
1992
2008
  return this._columns.find((e) => e.findById ? e.findById(t) : !1);
1993
2009
  }
1994
2010
  }
1995
- const tt = {
2011
+ const it = {
1996
2012
  text: "text",
1997
2013
  many2one: "many2one",
1998
2014
  char: "char",
@@ -2005,7 +2021,7 @@ const tt = {
2005
2021
  date: "date",
2006
2022
  datetime: "datetime"
2007
2023
  };
2008
- class Tt {
2024
+ class Pt {
2009
2025
  constructor(t, e, s = 8) {
2010
2026
  /**
2011
2027
  * Object containing the specific fields for primary and secondary search fields
@@ -2017,7 +2033,7 @@ class Tt {
2017
2033
  n(this, "_fields");
2018
2034
  n(this, "_simpleSearchContainer");
2019
2035
  n(this, "_advancedSearchContainer");
2020
- this._searchFields = t, this._fields = e, this._simpleSearchContainer = new S(s), this._advancedSearchContainer = new S(s);
2036
+ this._searchFields = t, this._fields = e, this._simpleSearchContainer = new z(s), this._advancedSearchContainer = new z(s);
2021
2037
  }
2022
2038
  get searchFields() {
2023
2039
  return this._searchFields;
@@ -2053,7 +2069,7 @@ class Tt {
2053
2069
  colspan: 2
2054
2070
  }, { type: a, widget: l } = r;
2055
2071
  let o = l ?? a;
2056
- return tt[o] === void 0 && (o = a), e.createWidget(o, r);
2072
+ return it[o] === void 0 && (o = a), e.createWidget(o, r);
2057
2073
  });
2058
2074
  }
2059
2075
  /**
@@ -2064,7 +2080,7 @@ class Tt {
2064
2080
  return this.advancedSearchContainer.findById(t);
2065
2081
  }
2066
2082
  }
2067
- const Pt = ({
2083
+ const Wt = ({
2068
2084
  domain: i,
2069
2085
  widgetFieldName: t
2070
2086
  }) => {
@@ -2079,8 +2095,8 @@ const Pt = ({
2079
2095
  r.length - 1
2080
2096
  )) : (o = r, h = "id"), o === t && e.push([h, a, l]);
2081
2097
  }), e;
2082
- }, Wt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2083
- class it {
2098
+ }, Et = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2099
+ class st {
2084
2100
  constructor(t) {
2085
2101
  n(this, "_action_id", null);
2086
2102
  n(this, "_position", null);
@@ -2093,7 +2109,7 @@ class it {
2093
2109
  return this._position;
2094
2110
  }
2095
2111
  }
2096
- class Et {
2112
+ class It {
2097
2113
  constructor(t) {
2098
2114
  n(this, "_string", null);
2099
2115
  n(this, "_items", []);
@@ -2101,7 +2117,7 @@ class Et {
2101
2117
  this._string = e.attributes.string || null;
2102
2118
  const { children: s } = e;
2103
2119
  s.forEach((r) => {
2104
- r.tagName === "dashboard_item" && this._items.push(new it(r.attributes));
2120
+ r.tagName === "dashboard_item" && this._items.push(new st(r.attributes));
2105
2121
  });
2106
2122
  }
2107
2123
  get string() {
@@ -2139,7 +2155,7 @@ class ne {
2139
2155
  return this._y_range;
2140
2156
  }
2141
2157
  }
2142
- const st = (i) => i === 1 || i === "1" || i === !0 || i === "True";
2158
+ const nt = (i) => i === 1 || i === "1" || i === !0 || i === "True";
2143
2159
  class re extends ne {
2144
2160
  constructor(e, s) {
2145
2161
  super(s);
@@ -2148,7 +2164,7 @@ class re extends ne {
2148
2164
  n(this, "_totalDomain", null);
2149
2165
  n(this, "_showPercent", !1);
2150
2166
  n(this, "_suffix", null);
2151
- this._type = e, this._color = s.attributes.color || null, this._color && (this._color = b(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = b(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = b(s.attributes.totalDomain) || null, this._showPercent = st(s.attributes.showPercent);
2167
+ this._type = e, this._color = s.attributes.color || null, this._color && (this._color = b(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = b(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = b(s.attributes.totalDomain) || null, this._showPercent = nt(s.attributes.showPercent);
2152
2168
  }
2153
2169
  get color() {
2154
2170
  return this._color;
@@ -2166,7 +2182,7 @@ class re extends ne {
2166
2182
  return this._suffix;
2167
2183
  }
2168
2184
  }
2169
- class nt extends re {
2185
+ class rt extends re {
2170
2186
  constructor(e, s) {
2171
2187
  super(e, s);
2172
2188
  n(this, "_field");
@@ -2186,7 +2202,7 @@ class nt extends re {
2186
2202
  return this._operator;
2187
2203
  }
2188
2204
  }
2189
- const rt = (i) => {
2205
+ const at = (i) => {
2190
2206
  const t = [];
2191
2207
  let e;
2192
2208
  if (i.forEach((s) => {
@@ -2196,10 +2212,10 @@ const rt = (i) => {
2196
2212
  throw new Error(`Field ${l} doesn't have an axis`);
2197
2213
  if (!l)
2198
2214
  throw new Error("Missing name attribute for field");
2199
- r === "x" ? e = new ot({
2215
+ r === "x" ? e = new ct({
2200
2216
  name: l
2201
2217
  }) : r === "y" && t.push(
2202
- new lt({
2218
+ new ot({
2203
2219
  name: l,
2204
2220
  operator: a,
2205
2221
  label: o,
@@ -2222,7 +2238,7 @@ class D extends ne {
2222
2238
  n(this, "_x");
2223
2239
  n(this, "_y");
2224
2240
  this._type = e;
2225
- const r = rt(s.children);
2241
+ const r = at(s.children);
2226
2242
  this._x = r.x, this._y = r.y;
2227
2243
  }
2228
2244
  get x() {
@@ -2232,17 +2248,17 @@ class D extends ne {
2232
2248
  return this._y;
2233
2249
  }
2234
2250
  }
2235
- const at = {
2251
+ const lt = {
2236
2252
  indicator: re,
2237
- indicatorField: nt,
2253
+ indicatorField: rt,
2238
2254
  line: D,
2239
2255
  bar: D,
2240
2256
  pie: D
2241
- }, It = (i) => {
2257
+ }, St = (i) => {
2242
2258
  const t = Y.parse(i).filter((r) => r.tagName === "graph")[0], e = t.attributes.type;
2243
2259
  if (!e)
2244
2260
  throw new Error(`${e} is not a valid graph`);
2245
- const s = at[e];
2261
+ const s = lt[e];
2246
2262
  if (!s)
2247
2263
  throw new Error(`${e} not found as a GraphModel`);
2248
2264
  return new s(e, t);
@@ -2260,7 +2276,7 @@ class ae {
2260
2276
  return this._axis;
2261
2277
  }
2262
2278
  }
2263
- class lt extends ae {
2279
+ class ot extends ae {
2264
2280
  constructor({
2265
2281
  name: e,
2266
2282
  operator: s,
@@ -2283,12 +2299,12 @@ class lt extends ae {
2283
2299
  return this._stacked;
2284
2300
  }
2285
2301
  }
2286
- class ot extends ae {
2302
+ class ct extends ae {
2287
2303
  constructor({ name: t }) {
2288
2304
  super({ name: t, axis: "x" });
2289
2305
  }
2290
2306
  }
2291
- const ct = ({ ooui: i }) => {
2307
+ const dt = ({ ooui: i }) => {
2292
2308
  const e = [i.x.name];
2293
2309
  return i.y ? (i.y.forEach((s) => {
2294
2310
  s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
@@ -2312,25 +2328,25 @@ function G({
2312
2328
  }
2313
2329
  const zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2314
2330
  __proto__: null,
2315
- getFieldsToRetrieve: ct,
2331
+ getFieldsToRetrieve: dt,
2316
2332
  getValueAndLabelForField: G
2317
2333
  }, Symbol.toStringTag, { value: "Module" }));
2318
- function dt({
2334
+ function ut({
2319
2335
  values: i,
2320
2336
  timerange: t,
2321
2337
  interval: e = 1
2322
2338
  }) {
2323
- const s = _t({
2339
+ const s = ft({
2324
2340
  values: i,
2325
2341
  timerange: t
2326
2342
  });
2327
- return ut({
2343
+ return ht({
2328
2344
  values: s,
2329
2345
  timerange: t,
2330
2346
  interval: e
2331
2347
  });
2332
2348
  }
2333
- function ut({
2349
+ function ht({
2334
2350
  values: i,
2335
2351
  timerange: t,
2336
2352
  interval: e = 1
@@ -2348,7 +2364,7 @@ function ut({
2348
2364
  return;
2349
2365
  const d = u.x, f = h[_ + 1].x;
2350
2366
  if (!le([d, f], a)) {
2351
- const c = ht({
2367
+ const c = _t({
2352
2368
  dates: [d, f],
2353
2369
  timerange: t,
2354
2370
  interval: e
@@ -2365,7 +2381,7 @@ function ut({
2365
2381
  }
2366
2382
  }), s.sort((o, h) => o.x < h.x ? -1 : o.x > h.x ? 1 : 0);
2367
2383
  }
2368
- function ht({
2384
+ function _t({
2369
2385
  dates: i,
2370
2386
  timerange: t,
2371
2387
  interval: e = 1
@@ -2377,21 +2393,21 @@ function ht({
2377
2393
  for (let l = 0; l < a.length - 1; l++) {
2378
2394
  const o = a[l], h = a[l + 1];
2379
2395
  if (!le([o, h], r)) {
2380
- const _ = P(o, z(r)).add(
2396
+ const _ = P(o, S(r)).add(
2381
2397
  e,
2382
2398
  r
2383
- ), u = P(h, z(r));
2399
+ ), u = P(h, S(r));
2384
2400
  for (; _.isBefore(u); )
2385
- s.push(_.format(z(r))), _.add(e, r);
2401
+ s.push(_.format(S(r))), _.add(e, r);
2386
2402
  }
2387
2403
  }
2388
2404
  return s;
2389
2405
  }
2390
- function _t({
2406
+ function ft({
2391
2407
  values: i,
2392
2408
  timerange: t
2393
2409
  }) {
2394
- const e = ft({
2410
+ const e = gt({
2395
2411
  values: i,
2396
2412
  timerange: t
2397
2413
  }), s = [], r = oe({
@@ -2409,23 +2425,23 @@ function _t({
2409
2425
  });
2410
2426
  }), s;
2411
2427
  }
2412
- function ft({
2428
+ function gt({
2413
2429
  values: i,
2414
2430
  timerange: t
2415
2431
  }) {
2416
2432
  return i.map((e) => ({
2417
2433
  ...e,
2418
- x: gt({
2434
+ x: mt({
2419
2435
  date: e.x,
2420
2436
  timerange: t
2421
2437
  })
2422
2438
  }));
2423
2439
  }
2424
- function gt({
2440
+ function mt({
2425
2441
  date: i,
2426
2442
  timerange: t
2427
2443
  }) {
2428
- let e = mt(i);
2444
+ let e = bt(i);
2429
2445
  const s = P(i, e);
2430
2446
  switch (t) {
2431
2447
  case "hour": {
@@ -2451,12 +2467,12 @@ function gt({
2451
2467
  }
2452
2468
  return s.format(e);
2453
2469
  }
2454
- function mt(i) {
2470
+ function bt(i) {
2455
2471
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2456
2472
  }
2457
2473
  function le(i, t) {
2458
2474
  let e = !1;
2459
- const s = z(t);
2475
+ const s = S(t);
2460
2476
  if (i.length === 0)
2461
2477
  return !1;
2462
2478
  if (i.length === 1)
@@ -2477,7 +2493,7 @@ function oe({
2477
2493
  e[o] || (e[o] = []), e[o].push(s);
2478
2494
  }), e;
2479
2495
  }
2480
- function z(i) {
2496
+ function S(i) {
2481
2497
  switch (i) {
2482
2498
  case "days":
2483
2499
  return "YYYY-MM-DD";
@@ -2492,7 +2508,7 @@ function z(i) {
2492
2508
  return "YYYY-MM-DD HH:mm";
2493
2509
  }
2494
2510
  }
2495
- const bt = {
2511
+ const yt = {
2496
2512
  count: "count",
2497
2513
  "+": "sum",
2498
2514
  "-": "subtract",
@@ -2500,7 +2516,7 @@ const bt = {
2500
2516
  avg: "average",
2501
2517
  min: "min",
2502
2518
  max: "max"
2503
- }, yt = ({
2519
+ }, xt = ({
2504
2520
  ooui: i,
2505
2521
  values: t,
2506
2522
  fields: e,
@@ -2513,7 +2529,7 @@ const bt = {
2513
2529
  }), a = [];
2514
2530
  i.y.forEach((c) => {
2515
2531
  Object.keys(r).forEach((m) => {
2516
- const p = r[m].label, y = r[m].entries;
2532
+ const x = r[m].label, y = r[m].entries;
2517
2533
  if (c.label) {
2518
2534
  const w = N({
2519
2535
  fieldName: c.label,
@@ -2530,7 +2546,7 @@ const bt = {
2530
2546
  operator: c.operator
2531
2547
  });
2532
2548
  a.push({
2533
- x: p || !1,
2549
+ x: x || !1,
2534
2550
  value: he,
2535
2551
  type: E,
2536
2552
  operator: c.operator,
@@ -2547,7 +2563,7 @@ const bt = {
2547
2563
  operator: c.operator
2548
2564
  });
2549
2565
  a.push({
2550
- x: p || !1,
2566
+ x: x || !1,
2551
2567
  value: F,
2552
2568
  type: ce({
2553
2569
  yAxis: c,
@@ -2567,7 +2583,7 @@ const bt = {
2567
2583
  (c) => c.x !== !1
2568
2584
  ));
2569
2585
  let d = u;
2570
- i.timerange ? d = dt({
2586
+ i.timerange ? d = ut({
2571
2587
  values: d,
2572
2588
  timerange: i.timerange,
2573
2589
  interval: i.interval
@@ -2672,7 +2688,7 @@ function de(i, t = 0.1) {
2672
2688
  max: r + a
2673
2689
  };
2674
2690
  }
2675
- const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2691
+ const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2676
2692
  __proto__: null,
2677
2693
  getAllObjectsInGroupedValues: pt,
2678
2694
  getMinMax: de,
@@ -2680,8 +2696,8 @@ const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2680
2696
  getValuesForYField: M,
2681
2697
  getValuesGroupedByField: N,
2682
2698
  getYAxisFieldname: ce,
2683
- labelsForOperator: bt,
2684
- processGraphData: yt
2699
+ labelsForOperator: yt,
2700
+ processGraphData: xt
2685
2701
  }, Symbol.toStringTag, { value: "Module" }));
2686
2702
  export {
2687
2703
  Je as Alert,
@@ -2693,24 +2709,24 @@ export {
2693
2709
  $ as Char,
2694
2710
  ee as CodeEditor,
2695
2711
  He as Comments,
2696
- S as Container,
2697
- x as ContainerWidget,
2698
- Et as Dashboard,
2699
- it as DashboardItem,
2700
- ze as Date,
2701
- Se as DateTime,
2712
+ z as Container,
2713
+ p as ContainerWidget,
2714
+ It as Dashboard,
2715
+ st as DashboardItem,
2716
+ Se as Date,
2717
+ ze as DateTime,
2702
2718
  Qe as Email,
2703
2719
  g as Field,
2704
2720
  B as Float,
2705
2721
  We as FloatTime,
2706
- kt as Form,
2722
+ Ot as Form,
2707
2723
  ne as Graph,
2708
2724
  ae as GraphAxis,
2709
2725
  D as GraphChart,
2710
2726
  re as GraphIndicator,
2711
- nt as GraphIndicatorField,
2712
- ot as GraphXAxis,
2713
- lt as GraphYAxis,
2727
+ rt as GraphIndicatorField,
2728
+ ct as GraphXAxis,
2729
+ ot as GraphYAxis,
2714
2730
  Ce as Group,
2715
2731
  Ee as HTMLPreview,
2716
2732
  je as Image,
@@ -2728,10 +2744,11 @@ export {
2728
2744
  Ie as ProgressBar,
2729
2745
  Ge as Radio,
2730
2746
  Ye as Reference,
2731
- tt as SearchFieldTypes,
2732
- Tt as SearchFilter,
2747
+ it as SearchFieldTypes,
2748
+ Pt as SearchFilter,
2733
2749
  W as Selection,
2734
2750
  Ve as Separator,
2751
+ Xe as Spinner,
2735
2752
  Re as Steps,
2736
2753
  $e as Switch,
2737
2754
  Le as Tag,
@@ -2739,14 +2756,14 @@ export {
2739
2756
  A as Text,
2740
2757
  qe as Time,
2741
2758
  Ne as Timeline,
2742
- Ot as Tree,
2759
+ Tt as Tree,
2743
2760
  C as Widget,
2744
2761
  zt as graphFieldUtils,
2745
- St as graphProcessor,
2762
+ Vt as graphProcessor,
2746
2763
  te as parseContext,
2747
- Ct as parseContextFields,
2748
- Wt as parseDomainFields,
2749
- It as parseGraph,
2750
- Pt as transformDomainForChildWidget
2764
+ kt as parseContextFields,
2765
+ Et as parseDomainFields,
2766
+ St as parseGraph,
2767
+ Wt as transformDomainForChildWidget
2751
2768
  };
2752
2769
  //# sourceMappingURL=ooui.es.js.map