@gisce/ooui 2.40.0 → 2.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ooui.es.js CHANGED
@@ -4,7 +4,7 @@ var r = (i, t, e) => (ye(i, typeof t != "symbol" ? t + "" : t, e), e);
4
4
  import { decode as xe } from "html-entities";
5
5
  import { evaluateCondition as pe } from "@gisce/conscheck";
6
6
  import * as D from "txml";
7
- import T from "moment";
7
+ import z from "moment";
8
8
  const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve = ({
9
9
  entry: i,
10
10
  values: t,
@@ -833,7 +833,7 @@ class We extends w {
833
833
  return this._container.rows.flat().filter((e) => !e.invisible);
834
834
  }
835
835
  }
836
- class Te extends f {
836
+ class ze extends f {
837
837
  }
838
838
  class A extends f {
839
839
  constructor(e) {
@@ -942,7 +942,7 @@ class L extends f {
942
942
  this._translatable = e;
943
943
  }
944
944
  }
945
- class z extends f {
945
+ class T extends f {
946
946
  constructor(e) {
947
947
  super(e);
948
948
  /**
@@ -958,7 +958,7 @@ class z extends f {
958
958
  this._size = e;
959
959
  }
960
960
  }
961
- class ze extends f {
961
+ class Te extends f {
962
962
  constructor(e) {
963
963
  super(e);
964
964
  /**
@@ -1182,7 +1182,7 @@ class Me extends C {
1182
1182
  return null;
1183
1183
  }
1184
1184
  }
1185
- class Ne extends z {
1185
+ class Ne extends T {
1186
1186
  }
1187
1187
  class Ae extends f {
1188
1188
  constructor(e) {
@@ -1234,11 +1234,47 @@ class Be extends f {
1234
1234
  }
1235
1235
  }
1236
1236
  class Re extends f {
1237
+ constructor(e) {
1238
+ super({ ...e, 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
+ e && (e.name && (this._name = e.name), e.size && (this._size = e.size), e.color && (this._color = e.color));
1252
+ }
1253
+ get name() {
1254
+ return this._name;
1255
+ }
1256
+ set name(e) {
1257
+ this._name = e;
1258
+ }
1259
+ get size() {
1260
+ return this._size;
1261
+ }
1262
+ set size(e) {
1263
+ this._size = e;
1264
+ }
1265
+ get color() {
1266
+ return this._color;
1267
+ }
1268
+ set color(e) {
1269
+ this._color = e;
1270
+ }
1271
+ }
1272
+ class Le extends f {
1237
1273
  constructor(t) {
1238
1274
  super(t);
1239
1275
  }
1240
1276
  }
1241
- class Le extends ie {
1277
+ class Ge extends ie {
1242
1278
  constructor(e) {
1243
1279
  super(e);
1244
1280
  /**
@@ -1270,7 +1306,7 @@ class Le extends ie {
1270
1306
  return this.parsedWidgetProps.colorField;
1271
1307
  }
1272
1308
  }
1273
- class Ge extends z {
1309
+ class $e extends T {
1274
1310
  constructor(e) {
1275
1311
  super(e);
1276
1312
  r(this, "_nolabel", !0);
@@ -1397,9 +1433,9 @@ class se extends f {
1397
1433
  this._columns = e;
1398
1434
  }
1399
1435
  }
1400
- class $e extends se {
1436
+ class qe extends se {
1401
1437
  }
1402
- class qe extends z {
1438
+ class Je extends T {
1403
1439
  get colors() {
1404
1440
  return this._parsedWidgetProps.colors || {};
1405
1441
  }
@@ -1408,7 +1444,7 @@ class qe extends z {
1408
1444
  return ((t = this._parsedWidgetProps) == null ? void 0 : t.colorField) || null;
1409
1445
  }
1410
1446
  }
1411
- class Je extends z {
1447
+ class He extends T {
1412
1448
  constructor(e) {
1413
1449
  super(e);
1414
1450
  /**
@@ -1424,9 +1460,9 @@ class Je extends z {
1424
1460
  this._direction = e;
1425
1461
  }
1426
1462
  }
1427
- class He extends te {
1463
+ class Qe extends te {
1428
1464
  }
1429
- class Qe extends f {
1465
+ class Xe extends f {
1430
1466
  constructor(e) {
1431
1467
  super(e);
1432
1468
  /**
@@ -1469,12 +1505,12 @@ class re extends L {
1469
1505
  this._lang = e;
1470
1506
  }
1471
1507
  }
1472
- class Xe extends f {
1508
+ class Ue extends f {
1473
1509
  constructor(t) {
1474
1510
  super(t);
1475
1511
  }
1476
1512
  }
1477
- class Ue extends w {
1513
+ class Ke extends w {
1478
1514
  constructor(e) {
1479
1515
  super(e);
1480
1516
  /**
@@ -1514,7 +1550,7 @@ class Ue extends w {
1514
1550
  return this._container.rows.flat().filter((e) => !e.invisible);
1515
1551
  }
1516
1552
  }
1517
- class Ke extends f {
1553
+ class Ze extends f {
1518
1554
  constructor(e) {
1519
1555
  super(e);
1520
1556
  /**
@@ -1539,7 +1575,7 @@ class H extends re {
1539
1575
  r(this, "_lang", "json");
1540
1576
  }
1541
1577
  }
1542
- class Ze extends f {
1578
+ class et extends f {
1543
1579
  constructor(e) {
1544
1580
  super(e);
1545
1581
  r(this, "_multi", !1);
@@ -1559,7 +1595,7 @@ class Ze extends f {
1559
1595
  this._size = e;
1560
1596
  }
1561
1597
  }
1562
- class et extends w {
1598
+ class tt extends w {
1563
1599
  constructor(e) {
1564
1600
  super(e);
1565
1601
  r(this, "_autoPlay", !0);
@@ -1575,12 +1611,12 @@ class et extends w {
1575
1611
  return this._container.rows.flat().filter((e) => !e.invisible);
1576
1612
  }
1577
1613
  }
1578
- class tt extends A {
1614
+ class it extends A {
1579
1615
  get showText() {
1580
1616
  return this.parsedWidgetProps.show_text ?? !0;
1581
1617
  }
1582
1618
  }
1583
- class it extends f {
1619
+ class st extends f {
1584
1620
  get width() {
1585
1621
  var t;
1586
1622
  return (t = this.parsedWidgetProps) == null ? void 0 : t.width;
@@ -1594,7 +1630,7 @@ class it extends f {
1594
1630
  return console.log(this.parsedWidgetProps), ((t = this.parsedWidgetProps) == null ? void 0 : t.showValue) ?? !1;
1595
1631
  }
1596
1632
  }
1597
- class st extends j {
1633
+ class rt extends j {
1598
1634
  constructor(e) {
1599
1635
  super(e);
1600
1636
  r(this, "_title", null);
@@ -1646,7 +1682,7 @@ class $ {
1646
1682
  this._widgetClass = Oe;
1647
1683
  break;
1648
1684
  case "card":
1649
- this._widgetClass = st;
1685
+ this._widgetClass = rt;
1650
1686
  break;
1651
1687
  case "label":
1652
1688
  this._widgetClass = Z;
@@ -1664,13 +1700,13 @@ class $ {
1664
1700
  this._widgetClass = We;
1665
1701
  break;
1666
1702
  case "action_buttons":
1667
- this._widgetClass = Te;
1703
+ this._widgetClass = ze;
1668
1704
  break;
1669
1705
  case "selection":
1670
- this._widgetClass = z;
1706
+ this._widgetClass = T;
1671
1707
  break;
1672
1708
  case "many2one":
1673
- this._widgetClass = ze;
1709
+ this._widgetClass = Te;
1674
1710
  break;
1675
1711
  case "boolean":
1676
1712
  this._widgetClass = te;
@@ -1711,7 +1747,7 @@ class $ {
1711
1747
  this._widgetClass = A;
1712
1748
  break;
1713
1749
  case "email":
1714
- this._widgetClass = Ze;
1750
+ this._widgetClass = et;
1715
1751
  break;
1716
1752
  case "reference":
1717
1753
  this._widgetClass = Ne;
@@ -1722,50 +1758,53 @@ class $ {
1722
1758
  case "image":
1723
1759
  this._widgetClass = Be;
1724
1760
  break;
1725
- case "fiber_grid":
1761
+ case "icon":
1726
1762
  this._widgetClass = Re;
1727
1763
  break;
1728
- case "timeline":
1764
+ case "fiber_grid":
1729
1765
  this._widgetClass = Le;
1730
1766
  break;
1731
- case "indicator":
1767
+ case "timeline":
1732
1768
  this._widgetClass = Ge;
1733
1769
  break;
1734
- case "tags":
1770
+ case "indicator":
1735
1771
  this._widgetClass = $e;
1736
1772
  break;
1737
- case "tag":
1773
+ case "tags":
1738
1774
  this._widgetClass = qe;
1739
1775
  break;
1776
+ case "tag":
1777
+ this._widgetClass = Je;
1778
+ break;
1740
1779
  case "avatar":
1741
1780
  this._widgetClass = ke;
1742
1781
  break;
1743
1782
  case "radio":
1744
- this._widgetClass = Je;
1783
+ this._widgetClass = He;
1745
1784
  break;
1746
1785
  case "multicheckbox":
1747
1786
  this._widgetClass = se;
1748
1787
  break;
1749
1788
  case "switch":
1750
- this._widgetClass = He;
1789
+ this._widgetClass = Qe;
1751
1790
  break;
1752
1791
  case "steps":
1753
- this._widgetClass = Qe;
1792
+ this._widgetClass = Xe;
1754
1793
  break;
1755
1794
  case "codeeditor":
1756
1795
  this._widgetClass = re;
1757
1796
  break;
1758
1797
  case "time":
1759
- this._widgetClass = Xe;
1798
+ this._widgetClass = Ue;
1760
1799
  break;
1761
1800
  case "html_preview":
1762
1801
  this._widgetClass = Ve;
1763
1802
  break;
1764
1803
  case "alert":
1765
- this._widgetClass = Ue;
1804
+ this._widgetClass = Ke;
1766
1805
  break;
1767
1806
  case "comments_timeline":
1768
- this._widgetClass = Ke;
1807
+ this._widgetClass = Ze;
1769
1808
  break;
1770
1809
  case "json":
1771
1810
  this._widgetClass = H;
@@ -1777,13 +1816,13 @@ class $ {
1777
1816
  this._widgetClass = j;
1778
1817
  break;
1779
1818
  case "carousel":
1780
- this._widgetClass = et;
1819
+ this._widgetClass = tt;
1781
1820
  break;
1782
1821
  case "colorPicker":
1783
- this._widgetClass = tt;
1822
+ this._widgetClass = it;
1784
1823
  break;
1785
1824
  case "qrcode":
1786
- this._widgetClass = it;
1825
+ this._widgetClass = st;
1787
1826
  break;
1788
1827
  }
1789
1828
  }
@@ -1807,7 +1846,7 @@ class $ {
1807
1846
  }
1808
1847
  }
1809
1848
  }
1810
- const rt = ({
1849
+ const nt = ({
1811
1850
  fieldName: i,
1812
1851
  values: t,
1813
1852
  fields: e
@@ -1832,7 +1871,7 @@ const rt = ({
1832
1871
  n[o] = d.some((_) => _);
1833
1872
  }
1834
1873
  return n;
1835
- }, nt = ({
1874
+ }, at = ({
1836
1875
  states: i,
1837
1876
  values: t
1838
1877
  }) => {
@@ -1841,7 +1880,7 @@ const rt = ({
1841
1880
  const e = i.split(",");
1842
1881
  return e.length === 0 ? {} : e.includes(t.state) ? {} : { invisible: !0 };
1843
1882
  };
1844
- function at({
1883
+ function lt({
1845
1884
  values: i = {},
1846
1885
  fieldName: t,
1847
1886
  fields: e = {}
@@ -1869,7 +1908,7 @@ const ne = ({
1869
1908
  return h.forEach((c) => {
1870
1909
  const b = c[1];
1871
1910
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1872
- const x = at({
1911
+ const x = lt({
1873
1912
  values: t,
1874
1913
  fields: e,
1875
1914
  fieldName: b === "active_id" ? "id" : b
@@ -1884,7 +1923,7 @@ const ne = ({
1884
1923
  } catch {
1885
1924
  return;
1886
1925
  }
1887
- }, It = (i) => {
1926
+ }, St = (i) => {
1888
1927
  const t = [];
1889
1928
  try {
1890
1929
  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((h) => h.split(":")).forEach((h) => {
@@ -1904,14 +1943,14 @@ function ae(i) {
1904
1943
  function le(i) {
1905
1944
  return typeof i == "object" && i !== null && typeof i != "string";
1906
1945
  }
1907
- const lt = (i) => {
1946
+ const ot = (i) => {
1908
1947
  const t = i.trim().replace(")", "").split("("), e = t[0], n = t[1].split(",").map((a) => a.trim());
1909
1948
  return {
1910
1949
  method: e,
1911
1950
  args: n
1912
1951
  };
1913
1952
  };
1914
- function ot(i) {
1953
+ function ct(i) {
1915
1954
  const t = [];
1916
1955
  function e(s) {
1917
1956
  const n = [];
@@ -1923,7 +1962,7 @@ function ot(i) {
1923
1962
  e(s);
1924
1963
  return t.flat();
1925
1964
  }
1926
- class St {
1965
+ class Et {
1927
1966
  constructor(t, e = 4) {
1928
1967
  /**
1929
1968
  * Object containing fields specification of the form.
@@ -2039,7 +2078,7 @@ class St {
2039
2078
  container: this._container,
2040
2079
  values: s
2041
2080
  });
2042
- const l = ot(this._container._rows);
2081
+ const l = ct(this._container._rows);
2043
2082
  l.forEach((d) => {
2044
2083
  const _ = d;
2045
2084
  _._id && _._context && (this._contextForFields[_._id] = d._context);
@@ -2082,10 +2121,10 @@ class St {
2082
2121
  widgetType: l
2083
2122
  });
2084
2123
  let g;
2085
- l === "button" && u.states ? g = nt({
2124
+ l === "button" && u.states ? g = at({
2086
2125
  states: u.states,
2087
2126
  values: s
2088
- }) : g = rt({
2127
+ }) : g = nt({
2089
2128
  fieldName: u.name,
2090
2129
  values: s,
2091
2130
  fields: this._fields
@@ -2095,7 +2134,7 @@ class St {
2095
2134
  values: s,
2096
2135
  fields: this._fields
2097
2136
  });
2098
- u.on_change && (this._onChangeFields[u.name] = lt(
2137
+ u.on_change && (this._onChangeFields[u.name] = ot(
2099
2138
  u.on_change
2100
2139
  ));
2101
2140
  let b;
@@ -2127,7 +2166,7 @@ class St {
2127
2166
  function Q(i) {
2128
2167
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2129
2168
  }
2130
- class Et {
2169
+ class Vt {
2131
2170
  constructor(t) {
2132
2171
  /**
2133
2172
  * Object containing fields specification of the form.
@@ -2241,7 +2280,7 @@ class Et {
2241
2280
  return this._columns.find((e) => e.findById ? e.findById(t) : !1);
2242
2281
  }
2243
2282
  }
2244
- const ct = {
2283
+ const dt = {
2245
2284
  text: "text",
2246
2285
  many2one: "many2one",
2247
2286
  char: "char",
@@ -2254,7 +2293,7 @@ const ct = {
2254
2293
  date: "date",
2255
2294
  datetime: "datetime"
2256
2295
  };
2257
- class Vt {
2296
+ class Yt {
2258
2297
  constructor(t, e, s = 8) {
2259
2298
  /**
2260
2299
  * Object containing the specific fields for primary and secondary search fields
@@ -2302,7 +2341,7 @@ class Vt {
2302
2341
  colspan: 2
2303
2342
  }, { type: a, widget: l } = n;
2304
2343
  let o = l ?? a;
2305
- return ct[o] === void 0 && (o = a), e.createWidget(o, n);
2344
+ return dt[o] === void 0 && (o = a), e.createWidget(o, n);
2306
2345
  });
2307
2346
  }
2308
2347
  /**
@@ -2313,7 +2352,7 @@ class Vt {
2313
2352
  return this.advancedSearchContainer.findById(t);
2314
2353
  }
2315
2354
  }
2316
- const Yt = ({
2355
+ const Dt = ({
2317
2356
  domain: i,
2318
2357
  widgetFieldName: t
2319
2358
  }) => {
@@ -2328,8 +2367,8 @@ const Yt = ({
2328
2367
  n.length - 1
2329
2368
  )) : (o = n, d = "id"), o === t && e.push([d, a, l]);
2330
2369
  }), e;
2331
- }, Dt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2332
- class dt {
2370
+ }, jt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2371
+ class ht {
2333
2372
  constructor(t) {
2334
2373
  r(this, "_action_id", null);
2335
2374
  r(this, "_position", null);
@@ -2342,7 +2381,7 @@ class dt {
2342
2381
  return this._position;
2343
2382
  }
2344
2383
  }
2345
- class jt {
2384
+ class Mt {
2346
2385
  constructor(t) {
2347
2386
  r(this, "_string", null);
2348
2387
  r(this, "_items", []);
@@ -2350,7 +2389,7 @@ class jt {
2350
2389
  this._string = e.attributes.string || null;
2351
2390
  const { children: s } = e;
2352
2391
  s.forEach((n) => {
2353
- n.tagName === "dashboard_item" && this._items.push(new dt(n.attributes));
2392
+ n.tagName === "dashboard_item" && this._items.push(new ht(n.attributes));
2354
2393
  });
2355
2394
  }
2356
2395
  get string() {
@@ -2414,7 +2453,7 @@ class ce extends oe {
2414
2453
  return this._suffix;
2415
2454
  }
2416
2455
  }
2417
- class ht extends ce {
2456
+ class ut extends ce {
2418
2457
  constructor(e, s) {
2419
2458
  super(e, s);
2420
2459
  r(this, "_field");
@@ -2434,7 +2473,7 @@ class ht extends ce {
2434
2473
  return this._operator;
2435
2474
  }
2436
2475
  }
2437
- const ut = (i) => {
2476
+ const _t = (i) => {
2438
2477
  const t = [];
2439
2478
  let e;
2440
2479
  if (i.forEach((s) => {
@@ -2444,10 +2483,10 @@ const ut = (i) => {
2444
2483
  throw new Error(`Field ${l} doesn't have an axis`);
2445
2484
  if (!l)
2446
2485
  throw new Error("Missing name attribute for field");
2447
- n === "x" ? e = new gt({
2486
+ n === "x" ? e = new mt({
2448
2487
  name: l
2449
2488
  }) : n === "y" && t.push(
2450
- new ft({
2489
+ new gt({
2451
2490
  name: l,
2452
2491
  operator: a,
2453
2492
  label: o,
@@ -2470,7 +2509,7 @@ class M extends oe {
2470
2509
  r(this, "_x");
2471
2510
  r(this, "_y");
2472
2511
  this._type = e;
2473
- const n = ut(s.children);
2512
+ const n = _t(s.children);
2474
2513
  this._x = n.x, this._y = n.y;
2475
2514
  }
2476
2515
  get x() {
@@ -2480,17 +2519,17 @@ class M extends oe {
2480
2519
  return this._y;
2481
2520
  }
2482
2521
  }
2483
- const _t = {
2522
+ const ft = {
2484
2523
  indicator: ce,
2485
- indicatorField: ht,
2524
+ indicatorField: ut,
2486
2525
  line: M,
2487
2526
  bar: M,
2488
2527
  pie: M
2489
- }, Mt = (i) => {
2528
+ }, Nt = (i) => {
2490
2529
  const t = D.parse(i).filter((n) => n.tagName === "graph")[0], e = t.attributes.type;
2491
2530
  if (!e)
2492
2531
  throw new Error(`${e} is not a valid graph`);
2493
- const s = _t[e];
2532
+ const s = ft[e];
2494
2533
  if (!s)
2495
2534
  throw new Error(`${e} not found as a GraphModel`);
2496
2535
  return new s(e, t);
@@ -2508,7 +2547,7 @@ class de {
2508
2547
  return this._axis;
2509
2548
  }
2510
2549
  }
2511
- class ft extends de {
2550
+ class gt extends de {
2512
2551
  constructor({
2513
2552
  name: e,
2514
2553
  operator: s,
@@ -2531,12 +2570,12 @@ class ft extends de {
2531
2570
  return this._stacked;
2532
2571
  }
2533
2572
  }
2534
- class gt extends de {
2573
+ class mt extends de {
2535
2574
  constructor({ name: t }) {
2536
2575
  super({ name: t, axis: "x" });
2537
2576
  }
2538
2577
  }
2539
- const mt = ({ ooui: i }) => {
2578
+ const bt = ({ ooui: i }) => {
2540
2579
  const e = [i.x.name];
2541
2580
  return i.y ? (i.y.forEach((s) => {
2542
2581
  s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
@@ -2558,27 +2597,27 @@ function q({
2558
2597
  }
2559
2598
  return { value: n, label: n };
2560
2599
  }
2561
- const Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2600
+ const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2562
2601
  __proto__: null,
2563
- getFieldsToRetrieve: mt,
2602
+ getFieldsToRetrieve: bt,
2564
2603
  getValueAndLabelForField: q
2565
2604
  }, Symbol.toStringTag, { value: "Module" }));
2566
- function bt({
2605
+ function yt({
2567
2606
  values: i,
2568
2607
  timerange: t,
2569
2608
  interval: e = 1
2570
2609
  }) {
2571
- const s = pt({
2610
+ const s = wt({
2572
2611
  values: i,
2573
2612
  timerange: t
2574
2613
  });
2575
- return yt({
2614
+ return xt({
2576
2615
  values: s,
2577
2616
  timerange: t,
2578
2617
  interval: e
2579
2618
  });
2580
2619
  }
2581
- function yt({
2620
+ function xt({
2582
2621
  values: i,
2583
2622
  timerange: t,
2584
2623
  interval: e = 1
@@ -2596,7 +2635,7 @@ function yt({
2596
2635
  return;
2597
2636
  const h = u.x, g = d[_ + 1].x;
2598
2637
  if (!he([h, g], a)) {
2599
- const c = xt({
2638
+ const c = pt({
2600
2639
  dates: [h, g],
2601
2640
  timerange: t,
2602
2641
  interval: e
@@ -2613,7 +2652,7 @@ function yt({
2613
2652
  }
2614
2653
  }), s.sort((o, d) => o.x < d.x ? -1 : o.x > d.x ? 1 : 0);
2615
2654
  }
2616
- function xt({
2655
+ function pt({
2617
2656
  dates: i,
2618
2657
  timerange: t,
2619
2658
  interval: e = 1
@@ -2625,21 +2664,21 @@ function xt({
2625
2664
  for (let l = 0; l < a.length - 1; l++) {
2626
2665
  const o = a[l], d = a[l + 1];
2627
2666
  if (!he([o, d], n)) {
2628
- const _ = T(o, E(n)).add(
2667
+ const _ = z(o, E(n)).add(
2629
2668
  e,
2630
2669
  n
2631
- ), u = T(d, E(n));
2670
+ ), u = z(d, E(n));
2632
2671
  for (; _.isBefore(u); )
2633
2672
  s.push(_.format(E(n))), _.add(e, n);
2634
2673
  }
2635
2674
  }
2636
2675
  return s;
2637
2676
  }
2638
- function pt({
2677
+ function wt({
2639
2678
  values: i,
2640
2679
  timerange: t
2641
2680
  }) {
2642
- const e = wt({
2681
+ const e = vt({
2643
2682
  values: i,
2644
2683
  timerange: t
2645
2684
  }), s = [], n = ue({
@@ -2657,24 +2696,24 @@ function pt({
2657
2696
  });
2658
2697
  }), s;
2659
2698
  }
2660
- function wt({
2699
+ function vt({
2661
2700
  values: i,
2662
2701
  timerange: t
2663
2702
  }) {
2664
2703
  return i.map((e) => ({
2665
2704
  ...e,
2666
- x: vt({
2705
+ x: Ft({
2667
2706
  date: e.x,
2668
2707
  timerange: t
2669
2708
  })
2670
2709
  }));
2671
2710
  }
2672
- function vt({
2711
+ function Ft({
2673
2712
  date: i,
2674
2713
  timerange: t
2675
2714
  }) {
2676
- let e = Ft(i);
2677
- const s = T(i, e);
2715
+ let e = Ct(i);
2716
+ const s = z(i, e);
2678
2717
  switch (t) {
2679
2718
  case "hour": {
2680
2719
  e = "YYYY-MM-DD HH:00";
@@ -2699,7 +2738,7 @@ function vt({
2699
2738
  }
2700
2739
  return s.format(e);
2701
2740
  }
2702
- function Ft(i) {
2741
+ function Ct(i) {
2703
2742
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2704
2743
  }
2705
2744
  function he(i, t) {
@@ -2710,7 +2749,7 @@ function he(i, t) {
2710
2749
  if (i.length === 1)
2711
2750
  return !0;
2712
2751
  for (let n = 0; n < i.length - 1; n++) {
2713
- const a = T(i[n], s), o = T(i[n + 1], s).diff(a, t);
2752
+ const a = z(i[n], s), o = z(i[n + 1], s).diff(a, t);
2714
2753
  Math.abs(o) === 1 ? e = !0 : e = !1;
2715
2754
  }
2716
2755
  return e;
@@ -2740,7 +2779,7 @@ function E(i) {
2740
2779
  return "YYYY-MM-DD HH:mm";
2741
2780
  }
2742
2781
  }
2743
- const Ct = {
2782
+ const kt = {
2744
2783
  count: "count",
2745
2784
  "+": "sum",
2746
2785
  "-": "subtract",
@@ -2748,7 +2787,7 @@ const Ct = {
2748
2787
  avg: "average",
2749
2788
  min: "min",
2750
2789
  max: "max"
2751
- }, kt = ({
2790
+ }, Pt = ({
2752
2791
  ooui: i,
2753
2792
  values: t,
2754
2793
  fields: e,
@@ -2815,7 +2854,7 @@ const Ct = {
2815
2854
  (c) => c.x !== !1
2816
2855
  ));
2817
2856
  let h = u;
2818
- i.timerange ? h = bt({
2857
+ i.timerange ? h = yt({
2819
2858
  values: h,
2820
2859
  timerange: i.timerange,
2821
2860
  interval: i.interval
@@ -2897,7 +2936,7 @@ function R({
2897
2936
  s[a] || (s[a] = { label: l, entries: [] }), s[a].entries.push(n);
2898
2937
  }), s;
2899
2938
  }
2900
- function Pt(i) {
2939
+ function Ot(i) {
2901
2940
  let t = [];
2902
2941
  return Object.keys(i).forEach((e) => {
2903
2942
  const s = i[e];
@@ -2920,57 +2959,58 @@ function fe(i, t = 0.1) {
2920
2959
  max: n + a
2921
2960
  };
2922
2961
  }
2923
- const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2962
+ const Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2924
2963
  __proto__: null,
2925
- getAllObjectsInGroupedValues: Pt,
2964
+ getAllObjectsInGroupedValues: Ot,
2926
2965
  getMinMax: fe,
2927
2966
  getValueForOperator: Y,
2928
2967
  getValuesForYField: B,
2929
2968
  getValuesGroupedByField: R,
2930
2969
  getYAxisFieldname: _e,
2931
- labelsForOperator: Ct,
2932
- processGraphData: kt
2970
+ labelsForOperator: kt,
2971
+ processGraphData: Pt
2933
2972
  }, Symbol.toStringTag, { value: "Module" }));
2934
2973
  export {
2935
- Te as ActionButtons,
2936
- Ue as Alert,
2974
+ ze as ActionButtons,
2975
+ Ke as Alert,
2937
2976
  ke as Avatar,
2938
2977
  Ae as Binary,
2939
2978
  te as Boolean,
2940
2979
  ee as Button,
2941
2980
  We as ButtonGroup,
2942
- st as Card,
2943
- et as Carousel,
2981
+ rt as Card,
2982
+ tt as Carousel,
2944
2983
  A as Char,
2945
2984
  re as CodeEditor,
2946
- tt as ColorPicker,
2947
- Ke as Comments,
2985
+ it as ColorPicker,
2986
+ Ze as Comments,
2948
2987
  V as Container,
2949
2988
  w as ContainerWidget,
2950
- jt as Dashboard,
2951
- dt as DashboardItem,
2989
+ Mt as Dashboard,
2990
+ ht as DashboardItem,
2952
2991
  De as Date,
2953
2992
  je as DateTime,
2954
- Ze as Email,
2993
+ et as Email,
2955
2994
  f as Field,
2956
2995
  G as Float,
2957
2996
  Ee as FloatTime,
2958
- St as Form,
2997
+ Et as Form,
2959
2998
  oe as Graph,
2960
2999
  de as GraphAxis,
2961
3000
  M as GraphChart,
2962
3001
  ce as GraphIndicator,
2963
- ht as GraphIndicatorField,
2964
- gt as GraphXAxis,
2965
- ft as GraphYAxis,
3002
+ ut as GraphIndicatorField,
3003
+ mt as GraphXAxis,
3004
+ gt as GraphYAxis,
2966
3005
  Oe as Group,
2967
3006
  Ve as HTMLPreview,
3007
+ Re as Icon,
2968
3008
  Be as Image,
2969
- Ge as Indicator,
3009
+ $e as Indicator,
2970
3010
  Se as Integer,
2971
3011
  H as JSONField,
2972
3012
  Z as Label,
2973
- ze as Many2one,
3013
+ Te as Many2one,
2974
3014
  Ie as Markdown,
2975
3015
  se as MultiCheckbox,
2976
3016
  K as NewLine,
@@ -2978,29 +3018,29 @@ export {
2978
3018
  ie as One2many,
2979
3019
  Pe as Page,
2980
3020
  Ye as ProgressBar,
2981
- it as QRCode,
2982
- Je as Radio,
3021
+ st as QRCode,
3022
+ He as Radio,
2983
3023
  Ne as Reference,
2984
- ct as SearchFieldTypes,
2985
- Vt as SearchFilter,
2986
- z as Selection,
3024
+ dt as SearchFieldTypes,
3025
+ Yt as SearchFilter,
3026
+ T as Selection,
2987
3027
  Me as Separator,
2988
3028
  j as Spinner,
2989
- Qe as Steps,
2990
- He as Switch,
2991
- qe as Tag,
2992
- $e as Tags,
3029
+ Xe as Steps,
3030
+ Qe as Switch,
3031
+ Je as Tag,
3032
+ qe as Tags,
2993
3033
  L as Text,
2994
- Xe as Time,
2995
- Le as Timeline,
2996
- Et as Tree,
3034
+ Ue as Time,
3035
+ Ge as Timeline,
3036
+ Vt as Tree,
2997
3037
  C as Widget,
2998
- Nt as graphFieldUtils,
2999
- At as graphProcessor,
3038
+ At as graphFieldUtils,
3039
+ Bt as graphProcessor,
3000
3040
  ne as parseContext,
3001
- It as parseContextFields,
3002
- Dt as parseDomainFields,
3003
- Mt as parseGraph,
3004
- Yt as transformDomainForChildWidget
3041
+ St as parseContextFields,
3042
+ jt as parseDomainFields,
3043
+ Nt as parseGraph,
3044
+ Dt as transformDomainForChildWidget
3005
3045
  };
3006
3046
  //# sourceMappingURL=ooui.es.js.map