@gisce/ooui 2.28.0-alpha.2 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"attributeParser.d.ts","sourceRoot":"","sources":["../../src/helpers/attributeParser.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,MAAM,WAAW,MAAM,GAAG,OAAO,GAAG,MAAM,YAGtD,CAAC;AAuDF,QAAA,MAAM,eAAe,WAAY,MAAM,KAAG,MAEzC,CAAC;AAwHF,eAAO,MAAM,gBAAgB,iBAAkB,MAAM,GAAG,MAAM,KAAG,MAchE,CAAC;AAEF,eAAO,MAAM,mBAAmB;WAMvB,MAAM;YACL,GAAG;YACH,GAAG;;6BAkDZ,CAAC;AAEF,QAAA,MAAM,kBAAkB;mBAOP,GAAG;YACV,GAAG;YACH,GAAG;;;SAyCZ,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"attributeParser.d.ts","sourceRoot":"","sources":["../../src/helpers/attributeParser.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,MAAM,WAAW,MAAM,GAAG,OAAO,GAAG,MAAM,YAGtD,CAAC;AAuDF,QAAA,MAAM,eAAe,WAAY,MAAM,KAAG,MAEzC,CAAC;AAwHF,eAAO,MAAM,gBAAgB,iBAAkB,MAAM,GAAG,MAAM,KAAG,MAchE,CAAC;AAEF,eAAO,MAAM,mBAAmB;WAMvB,MAAM;YACL,GAAG;YACH,GAAG;;6BAkDZ,CAAC;AAEF,QAAA,MAAM,kBAAkB;mBAOP,GAAG;YACV,GAAG;YACH,GAAG;;;SAwCZ,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC"}
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
7
  import W from "moment";
8
- const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve = ({
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,24 +138,14 @@ 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,
@@ -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 = 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));
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 = T(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
  /**
@@ -527,13 +522,13 @@ class V {
527
522
  }
528
523
  addWidget(t, e) {
529
524
  const s = [], r = e ? e.addLabel : !0;
530
- if (t instanceof K) {
525
+ if (t instanceof U) {
531
526
  this._rows.push([]), this._index++;
532
527
  return;
533
528
  }
534
529
  if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, r && t instanceof f && !t.nolabel) {
535
530
  t.colspan > 1 && (t.colspan -= 1);
536
- const l = new Z({
531
+ const l = new K({
537
532
  name: t.id + "_label",
538
533
  string: t.label,
539
534
  invisible: t.invisible,
@@ -713,7 +708,7 @@ class Pe extends L {
713
708
  this._height = e;
714
709
  }
715
710
  }
716
- class ee extends f {
711
+ class Z extends f {
717
712
  constructor(e) {
718
713
  super({
719
714
  ...e,
@@ -967,7 +962,7 @@ class We extends f {
967
962
  }
968
963
  class Ie extends G {
969
964
  }
970
- class te extends f {
965
+ class ee extends f {
971
966
  constructor(t) {
972
967
  super(t);
973
968
  }
@@ -1026,7 +1021,7 @@ class De extends f {
1026
1021
  super(t);
1027
1022
  }
1028
1023
  }
1029
- class ie extends f {
1024
+ class te extends f {
1030
1025
  constructor(e) {
1031
1026
  super(e);
1032
1027
  /**
@@ -1175,7 +1170,7 @@ class Be extends f {
1175
1170
  super(t);
1176
1171
  }
1177
1172
  }
1178
- class Le extends ie {
1173
+ class Le extends te {
1179
1174
  constructor(e) {
1180
1175
  super(e);
1181
1176
  /**
@@ -1257,7 +1252,7 @@ class Ge extends I {
1257
1252
  this._height = e;
1258
1253
  }
1259
1254
  }
1260
- class se extends f {
1255
+ class ie extends f {
1261
1256
  constructor(e) {
1262
1257
  super(e);
1263
1258
  /**
@@ -1310,7 +1305,7 @@ class se extends f {
1310
1305
  this._columns = e;
1311
1306
  }
1312
1307
  }
1313
- class Re extends se {
1308
+ class Re extends ie {
1314
1309
  }
1315
1310
  class $e extends I {
1316
1311
  get colors() {
@@ -1333,7 +1328,7 @@ class qe extends I {
1333
1328
  this._direction = e;
1334
1329
  }
1335
1330
  }
1336
- class Je extends te {
1331
+ class Je extends ee {
1337
1332
  }
1338
1333
  class He extends f {
1339
1334
  constructor(e) {
@@ -1365,7 +1360,7 @@ class He extends f {
1365
1360
  this._lastStep = e;
1366
1361
  }
1367
1362
  }
1368
- class ne extends G {
1363
+ class se extends G {
1369
1364
  constructor(e) {
1370
1365
  super(e);
1371
1366
  n(this, "_lang", null);
@@ -1442,7 +1437,7 @@ class Ue extends f {
1442
1437
  this._height = e;
1443
1438
  }
1444
1439
  }
1445
- class H extends ne {
1440
+ class J extends se {
1446
1441
  constructor() {
1447
1442
  super(...arguments);
1448
1443
  n(this, "_lang", "json");
@@ -1508,7 +1503,7 @@ class $ {
1508
1503
  this._widgetClass = Pe;
1509
1504
  break;
1510
1505
  case "label":
1511
- this._widgetClass = Z;
1506
+ this._widgetClass = K;
1512
1507
  break;
1513
1508
  case "char":
1514
1509
  this._widgetClass = A;
@@ -1517,7 +1512,7 @@ class $ {
1517
1512
  this._widgetClass = G;
1518
1513
  break;
1519
1514
  case "button":
1520
- this._widgetClass = ee;
1515
+ this._widgetClass = Z;
1521
1516
  break;
1522
1517
  case "buttonGroup":
1523
1518
  this._widgetClass = Te;
@@ -1529,7 +1524,7 @@ class $ {
1529
1524
  this._widgetClass = We;
1530
1525
  break;
1531
1526
  case "boolean":
1532
- this._widgetClass = te;
1527
+ this._widgetClass = ee;
1533
1528
  break;
1534
1529
  case "integer":
1535
1530
  this._widgetClass = Ee;
@@ -1555,10 +1550,10 @@ class $ {
1555
1550
  case "many2many":
1556
1551
  case "one2many":
1557
1552
  case "one2many_list":
1558
- this._widgetClass = ie;
1553
+ this._widgetClass = te;
1559
1554
  break;
1560
1555
  case "newline":
1561
- this._widgetClass = K;
1556
+ this._widgetClass = U;
1562
1557
  break;
1563
1558
  case "separator":
1564
1559
  this._widgetClass = je;
@@ -1600,7 +1595,7 @@ class $ {
1600
1595
  this._widgetClass = qe;
1601
1596
  break;
1602
1597
  case "multicheckbox":
1603
- this._widgetClass = se;
1598
+ this._widgetClass = ie;
1604
1599
  break;
1605
1600
  case "switch":
1606
1601
  this._widgetClass = Je;
@@ -1609,7 +1604,7 @@ class $ {
1609
1604
  this._widgetClass = He;
1610
1605
  break;
1611
1606
  case "codeeditor":
1612
- this._widgetClass = ne;
1607
+ this._widgetClass = se;
1613
1608
  break;
1614
1609
  case "time":
1615
1610
  this._widgetClass = Qe;
@@ -1624,10 +1619,10 @@ class $ {
1624
1619
  this._widgetClass = Ue;
1625
1620
  break;
1626
1621
  case "json":
1627
- this._widgetClass = H;
1622
+ this._widgetClass = J;
1628
1623
  break;
1629
1624
  case "arrow_steps":
1630
- this._widgetClass = H;
1625
+ this._widgetClass = J;
1631
1626
  break;
1632
1627
  case "spinner":
1633
1628
  this._widgetClass = L;
@@ -1702,7 +1697,7 @@ function st({
1702
1697
  const s = ((r = e[t]) == null ? void 0 : r.type) || "passthrough";
1703
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);
1704
1699
  }
1705
- const re = ({
1700
+ const ne = ({
1706
1701
  context: i,
1707
1702
  values: t,
1708
1703
  fields: e
@@ -1710,9 +1705,9 @@ const re = ({
1710
1705
  try {
1711
1706
  if (!i)
1712
1707
  return;
1713
- if (le(i) || typeof i != "string")
1708
+ if (ae(i) || typeof i != "string")
1714
1709
  return i;
1715
- const s = ae(i);
1710
+ const s = re(i);
1716
1711
  if (s !== null)
1717
1712
  return s;
1718
1713
  if (i.trim().length === 0)
@@ -1739,21 +1734,21 @@ const re = ({
1739
1734
  }, Tt = (i) => {
1740
1735
  const t = [];
1741
1736
  try {
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) => {
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) => {
1743
1738
  !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1744
1739
  }), t);
1745
1740
  } catch {
1746
1741
  }
1747
1742
  return t;
1748
1743
  };
1749
- function ae(i) {
1744
+ function re(i) {
1750
1745
  try {
1751
1746
  return JSON.parse(i.replace(/'/g, '"'));
1752
1747
  } catch {
1753
1748
  return null;
1754
1749
  }
1755
1750
  }
1756
- function le(i) {
1751
+ function ae(i) {
1757
1752
  return typeof i == "object" && i !== null && typeof i != "string";
1758
1753
  }
1759
1754
  const nt = (i) => {
@@ -1917,7 +1912,7 @@ class Wt {
1917
1912
  `Field ${x} doesn't exist in fields defintion`
1918
1913
  );
1919
1914
  _ = this._fields[x].type, o.widget_props = {
1920
- ...U(o.widget_props),
1915
+ ...X(o.widget_props),
1921
1916
  ...this._fields[x].widget_props || {}
1922
1917
  };
1923
1918
  }
@@ -1942,7 +1937,7 @@ class Wt {
1942
1937
  values: s,
1943
1938
  fields: this._fields
1944
1939
  });
1945
- const c = re({
1940
+ const c = ne({
1946
1941
  context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
1947
1942
  values: s,
1948
1943
  fields: this._fields
@@ -1951,7 +1946,7 @@ class Wt {
1951
1946
  h.on_change
1952
1947
  ));
1953
1948
  let m;
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;
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;
1955
1950
  const p = {
1956
1951
  ...d,
1957
1952
  ...g,
@@ -1965,7 +1960,7 @@ class Wt {
1965
1960
  fields: u,
1966
1961
  container: y.container,
1967
1962
  values: s
1968
- }), 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);
1969
1964
  });
1970
1965
  }
1971
1966
  /**
@@ -1976,7 +1971,7 @@ class Wt {
1976
1971
  return this.container.findById(t);
1977
1972
  }
1978
1973
  }
1979
- function Q(i) {
1974
+ function H(i) {
1980
1975
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
1981
1976
  }
1982
1977
  class It {
@@ -2065,7 +2060,7 @@ class It {
2065
2060
  throw new Error(`Field ${u} doesn't exist in fields defintion`);
2066
2061
  const d = this._fields[u];
2067
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;
2068
- const g = re({
2063
+ const g = ne({
2069
2064
  context: l.context || d.context,
2070
2065
  values: {},
2071
2066
  fields: this._fields
@@ -2212,7 +2207,7 @@ class Vt {
2212
2207
  return this._items;
2213
2208
  }
2214
2209
  }
2215
- class oe {
2210
+ class le {
2216
2211
  constructor(t) {
2217
2212
  n(this, "_string", null);
2218
2213
  n(this, "_type");
@@ -2240,7 +2235,7 @@ class oe {
2240
2235
  return this._y_range;
2241
2236
  }
2242
2237
  }
2243
- class ce extends oe {
2238
+ class oe extends le {
2244
2239
  constructor(e, s) {
2245
2240
  super(s);
2246
2241
  n(this, "_color", null);
@@ -2266,7 +2261,7 @@ class ce extends oe {
2266
2261
  return this._suffix;
2267
2262
  }
2268
2263
  }
2269
- class ot extends ce {
2264
+ class ot extends oe {
2270
2265
  constructor(e, s) {
2271
2266
  super(e, s);
2272
2267
  n(this, "_field");
@@ -2316,7 +2311,7 @@ const ct = (i) => {
2316
2311
  y: t
2317
2312
  };
2318
2313
  };
2319
- class j extends oe {
2314
+ class j extends le {
2320
2315
  constructor(e, s) {
2321
2316
  super(s);
2322
2317
  n(this, "_x");
@@ -2333,7 +2328,7 @@ class j extends oe {
2333
2328
  }
2334
2329
  }
2335
2330
  const ut = {
2336
- indicator: ce,
2331
+ indicator: oe,
2337
2332
  indicatorField: ot,
2338
2333
  line: j,
2339
2334
  bar: j,
@@ -2347,7 +2342,7 @@ const ut = {
2347
2342
  throw new Error(`${e} not found as a GraphModel`);
2348
2343
  return new s(e, t);
2349
2344
  };
2350
- class ue {
2345
+ class ce {
2351
2346
  constructor({ name: t, axis: e }) {
2352
2347
  n(this, "_name");
2353
2348
  n(this, "_axis");
@@ -2360,7 +2355,7 @@ class ue {
2360
2355
  return this._axis;
2361
2356
  }
2362
2357
  }
2363
- class dt extends ue {
2358
+ class dt extends ce {
2364
2359
  constructor({
2365
2360
  name: e,
2366
2361
  operator: s,
@@ -2383,7 +2378,7 @@ class dt extends ue {
2383
2378
  return this._stacked;
2384
2379
  }
2385
2380
  }
2386
- class ht extends ue {
2381
+ class ht extends ce {
2387
2382
  constructor({ name: t }) {
2388
2383
  super({ name: t, axis: "x" });
2389
2384
  }
@@ -2436,7 +2431,7 @@ function gt({
2436
2431
  interval: e = 1
2437
2432
  }) {
2438
2433
  let s = [];
2439
- const r = he({
2434
+ const r = de({
2440
2435
  values: i,
2441
2436
  groupBy: "type-stacked"
2442
2437
  }), a = `${t}s`;
@@ -2447,7 +2442,7 @@ function gt({
2447
2442
  if (s.push(h), _ === u.length - 1)
2448
2443
  return;
2449
2444
  const d = h.x, g = u[_ + 1].x;
2450
- if (!de([d, g], a)) {
2445
+ if (!ue([d, g], a)) {
2451
2446
  const c = mt({
2452
2447
  dates: [d, g],
2453
2448
  timerange: t,
@@ -2476,7 +2471,7 @@ function mt({
2476
2471
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2477
2472
  for (let l = 0; l < a.length - 1; l++) {
2478
2473
  const o = a[l], u = a[l + 1];
2479
- if (!de([o, u], r)) {
2474
+ if (!ue([o, u], r)) {
2480
2475
  const _ = W(o, z(r)).add(
2481
2476
  e,
2482
2477
  r
@@ -2494,7 +2489,7 @@ function bt({
2494
2489
  const e = yt({
2495
2490
  values: i,
2496
2491
  timerange: t
2497
- }), s = [], r = he({
2492
+ }), s = [], r = de({
2498
2493
  values: e,
2499
2494
  groupBy: "all"
2500
2495
  });
@@ -2554,7 +2549,7 @@ function pt({
2554
2549
  function xt(i) {
2555
2550
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2556
2551
  }
2557
- function de(i, t) {
2552
+ function ue(i, t) {
2558
2553
  let e = !1;
2559
2554
  const s = z(t);
2560
2555
  if (i.length === 0)
@@ -2567,7 +2562,7 @@ function de(i, t) {
2567
2562
  }
2568
2563
  return e;
2569
2564
  }
2570
- function he({
2565
+ function de({
2571
2566
  values: i,
2572
2567
  groupBy: t
2573
2568
  }) {
@@ -2621,17 +2616,17 @@ const wt = {
2621
2616
  fields: e
2622
2617
  });
2623
2618
  Object.keys(v).forEach((F) => {
2624
- const x = v[F].entries, E = v[F].label, ge = N({
2619
+ const x = v[F].entries, E = v[F].label, fe = N({
2625
2620
  entries: x,
2626
2621
  fields: e,
2627
2622
  fieldName: c.name
2628
- }), me = Y({
2629
- values: ge,
2623
+ }), ge = Y({
2624
+ values: fe,
2630
2625
  operator: c.operator
2631
2626
  });
2632
2627
  a.push({
2633
2628
  x: p || !1,
2634
- value: me,
2629
+ value: ge,
2635
2630
  type: E,
2636
2631
  operator: c.operator,
2637
2632
  stacked: c.stacked
@@ -2649,7 +2644,7 @@ const wt = {
2649
2644
  a.push({
2650
2645
  x: p || !1,
2651
2646
  value: F,
2652
- type: _e({
2647
+ type: he({
2653
2648
  yAxis: c,
2654
2649
  fields: e
2655
2650
  }),
@@ -2680,7 +2675,7 @@ const wt = {
2680
2675
  if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2681
2676
  mode: i.y_range
2682
2677
  }, i.y_range === "auto")) {
2683
- const { min: c, max: m } = fe(d);
2678
+ const { min: c, max: m } = _e(d);
2684
2679
  g.yAxisOpts.valueOpts = { min: c, max: m };
2685
2680
  }
2686
2681
  return g;
@@ -2756,14 +2751,14 @@ function Ft(i) {
2756
2751
  t = t.concat(s.entries);
2757
2752
  }), t;
2758
2753
  }
2759
- function _e({
2754
+ function he({
2760
2755
  yAxis: i,
2761
2756
  fields: t
2762
2757
  }) {
2763
2758
  const e = t[i.name];
2764
2759
  return e != null && e.string ? e.string : i.name;
2765
2760
  }
2766
- function fe(i, t = 0.1) {
2761
+ function _e(i, t = 0.1) {
2767
2762
  if (i.length === 0)
2768
2763
  throw new Error("The values array cannot be empty.");
2769
2764
  const e = i.map((l) => l.value), s = Math.min(...e), r = Math.max(...e), a = (r - s) * t;
@@ -2775,11 +2770,11 @@ function fe(i, t = 0.1) {
2775
2770
  const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2776
2771
  __proto__: null,
2777
2772
  getAllObjectsInGroupedValues: Ft,
2778
- getMinMax: fe,
2773
+ getMinMax: _e,
2779
2774
  getValueForOperator: Y,
2780
2775
  getValuesForYField: N,
2781
2776
  getValuesGroupedByField: B,
2782
- getYAxisFieldname: _e,
2777
+ getYAxisFieldname: he,
2783
2778
  labelsForOperator: wt,
2784
2779
  processGraphData: vt
2785
2780
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2787,12 +2782,12 @@ export {
2787
2782
  Xe as Alert,
2788
2783
  ke as Avatar,
2789
2784
  Ae as Binary,
2790
- te as Boolean,
2791
- ee as Button,
2785
+ ee as Boolean,
2786
+ Z as Button,
2792
2787
  Te as ButtonGroup,
2793
2788
  Ze as Carousel,
2794
2789
  A as Char,
2795
- ne as CodeEditor,
2790
+ se as CodeEditor,
2796
2791
  et as ColorPicker,
2797
2792
  Ue as Comments,
2798
2793
  V as Container,
@@ -2806,10 +2801,10 @@ export {
2806
2801
  R as Float,
2807
2802
  Se as FloatTime,
2808
2803
  Wt as Form,
2809
- oe as Graph,
2810
- ue as GraphAxis,
2804
+ le as Graph,
2805
+ ce as GraphAxis,
2811
2806
  j as GraphChart,
2812
- ce as GraphIndicator,
2807
+ oe as GraphIndicator,
2813
2808
  ot as GraphIndicatorField,
2814
2809
  ht as GraphXAxis,
2815
2810
  dt as GraphYAxis,
@@ -2818,14 +2813,14 @@ export {
2818
2813
  Ne as Image,
2819
2814
  Ge as Indicator,
2820
2815
  Ee as Integer,
2821
- H as JSONField,
2822
- Z as Label,
2816
+ J as JSONField,
2817
+ K as Label,
2823
2818
  We as Many2one,
2824
2819
  Ie as Markdown,
2825
- se as MultiCheckbox,
2826
- K as NewLine,
2820
+ ie as MultiCheckbox,
2821
+ U as NewLine,
2827
2822
  M as Notebook,
2828
- ie as One2many,
2823
+ te as One2many,
2829
2824
  Oe as Page,
2830
2825
  Ve as ProgressBar,
2831
2826
  qe as Radio,
@@ -2846,7 +2841,7 @@ export {
2846
2841
  C as Widget,
2847
2842
  Dt as graphFieldUtils,
2848
2843
  jt as graphProcessor,
2849
- re as parseContext,
2844
+ ne as parseContext,
2850
2845
  Tt as parseContextFields,
2851
2846
  zt as parseDomainFields,
2852
2847
  Yt as parseGraph,