@gisce/ooui 2.38.0-alpha.1 → 2.38.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Card.d.ts +12 -0
- package/dist/Card.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 +122 -97
- package/dist/ooui.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Card.ts +35 -0
- package/src/WidgetFactory.ts +5 -0
- package/src/index.ts +2 -0
- package/src/spec/Card.spec.ts +71 -0
package/dist/ooui.es.js
CHANGED
|
@@ -669,8 +669,8 @@ const W = class W extends w {
|
|
|
669
669
|
}
|
|
670
670
|
};
|
|
671
671
|
r(W, "_defaultColspan", 3);
|
|
672
|
-
let
|
|
673
|
-
class
|
|
672
|
+
let A = W;
|
|
673
|
+
class j extends w {
|
|
674
674
|
constructor(e) {
|
|
675
675
|
super(e);
|
|
676
676
|
r(this, "_loading", !1);
|
|
@@ -683,7 +683,7 @@ class R extends w {
|
|
|
683
683
|
this._loading = e;
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
class Pe extends
|
|
686
|
+
class Pe extends j {
|
|
687
687
|
constructor(e) {
|
|
688
688
|
super(e);
|
|
689
689
|
r(this, "_icon", null);
|
|
@@ -696,7 +696,7 @@ class Pe extends R {
|
|
|
696
696
|
this._icon = e;
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
class Oe extends
|
|
699
|
+
class Oe extends j {
|
|
700
700
|
constructor(e) {
|
|
701
701
|
var s;
|
|
702
702
|
super(e);
|
|
@@ -835,7 +835,7 @@ class We extends w {
|
|
|
835
835
|
}
|
|
836
836
|
class Te extends f {
|
|
837
837
|
}
|
|
838
|
-
class
|
|
838
|
+
class N extends f {
|
|
839
839
|
constructor(e) {
|
|
840
840
|
super(e);
|
|
841
841
|
/**
|
|
@@ -1548,7 +1548,7 @@ class et extends w {
|
|
|
1548
1548
|
return this._container.rows.flat().filter((e) => !e.invisible);
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
|
-
class tt extends
|
|
1551
|
+
class tt extends N {
|
|
1552
1552
|
get showText() {
|
|
1553
1553
|
return this.parsedWidgetProps.show_text ?? !0;
|
|
1554
1554
|
}
|
|
@@ -1567,6 +1567,26 @@ class it extends f {
|
|
|
1567
1567
|
return console.log(this.parsedWidgetProps), ((t = this.parsedWidgetProps) == null ? void 0 : t.showValue) ?? !1;
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
|
+
class st extends j {
|
|
1571
|
+
constructor(e) {
|
|
1572
|
+
super(e);
|
|
1573
|
+
r(this, "_title", null);
|
|
1574
|
+
r(this, "_icon", null);
|
|
1575
|
+
e && (e.title && (this._title = e.title), e.icon && (this._icon = e.icon));
|
|
1576
|
+
}
|
|
1577
|
+
get title() {
|
|
1578
|
+
return this._title;
|
|
1579
|
+
}
|
|
1580
|
+
set title(e) {
|
|
1581
|
+
this._title = e;
|
|
1582
|
+
}
|
|
1583
|
+
get icon() {
|
|
1584
|
+
return this._icon;
|
|
1585
|
+
}
|
|
1586
|
+
set icon(e) {
|
|
1587
|
+
this._icon = e;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1570
1590
|
class $ {
|
|
1571
1591
|
constructor() {
|
|
1572
1592
|
/**
|
|
@@ -1577,7 +1597,7 @@ class $ {
|
|
|
1577
1597
|
setWidgetClass(t) {
|
|
1578
1598
|
switch (t) {
|
|
1579
1599
|
case "notebook":
|
|
1580
|
-
this._widgetClass =
|
|
1600
|
+
this._widgetClass = A;
|
|
1581
1601
|
break;
|
|
1582
1602
|
case "page":
|
|
1583
1603
|
this._widgetClass = Pe;
|
|
@@ -1585,11 +1605,14 @@ class $ {
|
|
|
1585
1605
|
case "group":
|
|
1586
1606
|
this._widgetClass = Oe;
|
|
1587
1607
|
break;
|
|
1608
|
+
case "card":
|
|
1609
|
+
this._widgetClass = st;
|
|
1610
|
+
break;
|
|
1588
1611
|
case "label":
|
|
1589
1612
|
this._widgetClass = Z;
|
|
1590
1613
|
break;
|
|
1591
1614
|
case "char":
|
|
1592
|
-
this._widgetClass =
|
|
1615
|
+
this._widgetClass = N;
|
|
1593
1616
|
break;
|
|
1594
1617
|
case "text":
|
|
1595
1618
|
this._widgetClass = L;
|
|
@@ -1645,7 +1668,7 @@ class $ {
|
|
|
1645
1668
|
this._widgetClass = Me;
|
|
1646
1669
|
break;
|
|
1647
1670
|
case "url":
|
|
1648
|
-
this._widgetClass =
|
|
1671
|
+
this._widgetClass = N;
|
|
1649
1672
|
break;
|
|
1650
1673
|
case "email":
|
|
1651
1674
|
this._widgetClass = Ze;
|
|
@@ -1711,7 +1734,7 @@ class $ {
|
|
|
1711
1734
|
this._widgetClass = H;
|
|
1712
1735
|
break;
|
|
1713
1736
|
case "spinner":
|
|
1714
|
-
this._widgetClass =
|
|
1737
|
+
this._widgetClass = j;
|
|
1715
1738
|
break;
|
|
1716
1739
|
case "carousel":
|
|
1717
1740
|
this._widgetClass = et;
|
|
@@ -1731,6 +1754,7 @@ class $ {
|
|
|
1731
1754
|
case "notebook":
|
|
1732
1755
|
case "page":
|
|
1733
1756
|
case "group":
|
|
1757
|
+
case "card":
|
|
1734
1758
|
return new this._widgetClass({ ...e, type: s });
|
|
1735
1759
|
case "button":
|
|
1736
1760
|
return new this._widgetClass({
|
|
@@ -1743,7 +1767,7 @@ class $ {
|
|
|
1743
1767
|
}
|
|
1744
1768
|
}
|
|
1745
1769
|
}
|
|
1746
|
-
const
|
|
1770
|
+
const rt = ({
|
|
1747
1771
|
fieldName: i,
|
|
1748
1772
|
values: t,
|
|
1749
1773
|
fields: e
|
|
@@ -1768,7 +1792,7 @@ const st = ({
|
|
|
1768
1792
|
n[o] = d.some((_) => _);
|
|
1769
1793
|
}
|
|
1770
1794
|
return n;
|
|
1771
|
-
},
|
|
1795
|
+
}, nt = ({
|
|
1772
1796
|
states: i,
|
|
1773
1797
|
values: t
|
|
1774
1798
|
}) => {
|
|
@@ -1777,7 +1801,7 @@ const st = ({
|
|
|
1777
1801
|
const e = i.split(",");
|
|
1778
1802
|
return e.length === 0 ? {} : e.includes(t.state) ? {} : { invisible: !0 };
|
|
1779
1803
|
};
|
|
1780
|
-
function
|
|
1804
|
+
function at({
|
|
1781
1805
|
values: i = {},
|
|
1782
1806
|
fieldName: t,
|
|
1783
1807
|
fields: e = {}
|
|
@@ -1805,7 +1829,7 @@ const ne = ({
|
|
|
1805
1829
|
return u.forEach((c) => {
|
|
1806
1830
|
const b = c[1];
|
|
1807
1831
|
if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
|
|
1808
|
-
const x =
|
|
1832
|
+
const x = at({
|
|
1809
1833
|
values: t,
|
|
1810
1834
|
fields: e,
|
|
1811
1835
|
fieldName: b === "active_id" ? "id" : b
|
|
@@ -1820,7 +1844,7 @@ const ne = ({
|
|
|
1820
1844
|
} catch {
|
|
1821
1845
|
return;
|
|
1822
1846
|
}
|
|
1823
|
-
},
|
|
1847
|
+
}, St = (i) => {
|
|
1824
1848
|
const t = [];
|
|
1825
1849
|
try {
|
|
1826
1850
|
return !i || le(i) || typeof i != "string" ? t : ae(i) !== null ? [] : (i.trim().length === 0 || i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((u) => u.split(":")).forEach((u) => {
|
|
@@ -1840,14 +1864,14 @@ function ae(i) {
|
|
|
1840
1864
|
function le(i) {
|
|
1841
1865
|
return typeof i == "object" && i !== null && typeof i != "string";
|
|
1842
1866
|
}
|
|
1843
|
-
const
|
|
1867
|
+
const lt = (i) => {
|
|
1844
1868
|
const t = i.trim().replace(")", "").split("("), e = t[0], n = t[1].split(",").map((a) => a.trim());
|
|
1845
1869
|
return {
|
|
1846
1870
|
method: e,
|
|
1847
1871
|
args: n
|
|
1848
1872
|
};
|
|
1849
1873
|
};
|
|
1850
|
-
function
|
|
1874
|
+
function ot(i) {
|
|
1851
1875
|
const t = [];
|
|
1852
1876
|
function e(s) {
|
|
1853
1877
|
const n = [];
|
|
@@ -1859,7 +1883,7 @@ function lt(i) {
|
|
|
1859
1883
|
e(s);
|
|
1860
1884
|
return t.flat();
|
|
1861
1885
|
}
|
|
1862
|
-
class
|
|
1886
|
+
class It {
|
|
1863
1887
|
constructor(t, e = 4) {
|
|
1864
1888
|
/**
|
|
1865
1889
|
* Object containing fields specification of the form.
|
|
@@ -1975,7 +1999,7 @@ class St {
|
|
|
1975
1999
|
container: this._container,
|
|
1976
2000
|
values: s
|
|
1977
2001
|
});
|
|
1978
|
-
const l =
|
|
2002
|
+
const l = ot(this._container._rows);
|
|
1979
2003
|
l.forEach((d) => {
|
|
1980
2004
|
const _ = d;
|
|
1981
2005
|
_._id && _._context && (this._contextForFields[_._id] = d._context);
|
|
@@ -2018,10 +2042,10 @@ class St {
|
|
|
2018
2042
|
widgetType: l
|
|
2019
2043
|
});
|
|
2020
2044
|
let g;
|
|
2021
|
-
l === "button" && h.states ? g =
|
|
2045
|
+
l === "button" && h.states ? g = nt({
|
|
2022
2046
|
states: h.states,
|
|
2023
2047
|
values: s
|
|
2024
|
-
}) : g =
|
|
2048
|
+
}) : g = rt({
|
|
2025
2049
|
fieldName: h.name,
|
|
2026
2050
|
values: s,
|
|
2027
2051
|
fields: this._fields
|
|
@@ -2031,7 +2055,7 @@ class St {
|
|
|
2031
2055
|
values: s,
|
|
2032
2056
|
fields: this._fields
|
|
2033
2057
|
});
|
|
2034
|
-
h.on_change && (this._onChangeFields[h.name] =
|
|
2058
|
+
h.on_change && (this._onChangeFields[h.name] = lt(
|
|
2035
2059
|
h.on_change
|
|
2036
2060
|
));
|
|
2037
2061
|
let b;
|
|
@@ -2063,7 +2087,7 @@ class St {
|
|
|
2063
2087
|
function Q(i) {
|
|
2064
2088
|
return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
|
|
2065
2089
|
}
|
|
2066
|
-
class
|
|
2090
|
+
class Et {
|
|
2067
2091
|
constructor(t) {
|
|
2068
2092
|
/**
|
|
2069
2093
|
* Object containing fields specification of the form.
|
|
@@ -2177,7 +2201,7 @@ class It {
|
|
|
2177
2201
|
return this._columns.find((e) => e.findById ? e.findById(t) : !1);
|
|
2178
2202
|
}
|
|
2179
2203
|
}
|
|
2180
|
-
const
|
|
2204
|
+
const ct = {
|
|
2181
2205
|
text: "text",
|
|
2182
2206
|
many2one: "many2one",
|
|
2183
2207
|
char: "char",
|
|
@@ -2190,7 +2214,7 @@ const ot = {
|
|
|
2190
2214
|
date: "date",
|
|
2191
2215
|
datetime: "datetime"
|
|
2192
2216
|
};
|
|
2193
|
-
class
|
|
2217
|
+
class Vt {
|
|
2194
2218
|
constructor(t, e, s = 8) {
|
|
2195
2219
|
/**
|
|
2196
2220
|
* Object containing the specific fields for primary and secondary search fields
|
|
@@ -2238,7 +2262,7 @@ class Et {
|
|
|
2238
2262
|
colspan: 2
|
|
2239
2263
|
}, { type: a, widget: l } = n;
|
|
2240
2264
|
let o = l ?? a;
|
|
2241
|
-
return
|
|
2265
|
+
return ct[o] === void 0 && (o = a), e.createWidget(o, n);
|
|
2242
2266
|
});
|
|
2243
2267
|
}
|
|
2244
2268
|
/**
|
|
@@ -2249,7 +2273,7 @@ class Et {
|
|
|
2249
2273
|
return this.advancedSearchContainer.findById(t);
|
|
2250
2274
|
}
|
|
2251
2275
|
}
|
|
2252
|
-
const
|
|
2276
|
+
const Yt = ({
|
|
2253
2277
|
domain: i,
|
|
2254
2278
|
widgetFieldName: t
|
|
2255
2279
|
}) => {
|
|
@@ -2264,8 +2288,8 @@ const Vt = ({
|
|
|
2264
2288
|
n.length - 1
|
|
2265
2289
|
)) : (o = n, d = "id"), o === t && e.push([d, a, l]);
|
|
2266
2290
|
}), e;
|
|
2267
|
-
},
|
|
2268
|
-
class
|
|
2291
|
+
}, Dt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
|
|
2292
|
+
class dt {
|
|
2269
2293
|
constructor(t) {
|
|
2270
2294
|
r(this, "_action_id", null);
|
|
2271
2295
|
r(this, "_position", null);
|
|
@@ -2278,7 +2302,7 @@ class ct {
|
|
|
2278
2302
|
return this._position;
|
|
2279
2303
|
}
|
|
2280
2304
|
}
|
|
2281
|
-
class
|
|
2305
|
+
class jt {
|
|
2282
2306
|
constructor(t) {
|
|
2283
2307
|
r(this, "_string", null);
|
|
2284
2308
|
r(this, "_items", []);
|
|
@@ -2286,7 +2310,7 @@ class Dt {
|
|
|
2286
2310
|
this._string = e.attributes.string || null;
|
|
2287
2311
|
const { children: s } = e;
|
|
2288
2312
|
s.forEach((n) => {
|
|
2289
|
-
n.tagName === "dashboard_item" && this._items.push(new
|
|
2313
|
+
n.tagName === "dashboard_item" && this._items.push(new dt(n.attributes));
|
|
2290
2314
|
});
|
|
2291
2315
|
}
|
|
2292
2316
|
get string() {
|
|
@@ -2350,7 +2374,7 @@ class ce extends oe {
|
|
|
2350
2374
|
return this._suffix;
|
|
2351
2375
|
}
|
|
2352
2376
|
}
|
|
2353
|
-
class
|
|
2377
|
+
class ut extends ce {
|
|
2354
2378
|
constructor(e, s) {
|
|
2355
2379
|
super(e, s);
|
|
2356
2380
|
r(this, "_field");
|
|
@@ -2370,7 +2394,7 @@ class dt extends ce {
|
|
|
2370
2394
|
return this._operator;
|
|
2371
2395
|
}
|
|
2372
2396
|
}
|
|
2373
|
-
const
|
|
2397
|
+
const ht = (i) => {
|
|
2374
2398
|
const t = [];
|
|
2375
2399
|
let e;
|
|
2376
2400
|
if (i.forEach((s) => {
|
|
@@ -2380,10 +2404,10 @@ const ut = (i) => {
|
|
|
2380
2404
|
throw new Error(`Field ${l} doesn't have an axis`);
|
|
2381
2405
|
if (!l)
|
|
2382
2406
|
throw new Error("Missing name attribute for field");
|
|
2383
|
-
n === "x" ? e = new
|
|
2407
|
+
n === "x" ? e = new gt({
|
|
2384
2408
|
name: l
|
|
2385
2409
|
}) : n === "y" && t.push(
|
|
2386
|
-
new
|
|
2410
|
+
new ft({
|
|
2387
2411
|
name: l,
|
|
2388
2412
|
operator: a,
|
|
2389
2413
|
label: o,
|
|
@@ -2400,13 +2424,13 @@ const ut = (i) => {
|
|
|
2400
2424
|
y: t
|
|
2401
2425
|
};
|
|
2402
2426
|
};
|
|
2403
|
-
class
|
|
2427
|
+
class M extends oe {
|
|
2404
2428
|
constructor(e, s) {
|
|
2405
2429
|
super(s);
|
|
2406
2430
|
r(this, "_x");
|
|
2407
2431
|
r(this, "_y");
|
|
2408
2432
|
this._type = e;
|
|
2409
|
-
const n =
|
|
2433
|
+
const n = ht(s.children);
|
|
2410
2434
|
this._x = n.x, this._y = n.y;
|
|
2411
2435
|
}
|
|
2412
2436
|
get x() {
|
|
@@ -2416,17 +2440,17 @@ class j extends oe {
|
|
|
2416
2440
|
return this._y;
|
|
2417
2441
|
}
|
|
2418
2442
|
}
|
|
2419
|
-
const
|
|
2443
|
+
const _t = {
|
|
2420
2444
|
indicator: ce,
|
|
2421
|
-
indicatorField:
|
|
2422
|
-
line:
|
|
2423
|
-
bar:
|
|
2424
|
-
pie:
|
|
2425
|
-
},
|
|
2445
|
+
indicatorField: ut,
|
|
2446
|
+
line: M,
|
|
2447
|
+
bar: M,
|
|
2448
|
+
pie: M
|
|
2449
|
+
}, Mt = (i) => {
|
|
2426
2450
|
const t = D.parse(i).filter((n) => n.tagName === "graph")[0], e = t.attributes.type;
|
|
2427
2451
|
if (!e)
|
|
2428
2452
|
throw new Error(`${e} is not a valid graph`);
|
|
2429
|
-
const s =
|
|
2453
|
+
const s = _t[e];
|
|
2430
2454
|
if (!s)
|
|
2431
2455
|
throw new Error(`${e} not found as a GraphModel`);
|
|
2432
2456
|
return new s(e, t);
|
|
@@ -2444,7 +2468,7 @@ class de {
|
|
|
2444
2468
|
return this._axis;
|
|
2445
2469
|
}
|
|
2446
2470
|
}
|
|
2447
|
-
class
|
|
2471
|
+
class ft extends de {
|
|
2448
2472
|
constructor({
|
|
2449
2473
|
name: e,
|
|
2450
2474
|
operator: s,
|
|
@@ -2467,12 +2491,12 @@ class _t extends de {
|
|
|
2467
2491
|
return this._stacked;
|
|
2468
2492
|
}
|
|
2469
2493
|
}
|
|
2470
|
-
class
|
|
2494
|
+
class gt extends de {
|
|
2471
2495
|
constructor({ name: t }) {
|
|
2472
2496
|
super({ name: t, axis: "x" });
|
|
2473
2497
|
}
|
|
2474
2498
|
}
|
|
2475
|
-
const
|
|
2499
|
+
const mt = ({ ooui: i }) => {
|
|
2476
2500
|
const e = [i.x.name];
|
|
2477
2501
|
return i.y ? (i.y.forEach((s) => {
|
|
2478
2502
|
s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
|
|
@@ -2494,27 +2518,27 @@ function q({
|
|
|
2494
2518
|
}
|
|
2495
2519
|
return { value: n, label: n };
|
|
2496
2520
|
}
|
|
2497
|
-
const
|
|
2521
|
+
const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2498
2522
|
__proto__: null,
|
|
2499
|
-
getFieldsToRetrieve:
|
|
2523
|
+
getFieldsToRetrieve: mt,
|
|
2500
2524
|
getValueAndLabelForField: q
|
|
2501
2525
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2502
|
-
function
|
|
2526
|
+
function bt({
|
|
2503
2527
|
values: i,
|
|
2504
2528
|
timerange: t,
|
|
2505
2529
|
interval: e = 1
|
|
2506
2530
|
}) {
|
|
2507
|
-
const s =
|
|
2531
|
+
const s = pt({
|
|
2508
2532
|
values: i,
|
|
2509
2533
|
timerange: t
|
|
2510
2534
|
});
|
|
2511
|
-
return
|
|
2535
|
+
return yt({
|
|
2512
2536
|
values: s,
|
|
2513
2537
|
timerange: t,
|
|
2514
2538
|
interval: e
|
|
2515
2539
|
});
|
|
2516
2540
|
}
|
|
2517
|
-
function
|
|
2541
|
+
function yt({
|
|
2518
2542
|
values: i,
|
|
2519
2543
|
timerange: t,
|
|
2520
2544
|
interval: e = 1
|
|
@@ -2532,7 +2556,7 @@ function bt({
|
|
|
2532
2556
|
return;
|
|
2533
2557
|
const u = h.x, g = d[_ + 1].x;
|
|
2534
2558
|
if (!ue([u, g], a)) {
|
|
2535
|
-
const c =
|
|
2559
|
+
const c = xt({
|
|
2536
2560
|
dates: [u, g],
|
|
2537
2561
|
timerange: t,
|
|
2538
2562
|
interval: e
|
|
@@ -2549,7 +2573,7 @@ function bt({
|
|
|
2549
2573
|
}
|
|
2550
2574
|
}), s.sort((o, d) => o.x < d.x ? -1 : o.x > d.x ? 1 : 0);
|
|
2551
2575
|
}
|
|
2552
|
-
function
|
|
2576
|
+
function xt({
|
|
2553
2577
|
dates: i,
|
|
2554
2578
|
timerange: t,
|
|
2555
2579
|
interval: e = 1
|
|
@@ -2571,11 +2595,11 @@ function yt({
|
|
|
2571
2595
|
}
|
|
2572
2596
|
return s;
|
|
2573
2597
|
}
|
|
2574
|
-
function
|
|
2598
|
+
function pt({
|
|
2575
2599
|
values: i,
|
|
2576
2600
|
timerange: t
|
|
2577
2601
|
}) {
|
|
2578
|
-
const e =
|
|
2602
|
+
const e = wt({
|
|
2579
2603
|
values: i,
|
|
2580
2604
|
timerange: t
|
|
2581
2605
|
}), s = [], n = he({
|
|
@@ -2593,23 +2617,23 @@ function xt({
|
|
|
2593
2617
|
});
|
|
2594
2618
|
}), s;
|
|
2595
2619
|
}
|
|
2596
|
-
function
|
|
2620
|
+
function wt({
|
|
2597
2621
|
values: i,
|
|
2598
2622
|
timerange: t
|
|
2599
2623
|
}) {
|
|
2600
2624
|
return i.map((e) => ({
|
|
2601
2625
|
...e,
|
|
2602
|
-
x:
|
|
2626
|
+
x: Ft({
|
|
2603
2627
|
date: e.x,
|
|
2604
2628
|
timerange: t
|
|
2605
2629
|
})
|
|
2606
2630
|
}));
|
|
2607
2631
|
}
|
|
2608
|
-
function
|
|
2632
|
+
function Ft({
|
|
2609
2633
|
date: i,
|
|
2610
2634
|
timerange: t
|
|
2611
2635
|
}) {
|
|
2612
|
-
let e =
|
|
2636
|
+
let e = vt(i);
|
|
2613
2637
|
const s = T(i, e);
|
|
2614
2638
|
switch (t) {
|
|
2615
2639
|
case "hour": {
|
|
@@ -2635,7 +2659,7 @@ function wt({
|
|
|
2635
2659
|
}
|
|
2636
2660
|
return s.format(e);
|
|
2637
2661
|
}
|
|
2638
|
-
function
|
|
2662
|
+
function vt(i) {
|
|
2639
2663
|
return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
2640
2664
|
}
|
|
2641
2665
|
function ue(i, t) {
|
|
@@ -2676,7 +2700,7 @@ function E(i) {
|
|
|
2676
2700
|
return "YYYY-MM-DD HH:mm";
|
|
2677
2701
|
}
|
|
2678
2702
|
}
|
|
2679
|
-
const
|
|
2703
|
+
const Ct = {
|
|
2680
2704
|
count: "count",
|
|
2681
2705
|
"+": "sum",
|
|
2682
2706
|
"-": "subtract",
|
|
@@ -2684,13 +2708,13 @@ const vt = {
|
|
|
2684
2708
|
avg: "average",
|
|
2685
2709
|
min: "min",
|
|
2686
2710
|
max: "max"
|
|
2687
|
-
},
|
|
2711
|
+
}, kt = ({
|
|
2688
2712
|
ooui: i,
|
|
2689
2713
|
values: t,
|
|
2690
2714
|
fields: e,
|
|
2691
2715
|
options: s
|
|
2692
2716
|
}) => {
|
|
2693
|
-
const n =
|
|
2717
|
+
const n = R({
|
|
2694
2718
|
fieldName: i.x.name,
|
|
2695
2719
|
values: t,
|
|
2696
2720
|
fields: e
|
|
@@ -2699,13 +2723,13 @@ const vt = {
|
|
|
2699
2723
|
Object.keys(n).forEach((b) => {
|
|
2700
2724
|
const x = n[b].label, y = n[b].entries;
|
|
2701
2725
|
if (c.label) {
|
|
2702
|
-
const F =
|
|
2726
|
+
const F = R({
|
|
2703
2727
|
fieldName: c.label,
|
|
2704
2728
|
values: y,
|
|
2705
2729
|
fields: e
|
|
2706
2730
|
});
|
|
2707
2731
|
Object.keys(F).forEach((v) => {
|
|
2708
|
-
const p = F[v].entries, S = F[v].label, ge =
|
|
2732
|
+
const p = F[v].entries, S = F[v].label, ge = B({
|
|
2709
2733
|
entries: p,
|
|
2710
2734
|
fields: e,
|
|
2711
2735
|
fieldName: c.name
|
|
@@ -2722,7 +2746,7 @@ const vt = {
|
|
|
2722
2746
|
});
|
|
2723
2747
|
});
|
|
2724
2748
|
} else {
|
|
2725
|
-
const F =
|
|
2749
|
+
const F = B({
|
|
2726
2750
|
entries: y,
|
|
2727
2751
|
fields: e,
|
|
2728
2752
|
fieldName: c.name
|
|
@@ -2751,7 +2775,7 @@ const vt = {
|
|
|
2751
2775
|
(c) => c.x !== !1
|
|
2752
2776
|
));
|
|
2753
2777
|
let u = h;
|
|
2754
|
-
i.timerange ? u =
|
|
2778
|
+
i.timerange ? u = bt({
|
|
2755
2779
|
values: u,
|
|
2756
2780
|
timerange: i.timerange,
|
|
2757
2781
|
interval: i.interval
|
|
@@ -2769,7 +2793,7 @@ const vt = {
|
|
|
2769
2793
|
}
|
|
2770
2794
|
return g;
|
|
2771
2795
|
};
|
|
2772
|
-
function
|
|
2796
|
+
function B({
|
|
2773
2797
|
entries: i,
|
|
2774
2798
|
fieldName: t,
|
|
2775
2799
|
fields: e
|
|
@@ -2818,7 +2842,7 @@ function Y({
|
|
|
2818
2842
|
function I(i) {
|
|
2819
2843
|
return Math.round((i + Number.EPSILON) * 100) / 100;
|
|
2820
2844
|
}
|
|
2821
|
-
function
|
|
2845
|
+
function R({
|
|
2822
2846
|
fieldName: i,
|
|
2823
2847
|
fields: t,
|
|
2824
2848
|
values: e
|
|
@@ -2833,7 +2857,7 @@ function B({
|
|
|
2833
2857
|
s[a] || (s[a] = { label: l, entries: [] }), s[a].entries.push(n);
|
|
2834
2858
|
}), s;
|
|
2835
2859
|
}
|
|
2836
|
-
function
|
|
2860
|
+
function Pt(i) {
|
|
2837
2861
|
let t = [];
|
|
2838
2862
|
return Object.keys(i).forEach((e) => {
|
|
2839
2863
|
const s = i[e];
|
|
@@ -2856,16 +2880,16 @@ function fe(i, t = 0.1) {
|
|
|
2856
2880
|
max: n + a
|
|
2857
2881
|
};
|
|
2858
2882
|
}
|
|
2859
|
-
const
|
|
2883
|
+
const Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2860
2884
|
__proto__: null,
|
|
2861
|
-
getAllObjectsInGroupedValues:
|
|
2885
|
+
getAllObjectsInGroupedValues: Pt,
|
|
2862
2886
|
getMinMax: fe,
|
|
2863
2887
|
getValueForOperator: Y,
|
|
2864
|
-
getValuesForYField:
|
|
2865
|
-
getValuesGroupedByField:
|
|
2888
|
+
getValuesForYField: B,
|
|
2889
|
+
getValuesGroupedByField: R,
|
|
2866
2890
|
getYAxisFieldname: _e,
|
|
2867
|
-
labelsForOperator:
|
|
2868
|
-
processGraphData:
|
|
2891
|
+
labelsForOperator: Ct,
|
|
2892
|
+
processGraphData: kt
|
|
2869
2893
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2870
2894
|
export {
|
|
2871
2895
|
Te as ActionButtons,
|
|
@@ -2875,29 +2899,30 @@ export {
|
|
|
2875
2899
|
te as Boolean,
|
|
2876
2900
|
ee as Button,
|
|
2877
2901
|
We as ButtonGroup,
|
|
2902
|
+
st as Card,
|
|
2878
2903
|
et as Carousel,
|
|
2879
|
-
|
|
2904
|
+
N as Char,
|
|
2880
2905
|
re as CodeEditor,
|
|
2881
2906
|
tt as ColorPicker,
|
|
2882
2907
|
Ke as Comments,
|
|
2883
2908
|
V as Container,
|
|
2884
2909
|
w as ContainerWidget,
|
|
2885
|
-
|
|
2886
|
-
|
|
2910
|
+
jt as Dashboard,
|
|
2911
|
+
dt as DashboardItem,
|
|
2887
2912
|
De as Date,
|
|
2888
2913
|
je as DateTime,
|
|
2889
2914
|
Ze as Email,
|
|
2890
2915
|
f as Field,
|
|
2891
2916
|
G as Float,
|
|
2892
2917
|
Ee as FloatTime,
|
|
2893
|
-
|
|
2918
|
+
It as Form,
|
|
2894
2919
|
oe as Graph,
|
|
2895
2920
|
de as GraphAxis,
|
|
2896
|
-
|
|
2921
|
+
M as GraphChart,
|
|
2897
2922
|
ce as GraphIndicator,
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2923
|
+
ut as GraphIndicatorField,
|
|
2924
|
+
gt as GraphXAxis,
|
|
2925
|
+
ft as GraphYAxis,
|
|
2901
2926
|
Oe as Group,
|
|
2902
2927
|
Ve as HTMLPreview,
|
|
2903
2928
|
Be as Image,
|
|
@@ -2909,18 +2934,18 @@ export {
|
|
|
2909
2934
|
Se as Markdown,
|
|
2910
2935
|
se as MultiCheckbox,
|
|
2911
2936
|
K as NewLine,
|
|
2912
|
-
|
|
2937
|
+
A as Notebook,
|
|
2913
2938
|
ie as One2many,
|
|
2914
2939
|
Pe as Page,
|
|
2915
2940
|
Ye as ProgressBar,
|
|
2916
2941
|
it as QRCode,
|
|
2917
2942
|
Je as Radio,
|
|
2918
2943
|
Ae as Reference,
|
|
2919
|
-
|
|
2920
|
-
|
|
2944
|
+
ct as SearchFieldTypes,
|
|
2945
|
+
Vt as SearchFilter,
|
|
2921
2946
|
z as Selection,
|
|
2922
2947
|
Me as Separator,
|
|
2923
|
-
|
|
2948
|
+
j as Spinner,
|
|
2924
2949
|
Qe as Steps,
|
|
2925
2950
|
He as Switch,
|
|
2926
2951
|
qe as Tag,
|
|
@@ -2928,14 +2953,14 @@ export {
|
|
|
2928
2953
|
L as Text,
|
|
2929
2954
|
Xe as Time,
|
|
2930
2955
|
Le as Timeline,
|
|
2931
|
-
|
|
2956
|
+
Et as Tree,
|
|
2932
2957
|
C as Widget,
|
|
2933
|
-
|
|
2934
|
-
|
|
2958
|
+
At as graphFieldUtils,
|
|
2959
|
+
Nt as graphProcessor,
|
|
2935
2960
|
ne as parseContext,
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2961
|
+
St as parseContextFields,
|
|
2962
|
+
Dt as parseDomainFields,
|
|
2963
|
+
Mt as parseGraph,
|
|
2964
|
+
Yt as transformDomainForChildWidget
|
|
2940
2965
|
};
|
|
2941
2966
|
//# sourceMappingURL=ooui.es.js.map
|