@gisce/ooui 2.27.0 → 2.28.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 T 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,
@@ -60,8 +60,8 @@ const xe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), we
60
60
  modifiedValueInObject: null,
61
61
  modifiedExpectedValue: null,
62
62
  directOutcome: !1
63
- } : (r.modifiedValueInObject = s[i].type === "boolean" ? !!t : t, s[i].type === "many2one" && e === !1 && t === void 0 ? r.modifiedExpectedValue = void 0 : (r.modifiedValueInObject = r.modifiedValueInObject === void 0 ? !1 : r.modifiedValueInObject, r.modifiedValueInObject = r.modifiedValueInObject === null ? !1 : r.modifiedValueInObject), 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 = ({
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 = ({
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 = 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 = 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));
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 = W(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
  /**
@@ -518,13 +523,13 @@ class V {
518
523
  }
519
524
  addWidget(t, e) {
520
525
  const s = [], r = e ? e.addLabel : !0;
521
- if (t instanceof U) {
526
+ if (t instanceof K) {
522
527
  this._rows.push([]), this._index++;
523
528
  return;
524
529
  }
525
530
  if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, r && t instanceof f && !t.nolabel) {
526
531
  t.colspan > 1 && (t.colspan -= 1);
527
- const l = new K({
532
+ const l = new Z({
528
533
  name: t.id + "_label",
529
534
  string: t.label,
530
535
  invisible: t.invisible,
@@ -704,7 +709,7 @@ class Pe extends L {
704
709
  this._height = e;
705
710
  }
706
711
  }
707
- class Z extends f {
712
+ class ee extends f {
708
713
  constructor(e) {
709
714
  super({
710
715
  ...e,
@@ -807,7 +812,7 @@ class Te extends w {
807
812
  return this._container.rows.flat().filter((e) => !e.invisible);
808
813
  }
809
814
  }
810
- class N extends f {
815
+ class A extends f {
811
816
  constructor(e) {
812
817
  super(e);
813
818
  /**
@@ -914,7 +919,7 @@ class G extends f {
914
919
  this._translatable = e;
915
920
  }
916
921
  }
917
- class E extends f {
922
+ class I extends f {
918
923
  constructor(e) {
919
924
  super(e);
920
925
  /**
@@ -956,14 +961,14 @@ class We extends f {
956
961
  this._relation = e;
957
962
  }
958
963
  }
959
- class Ee extends G {
964
+ class Ie extends G {
960
965
  }
961
- class ee extends f {
966
+ class te extends f {
962
967
  constructor(t) {
963
968
  super(t);
964
969
  }
965
970
  }
966
- class Ie extends f {
971
+ class Ee extends f {
967
972
  constructor(t) {
968
973
  super(t);
969
974
  }
@@ -1017,7 +1022,7 @@ class De extends f {
1017
1022
  super(t);
1018
1023
  }
1019
1024
  }
1020
- class te extends f {
1025
+ class ie extends f {
1021
1026
  constructor(e) {
1022
1027
  super(e);
1023
1028
  /**
@@ -1137,9 +1142,9 @@ class je extends C {
1137
1142
  return null;
1138
1143
  }
1139
1144
  }
1140
- class Me extends E {
1145
+ class Me extends I {
1141
1146
  }
1142
- class Ne extends f {
1147
+ class Ae extends f {
1143
1148
  constructor(e) {
1144
1149
  super(e);
1145
1150
  /**
@@ -1155,7 +1160,7 @@ class Ne extends f {
1155
1160
  this._filenameField = e;
1156
1161
  }
1157
1162
  }
1158
- class Ae extends f {
1163
+ class Ne extends f {
1159
1164
  get showControls() {
1160
1165
  var t;
1161
1166
  return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
@@ -1166,7 +1171,7 @@ class Be extends f {
1166
1171
  super(t);
1167
1172
  }
1168
1173
  }
1169
- class Le extends te {
1174
+ class Le extends ie {
1170
1175
  constructor(e) {
1171
1176
  super(e);
1172
1177
  /**
@@ -1198,7 +1203,7 @@ class Le extends te {
1198
1203
  return this.parsedWidgetProps.colorField;
1199
1204
  }
1200
1205
  }
1201
- class Ge extends E {
1206
+ class Ge extends I {
1202
1207
  constructor(e) {
1203
1208
  super(e);
1204
1209
  n(this, "_nolabel", !0);
@@ -1248,7 +1253,7 @@ class Ge extends E {
1248
1253
  this._height = e;
1249
1254
  }
1250
1255
  }
1251
- class ie extends f {
1256
+ class se extends f {
1252
1257
  constructor(e) {
1253
1258
  super(e);
1254
1259
  /**
@@ -1301,14 +1306,14 @@ class ie extends f {
1301
1306
  this._columns = e;
1302
1307
  }
1303
1308
  }
1304
- class Re extends ie {
1309
+ class Re extends se {
1305
1310
  }
1306
- class $e extends E {
1311
+ class $e extends I {
1307
1312
  get colors() {
1308
1313
  return this._parsedWidgetProps.colors || {};
1309
1314
  }
1310
1315
  }
1311
- class qe extends E {
1316
+ class qe extends I {
1312
1317
  constructor(e) {
1313
1318
  super(e);
1314
1319
  /**
@@ -1324,7 +1329,7 @@ class qe extends E {
1324
1329
  this._direction = e;
1325
1330
  }
1326
1331
  }
1327
- class Je extends ee {
1332
+ class Je extends te {
1328
1333
  }
1329
1334
  class He extends f {
1330
1335
  constructor(e) {
@@ -1356,7 +1361,7 @@ class He extends f {
1356
1361
  this._lastStep = e;
1357
1362
  }
1358
1363
  }
1359
- class se extends G {
1364
+ class ne extends G {
1360
1365
  constructor(e) {
1361
1366
  super(e);
1362
1367
  n(this, "_lang", null);
@@ -1433,7 +1438,7 @@ class Ue extends f {
1433
1438
  this._height = e;
1434
1439
  }
1435
1440
  }
1436
- class J extends se {
1441
+ class H extends ne {
1437
1442
  constructor() {
1438
1443
  super(...arguments);
1439
1444
  n(this, "_lang", "json");
@@ -1475,7 +1480,7 @@ class Ze extends w {
1475
1480
  return this._container.rows.flat().filter((e) => !e.invisible);
1476
1481
  }
1477
1482
  }
1478
- class et extends N {
1483
+ class et extends A {
1479
1484
  get showText() {
1480
1485
  return this.parsedWidgetProps.show_text ?? !0;
1481
1486
  }
@@ -1499,31 +1504,31 @@ class $ {
1499
1504
  this._widgetClass = Pe;
1500
1505
  break;
1501
1506
  case "label":
1502
- this._widgetClass = K;
1507
+ this._widgetClass = Z;
1503
1508
  break;
1504
1509
  case "char":
1505
- this._widgetClass = N;
1510
+ this._widgetClass = A;
1506
1511
  break;
1507
1512
  case "text":
1508
1513
  this._widgetClass = G;
1509
1514
  break;
1510
1515
  case "button":
1511
- this._widgetClass = Z;
1516
+ this._widgetClass = ee;
1512
1517
  break;
1513
1518
  case "buttonGroup":
1514
1519
  this._widgetClass = Te;
1515
1520
  break;
1516
1521
  case "selection":
1517
- this._widgetClass = E;
1522
+ this._widgetClass = I;
1518
1523
  break;
1519
1524
  case "many2one":
1520
1525
  this._widgetClass = We;
1521
1526
  break;
1522
1527
  case "boolean":
1523
- this._widgetClass = ee;
1528
+ this._widgetClass = te;
1524
1529
  break;
1525
1530
  case "integer":
1526
- this._widgetClass = Ie;
1531
+ this._widgetClass = Ee;
1527
1532
  break;
1528
1533
  case "float":
1529
1534
  this._widgetClass = R;
@@ -1541,21 +1546,21 @@ class $ {
1541
1546
  this._widgetClass = Ve;
1542
1547
  break;
1543
1548
  case "markdown":
1544
- this._widgetClass = Ee;
1549
+ this._widgetClass = Ie;
1545
1550
  break;
1546
1551
  case "many2many":
1547
1552
  case "one2many":
1548
1553
  case "one2many_list":
1549
- this._widgetClass = te;
1554
+ this._widgetClass = ie;
1550
1555
  break;
1551
1556
  case "newline":
1552
- this._widgetClass = U;
1557
+ this._widgetClass = K;
1553
1558
  break;
1554
1559
  case "separator":
1555
1560
  this._widgetClass = je;
1556
1561
  break;
1557
1562
  case "url":
1558
- this._widgetClass = N;
1563
+ this._widgetClass = A;
1559
1564
  break;
1560
1565
  case "email":
1561
1566
  this._widgetClass = Ke;
@@ -1564,10 +1569,10 @@ class $ {
1564
1569
  this._widgetClass = Me;
1565
1570
  break;
1566
1571
  case "binary":
1567
- this._widgetClass = Ne;
1572
+ this._widgetClass = Ae;
1568
1573
  break;
1569
1574
  case "image":
1570
- this._widgetClass = Ae;
1575
+ this._widgetClass = Ne;
1571
1576
  break;
1572
1577
  case "fiber_grid":
1573
1578
  this._widgetClass = Be;
@@ -1591,7 +1596,7 @@ class $ {
1591
1596
  this._widgetClass = qe;
1592
1597
  break;
1593
1598
  case "multicheckbox":
1594
- this._widgetClass = ie;
1599
+ this._widgetClass = se;
1595
1600
  break;
1596
1601
  case "switch":
1597
1602
  this._widgetClass = Je;
@@ -1600,7 +1605,7 @@ class $ {
1600
1605
  this._widgetClass = He;
1601
1606
  break;
1602
1607
  case "codeeditor":
1603
- this._widgetClass = se;
1608
+ this._widgetClass = ne;
1604
1609
  break;
1605
1610
  case "time":
1606
1611
  this._widgetClass = Qe;
@@ -1615,10 +1620,10 @@ class $ {
1615
1620
  this._widgetClass = Ue;
1616
1621
  break;
1617
1622
  case "json":
1618
- this._widgetClass = J;
1623
+ this._widgetClass = H;
1619
1624
  break;
1620
1625
  case "arrow_steps":
1621
- this._widgetClass = J;
1626
+ this._widgetClass = H;
1622
1627
  break;
1623
1628
  case "spinner":
1624
1629
  this._widgetClass = L;
@@ -1693,7 +1698,7 @@ function st({
1693
1698
  const s = ((r = e[t]) == null ? void 0 : r.type) || "passthrough";
1694
1699
  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
1700
  }
1696
- const ne = ({
1701
+ const re = ({
1697
1702
  context: i,
1698
1703
  values: t,
1699
1704
  fields: e
@@ -1701,9 +1706,9 @@ const ne = ({
1701
1706
  try {
1702
1707
  if (!i)
1703
1708
  return;
1704
- if (ae(i) || typeof i != "string")
1709
+ if (le(i) || typeof i != "string")
1705
1710
  return i;
1706
- const s = re(i);
1711
+ const s = ae(i);
1707
1712
  if (s !== null)
1708
1713
  return s;
1709
1714
  if (i.trim().length === 0)
@@ -1730,21 +1735,21 @@ const ne = ({
1730
1735
  }, Tt = (i) => {
1731
1736
  const t = [];
1732
1737
  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) => {
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) => {
1734
1739
  !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1735
1740
  }), t);
1736
1741
  } catch {
1737
1742
  }
1738
1743
  return t;
1739
1744
  };
1740
- function re(i) {
1745
+ function ae(i) {
1741
1746
  try {
1742
1747
  return JSON.parse(i.replace(/'/g, '"'));
1743
1748
  } catch {
1744
1749
  return null;
1745
1750
  }
1746
1751
  }
1747
- function ae(i) {
1752
+ function le(i) {
1748
1753
  return typeof i == "object" && i !== null && typeof i != "string";
1749
1754
  }
1750
1755
  const nt = (i) => {
@@ -1899,16 +1904,16 @@ class Wt {
1899
1904
  const { tagName: l, attributes: o, children: u } = a;
1900
1905
  let _ = l, h = o;
1901
1906
  if (l === "field") {
1902
- const { name: x, widget: I } = o;
1903
- if (I)
1904
- _ = I;
1907
+ const { name: x, widget: E } = o;
1908
+ if (E)
1909
+ _ = E;
1905
1910
  else if (x) {
1906
1911
  if (!this._fields[x])
1907
1912
  throw new Error(
1908
1913
  `Field ${x} doesn't exist in fields defintion`
1909
1914
  );
1910
1915
  _ = this._fields[x].type, o.widget_props = {
1911
- ...X(o.widget_props),
1916
+ ...U(o.widget_props),
1912
1917
  ...this._fields[x].widget_props || {}
1913
1918
  };
1914
1919
  }
@@ -1933,7 +1938,7 @@ class Wt {
1933
1938
  values: s,
1934
1939
  fields: this._fields
1935
1940
  });
1936
- const c = ne({
1941
+ const c = re({
1937
1942
  context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
1938
1943
  values: s,
1939
1944
  fields: this._fields
@@ -1942,7 +1947,7 @@ class Wt {
1942
1947
  h.on_change
1943
1948
  ));
1944
1949
  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;
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;
1946
1951
  const p = {
1947
1952
  ...d,
1948
1953
  ...g,
@@ -1956,7 +1961,7 @@ class Wt {
1956
1961
  fields: u,
1957
1962
  container: y.container,
1958
1963
  values: s
1959
- }), y instanceof Z && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1964
+ }), y instanceof ee && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1960
1965
  });
1961
1966
  }
1962
1967
  /**
@@ -1967,10 +1972,10 @@ class Wt {
1967
1972
  return this.container.findById(t);
1968
1973
  }
1969
1974
  }
1970
- function H(i) {
1975
+ function Q(i) {
1971
1976
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
1972
1977
  }
1973
- class Et {
1978
+ class It {
1974
1979
  constructor(t) {
1975
1980
  /**
1976
1981
  * Object containing fields specification of the form.
@@ -2056,7 +2061,7 @@ class Et {
2056
2061
  throw new Error(`Field ${u} doesn't exist in fields defintion`);
2057
2062
  const d = this._fields[u];
2058
2063
  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({
2064
+ const g = re({
2060
2065
  context: l.context || d.context,
2061
2066
  values: {},
2062
2067
  fields: this._fields
@@ -2097,7 +2102,7 @@ const at = {
2097
2102
  date: "date",
2098
2103
  datetime: "datetime"
2099
2104
  };
2100
- class It {
2105
+ class Et {
2101
2106
  constructor(t, e, s = 8) {
2102
2107
  /**
2103
2108
  * Object containing the specific fields for primary and secondary search fields
@@ -2203,7 +2208,7 @@ class Vt {
2203
2208
  return this._items;
2204
2209
  }
2205
2210
  }
2206
- class le {
2211
+ class oe {
2207
2212
  constructor(t) {
2208
2213
  n(this, "_string", null);
2209
2214
  n(this, "_type");
@@ -2231,7 +2236,7 @@ class le {
2231
2236
  return this._y_range;
2232
2237
  }
2233
2238
  }
2234
- class oe extends le {
2239
+ class ce extends oe {
2235
2240
  constructor(e, s) {
2236
2241
  super(s);
2237
2242
  n(this, "_color", null);
@@ -2257,7 +2262,7 @@ class oe extends le {
2257
2262
  return this._suffix;
2258
2263
  }
2259
2264
  }
2260
- class ot extends oe {
2265
+ class ot extends ce {
2261
2266
  constructor(e, s) {
2262
2267
  super(e, s);
2263
2268
  n(this, "_field");
@@ -2307,7 +2312,7 @@ const ct = (i) => {
2307
2312
  y: t
2308
2313
  };
2309
2314
  };
2310
- class j extends le {
2315
+ class j extends oe {
2311
2316
  constructor(e, s) {
2312
2317
  super(s);
2313
2318
  n(this, "_x");
@@ -2324,7 +2329,7 @@ class j extends le {
2324
2329
  }
2325
2330
  }
2326
2331
  const ut = {
2327
- indicator: oe,
2332
+ indicator: ce,
2328
2333
  indicatorField: ot,
2329
2334
  line: j,
2330
2335
  bar: j,
@@ -2338,7 +2343,7 @@ const ut = {
2338
2343
  throw new Error(`${e} not found as a GraphModel`);
2339
2344
  return new s(e, t);
2340
2345
  };
2341
- class ce {
2346
+ class ue {
2342
2347
  constructor({ name: t, axis: e }) {
2343
2348
  n(this, "_name");
2344
2349
  n(this, "_axis");
@@ -2351,7 +2356,7 @@ class ce {
2351
2356
  return this._axis;
2352
2357
  }
2353
2358
  }
2354
- class dt extends ce {
2359
+ class dt extends ue {
2355
2360
  constructor({
2356
2361
  name: e,
2357
2362
  operator: s,
@@ -2374,7 +2379,7 @@ class dt extends ce {
2374
2379
  return this._stacked;
2375
2380
  }
2376
2381
  }
2377
- class ht extends ce {
2382
+ class ht extends ue {
2378
2383
  constructor({ name: t }) {
2379
2384
  super({ name: t, axis: "x" });
2380
2385
  }
@@ -2427,7 +2432,7 @@ function gt({
2427
2432
  interval: e = 1
2428
2433
  }) {
2429
2434
  let s = [];
2430
- const r = de({
2435
+ const r = he({
2431
2436
  values: i,
2432
2437
  groupBy: "type-stacked"
2433
2438
  }), a = `${t}s`;
@@ -2438,7 +2443,7 @@ function gt({
2438
2443
  if (s.push(h), _ === u.length - 1)
2439
2444
  return;
2440
2445
  const d = h.x, g = u[_ + 1].x;
2441
- if (!ue([d, g], a)) {
2446
+ if (!de([d, g], a)) {
2442
2447
  const c = mt({
2443
2448
  dates: [d, g],
2444
2449
  timerange: t,
@@ -2467,7 +2472,7 @@ function mt({
2467
2472
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2468
2473
  for (let l = 0; l < a.length - 1; l++) {
2469
2474
  const o = a[l], u = a[l + 1];
2470
- if (!ue([o, u], r)) {
2475
+ if (!de([o, u], r)) {
2471
2476
  const _ = T(o, z(r)).add(
2472
2477
  e,
2473
2478
  r
@@ -2485,7 +2490,7 @@ function bt({
2485
2490
  const e = yt({
2486
2491
  values: i,
2487
2492
  timerange: t
2488
- }), s = [], r = de({
2493
+ }), s = [], r = he({
2489
2494
  values: e,
2490
2495
  groupBy: "all"
2491
2496
  });
@@ -2545,7 +2550,7 @@ function pt({
2545
2550
  function xt(i) {
2546
2551
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2547
2552
  }
2548
- function ue(i, t) {
2553
+ function de(i, t) {
2549
2554
  let e = !1;
2550
2555
  const s = z(t);
2551
2556
  if (i.length === 0)
@@ -2558,7 +2563,7 @@ function ue(i, t) {
2558
2563
  }
2559
2564
  return e;
2560
2565
  }
2561
- function de({
2566
+ function he({
2562
2567
  values: i,
2563
2568
  groupBy: t
2564
2569
  }) {
@@ -2612,24 +2617,24 @@ const wt = {
2612
2617
  fields: e
2613
2618
  });
2614
2619
  Object.keys(v).forEach((F) => {
2615
- const x = v[F].entries, I = v[F].label, fe = A({
2620
+ const x = v[F].entries, E = v[F].label, ge = N({
2616
2621
  entries: x,
2617
2622
  fields: e,
2618
2623
  fieldName: c.name
2619
- }), ge = Y({
2620
- values: fe,
2624
+ }), me = Y({
2625
+ values: ge,
2621
2626
  operator: c.operator
2622
2627
  });
2623
2628
  a.push({
2624
2629
  x: p || !1,
2625
- value: ge,
2626
- type: I,
2630
+ value: me,
2631
+ type: E,
2627
2632
  operator: c.operator,
2628
2633
  stacked: c.stacked
2629
2634
  });
2630
2635
  });
2631
2636
  } else {
2632
- const v = A({
2637
+ const v = N({
2633
2638
  entries: y,
2634
2639
  fields: e,
2635
2640
  fieldName: c.name
@@ -2640,7 +2645,7 @@ const wt = {
2640
2645
  a.push({
2641
2646
  x: p || !1,
2642
2647
  value: F,
2643
- type: he({
2648
+ type: _e({
2644
2649
  yAxis: c,
2645
2650
  fields: e
2646
2651
  }),
@@ -2671,12 +2676,12 @@ const wt = {
2671
2676
  if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2672
2677
  mode: i.y_range
2673
2678
  }, i.y_range === "auto")) {
2674
- const { min: c, max: m } = _e(d);
2679
+ const { min: c, max: m } = fe(d);
2675
2680
  g.yAxisOpts.valueOpts = { min: c, max: m };
2676
2681
  }
2677
2682
  return g;
2678
2683
  };
2679
- function A({
2684
+ function N({
2680
2685
  entries: i,
2681
2686
  fieldName: t,
2682
2687
  fields: e
@@ -2747,14 +2752,14 @@ function Ft(i) {
2747
2752
  t = t.concat(s.entries);
2748
2753
  }), t;
2749
2754
  }
2750
- function he({
2755
+ function _e({
2751
2756
  yAxis: i,
2752
2757
  fields: t
2753
2758
  }) {
2754
2759
  const e = t[i.name];
2755
2760
  return e != null && e.string ? e.string : i.name;
2756
2761
  }
2757
- function _e(i, t = 0.1) {
2762
+ function fe(i, t = 0.1) {
2758
2763
  if (i.length === 0)
2759
2764
  throw new Error("The values array cannot be empty.");
2760
2765
  const e = i.map((l) => l.value), s = Math.min(...e), r = Math.max(...e), a = (r - s) * t;
@@ -2766,24 +2771,24 @@ function _e(i, t = 0.1) {
2766
2771
  const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2767
2772
  __proto__: null,
2768
2773
  getAllObjectsInGroupedValues: Ft,
2769
- getMinMax: _e,
2774
+ getMinMax: fe,
2770
2775
  getValueForOperator: Y,
2771
- getValuesForYField: A,
2776
+ getValuesForYField: N,
2772
2777
  getValuesGroupedByField: B,
2773
- getYAxisFieldname: he,
2778
+ getYAxisFieldname: _e,
2774
2779
  labelsForOperator: wt,
2775
2780
  processGraphData: vt
2776
2781
  }, Symbol.toStringTag, { value: "Module" }));
2777
2782
  export {
2778
2783
  Xe as Alert,
2779
2784
  ke as Avatar,
2780
- Ne as Binary,
2781
- ee as Boolean,
2782
- Z as Button,
2785
+ Ae as Binary,
2786
+ te as Boolean,
2787
+ ee as Button,
2783
2788
  Te as ButtonGroup,
2784
2789
  Ze as Carousel,
2785
- N as Char,
2786
- se as CodeEditor,
2790
+ A as Char,
2791
+ ne as CodeEditor,
2787
2792
  et as ColorPicker,
2788
2793
  Ue as Comments,
2789
2794
  V as Container,
@@ -2797,33 +2802,33 @@ export {
2797
2802
  R as Float,
2798
2803
  Se as FloatTime,
2799
2804
  Wt as Form,
2800
- le as Graph,
2801
- ce as GraphAxis,
2805
+ oe as Graph,
2806
+ ue as GraphAxis,
2802
2807
  j as GraphChart,
2803
- oe as GraphIndicator,
2808
+ ce as GraphIndicator,
2804
2809
  ot as GraphIndicatorField,
2805
2810
  ht as GraphXAxis,
2806
2811
  dt as GraphYAxis,
2807
2812
  Pe as Group,
2808
2813
  ze as HTMLPreview,
2809
- Ae as Image,
2814
+ Ne as Image,
2810
2815
  Ge as Indicator,
2811
- Ie as Integer,
2812
- J as JSONField,
2813
- K as Label,
2816
+ Ee as Integer,
2817
+ H as JSONField,
2818
+ Z as Label,
2814
2819
  We as Many2one,
2815
- Ee as Markdown,
2816
- ie as MultiCheckbox,
2817
- U as NewLine,
2820
+ Ie as Markdown,
2821
+ se as MultiCheckbox,
2822
+ K as NewLine,
2818
2823
  M as Notebook,
2819
- te as One2many,
2824
+ ie as One2many,
2820
2825
  Oe as Page,
2821
2826
  Ve as ProgressBar,
2822
2827
  qe as Radio,
2823
2828
  Me as Reference,
2824
2829
  at as SearchFieldTypes,
2825
- It as SearchFilter,
2826
- E as Selection,
2830
+ Et as SearchFilter,
2831
+ I as Selection,
2827
2832
  je as Separator,
2828
2833
  L as Spinner,
2829
2834
  He as Steps,
@@ -2833,11 +2838,11 @@ export {
2833
2838
  G as Text,
2834
2839
  Qe as Time,
2835
2840
  Le as Timeline,
2836
- Et as Tree,
2841
+ It as Tree,
2837
2842
  C as Widget,
2838
2843
  Dt as graphFieldUtils,
2839
2844
  jt as graphProcessor,
2840
- ne as parseContext,
2845
+ re as parseContext,
2841
2846
  Tt as parseContextFields,
2842
2847
  zt as parseDomainFields,
2843
2848
  Yt as parseGraph,