@gisce/ooui 2.28.0-alpha.1 → 2.28.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.
package/dist/ooui.es.js CHANGED
@@ -1,17 +1,17 @@
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";
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";
6
6
  import * as D from "txml";
7
- import T from "moment";
8
- const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve = ({
7
+ import W from "moment";
8
+ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we = ({
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 = X({
14
+ const o = Q({
15
15
  fieldName: s,
16
16
  valueInObject: l,
17
17
  expectedValue: a,
@@ -41,7 +41,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, b = (i) => pe(i, { level: "xml" }), X = ({
44
+ }, b = (i) => ye(i, { level: "xml" }), Q = ({
45
45
  fieldName: i,
46
46
  valueInObject: t,
47
47
  expectedValue: e,
@@ -61,7 +61,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
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
- }, J = ({
64
+ }, ve = ({
65
65
  attrs: i,
66
66
  values: t,
67
67
  fields: e,
@@ -69,11 +69,11 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
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) => ve({ entry: y, values: t, fields: e })).every((y) => y);
72
+ const p = h[g].map((y) => we({ 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
- }, U = (i) => {
76
+ }, X = (i) => {
77
77
  if (i === void 0)
78
78
  return {};
79
79
  if (typeof i == "string")
@@ -95,14 +95,14 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
95
95
  r.replace(/'/g, '"')
96
96
  ), l = {};
97
97
  for (const o of Object.keys(a)) {
98
- const u = xe({
98
+ const u = pe({
99
99
  object: t,
100
100
  condition: a[o],
101
101
  evaluateFieldComparison: ({
102
102
  fieldName: _,
103
103
  valueInObject: h,
104
104
  expectedValue: d
105
- }) => X({
105
+ }) => Q({
106
106
  fieldName: _,
107
107
  valueInObject: h,
108
108
  expectedValue: d,
@@ -124,8 +124,13 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
124
124
  widgetType: s,
125
125
  fallbackMode: r = !0
126
126
  }) => {
127
- let a = {};
128
- if (i.json_attrs)
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)
129
134
  try {
130
135
  a = Fe({
131
136
  attrs: i.json_attrs,
@@ -133,31 +138,21 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
133
138
  fields: e,
134
139
  widgetType: s
135
140
  });
136
- } catch (l) {
141
+ } catch (o) {
137
142
  if (r && i.attrs)
138
- a = J({
139
- attrs: i.attrs,
140
- values: t,
141
- fields: e,
142
- widgetType: s
143
- });
143
+ a = l;
144
144
  else
145
- throw l;
145
+ throw o;
146
146
  }
147
147
  else
148
- i.attrs && (a = J({
149
- attrs: i.attrs,
150
- values: t,
151
- fields: e,
152
- widgetType: s
153
- }));
148
+ i.attrs && (a = l);
154
149
  return {
155
150
  ...i,
156
151
  ...a,
157
152
  attrs: void 0,
158
153
  json_attrs: void 0
159
154
  };
160
- }, W = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", k = class k {
155
+ }, T = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", k = class k {
161
156
  constructor(t) {
162
157
  /**
163
158
  * Determines if widget is read only (default is undefined)
@@ -193,7 +188,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
193
188
  * Base type of the field
194
189
  */
195
190
  n(this, "_fieldType", "");
196
- 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 = U(t.widget_props)), t.key && (this._key = t.key), t.is_function && (this._isFunction = t.is_function));
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));
197
192
  }
198
193
  static get defaultColspan() {
199
194
  return k._defaultColspan;
@@ -311,7 +306,7 @@ class f extends C {
311
306
  */
312
307
  n(this, "_selectionValues", /* @__PURE__ */ new Map([]));
313
308
  n(this, "_autoRefresh", !1);
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 = W(e.autorefresh)));
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)));
315
310
  }
316
311
  get id() {
317
312
  return this._id;
@@ -395,12 +390,12 @@ class f extends C {
395
390
  }
396
391
  class ke extends f {
397
392
  }
398
- class K extends C {
393
+ class U extends C {
399
394
  findById(t) {
400
395
  return null;
401
396
  }
402
397
  }
403
- class Z extends f {
398
+ class K extends f {
404
399
  constructor(e) {
405
400
  super({ ...e, nolabel: !0 });
406
401
  /**
@@ -449,6 +444,10 @@ class Z extends f {
449
444
  set labelSize(e) {
450
445
  this._labelSize = e;
451
446
  }
447
+ get humanDate() {
448
+ var e;
449
+ return T(((e = this._parsedWidgetProps) == null ? void 0 : e.human_date) ?? !1);
450
+ }
452
451
  get fieldForLabel() {
453
452
  return this._fieldForLabel;
454
453
  }
@@ -523,13 +522,13 @@ class V {
523
522
  }
524
523
  addWidget(t, e) {
525
524
  const s = [], r = e ? e.addLabel : !0;
526
- if (t instanceof K) {
525
+ if (t instanceof U) {
527
526
  this._rows.push([]), this._index++;
528
527
  return;
529
528
  }
530
529
  if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, r && t instanceof f && !t.nolabel) {
531
530
  t.colspan > 1 && (t.colspan -= 1);
532
- const l = new Z({
531
+ const l = new K({
533
532
  name: t.id + "_label",
534
533
  string: t.label,
535
534
  invisible: t.invisible,
@@ -709,7 +708,7 @@ class Pe extends L {
709
708
  this._height = e;
710
709
  }
711
710
  }
712
- class ee extends f {
711
+ class Z extends f {
713
712
  constructor(e) {
714
713
  super({
715
714
  ...e,
@@ -963,7 +962,7 @@ class We extends f {
963
962
  }
964
963
  class Ie extends G {
965
964
  }
966
- class te extends f {
965
+ class ee extends f {
967
966
  constructor(t) {
968
967
  super(t);
969
968
  }
@@ -1022,7 +1021,7 @@ class De extends f {
1022
1021
  super(t);
1023
1022
  }
1024
1023
  }
1025
- class ie extends f {
1024
+ class te extends f {
1026
1025
  constructor(e) {
1027
1026
  super(e);
1028
1027
  /**
@@ -1171,7 +1170,7 @@ class Be extends f {
1171
1170
  super(t);
1172
1171
  }
1173
1172
  }
1174
- class Le extends ie {
1173
+ class Le extends te {
1175
1174
  constructor(e) {
1176
1175
  super(e);
1177
1176
  /**
@@ -1253,7 +1252,7 @@ class Ge extends I {
1253
1252
  this._height = e;
1254
1253
  }
1255
1254
  }
1256
- class se extends f {
1255
+ class ie extends f {
1257
1256
  constructor(e) {
1258
1257
  super(e);
1259
1258
  /**
@@ -1306,7 +1305,7 @@ class se extends f {
1306
1305
  this._columns = e;
1307
1306
  }
1308
1307
  }
1309
- class Re extends se {
1308
+ class Re extends ie {
1310
1309
  }
1311
1310
  class $e extends I {
1312
1311
  get colors() {
@@ -1329,7 +1328,7 @@ class qe extends I {
1329
1328
  this._direction = e;
1330
1329
  }
1331
1330
  }
1332
- class Je extends te {
1331
+ class Je extends ee {
1333
1332
  }
1334
1333
  class He extends f {
1335
1334
  constructor(e) {
@@ -1361,7 +1360,7 @@ class He extends f {
1361
1360
  this._lastStep = e;
1362
1361
  }
1363
1362
  }
1364
- class ne extends G {
1363
+ class se extends G {
1365
1364
  constructor(e) {
1366
1365
  super(e);
1367
1366
  n(this, "_lang", null);
@@ -1438,7 +1437,7 @@ class Ue extends f {
1438
1437
  this._height = e;
1439
1438
  }
1440
1439
  }
1441
- class H extends ne {
1440
+ class J extends se {
1442
1441
  constructor() {
1443
1442
  super(...arguments);
1444
1443
  n(this, "_lang", "json");
@@ -1468,7 +1467,7 @@ class Ze extends w {
1468
1467
  constructor(e) {
1469
1468
  super(e);
1470
1469
  n(this, "_autoPlay", !0);
1471
- e && "auto_play" in e && (this._autoPlay = W(e.auto_play));
1470
+ e && "auto_play" in e && (this._autoPlay = T(e.auto_play));
1472
1471
  }
1473
1472
  get autoPlay() {
1474
1473
  return this._autoPlay;
@@ -1504,7 +1503,7 @@ class $ {
1504
1503
  this._widgetClass = Pe;
1505
1504
  break;
1506
1505
  case "label":
1507
- this._widgetClass = Z;
1506
+ this._widgetClass = K;
1508
1507
  break;
1509
1508
  case "char":
1510
1509
  this._widgetClass = A;
@@ -1513,7 +1512,7 @@ class $ {
1513
1512
  this._widgetClass = G;
1514
1513
  break;
1515
1514
  case "button":
1516
- this._widgetClass = ee;
1515
+ this._widgetClass = Z;
1517
1516
  break;
1518
1517
  case "buttonGroup":
1519
1518
  this._widgetClass = Te;
@@ -1525,7 +1524,7 @@ class $ {
1525
1524
  this._widgetClass = We;
1526
1525
  break;
1527
1526
  case "boolean":
1528
- this._widgetClass = te;
1527
+ this._widgetClass = ee;
1529
1528
  break;
1530
1529
  case "integer":
1531
1530
  this._widgetClass = Ee;
@@ -1551,10 +1550,10 @@ class $ {
1551
1550
  case "many2many":
1552
1551
  case "one2many":
1553
1552
  case "one2many_list":
1554
- this._widgetClass = ie;
1553
+ this._widgetClass = te;
1555
1554
  break;
1556
1555
  case "newline":
1557
- this._widgetClass = K;
1556
+ this._widgetClass = U;
1558
1557
  break;
1559
1558
  case "separator":
1560
1559
  this._widgetClass = je;
@@ -1596,7 +1595,7 @@ class $ {
1596
1595
  this._widgetClass = qe;
1597
1596
  break;
1598
1597
  case "multicheckbox":
1599
- this._widgetClass = se;
1598
+ this._widgetClass = ie;
1600
1599
  break;
1601
1600
  case "switch":
1602
1601
  this._widgetClass = Je;
@@ -1605,7 +1604,7 @@ class $ {
1605
1604
  this._widgetClass = He;
1606
1605
  break;
1607
1606
  case "codeeditor":
1608
- this._widgetClass = ne;
1607
+ this._widgetClass = se;
1609
1608
  break;
1610
1609
  case "time":
1611
1610
  this._widgetClass = Qe;
@@ -1620,10 +1619,10 @@ class $ {
1620
1619
  this._widgetClass = Ue;
1621
1620
  break;
1622
1621
  case "json":
1623
- this._widgetClass = H;
1622
+ this._widgetClass = J;
1624
1623
  break;
1625
1624
  case "arrow_steps":
1626
- this._widgetClass = H;
1625
+ this._widgetClass = J;
1627
1626
  break;
1628
1627
  case "spinner":
1629
1628
  this._widgetClass = L;
@@ -1698,7 +1697,7 @@ function st({
1698
1697
  const s = ((r = e[t]) == null ? void 0 : r.type) || "passthrough";
1699
1698
  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);
1700
1699
  }
1701
- const re = ({
1700
+ const ne = ({
1702
1701
  context: i,
1703
1702
  values: t,
1704
1703
  fields: e
@@ -1706,9 +1705,9 @@ const re = ({
1706
1705
  try {
1707
1706
  if (!i)
1708
1707
  return;
1709
- if (le(i) || typeof i != "string")
1708
+ if (ae(i) || typeof i != "string")
1710
1709
  return i;
1711
- const s = ae(i);
1710
+ const s = re(i);
1712
1711
  if (s !== null)
1713
1712
  return s;
1714
1713
  if (i.trim().length === 0)
@@ -1735,21 +1734,21 @@ const re = ({
1735
1734
  }, Tt = (i) => {
1736
1735
  const t = [];
1737
1736
  try {
1738
- 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) => {
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) => {
1739
1738
  !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1740
1739
  }), t);
1741
1740
  } catch {
1742
1741
  }
1743
1742
  return t;
1744
1743
  };
1745
- function ae(i) {
1744
+ function re(i) {
1746
1745
  try {
1747
1746
  return JSON.parse(i.replace(/'/g, '"'));
1748
1747
  } catch {
1749
1748
  return null;
1750
1749
  }
1751
1750
  }
1752
- function le(i) {
1751
+ function ae(i) {
1753
1752
  return typeof i == "object" && i !== null && typeof i != "string";
1754
1753
  }
1755
1754
  const nt = (i) => {
@@ -1913,7 +1912,7 @@ class Wt {
1913
1912
  `Field ${x} doesn't exist in fields defintion`
1914
1913
  );
1915
1914
  _ = this._fields[x].type, o.widget_props = {
1916
- ...U(o.widget_props),
1915
+ ...X(o.widget_props),
1917
1916
  ...this._fields[x].widget_props || {}
1918
1917
  };
1919
1918
  }
@@ -1938,7 +1937,7 @@ class Wt {
1938
1937
  values: s,
1939
1938
  fields: this._fields
1940
1939
  });
1941
- const c = re({
1940
+ const c = ne({
1942
1941
  context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
1943
1942
  values: s,
1944
1943
  fields: this._fields
@@ -1947,7 +1946,7 @@ class Wt {
1947
1946
  h.on_change
1948
1947
  ));
1949
1948
  let m;
1950
- 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;
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;
1951
1950
  const p = {
1952
1951
  ...d,
1953
1952
  ...g,
@@ -1961,7 +1960,7 @@ class Wt {
1961
1960
  fields: u,
1962
1961
  container: y.container,
1963
1962
  values: s
1964
- }), y instanceof ee && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1963
+ }), y instanceof Z && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1965
1964
  });
1966
1965
  }
1967
1966
  /**
@@ -1972,7 +1971,7 @@ class Wt {
1972
1971
  return this.container.findById(t);
1973
1972
  }
1974
1973
  }
1975
- function Q(i) {
1974
+ function H(i) {
1976
1975
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
1977
1976
  }
1978
1977
  class It {
@@ -2061,7 +2060,7 @@ class It {
2061
2060
  throw new Error(`Field ${u} doesn't exist in fields defintion`);
2062
2061
  const d = this._fields[u];
2063
2062
  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;
2064
- const g = re({
2063
+ const g = ne({
2065
2064
  context: l.context || d.context,
2066
2065
  values: {},
2067
2066
  fields: this._fields
@@ -2077,7 +2076,7 @@ class It {
2077
2076
  const d = s.createWidget(o, h);
2078
2077
  this._columns.push(d);
2079
2078
  }
2080
- W(h.autorefresh) && this._autorefreshableFields.push(u);
2079
+ T(h.autorefresh) && this._autorefreshableFields.push(u);
2081
2080
  }
2082
2081
  });
2083
2082
  }
@@ -2208,7 +2207,7 @@ class Vt {
2208
2207
  return this._items;
2209
2208
  }
2210
2209
  }
2211
- class oe {
2210
+ class le {
2212
2211
  constructor(t) {
2213
2212
  n(this, "_string", null);
2214
2213
  n(this, "_type");
@@ -2236,7 +2235,7 @@ class oe {
2236
2235
  return this._y_range;
2237
2236
  }
2238
2237
  }
2239
- class ce extends oe {
2238
+ class oe extends le {
2240
2239
  constructor(e, s) {
2241
2240
  super(s);
2242
2241
  n(this, "_color", null);
@@ -2244,7 +2243,7 @@ class ce extends oe {
2244
2243
  n(this, "_totalDomain", null);
2245
2244
  n(this, "_showPercent", !1);
2246
2245
  n(this, "_suffix", null);
2247
- 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);
2246
+ 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);
2248
2247
  }
2249
2248
  get color() {
2250
2249
  return this._color;
@@ -2262,7 +2261,7 @@ class ce extends oe {
2262
2261
  return this._suffix;
2263
2262
  }
2264
2263
  }
2265
- class ot extends ce {
2264
+ class ot extends oe {
2266
2265
  constructor(e, s) {
2267
2266
  super(e, s);
2268
2267
  n(this, "_field");
@@ -2312,7 +2311,7 @@ const ct = (i) => {
2312
2311
  y: t
2313
2312
  };
2314
2313
  };
2315
- class j extends oe {
2314
+ class j extends le {
2316
2315
  constructor(e, s) {
2317
2316
  super(s);
2318
2317
  n(this, "_x");
@@ -2329,7 +2328,7 @@ class j extends oe {
2329
2328
  }
2330
2329
  }
2331
2330
  const ut = {
2332
- indicator: ce,
2331
+ indicator: oe,
2333
2332
  indicatorField: ot,
2334
2333
  line: j,
2335
2334
  bar: j,
@@ -2343,7 +2342,7 @@ const ut = {
2343
2342
  throw new Error(`${e} not found as a GraphModel`);
2344
2343
  return new s(e, t);
2345
2344
  };
2346
- class ue {
2345
+ class ce {
2347
2346
  constructor({ name: t, axis: e }) {
2348
2347
  n(this, "_name");
2349
2348
  n(this, "_axis");
@@ -2356,7 +2355,7 @@ class ue {
2356
2355
  return this._axis;
2357
2356
  }
2358
2357
  }
2359
- class dt extends ue {
2358
+ class dt extends ce {
2360
2359
  constructor({
2361
2360
  name: e,
2362
2361
  operator: s,
@@ -2379,7 +2378,7 @@ class dt extends ue {
2379
2378
  return this._stacked;
2380
2379
  }
2381
2380
  }
2382
- class ht extends ue {
2381
+ class ht extends ce {
2383
2382
  constructor({ name: t }) {
2384
2383
  super({ name: t, axis: "x" });
2385
2384
  }
@@ -2432,7 +2431,7 @@ function gt({
2432
2431
  interval: e = 1
2433
2432
  }) {
2434
2433
  let s = [];
2435
- const r = he({
2434
+ const r = de({
2436
2435
  values: i,
2437
2436
  groupBy: "type-stacked"
2438
2437
  }), a = `${t}s`;
@@ -2443,7 +2442,7 @@ function gt({
2443
2442
  if (s.push(h), _ === u.length - 1)
2444
2443
  return;
2445
2444
  const d = h.x, g = u[_ + 1].x;
2446
- if (!de([d, g], a)) {
2445
+ if (!ue([d, g], a)) {
2447
2446
  const c = mt({
2448
2447
  dates: [d, g],
2449
2448
  timerange: t,
@@ -2472,11 +2471,11 @@ function mt({
2472
2471
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2473
2472
  for (let l = 0; l < a.length - 1; l++) {
2474
2473
  const o = a[l], u = a[l + 1];
2475
- if (!de([o, u], r)) {
2476
- const _ = T(o, z(r)).add(
2474
+ if (!ue([o, u], r)) {
2475
+ const _ = W(o, z(r)).add(
2477
2476
  e,
2478
2477
  r
2479
- ), h = T(u, z(r));
2478
+ ), h = W(u, z(r));
2480
2479
  for (; _.isBefore(h); )
2481
2480
  s.push(_.format(z(r))), _.add(e, r);
2482
2481
  }
@@ -2490,7 +2489,7 @@ function bt({
2490
2489
  const e = yt({
2491
2490
  values: i,
2492
2491
  timerange: t
2493
- }), s = [], r = he({
2492
+ }), s = [], r = de({
2494
2493
  values: e,
2495
2494
  groupBy: "all"
2496
2495
  });
@@ -2522,7 +2521,7 @@ function pt({
2522
2521
  timerange: t
2523
2522
  }) {
2524
2523
  let e = xt(i);
2525
- const s = T(i, e);
2524
+ const s = W(i, e);
2526
2525
  switch (t) {
2527
2526
  case "hour": {
2528
2527
  e = "YYYY-MM-DD HH:00";
@@ -2550,7 +2549,7 @@ function pt({
2550
2549
  function xt(i) {
2551
2550
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2552
2551
  }
2553
- function de(i, t) {
2552
+ function ue(i, t) {
2554
2553
  let e = !1;
2555
2554
  const s = z(t);
2556
2555
  if (i.length === 0)
@@ -2558,12 +2557,12 @@ function de(i, t) {
2558
2557
  if (i.length === 1)
2559
2558
  return !0;
2560
2559
  for (let r = 0; r < i.length - 1; r++) {
2561
- const a = T(i[r], s), o = T(i[r + 1], s).diff(a, t);
2560
+ const a = W(i[r], s), o = W(i[r + 1], s).diff(a, t);
2562
2561
  Math.abs(o) === 1 ? e = !0 : e = !1;
2563
2562
  }
2564
2563
  return e;
2565
2564
  }
2566
- function he({
2565
+ function de({
2567
2566
  values: i,
2568
2567
  groupBy: t
2569
2568
  }) {
@@ -2617,17 +2616,17 @@ const wt = {
2617
2616
  fields: e
2618
2617
  });
2619
2618
  Object.keys(v).forEach((F) => {
2620
- const x = v[F].entries, E = v[F].label, ge = N({
2619
+ const x = v[F].entries, E = v[F].label, fe = N({
2621
2620
  entries: x,
2622
2621
  fields: e,
2623
2622
  fieldName: c.name
2624
- }), me = Y({
2625
- values: ge,
2623
+ }), ge = Y({
2624
+ values: fe,
2626
2625
  operator: c.operator
2627
2626
  });
2628
2627
  a.push({
2629
2628
  x: p || !1,
2630
- value: me,
2629
+ value: ge,
2631
2630
  type: E,
2632
2631
  operator: c.operator,
2633
2632
  stacked: c.stacked
@@ -2645,7 +2644,7 @@ const wt = {
2645
2644
  a.push({
2646
2645
  x: p || !1,
2647
2646
  value: F,
2648
- type: _e({
2647
+ type: he({
2649
2648
  yAxis: c,
2650
2649
  fields: e
2651
2650
  }),
@@ -2676,7 +2675,7 @@ const wt = {
2676
2675
  if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2677
2676
  mode: i.y_range
2678
2677
  }, i.y_range === "auto")) {
2679
- const { min: c, max: m } = fe(d);
2678
+ const { min: c, max: m } = _e(d);
2680
2679
  g.yAxisOpts.valueOpts = { min: c, max: m };
2681
2680
  }
2682
2681
  return g;
@@ -2752,14 +2751,14 @@ function Ft(i) {
2752
2751
  t = t.concat(s.entries);
2753
2752
  }), t;
2754
2753
  }
2755
- function _e({
2754
+ function he({
2756
2755
  yAxis: i,
2757
2756
  fields: t
2758
2757
  }) {
2759
2758
  const e = t[i.name];
2760
2759
  return e != null && e.string ? e.string : i.name;
2761
2760
  }
2762
- function fe(i, t = 0.1) {
2761
+ function _e(i, t = 0.1) {
2763
2762
  if (i.length === 0)
2764
2763
  throw new Error("The values array cannot be empty.");
2765
2764
  const e = i.map((l) => l.value), s = Math.min(...e), r = Math.max(...e), a = (r - s) * t;
@@ -2771,11 +2770,11 @@ function fe(i, t = 0.1) {
2771
2770
  const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2772
2771
  __proto__: null,
2773
2772
  getAllObjectsInGroupedValues: Ft,
2774
- getMinMax: fe,
2773
+ getMinMax: _e,
2775
2774
  getValueForOperator: Y,
2776
2775
  getValuesForYField: N,
2777
2776
  getValuesGroupedByField: B,
2778
- getYAxisFieldname: _e,
2777
+ getYAxisFieldname: he,
2779
2778
  labelsForOperator: wt,
2780
2779
  processGraphData: vt
2781
2780
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2783,12 +2782,12 @@ export {
2783
2782
  Xe as Alert,
2784
2783
  ke as Avatar,
2785
2784
  Ae as Binary,
2786
- te as Boolean,
2787
- ee as Button,
2785
+ ee as Boolean,
2786
+ Z as Button,
2788
2787
  Te as ButtonGroup,
2789
2788
  Ze as Carousel,
2790
2789
  A as Char,
2791
- ne as CodeEditor,
2790
+ se as CodeEditor,
2792
2791
  et as ColorPicker,
2793
2792
  Ue as Comments,
2794
2793
  V as Container,
@@ -2802,10 +2801,10 @@ export {
2802
2801
  R as Float,
2803
2802
  Se as FloatTime,
2804
2803
  Wt as Form,
2805
- oe as Graph,
2806
- ue as GraphAxis,
2804
+ le as Graph,
2805
+ ce as GraphAxis,
2807
2806
  j as GraphChart,
2808
- ce as GraphIndicator,
2807
+ oe as GraphIndicator,
2809
2808
  ot as GraphIndicatorField,
2810
2809
  ht as GraphXAxis,
2811
2810
  dt as GraphYAxis,
@@ -2814,14 +2813,14 @@ export {
2814
2813
  Ne as Image,
2815
2814
  Ge as Indicator,
2816
2815
  Ee as Integer,
2817
- H as JSONField,
2818
- Z as Label,
2816
+ J as JSONField,
2817
+ K as Label,
2819
2818
  We as Many2one,
2820
2819
  Ie as Markdown,
2821
- se as MultiCheckbox,
2822
- K as NewLine,
2820
+ ie as MultiCheckbox,
2821
+ U as NewLine,
2823
2822
  M as Notebook,
2824
- ie as One2many,
2823
+ te as One2many,
2825
2824
  Oe as Page,
2826
2825
  Ve as ProgressBar,
2827
2826
  qe as Radio,
@@ -2842,7 +2841,7 @@ export {
2842
2841
  C as Widget,
2843
2842
  Dt as graphFieldUtils,
2844
2843
  jt as graphProcessor,
2845
- re as parseContext,
2844
+ ne as parseContext,
2846
2845
  Tt as parseContextFields,
2847
2846
  zt as parseDomainFields,
2848
2847
  Yt as parseGraph,