@gisce/ooui 2.40.0-alpha.2 → 2.40.0-alpha.4
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/Graph/GraphIndicator.d.ts +2 -0
- package/dist/Graph/GraphIndicator.d.ts.map +1 -1
- package/dist/Icon.d.ts +24 -0
- package/dist/Icon.d.ts.map +1 -0
- package/dist/WidgetFactory.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/ooui.es.js +188 -144
- package/dist/ooui.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Graph/GraphIndicator.ts +6 -0
- package/src/Icon.ts +59 -0
- package/src/WidgetFactory.ts +4 -0
- package/src/index.ts +2 -0
- package/src/spec/Graph.spec.ts +25 -0
- package/src/spec/Icon.spec.ts +93 -0
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
|
|
7
|
-
import
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1436
|
+
class qt extends rt {
|
|
1401
1437
|
}
|
|
1402
|
-
class
|
|
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
|
|
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
|
|
1463
|
+
class Qt extends it {
|
|
1428
1464
|
}
|
|
1429
|
-
class
|
|
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
|
|
1508
|
+
class Xt extends f {
|
|
1473
1509
|
constructor(e) {
|
|
1474
1510
|
super(e);
|
|
1475
1511
|
}
|
|
1476
1512
|
}
|
|
1477
|
-
class
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1614
|
+
class ie extends A {
|
|
1579
1615
|
get showText() {
|
|
1580
1616
|
return this.parsedWidgetProps.show_text ?? !0;
|
|
1581
1617
|
}
|
|
1582
1618
|
}
|
|
1583
|
-
class
|
|
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
|
|
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 =
|
|
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 =
|
|
1703
|
+
this._widgetClass = zt;
|
|
1668
1704
|
break;
|
|
1669
1705
|
case "selection":
|
|
1670
|
-
this._widgetClass =
|
|
1706
|
+
this._widgetClass = I;
|
|
1671
1707
|
break;
|
|
1672
1708
|
case "many2one":
|
|
1673
|
-
this._widgetClass =
|
|
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 =
|
|
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 =
|
|
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 "
|
|
1761
|
+
case "icon":
|
|
1726
1762
|
this._widgetClass = Rt;
|
|
1727
1763
|
break;
|
|
1728
|
-
case "
|
|
1764
|
+
case "fiber_grid":
|
|
1729
1765
|
this._widgetClass = Lt;
|
|
1730
1766
|
break;
|
|
1731
|
-
case "
|
|
1767
|
+
case "timeline":
|
|
1732
1768
|
this._widgetClass = Gt;
|
|
1733
1769
|
break;
|
|
1734
|
-
case "
|
|
1770
|
+
case "indicator":
|
|
1735
1771
|
this._widgetClass = $t;
|
|
1736
1772
|
break;
|
|
1737
|
-
case "
|
|
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 =
|
|
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 =
|
|
1789
|
+
this._widgetClass = Qt;
|
|
1751
1790
|
break;
|
|
1752
1791
|
case "steps":
|
|
1753
|
-
this._widgetClass =
|
|
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 =
|
|
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 =
|
|
1804
|
+
this._widgetClass = Ut;
|
|
1766
1805
|
break;
|
|
1767
1806
|
case "comments_timeline":
|
|
1768
|
-
this._widgetClass =
|
|
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 =
|
|
1819
|
+
this._widgetClass = ee;
|
|
1781
1820
|
break;
|
|
1782
1821
|
case "colorPicker":
|
|
1783
|
-
this._widgetClass =
|
|
1822
|
+
this._widgetClass = ie;
|
|
1784
1823
|
break;
|
|
1785
1824
|
case "qrcode":
|
|
1786
|
-
this._widgetClass =
|
|
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
|
|
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
|
-
},
|
|
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
|
|
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 =
|
|
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
|
-
},
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
2124
|
+
o === "button" && h.states ? m = ae({
|
|
2086
2125
|
states: h.states,
|
|
2087
2126
|
values: s
|
|
2088
|
-
}) : m =
|
|
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] =
|
|
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
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
},
|
|
2480
|
-
class
|
|
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
|
|
2532
|
+
class Me {
|
|
2494
2533
|
constructor(e) {
|
|
2495
2534
|
r(this, "_string", null);
|
|
2496
2535
|
r(this, "_items", []);
|
|
2497
|
-
const t =
|
|
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
|
|
2540
|
+
n.tagName === "dashboard_item" && this._items.push(new ue(n.attributes));
|
|
2502
2541
|
});
|
|
2503
2542
|
}
|
|
2504
2543
|
get string() {
|
|
@@ -2543,8 +2582,9 @@ class ct extends ot {
|
|
|
2543
2582
|
r(this, "_icon", null);
|
|
2544
2583
|
r(this, "_totalDomain", null);
|
|
2545
2584
|
r(this, "_showPercent", !1);
|
|
2585
|
+
r(this, "_progressbar", !1);
|
|
2546
2586
|
r(this, "_suffix", null);
|
|
2547
|
-
this._type = t, this._color = s.attributes.color || null, this._color && (this._color = g(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = g(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = g(s.attributes.totalDomain) || null, this._showPercent = p(s.attributes.showPercent);
|
|
2587
|
+
this._type = t, this._color = s.attributes.color || null, this._color && (this._color = g(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = g(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = g(s.attributes.totalDomain) || null, this._showPercent = p(s.attributes.showPercent), this._progressbar = p(s.attributes.progressbar);
|
|
2548
2588
|
}
|
|
2549
2589
|
get color() {
|
|
2550
2590
|
return this._color;
|
|
@@ -2558,11 +2598,14 @@ class ct extends ot {
|
|
|
2558
2598
|
get showPercent() {
|
|
2559
2599
|
return this._showPercent;
|
|
2560
2600
|
}
|
|
2601
|
+
get progressbar() {
|
|
2602
|
+
return this._progressbar;
|
|
2603
|
+
}
|
|
2561
2604
|
get suffix() {
|
|
2562
2605
|
return this._suffix;
|
|
2563
2606
|
}
|
|
2564
2607
|
}
|
|
2565
|
-
class
|
|
2608
|
+
class he extends ct {
|
|
2566
2609
|
constructor(t, s) {
|
|
2567
2610
|
super(t, s);
|
|
2568
2611
|
r(this, "_field");
|
|
@@ -2582,7 +2625,7 @@ class ue extends ct {
|
|
|
2582
2625
|
return this._operator;
|
|
2583
2626
|
}
|
|
2584
2627
|
}
|
|
2585
|
-
const
|
|
2628
|
+
const _e = (i) => {
|
|
2586
2629
|
const e = [];
|
|
2587
2630
|
let t;
|
|
2588
2631
|
if (i.forEach((s) => {
|
|
@@ -2592,10 +2635,10 @@ const he = (i) => {
|
|
|
2592
2635
|
throw new Error(`Field ${o} doesn't have an axis`);
|
|
2593
2636
|
if (!o)
|
|
2594
2637
|
throw new Error("Missing name attribute for field");
|
|
2595
|
-
n === "x" ? t = new
|
|
2638
|
+
n === "x" ? t = new me({
|
|
2596
2639
|
name: o
|
|
2597
2640
|
}) : n === "y" && e.push(
|
|
2598
|
-
new
|
|
2641
|
+
new ge({
|
|
2599
2642
|
name: o,
|
|
2600
2643
|
operator: a,
|
|
2601
2644
|
label: l,
|
|
@@ -2618,7 +2661,7 @@ class M extends ot {
|
|
|
2618
2661
|
r(this, "_x");
|
|
2619
2662
|
r(this, "_y");
|
|
2620
2663
|
this._type = t;
|
|
2621
|
-
const n =
|
|
2664
|
+
const n = _e(s.children);
|
|
2622
2665
|
this._x = n.x, this._y = n.y;
|
|
2623
2666
|
}
|
|
2624
2667
|
get x() {
|
|
@@ -2628,17 +2671,17 @@ class M extends ot {
|
|
|
2628
2671
|
return this._y;
|
|
2629
2672
|
}
|
|
2630
2673
|
}
|
|
2631
|
-
const
|
|
2674
|
+
const fe = {
|
|
2632
2675
|
indicator: ct,
|
|
2633
|
-
indicatorField:
|
|
2676
|
+
indicatorField: he,
|
|
2634
2677
|
line: M,
|
|
2635
2678
|
bar: M,
|
|
2636
2679
|
pie: M
|
|
2637
|
-
},
|
|
2638
|
-
const e =
|
|
2680
|
+
}, Be = (i) => {
|
|
2681
|
+
const e = T.parse(i).filter((n) => n.tagName === "graph")[0], t = e.attributes.type;
|
|
2639
2682
|
if (!t)
|
|
2640
2683
|
throw new Error(`${t} is not a valid graph`);
|
|
2641
|
-
const s =
|
|
2684
|
+
const s = fe[t];
|
|
2642
2685
|
if (!s)
|
|
2643
2686
|
throw new Error(`${t} not found as a GraphModel`);
|
|
2644
2687
|
return new s(t, e);
|
|
@@ -2656,7 +2699,7 @@ class dt {
|
|
|
2656
2699
|
return this._axis;
|
|
2657
2700
|
}
|
|
2658
2701
|
}
|
|
2659
|
-
class
|
|
2702
|
+
class ge extends dt {
|
|
2660
2703
|
constructor({
|
|
2661
2704
|
name: t,
|
|
2662
2705
|
operator: s,
|
|
@@ -2679,12 +2722,12 @@ class fe extends dt {
|
|
|
2679
2722
|
return this._stacked;
|
|
2680
2723
|
}
|
|
2681
2724
|
}
|
|
2682
|
-
class
|
|
2725
|
+
class me extends dt {
|
|
2683
2726
|
constructor({ name: e }) {
|
|
2684
2727
|
super({ name: e, axis: "x" });
|
|
2685
2728
|
}
|
|
2686
2729
|
}
|
|
2687
|
-
const
|
|
2730
|
+
const be = ({ ooui: i }) => {
|
|
2688
2731
|
const t = [i.x.name];
|
|
2689
2732
|
return i.y ? (i.y.forEach((s) => {
|
|
2690
2733
|
s.operator !== "count" && !t.includes(s.name) && t.push(s.name), s.label && !t.includes(s.label) && t.push(s.label);
|
|
@@ -2706,27 +2749,27 @@ function H({
|
|
|
2706
2749
|
}
|
|
2707
2750
|
return { value: n, label: n };
|
|
2708
2751
|
}
|
|
2709
|
-
const
|
|
2752
|
+
const Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2710
2753
|
__proto__: null,
|
|
2711
|
-
getFieldsToRetrieve:
|
|
2754
|
+
getFieldsToRetrieve: be,
|
|
2712
2755
|
getValueAndLabelForField: H
|
|
2713
2756
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2714
|
-
function
|
|
2757
|
+
function ye({
|
|
2715
2758
|
values: i,
|
|
2716
2759
|
timerange: e,
|
|
2717
2760
|
interval: t = 1
|
|
2718
2761
|
}) {
|
|
2719
|
-
const s =
|
|
2762
|
+
const s = we({
|
|
2720
2763
|
values: i,
|
|
2721
2764
|
timerange: e
|
|
2722
2765
|
});
|
|
2723
|
-
return
|
|
2766
|
+
return xe({
|
|
2724
2767
|
values: s,
|
|
2725
2768
|
timerange: e,
|
|
2726
2769
|
interval: t
|
|
2727
2770
|
});
|
|
2728
2771
|
}
|
|
2729
|
-
function
|
|
2772
|
+
function xe({
|
|
2730
2773
|
values: i,
|
|
2731
2774
|
timerange: e,
|
|
2732
2775
|
interval: t = 1
|
|
@@ -2744,7 +2787,7 @@ function ye({
|
|
|
2744
2787
|
return;
|
|
2745
2788
|
const u = h.x, m = d[_ + 1].x;
|
|
2746
2789
|
if (!ut([u, m], a)) {
|
|
2747
|
-
const c =
|
|
2790
|
+
const c = pe({
|
|
2748
2791
|
dates: [u, m],
|
|
2749
2792
|
timerange: e,
|
|
2750
2793
|
interval: t
|
|
@@ -2761,7 +2804,7 @@ function ye({
|
|
|
2761
2804
|
}
|
|
2762
2805
|
}), s.sort((l, d) => l.x < d.x ? -1 : l.x > d.x ? 1 : 0);
|
|
2763
2806
|
}
|
|
2764
|
-
function
|
|
2807
|
+
function pe({
|
|
2765
2808
|
dates: i,
|
|
2766
2809
|
timerange: e,
|
|
2767
2810
|
interval: t = 1
|
|
@@ -2773,21 +2816,21 @@ function xe({
|
|
|
2773
2816
|
for (let o = 0; o < a.length - 1; o++) {
|
|
2774
2817
|
const l = a[o], d = a[o + 1];
|
|
2775
2818
|
if (!ut([l, d], n)) {
|
|
2776
|
-
const _ =
|
|
2819
|
+
const _ = z(l, V(n)).add(
|
|
2777
2820
|
t,
|
|
2778
2821
|
n
|
|
2779
|
-
), h =
|
|
2822
|
+
), h = z(d, V(n));
|
|
2780
2823
|
for (; _.isBefore(h); )
|
|
2781
2824
|
s.push(_.format(V(n))), _.add(t, n);
|
|
2782
2825
|
}
|
|
2783
2826
|
}
|
|
2784
2827
|
return s;
|
|
2785
2828
|
}
|
|
2786
|
-
function
|
|
2829
|
+
function we({
|
|
2787
2830
|
values: i,
|
|
2788
2831
|
timerange: e
|
|
2789
2832
|
}) {
|
|
2790
|
-
const t =
|
|
2833
|
+
const t = Fe({
|
|
2791
2834
|
values: i,
|
|
2792
2835
|
timerange: e
|
|
2793
2836
|
}), s = [], n = ht({
|
|
@@ -2805,24 +2848,24 @@ function pe({
|
|
|
2805
2848
|
});
|
|
2806
2849
|
}), s;
|
|
2807
2850
|
}
|
|
2808
|
-
function
|
|
2851
|
+
function Fe({
|
|
2809
2852
|
values: i,
|
|
2810
2853
|
timerange: e
|
|
2811
2854
|
}) {
|
|
2812
2855
|
return i.map((t) => ({
|
|
2813
2856
|
...t,
|
|
2814
|
-
x:
|
|
2857
|
+
x: ve({
|
|
2815
2858
|
date: t.x,
|
|
2816
2859
|
timerange: e
|
|
2817
2860
|
})
|
|
2818
2861
|
}));
|
|
2819
2862
|
}
|
|
2820
|
-
function
|
|
2863
|
+
function ve({
|
|
2821
2864
|
date: i,
|
|
2822
2865
|
timerange: e
|
|
2823
2866
|
}) {
|
|
2824
|
-
let t =
|
|
2825
|
-
const s =
|
|
2867
|
+
let t = Ce(i);
|
|
2868
|
+
const s = z(i, t);
|
|
2826
2869
|
switch (e) {
|
|
2827
2870
|
case "hour": {
|
|
2828
2871
|
t = "YYYY-MM-DD HH:00";
|
|
@@ -2847,7 +2890,7 @@ function Fe({
|
|
|
2847
2890
|
}
|
|
2848
2891
|
return s.format(t);
|
|
2849
2892
|
}
|
|
2850
|
-
function
|
|
2893
|
+
function Ce(i) {
|
|
2851
2894
|
return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
2852
2895
|
}
|
|
2853
2896
|
function ut(i, e) {
|
|
@@ -2858,7 +2901,7 @@ function ut(i, e) {
|
|
|
2858
2901
|
if (i.length === 1)
|
|
2859
2902
|
return !0;
|
|
2860
2903
|
for (let n = 0; n < i.length - 1; n++) {
|
|
2861
|
-
const a =
|
|
2904
|
+
const a = z(i[n], s), l = z(i[n + 1], s).diff(a, e);
|
|
2862
2905
|
Math.abs(l) === 1 ? t = !0 : t = !1;
|
|
2863
2906
|
}
|
|
2864
2907
|
return t;
|
|
@@ -2888,7 +2931,7 @@ function V(i) {
|
|
|
2888
2931
|
return "YYYY-MM-DD HH:mm";
|
|
2889
2932
|
}
|
|
2890
2933
|
}
|
|
2891
|
-
const
|
|
2934
|
+
const ke = {
|
|
2892
2935
|
count: "count",
|
|
2893
2936
|
"+": "sum",
|
|
2894
2937
|
"-": "subtract",
|
|
@@ -2896,7 +2939,7 @@ const Ce = {
|
|
|
2896
2939
|
avg: "average",
|
|
2897
2940
|
min: "min",
|
|
2898
2941
|
max: "max"
|
|
2899
|
-
},
|
|
2942
|
+
}, Pe = ({
|
|
2900
2943
|
ooui: i,
|
|
2901
2944
|
values: e,
|
|
2902
2945
|
fields: t,
|
|
@@ -2963,7 +3006,7 @@ const Ce = {
|
|
|
2963
3006
|
(c) => c.x !== !1
|
|
2964
3007
|
));
|
|
2965
3008
|
let u = h;
|
|
2966
|
-
i.timerange ? u =
|
|
3009
|
+
i.timerange ? u = ye({
|
|
2967
3010
|
values: u,
|
|
2968
3011
|
timerange: i.timerange,
|
|
2969
3012
|
interval: i.interval
|
|
@@ -3045,7 +3088,7 @@ function L({
|
|
|
3045
3088
|
s[a] || (s[a] = { label: o, entries: [] }), s[a].entries.push(n);
|
|
3046
3089
|
}), s;
|
|
3047
3090
|
}
|
|
3048
|
-
function
|
|
3091
|
+
function Oe(i) {
|
|
3049
3092
|
let e = [];
|
|
3050
3093
|
return Object.keys(i).forEach((t) => {
|
|
3051
3094
|
const s = i[t];
|
|
@@ -3068,88 +3111,89 @@ function ft(i, e = 0.1) {
|
|
|
3068
3111
|
max: n + a
|
|
3069
3112
|
};
|
|
3070
3113
|
}
|
|
3071
|
-
const
|
|
3114
|
+
const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3072
3115
|
__proto__: null,
|
|
3073
|
-
getAllObjectsInGroupedValues:
|
|
3116
|
+
getAllObjectsInGroupedValues: Oe,
|
|
3074
3117
|
getMinMax: ft,
|
|
3075
3118
|
getValueForOperator: j,
|
|
3076
3119
|
getValuesForYField: R,
|
|
3077
3120
|
getValuesGroupedByField: L,
|
|
3078
3121
|
getYAxisFieldname: _t,
|
|
3079
|
-
labelsForOperator:
|
|
3080
|
-
processGraphData:
|
|
3122
|
+
labelsForOperator: ke,
|
|
3123
|
+
processGraphData: Pe
|
|
3081
3124
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3082
3125
|
export {
|
|
3083
|
-
|
|
3084
|
-
|
|
3126
|
+
zt as ActionButtons,
|
|
3127
|
+
Ut as Alert,
|
|
3085
3128
|
kt as Avatar,
|
|
3086
3129
|
Bt as Binary,
|
|
3087
3130
|
it as Boolean,
|
|
3088
3131
|
G as Button,
|
|
3089
3132
|
Wt as ButtonGroup,
|
|
3090
|
-
|
|
3091
|
-
|
|
3133
|
+
re as Card,
|
|
3134
|
+
ee as Carousel,
|
|
3092
3135
|
A as Char,
|
|
3093
3136
|
nt as CodeEditor,
|
|
3094
|
-
|
|
3095
|
-
|
|
3137
|
+
ie as ColorPicker,
|
|
3138
|
+
Zt as Comments,
|
|
3096
3139
|
Y as Container,
|
|
3097
3140
|
F as ContainerWidget,
|
|
3098
|
-
|
|
3099
|
-
|
|
3141
|
+
Me as Dashboard,
|
|
3142
|
+
ue as DashboardItem,
|
|
3100
3143
|
jt as Date,
|
|
3101
3144
|
Nt as DateTime,
|
|
3102
|
-
|
|
3145
|
+
te as Email,
|
|
3103
3146
|
f as Field,
|
|
3104
3147
|
q as Float,
|
|
3105
3148
|
Et as FloatTime,
|
|
3106
|
-
|
|
3149
|
+
Ee as Form,
|
|
3107
3150
|
ot as Graph,
|
|
3108
3151
|
dt as GraphAxis,
|
|
3109
3152
|
M as GraphChart,
|
|
3110
3153
|
ct as GraphIndicator,
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3154
|
+
he as GraphIndicatorField,
|
|
3155
|
+
me as GraphXAxis,
|
|
3156
|
+
ge as GraphYAxis,
|
|
3114
3157
|
Ot as Group,
|
|
3115
3158
|
Vt as HTMLPreview,
|
|
3159
|
+
Rt as Icon,
|
|
3116
3160
|
At as Image,
|
|
3117
|
-
|
|
3161
|
+
$t as Indicator,
|
|
3118
3162
|
St as Integer,
|
|
3119
3163
|
K as JSONField,
|
|
3120
|
-
|
|
3164
|
+
Ye as Kanban,
|
|
3121
3165
|
et as Label,
|
|
3122
|
-
|
|
3123
|
-
|
|
3166
|
+
Tt as Many2one,
|
|
3167
|
+
It as Markdown,
|
|
3124
3168
|
rt as MultiCheckbox,
|
|
3125
3169
|
tt as NewLine,
|
|
3126
3170
|
B as Notebook,
|
|
3127
3171
|
st as One2many,
|
|
3128
3172
|
Pt as Page,
|
|
3129
3173
|
Yt as ProgressBar,
|
|
3130
|
-
|
|
3131
|
-
|
|
3174
|
+
se as QRCode,
|
|
3175
|
+
Ht as Radio,
|
|
3132
3176
|
Mt as Reference,
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3177
|
+
de as SearchFieldTypes,
|
|
3178
|
+
je as SearchFilter,
|
|
3179
|
+
I as Selection,
|
|
3136
3180
|
Dt as Separator,
|
|
3137
3181
|
N as Spinner,
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3182
|
+
Kt as Steps,
|
|
3183
|
+
Qt as Switch,
|
|
3184
|
+
Jt as Tag,
|
|
3185
|
+
qt as Tags,
|
|
3142
3186
|
$ as Text,
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3187
|
+
Xt as Time,
|
|
3188
|
+
Gt as Timeline,
|
|
3189
|
+
Ve as Tree,
|
|
3146
3190
|
k as Widget,
|
|
3147
|
-
|
|
3148
|
-
|
|
3191
|
+
Ae as graphFieldUtils,
|
|
3192
|
+
Re as graphProcessor,
|
|
3149
3193
|
J as parseContext,
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3194
|
+
Se as parseContextFields,
|
|
3195
|
+
De as parseDomainFields,
|
|
3196
|
+
Be as parseGraph,
|
|
3197
|
+
Ne as transformDomainForChildWidget
|
|
3154
3198
|
};
|
|
3155
3199
|
//# sourceMappingURL=ooui.es.js.map
|