@gisce/ooui 2.37.1 → 2.38.0-alpha.2

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
@@ -669,8 +669,8 @@ const W = class W extends w {
669
669
  }
670
670
  };
671
671
  r(W, "_defaultColspan", 3);
672
- let M = W;
673
- class R extends w {
672
+ let A = W;
673
+ class j extends w {
674
674
  constructor(e) {
675
675
  super(e);
676
676
  r(this, "_loading", !1);
@@ -683,7 +683,7 @@ class R extends w {
683
683
  this._loading = e;
684
684
  }
685
685
  }
686
- class Pe extends R {
686
+ class Pe extends j {
687
687
  constructor(e) {
688
688
  super(e);
689
689
  r(this, "_icon", null);
@@ -696,7 +696,7 @@ class Pe extends R {
696
696
  this._icon = e;
697
697
  }
698
698
  }
699
- class Oe extends R {
699
+ class Oe extends j {
700
700
  constructor(e) {
701
701
  var s;
702
702
  super(e);
@@ -833,7 +833,9 @@ class We extends w {
833
833
  return this._container.rows.flat().filter((e) => !e.invisible);
834
834
  }
835
835
  }
836
- class A extends f {
836
+ class Te extends f {
837
+ }
838
+ class N extends f {
837
839
  constructor(e) {
838
840
  super(e);
839
841
  /**
@@ -956,7 +958,7 @@ class z extends f {
956
958
  this._size = e;
957
959
  }
958
960
  }
959
- class Te extends f {
961
+ class ze extends f {
960
962
  constructor(e) {
961
963
  super(e);
962
964
  /**
@@ -991,14 +993,14 @@ class Te extends f {
991
993
  return this.parsedWidgetProps.showMenu;
992
994
  }
993
995
  }
994
- class ze extends L {
996
+ class Se extends L {
995
997
  }
996
998
  class te extends f {
997
999
  constructor(t) {
998
1000
  super(t);
999
1001
  }
1000
1002
  }
1001
- class Se extends f {
1003
+ class Ie extends f {
1002
1004
  constructor(t) {
1003
1005
  super(t);
1004
1006
  }
@@ -1036,18 +1038,18 @@ class G extends f {
1036
1038
  this._decimalDigits = e;
1037
1039
  }
1038
1040
  }
1039
- class Ie extends G {
1041
+ class Ee extends G {
1040
1042
  }
1041
- class Ee extends f {
1043
+ class Ve extends f {
1042
1044
  }
1043
- class Ve extends G {
1045
+ class Ye extends G {
1044
1046
  }
1045
- class Ye extends f {
1047
+ class De extends f {
1046
1048
  constructor(t) {
1047
1049
  super(t);
1048
1050
  }
1049
1051
  }
1050
- class De extends f {
1052
+ class je extends f {
1051
1053
  constructor(e) {
1052
1054
  super(e);
1053
1055
  r(this, "_timezone");
@@ -1154,7 +1156,7 @@ class ie extends f {
1154
1156
  this._infinite = e;
1155
1157
  }
1156
1158
  }
1157
- class je extends C {
1159
+ class Me extends C {
1158
1160
  constructor(e) {
1159
1161
  super(e);
1160
1162
  /**
@@ -1180,9 +1182,9 @@ class je extends C {
1180
1182
  return null;
1181
1183
  }
1182
1184
  }
1183
- class Me extends z {
1185
+ class Ae extends z {
1184
1186
  }
1185
- class Ae extends f {
1187
+ class Ne extends f {
1186
1188
  constructor(e) {
1187
1189
  super(e);
1188
1190
  /**
@@ -1198,18 +1200,18 @@ class Ae extends f {
1198
1200
  this._filenameField = e;
1199
1201
  }
1200
1202
  }
1201
- class Ne extends f {
1203
+ class Be extends f {
1202
1204
  get showControls() {
1203
1205
  var t;
1204
1206
  return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
1205
1207
  }
1206
1208
  }
1207
- class Be extends f {
1209
+ class Re extends f {
1208
1210
  constructor(t) {
1209
1211
  super(t);
1210
1212
  }
1211
1213
  }
1212
- class Re extends ie {
1214
+ class Le extends ie {
1213
1215
  constructor(e) {
1214
1216
  super(e);
1215
1217
  /**
@@ -1241,7 +1243,7 @@ class Re extends ie {
1241
1243
  return this.parsedWidgetProps.colorField;
1242
1244
  }
1243
1245
  }
1244
- class Le extends z {
1246
+ class Ge extends z {
1245
1247
  constructor(e) {
1246
1248
  super(e);
1247
1249
  r(this, "_nolabel", !0);
@@ -1368,9 +1370,9 @@ class se extends f {
1368
1370
  this._columns = e;
1369
1371
  }
1370
1372
  }
1371
- class Ge extends se {
1373
+ class $e extends se {
1372
1374
  }
1373
- class $e extends z {
1375
+ class qe extends z {
1374
1376
  get colors() {
1375
1377
  return this._parsedWidgetProps.colors || {};
1376
1378
  }
@@ -1379,7 +1381,7 @@ class $e extends z {
1379
1381
  return ((t = this._parsedWidgetProps) == null ? void 0 : t.colorField) || null;
1380
1382
  }
1381
1383
  }
1382
- class qe extends z {
1384
+ class Je extends z {
1383
1385
  constructor(e) {
1384
1386
  super(e);
1385
1387
  /**
@@ -1395,9 +1397,9 @@ class qe extends z {
1395
1397
  this._direction = e;
1396
1398
  }
1397
1399
  }
1398
- class Je extends te {
1400
+ class He extends te {
1399
1401
  }
1400
- class He extends f {
1402
+ class Qe extends f {
1401
1403
  constructor(e) {
1402
1404
  super(e);
1403
1405
  /**
@@ -1440,12 +1442,12 @@ class re extends L {
1440
1442
  this._lang = e;
1441
1443
  }
1442
1444
  }
1443
- class Qe extends f {
1445
+ class Xe extends f {
1444
1446
  constructor(t) {
1445
1447
  super(t);
1446
1448
  }
1447
1449
  }
1448
- class Xe extends w {
1450
+ class Ue extends w {
1449
1451
  constructor(e) {
1450
1452
  super(e);
1451
1453
  /**
@@ -1485,7 +1487,7 @@ class Xe extends w {
1485
1487
  return this._container.rows.flat().filter((e) => !e.invisible);
1486
1488
  }
1487
1489
  }
1488
- class Ue extends f {
1490
+ class Ke extends f {
1489
1491
  constructor(e) {
1490
1492
  super(e);
1491
1493
  /**
@@ -1510,7 +1512,7 @@ class H extends re {
1510
1512
  r(this, "_lang", "json");
1511
1513
  }
1512
1514
  }
1513
- class Ke extends f {
1515
+ class Ze extends f {
1514
1516
  constructor(e) {
1515
1517
  super(e);
1516
1518
  r(this, "_multi", !1);
@@ -1530,7 +1532,7 @@ class Ke extends f {
1530
1532
  this._size = e;
1531
1533
  }
1532
1534
  }
1533
- class Ze extends w {
1535
+ class et extends w {
1534
1536
  constructor(e) {
1535
1537
  super(e);
1536
1538
  r(this, "_autoPlay", !0);
@@ -1546,12 +1548,12 @@ class Ze extends w {
1546
1548
  return this._container.rows.flat().filter((e) => !e.invisible);
1547
1549
  }
1548
1550
  }
1549
- class et extends A {
1551
+ class tt extends N {
1550
1552
  get showText() {
1551
1553
  return this.parsedWidgetProps.show_text ?? !0;
1552
1554
  }
1553
1555
  }
1554
- class tt extends f {
1556
+ class it extends f {
1555
1557
  get width() {
1556
1558
  var t;
1557
1559
  return (t = this.parsedWidgetProps) == null ? void 0 : t.width;
@@ -1565,6 +1567,26 @@ class tt extends f {
1565
1567
  return console.log(this.parsedWidgetProps), ((t = this.parsedWidgetProps) == null ? void 0 : t.showValue) ?? !1;
1566
1568
  }
1567
1569
  }
1570
+ class st extends j {
1571
+ constructor(e) {
1572
+ super(e);
1573
+ r(this, "_title", null);
1574
+ r(this, "_icon", null);
1575
+ e && (e.title && (this._title = e.title), e.icon && (this._icon = e.icon));
1576
+ }
1577
+ get title() {
1578
+ return this._title;
1579
+ }
1580
+ set title(e) {
1581
+ this._title = e;
1582
+ }
1583
+ get icon() {
1584
+ return this._icon;
1585
+ }
1586
+ set icon(e) {
1587
+ this._icon = e;
1588
+ }
1589
+ }
1568
1590
  class $ {
1569
1591
  constructor() {
1570
1592
  /**
@@ -1575,7 +1597,7 @@ class $ {
1575
1597
  setWidgetClass(t) {
1576
1598
  switch (t) {
1577
1599
  case "notebook":
1578
- this._widgetClass = M;
1600
+ this._widgetClass = A;
1579
1601
  break;
1580
1602
  case "page":
1581
1603
  this._widgetClass = Pe;
@@ -1583,11 +1605,14 @@ class $ {
1583
1605
  case "group":
1584
1606
  this._widgetClass = Oe;
1585
1607
  break;
1608
+ case "card":
1609
+ this._widgetClass = st;
1610
+ break;
1586
1611
  case "label":
1587
1612
  this._widgetClass = Z;
1588
1613
  break;
1589
1614
  case "char":
1590
- this._widgetClass = A;
1615
+ this._widgetClass = N;
1591
1616
  break;
1592
1617
  case "text":
1593
1618
  this._widgetClass = L;
@@ -1598,35 +1623,38 @@ class $ {
1598
1623
  case "buttonGroup":
1599
1624
  this._widgetClass = We;
1600
1625
  break;
1626
+ case "action_buttons":
1627
+ this._widgetClass = Te;
1628
+ break;
1601
1629
  case "selection":
1602
1630
  this._widgetClass = z;
1603
1631
  break;
1604
1632
  case "many2one":
1605
- this._widgetClass = Te;
1633
+ this._widgetClass = ze;
1606
1634
  break;
1607
1635
  case "boolean":
1608
1636
  this._widgetClass = te;
1609
1637
  break;
1610
1638
  case "integer":
1611
- this._widgetClass = Se;
1639
+ this._widgetClass = Ie;
1612
1640
  break;
1613
1641
  case "float":
1614
1642
  this._widgetClass = G;
1615
1643
  break;
1616
1644
  case "float_time":
1617
- this._widgetClass = Ie;
1645
+ this._widgetClass = Ee;
1618
1646
  break;
1619
1647
  case "date":
1620
- this._widgetClass = Ye;
1648
+ this._widgetClass = De;
1621
1649
  break;
1622
1650
  case "datetime":
1623
- this._widgetClass = De;
1651
+ this._widgetClass = je;
1624
1652
  break;
1625
1653
  case "progressbar":
1626
- this._widgetClass = Ve;
1654
+ this._widgetClass = Ye;
1627
1655
  break;
1628
1656
  case "markdown":
1629
- this._widgetClass = ze;
1657
+ this._widgetClass = Se;
1630
1658
  break;
1631
1659
  case "many2many":
1632
1660
  case "one2many":
@@ -1637,67 +1665,67 @@ class $ {
1637
1665
  this._widgetClass = K;
1638
1666
  break;
1639
1667
  case "separator":
1640
- this._widgetClass = je;
1668
+ this._widgetClass = Me;
1641
1669
  break;
1642
1670
  case "url":
1643
- this._widgetClass = A;
1671
+ this._widgetClass = N;
1644
1672
  break;
1645
1673
  case "email":
1646
- this._widgetClass = Ke;
1674
+ this._widgetClass = Ze;
1647
1675
  break;
1648
1676
  case "reference":
1649
- this._widgetClass = Me;
1677
+ this._widgetClass = Ae;
1650
1678
  break;
1651
1679
  case "binary":
1652
- this._widgetClass = Ae;
1680
+ this._widgetClass = Ne;
1653
1681
  break;
1654
1682
  case "image":
1655
- this._widgetClass = Ne;
1683
+ this._widgetClass = Be;
1656
1684
  break;
1657
1685
  case "fiber_grid":
1658
- this._widgetClass = Be;
1686
+ this._widgetClass = Re;
1659
1687
  break;
1660
1688
  case "timeline":
1661
- this._widgetClass = Re;
1689
+ this._widgetClass = Le;
1662
1690
  break;
1663
1691
  case "indicator":
1664
- this._widgetClass = Le;
1692
+ this._widgetClass = Ge;
1665
1693
  break;
1666
1694
  case "tags":
1667
- this._widgetClass = Ge;
1695
+ this._widgetClass = $e;
1668
1696
  break;
1669
1697
  case "tag":
1670
- this._widgetClass = $e;
1698
+ this._widgetClass = qe;
1671
1699
  break;
1672
1700
  case "avatar":
1673
1701
  this._widgetClass = ke;
1674
1702
  break;
1675
1703
  case "radio":
1676
- this._widgetClass = qe;
1704
+ this._widgetClass = Je;
1677
1705
  break;
1678
1706
  case "multicheckbox":
1679
1707
  this._widgetClass = se;
1680
1708
  break;
1681
1709
  case "switch":
1682
- this._widgetClass = Je;
1710
+ this._widgetClass = He;
1683
1711
  break;
1684
1712
  case "steps":
1685
- this._widgetClass = He;
1713
+ this._widgetClass = Qe;
1686
1714
  break;
1687
1715
  case "codeeditor":
1688
1716
  this._widgetClass = re;
1689
1717
  break;
1690
1718
  case "time":
1691
- this._widgetClass = Qe;
1719
+ this._widgetClass = Xe;
1692
1720
  break;
1693
1721
  case "html_preview":
1694
- this._widgetClass = Ee;
1722
+ this._widgetClass = Ve;
1695
1723
  break;
1696
1724
  case "alert":
1697
- this._widgetClass = Xe;
1725
+ this._widgetClass = Ue;
1698
1726
  break;
1699
1727
  case "comments_timeline":
1700
- this._widgetClass = Ue;
1728
+ this._widgetClass = Ke;
1701
1729
  break;
1702
1730
  case "json":
1703
1731
  this._widgetClass = H;
@@ -1706,16 +1734,16 @@ class $ {
1706
1734
  this._widgetClass = H;
1707
1735
  break;
1708
1736
  case "spinner":
1709
- this._widgetClass = R;
1737
+ this._widgetClass = j;
1710
1738
  break;
1711
1739
  case "carousel":
1712
- this._widgetClass = Ze;
1740
+ this._widgetClass = et;
1713
1741
  break;
1714
1742
  case "colorPicker":
1715
- this._widgetClass = et;
1743
+ this._widgetClass = tt;
1716
1744
  break;
1717
1745
  case "qrcode":
1718
- this._widgetClass = tt;
1746
+ this._widgetClass = it;
1719
1747
  break;
1720
1748
  }
1721
1749
  }
@@ -1726,6 +1754,7 @@ class $ {
1726
1754
  case "notebook":
1727
1755
  case "page":
1728
1756
  case "group":
1757
+ case "card":
1729
1758
  return new this._widgetClass({ ...e, type: s });
1730
1759
  case "button":
1731
1760
  return new this._widgetClass({
@@ -1738,7 +1767,7 @@ class $ {
1738
1767
  }
1739
1768
  }
1740
1769
  }
1741
- const it = ({
1770
+ const rt = ({
1742
1771
  fieldName: i,
1743
1772
  values: t,
1744
1773
  fields: e
@@ -1763,7 +1792,7 @@ const it = ({
1763
1792
  n[o] = d.some((_) => _);
1764
1793
  }
1765
1794
  return n;
1766
- }, st = ({
1795
+ }, nt = ({
1767
1796
  states: i,
1768
1797
  values: t
1769
1798
  }) => {
@@ -1772,7 +1801,7 @@ const it = ({
1772
1801
  const e = i.split(",");
1773
1802
  return e.length === 0 ? {} : e.includes(t.state) ? {} : { invisible: !0 };
1774
1803
  };
1775
- function rt({
1804
+ function at({
1776
1805
  values: i = {},
1777
1806
  fieldName: t,
1778
1807
  fields: e = {}
@@ -1800,7 +1829,7 @@ const ne = ({
1800
1829
  return u.forEach((c) => {
1801
1830
  const b = c[1];
1802
1831
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1803
- const x = rt({
1832
+ const x = at({
1804
1833
  values: t,
1805
1834
  fields: e,
1806
1835
  fieldName: b === "active_id" ? "id" : b
@@ -1815,7 +1844,7 @@ const ne = ({
1815
1844
  } catch {
1816
1845
  return;
1817
1846
  }
1818
- }, Tt = (i) => {
1847
+ }, St = (i) => {
1819
1848
  const t = [];
1820
1849
  try {
1821
1850
  return !i || le(i) || typeof i != "string" ? t : ae(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((u) => u.split(":")).forEach((u) => {
@@ -1835,14 +1864,14 @@ function ae(i) {
1835
1864
  function le(i) {
1836
1865
  return typeof i == "object" && i !== null && typeof i != "string";
1837
1866
  }
1838
- const nt = (i) => {
1867
+ const lt = (i) => {
1839
1868
  const t = i.trim().replace(")", "").split("("), e = t[0], n = t[1].split(",").map((a) => a.trim());
1840
1869
  return {
1841
1870
  method: e,
1842
1871
  args: n
1843
1872
  };
1844
1873
  };
1845
- function at(i) {
1874
+ function ot(i) {
1846
1875
  const t = [];
1847
1876
  function e(s) {
1848
1877
  const n = [];
@@ -1854,7 +1883,7 @@ function at(i) {
1854
1883
  e(s);
1855
1884
  return t.flat();
1856
1885
  }
1857
- class zt {
1886
+ class It {
1858
1887
  constructor(t, e = 4) {
1859
1888
  /**
1860
1889
  * Object containing fields specification of the form.
@@ -1970,7 +1999,7 @@ class zt {
1970
1999
  container: this._container,
1971
2000
  values: s
1972
2001
  });
1973
- const l = at(this._container._rows);
2002
+ const l = ot(this._container._rows);
1974
2003
  l.forEach((d) => {
1975
2004
  const _ = d;
1976
2005
  _._id && _._context && (this._contextForFields[_._id] = d._context);
@@ -2013,10 +2042,10 @@ class zt {
2013
2042
  widgetType: l
2014
2043
  });
2015
2044
  let g;
2016
- l === "button" && h.states ? g = st({
2045
+ l === "button" && h.states ? g = nt({
2017
2046
  states: h.states,
2018
2047
  values: s
2019
- }) : g = it({
2048
+ }) : g = rt({
2020
2049
  fieldName: h.name,
2021
2050
  values: s,
2022
2051
  fields: this._fields
@@ -2026,7 +2055,7 @@ class zt {
2026
2055
  values: s,
2027
2056
  fields: this._fields
2028
2057
  });
2029
- h.on_change && (this._onChangeFields[h.name] = nt(
2058
+ h.on_change && (this._onChangeFields[h.name] = lt(
2030
2059
  h.on_change
2031
2060
  ));
2032
2061
  let b;
@@ -2058,7 +2087,7 @@ class zt {
2058
2087
  function Q(i) {
2059
2088
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2060
2089
  }
2061
- class St {
2090
+ class Et {
2062
2091
  constructor(t) {
2063
2092
  /**
2064
2093
  * Object containing fields specification of the form.
@@ -2172,7 +2201,7 @@ class St {
2172
2201
  return this._columns.find((e) => e.findById ? e.findById(t) : !1);
2173
2202
  }
2174
2203
  }
2175
- const lt = {
2204
+ const ct = {
2176
2205
  text: "text",
2177
2206
  many2one: "many2one",
2178
2207
  char: "char",
@@ -2185,7 +2214,7 @@ const lt = {
2185
2214
  date: "date",
2186
2215
  datetime: "datetime"
2187
2216
  };
2188
- class It {
2217
+ class Vt {
2189
2218
  constructor(t, e, s = 8) {
2190
2219
  /**
2191
2220
  * Object containing the specific fields for primary and secondary search fields
@@ -2233,7 +2262,7 @@ class It {
2233
2262
  colspan: 2
2234
2263
  }, { type: a, widget: l } = n;
2235
2264
  let o = l ?? a;
2236
- return lt[o] === void 0 && (o = a), e.createWidget(o, n);
2265
+ return ct[o] === void 0 && (o = a), e.createWidget(o, n);
2237
2266
  });
2238
2267
  }
2239
2268
  /**
@@ -2244,7 +2273,7 @@ class It {
2244
2273
  return this.advancedSearchContainer.findById(t);
2245
2274
  }
2246
2275
  }
2247
- const Et = ({
2276
+ const Yt = ({
2248
2277
  domain: i,
2249
2278
  widgetFieldName: t
2250
2279
  }) => {
@@ -2259,8 +2288,8 @@ const Et = ({
2259
2288
  n.length - 1
2260
2289
  )) : (o = n, d = "id"), o === t && e.push([d, a, l]);
2261
2290
  }), e;
2262
- }, Vt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2263
- class ot {
2291
+ }, Dt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2292
+ class dt {
2264
2293
  constructor(t) {
2265
2294
  r(this, "_action_id", null);
2266
2295
  r(this, "_position", null);
@@ -2273,7 +2302,7 @@ class ot {
2273
2302
  return this._position;
2274
2303
  }
2275
2304
  }
2276
- class Yt {
2305
+ class jt {
2277
2306
  constructor(t) {
2278
2307
  r(this, "_string", null);
2279
2308
  r(this, "_items", []);
@@ -2281,7 +2310,7 @@ class Yt {
2281
2310
  this._string = e.attributes.string || null;
2282
2311
  const { children: s } = e;
2283
2312
  s.forEach((n) => {
2284
- n.tagName === "dashboard_item" && this._items.push(new ot(n.attributes));
2313
+ n.tagName === "dashboard_item" && this._items.push(new dt(n.attributes));
2285
2314
  });
2286
2315
  }
2287
2316
  get string() {
@@ -2345,7 +2374,7 @@ class ce extends oe {
2345
2374
  return this._suffix;
2346
2375
  }
2347
2376
  }
2348
- class ct extends ce {
2377
+ class ut extends ce {
2349
2378
  constructor(e, s) {
2350
2379
  super(e, s);
2351
2380
  r(this, "_field");
@@ -2365,7 +2394,7 @@ class ct extends ce {
2365
2394
  return this._operator;
2366
2395
  }
2367
2396
  }
2368
- const dt = (i) => {
2397
+ const ht = (i) => {
2369
2398
  const t = [];
2370
2399
  let e;
2371
2400
  if (i.forEach((s) => {
@@ -2375,10 +2404,10 @@ const dt = (i) => {
2375
2404
  throw new Error(`Field ${l} doesn't have an axis`);
2376
2405
  if (!l)
2377
2406
  throw new Error("Missing name attribute for field");
2378
- n === "x" ? e = new _t({
2407
+ n === "x" ? e = new gt({
2379
2408
  name: l
2380
2409
  }) : n === "y" && t.push(
2381
- new ht({
2410
+ new ft({
2382
2411
  name: l,
2383
2412
  operator: a,
2384
2413
  label: o,
@@ -2395,13 +2424,13 @@ const dt = (i) => {
2395
2424
  y: t
2396
2425
  };
2397
2426
  };
2398
- class j extends oe {
2427
+ class M extends oe {
2399
2428
  constructor(e, s) {
2400
2429
  super(s);
2401
2430
  r(this, "_x");
2402
2431
  r(this, "_y");
2403
2432
  this._type = e;
2404
- const n = dt(s.children);
2433
+ const n = ht(s.children);
2405
2434
  this._x = n.x, this._y = n.y;
2406
2435
  }
2407
2436
  get x() {
@@ -2411,17 +2440,17 @@ class j extends oe {
2411
2440
  return this._y;
2412
2441
  }
2413
2442
  }
2414
- const ut = {
2443
+ const _t = {
2415
2444
  indicator: ce,
2416
- indicatorField: ct,
2417
- line: j,
2418
- bar: j,
2419
- pie: j
2420
- }, Dt = (i) => {
2445
+ indicatorField: ut,
2446
+ line: M,
2447
+ bar: M,
2448
+ pie: M
2449
+ }, Mt = (i) => {
2421
2450
  const t = D.parse(i).filter((n) => n.tagName === "graph")[0], e = t.attributes.type;
2422
2451
  if (!e)
2423
2452
  throw new Error(`${e} is not a valid graph`);
2424
- const s = ut[e];
2453
+ const s = _t[e];
2425
2454
  if (!s)
2426
2455
  throw new Error(`${e} not found as a GraphModel`);
2427
2456
  return new s(e, t);
@@ -2439,7 +2468,7 @@ class de {
2439
2468
  return this._axis;
2440
2469
  }
2441
2470
  }
2442
- class ht extends de {
2471
+ class ft extends de {
2443
2472
  constructor({
2444
2473
  name: e,
2445
2474
  operator: s,
@@ -2462,12 +2491,12 @@ class ht extends de {
2462
2491
  return this._stacked;
2463
2492
  }
2464
2493
  }
2465
- class _t extends de {
2494
+ class gt extends de {
2466
2495
  constructor({ name: t }) {
2467
2496
  super({ name: t, axis: "x" });
2468
2497
  }
2469
2498
  }
2470
- const ft = ({ ooui: i }) => {
2499
+ const mt = ({ ooui: i }) => {
2471
2500
  const e = [i.x.name];
2472
2501
  return i.y ? (i.y.forEach((s) => {
2473
2502
  s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
@@ -2489,27 +2518,27 @@ function q({
2489
2518
  }
2490
2519
  return { value: n, label: n };
2491
2520
  }
2492
- const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2521
+ const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2493
2522
  __proto__: null,
2494
- getFieldsToRetrieve: ft,
2523
+ getFieldsToRetrieve: mt,
2495
2524
  getValueAndLabelForField: q
2496
2525
  }, Symbol.toStringTag, { value: "Module" }));
2497
- function gt({
2526
+ function bt({
2498
2527
  values: i,
2499
2528
  timerange: t,
2500
2529
  interval: e = 1
2501
2530
  }) {
2502
- const s = yt({
2531
+ const s = pt({
2503
2532
  values: i,
2504
2533
  timerange: t
2505
2534
  });
2506
- return mt({
2535
+ return yt({
2507
2536
  values: s,
2508
2537
  timerange: t,
2509
2538
  interval: e
2510
2539
  });
2511
2540
  }
2512
- function mt({
2541
+ function yt({
2513
2542
  values: i,
2514
2543
  timerange: t,
2515
2544
  interval: e = 1
@@ -2527,7 +2556,7 @@ function mt({
2527
2556
  return;
2528
2557
  const u = h.x, g = d[_ + 1].x;
2529
2558
  if (!ue([u, g], a)) {
2530
- const c = bt({
2559
+ const c = xt({
2531
2560
  dates: [u, g],
2532
2561
  timerange: t,
2533
2562
  interval: e
@@ -2544,7 +2573,7 @@ function mt({
2544
2573
  }
2545
2574
  }), s.sort((o, d) => o.x < d.x ? -1 : o.x > d.x ? 1 : 0);
2546
2575
  }
2547
- function bt({
2576
+ function xt({
2548
2577
  dates: i,
2549
2578
  timerange: t,
2550
2579
  interval: e = 1
@@ -2566,11 +2595,11 @@ function bt({
2566
2595
  }
2567
2596
  return s;
2568
2597
  }
2569
- function yt({
2598
+ function pt({
2570
2599
  values: i,
2571
2600
  timerange: t
2572
2601
  }) {
2573
- const e = xt({
2602
+ const e = wt({
2574
2603
  values: i,
2575
2604
  timerange: t
2576
2605
  }), s = [], n = he({
@@ -2588,23 +2617,23 @@ function yt({
2588
2617
  });
2589
2618
  }), s;
2590
2619
  }
2591
- function xt({
2620
+ function wt({
2592
2621
  values: i,
2593
2622
  timerange: t
2594
2623
  }) {
2595
2624
  return i.map((e) => ({
2596
2625
  ...e,
2597
- x: pt({
2626
+ x: Ft({
2598
2627
  date: e.x,
2599
2628
  timerange: t
2600
2629
  })
2601
2630
  }));
2602
2631
  }
2603
- function pt({
2632
+ function Ft({
2604
2633
  date: i,
2605
2634
  timerange: t
2606
2635
  }) {
2607
- let e = wt(i);
2636
+ let e = vt(i);
2608
2637
  const s = T(i, e);
2609
2638
  switch (t) {
2610
2639
  case "hour": {
@@ -2630,7 +2659,7 @@ function pt({
2630
2659
  }
2631
2660
  return s.format(e);
2632
2661
  }
2633
- function wt(i) {
2662
+ function vt(i) {
2634
2663
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2635
2664
  }
2636
2665
  function ue(i, t) {
@@ -2671,7 +2700,7 @@ function E(i) {
2671
2700
  return "YYYY-MM-DD HH:mm";
2672
2701
  }
2673
2702
  }
2674
- const Ft = {
2703
+ const Ct = {
2675
2704
  count: "count",
2676
2705
  "+": "sum",
2677
2706
  "-": "subtract",
@@ -2679,13 +2708,13 @@ const Ft = {
2679
2708
  avg: "average",
2680
2709
  min: "min",
2681
2710
  max: "max"
2682
- }, vt = ({
2711
+ }, kt = ({
2683
2712
  ooui: i,
2684
2713
  values: t,
2685
2714
  fields: e,
2686
2715
  options: s
2687
2716
  }) => {
2688
- const n = B({
2717
+ const n = R({
2689
2718
  fieldName: i.x.name,
2690
2719
  values: t,
2691
2720
  fields: e
@@ -2694,13 +2723,13 @@ const Ft = {
2694
2723
  Object.keys(n).forEach((b) => {
2695
2724
  const x = n[b].label, y = n[b].entries;
2696
2725
  if (c.label) {
2697
- const F = B({
2726
+ const F = R({
2698
2727
  fieldName: c.label,
2699
2728
  values: y,
2700
2729
  fields: e
2701
2730
  });
2702
2731
  Object.keys(F).forEach((v) => {
2703
- const p = F[v].entries, S = F[v].label, ge = N({
2732
+ const p = F[v].entries, S = F[v].label, ge = B({
2704
2733
  entries: p,
2705
2734
  fields: e,
2706
2735
  fieldName: c.name
@@ -2717,7 +2746,7 @@ const Ft = {
2717
2746
  });
2718
2747
  });
2719
2748
  } else {
2720
- const F = N({
2749
+ const F = B({
2721
2750
  entries: y,
2722
2751
  fields: e,
2723
2752
  fieldName: c.name
@@ -2746,7 +2775,7 @@ const Ft = {
2746
2775
  (c) => c.x !== !1
2747
2776
  ));
2748
2777
  let u = h;
2749
- i.timerange ? u = gt({
2778
+ i.timerange ? u = bt({
2750
2779
  values: u,
2751
2780
  timerange: i.timerange,
2752
2781
  interval: i.interval
@@ -2764,7 +2793,7 @@ const Ft = {
2764
2793
  }
2765
2794
  return g;
2766
2795
  };
2767
- function N({
2796
+ function B({
2768
2797
  entries: i,
2769
2798
  fieldName: t,
2770
2799
  fields: e
@@ -2813,7 +2842,7 @@ function Y({
2813
2842
  function I(i) {
2814
2843
  return Math.round((i + Number.EPSILON) * 100) / 100;
2815
2844
  }
2816
- function B({
2845
+ function R({
2817
2846
  fieldName: i,
2818
2847
  fields: t,
2819
2848
  values: e
@@ -2828,7 +2857,7 @@ function B({
2828
2857
  s[a] || (s[a] = { label: l, entries: [] }), s[a].entries.push(n);
2829
2858
  }), s;
2830
2859
  }
2831
- function Ct(i) {
2860
+ function Pt(i) {
2832
2861
  let t = [];
2833
2862
  return Object.keys(i).forEach((e) => {
2834
2863
  const s = i[e];
@@ -2851,85 +2880,87 @@ function fe(i, t = 0.1) {
2851
2880
  max: n + a
2852
2881
  };
2853
2882
  }
2854
- const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2883
+ const Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2855
2884
  __proto__: null,
2856
- getAllObjectsInGroupedValues: Ct,
2885
+ getAllObjectsInGroupedValues: Pt,
2857
2886
  getMinMax: fe,
2858
2887
  getValueForOperator: Y,
2859
- getValuesForYField: N,
2860
- getValuesGroupedByField: B,
2888
+ getValuesForYField: B,
2889
+ getValuesGroupedByField: R,
2861
2890
  getYAxisFieldname: _e,
2862
- labelsForOperator: Ft,
2863
- processGraphData: vt
2891
+ labelsForOperator: Ct,
2892
+ processGraphData: kt
2864
2893
  }, Symbol.toStringTag, { value: "Module" }));
2865
2894
  export {
2866
- Xe as Alert,
2895
+ Te as ActionButtons,
2896
+ Ue as Alert,
2867
2897
  ke as Avatar,
2868
- Ae as Binary,
2898
+ Ne as Binary,
2869
2899
  te as Boolean,
2870
2900
  ee as Button,
2871
2901
  We as ButtonGroup,
2872
- Ze as Carousel,
2873
- A as Char,
2902
+ st as Card,
2903
+ et as Carousel,
2904
+ N as Char,
2874
2905
  re as CodeEditor,
2875
- et as ColorPicker,
2876
- Ue as Comments,
2906
+ tt as ColorPicker,
2907
+ Ke as Comments,
2877
2908
  V as Container,
2878
2909
  w as ContainerWidget,
2879
- Yt as Dashboard,
2880
- ot as DashboardItem,
2881
- Ye as Date,
2882
- De as DateTime,
2883
- Ke as Email,
2910
+ jt as Dashboard,
2911
+ dt as DashboardItem,
2912
+ De as Date,
2913
+ je as DateTime,
2914
+ Ze as Email,
2884
2915
  f as Field,
2885
2916
  G as Float,
2886
- Ie as FloatTime,
2887
- zt as Form,
2917
+ Ee as FloatTime,
2918
+ It as Form,
2888
2919
  oe as Graph,
2889
2920
  de as GraphAxis,
2890
- j as GraphChart,
2921
+ M as GraphChart,
2891
2922
  ce as GraphIndicator,
2892
- ct as GraphIndicatorField,
2893
- _t as GraphXAxis,
2894
- ht as GraphYAxis,
2923
+ ut as GraphIndicatorField,
2924
+ gt as GraphXAxis,
2925
+ ft as GraphYAxis,
2895
2926
  Oe as Group,
2896
- Ee as HTMLPreview,
2897
- Ne as Image,
2898
- Le as Indicator,
2899
- Se as Integer,
2927
+ Ve as HTMLPreview,
2928
+ Be as Image,
2929
+ Ge as Indicator,
2930
+ Ie as Integer,
2900
2931
  H as JSONField,
2901
2932
  Z as Label,
2902
- Te as Many2one,
2903
- ze as Markdown,
2933
+ ze as Many2one,
2934
+ Se as Markdown,
2904
2935
  se as MultiCheckbox,
2905
2936
  K as NewLine,
2906
- M as Notebook,
2937
+ A as Notebook,
2907
2938
  ie as One2many,
2908
2939
  Pe as Page,
2909
- Ve as ProgressBar,
2910
- tt as QRCode,
2911
- qe as Radio,
2912
- Me as Reference,
2913
- lt as SearchFieldTypes,
2914
- It as SearchFilter,
2940
+ Ye as ProgressBar,
2941
+ it as QRCode,
2942
+ Je as Radio,
2943
+ Ae as Reference,
2944
+ ct as SearchFieldTypes,
2945
+ Vt as SearchFilter,
2915
2946
  z as Selection,
2916
- je as Separator,
2917
- R as Spinner,
2918
- He as Steps,
2919
- Je as Switch,
2920
- $e as Tag,
2921
- Ge as Tags,
2947
+ Me as Separator,
2948
+ j as Spinner,
2949
+ Qe as Steps,
2950
+ He as Switch,
2951
+ qe as Tag,
2952
+ $e as Tags,
2922
2953
  L as Text,
2923
- Qe as Time,
2924
- Re as Timeline,
2925
- St as Tree,
2954
+ Xe as Time,
2955
+ Le as Timeline,
2956
+ Et as Tree,
2926
2957
  C as Widget,
2927
- jt as graphFieldUtils,
2928
- Mt as graphProcessor,
2958
+ At as graphFieldUtils,
2959
+ Nt as graphProcessor,
2929
2960
  ne as parseContext,
2930
- Tt as parseContextFields,
2931
- Vt as parseDomainFields,
2932
- Dt as parseGraph,
2933
- Et as transformDomainForChildWidget
2961
+ St as parseContextFields,
2962
+ Dt as parseDomainFields,
2963
+ Mt as parseGraph,
2964
+ Yt as transformDomainForChildWidget
2934
2965
  };
2935
2966
  //# sourceMappingURL=ooui.es.js.map