@gisce/ooui 2.27.1 → 2.28.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/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
- import T from "moment";
8
- const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we = ({
7
+ import W from "moment";
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,21 +133,31 @@ 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,
152
157
  attrs: void 0,
153
158
  json_attrs: void 0
154
159
  };
155
- }, W = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", k = class k {
160
+ }, T = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", k = class k {
156
161
  constructor(t) {
157
162
  /**
158
163
  * Determines if widget is read only (default is undefined)
@@ -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 = W(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,7 @@ 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 = W(e.autorefresh)));
314
+ 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 = we(e.help_inline)), e.autorefresh && (this.autoRefresh = T(e.autorefresh)));
310
315
  }
311
316
  get id() {
312
317
  return this._id;
@@ -390,12 +395,12 @@ class f extends C {
390
395
  }
391
396
  class ke extends f {
392
397
  }
393
- class U extends C {
398
+ class K extends C {
394
399
  findById(t) {
395
400
  return null;
396
401
  }
397
402
  }
398
- class K extends f {
403
+ class Z extends f {
399
404
  constructor(e) {
400
405
  super({ ...e, nolabel: !0 });
401
406
  /**
@@ -444,6 +449,10 @@ class K extends f {
444
449
  set labelSize(e) {
445
450
  this._labelSize = e;
446
451
  }
452
+ get humanDate() {
453
+ var e;
454
+ return T(((e = this._parsedWidgetProps) == null ? void 0 : e.human_date) ?? !1);
455
+ }
447
456
  get fieldForLabel() {
448
457
  return this._fieldForLabel;
449
458
  }
@@ -518,13 +527,13 @@ class V {
518
527
  }
519
528
  addWidget(t, e) {
520
529
  const s = [], r = e ? e.addLabel : !0;
521
- if (t instanceof U) {
530
+ if (t instanceof K) {
522
531
  this._rows.push([]), this._index++;
523
532
  return;
524
533
  }
525
534
  if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, r && t instanceof f && !t.nolabel) {
526
535
  t.colspan > 1 && (t.colspan -= 1);
527
- const l = new K({
536
+ const l = new Z({
528
537
  name: t.id + "_label",
529
538
  string: t.label,
530
539
  invisible: t.invisible,
@@ -704,7 +713,7 @@ class Pe extends L {
704
713
  this._height = e;
705
714
  }
706
715
  }
707
- class Z extends f {
716
+ class ee extends f {
708
717
  constructor(e) {
709
718
  super({
710
719
  ...e,
@@ -958,7 +967,7 @@ class We extends f {
958
967
  }
959
968
  class Ie extends G {
960
969
  }
961
- class ee extends f {
970
+ class te extends f {
962
971
  constructor(t) {
963
972
  super(t);
964
973
  }
@@ -1017,7 +1026,7 @@ class De extends f {
1017
1026
  super(t);
1018
1027
  }
1019
1028
  }
1020
- class te extends f {
1029
+ class ie extends f {
1021
1030
  constructor(e) {
1022
1031
  super(e);
1023
1032
  /**
@@ -1166,7 +1175,7 @@ class Be extends f {
1166
1175
  super(t);
1167
1176
  }
1168
1177
  }
1169
- class Le extends te {
1178
+ class Le extends ie {
1170
1179
  constructor(e) {
1171
1180
  super(e);
1172
1181
  /**
@@ -1248,7 +1257,7 @@ class Ge extends I {
1248
1257
  this._height = e;
1249
1258
  }
1250
1259
  }
1251
- class ie extends f {
1260
+ class se extends f {
1252
1261
  constructor(e) {
1253
1262
  super(e);
1254
1263
  /**
@@ -1301,7 +1310,7 @@ class ie extends f {
1301
1310
  this._columns = e;
1302
1311
  }
1303
1312
  }
1304
- class Re extends ie {
1313
+ class Re extends se {
1305
1314
  }
1306
1315
  class $e extends I {
1307
1316
  get colors() {
@@ -1324,7 +1333,7 @@ class qe extends I {
1324
1333
  this._direction = e;
1325
1334
  }
1326
1335
  }
1327
- class Je extends ee {
1336
+ class Je extends te {
1328
1337
  }
1329
1338
  class He extends f {
1330
1339
  constructor(e) {
@@ -1356,7 +1365,7 @@ class He extends f {
1356
1365
  this._lastStep = e;
1357
1366
  }
1358
1367
  }
1359
- class se extends G {
1368
+ class ne extends G {
1360
1369
  constructor(e) {
1361
1370
  super(e);
1362
1371
  n(this, "_lang", null);
@@ -1433,7 +1442,7 @@ class Ue extends f {
1433
1442
  this._height = e;
1434
1443
  }
1435
1444
  }
1436
- class J extends se {
1445
+ class H extends ne {
1437
1446
  constructor() {
1438
1447
  super(...arguments);
1439
1448
  n(this, "_lang", "json");
@@ -1463,7 +1472,7 @@ class Ze extends w {
1463
1472
  constructor(e) {
1464
1473
  super(e);
1465
1474
  n(this, "_autoPlay", !0);
1466
- e && "auto_play" in e && (this._autoPlay = W(e.auto_play));
1475
+ e && "auto_play" in e && (this._autoPlay = T(e.auto_play));
1467
1476
  }
1468
1477
  get autoPlay() {
1469
1478
  return this._autoPlay;
@@ -1499,7 +1508,7 @@ class $ {
1499
1508
  this._widgetClass = Pe;
1500
1509
  break;
1501
1510
  case "label":
1502
- this._widgetClass = K;
1511
+ this._widgetClass = Z;
1503
1512
  break;
1504
1513
  case "char":
1505
1514
  this._widgetClass = A;
@@ -1508,7 +1517,7 @@ class $ {
1508
1517
  this._widgetClass = G;
1509
1518
  break;
1510
1519
  case "button":
1511
- this._widgetClass = Z;
1520
+ this._widgetClass = ee;
1512
1521
  break;
1513
1522
  case "buttonGroup":
1514
1523
  this._widgetClass = Te;
@@ -1520,7 +1529,7 @@ class $ {
1520
1529
  this._widgetClass = We;
1521
1530
  break;
1522
1531
  case "boolean":
1523
- this._widgetClass = ee;
1532
+ this._widgetClass = te;
1524
1533
  break;
1525
1534
  case "integer":
1526
1535
  this._widgetClass = Ee;
@@ -1546,10 +1555,10 @@ class $ {
1546
1555
  case "many2many":
1547
1556
  case "one2many":
1548
1557
  case "one2many_list":
1549
- this._widgetClass = te;
1558
+ this._widgetClass = ie;
1550
1559
  break;
1551
1560
  case "newline":
1552
- this._widgetClass = U;
1561
+ this._widgetClass = K;
1553
1562
  break;
1554
1563
  case "separator":
1555
1564
  this._widgetClass = je;
@@ -1591,7 +1600,7 @@ class $ {
1591
1600
  this._widgetClass = qe;
1592
1601
  break;
1593
1602
  case "multicheckbox":
1594
- this._widgetClass = ie;
1603
+ this._widgetClass = se;
1595
1604
  break;
1596
1605
  case "switch":
1597
1606
  this._widgetClass = Je;
@@ -1600,7 +1609,7 @@ class $ {
1600
1609
  this._widgetClass = He;
1601
1610
  break;
1602
1611
  case "codeeditor":
1603
- this._widgetClass = se;
1612
+ this._widgetClass = ne;
1604
1613
  break;
1605
1614
  case "time":
1606
1615
  this._widgetClass = Qe;
@@ -1615,10 +1624,10 @@ class $ {
1615
1624
  this._widgetClass = Ue;
1616
1625
  break;
1617
1626
  case "json":
1618
- this._widgetClass = J;
1627
+ this._widgetClass = H;
1619
1628
  break;
1620
1629
  case "arrow_steps":
1621
- this._widgetClass = J;
1630
+ this._widgetClass = H;
1622
1631
  break;
1623
1632
  case "spinner":
1624
1633
  this._widgetClass = L;
@@ -1693,7 +1702,7 @@ function st({
1693
1702
  const s = ((r = e[t]) == null ? void 0 : r.type) || "passthrough";
1694
1703
  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);
1695
1704
  }
1696
- const ne = ({
1705
+ const re = ({
1697
1706
  context: i,
1698
1707
  values: t,
1699
1708
  fields: e
@@ -1701,9 +1710,9 @@ const ne = ({
1701
1710
  try {
1702
1711
  if (!i)
1703
1712
  return;
1704
- if (ae(i) || typeof i != "string")
1713
+ if (le(i) || typeof i != "string")
1705
1714
  return i;
1706
- const s = re(i);
1715
+ const s = ae(i);
1707
1716
  if (s !== null)
1708
1717
  return s;
1709
1718
  if (i.trim().length === 0)
@@ -1730,21 +1739,21 @@ const ne = ({
1730
1739
  }, Tt = (i) => {
1731
1740
  const t = [];
1732
1741
  try {
1733
- 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) => {
1742
+ 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) => {
1734
1743
  !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1735
1744
  }), t);
1736
1745
  } catch {
1737
1746
  }
1738
1747
  return t;
1739
1748
  };
1740
- function re(i) {
1749
+ function ae(i) {
1741
1750
  try {
1742
1751
  return JSON.parse(i.replace(/'/g, '"'));
1743
1752
  } catch {
1744
1753
  return null;
1745
1754
  }
1746
1755
  }
1747
- function ae(i) {
1756
+ function le(i) {
1748
1757
  return typeof i == "object" && i !== null && typeof i != "string";
1749
1758
  }
1750
1759
  const nt = (i) => {
@@ -1908,7 +1917,7 @@ class Wt {
1908
1917
  `Field ${x} doesn't exist in fields defintion`
1909
1918
  );
1910
1919
  _ = this._fields[x].type, o.widget_props = {
1911
- ...X(o.widget_props),
1920
+ ...U(o.widget_props),
1912
1921
  ...this._fields[x].widget_props || {}
1913
1922
  };
1914
1923
  }
@@ -1933,7 +1942,7 @@ class Wt {
1933
1942
  values: s,
1934
1943
  fields: this._fields
1935
1944
  });
1936
- const c = ne({
1945
+ const c = re({
1937
1946
  context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
1938
1947
  values: s,
1939
1948
  fields: this._fields
@@ -1942,7 +1951,7 @@ class Wt {
1942
1951
  h.on_change
1943
1952
  ));
1944
1953
  let m;
1945
- 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;
1954
+ 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;
1946
1955
  const p = {
1947
1956
  ...d,
1948
1957
  ...g,
@@ -1956,7 +1965,7 @@ class Wt {
1956
1965
  fields: u,
1957
1966
  container: y.container,
1958
1967
  values: s
1959
- }), y instanceof Z && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1968
+ }), y instanceof ee && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1960
1969
  });
1961
1970
  }
1962
1971
  /**
@@ -1967,7 +1976,7 @@ class Wt {
1967
1976
  return this.container.findById(t);
1968
1977
  }
1969
1978
  }
1970
- function H(i) {
1979
+ function Q(i) {
1971
1980
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
1972
1981
  }
1973
1982
  class It {
@@ -2056,7 +2065,7 @@ class It {
2056
2065
  throw new Error(`Field ${u} doesn't exist in fields defintion`);
2057
2066
  const d = this._fields[u];
2058
2067
  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;
2059
- const g = ne({
2068
+ const g = re({
2060
2069
  context: l.context || d.context,
2061
2070
  values: {},
2062
2071
  fields: this._fields
@@ -2072,7 +2081,7 @@ class It {
2072
2081
  const d = s.createWidget(o, h);
2073
2082
  this._columns.push(d);
2074
2083
  }
2075
- W(h.autorefresh) && this._autorefreshableFields.push(u);
2084
+ T(h.autorefresh) && this._autorefreshableFields.push(u);
2076
2085
  }
2077
2086
  });
2078
2087
  }
@@ -2203,7 +2212,7 @@ class Vt {
2203
2212
  return this._items;
2204
2213
  }
2205
2214
  }
2206
- class le {
2215
+ class oe {
2207
2216
  constructor(t) {
2208
2217
  n(this, "_string", null);
2209
2218
  n(this, "_type");
@@ -2231,7 +2240,7 @@ class le {
2231
2240
  return this._y_range;
2232
2241
  }
2233
2242
  }
2234
- class oe extends le {
2243
+ class ce extends oe {
2235
2244
  constructor(e, s) {
2236
2245
  super(s);
2237
2246
  n(this, "_color", null);
@@ -2239,7 +2248,7 @@ class oe extends le {
2239
2248
  n(this, "_totalDomain", null);
2240
2249
  n(this, "_showPercent", !1);
2241
2250
  n(this, "_suffix", null);
2242
- 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 = W(s.attributes.showPercent);
2251
+ 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 = T(s.attributes.showPercent);
2243
2252
  }
2244
2253
  get color() {
2245
2254
  return this._color;
@@ -2257,7 +2266,7 @@ class oe extends le {
2257
2266
  return this._suffix;
2258
2267
  }
2259
2268
  }
2260
- class ot extends oe {
2269
+ class ot extends ce {
2261
2270
  constructor(e, s) {
2262
2271
  super(e, s);
2263
2272
  n(this, "_field");
@@ -2307,7 +2316,7 @@ const ct = (i) => {
2307
2316
  y: t
2308
2317
  };
2309
2318
  };
2310
- class j extends le {
2319
+ class j extends oe {
2311
2320
  constructor(e, s) {
2312
2321
  super(s);
2313
2322
  n(this, "_x");
@@ -2324,7 +2333,7 @@ class j extends le {
2324
2333
  }
2325
2334
  }
2326
2335
  const ut = {
2327
- indicator: oe,
2336
+ indicator: ce,
2328
2337
  indicatorField: ot,
2329
2338
  line: j,
2330
2339
  bar: j,
@@ -2338,7 +2347,7 @@ const ut = {
2338
2347
  throw new Error(`${e} not found as a GraphModel`);
2339
2348
  return new s(e, t);
2340
2349
  };
2341
- class ce {
2350
+ class ue {
2342
2351
  constructor({ name: t, axis: e }) {
2343
2352
  n(this, "_name");
2344
2353
  n(this, "_axis");
@@ -2351,7 +2360,7 @@ class ce {
2351
2360
  return this._axis;
2352
2361
  }
2353
2362
  }
2354
- class dt extends ce {
2363
+ class dt extends ue {
2355
2364
  constructor({
2356
2365
  name: e,
2357
2366
  operator: s,
@@ -2374,7 +2383,7 @@ class dt extends ce {
2374
2383
  return this._stacked;
2375
2384
  }
2376
2385
  }
2377
- class ht extends ce {
2386
+ class ht extends ue {
2378
2387
  constructor({ name: t }) {
2379
2388
  super({ name: t, axis: "x" });
2380
2389
  }
@@ -2427,7 +2436,7 @@ function gt({
2427
2436
  interval: e = 1
2428
2437
  }) {
2429
2438
  let s = [];
2430
- const r = de({
2439
+ const r = he({
2431
2440
  values: i,
2432
2441
  groupBy: "type-stacked"
2433
2442
  }), a = `${t}s`;
@@ -2438,7 +2447,7 @@ function gt({
2438
2447
  if (s.push(h), _ === u.length - 1)
2439
2448
  return;
2440
2449
  const d = h.x, g = u[_ + 1].x;
2441
- if (!ue([d, g], a)) {
2450
+ if (!de([d, g], a)) {
2442
2451
  const c = mt({
2443
2452
  dates: [d, g],
2444
2453
  timerange: t,
@@ -2467,11 +2476,11 @@ function mt({
2467
2476
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2468
2477
  for (let l = 0; l < a.length - 1; l++) {
2469
2478
  const o = a[l], u = a[l + 1];
2470
- if (!ue([o, u], r)) {
2471
- const _ = T(o, z(r)).add(
2479
+ if (!de([o, u], r)) {
2480
+ const _ = W(o, z(r)).add(
2472
2481
  e,
2473
2482
  r
2474
- ), h = T(u, z(r));
2483
+ ), h = W(u, z(r));
2475
2484
  for (; _.isBefore(h); )
2476
2485
  s.push(_.format(z(r))), _.add(e, r);
2477
2486
  }
@@ -2485,7 +2494,7 @@ function bt({
2485
2494
  const e = yt({
2486
2495
  values: i,
2487
2496
  timerange: t
2488
- }), s = [], r = de({
2497
+ }), s = [], r = he({
2489
2498
  values: e,
2490
2499
  groupBy: "all"
2491
2500
  });
@@ -2517,7 +2526,7 @@ function pt({
2517
2526
  timerange: t
2518
2527
  }) {
2519
2528
  let e = xt(i);
2520
- const s = T(i, e);
2529
+ const s = W(i, e);
2521
2530
  switch (t) {
2522
2531
  case "hour": {
2523
2532
  e = "YYYY-MM-DD HH:00";
@@ -2545,7 +2554,7 @@ function pt({
2545
2554
  function xt(i) {
2546
2555
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2547
2556
  }
2548
- function ue(i, t) {
2557
+ function de(i, t) {
2549
2558
  let e = !1;
2550
2559
  const s = z(t);
2551
2560
  if (i.length === 0)
@@ -2553,12 +2562,12 @@ function ue(i, t) {
2553
2562
  if (i.length === 1)
2554
2563
  return !0;
2555
2564
  for (let r = 0; r < i.length - 1; r++) {
2556
- const a = T(i[r], s), o = T(i[r + 1], s).diff(a, t);
2565
+ const a = W(i[r], s), o = W(i[r + 1], s).diff(a, t);
2557
2566
  Math.abs(o) === 1 ? e = !0 : e = !1;
2558
2567
  }
2559
2568
  return e;
2560
2569
  }
2561
- function de({
2570
+ function he({
2562
2571
  values: i,
2563
2572
  groupBy: t
2564
2573
  }) {
@@ -2612,17 +2621,17 @@ const wt = {
2612
2621
  fields: e
2613
2622
  });
2614
2623
  Object.keys(v).forEach((F) => {
2615
- const x = v[F].entries, E = v[F].label, fe = N({
2624
+ const x = v[F].entries, E = v[F].label, ge = N({
2616
2625
  entries: x,
2617
2626
  fields: e,
2618
2627
  fieldName: c.name
2619
- }), ge = Y({
2620
- values: fe,
2628
+ }), me = Y({
2629
+ values: ge,
2621
2630
  operator: c.operator
2622
2631
  });
2623
2632
  a.push({
2624
2633
  x: p || !1,
2625
- value: ge,
2634
+ value: me,
2626
2635
  type: E,
2627
2636
  operator: c.operator,
2628
2637
  stacked: c.stacked
@@ -2640,7 +2649,7 @@ const wt = {
2640
2649
  a.push({
2641
2650
  x: p || !1,
2642
2651
  value: F,
2643
- type: he({
2652
+ type: _e({
2644
2653
  yAxis: c,
2645
2654
  fields: e
2646
2655
  }),
@@ -2671,7 +2680,7 @@ const wt = {
2671
2680
  if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2672
2681
  mode: i.y_range
2673
2682
  }, i.y_range === "auto")) {
2674
- const { min: c, max: m } = _e(d);
2683
+ const { min: c, max: m } = fe(d);
2675
2684
  g.yAxisOpts.valueOpts = { min: c, max: m };
2676
2685
  }
2677
2686
  return g;
@@ -2747,14 +2756,14 @@ function Ft(i) {
2747
2756
  t = t.concat(s.entries);
2748
2757
  }), t;
2749
2758
  }
2750
- function he({
2759
+ function _e({
2751
2760
  yAxis: i,
2752
2761
  fields: t
2753
2762
  }) {
2754
2763
  const e = t[i.name];
2755
2764
  return e != null && e.string ? e.string : i.name;
2756
2765
  }
2757
- function _e(i, t = 0.1) {
2766
+ function fe(i, t = 0.1) {
2758
2767
  if (i.length === 0)
2759
2768
  throw new Error("The values array cannot be empty.");
2760
2769
  const e = i.map((l) => l.value), s = Math.min(...e), r = Math.max(...e), a = (r - s) * t;
@@ -2766,11 +2775,11 @@ function _e(i, t = 0.1) {
2766
2775
  const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2767
2776
  __proto__: null,
2768
2777
  getAllObjectsInGroupedValues: Ft,
2769
- getMinMax: _e,
2778
+ getMinMax: fe,
2770
2779
  getValueForOperator: Y,
2771
2780
  getValuesForYField: N,
2772
2781
  getValuesGroupedByField: B,
2773
- getYAxisFieldname: he,
2782
+ getYAxisFieldname: _e,
2774
2783
  labelsForOperator: wt,
2775
2784
  processGraphData: vt
2776
2785
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2778,12 +2787,12 @@ export {
2778
2787
  Xe as Alert,
2779
2788
  ke as Avatar,
2780
2789
  Ae as Binary,
2781
- ee as Boolean,
2782
- Z as Button,
2790
+ te as Boolean,
2791
+ ee as Button,
2783
2792
  Te as ButtonGroup,
2784
2793
  Ze as Carousel,
2785
2794
  A as Char,
2786
- se as CodeEditor,
2795
+ ne as CodeEditor,
2787
2796
  et as ColorPicker,
2788
2797
  Ue as Comments,
2789
2798
  V as Container,
@@ -2797,10 +2806,10 @@ export {
2797
2806
  R as Float,
2798
2807
  Se as FloatTime,
2799
2808
  Wt as Form,
2800
- le as Graph,
2801
- ce as GraphAxis,
2809
+ oe as Graph,
2810
+ ue as GraphAxis,
2802
2811
  j as GraphChart,
2803
- oe as GraphIndicator,
2812
+ ce as GraphIndicator,
2804
2813
  ot as GraphIndicatorField,
2805
2814
  ht as GraphXAxis,
2806
2815
  dt as GraphYAxis,
@@ -2809,14 +2818,14 @@ export {
2809
2818
  Ne as Image,
2810
2819
  Ge as Indicator,
2811
2820
  Ee as Integer,
2812
- J as JSONField,
2813
- K as Label,
2821
+ H as JSONField,
2822
+ Z as Label,
2814
2823
  We as Many2one,
2815
2824
  Ie as Markdown,
2816
- ie as MultiCheckbox,
2817
- U as NewLine,
2825
+ se as MultiCheckbox,
2826
+ K as NewLine,
2818
2827
  M as Notebook,
2819
- te as One2many,
2828
+ ie as One2many,
2820
2829
  Oe as Page,
2821
2830
  Ve as ProgressBar,
2822
2831
  qe as Radio,
@@ -2837,7 +2846,7 @@ export {
2837
2846
  C as Widget,
2838
2847
  Dt as graphFieldUtils,
2839
2848
  jt as graphProcessor,
2840
- ne as parseContext,
2849
+ re as parseContext,
2841
2850
  Tt as parseContextFields,
2842
2851
  zt as parseDomainFields,
2843
2852
  Yt as parseGraph,