@gisce/ooui 2.37.0-alpha.2 → 2.37.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
@@ -1,8 +1,8 @@
1
1
  var be = Object.defineProperty;
2
2
  var ye = (i, t, e) => t in i ? be(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
3
  var r = (i, t, e) => (ye(i, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { decode as pe } from "html-entities";
5
- import { evaluateCondition as xe } from "@gisce/conscheck";
4
+ import { decode as xe } from "html-entities";
5
+ import { evaluateCondition as pe } from "@gisce/conscheck";
6
6
  import * as D from "txml";
7
7
  import T from "moment";
8
8
  const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe = ({
@@ -41,7 +41,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, m = (i) => pe(i, { level: "xml" }), X = ({
44
+ }, m = (i) => xe(i, { level: "xml" }), X = ({
45
45
  fieldName: i,
46
46
  valueInObject: t,
47
47
  expectedValue: e,
@@ -69,8 +69,8 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
69
69
  }) => {
70
70
  const d = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = m(d), h = JSON.parse(_), u = {};
71
71
  for (const g of Object.keys(h)) {
72
- const p = h[g].map((y) => Fe({ entry: y, values: t, fields: e })).every((y) => y);
73
- p ? u[g] = !0 : g === "readonly" && !p && s === "button" && (u[g] = !1);
72
+ const x = h[g].map((y) => Fe({ entry: y, values: t, fields: e })).every((y) => y);
73
+ x ? u[g] = !0 : g === "readonly" && !x && s === "button" && (u[g] = !1);
74
74
  }
75
75
  return u;
76
76
  }, U = (i) => {
@@ -95,7 +95,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
95
95
  n.replace(/'/g, '"')
96
96
  ), l = {};
97
97
  for (const o of Object.keys(a)) {
98
- const d = xe({
98
+ const d = pe({
99
99
  object: t,
100
100
  condition: a[o],
101
101
  evaluateFieldComparison: ({
@@ -431,7 +431,7 @@ class Z extends f {
431
431
  * Id of the field that this label goes with. Null if it's an independent label
432
432
  */
433
433
  r(this, "_fieldForLabel", null);
434
- e != null && e.fieldForLabel && (this._fieldForLabel = e.fieldForLabel), e.widget_props && (this.parsedWidgetProps.label_type && (this.labelType = this.parsedWidgetProps.label_type), this.parsedWidgetProps.label_size && (this.labelSize = this.parsedWidgetProps.label_size));
434
+ e != null && e.fieldForLabel && (this._fieldForLabel = e.fieldForLabel), e.widget_props && (this.parsedWidgetProps.label_type && (this.labelType = this.parsedWidgetProps.label_type), this.parsedWidgetProps.label_size && (this.labelSize = this.parsedWidgetProps.label_size)), e != null && e.align && (this.align = e.align);
435
435
  }
436
436
  get text() {
437
437
  return this._text;
@@ -833,8 +833,6 @@ class We extends w {
833
833
  return this._container.rows.flat().filter((e) => !e.invisible);
834
834
  }
835
835
  }
836
- class Te extends f {
837
- }
838
836
  class A extends f {
839
837
  constructor(e) {
840
838
  super(e);
@@ -958,7 +956,7 @@ class z extends f {
958
956
  this._size = e;
959
957
  }
960
958
  }
961
- class ze extends f {
959
+ class Te extends f {
962
960
  constructor(e) {
963
961
  super(e);
964
962
  /**
@@ -993,14 +991,14 @@ class ze extends f {
993
991
  return this.parsedWidgetProps.showMenu;
994
992
  }
995
993
  }
996
- class Se extends L {
994
+ class ze extends L {
997
995
  }
998
996
  class te extends f {
999
997
  constructor(t) {
1000
998
  super(t);
1001
999
  }
1002
1000
  }
1003
- class Ie extends f {
1001
+ class Se extends f {
1004
1002
  constructor(t) {
1005
1003
  super(t);
1006
1004
  }
@@ -1038,18 +1036,18 @@ class G extends f {
1038
1036
  this._decimalDigits = e;
1039
1037
  }
1040
1038
  }
1041
- class Ee extends G {
1039
+ class Ie extends G {
1042
1040
  }
1043
- class Ve extends f {
1041
+ class Ee extends f {
1044
1042
  }
1045
- class Ye extends G {
1043
+ class Ve extends G {
1046
1044
  }
1047
- class De extends f {
1045
+ class Ye extends f {
1048
1046
  constructor(t) {
1049
1047
  super(t);
1050
1048
  }
1051
1049
  }
1052
- class je extends f {
1050
+ class De extends f {
1053
1051
  constructor(e) {
1054
1052
  super(e);
1055
1053
  r(this, "_timezone");
@@ -1156,7 +1154,7 @@ class ie extends f {
1156
1154
  this._infinite = e;
1157
1155
  }
1158
1156
  }
1159
- class Me extends C {
1157
+ class je extends C {
1160
1158
  constructor(e) {
1161
1159
  super(e);
1162
1160
  /**
@@ -1182,9 +1180,9 @@ class Me extends C {
1182
1180
  return null;
1183
1181
  }
1184
1182
  }
1185
- class Ae extends z {
1183
+ class Me extends z {
1186
1184
  }
1187
- class Ne extends f {
1185
+ class Ae extends f {
1188
1186
  constructor(e) {
1189
1187
  super(e);
1190
1188
  /**
@@ -1200,18 +1198,18 @@ class Ne extends f {
1200
1198
  this._filenameField = e;
1201
1199
  }
1202
1200
  }
1203
- class Be extends f {
1201
+ class Ne extends f {
1204
1202
  get showControls() {
1205
1203
  var t;
1206
1204
  return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
1207
1205
  }
1208
1206
  }
1209
- class Re extends f {
1207
+ class Be extends f {
1210
1208
  constructor(t) {
1211
1209
  super(t);
1212
1210
  }
1213
1211
  }
1214
- class Le extends ie {
1212
+ class Re extends ie {
1215
1213
  constructor(e) {
1216
1214
  super(e);
1217
1215
  /**
@@ -1243,7 +1241,7 @@ class Le extends ie {
1243
1241
  return this.parsedWidgetProps.colorField;
1244
1242
  }
1245
1243
  }
1246
- class Ge extends z {
1244
+ class Le extends z {
1247
1245
  constructor(e) {
1248
1246
  super(e);
1249
1247
  r(this, "_nolabel", !0);
@@ -1370,9 +1368,9 @@ class se extends f {
1370
1368
  this._columns = e;
1371
1369
  }
1372
1370
  }
1373
- class $e extends se {
1371
+ class Ge extends se {
1374
1372
  }
1375
- class qe extends z {
1373
+ class $e extends z {
1376
1374
  get colors() {
1377
1375
  return this._parsedWidgetProps.colors || {};
1378
1376
  }
@@ -1381,7 +1379,7 @@ class qe extends z {
1381
1379
  return ((t = this._parsedWidgetProps) == null ? void 0 : t.colorField) || null;
1382
1380
  }
1383
1381
  }
1384
- class Je extends z {
1382
+ class qe extends z {
1385
1383
  constructor(e) {
1386
1384
  super(e);
1387
1385
  /**
@@ -1397,9 +1395,9 @@ class Je extends z {
1397
1395
  this._direction = e;
1398
1396
  }
1399
1397
  }
1400
- class He extends te {
1398
+ class Je extends te {
1401
1399
  }
1402
- class Qe extends f {
1400
+ class He extends f {
1403
1401
  constructor(e) {
1404
1402
  super(e);
1405
1403
  /**
@@ -1442,12 +1440,12 @@ class re extends L {
1442
1440
  this._lang = e;
1443
1441
  }
1444
1442
  }
1445
- class Xe extends f {
1443
+ class Qe extends f {
1446
1444
  constructor(t) {
1447
1445
  super(t);
1448
1446
  }
1449
1447
  }
1450
- class Ue extends w {
1448
+ class Xe extends w {
1451
1449
  constructor(e) {
1452
1450
  super(e);
1453
1451
  /**
@@ -1487,7 +1485,7 @@ class Ue extends w {
1487
1485
  return this._container.rows.flat().filter((e) => !e.invisible);
1488
1486
  }
1489
1487
  }
1490
- class Ke extends f {
1488
+ class Ue extends f {
1491
1489
  constructor(e) {
1492
1490
  super(e);
1493
1491
  /**
@@ -1512,7 +1510,7 @@ class H extends re {
1512
1510
  r(this, "_lang", "json");
1513
1511
  }
1514
1512
  }
1515
- class Ze extends f {
1513
+ class Ke extends f {
1516
1514
  constructor(e) {
1517
1515
  super(e);
1518
1516
  r(this, "_multi", !1);
@@ -1532,7 +1530,7 @@ class Ze extends f {
1532
1530
  this._size = e;
1533
1531
  }
1534
1532
  }
1535
- class et extends w {
1533
+ class Ze extends w {
1536
1534
  constructor(e) {
1537
1535
  super(e);
1538
1536
  r(this, "_autoPlay", !0);
@@ -1548,12 +1546,12 @@ class et extends w {
1548
1546
  return this._container.rows.flat().filter((e) => !e.invisible);
1549
1547
  }
1550
1548
  }
1551
- class tt extends A {
1549
+ class et extends A {
1552
1550
  get showText() {
1553
1551
  return this.parsedWidgetProps.show_text ?? !0;
1554
1552
  }
1555
1553
  }
1556
- class it extends f {
1554
+ class tt extends f {
1557
1555
  get width() {
1558
1556
  var t;
1559
1557
  return (t = this.parsedWidgetProps) == null ? void 0 : t.width;
@@ -1600,38 +1598,35 @@ class $ {
1600
1598
  case "buttonGroup":
1601
1599
  this._widgetClass = We;
1602
1600
  break;
1603
- case "action_buttons":
1604
- this._widgetClass = Te;
1605
- break;
1606
1601
  case "selection":
1607
1602
  this._widgetClass = z;
1608
1603
  break;
1609
1604
  case "many2one":
1610
- this._widgetClass = ze;
1605
+ this._widgetClass = Te;
1611
1606
  break;
1612
1607
  case "boolean":
1613
1608
  this._widgetClass = te;
1614
1609
  break;
1615
1610
  case "integer":
1616
- this._widgetClass = Ie;
1611
+ this._widgetClass = Se;
1617
1612
  break;
1618
1613
  case "float":
1619
1614
  this._widgetClass = G;
1620
1615
  break;
1621
1616
  case "float_time":
1622
- this._widgetClass = Ee;
1617
+ this._widgetClass = Ie;
1623
1618
  break;
1624
1619
  case "date":
1625
- this._widgetClass = De;
1620
+ this._widgetClass = Ye;
1626
1621
  break;
1627
1622
  case "datetime":
1628
- this._widgetClass = je;
1623
+ this._widgetClass = De;
1629
1624
  break;
1630
1625
  case "progressbar":
1631
- this._widgetClass = Ye;
1626
+ this._widgetClass = Ve;
1632
1627
  break;
1633
1628
  case "markdown":
1634
- this._widgetClass = Se;
1629
+ this._widgetClass = ze;
1635
1630
  break;
1636
1631
  case "many2many":
1637
1632
  case "one2many":
@@ -1642,67 +1637,67 @@ class $ {
1642
1637
  this._widgetClass = K;
1643
1638
  break;
1644
1639
  case "separator":
1645
- this._widgetClass = Me;
1640
+ this._widgetClass = je;
1646
1641
  break;
1647
1642
  case "url":
1648
1643
  this._widgetClass = A;
1649
1644
  break;
1650
1645
  case "email":
1651
- this._widgetClass = Ze;
1646
+ this._widgetClass = Ke;
1652
1647
  break;
1653
1648
  case "reference":
1654
- this._widgetClass = Ae;
1649
+ this._widgetClass = Me;
1655
1650
  break;
1656
1651
  case "binary":
1657
- this._widgetClass = Ne;
1652
+ this._widgetClass = Ae;
1658
1653
  break;
1659
1654
  case "image":
1660
- this._widgetClass = Be;
1655
+ this._widgetClass = Ne;
1661
1656
  break;
1662
1657
  case "fiber_grid":
1663
- this._widgetClass = Re;
1658
+ this._widgetClass = Be;
1664
1659
  break;
1665
1660
  case "timeline":
1666
- this._widgetClass = Le;
1661
+ this._widgetClass = Re;
1667
1662
  break;
1668
1663
  case "indicator":
1669
- this._widgetClass = Ge;
1664
+ this._widgetClass = Le;
1670
1665
  break;
1671
1666
  case "tags":
1672
- this._widgetClass = $e;
1667
+ this._widgetClass = Ge;
1673
1668
  break;
1674
1669
  case "tag":
1675
- this._widgetClass = qe;
1670
+ this._widgetClass = $e;
1676
1671
  break;
1677
1672
  case "avatar":
1678
1673
  this._widgetClass = ke;
1679
1674
  break;
1680
1675
  case "radio":
1681
- this._widgetClass = Je;
1676
+ this._widgetClass = qe;
1682
1677
  break;
1683
1678
  case "multicheckbox":
1684
1679
  this._widgetClass = se;
1685
1680
  break;
1686
1681
  case "switch":
1687
- this._widgetClass = He;
1682
+ this._widgetClass = Je;
1688
1683
  break;
1689
1684
  case "steps":
1690
- this._widgetClass = Qe;
1685
+ this._widgetClass = He;
1691
1686
  break;
1692
1687
  case "codeeditor":
1693
1688
  this._widgetClass = re;
1694
1689
  break;
1695
1690
  case "time":
1696
- this._widgetClass = Xe;
1691
+ this._widgetClass = Qe;
1697
1692
  break;
1698
1693
  case "html_preview":
1699
- this._widgetClass = Ve;
1694
+ this._widgetClass = Ee;
1700
1695
  break;
1701
1696
  case "alert":
1702
- this._widgetClass = Ue;
1697
+ this._widgetClass = Xe;
1703
1698
  break;
1704
1699
  case "comments_timeline":
1705
- this._widgetClass = Ke;
1700
+ this._widgetClass = Ue;
1706
1701
  break;
1707
1702
  case "json":
1708
1703
  this._widgetClass = H;
@@ -1714,13 +1709,13 @@ class $ {
1714
1709
  this._widgetClass = R;
1715
1710
  break;
1716
1711
  case "carousel":
1717
- this._widgetClass = et;
1712
+ this._widgetClass = Ze;
1718
1713
  break;
1719
1714
  case "colorPicker":
1720
- this._widgetClass = tt;
1715
+ this._widgetClass = et;
1721
1716
  break;
1722
1717
  case "qrcode":
1723
- this._widgetClass = it;
1718
+ this._widgetClass = tt;
1724
1719
  break;
1725
1720
  }
1726
1721
  }
@@ -1743,7 +1738,7 @@ class $ {
1743
1738
  }
1744
1739
  }
1745
1740
  }
1746
- const st = ({
1741
+ const it = ({
1747
1742
  fieldName: i,
1748
1743
  values: t,
1749
1744
  fields: e
@@ -1768,7 +1763,7 @@ const st = ({
1768
1763
  n[o] = d.some((_) => _);
1769
1764
  }
1770
1765
  return n;
1771
- }, rt = ({
1766
+ }, st = ({
1772
1767
  states: i,
1773
1768
  values: t
1774
1769
  }) => {
@@ -1777,7 +1772,7 @@ const st = ({
1777
1772
  const e = i.split(",");
1778
1773
  return e.length === 0 ? {} : e.includes(t.state) ? {} : { invisible: !0 };
1779
1774
  };
1780
- function nt({
1775
+ function rt({
1781
1776
  values: i = {},
1782
1777
  fieldName: t,
1783
1778
  fields: e = {}
@@ -1805,12 +1800,12 @@ const ne = ({
1805
1800
  return u.forEach((c) => {
1806
1801
  const b = c[1];
1807
1802
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1808
- const p = nt({
1803
+ const x = rt({
1809
1804
  values: t,
1810
1805
  fields: e,
1811
1806
  fieldName: b === "active_id" ? "id" : b
1812
1807
  });
1813
- g[c[0].replace(/'/g, "")] = p || void 0;
1808
+ g[c[0].replace(/'/g, "")] = x || void 0;
1814
1809
  } else
1815
1810
  c[1] === "true" ? g[c[0].replace(/'/g, "")] = !0 : c[1] === "false" ? g[c[0].replace(/'/g, "")] = !1 : g[c[0].replace(/'/g, "")] = c[1].replace(
1816
1811
  /'/g,
@@ -1820,7 +1815,7 @@ const ne = ({
1820
1815
  } catch {
1821
1816
  return;
1822
1817
  }
1823
- }, zt = (i) => {
1818
+ }, Tt = (i) => {
1824
1819
  const t = [];
1825
1820
  try {
1826
1821
  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) => {
@@ -1840,14 +1835,14 @@ function ae(i) {
1840
1835
  function le(i) {
1841
1836
  return typeof i == "object" && i !== null && typeof i != "string";
1842
1837
  }
1843
- const at = (i) => {
1838
+ const nt = (i) => {
1844
1839
  const t = i.trim().replace(")", "").split("("), e = t[0], n = t[1].split(",").map((a) => a.trim());
1845
1840
  return {
1846
1841
  method: e,
1847
1842
  args: n
1848
1843
  };
1849
1844
  };
1850
- function lt(i) {
1845
+ function at(i) {
1851
1846
  const t = [];
1852
1847
  function e(s) {
1853
1848
  const n = [];
@@ -1859,7 +1854,7 @@ function lt(i) {
1859
1854
  e(s);
1860
1855
  return t.flat();
1861
1856
  }
1862
- class St {
1857
+ class zt {
1863
1858
  constructor(t, e = 4) {
1864
1859
  /**
1865
1860
  * Object containing fields specification of the form.
@@ -1975,7 +1970,7 @@ class St {
1975
1970
  container: this._container,
1976
1971
  values: s
1977
1972
  });
1978
- const l = lt(this._container._rows);
1973
+ const l = at(this._container._rows);
1979
1974
  l.forEach((d) => {
1980
1975
  const _ = d;
1981
1976
  _._id && _._context && (this._contextForFields[_._id] = d._context);
@@ -1992,23 +1987,23 @@ class St {
1992
1987
  const { tagName: l, attributes: o, children: d } = a;
1993
1988
  let _ = l, h = o;
1994
1989
  if (l === "field") {
1995
- const { name: x, widget: S } = o;
1990
+ const { name: p, widget: S } = o;
1996
1991
  if (S)
1997
1992
  _ = S;
1998
- else if (x) {
1999
- if (!this._fields[x])
1993
+ else if (p) {
1994
+ if (!this._fields[p])
2000
1995
  throw new Error(
2001
- `Field ${x} doesn't exist in fields defintion`
1996
+ `Field ${p} doesn't exist in fields defintion`
2002
1997
  );
2003
- _ = this._fields[x].type, o.widget_props = {
1998
+ _ = this._fields[p].type, o.widget_props = {
2004
1999
  ...U(o.widget_props),
2005
- ...this._fields[x].widget_props || {}
2000
+ ...this._fields[p].widget_props || {}
2006
2001
  };
2007
2002
  }
2008
2003
  h = {
2009
- ...this._fields[x],
2004
+ ...this._fields[p],
2010
2005
  ...o,
2011
- fieldsWidgetType: this._fields[x].type
2006
+ fieldsWidgetType: this._fields[p].type
2012
2007
  };
2013
2008
  }
2014
2009
  const u = Ce({
@@ -2018,10 +2013,10 @@ class St {
2018
2013
  widgetType: l
2019
2014
  });
2020
2015
  let g;
2021
- l === "button" && h.states ? g = rt({
2016
+ l === "button" && h.states ? g = st({
2022
2017
  states: h.states,
2023
2018
  values: s
2024
- }) : g = st({
2019
+ }) : g = it({
2025
2020
  fieldName: h.name,
2026
2021
  values: s,
2027
2022
  fields: this._fields
@@ -2031,21 +2026,21 @@ class St {
2031
2026
  values: s,
2032
2027
  fields: this._fields
2033
2028
  });
2034
- h.on_change && (this._onChangeFields[h.name] = at(
2029
+ h.on_change && (this._onChangeFields[h.name] = nt(
2035
2030
  h.on_change
2036
2031
  ));
2037
2032
  let b;
2038
2033
  Q(h.domain) ? b = h.domain : Q((v = this._fields[h.name]) == null ? void 0 : v.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
2039
- const p = {
2034
+ const x = {
2040
2035
  ...u,
2041
2036
  ...g,
2042
2037
  context: c,
2043
2038
  domain: b,
2044
2039
  key: `${this._keyIdx}`
2045
2040
  };
2046
- e.readOnly && (p.readonly = !0);
2047
- const y = n.createWidget(_, p);
2048
- y.invisible && y instanceof f && this._invisibleFields.push(p.name), y instanceof w && this.parseNode({
2041
+ e.readOnly && (x.readonly = !0);
2042
+ const y = n.createWidget(_, x);
2043
+ y.invisible && y instanceof f && this._invisibleFields.push(x.name), y instanceof w && this.parseNode({
2049
2044
  fields: d,
2050
2045
  container: y.container,
2051
2046
  values: s
@@ -2063,7 +2058,7 @@ class St {
2063
2058
  function Q(i) {
2064
2059
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2065
2060
  }
2066
- class It {
2061
+ class St {
2067
2062
  constructor(t) {
2068
2063
  /**
2069
2064
  * Object containing fields specification of the form.
@@ -2177,7 +2172,7 @@ class It {
2177
2172
  return this._columns.find((e) => e.findById ? e.findById(t) : !1);
2178
2173
  }
2179
2174
  }
2180
- const ot = {
2175
+ const lt = {
2181
2176
  text: "text",
2182
2177
  many2one: "many2one",
2183
2178
  char: "char",
@@ -2190,7 +2185,7 @@ const ot = {
2190
2185
  date: "date",
2191
2186
  datetime: "datetime"
2192
2187
  };
2193
- class Et {
2188
+ class It {
2194
2189
  constructor(t, e, s = 8) {
2195
2190
  /**
2196
2191
  * Object containing the specific fields for primary and secondary search fields
@@ -2238,7 +2233,7 @@ class Et {
2238
2233
  colspan: 2
2239
2234
  }, { type: a, widget: l } = n;
2240
2235
  let o = l ?? a;
2241
- return ot[o] === void 0 && (o = a), e.createWidget(o, n);
2236
+ return lt[o] === void 0 && (o = a), e.createWidget(o, n);
2242
2237
  });
2243
2238
  }
2244
2239
  /**
@@ -2249,7 +2244,7 @@ class Et {
2249
2244
  return this.advancedSearchContainer.findById(t);
2250
2245
  }
2251
2246
  }
2252
- const Vt = ({
2247
+ const Et = ({
2253
2248
  domain: i,
2254
2249
  widgetFieldName: t
2255
2250
  }) => {
@@ -2264,8 +2259,8 @@ const Vt = ({
2264
2259
  n.length - 1
2265
2260
  )) : (o = n, d = "id"), o === t && e.push([d, a, l]);
2266
2261
  }), e;
2267
- }, Yt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2268
- class ct {
2262
+ }, Vt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2263
+ class ot {
2269
2264
  constructor(t) {
2270
2265
  r(this, "_action_id", null);
2271
2266
  r(this, "_position", null);
@@ -2278,7 +2273,7 @@ class ct {
2278
2273
  return this._position;
2279
2274
  }
2280
2275
  }
2281
- class Dt {
2276
+ class Yt {
2282
2277
  constructor(t) {
2283
2278
  r(this, "_string", null);
2284
2279
  r(this, "_items", []);
@@ -2286,7 +2281,7 @@ class Dt {
2286
2281
  this._string = e.attributes.string || null;
2287
2282
  const { children: s } = e;
2288
2283
  s.forEach((n) => {
2289
- n.tagName === "dashboard_item" && this._items.push(new ct(n.attributes));
2284
+ n.tagName === "dashboard_item" && this._items.push(new ot(n.attributes));
2290
2285
  });
2291
2286
  }
2292
2287
  get string() {
@@ -2350,7 +2345,7 @@ class ce extends oe {
2350
2345
  return this._suffix;
2351
2346
  }
2352
2347
  }
2353
- class dt extends ce {
2348
+ class ct extends ce {
2354
2349
  constructor(e, s) {
2355
2350
  super(e, s);
2356
2351
  r(this, "_field");
@@ -2370,7 +2365,7 @@ class dt extends ce {
2370
2365
  return this._operator;
2371
2366
  }
2372
2367
  }
2373
- const ut = (i) => {
2368
+ const dt = (i) => {
2374
2369
  const t = [];
2375
2370
  let e;
2376
2371
  if (i.forEach((s) => {
@@ -2380,10 +2375,10 @@ const ut = (i) => {
2380
2375
  throw new Error(`Field ${l} doesn't have an axis`);
2381
2376
  if (!l)
2382
2377
  throw new Error("Missing name attribute for field");
2383
- n === "x" ? e = new ft({
2378
+ n === "x" ? e = new _t({
2384
2379
  name: l
2385
2380
  }) : n === "y" && t.push(
2386
- new _t({
2381
+ new ht({
2387
2382
  name: l,
2388
2383
  operator: a,
2389
2384
  label: o,
@@ -2406,7 +2401,7 @@ class j extends oe {
2406
2401
  r(this, "_x");
2407
2402
  r(this, "_y");
2408
2403
  this._type = e;
2409
- const n = ut(s.children);
2404
+ const n = dt(s.children);
2410
2405
  this._x = n.x, this._y = n.y;
2411
2406
  }
2412
2407
  get x() {
@@ -2416,17 +2411,17 @@ class j extends oe {
2416
2411
  return this._y;
2417
2412
  }
2418
2413
  }
2419
- const ht = {
2414
+ const ut = {
2420
2415
  indicator: ce,
2421
- indicatorField: dt,
2416
+ indicatorField: ct,
2422
2417
  line: j,
2423
2418
  bar: j,
2424
2419
  pie: j
2425
- }, jt = (i) => {
2420
+ }, Dt = (i) => {
2426
2421
  const t = D.parse(i).filter((n) => n.tagName === "graph")[0], e = t.attributes.type;
2427
2422
  if (!e)
2428
2423
  throw new Error(`${e} is not a valid graph`);
2429
- const s = ht[e];
2424
+ const s = ut[e];
2430
2425
  if (!s)
2431
2426
  throw new Error(`${e} not found as a GraphModel`);
2432
2427
  return new s(e, t);
@@ -2444,7 +2439,7 @@ class de {
2444
2439
  return this._axis;
2445
2440
  }
2446
2441
  }
2447
- class _t extends de {
2442
+ class ht extends de {
2448
2443
  constructor({
2449
2444
  name: e,
2450
2445
  operator: s,
@@ -2467,12 +2462,12 @@ class _t extends de {
2467
2462
  return this._stacked;
2468
2463
  }
2469
2464
  }
2470
- class ft extends de {
2465
+ class _t extends de {
2471
2466
  constructor({ name: t }) {
2472
2467
  super({ name: t, axis: "x" });
2473
2468
  }
2474
2469
  }
2475
- const gt = ({ ooui: i }) => {
2470
+ const ft = ({ ooui: i }) => {
2476
2471
  const e = [i.x.name];
2477
2472
  return i.y ? (i.y.forEach((s) => {
2478
2473
  s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
@@ -2494,27 +2489,27 @@ function q({
2494
2489
  }
2495
2490
  return { value: n, label: n };
2496
2491
  }
2497
- const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2492
+ const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2498
2493
  __proto__: null,
2499
- getFieldsToRetrieve: gt,
2494
+ getFieldsToRetrieve: ft,
2500
2495
  getValueAndLabelForField: q
2501
2496
  }, Symbol.toStringTag, { value: "Module" }));
2502
- function mt({
2497
+ function gt({
2503
2498
  values: i,
2504
2499
  timerange: t,
2505
2500
  interval: e = 1
2506
2501
  }) {
2507
- const s = pt({
2502
+ const s = yt({
2508
2503
  values: i,
2509
2504
  timerange: t
2510
2505
  });
2511
- return bt({
2506
+ return mt({
2512
2507
  values: s,
2513
2508
  timerange: t,
2514
2509
  interval: e
2515
2510
  });
2516
2511
  }
2517
- function bt({
2512
+ function mt({
2518
2513
  values: i,
2519
2514
  timerange: t,
2520
2515
  interval: e = 1
@@ -2532,7 +2527,7 @@ function bt({
2532
2527
  return;
2533
2528
  const u = h.x, g = d[_ + 1].x;
2534
2529
  if (!ue([u, g], a)) {
2535
- const c = yt({
2530
+ const c = bt({
2536
2531
  dates: [u, g],
2537
2532
  timerange: t,
2538
2533
  interval: e
@@ -2549,7 +2544,7 @@ function bt({
2549
2544
  }
2550
2545
  }), s.sort((o, d) => o.x < d.x ? -1 : o.x > d.x ? 1 : 0);
2551
2546
  }
2552
- function yt({
2547
+ function bt({
2553
2548
  dates: i,
2554
2549
  timerange: t,
2555
2550
  interval: e = 1
@@ -2571,7 +2566,7 @@ function yt({
2571
2566
  }
2572
2567
  return s;
2573
2568
  }
2574
- function pt({
2569
+ function yt({
2575
2570
  values: i,
2576
2571
  timerange: t
2577
2572
  }) {
@@ -2599,17 +2594,17 @@ function xt({
2599
2594
  }) {
2600
2595
  return i.map((e) => ({
2601
2596
  ...e,
2602
- x: wt({
2597
+ x: pt({
2603
2598
  date: e.x,
2604
2599
  timerange: t
2605
2600
  })
2606
2601
  }));
2607
2602
  }
2608
- function wt({
2603
+ function pt({
2609
2604
  date: i,
2610
2605
  timerange: t
2611
2606
  }) {
2612
- let e = Ft(i);
2607
+ let e = wt(i);
2613
2608
  const s = T(i, e);
2614
2609
  switch (t) {
2615
2610
  case "hour": {
@@ -2635,7 +2630,7 @@ function wt({
2635
2630
  }
2636
2631
  return s.format(e);
2637
2632
  }
2638
- function Ft(i) {
2633
+ function wt(i) {
2639
2634
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2640
2635
  }
2641
2636
  function ue(i, t) {
@@ -2676,7 +2671,7 @@ function E(i) {
2676
2671
  return "YYYY-MM-DD HH:mm";
2677
2672
  }
2678
2673
  }
2679
- const vt = {
2674
+ const Ft = {
2680
2675
  count: "count",
2681
2676
  "+": "sum",
2682
2677
  "-": "subtract",
@@ -2684,7 +2679,7 @@ const vt = {
2684
2679
  avg: "average",
2685
2680
  min: "min",
2686
2681
  max: "max"
2687
- }, Ct = ({
2682
+ }, vt = ({
2688
2683
  ooui: i,
2689
2684
  values: t,
2690
2685
  fields: e,
@@ -2697,7 +2692,7 @@ const vt = {
2697
2692
  }), a = [];
2698
2693
  i.y.forEach((c) => {
2699
2694
  Object.keys(n).forEach((b) => {
2700
- const p = n[b].label, y = n[b].entries;
2695
+ const x = n[b].label, y = n[b].entries;
2701
2696
  if (c.label) {
2702
2697
  const F = B({
2703
2698
  fieldName: c.label,
@@ -2705,8 +2700,8 @@ const vt = {
2705
2700
  fields: e
2706
2701
  });
2707
2702
  Object.keys(F).forEach((v) => {
2708
- const x = F[v].entries, S = F[v].label, ge = N({
2709
- entries: x,
2703
+ const p = F[v].entries, S = F[v].label, ge = N({
2704
+ entries: p,
2710
2705
  fields: e,
2711
2706
  fieldName: c.name
2712
2707
  }), me = Y({
@@ -2714,7 +2709,7 @@ const vt = {
2714
2709
  operator: c.operator
2715
2710
  });
2716
2711
  a.push({
2717
- x: p || !1,
2712
+ x: x || !1,
2718
2713
  value: me,
2719
2714
  type: S,
2720
2715
  operator: c.operator,
@@ -2731,7 +2726,7 @@ const vt = {
2731
2726
  operator: c.operator
2732
2727
  });
2733
2728
  a.push({
2734
- x: p || !1,
2729
+ x: x || !1,
2735
2730
  value: v,
2736
2731
  type: _e({
2737
2732
  yAxis: c,
@@ -2751,7 +2746,7 @@ const vt = {
2751
2746
  (c) => c.x !== !1
2752
2747
  ));
2753
2748
  let u = h;
2754
- i.timerange ? u = mt({
2749
+ i.timerange ? u = gt({
2755
2750
  values: u,
2756
2751
  timerange: i.timerange,
2757
2752
  interval: i.interval
@@ -2833,7 +2828,7 @@ function B({
2833
2828
  s[a] || (s[a] = { label: l, entries: [] }), s[a].entries.push(n);
2834
2829
  }), s;
2835
2830
  }
2836
- function kt(i) {
2831
+ function Ct(i) {
2837
2832
  let t = [];
2838
2833
  return Object.keys(i).forEach((e) => {
2839
2834
  const s = i[e];
@@ -2856,86 +2851,85 @@ function fe(i, t = 0.1) {
2856
2851
  max: n + a
2857
2852
  };
2858
2853
  }
2859
- const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2854
+ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2860
2855
  __proto__: null,
2861
- getAllObjectsInGroupedValues: kt,
2856
+ getAllObjectsInGroupedValues: Ct,
2862
2857
  getMinMax: fe,
2863
2858
  getValueForOperator: Y,
2864
2859
  getValuesForYField: N,
2865
2860
  getValuesGroupedByField: B,
2866
2861
  getYAxisFieldname: _e,
2867
- labelsForOperator: vt,
2868
- processGraphData: Ct
2862
+ labelsForOperator: Ft,
2863
+ processGraphData: vt
2869
2864
  }, Symbol.toStringTag, { value: "Module" }));
2870
2865
  export {
2871
- Te as ActionButtons,
2872
- Ue as Alert,
2866
+ Xe as Alert,
2873
2867
  ke as Avatar,
2874
- Ne as Binary,
2868
+ Ae as Binary,
2875
2869
  te as Boolean,
2876
2870
  ee as Button,
2877
2871
  We as ButtonGroup,
2878
- et as Carousel,
2872
+ Ze as Carousel,
2879
2873
  A as Char,
2880
2874
  re as CodeEditor,
2881
- tt as ColorPicker,
2882
- Ke as Comments,
2875
+ et as ColorPicker,
2876
+ Ue as Comments,
2883
2877
  V as Container,
2884
2878
  w as ContainerWidget,
2885
- Dt as Dashboard,
2886
- ct as DashboardItem,
2887
- De as Date,
2888
- je as DateTime,
2889
- Ze as Email,
2879
+ Yt as Dashboard,
2880
+ ot as DashboardItem,
2881
+ Ye as Date,
2882
+ De as DateTime,
2883
+ Ke as Email,
2890
2884
  f as Field,
2891
2885
  G as Float,
2892
- Ee as FloatTime,
2893
- St as Form,
2886
+ Ie as FloatTime,
2887
+ zt as Form,
2894
2888
  oe as Graph,
2895
2889
  de as GraphAxis,
2896
2890
  j as GraphChart,
2897
2891
  ce as GraphIndicator,
2898
- dt as GraphIndicatorField,
2899
- ft as GraphXAxis,
2900
- _t as GraphYAxis,
2892
+ ct as GraphIndicatorField,
2893
+ _t as GraphXAxis,
2894
+ ht as GraphYAxis,
2901
2895
  Oe as Group,
2902
- Ve as HTMLPreview,
2903
- Be as Image,
2904
- Ge as Indicator,
2905
- Ie as Integer,
2896
+ Ee as HTMLPreview,
2897
+ Ne as Image,
2898
+ Le as Indicator,
2899
+ Se as Integer,
2906
2900
  H as JSONField,
2907
2901
  Z as Label,
2908
- ze as Many2one,
2909
- Se as Markdown,
2902
+ Te as Many2one,
2903
+ ze as Markdown,
2910
2904
  se as MultiCheckbox,
2911
2905
  K as NewLine,
2912
2906
  M as Notebook,
2913
2907
  ie as One2many,
2914
2908
  Pe as Page,
2915
- Ye as ProgressBar,
2916
- it as QRCode,
2917
- Je as Radio,
2918
- Ae as Reference,
2919
- ot as SearchFieldTypes,
2920
- Et as SearchFilter,
2909
+ Ve as ProgressBar,
2910
+ tt as QRCode,
2911
+ qe as Radio,
2912
+ Me as Reference,
2913
+ lt as SearchFieldTypes,
2914
+ It as SearchFilter,
2921
2915
  z as Selection,
2922
- Me as Separator,
2916
+ je as Separator,
2923
2917
  R as Spinner,
2924
- Qe as Steps,
2925
- He as Switch,
2926
- qe as Tag,
2927
- $e as Tags,
2918
+ He as Steps,
2919
+ Je as Switch,
2920
+ $e as Tag,
2921
+ Ge as Tags,
2928
2922
  L as Text,
2929
- Xe as Time,
2930
- Le as Timeline,
2931
- It as Tree,
2923
+ Qe as Time,
2924
+ Re as Timeline,
2925
+ St as Tree,
2932
2926
  C as Widget,
2933
- Mt as graphFieldUtils,
2934
- At as graphProcessor,
2927
+ jt as graphFieldUtils,
2928
+ Mt as graphProcessor,
2935
2929
  ne as parseContext,
2936
- zt as parseContextFields,
2937
- Yt as parseDomainFields,
2938
- jt as parseGraph,
2939
- Vt as transformDomainForChildWidget
2930
+ Tt as parseContextFields,
2931
+ Vt as parseDomainFields,
2932
+ Dt as parseGraph,
2933
+ Et as transformDomainForChildWidget
2940
2934
  };
2941
2935
  //# sourceMappingURL=ooui.es.js.map