@gisce/ooui 2.32.0-alpha.1 → 2.32.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 ye = Object.defineProperty;
2
- var pe = (i, t, e) => t in i ? ye(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var r = (i, t, e) => (pe(i, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { decode as xe } from "html-entities";
5
- import { evaluateCondition as we } 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 r = (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 ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe = ({
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, n, a] = i, l = t[s];
14
- const o = U({
14
+ const o = X({
15
15
  fieldName: s,
16
16
  valueInObject: l,
17
17
  expectedValue: a,
@@ -41,7 +41,7 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, m = (i) => xe(i, { level: "xml" }), U = ({
44
+ }, m = (i) => pe(i, { level: "xml" }), X = ({
45
45
  fieldName: i,
46
46
  valueInObject: t,
47
47
  expectedValue: e,
@@ -61,19 +61,19 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
61
61
  modifiedExpectedValue: null,
62
62
  directOutcome: !1
63
63
  } : (n.modifiedValueInObject = s[i].type === "boolean" ? !!t : t, s[i].type === "many2one" && e === !1 && t === void 0 ? n.modifiedExpectedValue = void 0 : (n.modifiedValueInObject === void 0 ? n.modifiedValueInObject = !1 : Array.isArray(n.modifiedValueInObject) && n.modifiedValueInObject[0] !== void 0 && (n.modifiedValueInObject = n.modifiedValueInObject[0]), n.modifiedValueInObject === null && (n.modifiedValueInObject = !1)), s[i].type === "many2one" && Array.isArray(n.modifiedValueInObject) && n.modifiedValueInObject[0] === void 0 && (n.modifiedValueInObject = !1), s[i].type === "boolean" && (e === 0 || e === 1) && (n.modifiedExpectedValue = e !== 0), n);
64
- }, H = ({
64
+ }, J = ({
65
65
  attrs: i,
66
66
  values: t,
67
67
  fields: e,
68
68
  widgetType: s
69
69
  }) => {
70
70
  const u = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = m(u), h = JSON.parse(_), d = {};
71
- for (const f of Object.keys(h)) {
72
- const p = h[f].map((y) => Fe({ entry: y, values: t, fields: e })).every((y) => y);
73
- p ? d[f] = !0 : f === "readonly" && !p && s === "button" && (d[f] = !1);
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);
73
+ p ? d[g] = !0 : g === "readonly" && !p && s === "button" && (d[g] = !1);
74
74
  }
75
75
  return d;
76
- }, K = (i) => {
76
+ }, U = (i) => {
77
77
  if (i === void 0)
78
78
  return {};
79
79
  if (typeof i == "string")
@@ -84,7 +84,7 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
84
84
  }
85
85
  else
86
86
  return i;
87
- }, Ce = ({
87
+ }, Fe = ({
88
88
  attrs: i,
89
89
  values: t,
90
90
  fields: e,
@@ -95,14 +95,14 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
95
95
  n.replace(/'/g, '"')
96
96
  ), l = {};
97
97
  for (const o of Object.keys(a)) {
98
- const u = we({
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
- }) => U({
105
+ }) => X({
106
106
  fieldName: _,
107
107
  valueInObject: h,
108
108
  expectedValue: d,
@@ -117,7 +117,7 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
117
117
  "Error parsing new json_attrs. Original string: " + i
118
118
  ) : n;
119
119
  }
120
- }, ke = ({
120
+ }, Ce = ({
121
121
  tagAttributes: i,
122
122
  values: t,
123
123
  fields: e,
@@ -127,7 +127,7 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
127
127
  let a = {};
128
128
  if (i.json_attrs)
129
129
  try {
130
- a = Ce({
130
+ a = Fe({
131
131
  attrs: i.json_attrs,
132
132
  values: t,
133
133
  fields: e,
@@ -135,7 +135,7 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
135
135
  });
136
136
  } catch (l) {
137
137
  if (n && i.attrs)
138
- a = H({
138
+ a = J({
139
139
  attrs: i.attrs,
140
140
  values: t,
141
141
  fields: e,
@@ -145,7 +145,7 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
145
145
  throw l;
146
146
  }
147
147
  else
148
- i.attrs && (a = H({
148
+ i.attrs && (a = J({
149
149
  attrs: i.attrs,
150
150
  values: t,
151
151
  fields: e,
@@ -193,7 +193,7 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
193
193
  * Base type of the field
194
194
  */
195
195
  r(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 = m(JSON.stringify(t.domain)) : this._domain = m(t.domain)), t.type && (this._fieldType = t.fieldsWidgetType), t.widget_props && (this._parsedWidgetProps = K(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 = m(JSON.stringify(t.domain)) : this._domain = m(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));
197
197
  }
198
198
  static get defaultColspan() {
199
199
  return k._defaultColspan;
@@ -264,7 +264,7 @@ const ve = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
264
264
  */
265
265
  r(k, "_defaultColspan", 1);
266
266
  let C = k;
267
- class g extends C {
267
+ class f extends C {
268
268
  constructor(e) {
269
269
  super(e);
270
270
  /**
@@ -312,7 +312,7 @@ class g extends C {
312
312
  r(this, "_selectionValues", /* @__PURE__ */ new Map([]));
313
313
  r(this, "_autoRefresh", !1);
314
314
  r(this, "_raw_props");
315
- this._activated = !0, e && (this._raw_props = e, e.name && (this._id = e.name), e.activated && (this._activated = e.activated), e.string && (this._label = m(e.string)), e.help && (this._tooltip = m(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 = m(e.sum)), e.selection && (this._selectionValues = new Map(e.selection)), e.help_inline && (this.tooltipInline = ve(e.help_inline)), e.autorefresh && (this.autoRefresh = W(e.autorefresh)));
315
+ this._activated = !0, e && (this._raw_props = e, e.name && (this._id = e.name), e.activated && (this._activated = e.activated), e.string && (this._label = m(e.string)), e.help && (this._tooltip = m(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 = m(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)));
316
316
  }
317
317
  get id() {
318
318
  return this._id;
@@ -397,14 +397,14 @@ class g extends C {
397
397
  return this._id === e ? this : null;
398
398
  }
399
399
  }
400
- class Pe extends g {
400
+ class ke extends f {
401
401
  }
402
- class Z extends C {
402
+ class K extends C {
403
403
  findById(t) {
404
404
  return null;
405
405
  }
406
406
  }
407
- class ee extends g {
407
+ class Z extends f {
408
408
  constructor(e) {
409
409
  super({ ...e, nolabel: !0 });
410
410
  /**
@@ -531,13 +531,13 @@ class V {
531
531
  }
532
532
  addWidget(t, e) {
533
533
  const s = [], n = e ? e.addLabel : !0;
534
- if (t instanceof Z) {
534
+ if (t instanceof K) {
535
535
  this._rows.push([]), this._index++;
536
536
  return;
537
537
  }
538
- if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, n && t instanceof g && !t.nolabel) {
538
+ if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, n && t instanceof f && !t.nolabel) {
539
539
  t.colspan > 1 && (t.colspan -= 1);
540
- const l = new ee({
540
+ const l = new Z({
541
541
  name: t.id + "_label",
542
542
  string: t.label,
543
543
  invisible: t.invisible,
@@ -679,7 +679,7 @@ class L extends w {
679
679
  this._loading = e;
680
680
  }
681
681
  }
682
- class Oe extends L {
682
+ class Pe extends L {
683
683
  constructor(e) {
684
684
  super(e);
685
685
  r(this, "_icon", null);
@@ -692,7 +692,7 @@ class Oe extends L {
692
692
  this._icon = e;
693
693
  }
694
694
  }
695
- class We extends L {
695
+ class Oe extends L {
696
696
  constructor(e) {
697
697
  var s;
698
698
  super(e);
@@ -726,7 +726,7 @@ class We extends L {
726
726
  this._backgroundColor = e;
727
727
  }
728
728
  }
729
- class te extends g {
729
+ class ee extends f {
730
730
  constructor(e) {
731
731
  super({
732
732
  ...e,
@@ -798,7 +798,7 @@ class te extends g {
798
798
  this._danger = e;
799
799
  }
800
800
  }
801
- class Te extends w {
801
+ class We extends w {
802
802
  constructor(e) {
803
803
  super(e);
804
804
  r(this, "_defaultName", "");
@@ -829,7 +829,7 @@ class Te extends w {
829
829
  return this._container.rows.flat().filter((e) => !e.invisible);
830
830
  }
831
831
  }
832
- class A extends g {
832
+ class A extends f {
833
833
  constructor(e) {
834
834
  super(e);
835
835
  /**
@@ -872,7 +872,7 @@ class A extends g {
872
872
  this._translatable = e;
873
873
  }
874
874
  }
875
- class G extends g {
875
+ class G extends f {
876
876
  constructor(e) {
877
877
  super(e);
878
878
  /**
@@ -936,7 +936,7 @@ class G extends g {
936
936
  this._translatable = e;
937
937
  }
938
938
  }
939
- class z extends g {
939
+ class z extends f {
940
940
  constructor(e) {
941
941
  super(e);
942
942
  /**
@@ -952,7 +952,7 @@ class z extends g {
952
952
  this._size = e;
953
953
  }
954
954
  }
955
- class ze extends g {
955
+ class Te extends f {
956
956
  constructor(e) {
957
957
  super(e);
958
958
  /**
@@ -987,19 +987,19 @@ class ze extends g {
987
987
  return this.parsedWidgetProps.showMenu ?? !0;
988
988
  }
989
989
  }
990
- class Ie extends G {
990
+ class ze extends G {
991
991
  }
992
- class ie extends g {
992
+ class te extends f {
993
993
  constructor(t) {
994
994
  super(t);
995
995
  }
996
996
  }
997
- class Ee extends g {
997
+ class Ie extends f {
998
998
  constructor(t) {
999
999
  super(t);
1000
1000
  }
1001
1001
  }
1002
- class R extends g {
1002
+ class R extends f {
1003
1003
  constructor(e) {
1004
1004
  super(e);
1005
1005
  /**
@@ -1032,13 +1032,18 @@ class R extends g {
1032
1032
  this._decimalDigits = e;
1033
1033
  }
1034
1034
  }
1035
- class Se extends R {
1035
+ class Ee extends R {
1036
+ }
1037
+ class Se extends f {
1036
1038
  }
1037
- class Ve extends g {
1039
+ class Ve extends R {
1038
1040
  }
1039
- class Ye extends R {
1041
+ class Ye extends f {
1042
+ constructor(t) {
1043
+ super(t);
1044
+ }
1040
1045
  }
1041
- class $ extends g {
1046
+ class De extends f {
1042
1047
  constructor(e) {
1043
1048
  super(e);
1044
1049
  r(this, "_timezone");
@@ -1051,12 +1056,7 @@ class $ extends g {
1051
1056
  this._timezone = e;
1052
1057
  }
1053
1058
  }
1054
- class De extends $ {
1055
- constructor(t) {
1056
- super(t);
1057
- }
1058
- }
1059
- class se extends g {
1059
+ class ie extends f {
1060
1060
  constructor(e) {
1061
1061
  super(e);
1062
1062
  /**
@@ -1178,7 +1178,7 @@ class je extends C {
1178
1178
  }
1179
1179
  class Me extends z {
1180
1180
  }
1181
- class Ae extends g {
1181
+ class Ae extends f {
1182
1182
  constructor(e) {
1183
1183
  super(e);
1184
1184
  /**
@@ -1194,18 +1194,18 @@ class Ae extends g {
1194
1194
  this._filenameField = e;
1195
1195
  }
1196
1196
  }
1197
- class Ne extends g {
1197
+ class Ne extends f {
1198
1198
  get showControls() {
1199
1199
  var t;
1200
1200
  return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
1201
1201
  }
1202
1202
  }
1203
- class Be extends g {
1203
+ class Be extends f {
1204
1204
  constructor(t) {
1205
1205
  super(t);
1206
1206
  }
1207
1207
  }
1208
- class Le extends se {
1208
+ class Le extends ie {
1209
1209
  constructor(e) {
1210
1210
  super(e);
1211
1211
  /**
@@ -1291,7 +1291,7 @@ class Ge extends z {
1291
1291
  this._height = e;
1292
1292
  }
1293
1293
  }
1294
- class re extends g {
1294
+ class se extends f {
1295
1295
  constructor(e) {
1296
1296
  super(e);
1297
1297
  /**
@@ -1344,7 +1344,7 @@ class re extends g {
1344
1344
  this._columns = e;
1345
1345
  }
1346
1346
  }
1347
- class Re extends re {
1347
+ class Re extends se {
1348
1348
  }
1349
1349
  class $e extends z {
1350
1350
  get colors() {
@@ -1371,9 +1371,9 @@ class qe extends z {
1371
1371
  this._direction = e;
1372
1372
  }
1373
1373
  }
1374
- class Je extends ie {
1374
+ class Je extends te {
1375
1375
  }
1376
- class He extends g {
1376
+ class He extends f {
1377
1377
  constructor(e) {
1378
1378
  super(e);
1379
1379
  /**
@@ -1403,7 +1403,7 @@ class He extends g {
1403
1403
  this._lastStep = e;
1404
1404
  }
1405
1405
  }
1406
- class ne extends G {
1406
+ class re extends G {
1407
1407
  constructor(e) {
1408
1408
  super(e);
1409
1409
  r(this, "_lang", null);
@@ -1416,7 +1416,7 @@ class ne extends G {
1416
1416
  this._lang = e;
1417
1417
  }
1418
1418
  }
1419
- class Qe extends $ {
1419
+ class Qe extends f {
1420
1420
  constructor(t) {
1421
1421
  super(t);
1422
1422
  }
@@ -1461,7 +1461,7 @@ class Xe extends w {
1461
1461
  return this._container.rows.flat().filter((e) => !e.invisible);
1462
1462
  }
1463
1463
  }
1464
- class Ue extends g {
1464
+ class Ue extends f {
1465
1465
  constructor(e) {
1466
1466
  super(e);
1467
1467
  /**
@@ -1480,13 +1480,13 @@ class Ue extends g {
1480
1480
  this._height = e;
1481
1481
  }
1482
1482
  }
1483
- class Q extends ne {
1483
+ class H extends re {
1484
1484
  constructor() {
1485
1485
  super(...arguments);
1486
1486
  r(this, "_lang", "json");
1487
1487
  }
1488
1488
  }
1489
- class Ke extends g {
1489
+ class Ke extends f {
1490
1490
  constructor(e) {
1491
1491
  super(e);
1492
1492
  r(this, "_multi", !1);
@@ -1527,7 +1527,7 @@ class et extends A {
1527
1527
  return this.parsedWidgetProps.show_text ?? !0;
1528
1528
  }
1529
1529
  }
1530
- class q {
1530
+ class $ {
1531
1531
  constructor() {
1532
1532
  /**
1533
1533
  * Widget class
@@ -1540,13 +1540,13 @@ class q {
1540
1540
  this._widgetClass = M;
1541
1541
  break;
1542
1542
  case "page":
1543
- this._widgetClass = Oe;
1543
+ this._widgetClass = Pe;
1544
1544
  break;
1545
1545
  case "group":
1546
- this._widgetClass = We;
1546
+ this._widgetClass = Oe;
1547
1547
  break;
1548
1548
  case "label":
1549
- this._widgetClass = ee;
1549
+ this._widgetClass = Z;
1550
1550
  break;
1551
1551
  case "char":
1552
1552
  this._widgetClass = A;
@@ -1555,48 +1555,48 @@ class q {
1555
1555
  this._widgetClass = G;
1556
1556
  break;
1557
1557
  case "button":
1558
- this._widgetClass = te;
1558
+ this._widgetClass = ee;
1559
1559
  break;
1560
1560
  case "buttonGroup":
1561
- this._widgetClass = Te;
1561
+ this._widgetClass = We;
1562
1562
  break;
1563
1563
  case "selection":
1564
1564
  this._widgetClass = z;
1565
1565
  break;
1566
1566
  case "many2one":
1567
- this._widgetClass = ze;
1567
+ this._widgetClass = Te;
1568
1568
  break;
1569
1569
  case "boolean":
1570
- this._widgetClass = ie;
1570
+ this._widgetClass = te;
1571
1571
  break;
1572
1572
  case "integer":
1573
- this._widgetClass = Ee;
1573
+ this._widgetClass = Ie;
1574
1574
  break;
1575
1575
  case "float":
1576
1576
  this._widgetClass = R;
1577
1577
  break;
1578
1578
  case "float_time":
1579
- this._widgetClass = Se;
1579
+ this._widgetClass = Ee;
1580
1580
  break;
1581
1581
  case "date":
1582
- this._widgetClass = $;
1582
+ this._widgetClass = Ye;
1583
1583
  break;
1584
1584
  case "datetime":
1585
1585
  this._widgetClass = De;
1586
1586
  break;
1587
1587
  case "progressbar":
1588
- this._widgetClass = Ye;
1588
+ this._widgetClass = Ve;
1589
1589
  break;
1590
1590
  case "markdown":
1591
- this._widgetClass = Ie;
1591
+ this._widgetClass = ze;
1592
1592
  break;
1593
1593
  case "many2many":
1594
1594
  case "one2many":
1595
1595
  case "one2many_list":
1596
- this._widgetClass = se;
1596
+ this._widgetClass = ie;
1597
1597
  break;
1598
1598
  case "newline":
1599
- this._widgetClass = Z;
1599
+ this._widgetClass = K;
1600
1600
  break;
1601
1601
  case "separator":
1602
1602
  this._widgetClass = je;
@@ -1632,13 +1632,13 @@ class q {
1632
1632
  this._widgetClass = $e;
1633
1633
  break;
1634
1634
  case "avatar":
1635
- this._widgetClass = Pe;
1635
+ this._widgetClass = ke;
1636
1636
  break;
1637
1637
  case "radio":
1638
1638
  this._widgetClass = qe;
1639
1639
  break;
1640
1640
  case "multicheckbox":
1641
- this._widgetClass = re;
1641
+ this._widgetClass = se;
1642
1642
  break;
1643
1643
  case "switch":
1644
1644
  this._widgetClass = Je;
@@ -1647,13 +1647,13 @@ class q {
1647
1647
  this._widgetClass = He;
1648
1648
  break;
1649
1649
  case "codeeditor":
1650
- this._widgetClass = ne;
1650
+ this._widgetClass = re;
1651
1651
  break;
1652
1652
  case "time":
1653
1653
  this._widgetClass = Qe;
1654
1654
  break;
1655
1655
  case "html_preview":
1656
- this._widgetClass = Ve;
1656
+ this._widgetClass = Se;
1657
1657
  break;
1658
1658
  case "alert":
1659
1659
  this._widgetClass = Xe;
@@ -1662,10 +1662,10 @@ class q {
1662
1662
  this._widgetClass = Ue;
1663
1663
  break;
1664
1664
  case "json":
1665
- this._widgetClass = Q;
1665
+ this._widgetClass = H;
1666
1666
  break;
1667
1667
  case "arrow_steps":
1668
- this._widgetClass = Q;
1668
+ this._widgetClass = H;
1669
1669
  break;
1670
1670
  case "spinner":
1671
1671
  this._widgetClass = L;
@@ -1740,7 +1740,7 @@ function st({
1740
1740
  const s = ((n = e[t]) == null ? void 0 : n.type) || "passthrough";
1741
1741
  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);
1742
1742
  }
1743
- const ae = ({
1743
+ const ne = ({
1744
1744
  context: i,
1745
1745
  values: t,
1746
1746
  fields: e
@@ -1748,14 +1748,14 @@ const ae = ({
1748
1748
  try {
1749
1749
  if (!i)
1750
1750
  return;
1751
- if (oe(i) || typeof i != "string")
1751
+ if (le(i) || typeof i != "string")
1752
1752
  return i;
1753
- const s = le(i);
1753
+ const s = ae(i);
1754
1754
  if (s !== null)
1755
1755
  return s;
1756
1756
  if (i.trim().length === 0)
1757
1757
  return;
1758
- const d = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")), f = {};
1758
+ const d = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")), g = {};
1759
1759
  return d.forEach((c) => {
1760
1760
  const b = c[1];
1761
1761
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
@@ -1764,34 +1764,34 @@ const ae = ({
1764
1764
  fields: e,
1765
1765
  fieldName: b === "active_id" ? "id" : b
1766
1766
  });
1767
- f[c[0].replace(/'/g, "")] = p || void 0;
1767
+ g[c[0].replace(/'/g, "")] = p || void 0;
1768
1768
  } else
1769
- c[1] === "true" ? f[c[0].replace(/'/g, "")] = !0 : c[1] === "false" ? f[c[0].replace(/'/g, "")] = !1 : f[c[0].replace(/'/g, "")] = c[1].replace(
1769
+ c[1] === "true" ? g[c[0].replace(/'/g, "")] = !0 : c[1] === "false" ? g[c[0].replace(/'/g, "")] = !1 : g[c[0].replace(/'/g, "")] = c[1].replace(
1770
1770
  /'/g,
1771
1771
  ""
1772
1772
  );
1773
- }), f;
1773
+ }), g;
1774
1774
  } catch {
1775
1775
  return;
1776
1776
  }
1777
1777
  }, Wt = (i) => {
1778
1778
  const t = [];
1779
1779
  try {
1780
- return !i || oe(i) || typeof i != "string" ? t : le(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) => {
1780
+ 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) => {
1781
1781
  !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1782
1782
  }), t);
1783
1783
  } catch {
1784
1784
  }
1785
1785
  return t;
1786
1786
  };
1787
- function le(i) {
1787
+ function ae(i) {
1788
1788
  try {
1789
1789
  return JSON.parse(i.replace(/'/g, '"'));
1790
1790
  } catch {
1791
1791
  return null;
1792
1792
  }
1793
1793
  }
1794
- function oe(i) {
1794
+ function le(i) {
1795
1795
  return typeof i == "object" && i !== null && typeof i != "string";
1796
1796
  }
1797
1797
  const rt = (i) => {
@@ -1933,14 +1933,14 @@ class Tt {
1933
1933
  l.forEach((u) => {
1934
1934
  const _ = u;
1935
1935
  _._id && _._context && (this._contextForFields[_._id] = u._context);
1936
- }), this._autorefreshableFields = l.filter((u) => u instanceof g && u.autoRefresh).map((u) => u._id);
1936
+ }), this._autorefreshableFields = l.filter((u) => u instanceof f && u.autoRefresh).map((u) => u._id);
1937
1937
  }
1938
1938
  parseNode({
1939
1939
  fields: t,
1940
1940
  container: e,
1941
1941
  values: s
1942
1942
  }) {
1943
- const n = new q();
1943
+ const n = new $();
1944
1944
  t.filter((a) => typeof a == "object").forEach((a) => {
1945
1945
  var v, F;
1946
1946
  const { tagName: l, attributes: o, children: u } = a;
@@ -1955,7 +1955,7 @@ class Tt {
1955
1955
  `Field ${x} doesn't exist in fields defintion`
1956
1956
  );
1957
1957
  _ = this._fields[x].type, o.widget_props = {
1958
- ...K(o.widget_props),
1958
+ ...U(o.widget_props),
1959
1959
  ...this._fields[x].widget_props || {}
1960
1960
  };
1961
1961
  }
@@ -1965,22 +1965,22 @@ class Tt {
1965
1965
  fieldsWidgetType: this._fields[x].type
1966
1966
  };
1967
1967
  }
1968
- const d = ke({
1968
+ const d = Ce({
1969
1969
  tagAttributes: h,
1970
1970
  values: s,
1971
1971
  fields: this._fields,
1972
1972
  widgetType: l
1973
1973
  });
1974
- let f;
1975
- l === "button" && h.states ? f = it({
1974
+ let g;
1975
+ l === "button" && h.states ? g = it({
1976
1976
  states: h.states,
1977
1977
  values: s
1978
- }) : f = tt({
1978
+ }) : g = tt({
1979
1979
  fieldName: h.name,
1980
1980
  values: s,
1981
1981
  fields: this._fields
1982
1982
  });
1983
- const c = ae({
1983
+ const c = ne({
1984
1984
  context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
1985
1985
  values: s,
1986
1986
  fields: this._fields
@@ -1989,21 +1989,21 @@ class Tt {
1989
1989
  h.on_change
1990
1990
  ));
1991
1991
  let b;
1992
- X(h.domain) ? b = h.domain : X((F = this._fields[h.name]) == null ? void 0 : F.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
1992
+ Q(h.domain) ? b = h.domain : Q((F = this._fields[h.name]) == null ? void 0 : F.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
1993
1993
  const p = {
1994
1994
  ...d,
1995
- ...f,
1995
+ ...g,
1996
1996
  context: c,
1997
1997
  domain: b,
1998
1998
  key: `${this._keyIdx}`
1999
1999
  };
2000
2000
  e.readOnly && (p.readonly = !0);
2001
2001
  const y = n.createWidget(_, p);
2002
- y.invisible && y instanceof g && this._invisibleFields.push(p.name), y instanceof w && this.parseNode({
2002
+ y.invisible && y instanceof f && this._invisibleFields.push(p.name), y instanceof w && this.parseNode({
2003
2003
  fields: u,
2004
2004
  container: y.container,
2005
2005
  values: s
2006
- }), y instanceof te && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
2006
+ }), y instanceof ee && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
2007
2007
  });
2008
2008
  }
2009
2009
  /**
@@ -2014,7 +2014,7 @@ class Tt {
2014
2014
  return this.container.findById(t);
2015
2015
  }
2016
2016
  }
2017
- function X(i) {
2017
+ function Q(i) {
2018
2018
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2019
2019
  }
2020
2020
  class zt {
@@ -2091,7 +2091,7 @@ class zt {
2091
2091
  parse(t) {
2092
2092
  const e = D.parse(t).filter((n) => n.tagName === "tree")[0];
2093
2093
  this._string = e.attributes.string || null, this._string && (this._string = m(this._string)), this._colors = e.attributes.colors || null, this._colors && (this._colors = m(this._colors)), this._status = e.attributes.status || null, this._status && (this._status = m(this._status)), this._editable = e.attributes.editable || null, this._infinite = e.attributes.infinite || !1;
2094
- const s = new q();
2094
+ const s = new $();
2095
2095
  e.children.forEach((n) => {
2096
2096
  const { tagName: a, attributes: l } = n;
2097
2097
  let o = null;
@@ -2103,7 +2103,7 @@ class zt {
2103
2103
  throw new Error(`Field ${u} doesn't exist in fields defintion`);
2104
2104
  const d = this._fields[u];
2105
2105
  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;
2106
- const f = ae({
2106
+ const g = ne({
2107
2107
  context: l.context || d.context,
2108
2108
  values: {},
2109
2109
  fields: this._fields
@@ -2112,8 +2112,8 @@ class zt {
2112
2112
  ...d,
2113
2113
  ...l,
2114
2114
  fieldsWidgetType: d == null ? void 0 : d.type,
2115
- context: f
2116
- }, this._contextForFields[u] = f;
2115
+ context: g
2116
+ }, this._contextForFields[u] = g;
2117
2117
  }
2118
2118
  if (_ && (o = _), !h.invisible) {
2119
2119
  const d = s.createWidget(o, h);
@@ -2171,7 +2171,7 @@ class It {
2171
2171
  return this._advancedSearchContainer;
2172
2172
  }
2173
2173
  parse() {
2174
- const t = new q();
2174
+ const t = new $();
2175
2175
  this.parseFields(
2176
2176
  this.searchFields.primary,
2177
2177
  t
@@ -2250,7 +2250,7 @@ class Vt {
2250
2250
  return this._items;
2251
2251
  }
2252
2252
  }
2253
- class ce {
2253
+ class oe {
2254
2254
  constructor(t) {
2255
2255
  r(this, "_string", null);
2256
2256
  r(this, "_type");
@@ -2278,7 +2278,7 @@ class ce {
2278
2278
  return this._y_range;
2279
2279
  }
2280
2280
  }
2281
- class ue extends ce {
2281
+ class ce extends oe {
2282
2282
  constructor(e, s) {
2283
2283
  super(s);
2284
2284
  r(this, "_color", null);
@@ -2304,7 +2304,7 @@ class ue extends ce {
2304
2304
  return this._suffix;
2305
2305
  }
2306
2306
  }
2307
- class ot extends ue {
2307
+ class ot extends ce {
2308
2308
  constructor(e, s) {
2309
2309
  super(e, s);
2310
2310
  r(this, "_field");
@@ -2354,7 +2354,7 @@ const ct = (i) => {
2354
2354
  y: t
2355
2355
  };
2356
2356
  };
2357
- class j extends ce {
2357
+ class j extends oe {
2358
2358
  constructor(e, s) {
2359
2359
  super(s);
2360
2360
  r(this, "_x");
@@ -2371,7 +2371,7 @@ class j extends ce {
2371
2371
  }
2372
2372
  }
2373
2373
  const ut = {
2374
- indicator: ue,
2374
+ indicator: ce,
2375
2375
  indicatorField: ot,
2376
2376
  line: j,
2377
2377
  bar: j,
@@ -2385,7 +2385,7 @@ const ut = {
2385
2385
  throw new Error(`${e} not found as a GraphModel`);
2386
2386
  return new s(e, t);
2387
2387
  };
2388
- class de {
2388
+ class ue {
2389
2389
  constructor({ name: t, axis: e }) {
2390
2390
  r(this, "_name");
2391
2391
  r(this, "_axis");
@@ -2398,7 +2398,7 @@ class de {
2398
2398
  return this._axis;
2399
2399
  }
2400
2400
  }
2401
- class dt extends de {
2401
+ class dt extends ue {
2402
2402
  constructor({
2403
2403
  name: e,
2404
2404
  operator: s,
@@ -2421,7 +2421,7 @@ class dt extends de {
2421
2421
  return this._stacked;
2422
2422
  }
2423
2423
  }
2424
- class ht extends de {
2424
+ class ht extends ue {
2425
2425
  constructor({ name: t }) {
2426
2426
  super({ name: t, axis: "x" });
2427
2427
  }
@@ -2432,7 +2432,7 @@ const _t = ({ ooui: i }) => {
2432
2432
  s.operator !== "count" && !e.includes(s.name) && e.push(s.name), s.label && !e.includes(s.label) && e.push(s.label);
2433
2433
  }), e) : [];
2434
2434
  };
2435
- function J({
2435
+ function q({
2436
2436
  fields: i,
2437
2437
  values: t,
2438
2438
  fieldName: e
@@ -2451,7 +2451,7 @@ function J({
2451
2451
  const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2452
2452
  __proto__: null,
2453
2453
  getFieldsToRetrieve: _t,
2454
- getValueAndLabelForField: J
2454
+ getValueAndLabelForField: q
2455
2455
  }, Symbol.toStringTag, { value: "Module" }));
2456
2456
  function ft({
2457
2457
  values: i,
@@ -2474,7 +2474,7 @@ function gt({
2474
2474
  interval: e = 1
2475
2475
  }) {
2476
2476
  let s = [];
2477
- const n = _e({
2477
+ const n = he({
2478
2478
  values: i,
2479
2479
  groupBy: "type-stacked"
2480
2480
  }), a = `${t}s`;
@@ -2484,10 +2484,10 @@ function gt({
2484
2484
  const h = u[_];
2485
2485
  if (s.push(h), _ === u.length - 1)
2486
2486
  return;
2487
- const d = h.x, f = u[_ + 1].x;
2488
- if (!he([d, f], a)) {
2487
+ const d = h.x, g = u[_ + 1].x;
2488
+ if (!de([d, g], a)) {
2489
2489
  const c = mt({
2490
- dates: [d, f],
2490
+ dates: [d, g],
2491
2491
  timerange: t,
2492
2492
  interval: e
2493
2493
  });
@@ -2514,7 +2514,7 @@ function mt({
2514
2514
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2515
2515
  for (let l = 0; l < a.length - 1; l++) {
2516
2516
  const o = a[l], u = a[l + 1];
2517
- if (!he([o, u], n)) {
2517
+ if (!de([o, u], n)) {
2518
2518
  const _ = T(o, S(n)).add(
2519
2519
  e,
2520
2520
  n
@@ -2532,7 +2532,7 @@ function bt({
2532
2532
  const e = yt({
2533
2533
  values: i,
2534
2534
  timerange: t
2535
- }), s = [], n = _e({
2535
+ }), s = [], n = he({
2536
2536
  values: e,
2537
2537
  groupBy: "all"
2538
2538
  });
@@ -2592,7 +2592,7 @@ function pt({
2592
2592
  function xt(i) {
2593
2593
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2594
2594
  }
2595
- function he(i, t) {
2595
+ function de(i, t) {
2596
2596
  let e = !1;
2597
2597
  const s = S(t);
2598
2598
  if (i.length === 0)
@@ -2605,7 +2605,7 @@ function he(i, t) {
2605
2605
  }
2606
2606
  return e;
2607
2607
  }
2608
- function _e({
2608
+ function he({
2609
2609
  values: i,
2610
2610
  groupBy: t
2611
2611
  }) {
@@ -2659,17 +2659,17 @@ const wt = {
2659
2659
  fields: e
2660
2660
  });
2661
2661
  Object.keys(v).forEach((F) => {
2662
- const x = v[F].entries, I = v[F].label, me = N({
2662
+ const x = v[F].entries, I = v[F].label, ge = N({
2663
2663
  entries: x,
2664
2664
  fields: e,
2665
2665
  fieldName: c.name
2666
- }), be = Y({
2667
- values: me,
2666
+ }), me = Y({
2667
+ values: ge,
2668
2668
  operator: c.operator
2669
2669
  });
2670
2670
  a.push({
2671
2671
  x: p || !1,
2672
- value: be,
2672
+ value: me,
2673
2673
  type: I,
2674
2674
  operator: c.operator,
2675
2675
  stacked: c.stacked
@@ -2687,7 +2687,7 @@ const wt = {
2687
2687
  a.push({
2688
2688
  x: p || !1,
2689
2689
  value: F,
2690
- type: fe({
2690
+ type: _e({
2691
2691
  yAxis: c,
2692
2692
  fields: e
2693
2693
  }),
@@ -2710,25 +2710,25 @@ const wt = {
2710
2710
  timerange: i.timerange,
2711
2711
  interval: i.interval
2712
2712
  }) : i.type == "pie" && (d = h.sort((c, b) => b.value - c.value));
2713
- const f = {
2713
+ const g = {
2714
2714
  data: d,
2715
2715
  isGroup: o || l,
2716
2716
  isStack: o
2717
2717
  };
2718
- if (i.type === "line" && i.y_range && (f.yAxisOpts = {
2718
+ if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2719
2719
  mode: i.y_range
2720
2720
  }, i.y_range === "auto")) {
2721
- const { min: c, max: b } = ge(d);
2722
- f.yAxisOpts.valueOpts = { min: c, max: b };
2721
+ const { min: c, max: b } = fe(d);
2722
+ g.yAxisOpts.valueOpts = { min: c, max: b };
2723
2723
  }
2724
- return f;
2724
+ return g;
2725
2725
  };
2726
2726
  function N({
2727
2727
  entries: i,
2728
2728
  fieldName: t,
2729
2729
  fields: e
2730
2730
  }) {
2731
- return i.map((s) => J({
2731
+ return i.map((s) => q({
2732
2732
  fieldName: t,
2733
2733
  values: s,
2734
2734
  fields: e
@@ -2779,7 +2779,7 @@ function B({
2779
2779
  }) {
2780
2780
  const s = {};
2781
2781
  return e.forEach((n) => {
2782
- const { value: a, label: l } = J({
2782
+ const { value: a, label: l } = q({
2783
2783
  fields: t,
2784
2784
  values: n,
2785
2785
  fieldName: i
@@ -2794,14 +2794,14 @@ function Ft(i) {
2794
2794
  t = t.concat(s.entries);
2795
2795
  }), t;
2796
2796
  }
2797
- function fe({
2797
+ function _e({
2798
2798
  yAxis: i,
2799
2799
  fields: t
2800
2800
  }) {
2801
2801
  const e = t[i.name];
2802
2802
  return e != null && e.string ? e.string : i.name;
2803
2803
  }
2804
- function ge(i, t = 0.1) {
2804
+ function fe(i, t = 0.1) {
2805
2805
  if (i.length === 0)
2806
2806
  throw new Error("The values array cannot be empty.");
2807
2807
  const e = i.map((l) => l.value), s = Math.min(...e), n = Math.max(...e), a = (n - s) * t;
@@ -2813,59 +2813,59 @@ function ge(i, t = 0.1) {
2813
2813
  const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2814
2814
  __proto__: null,
2815
2815
  getAllObjectsInGroupedValues: Ft,
2816
- getMinMax: ge,
2816
+ getMinMax: fe,
2817
2817
  getValueForOperator: Y,
2818
2818
  getValuesForYField: N,
2819
2819
  getValuesGroupedByField: B,
2820
- getYAxisFieldname: fe,
2820
+ getYAxisFieldname: _e,
2821
2821
  labelsForOperator: wt,
2822
2822
  processGraphData: vt
2823
2823
  }, Symbol.toStringTag, { value: "Module" }));
2824
2824
  export {
2825
2825
  Xe as Alert,
2826
- Pe as Avatar,
2826
+ ke as Avatar,
2827
2827
  Ae as Binary,
2828
- ie as Boolean,
2829
- te as Button,
2830
- Te as ButtonGroup,
2828
+ te as Boolean,
2829
+ ee as Button,
2830
+ We as ButtonGroup,
2831
2831
  Ze as Carousel,
2832
2832
  A as Char,
2833
- ne as CodeEditor,
2833
+ re as CodeEditor,
2834
2834
  et as ColorPicker,
2835
2835
  Ue as Comments,
2836
2836
  V as Container,
2837
2837
  w as ContainerWidget,
2838
2838
  Vt as Dashboard,
2839
2839
  lt as DashboardItem,
2840
- $ as Date,
2840
+ Ye as Date,
2841
2841
  De as DateTime,
2842
2842
  Ke as Email,
2843
- g as Field,
2843
+ f as Field,
2844
2844
  R as Float,
2845
- Se as FloatTime,
2845
+ Ee as FloatTime,
2846
2846
  Tt as Form,
2847
- ce as Graph,
2848
- de as GraphAxis,
2847
+ oe as Graph,
2848
+ ue as GraphAxis,
2849
2849
  j as GraphChart,
2850
- ue as GraphIndicator,
2850
+ ce as GraphIndicator,
2851
2851
  ot as GraphIndicatorField,
2852
2852
  ht as GraphXAxis,
2853
2853
  dt as GraphYAxis,
2854
- We as Group,
2855
- Ve as HTMLPreview,
2854
+ Oe as Group,
2855
+ Se as HTMLPreview,
2856
2856
  Ne as Image,
2857
2857
  Ge as Indicator,
2858
- Ee as Integer,
2859
- Q as JSONField,
2860
- ee as Label,
2861
- ze as Many2one,
2862
- Ie as Markdown,
2863
- re as MultiCheckbox,
2864
- Z as NewLine,
2858
+ Ie as Integer,
2859
+ H as JSONField,
2860
+ Z as Label,
2861
+ Te as Many2one,
2862
+ ze as Markdown,
2863
+ se as MultiCheckbox,
2864
+ K as NewLine,
2865
2865
  M as Notebook,
2866
- se as One2many,
2867
- Oe as Page,
2868
- Ye as ProgressBar,
2866
+ ie as One2many,
2867
+ Pe as Page,
2868
+ Ve as ProgressBar,
2869
2869
  qe as Radio,
2870
2870
  Me as Reference,
2871
2871
  at as SearchFieldTypes,
@@ -2884,7 +2884,7 @@ export {
2884
2884
  C as Widget,
2885
2885
  Dt as graphFieldUtils,
2886
2886
  jt as graphProcessor,
2887
- ae as parseContext,
2887
+ ne as parseContext,
2888
2888
  Wt as parseContextFields,
2889
2889
  St as parseDomainFields,
2890
2890
  Yt as parseGraph,