@gisce/ooui 2.11.0 → 2.12.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.
@@ -0,0 +1,12 @@
1
+ import Field from "./Field";
2
+ declare class Comments extends Field {
3
+ /**
4
+ * Height of the comments component
5
+ */
6
+ _height: number | undefined;
7
+ get height(): number | undefined;
8
+ set height(value: number | undefined);
9
+ constructor(props: any);
10
+ }
11
+ export default Comments;
12
+ //# sourceMappingURL=Comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Comments.d.ts","sourceRoot":"","sources":["../src/Comments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,cAAM,QAAS,SAAQ,KAAK;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAa;IAExC,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAEnC;gBAEW,KAAK,EAAE,GAAG;CAOvB;AAED,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetFactory.d.ts","sourceRoot":"","sources":["../src/WidgetFactory.ts"],"names":[],"mappings":"AAwCA,cAAM,aAAa;IACjB;;OAEG;IACH,YAAY,EAAE,GAAG,CAAC;IAElB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAkIlC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;CAiCtC;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"WidgetFactory.d.ts","sourceRoot":"","sources":["../src/WidgetFactory.ts"],"names":[],"mappings":"AAyCA,cAAM,aAAa;IACjB;;OAEG;IACH,YAAY,EAAE,GAAG,CAAC;IAElB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAqIlC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;CAiCtC;AAED,eAAe,aAAa,CAAC"}
package/dist/index.d.ts CHANGED
@@ -46,10 +46,11 @@ import CodeEditor from "./CodeEditor";
46
46
  import Time from "./Time";
47
47
  import HTMLPreview from "./HTMLPreview";
48
48
  import Alert from "./Alert";
49
+ import Comments from "./Comments";
49
50
  import { Graph, GraphAxis, GraphIndicator, GraphIndicatorField, GraphChart, parseGraph, GraphYAxis, GraphXAxis } from "./Graph";
50
51
  import type { GraphType, Operator } from "./Graph";
51
52
  import * as graphProcessor from "./Graph/processor/graphProcessor";
52
53
  import * as graphFieldUtils from "./Graph/processor/fieldUtils";
53
54
  import type { YAxisOpts, MinMaxValues } from "./Graph/processor/graphProcessor";
54
- export { Avatar, Char, Selection, Many2one, Field, Widget, Form, Tree, NewLine, Boolean, One2many, Integer, Float, FloatTime, HTMLPreview, Date, DateTime, SearchFilter, Container, ContainerWidget, Text, ProgressBar, Notebook, Group, Page, Label, Separator, Button, ButtonGroup, Reference, Binary, Image, parseContext, parseContextFields, transformDomainForChildWidget, parseDomainFields, Timeline, Indicator, Dashboard, DashboardItem, Graph, GraphAxis, GraphYAxis, GraphXAxis, GraphIndicator, GraphChart, GraphType, parseGraph, Operator, GraphIndicatorField, graphProcessor, graphFieldUtils, Tags, Tag, MultiCheckbox, Markdown, Radio, Switch, Steps, CodeEditor, SearchFieldTypes, Time, Alert, YAxisOpts, MinMaxValues, };
55
+ export { Avatar, Char, Selection, Many2one, Field, Widget, Form, Tree, NewLine, Boolean, One2many, Integer, Float, FloatTime, HTMLPreview, Date, DateTime, SearchFilter, Container, ContainerWidget, Text, ProgressBar, Notebook, Group, Page, Label, Separator, Button, ButtonGroup, Reference, Binary, Image, parseContext, parseContextFields, transformDomainForChildWidget, parseDomainFields, Timeline, Indicator, Dashboard, DashboardItem, Graph, GraphAxis, GraphYAxis, GraphXAxis, GraphIndicator, GraphChart, GraphType, parseGraph, Operator, GraphIndicatorField, graphProcessor, graphFieldUtils, Tags, Tag, MultiCheckbox, Markdown, Radio, Switch, Steps, CodeEditor, SearchFieldTypes, Time, Alert, YAxisOpts, MinMaxValues, Comments, };
55
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,EAAE,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC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AAa,EACb,QAAQ,EACR,KAAK,EACL,MAAM,EACN,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,KAAK,EACL,SAAS,EACT,YAAY,EACZ,QAAQ,GACT,CAAC"}
package/dist/ooui.es.js CHANGED
@@ -1333,6 +1333,25 @@ class qe extends g {
1333
1333
  this._icon = e;
1334
1334
  }
1335
1335
  }
1336
+ class Je extends g {
1337
+ constructor(e) {
1338
+ super(e);
1339
+ /**
1340
+ * Height of the comments component
1341
+ */
1342
+ n(this, "_height");
1343
+ if (e.height) {
1344
+ const s = parseInt(e.height);
1345
+ this._height = isNaN(s) ? void 0 : s;
1346
+ }
1347
+ }
1348
+ get height() {
1349
+ return this._height;
1350
+ }
1351
+ set height(e) {
1352
+ this._height = e;
1353
+ }
1354
+ }
1336
1355
  class G {
1337
1356
  constructor() {
1338
1357
  /**
@@ -1464,6 +1483,9 @@ class G {
1464
1483
  case "alert":
1465
1484
  this._widgetClass = qe;
1466
1485
  break;
1486
+ case "comments_timeline":
1487
+ this._widgetClass = Je;
1488
+ break;
1467
1489
  }
1468
1490
  }
1469
1491
  createWidget(t, e) {
@@ -1484,7 +1506,7 @@ class G {
1484
1506
  }
1485
1507
  }
1486
1508
  }
1487
- const Je = ({
1509
+ const He = ({
1488
1510
  fieldName: i,
1489
1511
  values: t,
1490
1512
  fields: e
@@ -1509,7 +1531,7 @@ const Je = ({
1509
1531
  r[o] = u.some((_) => _);
1510
1532
  }
1511
1533
  return r;
1512
- }, He = ({
1534
+ }, Qe = ({
1513
1535
  states: i,
1514
1536
  values: t
1515
1537
  }) => {
@@ -1518,7 +1540,7 @@ const Je = ({
1518
1540
  const e = i.split(",");
1519
1541
  return e.length === 0 ? {} : e.includes(t.state) ? {} : { invisible: !0 };
1520
1542
  };
1521
- function Qe({
1543
+ function Xe({
1522
1544
  values: i = {},
1523
1545
  fieldName: t,
1524
1546
  fields: e = {}
@@ -1546,7 +1568,7 @@ const Z = ({
1546
1568
  return d.forEach((c) => {
1547
1569
  const m = c[1];
1548
1570
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1549
- const x = Qe({
1571
+ const x = Xe({
1550
1572
  values: t,
1551
1573
  fields: e,
1552
1574
  fieldName: m === "active_id" ? "id" : m
@@ -1561,7 +1583,7 @@ const Z = ({
1561
1583
  } catch {
1562
1584
  return;
1563
1585
  }
1564
- }, wt = (i) => {
1586
+ }, vt = (i) => {
1565
1587
  const t = [];
1566
1588
  try {
1567
1589
  return !i || te(i) || typeof i != "string" ? t : ee(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((d) => d.split(":")).forEach((d) => {
@@ -1581,14 +1603,14 @@ function ee(i) {
1581
1603
  function te(i) {
1582
1604
  return typeof i == "object" && i !== null && typeof i != "string";
1583
1605
  }
1584
- const Xe = (i) => {
1606
+ const Ue = (i) => {
1585
1607
  const t = i.trim().replace(")", "").split("("), e = t[0], r = t[1].split(",").map((a) => a.trim());
1586
1608
  return {
1587
1609
  method: e,
1588
1610
  args: r
1589
1611
  };
1590
1612
  };
1591
- function Ue(i) {
1613
+ function Ke(i) {
1592
1614
  const t = [];
1593
1615
  function e(s) {
1594
1616
  const r = [];
@@ -1600,7 +1622,7 @@ function Ue(i) {
1600
1622
  e(s);
1601
1623
  return t.flat();
1602
1624
  }
1603
- class vt {
1625
+ class Ft {
1604
1626
  constructor(t, e = 4) {
1605
1627
  /**
1606
1628
  * Object containing fields specification of the form.
@@ -1708,7 +1730,7 @@ class vt {
1708
1730
  fields: a.children,
1709
1731
  container: this._container,
1710
1732
  values: s
1711
- }), Ue(this._container._rows).forEach((u) => {
1733
+ }), Ke(this._container._rows).forEach((u) => {
1712
1734
  const _ = u;
1713
1735
  _._id && _._context && (this._contextForFields[_._id] = u._context);
1714
1736
  });
@@ -1747,10 +1769,10 @@ class vt {
1747
1769
  widgetType: l
1748
1770
  });
1749
1771
  let f;
1750
- l === "button" && h.states ? f = He({
1772
+ l === "button" && h.states ? f = Qe({
1751
1773
  states: h.states,
1752
1774
  values: s
1753
- }) : f = Je({
1775
+ }) : f = He({
1754
1776
  fieldName: h.name,
1755
1777
  values: s,
1756
1778
  fields: this._fields
@@ -1760,7 +1782,7 @@ class vt {
1760
1782
  values: s,
1761
1783
  fields: this._fields
1762
1784
  });
1763
- h.on_change && (this._onChangeFields[h.name] = Xe(
1785
+ h.on_change && (this._onChangeFields[h.name] = Ue(
1764
1786
  h.on_change
1765
1787
  ));
1766
1788
  let m;
@@ -1792,7 +1814,7 @@ class vt {
1792
1814
  function R(i) {
1793
1815
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
1794
1816
  }
1795
- class Ft {
1817
+ class Ct {
1796
1818
  constructor(t) {
1797
1819
  /**
1798
1820
  * Object containing fields specification of the form.
@@ -1898,7 +1920,7 @@ class Ft {
1898
1920
  return this._columns.find((e) => e.findById ? e.findById(t) : !1);
1899
1921
  }
1900
1922
  }
1901
- const Ke = {
1923
+ const Ze = {
1902
1924
  text: "text",
1903
1925
  many2one: "many2one",
1904
1926
  char: "char",
@@ -1911,7 +1933,7 @@ const Ke = {
1911
1933
  date: "date",
1912
1934
  datetime: "datetime"
1913
1935
  };
1914
- class Ct {
1936
+ class kt {
1915
1937
  constructor(t, e, s = 8) {
1916
1938
  /**
1917
1939
  * Object containing the specific fields for primary and secondary search fields
@@ -1959,7 +1981,7 @@ class Ct {
1959
1981
  colspan: 2
1960
1982
  }, { type: a, widget: l } = r;
1961
1983
  let o = l ?? a;
1962
- return Ke[o] === void 0 && (o = a), e.createWidget(o, r);
1984
+ return Ze[o] === void 0 && (o = a), e.createWidget(o, r);
1963
1985
  });
1964
1986
  }
1965
1987
  /**
@@ -1970,7 +1992,7 @@ class Ct {
1970
1992
  return this.advancedSearchContainer.findById(t);
1971
1993
  }
1972
1994
  }
1973
- const kt = ({
1995
+ const Ot = ({
1974
1996
  domain: i,
1975
1997
  widgetFieldName: t
1976
1998
  }) => {
@@ -1985,8 +2007,8 @@ const kt = ({
1985
2007
  r.length - 1
1986
2008
  )) : (o = r, u = "id"), o === t && e.push([u, a, l]);
1987
2009
  }), e;
1988
- }, Ot = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
1989
- class Ze {
2010
+ }, Tt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2011
+ class et {
1990
2012
  constructor(t) {
1991
2013
  n(this, "_action_id", null);
1992
2014
  n(this, "_position", null);
@@ -1999,7 +2021,7 @@ class Ze {
1999
2021
  return this._position;
2000
2022
  }
2001
2023
  }
2002
- class Tt {
2024
+ class Pt {
2003
2025
  constructor(t) {
2004
2026
  n(this, "_string", null);
2005
2027
  n(this, "_items", []);
@@ -2007,7 +2029,7 @@ class Tt {
2007
2029
  this._string = e.attributes.string || null;
2008
2030
  const { children: s } = e;
2009
2031
  s.forEach((r) => {
2010
- r.tagName === "dashboard_item" && this._items.push(new Ze(r.attributes));
2032
+ r.tagName === "dashboard_item" && this._items.push(new et(r.attributes));
2011
2033
  });
2012
2034
  }
2013
2035
  get string() {
@@ -2045,7 +2067,7 @@ class ie {
2045
2067
  return this._y_range;
2046
2068
  }
2047
2069
  }
2048
- const et = (i) => i === 1 || i === "1" || i === !0 || i === "True";
2070
+ const tt = (i) => i === 1 || i === "1" || i === !0 || i === "True";
2049
2071
  class se extends ie {
2050
2072
  constructor(e, s) {
2051
2073
  super(s);
@@ -2054,7 +2076,7 @@ class se extends ie {
2054
2076
  n(this, "_totalDomain", null);
2055
2077
  n(this, "_showPercent", !1);
2056
2078
  n(this, "_suffix", null);
2057
- this._type = e, this._color = s.attributes.color || null, this._color && (this._color = b(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = b(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = b(s.attributes.totalDomain) || null, this._showPercent = et(s.attributes.showPercent);
2079
+ this._type = e, this._color = s.attributes.color || null, this._color && (this._color = b(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = b(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = b(s.attributes.totalDomain) || null, this._showPercent = tt(s.attributes.showPercent);
2058
2080
  }
2059
2081
  get color() {
2060
2082
  return this._color;
@@ -2072,7 +2094,7 @@ class se extends ie {
2072
2094
  return this._suffix;
2073
2095
  }
2074
2096
  }
2075
- class tt extends se {
2097
+ class it extends se {
2076
2098
  constructor(e, s) {
2077
2099
  super(e, s);
2078
2100
  n(this, "_field");
@@ -2092,7 +2114,7 @@ class tt extends se {
2092
2114
  return this._operator;
2093
2115
  }
2094
2116
  }
2095
- const it = (i) => {
2117
+ const st = (i) => {
2096
2118
  const t = [];
2097
2119
  let e;
2098
2120
  if (i.forEach((s) => {
@@ -2102,10 +2124,10 @@ const it = (i) => {
2102
2124
  throw new Error(`Field ${l} doesn't have an axis`);
2103
2125
  if (!l)
2104
2126
  throw new Error("Missing name attribute for field");
2105
- r === "x" ? e = new rt({
2127
+ r === "x" ? e = new at({
2106
2128
  name: l
2107
2129
  }) : r === "y" && t.push(
2108
- new nt({
2130
+ new rt({
2109
2131
  name: l,
2110
2132
  operator: a,
2111
2133
  label: o,
@@ -2128,7 +2150,7 @@ class j extends ie {
2128
2150
  n(this, "_x");
2129
2151
  n(this, "_y");
2130
2152
  this._type = e;
2131
- const r = it(s.children);
2153
+ const r = st(s.children);
2132
2154
  this._x = r.x, this._y = r.y;
2133
2155
  }
2134
2156
  get x() {
@@ -2138,17 +2160,17 @@ class j extends ie {
2138
2160
  return this._y;
2139
2161
  }
2140
2162
  }
2141
- const st = {
2163
+ const nt = {
2142
2164
  indicator: se,
2143
- indicatorField: tt,
2165
+ indicatorField: it,
2144
2166
  line: j,
2145
2167
  bar: j,
2146
2168
  pie: j
2147
- }, Pt = (i) => {
2169
+ }, Et = (i) => {
2148
2170
  const t = Y.parse(i).filter((r) => r.tagName === "graph")[0], e = t.attributes.type;
2149
2171
  if (!e)
2150
2172
  throw new Error(`${e} is not a valid graph`);
2151
- const s = st[e];
2173
+ const s = nt[e];
2152
2174
  if (!s)
2153
2175
  throw new Error(`${e} not found as a GraphModel`);
2154
2176
  return new s(e, t);
@@ -2166,7 +2188,7 @@ class ne {
2166
2188
  return this._axis;
2167
2189
  }
2168
2190
  }
2169
- class nt extends ne {
2191
+ class rt extends ne {
2170
2192
  constructor({
2171
2193
  name: e,
2172
2194
  operator: s,
@@ -2189,12 +2211,12 @@ class nt extends ne {
2189
2211
  return this._stacked;
2190
2212
  }
2191
2213
  }
2192
- class rt extends ne {
2214
+ class at extends ne {
2193
2215
  constructor({ name: t }) {
2194
2216
  super({ name: t, axis: "x" });
2195
2217
  }
2196
2218
  }
2197
- const at = ({ ooui: i }) => {
2219
+ const lt = ({ ooui: i }) => {
2198
2220
  const e = [i.x.name];
2199
2221
  return i.y ? (i.y.forEach((s) => {
2200
2222
  s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
@@ -2216,27 +2238,27 @@ function $({
2216
2238
  }
2217
2239
  return { value: r, label: r };
2218
2240
  }
2219
- const Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2241
+ const It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2220
2242
  __proto__: null,
2221
- getFieldsToRetrieve: at,
2243
+ getFieldsToRetrieve: lt,
2222
2244
  getValueAndLabelForField: $
2223
2245
  }, Symbol.toStringTag, { value: "Module" }));
2224
- function lt({
2246
+ function ot({
2225
2247
  values: i,
2226
2248
  timerange: t,
2227
2249
  interval: e = 1
2228
2250
  }) {
2229
- const s = dt({
2251
+ const s = ut({
2230
2252
  values: i,
2231
2253
  timerange: t
2232
2254
  });
2233
- return ot({
2255
+ return ct({
2234
2256
  values: s,
2235
2257
  timerange: t,
2236
2258
  interval: e
2237
2259
  });
2238
2260
  }
2239
- function ot({
2261
+ function ct({
2240
2262
  values: i,
2241
2263
  timerange: t,
2242
2264
  interval: e = 1
@@ -2254,7 +2276,7 @@ function ot({
2254
2276
  return;
2255
2277
  const d = h.x, f = u[_ + 1].x;
2256
2278
  if (!re([d, f], a)) {
2257
- const c = ct({
2279
+ const c = dt({
2258
2280
  dates: [d, f],
2259
2281
  timerange: t,
2260
2282
  interval: e
@@ -2271,7 +2293,7 @@ function ot({
2271
2293
  }
2272
2294
  }), s.sort((o, u) => o.x < u.x ? -1 : o.x > u.x ? 1 : 0);
2273
2295
  }
2274
- function ct({
2296
+ function dt({
2275
2297
  dates: i,
2276
2298
  timerange: t,
2277
2299
  interval: e = 1
@@ -2293,11 +2315,11 @@ function ct({
2293
2315
  }
2294
2316
  return s;
2295
2317
  }
2296
- function dt({
2318
+ function ut({
2297
2319
  values: i,
2298
2320
  timerange: t
2299
2321
  }) {
2300
- const e = ut({
2322
+ const e = ht({
2301
2323
  values: i,
2302
2324
  timerange: t
2303
2325
  }), s = [], r = ae({
@@ -2315,23 +2337,23 @@ function dt({
2315
2337
  });
2316
2338
  }), s;
2317
2339
  }
2318
- function ut({
2340
+ function ht({
2319
2341
  values: i,
2320
2342
  timerange: t
2321
2343
  }) {
2322
2344
  return i.map((e) => ({
2323
2345
  ...e,
2324
- x: ht({
2346
+ x: _t({
2325
2347
  date: e.x,
2326
2348
  timerange: t
2327
2349
  })
2328
2350
  }));
2329
2351
  }
2330
- function ht({
2352
+ function _t({
2331
2353
  date: i,
2332
2354
  timerange: t
2333
2355
  }) {
2334
- let e = _t(i);
2356
+ let e = ft(i);
2335
2357
  const s = P(i, e);
2336
2358
  switch (t) {
2337
2359
  case "hour": {
@@ -2357,7 +2379,7 @@ function ht({
2357
2379
  }
2358
2380
  return s.format(e);
2359
2381
  }
2360
- function _t(i) {
2382
+ function ft(i) {
2361
2383
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2362
2384
  }
2363
2385
  function re(i, t) {
@@ -2398,7 +2420,7 @@ function S(i) {
2398
2420
  return "YYYY-MM-DD HH:mm";
2399
2421
  }
2400
2422
  }
2401
- const ft = {
2423
+ const gt = {
2402
2424
  count: "count",
2403
2425
  "+": "sum",
2404
2426
  "-": "subtract",
@@ -2406,7 +2428,7 @@ const ft = {
2406
2428
  avg: "average",
2407
2429
  min: "min",
2408
2430
  max: "max"
2409
- }, gt = ({
2431
+ }, mt = ({
2410
2432
  ooui: i,
2411
2433
  values: t,
2412
2434
  fields: e,
@@ -2473,7 +2495,7 @@ const ft = {
2473
2495
  (c) => c.x !== !1
2474
2496
  ));
2475
2497
  let d = h;
2476
- i.timerange ? d = lt({
2498
+ i.timerange ? d = ot({
2477
2499
  values: d,
2478
2500
  timerange: i.timerange,
2479
2501
  interval: i.interval
@@ -2555,7 +2577,7 @@ function N({
2555
2577
  s[a] || (s[a] = { label: l, entries: [] }), s[a].entries.push(r);
2556
2578
  }), s;
2557
2579
  }
2558
- function mt(i) {
2580
+ function bt(i) {
2559
2581
  let t = [];
2560
2582
  return Object.keys(i).forEach((e) => {
2561
2583
  const s = i[e];
@@ -2578,16 +2600,16 @@ function oe(i, t = 0.1) {
2578
2600
  max: r + a
2579
2601
  };
2580
2602
  }
2581
- const It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2603
+ const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2582
2604
  __proto__: null,
2583
- getAllObjectsInGroupedValues: mt,
2605
+ getAllObjectsInGroupedValues: bt,
2584
2606
  getMinMax: oe,
2585
2607
  getValueForOperator: V,
2586
2608
  getValuesForYField: A,
2587
2609
  getValuesGroupedByField: N,
2588
2610
  getYAxisFieldname: le,
2589
- labelsForOperator: ft,
2590
- processGraphData: gt
2611
+ labelsForOperator: gt,
2612
+ processGraphData: mt
2591
2613
  }, Symbol.toStringTag, { value: "Module" }));
2592
2614
  export {
2593
2615
  qe as Alert,
@@ -2598,23 +2620,24 @@ export {
2598
2620
  Fe as ButtonGroup,
2599
2621
  D as Char,
2600
2622
  $e as CodeEditor,
2623
+ Je as Comments,
2601
2624
  z as Container,
2602
2625
  v as ContainerWidget,
2603
- Tt as Dashboard,
2604
- Ze as DashboardItem,
2626
+ Pt as Dashboard,
2627
+ et as DashboardItem,
2605
2628
  Ie as Date,
2606
2629
  We as DateTime,
2607
2630
  g as Field,
2608
2631
  L as Float,
2609
2632
  Te as FloatTime,
2610
- vt as Form,
2633
+ Ft as Form,
2611
2634
  ie as Graph,
2612
2635
  ne as GraphAxis,
2613
2636
  j as GraphChart,
2614
2637
  se as GraphIndicator,
2615
- tt as GraphIndicatorField,
2616
- rt as GraphXAxis,
2617
- nt as GraphYAxis,
2638
+ it as GraphIndicatorField,
2639
+ at as GraphXAxis,
2640
+ rt as GraphYAxis,
2618
2641
  ve as Group,
2619
2642
  Pe as HTMLPreview,
2620
2643
  Ye as Image,
@@ -2631,8 +2654,8 @@ export {
2631
2654
  Ee as ProgressBar,
2632
2655
  Be as Radio,
2633
2656
  ze as Reference,
2634
- Ke as SearchFieldTypes,
2635
- Ct as SearchFilter,
2657
+ Ze as SearchFieldTypes,
2658
+ kt as SearchFilter,
2636
2659
  E as Selection,
2637
2660
  Se as Separator,
2638
2661
  Ge as Steps,
@@ -2642,14 +2665,14 @@ export {
2642
2665
  B as Text,
2643
2666
  Re as Time,
2644
2667
  je as Timeline,
2645
- Ft as Tree,
2668
+ Ct as Tree,
2646
2669
  C as Widget,
2647
- Et as graphFieldUtils,
2648
- It as graphProcessor,
2670
+ It as graphFieldUtils,
2671
+ Wt as graphProcessor,
2649
2672
  Z as parseContext,
2650
- wt as parseContextFields,
2651
- Ot as parseDomainFields,
2652
- Pt as parseGraph,
2653
- kt as transformDomainForChildWidget
2673
+ vt as parseContextFields,
2674
+ Tt as parseDomainFields,
2675
+ Et as parseGraph,
2676
+ Ot as transformDomainForChildWidget
2654
2677
  };
2655
2678
  //# sourceMappingURL=ooui.es.js.map