@gisce/ooui 2.45.0 → 2.45.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,18 +1,18 @@
1
- var pt = Object.defineProperty;
2
- var wt = (s, e, t) => e in s ? pt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var n = (s, e, t) => (wt(s, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { decode as Ft } from "html-entities";
5
- import { evaluateCondition as vt } from "@gisce/conscheck";
6
- import * as I from "txml";
1
+ var wt = Object.defineProperty;
2
+ var Ft = (i, e, t) => e in i ? wt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var n = (i, e, t) => (Ft(i, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { decode as vt } from "html-entities";
5
+ import { evaluateCondition as Ct } from "@gisce/conscheck";
6
+ import * as z from "txml";
7
7
  import T from "moment";
8
- const Ct = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), kt = ({
9
- entry: s,
8
+ const kt = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Pt = ({
9
+ entry: i,
10
10
  values: e,
11
11
  fields: t
12
12
  }) => {
13
- let [i, r, l] = s, o = e[i];
14
- const a = U({
15
- fieldName: i,
13
+ let [s, r, l] = i, o = e[s];
14
+ const a = Z({
15
+ fieldName: s,
16
16
  valueInObject: o,
17
17
  expectedValue: l,
18
18
  fields: t
@@ -41,123 +41,123 @@ const Ct = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), kt
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, g = (s) => Ft(s, { level: "xml" }), U = ({
45
- fieldName: s,
44
+ }, g = (i) => vt(i, { level: "xml" }), Z = ({
45
+ fieldName: i,
46
46
  valueInObject: e,
47
47
  expectedValue: t,
48
- fields: i = {}
48
+ fields: s = {}
49
49
  }) => {
50
50
  const r = {
51
51
  modifiedValueInObject: e,
52
52
  modifiedExpectedValue: null,
53
53
  directOutcome: void 0
54
54
  };
55
- return i[s] === void 0 ? {
55
+ return s[i] === void 0 ? {
56
56
  modifiedValueInObject: null,
57
57
  modifiedExpectedValue: null,
58
58
  directOutcome: !1
59
- } : e === void 0 && i[s].type !== "boolean" && i[s].type !== "many2one" && i[s].type !== "selection" && typeof t != "boolean" ? {
59
+ } : e === void 0 && s[i].type !== "boolean" && s[i].type !== "many2one" && s[i].type !== "selection" && typeof t != "boolean" ? {
60
60
  modifiedValueInObject: null,
61
61
  modifiedExpectedValue: null,
62
62
  directOutcome: !1
63
- } : (r.modifiedValueInObject = i[s].type === "boolean" ? !!e : e, i[s].type === "many2one" && t === !1 && e === 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)), i[s].type === "many2one" && Array.isArray(r.modifiedValueInObject) && r.modifiedValueInObject[0] === void 0 && (r.modifiedValueInObject = !1), i[s].type === "boolean" && (t === 0 || t === 1) && (r.modifiedExpectedValue = t !== 0), r);
64
- }, Q = ({
65
- attrs: s,
63
+ } : (r.modifiedValueInObject = s[i].type === "boolean" ? !!e : e, s[i].type === "many2one" && t === !1 && e === 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" && (t === 0 || t === 1) && (r.modifiedExpectedValue = t !== 0), r);
64
+ }, X = ({
65
+ attrs: i,
66
66
  values: e,
67
67
  fields: t,
68
- widgetType: i
68
+ widgetType: s
69
69
  }) => {
70
- const c = s.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = g(c), u = JSON.parse(_), h = {};
70
+ const c = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = g(c), u = JSON.parse(_), h = {};
71
71
  for (const m of Object.keys(u)) {
72
- const x = u[m].map((y) => kt({ entry: y, values: e, fields: t })).every((y) => y);
73
- x ? h[m] = !0 : m === "readonly" && !x && i === "button" && (h[m] = !1);
72
+ const x = u[m].map((y) => Pt({ entry: y, values: e, fields: t })).every((y) => y);
73
+ x ? h[m] = !0 : m === "readonly" && !x && s === "button" && (h[m] = !1);
74
74
  }
75
75
  return h;
76
- }, Z = (s) => {
77
- if (s === void 0)
76
+ }, tt = (i) => {
77
+ if (i === void 0)
78
78
  return {};
79
- if (typeof s == "string")
79
+ if (typeof i == "string")
80
80
  try {
81
- return JSON.parse(s.replace(/'/g, '"'));
81
+ return JSON.parse(i.replace(/'/g, '"'));
82
82
  } catch {
83
83
  return console.error("Error parsing widget_props"), {};
84
84
  }
85
85
  else
86
- return s;
87
- }, Pt = ({
88
- attrs: s,
86
+ return i;
87
+ }, Ot = ({
88
+ attrs: i,
89
89
  values: e,
90
90
  fields: t,
91
- widgetType: i
91
+ widgetType: s
92
92
  }) => {
93
93
  try {
94
- const r = g(s), l = JSON.parse(
94
+ const r = g(i), l = JSON.parse(
95
95
  r.replace(/'/g, '"')
96
96
  ), o = {};
97
97
  for (const a of Object.keys(l)) {
98
- const c = vt({
98
+ const c = Ct({
99
99
  object: e,
100
100
  condition: l[a],
101
101
  evaluateFieldComparison: ({
102
102
  fieldName: _,
103
103
  valueInObject: u,
104
104
  expectedValue: h
105
- }) => U({
105
+ }) => Z({
106
106
  fieldName: _,
107
107
  valueInObject: u,
108
108
  expectedValue: h,
109
109
  fields: t
110
110
  })
111
111
  });
112
- c ? o[a] = !0 : a === "readonly" && !c && i === "button" && (o[a] = !1);
112
+ c ? o[a] = !0 : a === "readonly" && !c && s === "button" && (o[a] = !1);
113
113
  }
114
114
  return o;
115
115
  } catch (r) {
116
116
  throw console.error(r), r instanceof SyntaxError ? new Error(
117
- "Error parsing new json_attrs. Original string: " + s
117
+ "Error parsing new json_attrs. Original string: " + i
118
118
  ) : r;
119
119
  }
120
- }, tt = ({
121
- tagAttributes: s,
120
+ }, et = ({
121
+ tagAttributes: i,
122
122
  values: e,
123
123
  fields: t,
124
- widgetType: i,
124
+ widgetType: s,
125
125
  fallbackMode: r = !0
126
126
  }) => {
127
127
  let l = {};
128
- if (s.json_attrs)
128
+ if (i.json_attrs)
129
129
  try {
130
- l = Pt({
131
- attrs: s.json_attrs,
130
+ l = Ot({
131
+ attrs: i.json_attrs,
132
132
  values: e,
133
133
  fields: t,
134
- widgetType: i
134
+ widgetType: s
135
135
  });
136
136
  } catch (o) {
137
- if (r && s.attrs)
138
- l = Q({
139
- attrs: s.attrs,
137
+ if (r && i.attrs)
138
+ l = X({
139
+ attrs: i.attrs,
140
140
  values: e,
141
141
  fields: t,
142
- widgetType: i
142
+ widgetType: s
143
143
  });
144
144
  else
145
145
  throw o;
146
146
  }
147
147
  else
148
- s.attrs && (l = Q({
149
- attrs: s.attrs,
148
+ i.attrs && (l = X({
149
+ attrs: i.attrs,
150
150
  values: e,
151
151
  fields: t,
152
- widgetType: i
152
+ widgetType: s
153
153
  }));
154
154
  return {
155
- ...s,
155
+ ...i,
156
156
  ...l,
157
157
  attrs: void 0,
158
158
  json_attrs: void 0
159
159
  };
160
- }, p = (s) => s === 1 || s === "1" || s === !0 || s === "True" || s === "true", P = class P {
160
+ }, p = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", P = class P {
161
161
  constructor(e) {
162
162
  /**
163
163
  * Determines if widget is read only (default is undefined)
@@ -194,7 +194,7 @@ const Ct = (s = !1) => (s = JSON.parse(s.toString().toLowerCase()), +s > 0), kt
194
194
  * Base type of the field
195
195
  */
196
196
  n(this, "_fieldType", "");
197
- this._colspan = P._defaultColspan, this._invisible = !1, e && (e.colspan && (this._colspan = +e.colspan), e.readonly !== void 0 && (this._readOnly = p(e.readonly)), e.invisible && (e.invisible === 1 || e.invisible === "1" || e.invisible === !0) && (this._invisible = !0), e.type && (this._type = e.type), e.context && (this._context = e.context), e.domain && (typeof e.domain != "string" ? this._domain = g(JSON.stringify(e.domain)) : this._domain = g(e.domain)), e.type && (this._fieldType = e.fieldsWidgetType), e.widget_props && (this._parsedWidgetProps = Z(e.widget_props)), e.key && (this._key = e.key), e.is_function && (this._isFunction = e.is_function), e.is_sortable && (this._isSortable = e.is_sortable));
197
+ this._colspan = P._defaultColspan, this._invisible = !1, e && (e.colspan && (this._colspan = +e.colspan), e.readonly !== void 0 && (this._readOnly = p(e.readonly)), e.invisible && (e.invisible === 1 || e.invisible === "1" || e.invisible === !0) && (this._invisible = !0), e.type && (this._type = e.type), e.context && (this._context = e.context), e.domain && (typeof e.domain != "string" ? this._domain = g(JSON.stringify(e.domain)) : this._domain = g(e.domain)), e.type && (this._fieldType = e.fieldsWidgetType), e.widget_props && (this._parsedWidgetProps = tt(e.widget_props)), e.key && (this._key = e.key), e.is_function && (this._isFunction = e.is_function), e.is_sortable && (this._isSortable = e.is_sortable));
198
198
  }
199
199
  static get defaultColspan() {
200
200
  return P._defaultColspan;
@@ -316,7 +316,7 @@ class f extends k {
316
316
  n(this, "_selectionValues", /* @__PURE__ */ new Map([]));
317
317
  n(this, "_autoRefresh", !1);
318
318
  n(this, "_raw_props");
319
- this._activated = !0, t && (this._raw_props = t, t.name && (this._id = t.name), t.activated && (this._activated = t.activated), t.string && (this._label = g(t.string)), t.help && (this._tooltip = g(t.help)), t.nolabel && (t.nolabel === "1" || typeof t.nolabel == "boolean" && t.nolabel === !0) && (this._nolabel = !0), t.required && (t.required === "1" || t.required === !0 || t.required === "True") && (this._required = !0), t.sum && (this._sum = g(t.sum)), t.selection && (this._selectionValues = new Map(t.selection)), t.help_inline && (this.tooltipInline = Ct(t.help_inline)), t.autorefresh && (this.autoRefresh = p(t.autorefresh)));
319
+ this._activated = !0, t && (this._raw_props = t, t.name && (this._id = t.name), t.activated && (this._activated = t.activated), t.string && (this._label = g(t.string)), t.help && (this._tooltip = g(t.help)), t.nolabel && (t.nolabel === "1" || typeof t.nolabel == "boolean" && t.nolabel === !0) && (this._nolabel = !0), t.required && (t.required === "1" || t.required === !0 || t.required === "True") && (this._required = !0), t.sum && (this._sum = g(t.sum)), t.selection && (this._selectionValues = new Map(t.selection)), t.help_inline && (this.tooltipInline = kt(t.help_inline)), t.autorefresh && (this.autoRefresh = p(t.autorefresh)));
320
320
  }
321
321
  get id() {
322
322
  return this._id;
@@ -401,9 +401,9 @@ class f extends k {
401
401
  return this._id === t ? this : null;
402
402
  }
403
403
  }
404
- class Ot extends f {
404
+ class Wt extends f {
405
405
  }
406
- class et extends k {
406
+ class it extends k {
407
407
  findById(e) {
408
408
  return null;
409
409
  }
@@ -468,8 +468,8 @@ class st extends f {
468
468
  this._fieldForLabel = t;
469
469
  }
470
470
  }
471
- class z {
472
- constructor(e = 4, t = 6, i = !1, r = void 0) {
471
+ class I {
472
+ constructor(e = 4, t = 6, s = !1, r = void 0) {
473
473
  /**
474
474
  * Number of columns the container is divided
475
475
  */
@@ -491,7 +491,7 @@ class z {
491
491
  * Unique key for container
492
492
  */
493
493
  n(this, "_key");
494
- this._columns = e, this._colspan = t, this._rows = [[]], this._index = 0, this._readOnly = i, this._key = r;
494
+ this._columns = e, this._colspan = t, this._rows = [[]], this._index = 0, this._readOnly = s, this._key = r;
495
495
  }
496
496
  get columns() {
497
497
  return this._columns;
@@ -530,12 +530,12 @@ class z {
530
530
  * Returns the next free position
531
531
  */
532
532
  freePosition() {
533
- const e = this._rows[this._index].filter((t) => !t.invisible).reduce((t, i) => t + i.colspan, 0);
533
+ const e = this._rows[this._index].filter((t) => !t.invisible).reduce((t, s) => t + s.colspan, 0);
534
534
  return this._columns - e;
535
535
  }
536
536
  addWidget(e, t) {
537
- const i = [], r = t ? t.addLabel : !0;
538
- if (e instanceof et) {
537
+ const s = [], r = t ? t.addLabel : !0;
538
+ if (e instanceof it) {
539
539
  this._rows.push([]), this._index++;
540
540
  return;
541
541
  }
@@ -549,22 +549,22 @@ class z {
549
549
  fieldForLabel: e.id,
550
550
  key: `${e.key}-label`
551
551
  });
552
- o.type = "label", i.push(o), i.push(e);
552
+ o.type = "label", s.push(o), s.push(e);
553
553
  } else
554
- i.push(e);
555
- i.reduce(
554
+ s.push(e);
555
+ s.reduce(
556
556
  (o, a) => o + a.colspan,
557
557
  0
558
- ) > this.freePosition() && (this._rows.push([]), this._index++), this._rows[this._index] = this._rows[this._index].concat(i);
558
+ ) > this.freePosition() && (this._rows.push([]), this._index++), this._rows[this._index] = this._rows[this._index].concat(s);
559
559
  }
560
560
  /**
561
561
  * Traverses children to find a matching container or widget with the exact same id.
562
562
  * @param {string} id id (name) of the field or container to find
563
563
  */
564
564
  findById(e) {
565
- var i;
565
+ var s;
566
566
  let t = null;
567
- return (i = this._rows) != null && i.length && this._rows.forEach((r) => {
567
+ return (s = this._rows) != null && s.length && this._rows.forEach((r) => {
568
568
  t || r != null && r.length && r.forEach((l) => {
569
569
  t || l && (t = l.findById(e));
570
570
  });
@@ -592,7 +592,7 @@ const O = class O extends k {
592
592
  * Container label
593
593
  */
594
594
  n(this, "_label", "");
595
- this._container = new z(
595
+ this._container = new I(
596
596
  t == null ? void 0 : t.col,
597
597
  O._defaultColspan,
598
598
  this.readOnly,
@@ -669,8 +669,8 @@ const W = class W extends F {
669
669
  }
670
670
  };
671
671
  n(W, "_defaultColspan", 3);
672
- let B = W;
673
- class N extends F {
672
+ let R = W;
673
+ class j extends F {
674
674
  constructor(t) {
675
675
  super(t);
676
676
  n(this, "_loading", !1);
@@ -683,7 +683,7 @@ class N extends F {
683
683
  this._loading = t;
684
684
  }
685
685
  }
686
- class Wt extends N {
686
+ class Tt extends j {
687
687
  constructor(t) {
688
688
  super(t);
689
689
  n(this, "_icon", null);
@@ -696,9 +696,9 @@ class Wt extends N {
696
696
  this._icon = t;
697
697
  }
698
698
  }
699
- class Tt extends N {
699
+ class It extends j {
700
700
  constructor(t) {
701
- var i;
701
+ var s;
702
702
  super(t);
703
703
  n(this, "_icon", null);
704
704
  n(this, "_height");
@@ -709,7 +709,7 @@ class Tt extends N {
709
709
  } catch {
710
710
  console.log("Error parsing height"), this._height = void 0;
711
711
  }
712
- (i = this._parsedWidgetProps) != null && i.backgroundColor && (this._backgroundColor = this._parsedWidgetProps.backgroundColor);
712
+ (s = this._parsedWidgetProps) != null && s.backgroundColor && (this._backgroundColor = this._parsedWidgetProps.backgroundColor);
713
713
  }
714
714
  get icon() {
715
715
  return this._icon;
@@ -756,12 +756,12 @@ class A extends f {
756
756
  n(this, "_danger", !1);
757
757
  if (t) {
758
758
  if (t.string && (this._caption = g(t.string)), t.buttonType && (this._buttonType = t.buttonType), t.confirm && (this._confirmMessage = g(t.confirm)), t.special && t.special === "cancel" && (this._buttonType = "cancel"), t.icon && (this._icon = t.icon), t.primary) {
759
- const i = t.primary;
760
- (i === "1" || i === 1 || i === !0) && (this._primary = !0);
759
+ const s = t.primary;
760
+ (s === "1" || s === 1 || s === !0) && (this._primary = !0);
761
761
  }
762
762
  if (t.danger) {
763
- const i = t.danger;
764
- (i === "1" || i === 1 || i === !0) && (this._danger = !0);
763
+ const s = t.danger;
764
+ (s === "1" || s === 1 || s === !0) && (this._danger = !0);
765
765
  }
766
766
  }
767
767
  }
@@ -812,7 +812,7 @@ class zt extends F {
812
812
  return this._defaultName;
813
813
  }
814
814
  get defaultButton() {
815
- return this.buttons.find((i) => i.id === this.defaultName) || this.buttons[0];
815
+ return this.buttons.find((s) => s.id === this.defaultName) || this.buttons[0];
816
816
  }
817
817
  get colspan() {
818
818
  var t;
@@ -823,9 +823,9 @@ class zt extends F {
823
823
  }
824
824
  get secondaryButtons() {
825
825
  return this.buttons.filter(
826
- (i) => {
826
+ (s) => {
827
827
  var r;
828
- return i.id !== ((r = this.defaultButton) == null ? void 0 : r.id);
828
+ return s.id !== ((r = this.defaultButton) == null ? void 0 : r.id);
829
829
  }
830
830
  );
831
831
  }
@@ -833,9 +833,9 @@ class zt extends F {
833
833
  return this._container.rows.flat().filter((t) => !t.invisible);
834
834
  }
835
835
  }
836
- class It extends f {
836
+ class Et extends f {
837
837
  }
838
- class R extends f {
838
+ class L extends f {
839
839
  constructor(t) {
840
840
  super(t);
841
841
  /**
@@ -878,7 +878,7 @@ class R extends f {
878
878
  this._translatable = t;
879
879
  }
880
880
  }
881
- class $ extends f {
881
+ class q extends f {
882
882
  constructor(t) {
883
883
  super(t);
884
884
  /**
@@ -942,7 +942,7 @@ class $ extends f {
942
942
  this._translatable = t;
943
943
  }
944
944
  }
945
- class S extends f {
945
+ class E extends f {
946
946
  constructor(t) {
947
947
  super(t);
948
948
  /**
@@ -993,19 +993,19 @@ class St extends f {
993
993
  return this.parsedWidgetProps.showMenu;
994
994
  }
995
995
  }
996
- class Et extends $ {
996
+ class Vt extends q {
997
997
  }
998
- class it extends f {
998
+ class nt extends f {
999
999
  constructor(e) {
1000
1000
  super(e);
1001
1001
  }
1002
1002
  }
1003
- class Vt extends f {
1003
+ class Yt extends f {
1004
1004
  constructor(e) {
1005
1005
  super(e);
1006
1006
  }
1007
1007
  }
1008
- class q extends f {
1008
+ class J extends f {
1009
1009
  constructor(t) {
1010
1010
  super(t);
1011
1011
  /**
@@ -1021,8 +1021,8 @@ class q extends f {
1021
1021
  */
1022
1022
  n(this, "_decimalDigits", 2);
1023
1023
  if (t != null && t.digits) {
1024
- const [i, r] = t.digits;
1025
- this._integerDigits = i, this._decimalDigits = r;
1024
+ const [s, r] = t.digits;
1025
+ this._integerDigits = s, this._decimalDigits = r;
1026
1026
  }
1027
1027
  }
1028
1028
  get integerDigits() {
@@ -1038,18 +1038,18 @@ class q extends f {
1038
1038
  this._decimalDigits = t;
1039
1039
  }
1040
1040
  }
1041
- class Yt extends q {
1041
+ class Dt extends J {
1042
1042
  }
1043
- class Dt extends f {
1043
+ class Nt extends f {
1044
1044
  }
1045
- class jt extends q {
1045
+ class jt extends J {
1046
1046
  }
1047
- class Nt extends f {
1047
+ class At extends f {
1048
1048
  constructor(e) {
1049
1049
  super(e);
1050
1050
  }
1051
1051
  }
1052
- class At extends f {
1052
+ class Mt extends f {
1053
1053
  constructor(t) {
1054
1054
  super(t);
1055
1055
  n(this, "_timezone");
@@ -1062,7 +1062,7 @@ class At extends f {
1062
1062
  this._timezone = t;
1063
1063
  }
1064
1064
  }
1065
- class nt extends f {
1065
+ class rt extends f {
1066
1066
  constructor(t) {
1067
1067
  super(t);
1068
1068
  /**
@@ -1156,7 +1156,7 @@ class nt extends f {
1156
1156
  this._infinite = t;
1157
1157
  }
1158
1158
  }
1159
- class Mt extends k {
1159
+ class Bt extends k {
1160
1160
  constructor(t) {
1161
1161
  super(t);
1162
1162
  /**
@@ -1182,9 +1182,9 @@ class Mt extends k {
1182
1182
  return null;
1183
1183
  }
1184
1184
  }
1185
- class Bt extends S {
1185
+ class Rt extends E {
1186
1186
  }
1187
- class Rt extends f {
1187
+ class Lt extends f {
1188
1188
  constructor(t) {
1189
1189
  super(t);
1190
1190
  /**
@@ -1200,19 +1200,19 @@ class Rt extends f {
1200
1200
  this._filenameField = t;
1201
1201
  }
1202
1202
  }
1203
- class Lt extends f {
1203
+ class Gt extends f {
1204
1204
  constructor(t) {
1205
1205
  super(t);
1206
1206
  n(this, "_width");
1207
1207
  n(this, "_height");
1208
1208
  if (t) {
1209
1209
  if (t.width) {
1210
- const i = parseInt(t.width);
1211
- this._width = isNaN(i) ? void 0 : i;
1210
+ const s = parseInt(t.width);
1211
+ this._width = isNaN(s) ? void 0 : s;
1212
1212
  }
1213
1213
  if (t.height) {
1214
- const i = parseInt(t.height);
1215
- this._height = isNaN(i) ? void 0 : i;
1214
+ const s = parseInt(t.height);
1215
+ this._height = isNaN(s) ? void 0 : s;
1216
1216
  }
1217
1217
  }
1218
1218
  }
@@ -1233,7 +1233,7 @@ class Lt extends f {
1233
1233
  return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
1234
1234
  }
1235
1235
  }
1236
- class Gt extends f {
1236
+ class $t extends f {
1237
1237
  constructor(t) {
1238
1238
  super({ ...t, nolabel: !0 });
1239
1239
  /**
@@ -1269,12 +1269,12 @@ class Gt extends f {
1269
1269
  this._color = t;
1270
1270
  }
1271
1271
  }
1272
- class $t extends f {
1272
+ class qt extends f {
1273
1273
  constructor(e) {
1274
1274
  super(e);
1275
1275
  }
1276
1276
  }
1277
- class qt extends nt {
1277
+ class Jt extends rt {
1278
1278
  constructor(t) {
1279
1279
  super(t);
1280
1280
  /**
@@ -1306,7 +1306,7 @@ class qt extends nt {
1306
1306
  return this.parsedWidgetProps.colorField;
1307
1307
  }
1308
1308
  }
1309
- class Jt extends S {
1309
+ class Ht extends E {
1310
1310
  constructor(t) {
1311
1311
  super(t);
1312
1312
  n(this, "_nolabel", !0);
@@ -1328,8 +1328,8 @@ class Jt extends S {
1328
1328
  if (t.action_id && (this._actionId = parseInt(t.action_id)), t.action_field && (this._actionField = t.action_field), t.height)
1329
1329
  try {
1330
1330
  this._height = parseInt(t.height);
1331
- } catch (i) {
1332
- console.error(i);
1331
+ } catch (s) {
1332
+ console.error(s);
1333
1333
  }
1334
1334
  this._autoRefresh = p(t.autorefresh);
1335
1335
  }
@@ -1380,7 +1380,7 @@ class Jt extends S {
1380
1380
  this._autoRefresh = t;
1381
1381
  }
1382
1382
  }
1383
- class rt extends f {
1383
+ class at extends f {
1384
1384
  constructor(t) {
1385
1385
  super(t);
1386
1386
  /**
@@ -1433,9 +1433,9 @@ class rt extends f {
1433
1433
  this._columns = t;
1434
1434
  }
1435
1435
  }
1436
- class Ht extends rt {
1436
+ class Qt extends at {
1437
1437
  }
1438
- class Qt extends S {
1438
+ class Xt extends E {
1439
1439
  get colors() {
1440
1440
  return this._parsedWidgetProps.colors || {};
1441
1441
  }
@@ -1444,7 +1444,7 @@ class Qt extends S {
1444
1444
  return ((e = this._parsedWidgetProps) == null ? void 0 : e.colorField) || null;
1445
1445
  }
1446
1446
  }
1447
- class Kt extends S {
1447
+ class Kt extends E {
1448
1448
  constructor(t) {
1449
1449
  super(t);
1450
1450
  /**
@@ -1460,9 +1460,9 @@ class Kt extends S {
1460
1460
  this._direction = t;
1461
1461
  }
1462
1462
  }
1463
- class Xt extends it {
1463
+ class Ut extends nt {
1464
1464
  }
1465
- class Ut extends f {
1465
+ class Zt extends f {
1466
1466
  constructor(t) {
1467
1467
  super(t);
1468
1468
  /**
@@ -1492,7 +1492,7 @@ class Ut extends f {
1492
1492
  this._lastStep = t;
1493
1493
  }
1494
1494
  }
1495
- class at extends $ {
1495
+ class lt extends q {
1496
1496
  constructor(t) {
1497
1497
  super(t);
1498
1498
  n(this, "_lang", null);
@@ -1505,12 +1505,12 @@ class at extends $ {
1505
1505
  this._lang = t;
1506
1506
  }
1507
1507
  }
1508
- class Zt extends f {
1508
+ class te extends f {
1509
1509
  constructor(e) {
1510
1510
  super(e);
1511
1511
  }
1512
1512
  }
1513
- class te extends F {
1513
+ class ee extends F {
1514
1514
  constructor(t) {
1515
1515
  super(t);
1516
1516
  /**
@@ -1550,7 +1550,7 @@ class te extends F {
1550
1550
  return this._container.rows.flat().filter((t) => !t.invisible);
1551
1551
  }
1552
1552
  }
1553
- class ee extends f {
1553
+ class ie extends f {
1554
1554
  constructor(t) {
1555
1555
  super(t);
1556
1556
  /**
@@ -1558,8 +1558,8 @@ class ee extends f {
1558
1558
  */
1559
1559
  n(this, "_height");
1560
1560
  if (t.height) {
1561
- const i = parseInt(t.height);
1562
- this._height = isNaN(i) ? void 0 : i;
1561
+ const s = parseInt(t.height);
1562
+ this._height = isNaN(s) ? void 0 : s;
1563
1563
  }
1564
1564
  }
1565
1565
  get height() {
@@ -1569,7 +1569,7 @@ class ee extends f {
1569
1569
  this._height = t;
1570
1570
  }
1571
1571
  }
1572
- class K extends at {
1572
+ class K extends lt {
1573
1573
  constructor() {
1574
1574
  super(...arguments);
1575
1575
  n(this, "_lang", "json");
@@ -1595,7 +1595,7 @@ class se extends f {
1595
1595
  this._size = t;
1596
1596
  }
1597
1597
  }
1598
- class ie extends F {
1598
+ class ne extends F {
1599
1599
  constructor(t) {
1600
1600
  super(t);
1601
1601
  n(this, "_autoPlay", !0);
@@ -1611,12 +1611,12 @@ class ie extends F {
1611
1611
  return this._container.rows.flat().filter((t) => !t.invisible);
1612
1612
  }
1613
1613
  }
1614
- class ne extends R {
1614
+ class re extends L {
1615
1615
  get showText() {
1616
1616
  return this.parsedWidgetProps.show_text ?? !0;
1617
1617
  }
1618
1618
  }
1619
- class re extends f {
1619
+ class ae extends f {
1620
1620
  get width() {
1621
1621
  var e;
1622
1622
  return (e = this.parsedWidgetProps) == null ? void 0 : e.width;
@@ -1630,7 +1630,7 @@ class re extends f {
1630
1630
  return console.log(this.parsedWidgetProps), ((e = this.parsedWidgetProps) == null ? void 0 : e.showValue) ?? !1;
1631
1631
  }
1632
1632
  }
1633
- class ae extends N {
1633
+ class le extends j {
1634
1634
  constructor(t) {
1635
1635
  super(t);
1636
1636
  n(this, "_title", null);
@@ -1640,8 +1640,8 @@ class ae extends N {
1640
1640
  */
1641
1641
  n(this, "_height");
1642
1642
  if (t && (t.title && (this._title = t.title), t.icon && (this._icon = t.icon), t.height)) {
1643
- const i = parseInt(t.height);
1644
- this._height = isNaN(i) ? void 0 : i;
1643
+ const s = parseInt(t.height);
1644
+ this._height = isNaN(s) ? void 0 : s;
1645
1645
  }
1646
1646
  }
1647
1647
  get title() {
@@ -1663,7 +1663,7 @@ class ae extends N {
1663
1663
  this._height = t;
1664
1664
  }
1665
1665
  }
1666
- class E {
1666
+ class S {
1667
1667
  constructor() {
1668
1668
  /**
1669
1669
  * Widget class
@@ -1673,25 +1673,25 @@ class E {
1673
1673
  setWidgetClass(e) {
1674
1674
  switch (e) {
1675
1675
  case "notebook":
1676
- this._widgetClass = B;
1676
+ this._widgetClass = R;
1677
1677
  break;
1678
1678
  case "page":
1679
- this._widgetClass = Wt;
1679
+ this._widgetClass = Tt;
1680
1680
  break;
1681
1681
  case "group":
1682
- this._widgetClass = Tt;
1682
+ this._widgetClass = It;
1683
1683
  break;
1684
1684
  case "card":
1685
- this._widgetClass = ae;
1685
+ this._widgetClass = le;
1686
1686
  break;
1687
1687
  case "label":
1688
1688
  this._widgetClass = st;
1689
1689
  break;
1690
1690
  case "char":
1691
- this._widgetClass = R;
1691
+ this._widgetClass = L;
1692
1692
  break;
1693
1693
  case "text":
1694
- this._widgetClass = $;
1694
+ this._widgetClass = q;
1695
1695
  break;
1696
1696
  case "button":
1697
1697
  this._widgetClass = A;
@@ -1700,112 +1700,112 @@ class E {
1700
1700
  this._widgetClass = zt;
1701
1701
  break;
1702
1702
  case "action_buttons":
1703
- this._widgetClass = It;
1703
+ this._widgetClass = Et;
1704
1704
  break;
1705
1705
  case "selection":
1706
- this._widgetClass = S;
1706
+ this._widgetClass = E;
1707
1707
  break;
1708
1708
  case "many2one":
1709
1709
  case "many2one_lazy":
1710
1710
  this._widgetClass = St;
1711
1711
  break;
1712
1712
  case "boolean":
1713
- this._widgetClass = it;
1713
+ this._widgetClass = nt;
1714
1714
  break;
1715
1715
  case "integer":
1716
- this._widgetClass = Vt;
1716
+ this._widgetClass = Yt;
1717
1717
  break;
1718
1718
  case "float":
1719
- this._widgetClass = q;
1719
+ this._widgetClass = J;
1720
1720
  break;
1721
1721
  case "float_time":
1722
- this._widgetClass = Yt;
1722
+ this._widgetClass = Dt;
1723
1723
  break;
1724
1724
  case "date":
1725
- this._widgetClass = Nt;
1725
+ this._widgetClass = At;
1726
1726
  break;
1727
1727
  case "datetime":
1728
- this._widgetClass = At;
1728
+ this._widgetClass = Mt;
1729
1729
  break;
1730
1730
  case "progressbar":
1731
1731
  this._widgetClass = jt;
1732
1732
  break;
1733
1733
  case "markdown":
1734
- this._widgetClass = Et;
1734
+ this._widgetClass = Vt;
1735
1735
  break;
1736
1736
  case "many2many":
1737
1737
  case "one2many":
1738
1738
  case "one2many_list":
1739
- this._widgetClass = nt;
1739
+ this._widgetClass = rt;
1740
1740
  break;
1741
1741
  case "newline":
1742
- this._widgetClass = et;
1742
+ this._widgetClass = it;
1743
1743
  break;
1744
1744
  case "separator":
1745
- this._widgetClass = Mt;
1745
+ this._widgetClass = Bt;
1746
1746
  break;
1747
1747
  case "url":
1748
- this._widgetClass = R;
1748
+ this._widgetClass = L;
1749
1749
  break;
1750
1750
  case "email":
1751
1751
  this._widgetClass = se;
1752
1752
  break;
1753
1753
  case "reference":
1754
- this._widgetClass = Bt;
1754
+ this._widgetClass = Rt;
1755
1755
  break;
1756
1756
  case "binary":
1757
- this._widgetClass = Rt;
1757
+ this._widgetClass = Lt;
1758
1758
  break;
1759
1759
  case "image":
1760
- this._widgetClass = Lt;
1760
+ this._widgetClass = Gt;
1761
1761
  break;
1762
1762
  case "icon":
1763
- this._widgetClass = Gt;
1763
+ this._widgetClass = $t;
1764
1764
  break;
1765
1765
  case "fiber_grid":
1766
- this._widgetClass = $t;
1766
+ this._widgetClass = qt;
1767
1767
  break;
1768
1768
  case "timeline":
1769
- this._widgetClass = qt;
1769
+ this._widgetClass = Jt;
1770
1770
  break;
1771
1771
  case "indicator":
1772
- this._widgetClass = Jt;
1772
+ this._widgetClass = Ht;
1773
1773
  break;
1774
1774
  case "tags":
1775
- this._widgetClass = Ht;
1775
+ this._widgetClass = Qt;
1776
1776
  break;
1777
1777
  case "tag":
1778
- this._widgetClass = Qt;
1778
+ this._widgetClass = Xt;
1779
1779
  break;
1780
1780
  case "avatar":
1781
- this._widgetClass = Ot;
1781
+ this._widgetClass = Wt;
1782
1782
  break;
1783
1783
  case "radio":
1784
1784
  this._widgetClass = Kt;
1785
1785
  break;
1786
1786
  case "multicheckbox":
1787
- this._widgetClass = rt;
1787
+ this._widgetClass = at;
1788
1788
  break;
1789
1789
  case "switch":
1790
- this._widgetClass = Xt;
1790
+ this._widgetClass = Ut;
1791
1791
  break;
1792
1792
  case "steps":
1793
- this._widgetClass = Ut;
1793
+ this._widgetClass = Zt;
1794
1794
  break;
1795
1795
  case "codeeditor":
1796
- this._widgetClass = at;
1796
+ this._widgetClass = lt;
1797
1797
  break;
1798
1798
  case "time":
1799
- this._widgetClass = Zt;
1799
+ this._widgetClass = te;
1800
1800
  break;
1801
1801
  case "html_preview":
1802
- this._widgetClass = Dt;
1802
+ this._widgetClass = Nt;
1803
1803
  break;
1804
1804
  case "alert":
1805
- this._widgetClass = te;
1805
+ this._widgetClass = ee;
1806
1806
  break;
1807
1807
  case "comments_timeline":
1808
- this._widgetClass = ee;
1808
+ this._widgetClass = ie;
1809
1809
  break;
1810
1810
  case "json":
1811
1811
  this._widgetClass = K;
@@ -1814,28 +1814,28 @@ class E {
1814
1814
  this._widgetClass = K;
1815
1815
  break;
1816
1816
  case "spinner":
1817
- this._widgetClass = N;
1817
+ this._widgetClass = j;
1818
1818
  break;
1819
1819
  case "carousel":
1820
- this._widgetClass = ie;
1820
+ this._widgetClass = ne;
1821
1821
  break;
1822
1822
  case "colorPicker":
1823
- this._widgetClass = ne;
1823
+ this._widgetClass = re;
1824
1824
  break;
1825
1825
  case "qrcode":
1826
- this._widgetClass = re;
1826
+ this._widgetClass = ae;
1827
1827
  break;
1828
1828
  }
1829
1829
  }
1830
1830
  createWidget(e, t) {
1831
1831
  this._widgetClass = void 0;
1832
- let i = e;
1833
- switch (this.setWidgetClass(e), this._widgetClass === void 0 && (i = t.fieldsWidgetType, this.setWidgetClass(t.fieldsWidgetType)), this._widgetClass === void 0 && (this._widgetClass = k), e) {
1832
+ let s = e;
1833
+ switch (this.setWidgetClass(e), this._widgetClass === void 0 && (s = t.fieldsWidgetType, this.setWidgetClass(t.fieldsWidgetType)), this._widgetClass === void 0 && (this._widgetClass = k), e) {
1834
1834
  case "notebook":
1835
1835
  case "page":
1836
1836
  case "group":
1837
1837
  case "card":
1838
- return new this._widgetClass({ ...t, type: i });
1838
+ return new this._widgetClass({ ...t, type: s });
1839
1839
  case "button":
1840
1840
  return new this._widgetClass({
1841
1841
  ...t,
@@ -1843,25 +1843,25 @@ class E {
1843
1843
  buttonType: t.type
1844
1844
  });
1845
1845
  default:
1846
- return new this._widgetClass({ ...t, type: i });
1846
+ return new this._widgetClass({ ...t, type: s });
1847
1847
  }
1848
1848
  }
1849
1849
  }
1850
- const le = ({
1851
- fieldName: s,
1850
+ const oe = ({
1851
+ fieldName: i,
1852
1852
  values: e,
1853
1853
  fields: t
1854
1854
  }) => {
1855
1855
  var o;
1856
- if (!s)
1857
- return {};
1858
- const i = (o = t[s]) == null ? void 0 : o.states;
1859
1856
  if (!i)
1860
1857
  return {};
1858
+ const s = (o = t[i]) == null ? void 0 : o.states;
1859
+ if (!s)
1860
+ return {};
1861
1861
  const r = {}, l = {};
1862
- for (const a of Object.keys(i))
1862
+ for (const a of Object.keys(s))
1863
1863
  if (e.state === a) {
1864
- const c = i[a];
1864
+ const c = s[a];
1865
1865
  for (const _ of c) {
1866
1866
  const [u, h] = _;
1867
1867
  l[u] || (l[u] = []), l[u].push(h);
@@ -1872,44 +1872,55 @@ const le = ({
1872
1872
  r[a] = c.some((_) => _);
1873
1873
  }
1874
1874
  return r;
1875
- }, lt = ({
1876
- states: s,
1875
+ }, ot = ({
1876
+ states: i,
1877
1877
  values: e
1878
1878
  }) => {
1879
1879
  if (!(e != null && e.state))
1880
1880
  return {};
1881
- const t = s.split(",");
1881
+ const t = i.split(",");
1882
1882
  return t.length === 0 ? {} : t.includes(e.state) ? {} : { invisible: !0 };
1883
- };
1884
- function oe({
1885
- values: s = {},
1883
+ }, M = "9007199254740991";
1884
+ function ce(i) {
1885
+ if (i == null)
1886
+ return null;
1887
+ if (typeof i == "number")
1888
+ return Number.isFinite(i) ? i : null;
1889
+ if (typeof i == "string") {
1890
+ const e = i.trim();
1891
+ return e === "" ? null : /^-?\d+$/.test(e) ? e.startsWith("-") ? parseInt(e, 10) : e.length > M.length || e.length === M.length && e > M ? e : parseInt(e, 10) : e;
1892
+ }
1893
+ return null;
1894
+ }
1895
+ function de({
1896
+ values: i = {},
1886
1897
  fieldName: e,
1887
1898
  fields: t = {}
1888
1899
  }) {
1889
1900
  var r;
1890
- const i = ((r = t[e]) == null ? void 0 : r.type) || "passthrough";
1891
- return i === "many2one" ? s[e] ? s[e][0] || null : !1 : i === "one2many" || i === "many2many" ? s[e].map((l) => l.id) : s != null && s[e] ? s == null ? void 0 : s[e] : e.includes("'") ? e : parseInt(e);
1901
+ const s = ((r = t[e]) == null ? void 0 : r.type) || "passthrough";
1902
+ return s === "many2one" ? i[e] ? i[e][0] || null : !1 : s === "one2many" || s === "many2many" ? i[e].map((l) => l.id) : i != null && i[e] ? i == null ? void 0 : i[e] : e.includes("'") ? e : ce(e);
1892
1903
  }
1893
- const J = ({
1894
- context: s,
1904
+ const H = ({
1905
+ context: i,
1895
1906
  values: e,
1896
1907
  fields: t
1897
1908
  }) => {
1898
1909
  try {
1899
- if (!s)
1910
+ if (!i)
1900
1911
  return;
1901
- if (ct(s) || typeof s != "string")
1902
- return s;
1903
- const i = ot(s);
1904
- if (i !== null)
1912
+ if (dt(i) || typeof i != "string")
1905
1913
  return i;
1906
- if (s.trim().length === 0)
1914
+ const s = ct(i);
1915
+ if (s !== null)
1916
+ return s;
1917
+ if (i.trim().length === 0)
1907
1918
  return;
1908
- const h = s.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((d) => d.split(":")), m = {};
1919
+ const h = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((d) => d.split(":")), m = {};
1909
1920
  return h.forEach((d) => {
1910
1921
  const b = d[1];
1911
1922
  if (!d[1].includes("'") && d[1] !== "true" && d[1] !== "false") {
1912
- const x = oe({
1923
+ const x = de({
1913
1924
  values: e,
1914
1925
  fields: t,
1915
1926
  fieldName: b === "active_id" ? "id" : b
@@ -1924,46 +1935,46 @@ const J = ({
1924
1935
  } catch {
1925
1936
  return;
1926
1937
  }
1927
- }, Se = (s) => {
1938
+ }, Ve = (i) => {
1928
1939
  const e = [];
1929
1940
  try {
1930
- return !s || ct(s) || typeof s != "string" ? e : ot(s) !== null ? [] : (s.trim().length === 0 || s.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((h) => h.split(":")).forEach((h) => {
1941
+ return !i || dt(i) || typeof i != "string" ? e : ct(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((h) => h.split(":")).forEach((h) => {
1931
1942
  !h[1].includes("'") && h[1] !== "true" && h[1] !== "false" && e.push(h[1].replace(/'/g, ""));
1932
1943
  }), e);
1933
1944
  } catch {
1934
1945
  }
1935
1946
  return e;
1936
1947
  };
1937
- function ot(s) {
1948
+ function ct(i) {
1938
1949
  try {
1939
- return JSON.parse(s.replace(/'/g, '"'));
1950
+ return JSON.parse(i.replace(/'/g, '"'));
1940
1951
  } catch {
1941
1952
  return null;
1942
1953
  }
1943
1954
  }
1944
- function ct(s) {
1945
- return typeof s == "object" && s !== null && typeof s != "string";
1955
+ function dt(i) {
1956
+ return typeof i == "object" && i !== null && typeof i != "string";
1946
1957
  }
1947
- const dt = (s) => {
1948
- const e = s.trim().replace(")", "").split("("), t = e[0], i = e[1], r = i ? i.split(",").map((l) => l.trim()).filter((l) => l.length > 0) : [];
1958
+ const ut = (i) => {
1959
+ const e = i.trim().replace(")", "").split("("), t = e[0], s = e[1], r = s ? s.split(",").map((l) => l.trim()).filter((l) => l.length > 0) : [];
1949
1960
  return {
1950
1961
  method: t,
1951
1962
  args: r
1952
1963
  };
1953
1964
  };
1954
- function ce(s) {
1965
+ function ue(i) {
1955
1966
  const e = [];
1956
- function t(i) {
1967
+ function t(s) {
1957
1968
  const r = [];
1958
- for (const l of i)
1969
+ for (const l of s)
1959
1970
  l instanceof F ? t(l._container.rows.flat()) : r.push(l);
1960
1971
  r.length > 0 && e.push(r);
1961
1972
  }
1962
- for (const i of s)
1963
- t(i);
1973
+ for (const s of i)
1974
+ t(s);
1964
1975
  return e.flat();
1965
1976
  }
1966
- class Ee {
1977
+ class Ye {
1967
1978
  constructor(e, t = 4) {
1968
1979
  /**
1969
1980
  * Object containing fields specification of the form.
@@ -2018,7 +2029,7 @@ class Ee {
2018
2029
  * Context for each field in the form
2019
2030
  */
2020
2031
  n(this, "_contextForFields", {});
2021
- this._fields = e, this._container = new z(t, 6, !1, "root");
2032
+ this._fields = e, this._container = new I(t, 6, !1, "root");
2022
2033
  }
2023
2034
  get fields() {
2024
2035
  return this._fields;
@@ -2073,13 +2084,13 @@ class Ee {
2073
2084
  }
2074
2085
  parse(e, t) {
2075
2086
  var a;
2076
- const { values: i = {}, readOnly: r = !1 } = t || {}, l = I.parse(e).filter((c) => c.tagName === "form")[0];
2077
- this._string = ((a = l.attributes) == null ? void 0 : a.string) || null, this._string && (this._string = g(this._string)), this._readOnly = r, this._context = i.id ? { active_id: i.id, active_ids: [i.id] } : {}, this._invisibleFields = [], this.parseNode({
2087
+ const { values: s = {}, readOnly: r = !1 } = t || {}, l = z.parse(e).filter((c) => c.tagName === "form")[0];
2088
+ this._string = ((a = l.attributes) == null ? void 0 : a.string) || null, this._string && (this._string = g(this._string)), this._readOnly = r, this._context = s.id ? { active_id: s.id, active_ids: [s.id] } : {}, this._invisibleFields = [], this.parseNode({
2078
2089
  fields: l.children,
2079
2090
  container: this._container,
2080
- values: i
2091
+ values: s
2081
2092
  });
2082
- const o = ce(this._container._rows);
2093
+ const o = ue(this._container._rows);
2083
2094
  o.forEach((c) => {
2084
2095
  const _ = c;
2085
2096
  _._id && _._context && (this._contextForFields[_._id] = c._context);
@@ -2088,9 +2099,9 @@ class Ee {
2088
2099
  parseNode({
2089
2100
  fields: e,
2090
2101
  container: t,
2091
- values: i
2102
+ values: s
2092
2103
  }) {
2093
- const r = new E();
2104
+ const r = new S();
2094
2105
  e.filter((l) => typeof l == "object").forEach((l) => {
2095
2106
  var v, C;
2096
2107
  const { tagName: o, attributes: a, children: c } = l;
@@ -2105,7 +2116,7 @@ class Ee {
2105
2116
  `Field ${w} doesn't exist in fields defintion`
2106
2117
  );
2107
2118
  _ = this._fields[w].type, a.widget_props = {
2108
- ...Z(a.widget_props),
2119
+ ...tt(a.widget_props),
2109
2120
  ...this._fields[w].widget_props || {}
2110
2121
  };
2111
2122
  }
@@ -2115,31 +2126,31 @@ class Ee {
2115
2126
  fieldsWidgetType: this._fields[w].type
2116
2127
  };
2117
2128
  }
2118
- const h = tt({
2129
+ const h = et({
2119
2130
  tagAttributes: u,
2120
- values: i,
2131
+ values: s,
2121
2132
  fields: this._fields,
2122
2133
  widgetType: o
2123
2134
  });
2124
2135
  let m;
2125
- o === "button" && u.states ? m = lt({
2136
+ o === "button" && u.states ? m = ot({
2126
2137
  states: u.states,
2127
- values: i
2128
- }) : m = le({
2138
+ values: s
2139
+ }) : m = oe({
2129
2140
  fieldName: u.name,
2130
- values: i,
2141
+ values: s,
2131
2142
  fields: this._fields
2132
2143
  });
2133
- const d = J({
2144
+ const d = H({
2134
2145
  context: u.context || ((v = this._fields[u.name]) == null ? void 0 : v.context),
2135
- values: i,
2146
+ values: s,
2136
2147
  fields: this._fields
2137
2148
  });
2138
- u.on_change && (this._onChangeFields[u.name] = dt(
2149
+ u.on_change && (this._onChangeFields[u.name] = ut(
2139
2150
  u.on_change
2140
2151
  ));
2141
2152
  let b;
2142
- X(u.domain) ? b = u.domain : X((C = this._fields[u.name]) == null ? void 0 : C.domain) && (b = this._fields[u.name].domain), this._keyIdx = this._keyIdx + 1;
2153
+ U(u.domain) ? b = u.domain : U((C = this._fields[u.name]) == null ? void 0 : C.domain) && (b = this._fields[u.name].domain), this._keyIdx = this._keyIdx + 1;
2143
2154
  const x = {
2144
2155
  ...h,
2145
2156
  ...m,
@@ -2152,7 +2163,7 @@ class Ee {
2152
2163
  y.invisible && y instanceof f && this._invisibleFields.push(x.name), y instanceof F && this.parseNode({
2153
2164
  fields: c,
2154
2165
  container: y.container,
2155
- values: i
2166
+ values: s
2156
2167
  }), y instanceof A && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), t.addWidget(y);
2157
2168
  });
2158
2169
  }
@@ -2164,10 +2175,10 @@ class Ee {
2164
2175
  return this.container.findById(e);
2165
2176
  }
2166
2177
  }
2167
- function X(s) {
2168
- return s ? Array.isArray(s) && s.length > 0 ? !0 : typeof s == "string" && s !== "" && s !== "[]" : !1;
2178
+ function U(i) {
2179
+ return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2169
2180
  }
2170
- class Ve {
2181
+ class De {
2171
2182
  constructor(e) {
2172
2183
  /**
2173
2184
  * Object containing fields specification of the form.
@@ -2239,9 +2250,9 @@ class Ve {
2239
2250
  this._infinite = e;
2240
2251
  }
2241
2252
  parse(e) {
2242
- const t = I.parse(e).filter((r) => r.tagName === "tree")[0];
2253
+ const t = z.parse(e).filter((r) => r.tagName === "tree")[0];
2243
2254
  this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), this._colors = t.attributes.colors || null, this._colors && (this._colors = g(this._colors)), this._status = t.attributes.status || null, this._status && (this._status = g(this._status)), this._editable = t.attributes.editable || null, this._infinite = t.attributes.infinite || !1;
2244
- const i = new E();
2255
+ const s = new S();
2245
2256
  t.children.forEach((r) => {
2246
2257
  const { tagName: l, attributes: o } = r;
2247
2258
  let a = null;
@@ -2253,7 +2264,7 @@ class Ve {
2253
2264
  throw new Error(`Field ${c} doesn't exist in fields defintion`);
2254
2265
  const h = this._fields[c];
2255
2266
  a = h.type, (Array.isArray(h == null ? void 0 : h.domain) && (h == null ? void 0 : h.domain.length) === 0 || (h == null ? void 0 : h.domain) === !1) && o.domain && o.domain.length > 0 && delete h.domain;
2256
- const m = J({
2267
+ const m = H({
2257
2268
  context: o.context || h.context,
2258
2269
  values: {},
2259
2270
  fields: this._fields
@@ -2266,7 +2277,7 @@ class Ve {
2266
2277
  }, this._contextForFields[c] = m;
2267
2278
  }
2268
2279
  if (_ && (a = _), !u.invisible) {
2269
- const h = i.createWidget(a, u);
2280
+ const h = s.createWidget(a, u);
2270
2281
  this._columns.push(h);
2271
2282
  }
2272
2283
  p(u.autorefresh) && this._autorefreshableFields.push(c);
@@ -2281,7 +2292,7 @@ class Ve {
2281
2292
  return this._columns.find((t) => t.findById ? t.findById(e) : !1);
2282
2293
  }
2283
2294
  }
2284
- class Ye {
2295
+ class Ne {
2285
2296
  constructor(e) {
2286
2297
  /**
2287
2298
  * Object containing fields specification of the kanban.
@@ -2392,15 +2403,15 @@ class Ye {
2392
2403
  return this._aggregations;
2393
2404
  }
2394
2405
  parse(e) {
2395
- const t = I.parse(e).filter((r) => r.tagName === "kanban")[0];
2396
- this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), this._column_field = t.attributes.column_field || "state", this._column_domain = t.attributes.column_domain || null, this._drag = t.attributes.drag !== void 0 ? p(t.attributes.drag) : !0, this._sort = t.attributes.sort || void 0, this._set_max_cards = t.attributes.set_max_cards !== void 0 ? p(t.attributes.set_max_cards) : !1, this._colors = t.attributes.colors || null, this._colors && (this._colors = g(this._colors)), this._status = t.attributes.status || null, this._status && (this._status = g(this._status)), t.attributes.on_change_column && (this._on_change_column = dt(t.attributes.on_change_column));
2397
- const i = new E();
2406
+ const t = z.parse(e).filter((r) => r.tagName === "kanban")[0];
2407
+ this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), this._column_field = t.attributes.column_field || "state", this._column_domain = t.attributes.column_domain || null, this._drag = t.attributes.drag !== void 0 ? p(t.attributes.drag) : !0, this._sort = t.attributes.sort || void 0, this._set_max_cards = t.attributes.set_max_cards !== void 0 ? p(t.attributes.set_max_cards) : !1, this._colors = t.attributes.colors || null, this._colors && (this._colors = g(this._colors)), this._status = t.attributes.status || null, this._status && (this._status = g(this._status)), t.attributes.on_change_column && (this._on_change_column = ut(t.attributes.on_change_column));
2408
+ const s = new S();
2398
2409
  t.children.forEach((r) => {
2399
2410
  const { tagName: l, attributes: o } = r;
2400
- l === "field" ? this._parseField(r, o, i) : l === "button" && this._parseButton(r, o);
2411
+ l === "field" ? this._parseField(r, o, s) : l === "button" && this._parseButton(r, o);
2401
2412
  });
2402
2413
  }
2403
- _parseField(e, t, i) {
2414
+ _parseField(e, t, s) {
2404
2415
  const { name: r, widget: l, sum: o } = t;
2405
2416
  if (!r)
2406
2417
  return;
@@ -2409,7 +2420,7 @@ class Ye {
2409
2420
  const a = this._fields[r];
2410
2421
  let c = a.type;
2411
2422
  (Array.isArray(a == null ? void 0 : a.domain) && (a == null ? void 0 : a.domain.length) === 0 || (a == null ? void 0 : a.domain) === !1) && t.domain && t.domain.length > 0 && delete a.domain;
2412
- const _ = J({
2423
+ const _ = H({
2413
2424
  context: t.context || a.context,
2414
2425
  values: {},
2415
2426
  fields: this._fields
@@ -2420,7 +2431,7 @@ class Ye {
2420
2431
  context: _
2421
2432
  };
2422
2433
  if (this._contextForFields[r] = _, l && (c = l), !u.invisible) {
2423
- const h = i.createWidget(
2434
+ const h = s.createWidget(
2424
2435
  c,
2425
2436
  u
2426
2437
  );
@@ -2428,12 +2439,12 @@ class Ye {
2428
2439
  }
2429
2440
  }
2430
2441
  _parseButton(e, t) {
2431
- const { name: i, type: r, string: l, states: o } = t;
2432
- if (!i)
2442
+ const { name: s, type: r, string: l, states: o } = t;
2443
+ if (!s)
2433
2444
  return;
2434
2445
  const a = {
2435
2446
  ...t,
2436
- name: i,
2447
+ name: s,
2437
2448
  buttonType: r || "object",
2438
2449
  string: l || ""
2439
2450
  }, c = new A(a);
@@ -2448,7 +2459,7 @@ class Ye {
2448
2459
  return t || this._buttons.find((r) => r.findById ? r.findById(e) : !1) || null;
2449
2460
  }
2450
2461
  }
2451
- class De {
2462
+ class je {
2452
2463
  constructor(e) {
2453
2464
  n(this, "_kanbanDef");
2454
2465
  this._kanbanDef = e;
@@ -2457,11 +2468,11 @@ class De {
2457
2468
  return this._kanbanDef;
2458
2469
  }
2459
2470
  parse(e, t) {
2460
- const i = (t == null ? void 0 : t.readOnly) ?? !1, r = new z(1, 12, i), l = new E();
2471
+ const s = (t == null ? void 0 : t.readOnly) ?? !1, r = new I(1, 12, s), l = new S();
2461
2472
  let o = 0;
2462
2473
  return this._kanbanDef.card_fields.forEach((a) => {
2463
2474
  o++;
2464
- const c = tt({
2475
+ const c = et({
2465
2476
  tagAttributes: a.raw_props || {},
2466
2477
  values: e,
2467
2478
  fields: this._kanbanDef.fields,
@@ -2471,12 +2482,12 @@ class De {
2471
2482
  ...c,
2472
2483
  key: `field_${o}`
2473
2484
  };
2474
- i && (_.readonly = !0);
2485
+ s && (_.readonly = !0);
2475
2486
  const u = a.type || "field", h = l.createWidget(u, _);
2476
2487
  r.addWidget(h, { addLabel: !a.nolabel });
2477
2488
  }), this._kanbanDef.buttons.forEach((a) => {
2478
2489
  o++;
2479
- const c = a.states ? lt({
2490
+ const c = a.states ? ot({
2480
2491
  states: a.states,
2481
2492
  values: e
2482
2493
  }) : {}, _ = {
@@ -2484,13 +2495,13 @@ class De {
2484
2495
  ...c,
2485
2496
  key: `button_${o}`
2486
2497
  };
2487
- i && (_.readonly = !0);
2498
+ s && (_.readonly = !0);
2488
2499
  const u = new A(_);
2489
2500
  r.addWidget(u, { addLabel: !1 });
2490
2501
  }), r;
2491
2502
  }
2492
2503
  }
2493
- const de = {
2504
+ const he = {
2494
2505
  text: "text",
2495
2506
  many2one: "many2one",
2496
2507
  char: "char",
@@ -2503,8 +2514,8 @@ const de = {
2503
2514
  date: "date",
2504
2515
  datetime: "datetime"
2505
2516
  };
2506
- class je {
2507
- constructor(e, t, i = 8) {
2517
+ class Ae {
2518
+ constructor(e, t, s = 8) {
2508
2519
  /**
2509
2520
  * Object containing the specific fields for primary and secondary search fields
2510
2521
  */
@@ -2515,7 +2526,7 @@ class je {
2515
2526
  n(this, "_fields");
2516
2527
  n(this, "_simpleSearchContainer");
2517
2528
  n(this, "_advancedSearchContainer");
2518
- this._searchFields = e, this._fields = t, this._simpleSearchContainer = new z(i), this._advancedSearchContainer = new z(i);
2529
+ this._searchFields = e, this._fields = t, this._simpleSearchContainer = new I(s), this._advancedSearchContainer = new I(s);
2519
2530
  }
2520
2531
  get searchFields() {
2521
2532
  return this._searchFields;
@@ -2530,7 +2541,7 @@ class je {
2530
2541
  return this._advancedSearchContainer;
2531
2542
  }
2532
2543
  parse() {
2533
- const e = new E();
2544
+ const e = new S();
2534
2545
  this.parseFields(
2535
2546
  this.searchFields.primary,
2536
2547
  e
@@ -2544,15 +2555,15 @@ class je {
2544
2555
  });
2545
2556
  }
2546
2557
  parseFields(e, t) {
2547
- return e.map((i) => {
2558
+ return e.map((s) => {
2548
2559
  const r = {
2549
- ...this.fields[i],
2550
- name: i,
2560
+ ...this.fields[s],
2561
+ name: s,
2551
2562
  colspan: 2,
2552
- fieldsWidgetType: this.fields[i].type
2563
+ fieldsWidgetType: this.fields[s].type
2553
2564
  }, { type: l, widget: o } = r;
2554
2565
  let a = o ?? l;
2555
- return de[a] === void 0 && (a = l), t.createWidget(a, r);
2566
+ return he[a] === void 0 && (a = l), t.createWidget(a, r);
2556
2567
  });
2557
2568
  }
2558
2569
  /**
@@ -2563,23 +2574,23 @@ class je {
2563
2574
  return this.advancedSearchContainer.findById(e);
2564
2575
  }
2565
2576
  }
2566
- const Ne = ({
2567
- domain: s,
2577
+ const Me = ({
2578
+ domain: i,
2568
2579
  widgetFieldName: e
2569
2580
  }) => {
2570
2581
  const t = [];
2571
- return s.forEach((i) => {
2572
- if (!Array.isArray(i))
2582
+ return i.forEach((s) => {
2583
+ if (!Array.isArray(s))
2573
2584
  return;
2574
- const [r, l, o] = i;
2585
+ const [r, l, o] = s;
2575
2586
  let a, c;
2576
2587
  r.indexOf(".") !== -1 ? (a = r.substr(0, r.indexOf(".")), c = r.substr(
2577
2588
  r.indexOf(".") + 1,
2578
2589
  r.length - 1
2579
2590
  )) : (a = r, c = "id"), a === e && t.push([c, l, o]);
2580
2591
  }), t;
2581
- }, Ae = (s) => typeof s != "string" ? [] : s.replace(/[()[\]]/g, "").split(",").map((e) => e.trim()).filter((e) => !e.includes("'"));
2582
- class ue {
2592
+ }, Be = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((e) => e.trim()).filter((e) => !e.includes("'"));
2593
+ class _e {
2583
2594
  constructor(e) {
2584
2595
  n(this, "_action_id", null);
2585
2596
  n(this, "_position", null);
@@ -2592,15 +2603,15 @@ class ue {
2592
2603
  return this._position;
2593
2604
  }
2594
2605
  }
2595
- class Me {
2606
+ class Re {
2596
2607
  constructor(e) {
2597
2608
  n(this, "_string", null);
2598
2609
  n(this, "_items", []);
2599
- const t = I.parse(e).filter((r) => r.tagName === "dashboard")[0];
2610
+ const t = z.parse(e).filter((r) => r.tagName === "dashboard")[0];
2600
2611
  this._string = t.attributes.string || null;
2601
- const { children: i } = t;
2602
- i.forEach((r) => {
2603
- r.tagName === "dashboard_item" && this._items.push(new ue(r.attributes));
2612
+ const { children: s } = t;
2613
+ s.forEach((r) => {
2614
+ r.tagName === "dashboard_item" && this._items.push(new _e(r.attributes));
2604
2615
  });
2605
2616
  }
2606
2617
  get string() {
@@ -2610,7 +2621,7 @@ class Me {
2610
2621
  return this._items;
2611
2622
  }
2612
2623
  }
2613
- class ut {
2624
+ class ht {
2614
2625
  constructor(e) {
2615
2626
  n(this, "_string", null);
2616
2627
  n(this, "_type");
@@ -2638,9 +2649,9 @@ class ut {
2638
2649
  return this._y_range;
2639
2650
  }
2640
2651
  }
2641
- class ht extends ut {
2642
- constructor(t, i) {
2643
- super(i);
2652
+ class _t extends ht {
2653
+ constructor(t, s) {
2654
+ super(s);
2644
2655
  n(this, "_color", null);
2645
2656
  n(this, "_icon", null);
2646
2657
  n(this, "_totalDomain", null);
@@ -2648,7 +2659,7 @@ class ht extends ut {
2648
2659
  n(this, "_progressbar", !1);
2649
2660
  n(this, "_showTotal", !0);
2650
2661
  n(this, "_suffix", null);
2651
- this._type = t, this._color = i.attributes.color || null, this._color && (this._color = g(this._color)), this._icon = i.attributes.icon || null, this._icon && (this._icon = g(this._icon)), this._suffix = i.attributes.suffix || null, this._totalDomain = g(i.attributes.totalDomain) || null, this._showPercent = p(i.attributes.showPercent), this._progressbar = p(i.attributes.progressbar), this._showTotal = i.attributes.showTotal !== void 0 ? p(i.attributes.showTotal) : !!this._totalDomain;
2662
+ this._type = t, this._color = s.attributes.color || null, this._color && (this._color = g(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = g(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = g(s.attributes.totalDomain) || null, this._showPercent = p(s.attributes.showPercent), this._progressbar = p(s.attributes.progressbar), this._showTotal = s.attributes.showTotal !== void 0 ? p(s.attributes.showTotal) : !!this._totalDomain;
2652
2663
  }
2653
2664
  get color() {
2654
2665
  return this._color;
@@ -2672,12 +2683,12 @@ class ht extends ut {
2672
2683
  return this._suffix;
2673
2684
  }
2674
2685
  }
2675
- class he extends ht {
2676
- constructor(t, i) {
2677
- super(t, i);
2686
+ class fe extends _t {
2687
+ constructor(t, s) {
2688
+ super(t, s);
2678
2689
  n(this, "_field");
2679
2690
  n(this, "_operator");
2680
- const { children: r } = i;
2691
+ const { children: r } = s;
2681
2692
  r.forEach((l) => {
2682
2693
  if (l.tagName === "field") {
2683
2694
  const o = l.attributes.name, a = l.attributes.operator;
@@ -2692,20 +2703,20 @@ class he extends ht {
2692
2703
  return this._operator;
2693
2704
  }
2694
2705
  }
2695
- const _e = (s) => {
2706
+ const ge = (i) => {
2696
2707
  const e = [];
2697
2708
  let t;
2698
- if (s.forEach((i) => {
2699
- if (i.tagName === "field") {
2700
- const r = i.attributes.axis, l = i.attributes.operator, o = i.attributes.name, a = i.attributes.label || void 0, c = i.attributes.stacked || void 0;
2709
+ if (i.forEach((s) => {
2710
+ if (s.tagName === "field") {
2711
+ const r = s.attributes.axis, l = s.attributes.operator, o = s.attributes.name, a = s.attributes.label || void 0, c = s.attributes.stacked || void 0;
2701
2712
  if (!r)
2702
2713
  throw new Error(`Field ${o} doesn't have an axis`);
2703
2714
  if (!o)
2704
2715
  throw new Error("Missing name attribute for field");
2705
- r === "x" ? t = new me({
2716
+ r === "x" ? t = new ye({
2706
2717
  name: o
2707
2718
  }) : r === "y" && e.push(
2708
- new ge({
2719
+ new be({
2709
2720
  name: o,
2710
2721
  operator: l,
2711
2722
  label: a,
@@ -2722,13 +2733,13 @@ const _e = (s) => {
2722
2733
  y: e
2723
2734
  };
2724
2735
  };
2725
- class M extends ut {
2726
- constructor(t, i) {
2727
- super(i);
2736
+ class B extends ht {
2737
+ constructor(t, s) {
2738
+ super(s);
2728
2739
  n(this, "_x");
2729
2740
  n(this, "_y");
2730
2741
  this._type = t;
2731
- const r = _e(i.children);
2742
+ const r = ge(s.children);
2732
2743
  this._x = r.x, this._y = r.y;
2733
2744
  }
2734
2745
  get x() {
@@ -2738,22 +2749,22 @@ class M extends ut {
2738
2749
  return this._y;
2739
2750
  }
2740
2751
  }
2741
- const fe = {
2742
- indicator: ht,
2743
- indicatorField: he,
2744
- line: M,
2745
- bar: M,
2746
- pie: M
2747
- }, Be = (s) => {
2748
- const e = I.parse(s).filter((r) => r.tagName === "graph")[0], t = e.attributes.type;
2752
+ const me = {
2753
+ indicator: _t,
2754
+ indicatorField: fe,
2755
+ line: B,
2756
+ bar: B,
2757
+ pie: B
2758
+ }, Le = (i) => {
2759
+ const e = z.parse(i).filter((r) => r.tagName === "graph")[0], t = e.attributes.type;
2749
2760
  if (!t)
2750
2761
  throw new Error(`${t} is not a valid graph`);
2751
- const i = fe[t];
2752
- if (!i)
2762
+ const s = me[t];
2763
+ if (!s)
2753
2764
  throw new Error(`${t} not found as a GraphModel`);
2754
- return new i(t, e);
2765
+ return new s(t, e);
2755
2766
  };
2756
- class _t {
2767
+ class ft {
2757
2768
  constructor({ name: e, axis: t }) {
2758
2769
  n(this, "_name");
2759
2770
  n(this, "_axis");
@@ -2766,10 +2777,10 @@ class _t {
2766
2777
  return this._axis;
2767
2778
  }
2768
2779
  }
2769
- class ge extends _t {
2780
+ class be extends ft {
2770
2781
  constructor({
2771
2782
  name: t,
2772
- operator: i,
2783
+ operator: s,
2773
2784
  label: r,
2774
2785
  stacked: l
2775
2786
  }) {
@@ -2777,7 +2788,7 @@ class ge extends _t {
2777
2788
  n(this, "_operator");
2778
2789
  n(this, "_label");
2779
2790
  n(this, "_stacked");
2780
- this._operator = i, this._label = r, this._stacked = l;
2791
+ this._operator = s, this._label = r, this._stacked = l;
2781
2792
  }
2782
2793
  get operator() {
2783
2794
  return this._operator;
@@ -2789,77 +2800,77 @@ class ge extends _t {
2789
2800
  return this._stacked;
2790
2801
  }
2791
2802
  }
2792
- class me extends _t {
2803
+ class ye extends ft {
2793
2804
  constructor({ name: e }) {
2794
2805
  super({ name: e, axis: "x" });
2795
2806
  }
2796
2807
  }
2797
- const be = ({ ooui: s }) => {
2798
- const t = [s.x.name];
2799
- return s.y ? (s.y.forEach((i) => {
2800
- i.operator !== "count" && !t.includes(i.name) && t.push(i.name), i.label && !t.includes(i.label) && t.push(i.label);
2808
+ const xe = ({ ooui: i }) => {
2809
+ const t = [i.x.name];
2810
+ return i.y ? (i.y.forEach((s) => {
2811
+ s.operator !== "count" && !t.includes(s.name) && t.push(s.name), s.label && !t.includes(s.label) && t.push(s.label);
2801
2812
  }), t) : [];
2802
2813
  };
2803
- function H({
2804
- fields: s,
2814
+ function Q({
2815
+ fields: i,
2805
2816
  values: e,
2806
2817
  fieldName: t
2807
2818
  }) {
2808
- const i = s[t], r = e[t];
2809
- if (!i)
2819
+ const s = i[t], r = e[t];
2820
+ if (!s)
2810
2821
  throw new Error(`Field ${t} not found`);
2811
- if (i.type === "many2one")
2822
+ if (s.type === "many2one")
2812
2823
  return r ? { value: r[0], label: r[1] } : { value: !1, label: void 0 };
2813
- if (i.type === "selection") {
2814
- const o = i.selection.find((a) => a[0] === r);
2824
+ if (s.type === "selection") {
2825
+ const o = s.selection.find((a) => a[0] === r);
2815
2826
  return o ? { value: r, label: o[1] } : { value: !1, label: void 0 };
2816
2827
  }
2817
2828
  return { value: r, label: r };
2818
2829
  }
2819
- const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2830
+ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2820
2831
  __proto__: null,
2821
- getFieldsToRetrieve: be,
2822
- getValueAndLabelForField: H
2832
+ getFieldsToRetrieve: xe,
2833
+ getValueAndLabelForField: Q
2823
2834
  }, Symbol.toStringTag, { value: "Module" }));
2824
- function ye({
2825
- values: s,
2835
+ function pe({
2836
+ values: i,
2826
2837
  timerange: e,
2827
2838
  interval: t = 1
2828
2839
  }) {
2829
- const i = we({
2830
- values: s,
2840
+ const s = ve({
2841
+ values: i,
2831
2842
  timerange: e
2832
2843
  });
2833
- return xe({
2834
- values: i,
2844
+ return we({
2845
+ values: s,
2835
2846
  timerange: e,
2836
2847
  interval: t
2837
2848
  });
2838
2849
  }
2839
- function xe({
2840
- values: s,
2850
+ function we({
2851
+ values: i,
2841
2852
  timerange: e,
2842
2853
  interval: t = 1
2843
2854
  }) {
2844
- let i = [];
2845
- const r = gt({
2846
- values: s,
2855
+ let s = [];
2856
+ const r = mt({
2857
+ values: i,
2847
2858
  groupBy: "type-stacked"
2848
2859
  }), l = `${e}s`;
2849
2860
  return Object.keys(r).forEach((a) => {
2850
2861
  const c = r[a];
2851
2862
  for (let _ = 0; _ < c.length; _++) {
2852
2863
  const u = c[_];
2853
- if (i.push(u), _ === c.length - 1)
2864
+ if (s.push(u), _ === c.length - 1)
2854
2865
  return;
2855
2866
  const h = u.x, m = c[_ + 1].x;
2856
- if (!ft([h, m], l)) {
2857
- const d = pe({
2867
+ if (!gt([h, m], l)) {
2868
+ const d = Fe({
2858
2869
  dates: [h, m],
2859
2870
  timerange: e,
2860
2871
  interval: t
2861
2872
  });
2862
- i = i.concat(
2873
+ s = s.concat(
2863
2874
  d.map((b) => ({
2864
2875
  x: b,
2865
2876
  value: 0,
@@ -2869,70 +2880,70 @@ function xe({
2869
2880
  );
2870
2881
  }
2871
2882
  }
2872
- }), i.sort((a, c) => a.x < c.x ? -1 : a.x > c.x ? 1 : 0);
2883
+ }), s.sort((a, c) => a.x < c.x ? -1 : a.x > c.x ? 1 : 0);
2873
2884
  }
2874
- function pe({
2875
- dates: s,
2885
+ function Fe({
2886
+ dates: i,
2876
2887
  timerange: e,
2877
2888
  interval: t = 1
2878
2889
  }) {
2879
- const i = [], r = `${e}s`;
2880
- if (s.length === 1)
2881
- return s;
2882
- const l = s.sort((o, a) => o < a ? -1 : o > a ? 1 : 0);
2890
+ const s = [], r = `${e}s`;
2891
+ if (i.length === 1)
2892
+ return i;
2893
+ const l = i.sort((o, a) => o < a ? -1 : o > a ? 1 : 0);
2883
2894
  for (let o = 0; o < l.length - 1; o++) {
2884
2895
  const a = l[o], c = l[o + 1];
2885
- if (!ft([a, c], r)) {
2896
+ if (!gt([a, c], r)) {
2886
2897
  const _ = T(a, D(r)).add(
2887
2898
  t,
2888
2899
  r
2889
2900
  ), u = T(c, D(r));
2890
2901
  for (; _.isBefore(u); )
2891
- i.push(_.format(D(r))), _.add(t, r);
2902
+ s.push(_.format(D(r))), _.add(t, r);
2892
2903
  }
2893
2904
  }
2894
- return i;
2905
+ return s;
2895
2906
  }
2896
- function we({
2897
- values: s,
2907
+ function ve({
2908
+ values: i,
2898
2909
  timerange: e
2899
2910
  }) {
2900
- const t = Fe({
2901
- values: s,
2911
+ const t = Ce({
2912
+ values: i,
2902
2913
  timerange: e
2903
- }), i = [], r = gt({
2914
+ }), s = [], r = mt({
2904
2915
  values: t,
2905
2916
  groupBy: "all"
2906
2917
  });
2907
2918
  return Object.keys(r).forEach((l) => {
2908
- const o = r[l], a = o[0].operator === "count" ? "+" : o[0].operator, c = j({
2919
+ const o = r[l], a = o[0].operator === "count" ? "+" : o[0].operator, c = N({
2909
2920
  values: o.map((_) => _.value),
2910
2921
  operator: a
2911
2922
  });
2912
- i.push({
2923
+ s.push({
2913
2924
  ...o[0],
2914
2925
  value: c
2915
2926
  });
2916
- }), i;
2927
+ }), s;
2917
2928
  }
2918
- function Fe({
2919
- values: s,
2929
+ function Ce({
2930
+ values: i,
2920
2931
  timerange: e
2921
2932
  }) {
2922
- return s.map((t) => ({
2933
+ return i.map((t) => ({
2923
2934
  ...t,
2924
- x: ve({
2935
+ x: ke({
2925
2936
  date: t.x,
2926
2937
  timerange: e
2927
2938
  })
2928
2939
  }));
2929
2940
  }
2930
- function ve({
2931
- date: s,
2941
+ function ke({
2942
+ date: i,
2932
2943
  timerange: e
2933
2944
  }) {
2934
- let t = Ce(s);
2935
- const i = T(s, t);
2945
+ let t = Pe(i);
2946
+ const s = T(i, t);
2936
2947
  switch (e) {
2937
2948
  case "hour": {
2938
2949
  t = "YYYY-MM-DD HH:00";
@@ -2955,36 +2966,36 @@ function ve({
2955
2966
  break;
2956
2967
  }
2957
2968
  }
2958
- return i.format(t);
2969
+ return s.format(t);
2959
2970
  }
2960
- function Ce(s) {
2961
- return s.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2971
+ function Pe(i) {
2972
+ return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2962
2973
  }
2963
- function ft(s, e) {
2974
+ function gt(i, e) {
2964
2975
  let t = !1;
2965
- const i = D(e);
2966
- if (s.length === 0)
2976
+ const s = D(e);
2977
+ if (i.length === 0)
2967
2978
  return !1;
2968
- if (s.length === 1)
2979
+ if (i.length === 1)
2969
2980
  return !0;
2970
- for (let r = 0; r < s.length - 1; r++) {
2971
- const l = T(s[r], i), a = T(s[r + 1], i).diff(l, e);
2981
+ for (let r = 0; r < i.length - 1; r++) {
2982
+ const l = T(i[r], s), a = T(i[r + 1], s).diff(l, e);
2972
2983
  Math.abs(a) === 1 ? t = !0 : t = !1;
2973
2984
  }
2974
2985
  return t;
2975
2986
  }
2976
- function gt({
2977
- values: s,
2987
+ function mt({
2988
+ values: i,
2978
2989
  groupBy: e
2979
2990
  }) {
2980
2991
  const t = {};
2981
- return s.forEach((i) => {
2982
- const r = i.x, l = i.type, o = i.stacked, a = e === "all" ? `${r}-${l}-${o}` : `${l}-${o}`;
2983
- t[a] || (t[a] = []), t[a].push(i);
2992
+ return i.forEach((s) => {
2993
+ const r = s.x, l = s.type, o = s.stacked, a = e === "all" ? `${r}-${l}-${o}` : `${l}-${o}`;
2994
+ t[a] || (t[a] = []), t[a].push(s);
2984
2995
  }), t;
2985
2996
  }
2986
- function D(s) {
2987
- switch (s) {
2997
+ function D(i) {
2998
+ switch (i) {
2988
2999
  case "days":
2989
3000
  return "YYYY-MM-DD";
2990
3001
  case "weeks":
@@ -2998,7 +3009,7 @@ function D(s) {
2998
3009
  return "YYYY-MM-DD HH:mm";
2999
3010
  }
3000
3011
  }
3001
- const ke = {
3012
+ const Oe = {
3002
3013
  count: "count",
3003
3014
  "+": "sum",
3004
3015
  "-": "subtract",
@@ -3006,56 +3017,56 @@ const ke = {
3006
3017
  avg: "average",
3007
3018
  min: "min",
3008
3019
  max: "max"
3009
- }, Pe = ({
3010
- ooui: s,
3020
+ }, We = ({
3021
+ ooui: i,
3011
3022
  values: e,
3012
3023
  fields: t,
3013
- options: i
3024
+ options: s
3014
3025
  }) => {
3015
- const r = G({
3016
- fieldName: s.x.name,
3026
+ const r = $({
3027
+ fieldName: i.x.name,
3017
3028
  values: e,
3018
3029
  fields: t
3019
3030
  }), l = [];
3020
- s.y.forEach((d) => {
3031
+ i.y.forEach((d) => {
3021
3032
  Object.keys(r).forEach((b) => {
3022
3033
  const x = r[b].label, y = r[b].entries;
3023
3034
  if (d.label) {
3024
- const v = G({
3035
+ const v = $({
3025
3036
  fieldName: d.label,
3026
3037
  values: y,
3027
3038
  fields: t
3028
3039
  });
3029
3040
  Object.keys(v).forEach((C) => {
3030
- const w = v[C].entries, V = v[C].label, yt = L({
3041
+ const w = v[C].entries, V = v[C].label, xt = G({
3031
3042
  entries: w,
3032
3043
  fields: t,
3033
3044
  fieldName: d.name
3034
- }), xt = j({
3035
- values: yt,
3045
+ }), pt = N({
3046
+ values: xt,
3036
3047
  operator: d.operator
3037
3048
  });
3038
3049
  l.push({
3039
3050
  x: x || !1,
3040
- value: xt,
3051
+ value: pt,
3041
3052
  type: V,
3042
3053
  operator: d.operator,
3043
3054
  stacked: d.stacked
3044
3055
  });
3045
3056
  });
3046
3057
  } else {
3047
- const v = L({
3058
+ const v = G({
3048
3059
  entries: y,
3049
3060
  fields: t,
3050
3061
  fieldName: d.name
3051
- }), C = j({
3062
+ }), C = N({
3052
3063
  values: v,
3053
3064
  operator: d.operator
3054
3065
  });
3055
3066
  l.push({
3056
3067
  x: x || !1,
3057
3068
  value: C,
3058
- type: mt({
3069
+ type: bt({
3059
3070
  yAxis: d,
3060
3071
  fields: t
3061
3072
  }),
@@ -3065,71 +3076,71 @@ const ke = {
3065
3076
  }
3066
3077
  });
3067
3078
  });
3068
- const o = s.y.some((d) => d.label !== void 0), a = s.y.some((d) => d.stacked !== void 0);
3079
+ const o = i.y.some((d) => d.label !== void 0), a = i.y.some((d) => d.stacked !== void 0);
3069
3080
  let _ = [...l.sort((d, b) => d.x < b.x ? -1 : d.x > b.x ? 1 : 0)];
3070
- a && s.y.filter((d) => d.stacked !== void 0).length > 1 && (_ = _.map((d) => ({ ...d, type: `${d.type} - ${d.stacked}` })));
3081
+ a && i.y.filter((d) => d.stacked !== void 0).length > 1 && (_ = _.map((d) => ({ ...d, type: `${d.type} - ${d.stacked}` })));
3071
3082
  let u = [..._];
3072
- s.type === "pie" && u.some((d) => d.x === !1) ? u = u.map((d) => d.x === !1 ? { ...d, x: (i == null ? void 0 : i.uninformedString) || "Not informed" } : d) : _.some((d) => d.x === !1) && (u = u.filter(
3083
+ i.type === "pie" && u.some((d) => d.x === !1) ? u = u.map((d) => d.x === !1 ? { ...d, x: (s == null ? void 0 : s.uninformedString) || "Not informed" } : d) : _.some((d) => d.x === !1) && (u = u.filter(
3073
3084
  (d) => d.x !== !1
3074
3085
  ));
3075
3086
  let h = u;
3076
- s.timerange ? h = ye({
3087
+ i.timerange ? h = pe({
3077
3088
  values: h,
3078
- timerange: s.timerange,
3079
- interval: s.interval
3080
- }) : s.type == "pie" && (h = u.sort((d, b) => b.value - d.value));
3089
+ timerange: i.timerange,
3090
+ interval: i.interval
3091
+ }) : i.type == "pie" && (h = u.sort((d, b) => b.value - d.value));
3081
3092
  const m = {
3082
3093
  data: h,
3083
3094
  isGroup: a || o,
3084
3095
  isStack: a
3085
3096
  };
3086
- if (s.type === "line" && s.y_range && (m.yAxisOpts = {
3087
- mode: s.y_range
3088
- }, s.y_range === "auto")) {
3089
- const { min: d, max: b } = bt(h);
3097
+ if (i.type === "line" && i.y_range && (m.yAxisOpts = {
3098
+ mode: i.y_range
3099
+ }, i.y_range === "auto")) {
3100
+ const { min: d, max: b } = yt(h);
3090
3101
  m.yAxisOpts.valueOpts = { min: d, max: b };
3091
3102
  }
3092
3103
  return m;
3093
3104
  };
3094
- function L({
3095
- entries: s,
3105
+ function G({
3106
+ entries: i,
3096
3107
  fieldName: e,
3097
3108
  fields: t
3098
3109
  }) {
3099
- return s.map((i) => H({
3110
+ return i.map((s) => Q({
3100
3111
  fieldName: e,
3101
- values: i,
3112
+ values: s,
3102
3113
  fields: t
3103
- })).map(({ value: i, label: r }) => r);
3114
+ })).map(({ value: s, label: r }) => r);
3104
3115
  }
3105
- function j({
3106
- operator: s,
3116
+ function N({
3117
+ operator: i,
3107
3118
  values: e
3108
3119
  }) {
3109
- switch (s) {
3120
+ switch (i) {
3110
3121
  case "count":
3111
3122
  return e.length;
3112
3123
  case "+":
3113
3124
  return Y(
3114
- e.reduce(function(t, i) {
3115
- return t + i;
3125
+ e.reduce(function(t, s) {
3126
+ return t + s;
3116
3127
  })
3117
3128
  );
3118
3129
  case "-":
3119
3130
  return Y(
3120
- e.reduce(function(t, i) {
3121
- return t - i;
3131
+ e.reduce(function(t, s) {
3132
+ return t - s;
3122
3133
  })
3123
3134
  );
3124
3135
  case "*":
3125
3136
  return Y(
3126
- e.reduce(function(t, i) {
3127
- return t * i;
3137
+ e.reduce(function(t, s) {
3138
+ return t * s;
3128
3139
  })
3129
3140
  );
3130
3141
  case "avg": {
3131
- const i = e.reduce((r, l) => r + l, 0) / e.length || 0;
3132
- return Y(i);
3142
+ const s = e.reduce((r, l) => r + l, 0) / e.length || 0;
3143
+ return Y(s);
3133
3144
  }
3134
3145
  case "min":
3135
3146
  return Math.min(...e);
@@ -3137,131 +3148,131 @@ function j({
3137
3148
  return Math.max(...e);
3138
3149
  }
3139
3150
  }
3140
- function Y(s) {
3141
- return Math.round((s + Number.EPSILON) * 100) / 100;
3151
+ function Y(i) {
3152
+ return Math.round((i + Number.EPSILON) * 100) / 100;
3142
3153
  }
3143
- function G({
3144
- fieldName: s,
3154
+ function $({
3155
+ fieldName: i,
3145
3156
  fields: e,
3146
3157
  values: t
3147
3158
  }) {
3148
- const i = {};
3159
+ const s = {};
3149
3160
  return t.forEach((r) => {
3150
- const { value: l, label: o } = H({
3161
+ const { value: l, label: o } = Q({
3151
3162
  fields: e,
3152
3163
  values: r,
3153
- fieldName: s
3164
+ fieldName: i
3154
3165
  });
3155
- i[l] || (i[l] = { label: o, entries: [] }), i[l].entries.push(r);
3156
- }), i;
3166
+ s[l] || (s[l] = { label: o, entries: [] }), s[l].entries.push(r);
3167
+ }), s;
3157
3168
  }
3158
- function Oe(s) {
3169
+ function Te(i) {
3159
3170
  let e = [];
3160
- return Object.keys(s).forEach((t) => {
3161
- const i = s[t];
3162
- e = e.concat(i.entries);
3171
+ return Object.keys(i).forEach((t) => {
3172
+ const s = i[t];
3173
+ e = e.concat(s.entries);
3163
3174
  }), e;
3164
3175
  }
3165
- function mt({
3166
- yAxis: s,
3176
+ function bt({
3177
+ yAxis: i,
3167
3178
  fields: e
3168
3179
  }) {
3169
- const t = e[s.name];
3170
- return t != null && t.string ? t.string : s.name;
3180
+ const t = e[i.name];
3181
+ return t != null && t.string ? t.string : i.name;
3171
3182
  }
3172
- function bt(s, e = 0.1) {
3173
- if (s.length === 0)
3183
+ function yt(i, e = 0.1) {
3184
+ if (i.length === 0)
3174
3185
  throw new Error("The values array cannot be empty.");
3175
- const t = s.map((o) => o.value), i = Math.min(...t), r = Math.max(...t), l = (r - i) * e;
3186
+ const t = i.map((o) => o.value), s = Math.min(...t), r = Math.max(...t), l = (r - s) * e;
3176
3187
  return {
3177
- min: i - l,
3188
+ min: s - l,
3178
3189
  max: r + l
3179
3190
  };
3180
3191
  }
3181
- const Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3192
+ const $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3182
3193
  __proto__: null,
3183
- getAllObjectsInGroupedValues: Oe,
3184
- getMinMax: bt,
3185
- getValueForOperator: j,
3186
- getValuesForYField: L,
3187
- getValuesGroupedByField: G,
3188
- getYAxisFieldname: mt,
3189
- labelsForOperator: ke,
3190
- processGraphData: Pe
3194
+ getAllObjectsInGroupedValues: Te,
3195
+ getMinMax: yt,
3196
+ getValueForOperator: N,
3197
+ getValuesForYField: G,
3198
+ getValuesGroupedByField: $,
3199
+ getYAxisFieldname: bt,
3200
+ labelsForOperator: Oe,
3201
+ processGraphData: We
3191
3202
  }, Symbol.toStringTag, { value: "Module" }));
3192
3203
  export {
3193
- It as ActionButtons,
3194
- te as Alert,
3195
- Ot as Avatar,
3196
- Rt as Binary,
3197
- it as Boolean,
3204
+ Et as ActionButtons,
3205
+ ee as Alert,
3206
+ Wt as Avatar,
3207
+ Lt as Binary,
3208
+ nt as Boolean,
3198
3209
  A as Button,
3199
3210
  zt as ButtonGroup,
3200
- ae as Card,
3201
- ie as Carousel,
3202
- R as Char,
3203
- at as CodeEditor,
3204
- ne as ColorPicker,
3205
- ee as Comments,
3206
- z as Container,
3211
+ le as Card,
3212
+ ne as Carousel,
3213
+ L as Char,
3214
+ lt as CodeEditor,
3215
+ re as ColorPicker,
3216
+ ie as Comments,
3217
+ I as Container,
3207
3218
  F as ContainerWidget,
3208
- Me as Dashboard,
3209
- ue as DashboardItem,
3210
- Nt as Date,
3211
- At as DateTime,
3219
+ Re as Dashboard,
3220
+ _e as DashboardItem,
3221
+ At as Date,
3222
+ Mt as DateTime,
3212
3223
  se as Email,
3213
3224
  f as Field,
3214
- q as Float,
3215
- Yt as FloatTime,
3216
- Ee as Form,
3217
- ut as Graph,
3218
- _t as GraphAxis,
3219
- M as GraphChart,
3220
- ht as GraphIndicator,
3221
- he as GraphIndicatorField,
3222
- me as GraphXAxis,
3223
- ge as GraphYAxis,
3224
- Tt as Group,
3225
- Dt as HTMLPreview,
3226
- Gt as Icon,
3227
- Lt as Image,
3228
- Jt as Indicator,
3229
- Vt as Integer,
3225
+ J as Float,
3226
+ Dt as FloatTime,
3227
+ Ye as Form,
3228
+ ht as Graph,
3229
+ ft as GraphAxis,
3230
+ B as GraphChart,
3231
+ _t as GraphIndicator,
3232
+ fe as GraphIndicatorField,
3233
+ ye as GraphXAxis,
3234
+ be as GraphYAxis,
3235
+ It as Group,
3236
+ Nt as HTMLPreview,
3237
+ $t as Icon,
3238
+ Gt as Image,
3239
+ Ht as Indicator,
3240
+ Yt as Integer,
3230
3241
  K as JSONField,
3231
- Ye as Kanban,
3232
- De as KanbanCard,
3242
+ Ne as Kanban,
3243
+ je as KanbanCard,
3233
3244
  st as Label,
3234
3245
  St as Many2one,
3235
- Et as Markdown,
3236
- rt as MultiCheckbox,
3237
- et as NewLine,
3238
- B as Notebook,
3239
- nt as One2many,
3240
- Wt as Page,
3246
+ Vt as Markdown,
3247
+ at as MultiCheckbox,
3248
+ it as NewLine,
3249
+ R as Notebook,
3250
+ rt as One2many,
3251
+ Tt as Page,
3241
3252
  jt as ProgressBar,
3242
- re as QRCode,
3253
+ ae as QRCode,
3243
3254
  Kt as Radio,
3244
- Bt as Reference,
3245
- de as SearchFieldTypes,
3246
- je as SearchFilter,
3247
- S as Selection,
3248
- Mt as Separator,
3249
- N as Spinner,
3250
- Ut as Steps,
3251
- Xt as Switch,
3252
- Qt as Tag,
3253
- Ht as Tags,
3254
- $ as Text,
3255
- Zt as Time,
3256
- qt as Timeline,
3257
- Ve as Tree,
3255
+ Rt as Reference,
3256
+ he as SearchFieldTypes,
3257
+ Ae as SearchFilter,
3258
+ E as Selection,
3259
+ Bt as Separator,
3260
+ j as Spinner,
3261
+ Zt as Steps,
3262
+ Ut as Switch,
3263
+ Xt as Tag,
3264
+ Qt as Tags,
3265
+ q as Text,
3266
+ te as Time,
3267
+ Jt as Timeline,
3268
+ De as Tree,
3258
3269
  k as Widget,
3259
- Re as graphFieldUtils,
3260
- Le as graphProcessor,
3261
- J as parseContext,
3262
- Se as parseContextFields,
3263
- Ae as parseDomainFields,
3264
- Be as parseGraph,
3265
- Ne as transformDomainForChildWidget
3270
+ Ge as graphFieldUtils,
3271
+ $e as graphProcessor,
3272
+ H as parseContext,
3273
+ Ve as parseContextFields,
3274
+ Be as parseDomainFields,
3275
+ Le as parseGraph,
3276
+ Me as transformDomainForChildWidget
3266
3277
  };
3267
3278
  //# sourceMappingURL=ooui.es.js.map