@gisce/ooui 2.28.0 → 2.29.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ooui.es.js CHANGED
@@ -1,17 +1,17 @@
1
- var me = Object.defineProperty;
2
- var be = (i, t, e) => t in i ? me(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var n = (i, t, e) => (be(i, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { decode as ye } from "html-entities";
5
- import { evaluateCondition as pe } from "@gisce/conscheck";
1
+ var be = Object.defineProperty;
2
+ var ye = (i, t, e) => t in i ? be(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var n = (i, t, e) => (ye(i, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { decode as pe } from "html-entities";
5
+ import { evaluateCondition as xe } from "@gisce/conscheck";
6
6
  import * as D from "txml";
7
7
  import W from "moment";
8
- const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we = ({
8
+ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve = ({
9
9
  entry: i,
10
10
  values: t,
11
11
  fields: e
12
12
  }) => {
13
13
  let [s, r, a] = i, l = t[s];
14
- const o = Q({
14
+ const o = X({
15
15
  fieldName: s,
16
16
  valueInObject: l,
17
17
  expectedValue: a,
@@ -41,7 +41,7 @@ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, b = (i) => ye(i, { level: "xml" }), Q = ({
44
+ }, b = (i) => pe(i, { level: "xml" }), X = ({
45
45
  fieldName: i,
46
46
  valueInObject: t,
47
47
  expectedValue: e,
@@ -61,7 +61,7 @@ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we
61
61
  modifiedExpectedValue: null,
62
62
  directOutcome: !1
63
63
  } : (r.modifiedValueInObject = s[i].type === "boolean" ? !!t : t, s[i].type === "many2one" && e === !1 && t === void 0 ? r.modifiedExpectedValue = void 0 : (r.modifiedValueInObject === void 0 ? r.modifiedValueInObject = !1 : Array.isArray(r.modifiedValueInObject) && r.modifiedValueInObject[0] !== void 0 && (r.modifiedValueInObject = r.modifiedValueInObject[0]), r.modifiedValueInObject === null && (r.modifiedValueInObject = !1)), s[i].type === "many2one" && Array.isArray(r.modifiedValueInObject) && r.modifiedValueInObject[0] === void 0 && (r.modifiedValueInObject = !1), s[i].type === "boolean" && (e === 0 || e === 1) && (r.modifiedExpectedValue = e !== 0), r);
64
- }, ve = ({
64
+ }, J = ({
65
65
  attrs: i,
66
66
  values: t,
67
67
  fields: e,
@@ -69,11 +69,11 @@ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we
69
69
  }) => {
70
70
  const u = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = b(u), h = JSON.parse(_), d = {};
71
71
  for (const g of Object.keys(h)) {
72
- const p = h[g].map((y) => we({ entry: y, values: t, fields: e })).every((y) => y);
72
+ const p = h[g].map((y) => ve({ entry: y, values: t, fields: e })).every((y) => y);
73
73
  p ? d[g] = !0 : g === "readonly" && !p && s === "button" && (d[g] = !1);
74
74
  }
75
75
  return d;
76
- }, X = (i) => {
76
+ }, U = (i) => {
77
77
  if (i === void 0)
78
78
  return {};
79
79
  if (typeof i == "string")
@@ -95,14 +95,14 @@ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we
95
95
  r.replace(/'/g, '"')
96
96
  ), l = {};
97
97
  for (const o of Object.keys(a)) {
98
- const u = pe({
98
+ const u = xe({
99
99
  object: t,
100
100
  condition: a[o],
101
101
  evaluateFieldComparison: ({
102
102
  fieldName: _,
103
103
  valueInObject: h,
104
104
  expectedValue: d
105
- }) => Q({
105
+ }) => X({
106
106
  fieldName: _,
107
107
  valueInObject: h,
108
108
  expectedValue: d,
@@ -124,13 +124,8 @@ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we
124
124
  widgetType: s,
125
125
  fallbackMode: r = !0
126
126
  }) => {
127
- let a = {}, l = {};
128
- if (i.attrs && (l = ve({
129
- attrs: i.attrs,
130
- values: t,
131
- fields: e,
132
- widgetType: s
133
- })), i.json_attrs)
127
+ let a = {};
128
+ if (i.json_attrs)
134
129
  try {
135
130
  a = Fe({
136
131
  attrs: i.json_attrs,
@@ -138,14 +133,24 @@ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we
138
133
  fields: e,
139
134
  widgetType: s
140
135
  });
141
- } catch (o) {
136
+ } catch (l) {
142
137
  if (r && i.attrs)
143
- a = l;
138
+ a = J({
139
+ attrs: i.attrs,
140
+ values: t,
141
+ fields: e,
142
+ widgetType: s
143
+ });
144
144
  else
145
- throw o;
145
+ throw l;
146
146
  }
147
147
  else
148
- i.attrs && (a = l);
148
+ i.attrs && (a = J({
149
+ attrs: i.attrs,
150
+ values: t,
151
+ fields: e,
152
+ widgetType: s
153
+ }));
149
154
  return {
150
155
  ...i,
151
156
  ...a,
@@ -188,7 +193,7 @@ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we
188
193
  * Base type of the field
189
194
  */
190
195
  n(this, "_fieldType", "");
191
- this._colspan = k._defaultColspan, this._invisible = !1, t && (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (this._readOnly = T(t.readonly)), t.invisible && (t.invisible === 1 || t.invisible === "1" || t.invisible === !0) && (this._invisible = !0), t.type && (this._type = t.type), t.context && (this._context = t.context), t.domain && (typeof t.domain != "string" ? this._domain = b(JSON.stringify(t.domain)) : this._domain = b(t.domain)), t.type && (this._fieldType = t.fieldsWidgetType), t.widget_props && (this._parsedWidgetProps = X(t.widget_props)), t.key && (this._key = t.key), t.is_function && (this._isFunction = t.is_function));
196
+ this._colspan = k._defaultColspan, this._invisible = !1, t && (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (this._readOnly = T(t.readonly)), t.invisible && (t.invisible === 1 || t.invisible === "1" || t.invisible === !0) && (this._invisible = !0), t.type && (this._type = t.type), t.context && (this._context = t.context), t.domain && (typeof t.domain != "string" ? this._domain = b(JSON.stringify(t.domain)) : this._domain = b(t.domain)), t.type && (this._fieldType = t.fieldsWidgetType), t.widget_props && (this._parsedWidgetProps = U(t.widget_props)), t.key && (this._key = t.key), t.is_function && (this._isFunction = t.is_function));
192
197
  }
193
198
  static get defaultColspan() {
194
199
  return k._defaultColspan;
@@ -306,7 +311,8 @@ class f extends C {
306
311
  */
307
312
  n(this, "_selectionValues", /* @__PURE__ */ new Map([]));
308
313
  n(this, "_autoRefresh", !1);
309
- this._activated = !0, e && (e.name && (this._id = e.name), e.activated && (this._activated = e.activated), e.string && (this._label = b(e.string)), e.help && (this._tooltip = b(e.help)), e.nolabel && (e.nolabel === "1" || typeof e.nolabel == "boolean" && e.nolabel === !0) && (this._nolabel = !0), e.required && (e.required === "1" || e.required === !0 || e.required === "True") && (this._required = !0), e.sum && (this._sum = b(e.sum)), e.selection && (this._selectionValues = new Map(e.selection)), e.help_inline && (this.tooltipInline = xe(e.help_inline)), e.autorefresh && (this.autoRefresh = T(e.autorefresh)));
314
+ n(this, "_raw_props");
315
+ this._activated = !0, e && (this._raw_props = e, e.name && (this._id = e.name), e.activated && (this._activated = e.activated), e.string && (this._label = b(e.string)), e.help && (this._tooltip = b(e.help)), e.nolabel && (e.nolabel === "1" || typeof e.nolabel == "boolean" && e.nolabel === !0) && (this._nolabel = !0), e.required && (e.required === "1" || e.required === !0 || e.required === "True") && (this._required = !0), e.sum && (this._sum = b(e.sum)), e.selection && (this._selectionValues = new Map(e.selection)), e.help_inline && (this.tooltipInline = we(e.help_inline)), e.autorefresh && (this.autoRefresh = T(e.autorefresh)));
310
316
  }
311
317
  get id() {
312
318
  return this._id;
@@ -380,6 +386,9 @@ class f extends C {
380
386
  set readOnly(e) {
381
387
  super.readOnly = e;
382
388
  }
389
+ get raw_props() {
390
+ return this._raw_props;
391
+ }
383
392
  /**
384
393
  * Returns this instance in case this id matches param id.
385
394
  * @param {string} id id (name) to find
@@ -390,12 +399,12 @@ class f extends C {
390
399
  }
391
400
  class ke extends f {
392
401
  }
393
- class U extends C {
402
+ class K extends C {
394
403
  findById(t) {
395
404
  return null;
396
405
  }
397
406
  }
398
- class K extends f {
407
+ class Z extends f {
399
408
  constructor(e) {
400
409
  super({ ...e, nolabel: !0 });
401
410
  /**
@@ -522,13 +531,13 @@ class V {
522
531
  }
523
532
  addWidget(t, e) {
524
533
  const s = [], r = e ? e.addLabel : !0;
525
- if (t instanceof U) {
534
+ if (t instanceof K) {
526
535
  this._rows.push([]), this._index++;
527
536
  return;
528
537
  }
529
538
  if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, r && t instanceof f && !t.nolabel) {
530
539
  t.colspan > 1 && (t.colspan -= 1);
531
- const l = new K({
540
+ const l = new Z({
532
541
  name: t.id + "_label",
533
542
  string: t.label,
534
543
  invisible: t.invisible,
@@ -708,7 +717,7 @@ class Pe extends L {
708
717
  this._height = e;
709
718
  }
710
719
  }
711
- class Z extends f {
720
+ class ee extends f {
712
721
  constructor(e) {
713
722
  super({
714
723
  ...e,
@@ -962,7 +971,7 @@ class We extends f {
962
971
  }
963
972
  class Ie extends G {
964
973
  }
965
- class ee extends f {
974
+ class te extends f {
966
975
  constructor(t) {
967
976
  super(t);
968
977
  }
@@ -1021,7 +1030,7 @@ class De extends f {
1021
1030
  super(t);
1022
1031
  }
1023
1032
  }
1024
- class te extends f {
1033
+ class ie extends f {
1025
1034
  constructor(e) {
1026
1035
  super(e);
1027
1036
  /**
@@ -1170,7 +1179,7 @@ class Be extends f {
1170
1179
  super(t);
1171
1180
  }
1172
1181
  }
1173
- class Le extends te {
1182
+ class Le extends ie {
1174
1183
  constructor(e) {
1175
1184
  super(e);
1176
1185
  /**
@@ -1252,7 +1261,7 @@ class Ge extends I {
1252
1261
  this._height = e;
1253
1262
  }
1254
1263
  }
1255
- class ie extends f {
1264
+ class se extends f {
1256
1265
  constructor(e) {
1257
1266
  super(e);
1258
1267
  /**
@@ -1305,12 +1314,16 @@ class ie extends f {
1305
1314
  this._columns = e;
1306
1315
  }
1307
1316
  }
1308
- class Re extends ie {
1317
+ class Re extends se {
1309
1318
  }
1310
1319
  class $e extends I {
1311
1320
  get colors() {
1312
1321
  return this._parsedWidgetProps.colors || {};
1313
1322
  }
1323
+ get colorField() {
1324
+ var t;
1325
+ return ((t = this._parsedWidgetProps) == null ? void 0 : t.colorField) || null;
1326
+ }
1314
1327
  }
1315
1328
  class qe extends I {
1316
1329
  constructor(e) {
@@ -1328,7 +1341,7 @@ class qe extends I {
1328
1341
  this._direction = e;
1329
1342
  }
1330
1343
  }
1331
- class Je extends ee {
1344
+ class Je extends te {
1332
1345
  }
1333
1346
  class He extends f {
1334
1347
  constructor(e) {
@@ -1360,7 +1373,7 @@ class He extends f {
1360
1373
  this._lastStep = e;
1361
1374
  }
1362
1375
  }
1363
- class se extends G {
1376
+ class ne extends G {
1364
1377
  constructor(e) {
1365
1378
  super(e);
1366
1379
  n(this, "_lang", null);
@@ -1437,7 +1450,7 @@ class Ue extends f {
1437
1450
  this._height = e;
1438
1451
  }
1439
1452
  }
1440
- class J extends se {
1453
+ class H extends ne {
1441
1454
  constructor() {
1442
1455
  super(...arguments);
1443
1456
  n(this, "_lang", "json");
@@ -1503,7 +1516,7 @@ class $ {
1503
1516
  this._widgetClass = Pe;
1504
1517
  break;
1505
1518
  case "label":
1506
- this._widgetClass = K;
1519
+ this._widgetClass = Z;
1507
1520
  break;
1508
1521
  case "char":
1509
1522
  this._widgetClass = A;
@@ -1512,7 +1525,7 @@ class $ {
1512
1525
  this._widgetClass = G;
1513
1526
  break;
1514
1527
  case "button":
1515
- this._widgetClass = Z;
1528
+ this._widgetClass = ee;
1516
1529
  break;
1517
1530
  case "buttonGroup":
1518
1531
  this._widgetClass = Te;
@@ -1524,7 +1537,7 @@ class $ {
1524
1537
  this._widgetClass = We;
1525
1538
  break;
1526
1539
  case "boolean":
1527
- this._widgetClass = ee;
1540
+ this._widgetClass = te;
1528
1541
  break;
1529
1542
  case "integer":
1530
1543
  this._widgetClass = Ee;
@@ -1550,10 +1563,10 @@ class $ {
1550
1563
  case "many2many":
1551
1564
  case "one2many":
1552
1565
  case "one2many_list":
1553
- this._widgetClass = te;
1566
+ this._widgetClass = ie;
1554
1567
  break;
1555
1568
  case "newline":
1556
- this._widgetClass = U;
1569
+ this._widgetClass = K;
1557
1570
  break;
1558
1571
  case "separator":
1559
1572
  this._widgetClass = je;
@@ -1595,7 +1608,7 @@ class $ {
1595
1608
  this._widgetClass = qe;
1596
1609
  break;
1597
1610
  case "multicheckbox":
1598
- this._widgetClass = ie;
1611
+ this._widgetClass = se;
1599
1612
  break;
1600
1613
  case "switch":
1601
1614
  this._widgetClass = Je;
@@ -1604,7 +1617,7 @@ class $ {
1604
1617
  this._widgetClass = He;
1605
1618
  break;
1606
1619
  case "codeeditor":
1607
- this._widgetClass = se;
1620
+ this._widgetClass = ne;
1608
1621
  break;
1609
1622
  case "time":
1610
1623
  this._widgetClass = Qe;
@@ -1619,10 +1632,10 @@ class $ {
1619
1632
  this._widgetClass = Ue;
1620
1633
  break;
1621
1634
  case "json":
1622
- this._widgetClass = J;
1635
+ this._widgetClass = H;
1623
1636
  break;
1624
1637
  case "arrow_steps":
1625
- this._widgetClass = J;
1638
+ this._widgetClass = H;
1626
1639
  break;
1627
1640
  case "spinner":
1628
1641
  this._widgetClass = L;
@@ -1697,7 +1710,7 @@ function st({
1697
1710
  const s = ((r = e[t]) == null ? void 0 : r.type) || "passthrough";
1698
1711
  return s === "many2one" ? i[t] ? i[t][0] || null : !1 : s === "one2many" || s === "many2many" ? i[t].map((a) => a.id) : i != null && i[t] ? i == null ? void 0 : i[t] : t.includes("'") ? t : parseInt(t);
1699
1712
  }
1700
- const ne = ({
1713
+ const re = ({
1701
1714
  context: i,
1702
1715
  values: t,
1703
1716
  fields: e
@@ -1705,9 +1718,9 @@ const ne = ({
1705
1718
  try {
1706
1719
  if (!i)
1707
1720
  return;
1708
- if (ae(i) || typeof i != "string")
1721
+ if (le(i) || typeof i != "string")
1709
1722
  return i;
1710
- const s = re(i);
1723
+ const s = ae(i);
1711
1724
  if (s !== null)
1712
1725
  return s;
1713
1726
  if (i.trim().length === 0)
@@ -1734,21 +1747,21 @@ const ne = ({
1734
1747
  }, Tt = (i) => {
1735
1748
  const t = [];
1736
1749
  try {
1737
- return !i || ae(i) || typeof i != "string" ? t : re(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) => {
1750
+ 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((d) => d.split(":")).forEach((d) => {
1738
1751
  !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1739
1752
  }), t);
1740
1753
  } catch {
1741
1754
  }
1742
1755
  return t;
1743
1756
  };
1744
- function re(i) {
1757
+ function ae(i) {
1745
1758
  try {
1746
1759
  return JSON.parse(i.replace(/'/g, '"'));
1747
1760
  } catch {
1748
1761
  return null;
1749
1762
  }
1750
1763
  }
1751
- function ae(i) {
1764
+ function le(i) {
1752
1765
  return typeof i == "object" && i !== null && typeof i != "string";
1753
1766
  }
1754
1767
  const nt = (i) => {
@@ -1912,7 +1925,7 @@ class Wt {
1912
1925
  `Field ${x} doesn't exist in fields defintion`
1913
1926
  );
1914
1927
  _ = this._fields[x].type, o.widget_props = {
1915
- ...X(o.widget_props),
1928
+ ...U(o.widget_props),
1916
1929
  ...this._fields[x].widget_props || {}
1917
1930
  };
1918
1931
  }
@@ -1937,7 +1950,7 @@ class Wt {
1937
1950
  values: s,
1938
1951
  fields: this._fields
1939
1952
  });
1940
- const c = ne({
1953
+ const c = re({
1941
1954
  context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
1942
1955
  values: s,
1943
1956
  fields: this._fields
@@ -1946,7 +1959,7 @@ class Wt {
1946
1959
  h.on_change
1947
1960
  ));
1948
1961
  let m;
1949
- H(h.domain) ? m = h.domain : H((F = this._fields[h.name]) == null ? void 0 : F.domain) && (m = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
1962
+ Q(h.domain) ? m = h.domain : Q((F = this._fields[h.name]) == null ? void 0 : F.domain) && (m = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
1950
1963
  const p = {
1951
1964
  ...d,
1952
1965
  ...g,
@@ -1960,7 +1973,7 @@ class Wt {
1960
1973
  fields: u,
1961
1974
  container: y.container,
1962
1975
  values: s
1963
- }), y instanceof Z && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1976
+ }), y instanceof ee && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1964
1977
  });
1965
1978
  }
1966
1979
  /**
@@ -1971,7 +1984,7 @@ class Wt {
1971
1984
  return this.container.findById(t);
1972
1985
  }
1973
1986
  }
1974
- function H(i) {
1987
+ function Q(i) {
1975
1988
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
1976
1989
  }
1977
1990
  class It {
@@ -2060,7 +2073,7 @@ class It {
2060
2073
  throw new Error(`Field ${u} doesn't exist in fields defintion`);
2061
2074
  const d = this._fields[u];
2062
2075
  o = d.type, (Array.isArray(d == null ? void 0 : d.domain) && (d == null ? void 0 : d.domain.length) === 0 || (d == null ? void 0 : d.domain) === !1) && l.domain && l.domain.length > 0 && delete d.domain;
2063
- const g = ne({
2076
+ const g = re({
2064
2077
  context: l.context || d.context,
2065
2078
  values: {},
2066
2079
  fields: this._fields
@@ -2207,7 +2220,7 @@ class Vt {
2207
2220
  return this._items;
2208
2221
  }
2209
2222
  }
2210
- class le {
2223
+ class oe {
2211
2224
  constructor(t) {
2212
2225
  n(this, "_string", null);
2213
2226
  n(this, "_type");
@@ -2235,7 +2248,7 @@ class le {
2235
2248
  return this._y_range;
2236
2249
  }
2237
2250
  }
2238
- class oe extends le {
2251
+ class ce extends oe {
2239
2252
  constructor(e, s) {
2240
2253
  super(s);
2241
2254
  n(this, "_color", null);
@@ -2261,7 +2274,7 @@ class oe extends le {
2261
2274
  return this._suffix;
2262
2275
  }
2263
2276
  }
2264
- class ot extends oe {
2277
+ class ot extends ce {
2265
2278
  constructor(e, s) {
2266
2279
  super(e, s);
2267
2280
  n(this, "_field");
@@ -2311,7 +2324,7 @@ const ct = (i) => {
2311
2324
  y: t
2312
2325
  };
2313
2326
  };
2314
- class j extends le {
2327
+ class j extends oe {
2315
2328
  constructor(e, s) {
2316
2329
  super(s);
2317
2330
  n(this, "_x");
@@ -2328,7 +2341,7 @@ class j extends le {
2328
2341
  }
2329
2342
  }
2330
2343
  const ut = {
2331
- indicator: oe,
2344
+ indicator: ce,
2332
2345
  indicatorField: ot,
2333
2346
  line: j,
2334
2347
  bar: j,
@@ -2342,7 +2355,7 @@ const ut = {
2342
2355
  throw new Error(`${e} not found as a GraphModel`);
2343
2356
  return new s(e, t);
2344
2357
  };
2345
- class ce {
2358
+ class ue {
2346
2359
  constructor({ name: t, axis: e }) {
2347
2360
  n(this, "_name");
2348
2361
  n(this, "_axis");
@@ -2355,7 +2368,7 @@ class ce {
2355
2368
  return this._axis;
2356
2369
  }
2357
2370
  }
2358
- class dt extends ce {
2371
+ class dt extends ue {
2359
2372
  constructor({
2360
2373
  name: e,
2361
2374
  operator: s,
@@ -2378,7 +2391,7 @@ class dt extends ce {
2378
2391
  return this._stacked;
2379
2392
  }
2380
2393
  }
2381
- class ht extends ce {
2394
+ class ht extends ue {
2382
2395
  constructor({ name: t }) {
2383
2396
  super({ name: t, axis: "x" });
2384
2397
  }
@@ -2431,7 +2444,7 @@ function gt({
2431
2444
  interval: e = 1
2432
2445
  }) {
2433
2446
  let s = [];
2434
- const r = de({
2447
+ const r = he({
2435
2448
  values: i,
2436
2449
  groupBy: "type-stacked"
2437
2450
  }), a = `${t}s`;
@@ -2442,7 +2455,7 @@ function gt({
2442
2455
  if (s.push(h), _ === u.length - 1)
2443
2456
  return;
2444
2457
  const d = h.x, g = u[_ + 1].x;
2445
- if (!ue([d, g], a)) {
2458
+ if (!de([d, g], a)) {
2446
2459
  const c = mt({
2447
2460
  dates: [d, g],
2448
2461
  timerange: t,
@@ -2471,7 +2484,7 @@ function mt({
2471
2484
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2472
2485
  for (let l = 0; l < a.length - 1; l++) {
2473
2486
  const o = a[l], u = a[l + 1];
2474
- if (!ue([o, u], r)) {
2487
+ if (!de([o, u], r)) {
2475
2488
  const _ = W(o, z(r)).add(
2476
2489
  e,
2477
2490
  r
@@ -2489,7 +2502,7 @@ function bt({
2489
2502
  const e = yt({
2490
2503
  values: i,
2491
2504
  timerange: t
2492
- }), s = [], r = de({
2505
+ }), s = [], r = he({
2493
2506
  values: e,
2494
2507
  groupBy: "all"
2495
2508
  });
@@ -2549,7 +2562,7 @@ function pt({
2549
2562
  function xt(i) {
2550
2563
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2551
2564
  }
2552
- function ue(i, t) {
2565
+ function de(i, t) {
2553
2566
  let e = !1;
2554
2567
  const s = z(t);
2555
2568
  if (i.length === 0)
@@ -2562,7 +2575,7 @@ function ue(i, t) {
2562
2575
  }
2563
2576
  return e;
2564
2577
  }
2565
- function de({
2578
+ function he({
2566
2579
  values: i,
2567
2580
  groupBy: t
2568
2581
  }) {
@@ -2616,17 +2629,17 @@ const wt = {
2616
2629
  fields: e
2617
2630
  });
2618
2631
  Object.keys(v).forEach((F) => {
2619
- const x = v[F].entries, E = v[F].label, fe = N({
2632
+ const x = v[F].entries, E = v[F].label, ge = N({
2620
2633
  entries: x,
2621
2634
  fields: e,
2622
2635
  fieldName: c.name
2623
- }), ge = Y({
2624
- values: fe,
2636
+ }), me = Y({
2637
+ values: ge,
2625
2638
  operator: c.operator
2626
2639
  });
2627
2640
  a.push({
2628
2641
  x: p || !1,
2629
- value: ge,
2642
+ value: me,
2630
2643
  type: E,
2631
2644
  operator: c.operator,
2632
2645
  stacked: c.stacked
@@ -2644,7 +2657,7 @@ const wt = {
2644
2657
  a.push({
2645
2658
  x: p || !1,
2646
2659
  value: F,
2647
- type: he({
2660
+ type: _e({
2648
2661
  yAxis: c,
2649
2662
  fields: e
2650
2663
  }),
@@ -2675,7 +2688,7 @@ const wt = {
2675
2688
  if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2676
2689
  mode: i.y_range
2677
2690
  }, i.y_range === "auto")) {
2678
- const { min: c, max: m } = _e(d);
2691
+ const { min: c, max: m } = fe(d);
2679
2692
  g.yAxisOpts.valueOpts = { min: c, max: m };
2680
2693
  }
2681
2694
  return g;
@@ -2751,14 +2764,14 @@ function Ft(i) {
2751
2764
  t = t.concat(s.entries);
2752
2765
  }), t;
2753
2766
  }
2754
- function he({
2767
+ function _e({
2755
2768
  yAxis: i,
2756
2769
  fields: t
2757
2770
  }) {
2758
2771
  const e = t[i.name];
2759
2772
  return e != null && e.string ? e.string : i.name;
2760
2773
  }
2761
- function _e(i, t = 0.1) {
2774
+ function fe(i, t = 0.1) {
2762
2775
  if (i.length === 0)
2763
2776
  throw new Error("The values array cannot be empty.");
2764
2777
  const e = i.map((l) => l.value), s = Math.min(...e), r = Math.max(...e), a = (r - s) * t;
@@ -2770,11 +2783,11 @@ function _e(i, t = 0.1) {
2770
2783
  const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2771
2784
  __proto__: null,
2772
2785
  getAllObjectsInGroupedValues: Ft,
2773
- getMinMax: _e,
2786
+ getMinMax: fe,
2774
2787
  getValueForOperator: Y,
2775
2788
  getValuesForYField: N,
2776
2789
  getValuesGroupedByField: B,
2777
- getYAxisFieldname: he,
2790
+ getYAxisFieldname: _e,
2778
2791
  labelsForOperator: wt,
2779
2792
  processGraphData: vt
2780
2793
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2782,12 +2795,12 @@ export {
2782
2795
  Xe as Alert,
2783
2796
  ke as Avatar,
2784
2797
  Ae as Binary,
2785
- ee as Boolean,
2786
- Z as Button,
2798
+ te as Boolean,
2799
+ ee as Button,
2787
2800
  Te as ButtonGroup,
2788
2801
  Ze as Carousel,
2789
2802
  A as Char,
2790
- se as CodeEditor,
2803
+ ne as CodeEditor,
2791
2804
  et as ColorPicker,
2792
2805
  Ue as Comments,
2793
2806
  V as Container,
@@ -2801,10 +2814,10 @@ export {
2801
2814
  R as Float,
2802
2815
  Se as FloatTime,
2803
2816
  Wt as Form,
2804
- le as Graph,
2805
- ce as GraphAxis,
2817
+ oe as Graph,
2818
+ ue as GraphAxis,
2806
2819
  j as GraphChart,
2807
- oe as GraphIndicator,
2820
+ ce as GraphIndicator,
2808
2821
  ot as GraphIndicatorField,
2809
2822
  ht as GraphXAxis,
2810
2823
  dt as GraphYAxis,
@@ -2813,14 +2826,14 @@ export {
2813
2826
  Ne as Image,
2814
2827
  Ge as Indicator,
2815
2828
  Ee as Integer,
2816
- J as JSONField,
2817
- K as Label,
2829
+ H as JSONField,
2830
+ Z as Label,
2818
2831
  We as Many2one,
2819
2832
  Ie as Markdown,
2820
- ie as MultiCheckbox,
2821
- U as NewLine,
2833
+ se as MultiCheckbox,
2834
+ K as NewLine,
2822
2835
  M as Notebook,
2823
- te as One2many,
2836
+ ie as One2many,
2824
2837
  Oe as Page,
2825
2838
  Ve as ProgressBar,
2826
2839
  qe as Radio,
@@ -2841,7 +2854,7 @@ export {
2841
2854
  C as Widget,
2842
2855
  Dt as graphFieldUtils,
2843
2856
  jt as graphProcessor,
2844
- ne as parseContext,
2857
+ re as parseContext,
2845
2858
  Tt as parseContextFields,
2846
2859
  zt as parseDomainFields,
2847
2860
  Yt as parseGraph,