@gisce/ooui 2.40.0-alpha.2 → 2.40.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ooui.es.js CHANGED
@@ -3,8 +3,8 @@ var yt = (i, e, t) => e in i ? bt(i, e, { enumerable: !0, configurable: !0, writ
3
3
  var r = (i, e, t) => (yt(i, typeof e != "symbol" ? e + "" : e, t), t);
4
4
  import { decode as xt } from "html-entities";
5
5
  import { evaluateCondition as pt } from "@gisce/conscheck";
6
- import * as I from "txml";
7
- import T from "moment";
6
+ import * as T from "txml";
7
+ import z from "moment";
8
8
  const wt = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Ft = ({
9
9
  entry: i,
10
10
  values: e,
@@ -833,7 +833,7 @@ class Wt extends F {
833
833
  return this._container.rows.flat().filter((t) => !t.invisible);
834
834
  }
835
835
  }
836
- class Tt extends f {
836
+ class zt extends f {
837
837
  }
838
838
  class A extends f {
839
839
  constructor(t) {
@@ -942,7 +942,7 @@ class $ extends f {
942
942
  this._translatable = t;
943
943
  }
944
944
  }
945
- class z extends f {
945
+ class I extends f {
946
946
  constructor(t) {
947
947
  super(t);
948
948
  /**
@@ -958,7 +958,7 @@ class z extends f {
958
958
  this._size = t;
959
959
  }
960
960
  }
961
- class It extends f {
961
+ class Tt extends f {
962
962
  constructor(t) {
963
963
  super(t);
964
964
  /**
@@ -993,7 +993,7 @@ class It extends f {
993
993
  return this.parsedWidgetProps.showMenu;
994
994
  }
995
995
  }
996
- class zt extends $ {
996
+ class It extends $ {
997
997
  }
998
998
  class it extends f {
999
999
  constructor(e) {
@@ -1182,7 +1182,7 @@ class Dt extends k {
1182
1182
  return null;
1183
1183
  }
1184
1184
  }
1185
- class Mt extends z {
1185
+ class Mt extends I {
1186
1186
  }
1187
1187
  class Bt extends f {
1188
1188
  constructor(t) {
@@ -1234,11 +1234,47 @@ class At extends f {
1234
1234
  }
1235
1235
  }
1236
1236
  class Rt extends f {
1237
+ constructor(t) {
1238
+ super({ ...t, nolabel: !0 });
1239
+ /**
1240
+ * Icon name
1241
+ */
1242
+ r(this, "_name", "");
1243
+ /**
1244
+ * Icon size
1245
+ */
1246
+ r(this, "_size", 16);
1247
+ /**
1248
+ * Icon color
1249
+ */
1250
+ r(this, "_color", "");
1251
+ t && (t.name && (this._name = t.name), t.size && (this._size = t.size), t.color && (this._color = t.color));
1252
+ }
1253
+ get name() {
1254
+ return this._name;
1255
+ }
1256
+ set name(t) {
1257
+ this._name = t;
1258
+ }
1259
+ get size() {
1260
+ return this._size;
1261
+ }
1262
+ set size(t) {
1263
+ this._size = t;
1264
+ }
1265
+ get color() {
1266
+ return this._color;
1267
+ }
1268
+ set color(t) {
1269
+ this._color = t;
1270
+ }
1271
+ }
1272
+ class Lt extends f {
1237
1273
  constructor(e) {
1238
1274
  super(e);
1239
1275
  }
1240
1276
  }
1241
- class Lt extends st {
1277
+ class Gt extends st {
1242
1278
  constructor(t) {
1243
1279
  super(t);
1244
1280
  /**
@@ -1270,7 +1306,7 @@ class Lt extends st {
1270
1306
  return this.parsedWidgetProps.colorField;
1271
1307
  }
1272
1308
  }
1273
- class Gt extends z {
1309
+ class $t extends I {
1274
1310
  constructor(t) {
1275
1311
  super(t);
1276
1312
  r(this, "_nolabel", !0);
@@ -1397,9 +1433,9 @@ class rt extends f {
1397
1433
  this._columns = t;
1398
1434
  }
1399
1435
  }
1400
- class $t extends rt {
1436
+ class qt extends rt {
1401
1437
  }
1402
- class qt extends z {
1438
+ class Jt extends I {
1403
1439
  get colors() {
1404
1440
  return this._parsedWidgetProps.colors || {};
1405
1441
  }
@@ -1408,7 +1444,7 @@ class qt extends z {
1408
1444
  return ((e = this._parsedWidgetProps) == null ? void 0 : e.colorField) || null;
1409
1445
  }
1410
1446
  }
1411
- class Jt extends z {
1447
+ class Ht extends I {
1412
1448
  constructor(t) {
1413
1449
  super(t);
1414
1450
  /**
@@ -1424,9 +1460,9 @@ class Jt extends z {
1424
1460
  this._direction = t;
1425
1461
  }
1426
1462
  }
1427
- class Ht extends it {
1463
+ class Qt extends it {
1428
1464
  }
1429
- class Qt extends f {
1465
+ class Kt extends f {
1430
1466
  constructor(t) {
1431
1467
  super(t);
1432
1468
  /**
@@ -1469,12 +1505,12 @@ class nt extends $ {
1469
1505
  this._lang = t;
1470
1506
  }
1471
1507
  }
1472
- class Kt extends f {
1508
+ class Xt extends f {
1473
1509
  constructor(e) {
1474
1510
  super(e);
1475
1511
  }
1476
1512
  }
1477
- class Xt extends F {
1513
+ class Ut extends F {
1478
1514
  constructor(t) {
1479
1515
  super(t);
1480
1516
  /**
@@ -1514,7 +1550,7 @@ class Xt extends F {
1514
1550
  return this._container.rows.flat().filter((t) => !t.invisible);
1515
1551
  }
1516
1552
  }
1517
- class Ut extends f {
1553
+ class Zt extends f {
1518
1554
  constructor(t) {
1519
1555
  super(t);
1520
1556
  /**
@@ -1539,7 +1575,7 @@ class K extends nt {
1539
1575
  r(this, "_lang", "json");
1540
1576
  }
1541
1577
  }
1542
- class Zt extends f {
1578
+ class te extends f {
1543
1579
  constructor(t) {
1544
1580
  super(t);
1545
1581
  r(this, "_multi", !1);
@@ -1559,7 +1595,7 @@ class Zt extends f {
1559
1595
  this._size = t;
1560
1596
  }
1561
1597
  }
1562
- class te extends F {
1598
+ class ee extends F {
1563
1599
  constructor(t) {
1564
1600
  super(t);
1565
1601
  r(this, "_autoPlay", !0);
@@ -1575,12 +1611,12 @@ class te extends F {
1575
1611
  return this._container.rows.flat().filter((t) => !t.invisible);
1576
1612
  }
1577
1613
  }
1578
- class ee extends A {
1614
+ class ie extends A {
1579
1615
  get showText() {
1580
1616
  return this.parsedWidgetProps.show_text ?? !0;
1581
1617
  }
1582
1618
  }
1583
- class ie extends f {
1619
+ class se extends f {
1584
1620
  get width() {
1585
1621
  var e;
1586
1622
  return (e = this.parsedWidgetProps) == null ? void 0 : e.width;
@@ -1594,7 +1630,7 @@ class ie extends f {
1594
1630
  return console.log(this.parsedWidgetProps), ((e = this.parsedWidgetProps) == null ? void 0 : e.showValue) ?? !1;
1595
1631
  }
1596
1632
  }
1597
- class se extends N {
1633
+ class re extends N {
1598
1634
  constructor(t) {
1599
1635
  super(t);
1600
1636
  r(this, "_title", null);
@@ -1646,7 +1682,7 @@ class D {
1646
1682
  this._widgetClass = Ot;
1647
1683
  break;
1648
1684
  case "card":
1649
- this._widgetClass = se;
1685
+ this._widgetClass = re;
1650
1686
  break;
1651
1687
  case "label":
1652
1688
  this._widgetClass = et;
@@ -1664,13 +1700,13 @@ class D {
1664
1700
  this._widgetClass = Wt;
1665
1701
  break;
1666
1702
  case "action_buttons":
1667
- this._widgetClass = Tt;
1703
+ this._widgetClass = zt;
1668
1704
  break;
1669
1705
  case "selection":
1670
- this._widgetClass = z;
1706
+ this._widgetClass = I;
1671
1707
  break;
1672
1708
  case "many2one":
1673
- this._widgetClass = It;
1709
+ this._widgetClass = Tt;
1674
1710
  break;
1675
1711
  case "boolean":
1676
1712
  this._widgetClass = it;
@@ -1694,7 +1730,7 @@ class D {
1694
1730
  this._widgetClass = Yt;
1695
1731
  break;
1696
1732
  case "markdown":
1697
- this._widgetClass = zt;
1733
+ this._widgetClass = It;
1698
1734
  break;
1699
1735
  case "many2many":
1700
1736
  case "one2many":
@@ -1711,7 +1747,7 @@ class D {
1711
1747
  this._widgetClass = A;
1712
1748
  break;
1713
1749
  case "email":
1714
- this._widgetClass = Zt;
1750
+ this._widgetClass = te;
1715
1751
  break;
1716
1752
  case "reference":
1717
1753
  this._widgetClass = Mt;
@@ -1722,50 +1758,53 @@ class D {
1722
1758
  case "image":
1723
1759
  this._widgetClass = At;
1724
1760
  break;
1725
- case "fiber_grid":
1761
+ case "icon":
1726
1762
  this._widgetClass = Rt;
1727
1763
  break;
1728
- case "timeline":
1764
+ case "fiber_grid":
1729
1765
  this._widgetClass = Lt;
1730
1766
  break;
1731
- case "indicator":
1767
+ case "timeline":
1732
1768
  this._widgetClass = Gt;
1733
1769
  break;
1734
- case "tags":
1770
+ case "indicator":
1735
1771
  this._widgetClass = $t;
1736
1772
  break;
1737
- case "tag":
1773
+ case "tags":
1738
1774
  this._widgetClass = qt;
1739
1775
  break;
1776
+ case "tag":
1777
+ this._widgetClass = Jt;
1778
+ break;
1740
1779
  case "avatar":
1741
1780
  this._widgetClass = kt;
1742
1781
  break;
1743
1782
  case "radio":
1744
- this._widgetClass = Jt;
1783
+ this._widgetClass = Ht;
1745
1784
  break;
1746
1785
  case "multicheckbox":
1747
1786
  this._widgetClass = rt;
1748
1787
  break;
1749
1788
  case "switch":
1750
- this._widgetClass = Ht;
1789
+ this._widgetClass = Qt;
1751
1790
  break;
1752
1791
  case "steps":
1753
- this._widgetClass = Qt;
1792
+ this._widgetClass = Kt;
1754
1793
  break;
1755
1794
  case "codeeditor":
1756
1795
  this._widgetClass = nt;
1757
1796
  break;
1758
1797
  case "time":
1759
- this._widgetClass = Kt;
1798
+ this._widgetClass = Xt;
1760
1799
  break;
1761
1800
  case "html_preview":
1762
1801
  this._widgetClass = Vt;
1763
1802
  break;
1764
1803
  case "alert":
1765
- this._widgetClass = Xt;
1804
+ this._widgetClass = Ut;
1766
1805
  break;
1767
1806
  case "comments_timeline":
1768
- this._widgetClass = Ut;
1807
+ this._widgetClass = Zt;
1769
1808
  break;
1770
1809
  case "json":
1771
1810
  this._widgetClass = K;
@@ -1777,13 +1816,13 @@ class D {
1777
1816
  this._widgetClass = N;
1778
1817
  break;
1779
1818
  case "carousel":
1780
- this._widgetClass = te;
1819
+ this._widgetClass = ee;
1781
1820
  break;
1782
1821
  case "colorPicker":
1783
- this._widgetClass = ee;
1822
+ this._widgetClass = ie;
1784
1823
  break;
1785
1824
  case "qrcode":
1786
- this._widgetClass = ie;
1825
+ this._widgetClass = se;
1787
1826
  break;
1788
1827
  }
1789
1828
  }
@@ -1807,7 +1846,7 @@ class D {
1807
1846
  }
1808
1847
  }
1809
1848
  }
1810
- const re = ({
1849
+ const ne = ({
1811
1850
  fieldName: i,
1812
1851
  values: e,
1813
1852
  fields: t
@@ -1832,7 +1871,7 @@ const re = ({
1832
1871
  n[l] = d.some((_) => _);
1833
1872
  }
1834
1873
  return n;
1835
- }, ne = ({
1874
+ }, ae = ({
1836
1875
  states: i,
1837
1876
  values: e
1838
1877
  }) => {
@@ -1841,7 +1880,7 @@ const re = ({
1841
1880
  const t = i.split(",");
1842
1881
  return t.length === 0 ? {} : t.includes(e.state) ? {} : { invisible: !0 };
1843
1882
  };
1844
- function ae({
1883
+ function le({
1845
1884
  values: i = {},
1846
1885
  fieldName: e,
1847
1886
  fields: t = {}
@@ -1869,7 +1908,7 @@ const J = ({
1869
1908
  return u.forEach((c) => {
1870
1909
  const b = c[1];
1871
1910
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1872
- const x = ae({
1911
+ const x = le({
1873
1912
  values: e,
1874
1913
  fields: t,
1875
1914
  fieldName: b === "active_id" ? "id" : b
@@ -1884,7 +1923,7 @@ const J = ({
1884
1923
  } catch {
1885
1924
  return;
1886
1925
  }
1887
- }, ze = (i) => {
1926
+ }, Se = (i) => {
1888
1927
  const e = [];
1889
1928
  try {
1890
1929
  return !i || lt(i) || typeof i != "string" ? e : at(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) => {
@@ -1904,14 +1943,14 @@ function at(i) {
1904
1943
  function lt(i) {
1905
1944
  return typeof i == "object" && i !== null && typeof i != "string";
1906
1945
  }
1907
- const le = (i) => {
1946
+ const oe = (i) => {
1908
1947
  const e = i.trim().replace(")", "").split("("), t = e[0], n = e[1].split(",").map((a) => a.trim());
1909
1948
  return {
1910
1949
  method: t,
1911
1950
  args: n
1912
1951
  };
1913
1952
  };
1914
- function oe(i) {
1953
+ function ce(i) {
1915
1954
  const e = [];
1916
1955
  function t(s) {
1917
1956
  const n = [];
@@ -1923,7 +1962,7 @@ function oe(i) {
1923
1962
  t(s);
1924
1963
  return e.flat();
1925
1964
  }
1926
- class Se {
1965
+ class Ee {
1927
1966
  constructor(e, t = 4) {
1928
1967
  /**
1929
1968
  * Object containing fields specification of the form.
@@ -2033,13 +2072,13 @@ class Se {
2033
2072
  }
2034
2073
  parse(e, t) {
2035
2074
  var l;
2036
- const { values: s = {}, readOnly: n = !1 } = t || {}, a = I.parse(e).filter((d) => d.tagName === "form")[0];
2075
+ const { values: s = {}, readOnly: n = !1 } = t || {}, a = T.parse(e).filter((d) => d.tagName === "form")[0];
2037
2076
  this._string = ((l = a.attributes) == null ? void 0 : l.string) || null, this._string && (this._string = g(this._string)), this._readOnly = n, this._context = s.id ? { active_id: s.id, active_ids: [s.id] } : {}, this._invisibleFields = [], this.parseNode({
2038
2077
  fields: a.children,
2039
2078
  container: this._container,
2040
2079
  values: s
2041
2080
  });
2042
- const o = oe(this._container._rows);
2081
+ const o = ce(this._container._rows);
2043
2082
  o.forEach((d) => {
2044
2083
  const _ = d;
2045
2084
  _._id && _._context && (this._contextForFields[_._id] = d._context);
@@ -2082,10 +2121,10 @@ class Se {
2082
2121
  widgetType: o
2083
2122
  });
2084
2123
  let m;
2085
- o === "button" && h.states ? m = ne({
2124
+ o === "button" && h.states ? m = ae({
2086
2125
  states: h.states,
2087
2126
  values: s
2088
- }) : m = re({
2127
+ }) : m = ne({
2089
2128
  fieldName: h.name,
2090
2129
  values: s,
2091
2130
  fields: this._fields
@@ -2095,7 +2134,7 @@ class Se {
2095
2134
  values: s,
2096
2135
  fields: this._fields
2097
2136
  });
2098
- h.on_change && (this._onChangeFields[h.name] = le(
2137
+ h.on_change && (this._onChangeFields[h.name] = oe(
2099
2138
  h.on_change
2100
2139
  ));
2101
2140
  let b;
@@ -2127,7 +2166,7 @@ class Se {
2127
2166
  function X(i) {
2128
2167
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2129
2168
  }
2130
- class Ee {
2169
+ class Ve {
2131
2170
  constructor(e) {
2132
2171
  /**
2133
2172
  * Object containing fields specification of the form.
@@ -2199,7 +2238,7 @@ class Ee {
2199
2238
  this._infinite = e;
2200
2239
  }
2201
2240
  parse(e) {
2202
- const t = I.parse(e).filter((n) => n.tagName === "tree")[0];
2241
+ const t = T.parse(e).filter((n) => n.tagName === "tree")[0];
2203
2242
  this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), this._colors = t.attributes.colors || null, this._colors && (this._colors = g(this._colors)), this._status = t.attributes.status || null, this._status && (this._status = g(this._status)), this._editable = t.attributes.editable || null, this._infinite = t.attributes.infinite || !1;
2204
2243
  const s = new D();
2205
2244
  t.children.forEach((n) => {
@@ -2241,7 +2280,7 @@ class Ee {
2241
2280
  return this._columns.find((t) => t.findById ? t.findById(e) : !1);
2242
2281
  }
2243
2282
  }
2244
- class Ve {
2283
+ class Ye {
2245
2284
  constructor(e) {
2246
2285
  /**
2247
2286
  * Object containing fields specification of the kanban.
@@ -2331,7 +2370,7 @@ class Ve {
2331
2370
  return this._aggregations;
2332
2371
  }
2333
2372
  parse(e) {
2334
- const t = I.parse(e).filter((n) => n.tagName === "kanban")[0];
2373
+ const t = T.parse(e).filter((n) => n.tagName === "kanban")[0];
2335
2374
  if (this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), this._column_field = t.attributes.column_field || null, !this._column_field)
2336
2375
  throw new Error("Kanban view must have a column_field attribute");
2337
2376
  this._drag = t.attributes.drag !== void 0 ? p(t.attributes.drag) : !0, this._sort = t.attributes.sort !== void 0 ? p(t.attributes.sort) : !0, this._set_max_cards = t.attributes.set_max_cards !== void 0 ? p(t.attributes.set_max_cards) : !1, this._colors = t.attributes.colors || null, this._colors && (this._colors = g(this._colors));
@@ -2389,7 +2428,7 @@ class Ve {
2389
2428
  return t || this._buttons.find((n) => n.findById ? n.findById(e) : !1) || null;
2390
2429
  }
2391
2430
  }
2392
- const ce = {
2431
+ const de = {
2393
2432
  text: "text",
2394
2433
  many2one: "many2one",
2395
2434
  char: "char",
@@ -2402,7 +2441,7 @@ const ce = {
2402
2441
  date: "date",
2403
2442
  datetime: "datetime"
2404
2443
  };
2405
- class Ye {
2444
+ class je {
2406
2445
  constructor(e, t, s = 8) {
2407
2446
  /**
2408
2447
  * Object containing the specific fields for primary and secondary search fields
@@ -2450,7 +2489,7 @@ class Ye {
2450
2489
  colspan: 2
2451
2490
  }, { type: a, widget: o } = n;
2452
2491
  let l = o ?? a;
2453
- return ce[l] === void 0 && (l = a), t.createWidget(l, n);
2492
+ return de[l] === void 0 && (l = a), t.createWidget(l, n);
2454
2493
  });
2455
2494
  }
2456
2495
  /**
@@ -2461,7 +2500,7 @@ class Ye {
2461
2500
  return this.advancedSearchContainer.findById(e);
2462
2501
  }
2463
2502
  }
2464
- const je = ({
2503
+ const Ne = ({
2465
2504
  domain: i,
2466
2505
  widgetFieldName: e
2467
2506
  }) => {
@@ -2476,8 +2515,8 @@ const je = ({
2476
2515
  n.length - 1
2477
2516
  )) : (l = n, d = "id"), l === e && t.push([d, a, o]);
2478
2517
  }), t;
2479
- }, Ne = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((e) => e.trim()).filter((e) => !e.includes("'"));
2480
- class de {
2518
+ }, De = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((e) => e.trim()).filter((e) => !e.includes("'"));
2519
+ class ue {
2481
2520
  constructor(e) {
2482
2521
  r(this, "_action_id", null);
2483
2522
  r(this, "_position", null);
@@ -2490,15 +2529,15 @@ class de {
2490
2529
  return this._position;
2491
2530
  }
2492
2531
  }
2493
- class De {
2532
+ class Me {
2494
2533
  constructor(e) {
2495
2534
  r(this, "_string", null);
2496
2535
  r(this, "_items", []);
2497
- const t = I.parse(e).filter((n) => n.tagName === "dashboard")[0];
2536
+ const t = T.parse(e).filter((n) => n.tagName === "dashboard")[0];
2498
2537
  this._string = t.attributes.string || null;
2499
2538
  const { children: s } = t;
2500
2539
  s.forEach((n) => {
2501
- n.tagName === "dashboard_item" && this._items.push(new de(n.attributes));
2540
+ n.tagName === "dashboard_item" && this._items.push(new ue(n.attributes));
2502
2541
  });
2503
2542
  }
2504
2543
  get string() {
@@ -2562,7 +2601,7 @@ class ct extends ot {
2562
2601
  return this._suffix;
2563
2602
  }
2564
2603
  }
2565
- class ue extends ct {
2604
+ class he extends ct {
2566
2605
  constructor(t, s) {
2567
2606
  super(t, s);
2568
2607
  r(this, "_field");
@@ -2582,7 +2621,7 @@ class ue extends ct {
2582
2621
  return this._operator;
2583
2622
  }
2584
2623
  }
2585
- const he = (i) => {
2624
+ const _e = (i) => {
2586
2625
  const e = [];
2587
2626
  let t;
2588
2627
  if (i.forEach((s) => {
@@ -2592,10 +2631,10 @@ const he = (i) => {
2592
2631
  throw new Error(`Field ${o} doesn't have an axis`);
2593
2632
  if (!o)
2594
2633
  throw new Error("Missing name attribute for field");
2595
- n === "x" ? t = new ge({
2634
+ n === "x" ? t = new me({
2596
2635
  name: o
2597
2636
  }) : n === "y" && e.push(
2598
- new fe({
2637
+ new ge({
2599
2638
  name: o,
2600
2639
  operator: a,
2601
2640
  label: l,
@@ -2618,7 +2657,7 @@ class M extends ot {
2618
2657
  r(this, "_x");
2619
2658
  r(this, "_y");
2620
2659
  this._type = t;
2621
- const n = he(s.children);
2660
+ const n = _e(s.children);
2622
2661
  this._x = n.x, this._y = n.y;
2623
2662
  }
2624
2663
  get x() {
@@ -2628,17 +2667,17 @@ class M extends ot {
2628
2667
  return this._y;
2629
2668
  }
2630
2669
  }
2631
- const _e = {
2670
+ const fe = {
2632
2671
  indicator: ct,
2633
- indicatorField: ue,
2672
+ indicatorField: he,
2634
2673
  line: M,
2635
2674
  bar: M,
2636
2675
  pie: M
2637
- }, Me = (i) => {
2638
- const e = I.parse(i).filter((n) => n.tagName === "graph")[0], t = e.attributes.type;
2676
+ }, Be = (i) => {
2677
+ const e = T.parse(i).filter((n) => n.tagName === "graph")[0], t = e.attributes.type;
2639
2678
  if (!t)
2640
2679
  throw new Error(`${t} is not a valid graph`);
2641
- const s = _e[t];
2680
+ const s = fe[t];
2642
2681
  if (!s)
2643
2682
  throw new Error(`${t} not found as a GraphModel`);
2644
2683
  return new s(t, e);
@@ -2656,7 +2695,7 @@ class dt {
2656
2695
  return this._axis;
2657
2696
  }
2658
2697
  }
2659
- class fe extends dt {
2698
+ class ge extends dt {
2660
2699
  constructor({
2661
2700
  name: t,
2662
2701
  operator: s,
@@ -2679,12 +2718,12 @@ class fe extends dt {
2679
2718
  return this._stacked;
2680
2719
  }
2681
2720
  }
2682
- class ge extends dt {
2721
+ class me extends dt {
2683
2722
  constructor({ name: e }) {
2684
2723
  super({ name: e, axis: "x" });
2685
2724
  }
2686
2725
  }
2687
- const me = ({ ooui: i }) => {
2726
+ const be = ({ ooui: i }) => {
2688
2727
  const t = [i.x.name];
2689
2728
  return i.y ? (i.y.forEach((s) => {
2690
2729
  s.operator !== "count" && !t.includes(s.name) && t.push(s.name), s.label && !t.includes(s.label) && t.push(s.label);
@@ -2706,27 +2745,27 @@ function H({
2706
2745
  }
2707
2746
  return { value: n, label: n };
2708
2747
  }
2709
- const Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2748
+ const Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2710
2749
  __proto__: null,
2711
- getFieldsToRetrieve: me,
2750
+ getFieldsToRetrieve: be,
2712
2751
  getValueAndLabelForField: H
2713
2752
  }, Symbol.toStringTag, { value: "Module" }));
2714
- function be({
2753
+ function ye({
2715
2754
  values: i,
2716
2755
  timerange: e,
2717
2756
  interval: t = 1
2718
2757
  }) {
2719
- const s = pe({
2758
+ const s = we({
2720
2759
  values: i,
2721
2760
  timerange: e
2722
2761
  });
2723
- return ye({
2762
+ return xe({
2724
2763
  values: s,
2725
2764
  timerange: e,
2726
2765
  interval: t
2727
2766
  });
2728
2767
  }
2729
- function ye({
2768
+ function xe({
2730
2769
  values: i,
2731
2770
  timerange: e,
2732
2771
  interval: t = 1
@@ -2744,7 +2783,7 @@ function ye({
2744
2783
  return;
2745
2784
  const u = h.x, m = d[_ + 1].x;
2746
2785
  if (!ut([u, m], a)) {
2747
- const c = xe({
2786
+ const c = pe({
2748
2787
  dates: [u, m],
2749
2788
  timerange: e,
2750
2789
  interval: t
@@ -2761,7 +2800,7 @@ function ye({
2761
2800
  }
2762
2801
  }), s.sort((l, d) => l.x < d.x ? -1 : l.x > d.x ? 1 : 0);
2763
2802
  }
2764
- function xe({
2803
+ function pe({
2765
2804
  dates: i,
2766
2805
  timerange: e,
2767
2806
  interval: t = 1
@@ -2773,21 +2812,21 @@ function xe({
2773
2812
  for (let o = 0; o < a.length - 1; o++) {
2774
2813
  const l = a[o], d = a[o + 1];
2775
2814
  if (!ut([l, d], n)) {
2776
- const _ = T(l, V(n)).add(
2815
+ const _ = z(l, V(n)).add(
2777
2816
  t,
2778
2817
  n
2779
- ), h = T(d, V(n));
2818
+ ), h = z(d, V(n));
2780
2819
  for (; _.isBefore(h); )
2781
2820
  s.push(_.format(V(n))), _.add(t, n);
2782
2821
  }
2783
2822
  }
2784
2823
  return s;
2785
2824
  }
2786
- function pe({
2825
+ function we({
2787
2826
  values: i,
2788
2827
  timerange: e
2789
2828
  }) {
2790
- const t = we({
2829
+ const t = Fe({
2791
2830
  values: i,
2792
2831
  timerange: e
2793
2832
  }), s = [], n = ht({
@@ -2805,24 +2844,24 @@ function pe({
2805
2844
  });
2806
2845
  }), s;
2807
2846
  }
2808
- function we({
2847
+ function Fe({
2809
2848
  values: i,
2810
2849
  timerange: e
2811
2850
  }) {
2812
2851
  return i.map((t) => ({
2813
2852
  ...t,
2814
- x: Fe({
2853
+ x: ve({
2815
2854
  date: t.x,
2816
2855
  timerange: e
2817
2856
  })
2818
2857
  }));
2819
2858
  }
2820
- function Fe({
2859
+ function ve({
2821
2860
  date: i,
2822
2861
  timerange: e
2823
2862
  }) {
2824
- let t = ve(i);
2825
- const s = T(i, t);
2863
+ let t = Ce(i);
2864
+ const s = z(i, t);
2826
2865
  switch (e) {
2827
2866
  case "hour": {
2828
2867
  t = "YYYY-MM-DD HH:00";
@@ -2847,7 +2886,7 @@ function Fe({
2847
2886
  }
2848
2887
  return s.format(t);
2849
2888
  }
2850
- function ve(i) {
2889
+ function Ce(i) {
2851
2890
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2852
2891
  }
2853
2892
  function ut(i, e) {
@@ -2858,7 +2897,7 @@ function ut(i, e) {
2858
2897
  if (i.length === 1)
2859
2898
  return !0;
2860
2899
  for (let n = 0; n < i.length - 1; n++) {
2861
- const a = T(i[n], s), l = T(i[n + 1], s).diff(a, e);
2900
+ const a = z(i[n], s), l = z(i[n + 1], s).diff(a, e);
2862
2901
  Math.abs(l) === 1 ? t = !0 : t = !1;
2863
2902
  }
2864
2903
  return t;
@@ -2888,7 +2927,7 @@ function V(i) {
2888
2927
  return "YYYY-MM-DD HH:mm";
2889
2928
  }
2890
2929
  }
2891
- const Ce = {
2930
+ const ke = {
2892
2931
  count: "count",
2893
2932
  "+": "sum",
2894
2933
  "-": "subtract",
@@ -2896,7 +2935,7 @@ const Ce = {
2896
2935
  avg: "average",
2897
2936
  min: "min",
2898
2937
  max: "max"
2899
- }, ke = ({
2938
+ }, Pe = ({
2900
2939
  ooui: i,
2901
2940
  values: e,
2902
2941
  fields: t,
@@ -2963,7 +3002,7 @@ const Ce = {
2963
3002
  (c) => c.x !== !1
2964
3003
  ));
2965
3004
  let u = h;
2966
- i.timerange ? u = be({
3005
+ i.timerange ? u = ye({
2967
3006
  values: u,
2968
3007
  timerange: i.timerange,
2969
3008
  interval: i.interval
@@ -3045,7 +3084,7 @@ function L({
3045
3084
  s[a] || (s[a] = { label: o, entries: [] }), s[a].entries.push(n);
3046
3085
  }), s;
3047
3086
  }
3048
- function Pe(i) {
3087
+ function Oe(i) {
3049
3088
  let e = [];
3050
3089
  return Object.keys(i).forEach((t) => {
3051
3090
  const s = i[t];
@@ -3068,88 +3107,89 @@ function ft(i, e = 0.1) {
3068
3107
  max: n + a
3069
3108
  };
3070
3109
  }
3071
- const Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3110
+ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3072
3111
  __proto__: null,
3073
- getAllObjectsInGroupedValues: Pe,
3112
+ getAllObjectsInGroupedValues: Oe,
3074
3113
  getMinMax: ft,
3075
3114
  getValueForOperator: j,
3076
3115
  getValuesForYField: R,
3077
3116
  getValuesGroupedByField: L,
3078
3117
  getYAxisFieldname: _t,
3079
- labelsForOperator: Ce,
3080
- processGraphData: ke
3118
+ labelsForOperator: ke,
3119
+ processGraphData: Pe
3081
3120
  }, Symbol.toStringTag, { value: "Module" }));
3082
3121
  export {
3083
- Tt as ActionButtons,
3084
- Xt as Alert,
3122
+ zt as ActionButtons,
3123
+ Ut as Alert,
3085
3124
  kt as Avatar,
3086
3125
  Bt as Binary,
3087
3126
  it as Boolean,
3088
3127
  G as Button,
3089
3128
  Wt as ButtonGroup,
3090
- se as Card,
3091
- te as Carousel,
3129
+ re as Card,
3130
+ ee as Carousel,
3092
3131
  A as Char,
3093
3132
  nt as CodeEditor,
3094
- ee as ColorPicker,
3095
- Ut as Comments,
3133
+ ie as ColorPicker,
3134
+ Zt as Comments,
3096
3135
  Y as Container,
3097
3136
  F as ContainerWidget,
3098
- De as Dashboard,
3099
- de as DashboardItem,
3137
+ Me as Dashboard,
3138
+ ue as DashboardItem,
3100
3139
  jt as Date,
3101
3140
  Nt as DateTime,
3102
- Zt as Email,
3141
+ te as Email,
3103
3142
  f as Field,
3104
3143
  q as Float,
3105
3144
  Et as FloatTime,
3106
- Se as Form,
3145
+ Ee as Form,
3107
3146
  ot as Graph,
3108
3147
  dt as GraphAxis,
3109
3148
  M as GraphChart,
3110
3149
  ct as GraphIndicator,
3111
- ue as GraphIndicatorField,
3112
- ge as GraphXAxis,
3113
- fe as GraphYAxis,
3150
+ he as GraphIndicatorField,
3151
+ me as GraphXAxis,
3152
+ ge as GraphYAxis,
3114
3153
  Ot as Group,
3115
3154
  Vt as HTMLPreview,
3155
+ Rt as Icon,
3116
3156
  At as Image,
3117
- Gt as Indicator,
3157
+ $t as Indicator,
3118
3158
  St as Integer,
3119
3159
  K as JSONField,
3120
- Ve as Kanban,
3160
+ Ye as Kanban,
3121
3161
  et as Label,
3122
- It as Many2one,
3123
- zt as Markdown,
3162
+ Tt as Many2one,
3163
+ It as Markdown,
3124
3164
  rt as MultiCheckbox,
3125
3165
  tt as NewLine,
3126
3166
  B as Notebook,
3127
3167
  st as One2many,
3128
3168
  Pt as Page,
3129
3169
  Yt as ProgressBar,
3130
- ie as QRCode,
3131
- Jt as Radio,
3170
+ se as QRCode,
3171
+ Ht as Radio,
3132
3172
  Mt as Reference,
3133
- ce as SearchFieldTypes,
3134
- Ye as SearchFilter,
3135
- z as Selection,
3173
+ de as SearchFieldTypes,
3174
+ je as SearchFilter,
3175
+ I as Selection,
3136
3176
  Dt as Separator,
3137
3177
  N as Spinner,
3138
- Qt as Steps,
3139
- Ht as Switch,
3140
- qt as Tag,
3141
- $t as Tags,
3178
+ Kt as Steps,
3179
+ Qt as Switch,
3180
+ Jt as Tag,
3181
+ qt as Tags,
3142
3182
  $ as Text,
3143
- Kt as Time,
3144
- Lt as Timeline,
3145
- Ee as Tree,
3183
+ Xt as Time,
3184
+ Gt as Timeline,
3185
+ Ve as Tree,
3146
3186
  k as Widget,
3147
- Be as graphFieldUtils,
3148
- Ae as graphProcessor,
3187
+ Ae as graphFieldUtils,
3188
+ Re as graphProcessor,
3149
3189
  J as parseContext,
3150
- ze as parseContextFields,
3151
- Ne as parseDomainFields,
3152
- Me as parseGraph,
3153
- je as transformDomainForChildWidget
3190
+ Se as parseContextFields,
3191
+ De as parseDomainFields,
3192
+ Be as parseGraph,
3193
+ Ne as transformDomainForChildWidget
3154
3194
  };
3155
3195
  //# sourceMappingURL=ooui.es.js.map