@gisce/ooui 2.21.0-alpha.3 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ooui.es.js CHANGED
@@ -1,17 +1,17 @@
1
- var ge = Object.defineProperty;
2
- var me = (i, t, e) => t in i ? ge(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var n = (i, t, e) => (me(i, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { decode as be } from "html-entities";
5
- import { evaluateCondition as ye } from "@gisce/conscheck";
1
+ var fe = Object.defineProperty;
2
+ var ge = (i, t, e) => t in i ? fe(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var n = (i, t, e) => (ge(i, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { decode as me } from "html-entities";
5
+ import { evaluateCondition as be } from "@gisce/conscheck";
6
6
  import * as Y from "txml";
7
7
  import P from "moment";
8
- const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe = ({
8
+ const ye = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe = ({
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 = H({
15
15
  fieldName: s,
16
16
  valueInObject: l,
17
17
  expectedValue: a,
@@ -41,7 +41,7 @@ const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, b = (i) => be(i, { level: "xml" }), Q = ({
44
+ }, b = (i) => me(i, { level: "xml" }), H = ({
45
45
  fieldName: i,
46
46
  valueInObject: t,
47
47
  expectedValue: e,
@@ -61,19 +61,19 @@ const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe
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 = 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
- }, we = ({
64
+ }, pe = ({
65
65
  attrs: i,
66
66
  values: t,
67
67
  fields: e,
68
68
  widgetType: s
69
69
  }) => {
70
- const d = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = b(d), h = JSON.parse(_), u = {};
71
- for (const g of Object.keys(h)) {
72
- const p = h[g].map((y) => xe({ entry: y, values: t, fields: e })).every((y) => y);
73
- p ? u[g] = !0 : g === "readonly" && !p && s === "button" && (u[g] = !1);
70
+ const h = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = b(h), u = JSON.parse(_), d = {};
71
+ for (const f of Object.keys(u)) {
72
+ const x = u[f].map((y) => xe({ entry: y, values: t, fields: e })).every((y) => y);
73
+ x ? d[f] = !0 : f === "readonly" && !x && s === "button" && (d[f] = !1);
74
74
  }
75
- return u;
76
- }, ve = ({
75
+ return d;
76
+ }, we = ({
77
77
  attrs: i,
78
78
  values: t,
79
79
  fields: e,
@@ -84,21 +84,21 @@ const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe
84
84
  r.replace(/'/g, '"')
85
85
  ), l = {};
86
86
  for (const o of Object.keys(a)) {
87
- const d = ye({
87
+ const h = be({
88
88
  object: t,
89
89
  condition: a[o],
90
90
  evaluateFieldComparison: ({
91
91
  fieldName: _,
92
- valueInObject: h,
93
- expectedValue: u
94
- }) => Q({
92
+ valueInObject: u,
93
+ expectedValue: d
94
+ }) => H({
95
95
  fieldName: _,
96
- valueInObject: h,
97
- expectedValue: u,
96
+ valueInObject: u,
97
+ expectedValue: d,
98
98
  fields: e
99
99
  })
100
100
  });
101
- d ? l[o] = !0 : o === "readonly" && !d && s === "button" && (l[o] = !1);
101
+ h ? l[o] = !0 : o === "readonly" && !h && s === "button" && (l[o] = !1);
102
102
  }
103
103
  return l;
104
104
  } catch (r) {
@@ -106,7 +106,7 @@ const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe
106
106
  "Error parsing new json_attrs. Original string: " + i
107
107
  ) : r;
108
108
  }
109
- }, Fe = ({
109
+ }, ve = ({
110
110
  tagAttributes: i,
111
111
  values: t,
112
112
  fields: e,
@@ -114,14 +114,14 @@ const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe
114
114
  fallbackMode: r = !0
115
115
  }) => {
116
116
  let a = {}, l = {};
117
- if (i.attrs && (l = we({
117
+ if (i.attrs && (l = pe({
118
118
  attrs: i.attrs,
119
119
  values: t,
120
120
  fields: e,
121
121
  widgetType: s
122
122
  })), i.json_attrs)
123
123
  try {
124
- a = ve({
124
+ a = we({
125
125
  attrs: i.json_attrs,
126
126
  values: t,
127
127
  fields: e,
@@ -141,7 +141,7 @@ const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe
141
141
  attrs: void 0,
142
142
  json_attrs: void 0
143
143
  };
144
- }, D = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", k = class k {
144
+ }, k = class k {
145
145
  constructor(t) {
146
146
  /**
147
147
  * Determines if widget is read only (default is undefined)
@@ -174,7 +174,7 @@ const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe
174
174
  n(this, "_parsedWidgetProps", {});
175
175
  n(this, "_isFunction");
176
176
  if (this._colspan = k._defaultColspan, this._invisible = !1, t) {
177
- if (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (this._readOnly = D(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.widget_props)
177
+ if (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (t.readonly === "1" || t.readonly === 1 || t.readonly === !0 ? this._readOnly = !0 : (t.readonly === "0" || t.readonly === 0 || t.readonly === !1) && (this._readOnly = !1)), 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.widget_props)
178
178
  if (typeof t.widget_props == "string")
179
179
  try {
180
180
  this._parsedWidgetProps = JSON.parse(
@@ -254,7 +254,7 @@ const pe = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), xe
254
254
  */
255
255
  n(k, "_defaultColspan", 1);
256
256
  let C = k;
257
- class f extends C {
257
+ class g extends C {
258
258
  constructor(e) {
259
259
  super(e);
260
260
  /**
@@ -304,8 +304,7 @@ class f extends C {
304
304
  * Base type of the field
305
305
  */
306
306
  n(this, "_fieldType", "");
307
- n(this, "_autoRefresh", !1);
308
- this._activated = !0, e && (e.name && (this._id = e.name), e.type && (this._fieldType = e.fieldsWidgetType), 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 = pe(e.help_inline)), e.autorefresh && (this.autoRefresh = D(e.autorefresh)));
307
+ this._activated = !0, e && (e.name && (this._id = e.name), e.type && (this._fieldType = e.fieldsWidgetType), 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 = ye(e.help_inline)));
309
308
  }
310
309
  get id() {
311
310
  return this._id;
@@ -364,18 +363,6 @@ class f extends C {
364
363
  get fieldType() {
365
364
  return this._fieldType;
366
365
  }
367
- get autoRefresh() {
368
- return this._autoRefresh ?? !1;
369
- }
370
- set autoRefresh(e) {
371
- this._autoRefresh = e;
372
- }
373
- get readOnly() {
374
- return this.autoRefresh ? !0 : super.readOnly;
375
- }
376
- set readOnly(e) {
377
- super.readOnly = e;
378
- }
379
366
  /**
380
367
  * Returns this instance in case this id matches param id.
381
368
  * @param {string} id id (name) to find
@@ -384,14 +371,14 @@ class f extends C {
384
371
  return this._id === e ? this : null;
385
372
  }
386
373
  }
387
- class Ce extends f {
374
+ class Fe extends g {
388
375
  }
389
- class X extends C {
376
+ class Q extends C {
390
377
  findById(t) {
391
378
  return null;
392
379
  }
393
380
  }
394
- class U extends f {
381
+ class X extends g {
395
382
  constructor(e) {
396
383
  super({ ...e, nolabel: !0 });
397
384
  /**
@@ -514,13 +501,13 @@ class z {
514
501
  }
515
502
  addWidget(t, e) {
516
503
  const s = [], r = e ? e.addLabel : !0;
517
- if (t instanceof X) {
504
+ if (t instanceof Q) {
518
505
  this._rows.push([]), this._index++;
519
506
  return;
520
507
  }
521
- if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, r && t instanceof f && !t.nolabel) {
508
+ if (t.colspan > this._columns && (t.colspan = this._columns), t.readOnly = t.readOnly || this.readOnly, r && t instanceof g && !t.nolabel) {
522
509
  t.colspan > 1 && (t.colspan -= 1);
523
- const l = new U({
510
+ const l = new X({
524
511
  name: t.id + "_label",
525
512
  string: t.label,
526
513
  invisible: t.invisible,
@@ -648,8 +635,8 @@ const T = class T extends v {
648
635
  }
649
636
  };
650
637
  n(T, "_defaultColspan", 3);
651
- let M = T;
652
- class B extends v {
638
+ let j = T;
639
+ class A extends v {
653
640
  constructor(e) {
654
641
  super(e);
655
642
  n(this, "_loading", !1);
@@ -662,7 +649,7 @@ class B extends v {
662
649
  this._loading = e;
663
650
  }
664
651
  }
665
- class ke extends B {
652
+ class Ce extends A {
666
653
  constructor(e) {
667
654
  super(e);
668
655
  n(this, "_icon", null);
@@ -675,7 +662,7 @@ class ke extends B {
675
662
  this._icon = e;
676
663
  }
677
664
  }
678
- class Oe extends B {
665
+ class ke extends A {
679
666
  constructor(e) {
680
667
  super(e);
681
668
  n(this, "_icon", null);
@@ -688,7 +675,7 @@ class Oe extends B {
688
675
  this._icon = e;
689
676
  }
690
677
  }
691
- class K extends f {
678
+ class U extends g {
692
679
  constructor(e) {
693
680
  super({
694
681
  ...e,
@@ -760,7 +747,7 @@ class K extends f {
760
747
  this._danger = e;
761
748
  }
762
749
  }
763
- class Te extends v {
750
+ class Oe extends v {
764
751
  constructor(e) {
765
752
  super(e);
766
753
  n(this, "_defaultName", "");
@@ -791,7 +778,7 @@ class Te extends v {
791
778
  return this._container.rows.flat().filter((e) => !e.invisible);
792
779
  }
793
780
  }
794
- class q extends f {
781
+ class R extends g {
795
782
  constructor(e) {
796
783
  super(e);
797
784
  /**
@@ -834,7 +821,7 @@ class q extends f {
834
821
  this._translatable = e;
835
822
  }
836
823
  }
837
- class L extends f {
824
+ class B extends g {
838
825
  constructor(e) {
839
826
  super(e);
840
827
  /**
@@ -898,7 +885,7 @@ class L extends f {
898
885
  this._translatable = e;
899
886
  }
900
887
  }
901
- class W extends f {
888
+ class W extends g {
902
889
  constructor(e) {
903
890
  super(e);
904
891
  /**
@@ -914,7 +901,7 @@ class W extends f {
914
901
  this._size = e;
915
902
  }
916
903
  }
917
- class Pe extends f {
904
+ class Te extends g {
918
905
  constructor(e) {
919
906
  super(e);
920
907
  /**
@@ -940,19 +927,19 @@ class Pe extends f {
940
927
  this._relation = e;
941
928
  }
942
929
  }
943
- class We extends L {
930
+ class Pe extends B {
944
931
  }
945
- class Z extends f {
932
+ class K extends g {
946
933
  constructor(t) {
947
934
  super(t);
948
935
  }
949
936
  }
950
- class Ee extends f {
937
+ class We extends g {
951
938
  constructor(t) {
952
939
  super(t);
953
940
  }
954
941
  }
955
- class G extends f {
942
+ class L extends g {
956
943
  constructor(e) {
957
944
  super(e);
958
945
  /**
@@ -985,23 +972,23 @@ class G extends f {
985
972
  this._decimalDigits = e;
986
973
  }
987
974
  }
988
- class Ie extends G {
975
+ class Ee extends L {
989
976
  }
990
- class Se extends f {
977
+ class Ie extends g {
991
978
  }
992
- class ze extends G {
979
+ class Se extends L {
993
980
  }
994
- class Ve extends f {
981
+ class ze extends g {
995
982
  constructor(t) {
996
983
  super(t);
997
984
  }
998
985
  }
999
- class Ye extends f {
986
+ class Ve extends g {
1000
987
  constructor(t) {
1001
988
  super(t);
1002
989
  }
1003
990
  }
1004
- class ee extends f {
991
+ class Z extends g {
1005
992
  constructor(e) {
1006
993
  super(e);
1007
994
  /**
@@ -1095,7 +1082,7 @@ class ee extends f {
1095
1082
  this._infinite = e;
1096
1083
  }
1097
1084
  }
1098
- class De extends C {
1085
+ class Ye extends C {
1099
1086
  constructor(e) {
1100
1087
  super(e);
1101
1088
  /**
@@ -1121,9 +1108,9 @@ class De extends C {
1121
1108
  return null;
1122
1109
  }
1123
1110
  }
1124
- class je extends W {
1111
+ class De extends W {
1125
1112
  }
1126
- class Me extends f {
1113
+ class je extends g {
1127
1114
  constructor(e) {
1128
1115
  super(e);
1129
1116
  /**
@@ -1139,18 +1126,18 @@ class Me extends f {
1139
1126
  this._filenameField = e;
1140
1127
  }
1141
1128
  }
1142
- class Ne extends f {
1129
+ class Me extends g {
1143
1130
  get showControls() {
1144
1131
  var t;
1145
1132
  return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
1146
1133
  }
1147
1134
  }
1148
- class Ae extends f {
1135
+ class Ne extends g {
1149
1136
  constructor(t) {
1150
1137
  super(t);
1151
1138
  }
1152
1139
  }
1153
- class Be extends ee {
1140
+ class Ae extends Z {
1154
1141
  constructor(e) {
1155
1142
  super(e);
1156
1143
  /**
@@ -1182,7 +1169,7 @@ class Be extends ee {
1182
1169
  return this.parsedWidgetProps.colorField;
1183
1170
  }
1184
1171
  }
1185
- class Le extends W {
1172
+ class Be extends W {
1186
1173
  constructor(e) {
1187
1174
  super(e);
1188
1175
  n(this, "_nolabel", !0);
@@ -1232,7 +1219,7 @@ class Le extends W {
1232
1219
  this._height = e;
1233
1220
  }
1234
1221
  }
1235
- class te extends f {
1222
+ class ee extends g {
1236
1223
  constructor(e) {
1237
1224
  super(e);
1238
1225
  /**
@@ -1285,9 +1272,9 @@ class te extends f {
1285
1272
  this._columns = e;
1286
1273
  }
1287
1274
  }
1288
- class Ge extends te {
1275
+ class Le extends ee {
1289
1276
  }
1290
- class Re extends W {
1277
+ class Ge extends W {
1291
1278
  get colors() {
1292
1279
  return this._parsedWidgetProps.colors || {};
1293
1280
  }
@@ -1308,9 +1295,9 @@ class $e extends W {
1308
1295
  this._direction = e;
1309
1296
  }
1310
1297
  }
1311
- class qe extends Z {
1298
+ class Re extends K {
1312
1299
  }
1313
- class Je extends f {
1300
+ class qe extends g {
1314
1301
  constructor(e) {
1315
1302
  super(e);
1316
1303
  /**
@@ -1340,7 +1327,7 @@ class Je extends f {
1340
1327
  this._lastStep = e;
1341
1328
  }
1342
1329
  }
1343
- class ie extends L {
1330
+ class te extends B {
1344
1331
  constructor(e) {
1345
1332
  super(e);
1346
1333
  n(this, "_lang", null);
@@ -1353,12 +1340,12 @@ class ie extends L {
1353
1340
  this._lang = e;
1354
1341
  }
1355
1342
  }
1356
- class He extends f {
1343
+ class Je extends g {
1357
1344
  constructor(t) {
1358
1345
  super(t);
1359
1346
  }
1360
1347
  }
1361
- class Qe extends v {
1348
+ class He extends v {
1362
1349
  constructor(e) {
1363
1350
  super(e);
1364
1351
  /**
@@ -1398,7 +1385,7 @@ class Qe extends v {
1398
1385
  return this._container.rows.flat().filter((e) => !e.invisible);
1399
1386
  }
1400
1387
  }
1401
- class Xe extends f {
1388
+ class Qe extends g {
1402
1389
  constructor(e) {
1403
1390
  super(e);
1404
1391
  /**
@@ -1417,13 +1404,13 @@ class Xe extends f {
1417
1404
  this._height = e;
1418
1405
  }
1419
1406
  }
1420
- class J extends ie {
1407
+ class q extends te {
1421
1408
  constructor() {
1422
1409
  super(...arguments);
1423
1410
  n(this, "_lang", "json");
1424
1411
  }
1425
1412
  }
1426
- class Ue extends f {
1413
+ class Xe extends g {
1427
1414
  constructor(e) {
1428
1415
  super(e);
1429
1416
  n(this, "_multi", !1);
@@ -1443,7 +1430,7 @@ class Ue extends f {
1443
1430
  this._size = e;
1444
1431
  }
1445
1432
  }
1446
- class R {
1433
+ class G {
1447
1434
  constructor() {
1448
1435
  /**
1449
1436
  * Widget class
@@ -1453,138 +1440,138 @@ class R {
1453
1440
  setWidgetClass(t) {
1454
1441
  switch (t) {
1455
1442
  case "notebook":
1456
- this._widgetClass = M;
1443
+ this._widgetClass = j;
1457
1444
  break;
1458
1445
  case "page":
1459
- this._widgetClass = ke;
1446
+ this._widgetClass = Ce;
1460
1447
  break;
1461
1448
  case "group":
1462
- this._widgetClass = Oe;
1449
+ this._widgetClass = ke;
1463
1450
  break;
1464
1451
  case "label":
1465
- this._widgetClass = U;
1452
+ this._widgetClass = X;
1466
1453
  break;
1467
1454
  case "char":
1468
- this._widgetClass = q;
1455
+ this._widgetClass = R;
1469
1456
  break;
1470
1457
  case "text":
1471
- this._widgetClass = L;
1458
+ this._widgetClass = B;
1472
1459
  break;
1473
1460
  case "button":
1474
- this._widgetClass = K;
1461
+ this._widgetClass = U;
1475
1462
  break;
1476
1463
  case "buttonGroup":
1477
- this._widgetClass = Te;
1464
+ this._widgetClass = Oe;
1478
1465
  break;
1479
1466
  case "selection":
1480
1467
  this._widgetClass = W;
1481
1468
  break;
1482
1469
  case "many2one":
1483
- this._widgetClass = Pe;
1470
+ this._widgetClass = Te;
1484
1471
  break;
1485
1472
  case "boolean":
1486
- this._widgetClass = Z;
1473
+ this._widgetClass = K;
1487
1474
  break;
1488
1475
  case "integer":
1489
- this._widgetClass = Ee;
1476
+ this._widgetClass = We;
1490
1477
  break;
1491
1478
  case "float":
1492
- this._widgetClass = G;
1479
+ this._widgetClass = L;
1493
1480
  break;
1494
1481
  case "float_time":
1495
- this._widgetClass = Ie;
1482
+ this._widgetClass = Ee;
1496
1483
  break;
1497
1484
  case "date":
1498
- this._widgetClass = Ve;
1485
+ this._widgetClass = ze;
1499
1486
  break;
1500
1487
  case "datetime":
1501
- this._widgetClass = Ye;
1488
+ this._widgetClass = Ve;
1502
1489
  break;
1503
1490
  case "progressbar":
1504
- this._widgetClass = ze;
1491
+ this._widgetClass = Se;
1505
1492
  break;
1506
1493
  case "markdown":
1507
- this._widgetClass = We;
1494
+ this._widgetClass = Pe;
1508
1495
  break;
1509
1496
  case "many2many":
1510
1497
  case "one2many":
1511
1498
  case "one2many_list":
1512
- this._widgetClass = ee;
1499
+ this._widgetClass = Z;
1513
1500
  break;
1514
1501
  case "newline":
1515
- this._widgetClass = X;
1502
+ this._widgetClass = Q;
1516
1503
  break;
1517
1504
  case "separator":
1518
- this._widgetClass = De;
1505
+ this._widgetClass = Ye;
1519
1506
  break;
1520
1507
  case "url":
1521
- this._widgetClass = q;
1508
+ this._widgetClass = R;
1522
1509
  break;
1523
1510
  case "email":
1524
- this._widgetClass = Ue;
1511
+ this._widgetClass = Xe;
1525
1512
  break;
1526
1513
  case "reference":
1527
- this._widgetClass = je;
1514
+ this._widgetClass = De;
1528
1515
  break;
1529
1516
  case "binary":
1530
- this._widgetClass = Me;
1517
+ this._widgetClass = je;
1531
1518
  break;
1532
1519
  case "image":
1533
- this._widgetClass = Ne;
1520
+ this._widgetClass = Me;
1534
1521
  break;
1535
1522
  case "fiber_grid":
1536
- this._widgetClass = Ae;
1523
+ this._widgetClass = Ne;
1537
1524
  break;
1538
1525
  case "timeline":
1539
- this._widgetClass = Be;
1526
+ this._widgetClass = Ae;
1540
1527
  break;
1541
1528
  case "indicator":
1542
- this._widgetClass = Le;
1529
+ this._widgetClass = Be;
1543
1530
  break;
1544
1531
  case "tags":
1545
- this._widgetClass = Ge;
1532
+ this._widgetClass = Le;
1546
1533
  break;
1547
1534
  case "tag":
1548
- this._widgetClass = Re;
1535
+ this._widgetClass = Ge;
1549
1536
  break;
1550
1537
  case "avatar":
1551
- this._widgetClass = Ce;
1538
+ this._widgetClass = Fe;
1552
1539
  break;
1553
1540
  case "radio":
1554
1541
  this._widgetClass = $e;
1555
1542
  break;
1556
1543
  case "multicheckbox":
1557
- this._widgetClass = te;
1544
+ this._widgetClass = ee;
1558
1545
  break;
1559
1546
  case "switch":
1560
- this._widgetClass = qe;
1547
+ this._widgetClass = Re;
1561
1548
  break;
1562
1549
  case "steps":
1563
- this._widgetClass = Je;
1550
+ this._widgetClass = qe;
1564
1551
  break;
1565
1552
  case "codeeditor":
1566
- this._widgetClass = ie;
1553
+ this._widgetClass = te;
1567
1554
  break;
1568
1555
  case "time":
1569
- this._widgetClass = He;
1556
+ this._widgetClass = Je;
1570
1557
  break;
1571
1558
  case "html_preview":
1572
- this._widgetClass = Se;
1559
+ this._widgetClass = Ie;
1573
1560
  break;
1574
1561
  case "alert":
1575
- this._widgetClass = Qe;
1562
+ this._widgetClass = He;
1576
1563
  break;
1577
1564
  case "comments_timeline":
1578
- this._widgetClass = Xe;
1565
+ this._widgetClass = Qe;
1579
1566
  break;
1580
1567
  case "json":
1581
- this._widgetClass = J;
1568
+ this._widgetClass = q;
1582
1569
  break;
1583
1570
  case "arrow_steps":
1584
- this._widgetClass = J;
1571
+ this._widgetClass = q;
1585
1572
  break;
1586
1573
  case "spinner":
1587
- this._widgetClass = B;
1574
+ this._widgetClass = A;
1588
1575
  break;
1589
1576
  }
1590
1577
  }
@@ -1607,7 +1594,7 @@ class R {
1607
1594
  }
1608
1595
  }
1609
1596
  }
1610
- const Ke = ({
1597
+ const Ue = ({
1611
1598
  fieldName: i,
1612
1599
  values: t,
1613
1600
  fields: e
@@ -1621,18 +1608,18 @@ const Ke = ({
1621
1608
  const r = {}, a = {};
1622
1609
  for (const o of Object.keys(s))
1623
1610
  if (t.state === o) {
1624
- const d = s[o];
1625
- for (const _ of d) {
1626
- const [h, u] = _;
1627
- a[h] || (a[h] = []), a[h].push(u);
1611
+ const h = s[o];
1612
+ for (const _ of h) {
1613
+ const [u, d] = _;
1614
+ a[u] || (a[u] = []), a[u].push(d);
1628
1615
  }
1629
1616
  }
1630
1617
  for (const o of Object.keys(a)) {
1631
- const d = a[o];
1632
- r[o] = d.some((_) => _);
1618
+ const h = a[o];
1619
+ r[o] = h.some((_) => _);
1633
1620
  }
1634
1621
  return r;
1635
- }, Ze = ({
1622
+ }, Ke = ({
1636
1623
  states: i,
1637
1624
  values: t
1638
1625
  }) => {
@@ -1641,7 +1628,7 @@ const Ke = ({
1641
1628
  const e = i.split(",");
1642
1629
  return e.length === 0 ? {} : e.includes(t.state) ? {} : { invisible: !0 };
1643
1630
  };
1644
- function et({
1631
+ function Ze({
1645
1632
  values: i = {},
1646
1633
  fieldName: t,
1647
1634
  fields: e = {}
@@ -1650,7 +1637,7 @@ function et({
1650
1637
  const s = ((r = e[t]) == null ? void 0 : r.type) || "passthrough";
1651
1638
  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);
1652
1639
  }
1653
- const se = ({
1640
+ const ie = ({
1654
1641
  context: i,
1655
1642
  values: t,
1656
1643
  fields: e
@@ -1658,60 +1645,60 @@ const se = ({
1658
1645
  try {
1659
1646
  if (!i)
1660
1647
  return;
1661
- if (re(i) || typeof i != "string")
1648
+ if (ne(i) || typeof i != "string")
1662
1649
  return i;
1663
- const s = ne(i);
1650
+ const s = se(i);
1664
1651
  if (s !== null)
1665
1652
  return s;
1666
1653
  if (i.trim().length === 0)
1667
1654
  return;
1668
- const u = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")), g = {};
1669
- return u.forEach((c) => {
1655
+ 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 = {};
1656
+ return d.forEach((c) => {
1670
1657
  const m = c[1];
1671
1658
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1672
- const p = et({
1659
+ const x = Ze({
1673
1660
  values: t,
1674
1661
  fields: e,
1675
1662
  fieldName: m === "active_id" ? "id" : m
1676
1663
  });
1677
- g[c[0].replace(/'/g, "")] = p || void 0;
1664
+ f[c[0].replace(/'/g, "")] = x || void 0;
1678
1665
  } else
1679
- 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(
1666
+ 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(
1680
1667
  /'/g,
1681
1668
  ""
1682
1669
  );
1683
- }), g;
1670
+ }), f;
1684
1671
  } catch {
1685
1672
  return;
1686
1673
  }
1687
1674
  }, kt = (i) => {
1688
1675
  const t = [];
1689
1676
  try {
1690
- return !i || re(i) || typeof i != "string" ? t : ne(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((u) => u.split(":")).forEach((u) => {
1691
- !u[1].includes("'") && u[1] !== "true" && u[1] !== "false" && t.push(u[1].replace(/'/g, ""));
1677
+ return !i || ne(i) || typeof i != "string" ? t : se(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) => {
1678
+ !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1692
1679
  }), t);
1693
1680
  } catch {
1694
1681
  }
1695
1682
  return t;
1696
1683
  };
1697
- function ne(i) {
1684
+ function se(i) {
1698
1685
  try {
1699
1686
  return JSON.parse(i.replace(/'/g, '"'));
1700
1687
  } catch {
1701
1688
  return null;
1702
1689
  }
1703
1690
  }
1704
- function re(i) {
1691
+ function ne(i) {
1705
1692
  return typeof i == "object" && i !== null && typeof i != "string";
1706
1693
  }
1707
- const tt = (i) => {
1694
+ const et = (i) => {
1708
1695
  const t = i.trim().replace(")", "").split("("), e = t[0], r = t[1].split(",").map((a) => a.trim());
1709
1696
  return {
1710
1697
  method: e,
1711
1698
  args: r
1712
1699
  };
1713
1700
  };
1714
- function it(i) {
1701
+ function tt(i) {
1715
1702
  const t = [];
1716
1703
  function e(s) {
1717
1704
  const r = [];
@@ -1770,10 +1757,6 @@ class Ot {
1770
1757
  * List of invisible fields
1771
1758
  */
1772
1759
  n(this, "_invisibleFields", []);
1773
- /**
1774
- * List of autorefreshable fields
1775
- */
1776
- n(this, "_autorefreshableFields", []);
1777
1760
  /**
1778
1761
  * Context for each field in the form
1779
1762
  */
@@ -1822,9 +1805,6 @@ class Ot {
1822
1805
  set invisibleFields(t) {
1823
1806
  this._invisibleFields = t;
1824
1807
  }
1825
- get autorefreshableFields() {
1826
- return this._autorefreshableFields;
1827
- }
1828
1808
  get contextForFields() {
1829
1809
  return this._contextForFields;
1830
1810
  }
@@ -1833,28 +1813,26 @@ class Ot {
1833
1813
  }
1834
1814
  parse(t, e) {
1835
1815
  var o;
1836
- const { values: s = {}, readOnly: r = !1 } = e || {}, a = Y.parse(t).filter((d) => d.tagName === "form")[0];
1816
+ const { values: s = {}, readOnly: r = !1 } = e || {}, a = Y.parse(t).filter((h) => h.tagName === "form")[0];
1837
1817
  this._string = ((o = a.attributes) == null ? void 0 : o.string) || null, this._string && (this._string = b(this._string)), this._readOnly = r, this._context = s.id ? { active_id: s.id, active_ids: [s.id] } : {}, this._invisibleFields = [], this.parseNode({
1838
1818
  fields: a.children,
1839
1819
  container: this._container,
1840
1820
  values: s
1821
+ }), tt(this._container._rows).forEach((h) => {
1822
+ const _ = h;
1823
+ _._id && _._context && (this._contextForFields[_._id] = h._context);
1841
1824
  });
1842
- const l = it(this._container._rows);
1843
- l.forEach((d) => {
1844
- const _ = d;
1845
- _._id && _._context && (this._contextForFields[_._id] = d._context);
1846
- }), this._autorefreshableFields = l.filter((d) => d instanceof f && d.autoRefresh).map((d) => d._id);
1847
1825
  }
1848
1826
  parseNode({
1849
1827
  fields: t,
1850
1828
  container: e,
1851
1829
  values: s
1852
1830
  }) {
1853
- const r = new R();
1831
+ const r = new G();
1854
1832
  t.filter((a) => typeof a == "object").forEach((a) => {
1855
- var x, F;
1856
- const { tagName: l, attributes: o, children: d } = a;
1857
- let _ = l, h = o;
1833
+ var p, F;
1834
+ const { tagName: l, attributes: o, children: h } = a;
1835
+ let _ = l, u = o;
1858
1836
  if (l === "field") {
1859
1837
  const { name: w, widget: E } = o;
1860
1838
  if (E)
@@ -1866,51 +1844,51 @@ class Ot {
1866
1844
  );
1867
1845
  _ = this._fields[w].type;
1868
1846
  }
1869
- h = {
1847
+ u = {
1870
1848
  ...this._fields[w],
1871
1849
  ...o,
1872
1850
  fieldsWidgetType: this._fields[w].type
1873
1851
  };
1874
1852
  }
1875
- const u = Fe({
1876
- tagAttributes: h,
1853
+ const d = ve({
1854
+ tagAttributes: u,
1877
1855
  values: s,
1878
1856
  fields: this._fields,
1879
1857
  widgetType: l
1880
1858
  });
1881
- let g;
1882
- l === "button" && h.states ? g = Ze({
1883
- states: h.states,
1859
+ let f;
1860
+ l === "button" && u.states ? f = Ke({
1861
+ states: u.states,
1884
1862
  values: s
1885
- }) : g = Ke({
1886
- fieldName: h.name,
1863
+ }) : f = Ue({
1864
+ fieldName: u.name,
1887
1865
  values: s,
1888
1866
  fields: this._fields
1889
1867
  });
1890
- const c = se({
1891
- context: h.context || ((x = this._fields[h.name]) == null ? void 0 : x.context),
1868
+ const c = ie({
1869
+ context: u.context || ((p = this._fields[u.name]) == null ? void 0 : p.context),
1892
1870
  values: s,
1893
1871
  fields: this._fields
1894
1872
  });
1895
- h.on_change && (this._onChangeFields[h.name] = tt(
1896
- h.on_change
1873
+ u.on_change && (this._onChangeFields[u.name] = et(
1874
+ u.on_change
1897
1875
  ));
1898
1876
  let m;
1899
- 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;
1900
- const p = {
1901
- ...u,
1902
- ...g,
1877
+ J(u.domain) ? m = u.domain : J((F = this._fields[u.name]) == null ? void 0 : F.domain) && (m = this._fields[u.name].domain), this._keyIdx = this._keyIdx + 1;
1878
+ const x = {
1879
+ ...d,
1880
+ ...f,
1903
1881
  context: c,
1904
1882
  domain: m,
1905
1883
  key: `${this._keyIdx}`
1906
1884
  };
1907
- e.readOnly && (p.readonly = !0);
1908
- const y = r.createWidget(_, p);
1909
- y.invisible && y instanceof f && this._invisibleFields.push(p.name), y instanceof v && this.parseNode({
1910
- fields: d,
1885
+ e.readOnly && (x.readonly = !0);
1886
+ const y = r.createWidget(_, x);
1887
+ y.invisible && y instanceof g && this._invisibleFields.push(x.name), y instanceof v && this.parseNode({
1888
+ fields: h,
1911
1889
  container: y.container,
1912
1890
  values: s
1913
- }), y instanceof K && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1891
+ }), y instanceof U && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
1914
1892
  });
1915
1893
  }
1916
1894
  /**
@@ -1921,7 +1899,7 @@ class Ot {
1921
1899
  return this.container.findById(t);
1922
1900
  }
1923
1901
  }
1924
- function H(i) {
1902
+ function J(i) {
1925
1903
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
1926
1904
  }
1927
1905
  class Tt {
@@ -1949,10 +1927,6 @@ class Tt {
1949
1927
  * Context for each field in the form
1950
1928
  */
1951
1929
  n(this, "_contextForFields", {});
1952
- /**
1953
- * List of autorefreshable fields
1954
- */
1955
- n(this, "_autorefreshableFields", []);
1956
1930
  /**
1957
1931
  * Is infinite
1958
1932
  */
@@ -1986,9 +1960,6 @@ class Tt {
1986
1960
  set contextForFields(t) {
1987
1961
  this._contextForFields = t;
1988
1962
  }
1989
- get autorefreshableFields() {
1990
- return this._autorefreshableFields;
1991
- }
1992
1963
  get infinite() {
1993
1964
  return this._infinite;
1994
1965
  }
@@ -1998,35 +1969,34 @@ class Tt {
1998
1969
  parse(t) {
1999
1970
  const e = Y.parse(t).filter((r) => r.tagName === "tree")[0];
2000
1971
  this._string = e.attributes.string || null, this._string && (this._string = b(this._string)), this._colors = e.attributes.colors || null, this._colors && (this._colors = b(this._colors)), this._status = e.attributes.status || null, this._status && (this._status = b(this._status)), this._editable = e.attributes.editable || null, this._infinite = e.attributes.infinite || !1;
2001
- const s = new R();
1972
+ const s = new G();
2002
1973
  e.children.forEach((r) => {
2003
1974
  const { tagName: a, attributes: l } = r;
2004
1975
  let o = null;
2005
1976
  if (a === "field") {
2006
- const { name: d, widget: _ } = l;
2007
- let h = l;
2008
- if (d) {
2009
- if (!this._fields[d])
2010
- throw new Error(`Field ${d} doesn't exist in fields defintion`);
2011
- const u = this._fields[d];
2012
- o = u.type, (Array.isArray(u == null ? void 0 : u.domain) && (u == null ? void 0 : u.domain.length) === 0 || (u == null ? void 0 : u.domain) === !1) && l.domain && l.domain.length > 0 && delete u.domain;
2013
- const g = se({
2014
- context: l.context || u.context,
1977
+ const { name: h, widget: _ } = l;
1978
+ let u = l;
1979
+ if (h) {
1980
+ if (!this._fields[h])
1981
+ throw new Error(`Field ${h} doesn't exist in fields defintion`);
1982
+ const d = this._fields[h];
1983
+ 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;
1984
+ const f = ie({
1985
+ context: l.context || d.context,
2015
1986
  values: {},
2016
1987
  fields: this._fields
2017
1988
  });
2018
- h = {
2019
- ...u,
1989
+ u = {
1990
+ ...d,
2020
1991
  ...l,
2021
- fieldsWidgetType: u == null ? void 0 : u.type,
2022
- context: g
2023
- }, this._contextForFields[d] = g;
1992
+ fieldsWidgetType: d == null ? void 0 : d.type,
1993
+ context: f
1994
+ }, this._contextForFields[h] = f;
2024
1995
  }
2025
- if (_ && (o = _), !h.invisible) {
2026
- const u = s.createWidget(o, h);
2027
- this._columns.push(u);
1996
+ if (_ && (o = _), !u.invisible) {
1997
+ const d = s.createWidget(o, u);
1998
+ this._columns.push(d);
2028
1999
  }
2029
- D(h.autorefresh) && this._autorefreshableFields.push(d);
2030
2000
  }
2031
2001
  });
2032
2002
  }
@@ -2038,7 +2008,7 @@ class Tt {
2038
2008
  return this._columns.find((e) => e.findById ? e.findById(t) : !1);
2039
2009
  }
2040
2010
  }
2041
- const st = {
2011
+ const it = {
2042
2012
  text: "text",
2043
2013
  many2one: "many2one",
2044
2014
  char: "char",
@@ -2078,7 +2048,7 @@ class Pt {
2078
2048
  return this._advancedSearchContainer;
2079
2049
  }
2080
2050
  parse() {
2081
- const t = new R();
2051
+ const t = new G();
2082
2052
  this.parseFields(
2083
2053
  this.searchFields.primary,
2084
2054
  t
@@ -2099,7 +2069,7 @@ class Pt {
2099
2069
  colspan: 2
2100
2070
  }, { type: a, widget: l } = r;
2101
2071
  let o = l ?? a;
2102
- return st[o] === void 0 && (o = a), e.createWidget(o, r);
2072
+ return it[o] === void 0 && (o = a), e.createWidget(o, r);
2103
2073
  });
2104
2074
  }
2105
2075
  /**
@@ -2119,14 +2089,14 @@ const Wt = ({
2119
2089
  if (!Array.isArray(s))
2120
2090
  return;
2121
2091
  const [r, a, l] = s;
2122
- let o, d;
2123
- r.indexOf(".") !== -1 ? (o = r.substr(0, r.indexOf(".")), d = r.substr(
2092
+ let o, h;
2093
+ r.indexOf(".") !== -1 ? (o = r.substr(0, r.indexOf(".")), h = r.substr(
2124
2094
  r.indexOf(".") + 1,
2125
2095
  r.length - 1
2126
- )) : (o = r, d = "id"), o === t && e.push([d, a, l]);
2096
+ )) : (o = r, h = "id"), o === t && e.push([h, a, l]);
2127
2097
  }), e;
2128
2098
  }, Et = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2129
- class nt {
2099
+ class st {
2130
2100
  constructor(t) {
2131
2101
  n(this, "_action_id", null);
2132
2102
  n(this, "_position", null);
@@ -2147,7 +2117,7 @@ class It {
2147
2117
  this._string = e.attributes.string || null;
2148
2118
  const { children: s } = e;
2149
2119
  s.forEach((r) => {
2150
- r.tagName === "dashboard_item" && this._items.push(new nt(r.attributes));
2120
+ r.tagName === "dashboard_item" && this._items.push(new st(r.attributes));
2151
2121
  });
2152
2122
  }
2153
2123
  get string() {
@@ -2157,7 +2127,7 @@ class It {
2157
2127
  return this._items;
2158
2128
  }
2159
2129
  }
2160
- class ae {
2130
+ class re {
2161
2131
  constructor(t) {
2162
2132
  n(this, "_string", null);
2163
2133
  n(this, "_type");
@@ -2185,7 +2155,8 @@ class ae {
2185
2155
  return this._y_range;
2186
2156
  }
2187
2157
  }
2188
- class le extends ae {
2158
+ const nt = (i) => i === 1 || i === "1" || i === !0 || i === "True";
2159
+ class ae extends re {
2189
2160
  constructor(e, s) {
2190
2161
  super(s);
2191
2162
  n(this, "_color", null);
@@ -2193,7 +2164,7 @@ class le extends ae {
2193
2164
  n(this, "_totalDomain", null);
2194
2165
  n(this, "_showPercent", !1);
2195
2166
  n(this, "_suffix", null);
2196
- this._type = e, this._color = s.attributes.color || null, this._color && (this._color = b(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = b(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = b(s.attributes.totalDomain) || null, this._showPercent = D(s.attributes.showPercent);
2167
+ this._type = e, this._color = s.attributes.color || null, this._color && (this._color = b(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = b(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = b(s.attributes.totalDomain) || null, this._showPercent = nt(s.attributes.showPercent);
2197
2168
  }
2198
2169
  get color() {
2199
2170
  return this._color;
@@ -2211,7 +2182,7 @@ class le extends ae {
2211
2182
  return this._suffix;
2212
2183
  }
2213
2184
  }
2214
- class rt extends le {
2185
+ class rt extends ae {
2215
2186
  constructor(e, s) {
2216
2187
  super(e, s);
2217
2188
  n(this, "_field");
@@ -2236,7 +2207,7 @@ const at = (i) => {
2236
2207
  let e;
2237
2208
  if (i.forEach((s) => {
2238
2209
  if (s.tagName === "field") {
2239
- const r = s.attributes.axis, a = s.attributes.operator, l = s.attributes.name, o = s.attributes.label || void 0, d = s.attributes.stacked || void 0;
2210
+ const r = s.attributes.axis, a = s.attributes.operator, l = s.attributes.name, o = s.attributes.label || void 0, h = s.attributes.stacked || void 0;
2240
2211
  if (!r)
2241
2212
  throw new Error(`Field ${l} doesn't have an axis`);
2242
2213
  if (!l)
@@ -2248,7 +2219,7 @@ const at = (i) => {
2248
2219
  name: l,
2249
2220
  operator: a,
2250
2221
  label: o,
2251
- stacked: d
2222
+ stacked: h
2252
2223
  })
2253
2224
  );
2254
2225
  }
@@ -2261,7 +2232,7 @@ const at = (i) => {
2261
2232
  y: t
2262
2233
  };
2263
2234
  };
2264
- class j extends ae {
2235
+ class D extends re {
2265
2236
  constructor(e, s) {
2266
2237
  super(s);
2267
2238
  n(this, "_x");
@@ -2278,11 +2249,11 @@ class j extends ae {
2278
2249
  }
2279
2250
  }
2280
2251
  const lt = {
2281
- indicator: le,
2252
+ indicator: ae,
2282
2253
  indicatorField: rt,
2283
- line: j,
2284
- bar: j,
2285
- pie: j
2254
+ line: D,
2255
+ bar: D,
2256
+ pie: D
2286
2257
  }, St = (i) => {
2287
2258
  const t = Y.parse(i).filter((r) => r.tagName === "graph")[0], e = t.attributes.type;
2288
2259
  if (!e)
@@ -2292,7 +2263,7 @@ const lt = {
2292
2263
  throw new Error(`${e} not found as a GraphModel`);
2293
2264
  return new s(e, t);
2294
2265
  };
2295
- class oe {
2266
+ class le {
2296
2267
  constructor({ name: t, axis: e }) {
2297
2268
  n(this, "_name");
2298
2269
  n(this, "_axis");
@@ -2305,7 +2276,7 @@ class oe {
2305
2276
  return this._axis;
2306
2277
  }
2307
2278
  }
2308
- class ot extends oe {
2279
+ class ot extends le {
2309
2280
  constructor({
2310
2281
  name: e,
2311
2282
  operator: s,
@@ -2328,7 +2299,7 @@ class ot extends oe {
2328
2299
  return this._stacked;
2329
2300
  }
2330
2301
  }
2331
- class ct extends oe {
2302
+ class ct extends le {
2332
2303
  constructor({ name: t }) {
2333
2304
  super({ name: t, axis: "x" });
2334
2305
  }
@@ -2381,20 +2352,20 @@ function ht({
2381
2352
  interval: e = 1
2382
2353
  }) {
2383
2354
  let s = [];
2384
- const r = de({
2355
+ const r = ce({
2385
2356
  values: i,
2386
2357
  groupBy: "type-stacked"
2387
2358
  }), a = `${t}s`;
2388
2359
  return Object.keys(r).forEach((o) => {
2389
- const d = r[o];
2390
- for (let _ = 0; _ < d.length; _++) {
2391
- const h = d[_];
2392
- if (s.push(h), _ === d.length - 1)
2360
+ const h = r[o];
2361
+ for (let _ = 0; _ < h.length; _++) {
2362
+ const u = h[_];
2363
+ if (s.push(u), _ === h.length - 1)
2393
2364
  return;
2394
- const u = h.x, g = d[_ + 1].x;
2395
- if (!ce([u, g], a)) {
2365
+ const d = u.x, f = h[_ + 1].x;
2366
+ if (!oe([d, f], a)) {
2396
2367
  const c = _t({
2397
- dates: [u, g],
2368
+ dates: [d, f],
2398
2369
  timerange: t,
2399
2370
  interval: e
2400
2371
  });
@@ -2402,13 +2373,13 @@ function ht({
2402
2373
  c.map((m) => ({
2403
2374
  x: m,
2404
2375
  value: 0,
2405
- type: h.type,
2406
- stacked: h.stacked
2376
+ type: u.type,
2377
+ stacked: u.stacked
2407
2378
  }))
2408
2379
  );
2409
2380
  }
2410
2381
  }
2411
- }), s.sort((o, d) => o.x < d.x ? -1 : o.x > d.x ? 1 : 0);
2382
+ }), s.sort((o, h) => o.x < h.x ? -1 : o.x > h.x ? 1 : 0);
2412
2383
  }
2413
2384
  function _t({
2414
2385
  dates: i,
@@ -2420,13 +2391,13 @@ function _t({
2420
2391
  return i;
2421
2392
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2422
2393
  for (let l = 0; l < a.length - 1; l++) {
2423
- const o = a[l], d = a[l + 1];
2424
- if (!ce([o, d], r)) {
2394
+ const o = a[l], h = a[l + 1];
2395
+ if (!oe([o, h], r)) {
2425
2396
  const _ = P(o, S(r)).add(
2426
2397
  e,
2427
2398
  r
2428
- ), h = P(d, S(r));
2429
- for (; _.isBefore(h); )
2399
+ ), u = P(h, S(r));
2400
+ for (; _.isBefore(u); )
2430
2401
  s.push(_.format(S(r))), _.add(e, r);
2431
2402
  }
2432
2403
  }
@@ -2439,18 +2410,18 @@ function ft({
2439
2410
  const e = gt({
2440
2411
  values: i,
2441
2412
  timerange: t
2442
- }), s = [], r = de({
2413
+ }), s = [], r = ce({
2443
2414
  values: e,
2444
2415
  groupBy: "all"
2445
2416
  });
2446
2417
  return Object.keys(r).forEach((a) => {
2447
- const l = r[a], o = l[0].operator === "count" ? "+" : l[0].operator, d = V({
2418
+ const l = r[a], o = l[0].operator === "count" ? "+" : l[0].operator, h = V({
2448
2419
  values: l.map((_) => _.value),
2449
2420
  operator: o
2450
2421
  });
2451
2422
  s.push({
2452
2423
  ...l[0],
2453
- value: d
2424
+ value: h
2454
2425
  });
2455
2426
  }), s;
2456
2427
  }
@@ -2499,7 +2470,7 @@ function mt({
2499
2470
  function bt(i) {
2500
2471
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2501
2472
  }
2502
- function ce(i, t) {
2473
+ function oe(i, t) {
2503
2474
  let e = !1;
2504
2475
  const s = S(t);
2505
2476
  if (i.length === 0)
@@ -2512,7 +2483,7 @@ function ce(i, t) {
2512
2483
  }
2513
2484
  return e;
2514
2485
  }
2515
- function de({
2486
+ function ce({
2516
2487
  values: i,
2517
2488
  groupBy: t
2518
2489
  }) {
@@ -2545,56 +2516,56 @@ const yt = {
2545
2516
  avg: "average",
2546
2517
  min: "min",
2547
2518
  max: "max"
2548
- }, pt = ({
2519
+ }, xt = ({
2549
2520
  ooui: i,
2550
2521
  values: t,
2551
2522
  fields: e,
2552
2523
  options: s
2553
2524
  }) => {
2554
- const r = A({
2525
+ const r = N({
2555
2526
  fieldName: i.x.name,
2556
2527
  values: t,
2557
2528
  fields: e
2558
2529
  }), a = [];
2559
2530
  i.y.forEach((c) => {
2560
2531
  Object.keys(r).forEach((m) => {
2561
- const p = r[m].label, y = r[m].entries;
2532
+ const x = r[m].label, y = r[m].entries;
2562
2533
  if (c.label) {
2563
- const x = A({
2534
+ const p = N({
2564
2535
  fieldName: c.label,
2565
2536
  values: y,
2566
2537
  fields: e
2567
2538
  });
2568
- Object.keys(x).forEach((F) => {
2569
- const w = x[F].entries, E = x[F].label, _e = N({
2539
+ Object.keys(p).forEach((F) => {
2540
+ const w = p[F].entries, E = p[F].label, he = M({
2570
2541
  entries: w,
2571
2542
  fields: e,
2572
2543
  fieldName: c.name
2573
- }), fe = V({
2574
- values: _e,
2544
+ }), _e = V({
2545
+ values: he,
2575
2546
  operator: c.operator
2576
2547
  });
2577
2548
  a.push({
2578
- x: p || !1,
2579
- value: fe,
2549
+ x: x || !1,
2550
+ value: _e,
2580
2551
  type: E,
2581
2552
  operator: c.operator,
2582
2553
  stacked: c.stacked
2583
2554
  });
2584
2555
  });
2585
2556
  } else {
2586
- const x = N({
2557
+ const p = M({
2587
2558
  entries: y,
2588
2559
  fields: e,
2589
2560
  fieldName: c.name
2590
2561
  }), F = V({
2591
- values: x,
2562
+ values: p,
2592
2563
  operator: c.operator
2593
2564
  });
2594
2565
  a.push({
2595
- x: p || !1,
2566
+ x: x || !1,
2596
2567
  value: F,
2597
- type: ue({
2568
+ type: de({
2598
2569
  yAxis: c,
2599
2570
  fields: e
2600
2571
  }),
@@ -2607,30 +2578,30 @@ const yt = {
2607
2578
  const l = i.y.some((c) => c.label !== void 0), o = i.y.some((c) => c.stacked !== void 0);
2608
2579
  let _ = [...a.sort((c, m) => c.x < m.x ? -1 : c.x > m.x ? 1 : 0)];
2609
2580
  o && i.y.filter((c) => c.stacked !== void 0).length > 1 && (_ = _.map((c) => ({ ...c, type: `${c.type} - ${c.stacked}` })));
2610
- let h = [..._];
2611
- i.type === "pie" && h.some((c) => c.x === !1) ? h = h.map((c) => c.x === !1 ? { ...c, x: (s == null ? void 0 : s.uninformedString) || "Not informed" } : c) : _.some((c) => c.x === !1) && (h = h.filter(
2581
+ let u = [..._];
2582
+ i.type === "pie" && u.some((c) => c.x === !1) ? u = u.map((c) => c.x === !1 ? { ...c, x: (s == null ? void 0 : s.uninformedString) || "Not informed" } : c) : _.some((c) => c.x === !1) && (u = u.filter(
2612
2583
  (c) => c.x !== !1
2613
2584
  ));
2614
- let u = h;
2615
- i.timerange ? u = ut({
2616
- values: u,
2585
+ let d = u;
2586
+ i.timerange ? d = ut({
2587
+ values: d,
2617
2588
  timerange: i.timerange,
2618
2589
  interval: i.interval
2619
- }) : i.type == "pie" && (u = h.sort((c, m) => m.value - c.value));
2620
- const g = {
2621
- data: u,
2590
+ }) : i.type == "pie" && (d = u.sort((c, m) => m.value - c.value));
2591
+ const f = {
2592
+ data: d,
2622
2593
  isGroup: o || l,
2623
2594
  isStack: o
2624
2595
  };
2625
- if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2596
+ if (i.type === "line" && i.y_range && (f.yAxisOpts = {
2626
2597
  mode: i.y_range
2627
2598
  }, i.y_range === "auto")) {
2628
- const { min: c, max: m } = he(u);
2629
- g.yAxisOpts.valueOpts = { min: c, max: m };
2599
+ const { min: c, max: m } = ue(d);
2600
+ f.yAxisOpts.valueOpts = { min: c, max: m };
2630
2601
  }
2631
- return g;
2602
+ return f;
2632
2603
  };
2633
- function N({
2604
+ function M({
2634
2605
  entries: i,
2635
2606
  fieldName: t,
2636
2607
  fields: e
@@ -2679,7 +2650,7 @@ function V({
2679
2650
  function I(i) {
2680
2651
  return Math.round((i + Number.EPSILON) * 100) / 100;
2681
2652
  }
2682
- function A({
2653
+ function N({
2683
2654
  fieldName: i,
2684
2655
  fields: t,
2685
2656
  values: e
@@ -2694,21 +2665,21 @@ function A({
2694
2665
  s[a] || (s[a] = { label: l, entries: [] }), s[a].entries.push(r);
2695
2666
  }), s;
2696
2667
  }
2697
- function xt(i) {
2668
+ function pt(i) {
2698
2669
  let t = [];
2699
2670
  return Object.keys(i).forEach((e) => {
2700
2671
  const s = i[e];
2701
2672
  t = t.concat(s.entries);
2702
2673
  }), t;
2703
2674
  }
2704
- function ue({
2675
+ function de({
2705
2676
  yAxis: i,
2706
2677
  fields: t
2707
2678
  }) {
2708
2679
  const e = t[i.name];
2709
2680
  return e != null && e.string ? e.string : i.name;
2710
2681
  }
2711
- function he(i, t = 0.1) {
2682
+ function ue(i, t = 0.1) {
2712
2683
  if (i.length === 0)
2713
2684
  throw new Error("The values array cannot be empty.");
2714
2685
  const e = i.map((l) => l.value), s = Math.min(...e), r = Math.max(...e), a = (r - s) * t;
@@ -2719,77 +2690,77 @@ function he(i, t = 0.1) {
2719
2690
  }
2720
2691
  const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2721
2692
  __proto__: null,
2722
- getAllObjectsInGroupedValues: xt,
2723
- getMinMax: he,
2693
+ getAllObjectsInGroupedValues: pt,
2694
+ getMinMax: ue,
2724
2695
  getValueForOperator: V,
2725
- getValuesForYField: N,
2726
- getValuesGroupedByField: A,
2727
- getYAxisFieldname: ue,
2696
+ getValuesForYField: M,
2697
+ getValuesGroupedByField: N,
2698
+ getYAxisFieldname: de,
2728
2699
  labelsForOperator: yt,
2729
- processGraphData: pt
2700
+ processGraphData: xt
2730
2701
  }, Symbol.toStringTag, { value: "Module" }));
2731
2702
  export {
2732
- Qe as Alert,
2733
- Ce as Avatar,
2734
- Me as Binary,
2735
- Z as Boolean,
2736
- K as Button,
2737
- Te as ButtonGroup,
2738
- q as Char,
2739
- ie as CodeEditor,
2740
- Xe as Comments,
2703
+ He as Alert,
2704
+ Fe as Avatar,
2705
+ je as Binary,
2706
+ K as Boolean,
2707
+ U as Button,
2708
+ Oe as ButtonGroup,
2709
+ R as Char,
2710
+ te as CodeEditor,
2711
+ Qe as Comments,
2741
2712
  z as Container,
2742
2713
  v as ContainerWidget,
2743
2714
  It as Dashboard,
2744
- nt as DashboardItem,
2745
- Ve as Date,
2746
- Ye as DateTime,
2747
- Ue as Email,
2748
- f as Field,
2749
- G as Float,
2750
- Ie as FloatTime,
2715
+ st as DashboardItem,
2716
+ ze as Date,
2717
+ Ve as DateTime,
2718
+ Xe as Email,
2719
+ g as Field,
2720
+ L as Float,
2721
+ Ee as FloatTime,
2751
2722
  Ot as Form,
2752
- ae as Graph,
2753
- oe as GraphAxis,
2754
- j as GraphChart,
2755
- le as GraphIndicator,
2723
+ re as Graph,
2724
+ le as GraphAxis,
2725
+ D as GraphChart,
2726
+ ae as GraphIndicator,
2756
2727
  rt as GraphIndicatorField,
2757
2728
  ct as GraphXAxis,
2758
2729
  ot as GraphYAxis,
2759
- Oe as Group,
2760
- Se as HTMLPreview,
2761
- Ne as Image,
2762
- Le as Indicator,
2763
- Ee as Integer,
2764
- J as JSONField,
2765
- U as Label,
2766
- Pe as Many2one,
2767
- We as Markdown,
2768
- te as MultiCheckbox,
2769
- X as NewLine,
2770
- M as Notebook,
2771
- ee as One2many,
2772
- ke as Page,
2773
- ze as ProgressBar,
2730
+ ke as Group,
2731
+ Ie as HTMLPreview,
2732
+ Me as Image,
2733
+ Be as Indicator,
2734
+ We as Integer,
2735
+ q as JSONField,
2736
+ X as Label,
2737
+ Te as Many2one,
2738
+ Pe as Markdown,
2739
+ ee as MultiCheckbox,
2740
+ Q as NewLine,
2741
+ j as Notebook,
2742
+ Z as One2many,
2743
+ Ce as Page,
2744
+ Se as ProgressBar,
2774
2745
  $e as Radio,
2775
- je as Reference,
2776
- st as SearchFieldTypes,
2746
+ De as Reference,
2747
+ it as SearchFieldTypes,
2777
2748
  Pt as SearchFilter,
2778
2749
  W as Selection,
2779
- De as Separator,
2780
- B as Spinner,
2781
- Je as Steps,
2782
- qe as Switch,
2783
- Re as Tag,
2784
- Ge as Tags,
2785
- L as Text,
2786
- He as Time,
2787
- Be as Timeline,
2750
+ Ye as Separator,
2751
+ A as Spinner,
2752
+ qe as Steps,
2753
+ Re as Switch,
2754
+ Ge as Tag,
2755
+ Le as Tags,
2756
+ B as Text,
2757
+ Je as Time,
2758
+ Ae as Timeline,
2788
2759
  Tt as Tree,
2789
2760
  C as Widget,
2790
2761
  zt as graphFieldUtils,
2791
2762
  Vt as graphProcessor,
2792
- se as parseContext,
2763
+ ie as parseContext,
2793
2764
  kt as parseContextFields,
2794
2765
  Et as parseDomainFields,
2795
2766
  St as parseGraph,